Add Models to Sample Projects (Web)

Updated: 01/30/2020

This page describes the steps to add a Live2D Cubism model to the Live2D Cubism SDK for Web sample.
Samples should be built in advance with reference to “Build Samples.” 

In this tutorial, add the sample model “Miara” to the sample project.

Program-side Changes

Add the folder for the model that has been configured to the resources folder.
Add to [root]/Sample/Resources folder.

Add the string ‘miara’ to ModelDir in lappdefine.ts.

    export const ModelDir: string[] = [
        "Haru",
        "Hiyori",
        "Mark",
        "Natori",
        "Rice",
        "miara" //< add
    ]
Tips

Windows does not distinguish between upper and lower case letters.
However, please note that naming is strictly controlled on servers and Linux.

Please let us know what you think about this article.