├── .editorconfig ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .vscode ├── extensions.json ├── launch.json ├── settings.json └── tasks.json ├── CHANGELOG.md ├── Core ├── CHANGELOG.md ├── LICENSE.md ├── README.ja.md ├── README.md └── RedistributableFiles.txt ├── LICENSE.md ├── NOTICE.ja.md ├── NOTICE.md ├── README.ja.md ├── README.md └── Samples ├── Resources ├── Haru │ ├── Haru.2048 │ │ ├── texture_00.png │ │ └── texture_01.png │ ├── Haru.cdi3.json │ ├── Haru.moc3 │ ├── Haru.model3.json │ ├── Haru.physics3.json │ ├── Haru.pose3.json │ ├── Haru.userdata3.json │ ├── expressions │ │ ├── F01.exp3.json │ │ ├── F02.exp3.json │ │ ├── F03.exp3.json │ │ ├── F04.exp3.json │ │ ├── F05.exp3.json │ │ ├── F06.exp3.json │ │ ├── F07.exp3.json │ │ └── F08.exp3.json │ ├── motions │ │ ├── haru_g_idle.motion3.json │ │ ├── haru_g_m01.motion3.json │ │ ├── haru_g_m02.motion3.json │ │ ├── haru_g_m03.motion3.json │ │ ├── haru_g_m04.motion3.json │ │ ├── haru_g_m05.motion3.json │ │ ├── haru_g_m06.motion3.json │ │ ├── haru_g_m07.motion3.json │ │ ├── haru_g_m08.motion3.json │ │ ├── haru_g_m09.motion3.json │ │ ├── haru_g_m10.motion3.json │ │ ├── haru_g_m11.motion3.json │ │ ├── haru_g_m12.motion3.json │ │ ├── haru_g_m13.motion3.json │ │ ├── haru_g_m14.motion3.json │ │ ├── haru_g_m15.motion3.json │ │ ├── haru_g_m16.motion3.json │ │ ├── haru_g_m17.motion3.json │ │ ├── haru_g_m18.motion3.json │ │ ├── haru_g_m19.motion3.json │ │ ├── haru_g_m20.motion3.json │ │ ├── haru_g_m21.motion3.json │ │ ├── haru_g_m22.motion3.json │ │ ├── haru_g_m23.motion3.json │ │ ├── haru_g_m24.motion3.json │ │ ├── haru_g_m25.motion3.json │ │ └── haru_g_m26.motion3.json │ └── sounds │ │ ├── haru_Info_04.wav │ │ ├── haru_Info_14.wav │ │ ├── haru_normal_6.wav │ │ └── haru_talk_13.wav ├── Hiyori │ ├── Hiyori.2048 │ │ ├── texture_00.png │ │ └── texture_01.png │ ├── Hiyori.cdi3.json │ ├── Hiyori.moc3 │ ├── Hiyori.model3.json │ ├── Hiyori.physics3.json │ ├── Hiyori.pose3.json │ ├── Hiyori.userdata3.json │ └── motions │ │ ├── Hiyori_m01.motion3.json │ │ ├── Hiyori_m02.motion3.json │ │ ├── Hiyori_m03.motion3.json │ │ ├── Hiyori_m04.motion3.json │ │ ├── Hiyori_m05.motion3.json │ │ ├── Hiyori_m06.motion3.json │ │ ├── Hiyori_m07.motion3.json │ │ ├── Hiyori_m08.motion3.json │ │ ├── Hiyori_m09.motion3.json │ │ └── Hiyori_m10.motion3.json ├── Mao │ ├── Mao.2048 │ │ └── texture_00.png │ ├── Mao.cdi3.json │ ├── Mao.moc3 │ ├── Mao.model3.json │ ├── Mao.physics3.json │ ├── Mao.pose3.json │ ├── expressions │ │ ├── exp_01.exp3.json │ │ ├── exp_02.exp3.json │ │ ├── exp_03.exp3.json │ │ ├── exp_04.exp3.json │ │ ├── exp_05.exp3.json │ │ ├── exp_06.exp3.json │ │ ├── exp_07.exp3.json │ │ └── exp_08.exp3.json │ └── motions │ │ ├── mtn_01.motion3.json │ │ ├── mtn_02.motion3.json │ │ ├── mtn_03.motion3.json │ │ ├── mtn_04.motion3.json │ │ ├── sample_01.motion3.json │ │ ├── special_01.motion3.json │ │ ├── special_02.motion3.json │ │ └── special_03.motion3.json ├── Mark │ ├── Mark.2048 │ │ └── texture_00.png │ ├── Mark.cdi3.json │ ├── Mark.moc3 │ ├── Mark.model3.json │ ├── Mark.physics3.json │ ├── Mark.userdata3.json │ └── motions │ │ ├── mark_m01.motion3.json │ │ ├── mark_m02.motion3.json │ │ ├── mark_m03.motion3.json │ │ ├── mark_m04.motion3.json │ │ ├── mark_m05.motion3.json │ │ └── mark_m06.motion3.json ├── Natori │ ├── Natori.2048 │ │ └── texture_00.png │ ├── Natori.cdi3.json │ ├── Natori.moc3 │ ├── Natori.model3.json │ ├── Natori.physics3.json │ ├── Natori.pose3.json │ ├── exp │ │ ├── Angry.exp3.json │ │ ├── Blushing.exp3.json │ │ ├── Normal.exp3.json │ │ ├── Sad.exp3.json │ │ ├── Smile.exp3.json │ │ ├── Surprised.exp3.json │ │ ├── exp_01.exp3.json │ │ ├── exp_02.exp3.json │ │ ├── exp_03.exp3.json │ │ ├── exp_04.exp3.json │ │ └── exp_05.exp3.json │ └── motions │ │ ├── mtn_00.motion3.json │ │ ├── mtn_01.motion3.json │ │ ├── mtn_02.motion3.json │ │ ├── mtn_03.motion3.json │ │ ├── mtn_04.motion3.json │ │ ├── mtn_05.motion3.json │ │ ├── mtn_06.motion3.json │ │ └── mtn_07.motion3.json ├── Rice │ ├── Rice.2048 │ │ ├── texture_00.png │ │ └── texture_01.png │ ├── Rice.cdi3.json │ ├── Rice.moc3 │ ├── Rice.model3.json │ ├── Rice.physics3.json │ └── motions │ │ ├── idle.motion3.json │ │ ├── mtn_01.motion3.json │ │ ├── mtn_02.motion3.json │ │ └── mtn_03.motion3.json ├── Wanko │ ├── Wanko.1024 │ │ └── texture_00.png │ ├── Wanko.cdi3.json │ ├── Wanko.moc3 │ ├── Wanko.model3.json │ ├── Wanko.physics3.json │ └── motions │ │ ├── idle_01.motion3.json │ │ ├── idle_02.motion3.json │ │ ├── idle_03.motion3.json │ │ ├── idle_04.motion3.json │ │ ├── shake_01.motion3.json │ │ ├── shake_02.motion3.json │ │ ├── touch_01.motion3.json │ │ ├── touch_02.motion3.json │ │ ├── touch_03.motion3.json │ │ ├── touch_04.motion3.json │ │ ├── touch_05.motion3.json │ │ └── touch_06.motion3.json ├── back_class_normal.png └── icon_gear.png └── TypeScript ├── Demo ├── copy_resources.js ├── eslint.config.mjs ├── index.html ├── package-lock.json ├── package.json ├── public │ └── .gitignore ├── src │ ├── lappdefine.ts │ ├── lappdelegate.ts │ ├── lappglmanager.ts │ ├── lapplive2dmanager.ts │ ├── lappmodel.ts │ ├── lapppal.ts │ ├── lappsprite.ts │ ├── lappsubdelegate.ts │ ├── lapptexturemanager.ts │ ├── lappview.ts │ ├── lappwavfilehandler.ts │ ├── main.ts │ └── touchmanager.ts ├── tsconfig.json └── vite.config.mts ├── README.ja.md └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Core directory files 2 | /Core/**/.js 3 | /Core/**/.ts 4 | # Package files 5 | node_modules/ 6 | # Build files 7 | build/ 8 | dist/ 9 | # Other files 10 | temp/ 11 | .vs/ 12 | .idea/ 13 | *.iml 14 | .DS_Store 15 | # Exclude some VSCode setting files. 16 | .vscode/* 17 | !/.vscode/extensions.json 18 | !/.vscode/launch.json 19 | !/.vscode/settings.json 20 | !/.vscode/tasks.json 21 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Framework"] 2 | path = Framework 3 | url = https://github.com/Live2D/CubismWebFramework.git 4 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "editorconfig.editorconfig" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "chrome", 6 | "request": "launch", 7 | "name": "Launch Chrome", 8 | "url": "http://localhost:5000", 9 | "webRoot": "${workspaceFolder}/Samples/TypeScript/Demo", 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "./Samples/TypeScript/Demo/node_modules/typescript/lib" 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | // Tasks for Samples/TypeScript/Demo 5 | { 6 | "type": "npm", 7 | "script": "install", 8 | "path": "Samples/TypeScript/Demo/", 9 | "problemMatcher": [] 10 | }, 11 | { 12 | "type": "npm", 13 | "script": "start", 14 | "path": "Samples/TypeScript/Demo/", 15 | "group": "build", 16 | "problemMatcher": [] 17 | }, 18 | { 19 | "type": "npm", 20 | "script": "build", 21 | "path": "Samples/TypeScript/Demo/", 22 | "group": "build", 23 | "problemMatcher": [] 24 | }, 25 | { 26 | "type": "npm", 27 | "script": "build:prod", 28 | "path": "Samples/TypeScript/Demo/", 29 | "group": "build", 30 | "problemMatcher": [] 31 | }, 32 | { 33 | "type": "npm", 34 | "script": "test", 35 | "path": "Samples/TypeScript/Demo/", 36 | "group": "test", 37 | "problemMatcher": [] 38 | }, 39 | { 40 | "type": "npm", 41 | "script": "lint", 42 | "path": "Samples/TypeScript/Demo/", 43 | "group": "test", 44 | "problemMatcher": [] 45 | }, 46 | { 47 | "type": "npm", 48 | "script": "lint:fix", 49 | "path": "Samples/TypeScript/Demo/", 50 | "group": "test", 51 | "problemMatcher": [] 52 | }, 53 | { 54 | "type": "npm", 55 | "script": "clean", 56 | "path": "Samples/TypeScript/Demo/", 57 | "problemMatcher": [] 58 | }, 59 | // Tasks for Framework 60 | { 61 | "type": "npm", 62 | "script": "install", 63 | "path": "Framework/", 64 | "problemMatcher": [] 65 | }, 66 | { 67 | "type": "npm", 68 | "script": "build", 69 | "path": "Framework/", 70 | "group": "build", 71 | "problemMatcher": [] 72 | }, 73 | { 74 | "type": "npm", 75 | "script": "test", 76 | "path": "Framework/", 77 | "group": "test", 78 | "problemMatcher": [] 79 | }, 80 | { 81 | "type": "npm", 82 | "script": "lint", 83 | "path": "Framework/", 84 | "group": "test", 85 | "problemMatcher": [] 86 | }, 87 | { 88 | "type": "npm", 89 | "script": "lint:fix", 90 | "path": "Framework/", 91 | "group": "test", 92 | "problemMatcher": [] 93 | }, 94 | { 95 | "type": "npm", 96 | "script": "clean", 97 | "path": "Framework/", 98 | "problemMatcher": [] 99 | } 100 | ] 101 | } 102 | -------------------------------------------------------------------------------- /Core/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). 6 | 7 | 8 | ## 2025-04-24 9 | 10 | ### Added 11 | 12 | * Add the function `csmGetParameterRepeats`. 13 | * This function retrieves whether the parameters are set to repeat. 14 | 15 | ### Changed 16 | 17 | * Upgrade Core version to 05.01.0000. 18 | 19 | ### Fixed 20 | 21 | * Fix `csmGetParameterKeyCounts()` and `csmGetParameterKeyValues()` symbols in the DLL. 22 | 23 | 24 | ## 2024-12-19 25 | 26 | ### Removed 27 | 28 | * [Native] Remove Visual Studio 2013 (MSVC 120) static library. 29 | 30 | 31 | ## 2024-11-07 32 | 33 | ### Added 34 | 35 | * [Native] Add experimental support `arm64` library for linux. 36 | 37 | ### Removed 38 | 39 | * [Unity,Native,Java] Remove Android ARM v7 library. 40 | 41 | 42 | ## 2024-04-04 43 | 44 | ### Added 45 | 46 | * [Unity] Add library(.so) for HarmonyOS build. 47 | 48 | 49 | ## 2024-03-26 50 | 51 | ### Remove 52 | 53 | * [Unity] Remove built with Emscripten 1.38.48. 54 | * Unity 2021.2 or later uses only Core under `Assets/Live2D/Cubism/Plugins/Experimental/Emscripten/latest`. 55 | 56 | 57 | ## 2023-09-28 58 | 59 | ### Remove 60 | 61 | * Remove bitcode from IOS build. 62 | 63 | 64 | ## 2023-08-17 65 | 66 | ### Added 67 | 68 | * Enhance Blend Shape features. 69 | * Please see [here](https://docs.live2d.com/en/cubism-editor-manual/blend-shape/). 70 | 71 | ### Changed 72 | 73 | * Upgrade Core version to 05.00.0000. 74 | 75 | 76 | ## 2023-05-09 77 | 78 | ### Changed 79 | 80 | * Change the GCC version of the library for Linux from 6.5.0 to 8.3.0. 81 | 82 | 83 | ## 2023-03-16 84 | 85 | ### Fixed 86 | 87 | * Fix a case in which the index of the mask's drawable object was negative value for `csmGetDrawableMasks()`. 88 | * Fix a problem in which `csmHasMocConsistency()` was returned as 0 even though the MOC3 file was in the correct format. 89 | * This problem was occurring in some models using the blendshape weight limit settings. 90 | * Fix a problem that could cause a crash if a MOC3 file that is not in the correct format is loaded with `csmHasMocConsistency()`. 91 | 92 | ### Changed 93 | 94 | * Upgrade Core version to 04.02.0004. 95 | 96 | 97 | ## 2023-03-10 98 | 99 | ### Added 100 | 101 | * Add the function `csmHasMocConsistency`. 102 | * This function verifies that the `MOC3` file is valid. 103 | 104 | ### Changed 105 | 106 | * Upgrade Core version to 04.02.0003. 107 | 108 | 109 | ## 2023-02-21 110 | 111 | ### Added 112 | 113 | * [Web] Added classes related to `Memory`. 114 | * Add the funciton `initializeAmountOfMemory()` to adjust the amount of memory at initialization. 115 | 116 | 117 | ## 2022-10-28 118 | 119 | ### Fixed 120 | 121 | * [Java] Remove unnecessary methods. 122 | 123 | 124 | ## 2022-10-06 125 | 126 | ### Added 127 | 128 | * [Java] Add AAR file for Android. 129 | 130 | 131 | ## 2022-09-08 132 | 133 | ### Added 134 | 135 | * Add the multilingual supported documents. 136 | * Support Visual Studio 2022. 137 | 138 | 139 | ## 2022-08-04 140 | 141 | ### Fixed 142 | 143 | * [Web] Fix `csmGetMocVersion` function argument. 144 | 145 | 146 | ## 2022-07-07 147 | 148 | ### Added 149 | 150 | * Add functions 151 | * `csmGetParameterTypes` 152 | * `csmGetDrawableParentPartIndices` 153 | 154 | * Add type `csmMocVersion` and enum. This type is the return value of `csmGetMocVersion`, `csmGetLatestMocVersion`. 155 | 156 | ### Changed 157 | 158 | * Upgrade Core version to 04.02.0002. 159 | 160 | 161 | ## 2022-06-02 162 | 163 | ### Changed 164 | 165 | * Upgrade Core version to 04.02.0001. 166 | 167 | ### Fixed 168 | 169 | * Fixed a bug that caused Multiply Color / Screen Color of different objects to be applied. 170 | 171 | 172 | ## 2022-05-19 173 | 174 | ### Added 175 | 176 | * Support new Multiply Color / Screen Color features. 177 | * Support new Blend Shape features. 178 | 179 | ### Changed 180 | 181 | * Upgrade Core version to 04.02.0000. This upgrade is following Cubism Editor 4.2 features. 182 | 183 | 184 | ## 2022-02-10 185 | 186 | ### Added 187 | 188 | * [Unity] Add bitcode library(.bc) for Emscripten latest version build. 189 | 190 | ### Changed 191 | 192 | * [Unity] Change the bitcode file directory location. 193 | * emsdk latest version build bitcode file in `latest` directory. 194 | * emsdk 1.38.48 build bitcode file in `1_38_48` directory. 195 | 196 | 197 | ## 2021-12-09 198 | 199 | ### Added 200 | 201 | * Add static library(.a) for Mac Catalyst. 202 | 203 | 204 | ## 2021-10-07 205 | 206 | ### Added 207 | 208 | * Add `x86_64` library for Android. 209 | * Add `arm64` library for macOS. 210 | 211 | 212 | ## 2021-03-09 213 | 214 | ### Added 215 | 216 | * Add funtcions for Viewer. 217 | * `csmGetParameterKeyCounts` 218 | * `csmGetParameterKeyValues` 219 | 220 | 221 | ### Changed 222 | 223 | * Update Core version to `04.01.0000`. 224 | 225 | 226 | ## 2020-01-30 227 | 228 | ### Added 229 | 230 | * Add static library(.lib) for statically linking DLL. 231 | * Add symbol file for Windows dynamic library (dll). 232 | 233 | 234 | ## 2019-11-19 235 | 236 | ### Fixed 237 | 238 | * Fix linking static libraries for Windows (.lib). 239 | 240 | 241 | ## 2019-11-14 242 | 243 | ### Added 244 | 245 | * Support Visual Studio 2019. 246 | * Support macOS dynamic library (dylib). 247 | 248 | ### Changed 249 | 250 | * Update Windows dynamic library: Use Visual Studio 2019 for building. 251 | 252 | ### Security 253 | 254 | * Bundle certificate and notary ticket to macOS shared library. 255 | 256 | 257 | ## 2019-09-04 258 | 259 | ### Added 260 | 261 | * Support new Inverted Masking features. 262 | * Support ARM64 architecture for Universal Windows Platform. 263 | 264 | ### Changed 265 | 266 | * Upgrade Core version to 04.00.0000 (67108864). This upgrade is following Cubism Editor 4.0 features. 267 | * Add calling convention for *Windows/x86 DLL* only. 268 | 269 | ### Removed 270 | 271 | * Remove bitcode binary due to suspension of *Cubism Bindings.* 272 | 273 | 274 | ## 2019-04-09 275 | 276 | ### Added 277 | 278 | * Support Universal Windows Platform for Windows Store Application. 279 | 280 | 281 | ## 2019-01-31 282 | 283 | ### Added 284 | 285 | * Add API to get the parent part of the specified part. 286 | * Add API to get moc3 version. 287 | 288 | 289 | ## 2018-12-20 290 | 291 | ### Added 292 | 293 | * [Native] Add new function: `csmGetPartParentPartIndices`. 294 | * [Native, 3.3 Support] Support new Warp Deformer features. 295 | 296 | ### Changed 297 | 298 | * Upgrade Core version to 03.03.0000 (50528256). This upgrade is following Cubism Editor 3.3 features. 299 | 300 | 301 | ## 2018-08-22 302 | 303 | ### Added 304 | 305 | * [Native] Add support for Neon. 306 | 307 | 308 | ## 2018-05-14 309 | 310 | ### Added 311 | 312 | * [Native] Add Windows **Visual C++ 2013** library. 313 | * [Windows] Add runtime library choice `MT`, `MD`, `MTd`, `MDd`. 314 | * [iOS] Add support for iPhone Simulator SDK. 315 | 316 | ### Fixed 317 | 318 | * Fix an error occurred when linking libraries for Android `arm64-v8a`. 319 | 320 | 321 | ## 2017-11-17 322 | 323 | ### Fixed 324 | 325 | * Fix processing of vertex index. 326 | 327 | 328 | ## 2017-10-05 329 | 330 | ### Added 331 | 332 | * Provide bitcode for iOS. 333 | 334 | 335 | ## 2017-08-09 336 | 337 | ### Added 338 | 339 | * [Native] Add Android *arm64-v8a* ABI library. 340 | 341 | ### Fixed 342 | 343 | * Fix drawing order in certain scenarios. 344 | 345 | 346 | ## 2017-07-12 347 | 348 | ### Added 349 | 350 | * Add experimental support for Emscripten. 351 | * Add `CHANGELOG.md`. 352 | 353 | ### Fixed 354 | 355 | * Fix access violation in certain scenarios. 356 | * Fix update result in certain scenarios. 357 | 358 | 359 | ## 2017-05-02 360 | 361 | ### Added 362 | 363 | * [Native] Add experimental support for Raspberry PI. 364 | * Add `README.md`. 365 | -------------------------------------------------------------------------------- /Core/LICENSE.md: -------------------------------------------------------------------------------- 1 | ## Live2D Proprietary Software License 2 | 3 | Live2D Cubism Core is available under Live2D Proprietary Software License. 4 | 5 | * [Live2D Proprietary Software License Agreement](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html) 6 | * [Live2D Proprietary Software 使用許諾契約書](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_jp.html) 7 | * [Live2D Proprietary Software 使用授权协议](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_cn.html) 8 | -------------------------------------------------------------------------------- /Core/README.ja.md: -------------------------------------------------------------------------------- 1 | [English](README.md) / [日本語](README.ja.md) 2 | 3 | --- 4 | 5 | # Live2D Cubism Core 6 | 7 | このフォルダーには、JavaScriptまたはTypeScriptアプリケーションを開発するためのコアライブラリファイルが含まれています。 8 | 9 | 10 | ## ファイルリスト 11 | 12 | ### live2dcubismcore.d.ts 13 | 14 | このファイルには、`live2dcubismcore.js`に関するTypeScriptの型情報が含まれています。 15 | TypeScriptで開発する場合は、このファイルを`live2dcubismcore.js`とともに使用してください。 16 | 17 | ### live2dcubismcore.js 18 | 19 | このファイルには、CubismCoreの機能といくつかのラッパーが含まれています。 20 | JavaScriptで開発する場合は、このファイルを使用してください。 21 | 22 | ### live2dcubismcore.js.map 23 | 24 | このファイルは、`live2dcubismcore.d.ts`と`live2dcubismcore.js`の間のソースマップです。 25 | デバッグ時にこのファイルを使用します。 26 | 27 | ### live2dcubismcore.min.js 28 | 29 | このファイルは、`live2dcubismcore.js`のminify版です。 30 | このファイルを本番環境で使用します。 31 | -------------------------------------------------------------------------------- /Core/README.md: -------------------------------------------------------------------------------- 1 | [English](README.md) / [日本語](README.ja.md) 2 | 3 | --- 4 | 5 | # Live2D Cubism Core 6 | 7 | This folder contains core library files for developing JavaScript or TypeScript applications. 8 | 9 | 10 | ## File List 11 | 12 | ### live2dcubismcore.d.ts 13 | 14 | This file contains typescript type information about `live2dcubismcore.js`. 15 | Use this file with `live2dcubismcore.js` when developing with TypeScript. 16 | 17 | ### live2dcubismcore.js 18 | 19 | This file contains Cubism Core features and some wrapper features. 20 | Use this file when developing with JavaScript. 21 | 22 | ### live2dcubismcore.js.map 23 | 24 | This file is the source map between `live2dcubismcore.d.ts` and `live2dcubismcore.js`. 25 | Use this file when debugging. 26 | 27 | ### live2dcubismcore.min.js 28 | 29 | This file is the minified version of `live2dcubismcore.js`. 30 | Use this file in production. 31 | -------------------------------------------------------------------------------- /Core/RedistributableFiles.txt: -------------------------------------------------------------------------------- 1 | The following is a list of files available for redistribution 2 | under the terms of the Live2D Proprietary Software License Agreement: 3 | 4 | - live2dcubismcore.d.ts 5 | - live2dcubismcore.js 6 | - live2dcubismcore.min.js 7 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | ## Definitions 2 | 3 | ### Live2D Cubism Components 4 | 5 | Cubism Web Samples is included in Live2D Cubism Components. 6 | 7 | Cubism Web Samples は Live2D Cubism Components に含まれます。 8 | 9 | Cubism Web Samples 包括在 Live2D Cubism Components 中。 10 | 11 | ## Cubism SDK Release License 12 | 13 | *All business* users must obtain a Cubism SDK Release License. "Business" means an entity with the annual gross revenue more than ten million (10,000,000) JPY for the most recent fiscal year. 14 | 15 | * [Cubism SDK Release License](https://www.live2d.com/en/download/cubism-sdk/release-license/) 16 | 17 | 直近会計年度の売上高が 1000 万円以上の事業者様がご利用になる場合は、Cubism SDK リリースライセンス(出版許諾契約)に同意していただく必要がございます。 18 | 19 | * [Cubism SDK リリースライセンス](https://www.live2d.com/ja/download/cubism-sdk/release-license/) 20 | 21 | 如果您的企业在最近一个会计年度的销售额达到或超过1000万日元,您必须得到Cubism SDK的出版授权许可(出版许可协议)。 22 | 23 | * [Cubism SDK发行许可证](https://www.live2d.com/zh-CHS/download/cubism-sdk/release-license/) 24 | 25 | ## Live2D Open Software License 26 | 27 | Live2D Cubism Components is available under Live2D Open Software License. 28 | 29 | * [Live2D Open Software License](https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html) 30 | * [Live2D Open Software 使用許諾契約書](https://www.live2d.com/eula/live2d-open-software-license-agreement_jp.html) 31 | * [Live2D Open Software 使用授权协议](https://www.live2d.com/eula/live2d-open-software-license-agreement_cn.html) 32 | 33 | 34 | ## Live2D Proprietary Software License 35 | 36 | Live2D Cubism Core is available under Live2D Proprietary Software License. 37 | 38 | * [Live2D Proprietary Software License Agreement](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html) 39 | * [Live2D Proprietary Software 使用許諾契約書](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_jp.html) 40 | * [Live2D Proprietary Software 使用授权协议](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_cn.html) 41 | 42 | 43 | ## Free Material License 44 | 45 | Live2D models listed below are available under Free Material License. 46 | 47 | * [Free Material License Agreement](https://www.live2d.com/eula/live2d-free-material-license-agreement_en.html) 48 | * [無償提供マテリアルの使用許諾契約書](https://www.live2d.com/eula/live2d-free-material-license-agreement_jp.html) 49 | * [无偿提供素材使用授权协议](https://www.live2d.com/eula/live2d-free-material-license-agreement_cn.html) 50 | 51 | ``` 52 | Samples/Resources/Haru 53 | Samples/Resources/Hiyori 54 | Samples/Resources/Mao 55 | Samples/Resources/Mark 56 | Samples/Resources/Natori 57 | Samples/Resources/Rice 58 | Samples/Resources/Wanko 59 | ``` 60 | 61 | If you use these models, you must agree to the terms of a contract set [here](https://docs.live2d.com/cubism-editor-manual/sample-model/) for each model. 62 | 63 | 64 | --- 65 | 66 | Please contact us from [here](https://www.live2d.jp/contact/) for more license information. 67 | -------------------------------------------------------------------------------- /NOTICE.ja.md: -------------------------------------------------------------------------------- 1 | [English](NOTICE.md) / [日本語](NOTICE.ja.md) 2 | 3 | --- 4 | 5 | # お知らせ 6 | 7 | ## [注意事項] Cubism 4 SDK for Web R1 以降へのアップデートに伴う注意 8 | 9 | Cubism 4 SDK for Web R1 にてそれ以前のベータ版から正式版のリリースに伴い、 10 | 利便性向上のためパッケージ及びリポジトリの構造変更がおこなわれました。 11 | 12 | この変更は Cubism 4 SDK for Native と構造を変えずに運用がなされるほか、 13 | ユーザに管理が不必要なファイルが混在することを避けることが理由です。 14 | 15 | 構造の変更点、及び Cubism 4 SDK for Web beta2 以前のプロジェクトからの更新方法に関して、 16 | [Cubism SDK Manual] に詳細を記載しています。アップデートを行う際は必ずご確認ください。 17 | 18 | [Cubism SDK Manual]: https://docs.live2d.com/cubism-sdk-manual/warning-for-cubism4-web-r1-update/ 19 | 20 | ## [注意事項] 依存パッケージでの宣言重複エラーについて (2023-02-23) 21 | 22 | Cubism 4 SDK for Web Samples で利用されている依存パッケージのうち `@types/node` に起因する、 23 | 宣言重複のエラーが発生する場合があります。 24 | 25 | こちらは以下のいずれかの手順で解決が可能であることを確認しております。 26 | 27 | ### 解決策1: npm-check-updatesを利用する方法 28 | 29 | 1. ターミナルで `/Samples/TypeScript/Demo` ディレクトリに移動する。 30 | 1. コマンド `npm i -g npm-check-updates` を実行する。 31 | 1. コマンド `ncu` を実行する。 32 | 33 | ### 解決策2: @types/node明示的にインストールし直す方法 34 | 35 | 1. ターミナルで `/Samples/TypeScript/Demo` ディレクトリに移動する。 36 | 1. コマンド `npm uninstall @types/node` を実行する。 37 | 1. コマンド `npm install @types/node` を実行する。 38 | 39 | --- 40 | 41 | ©Live2D 42 | -------------------------------------------------------------------------------- /NOTICE.md: -------------------------------------------------------------------------------- 1 | [English](NOTICE.md) / [日本語](NOTICE.ja.md) 2 | 3 | --- 4 | 5 | # Notices 6 | 7 | ## [Caution] Precautions for updating to Cubism 4 SDK for Web R1 or later 8 | 9 | With the release of the official version of the Cubism 4 SDK for Web R1 from the previous beta version, the structure of packages and repositories has been changed to improve usability. 10 | 11 | The reason for this change is to operate without changing the structure of Cubism 4 SDK for Native, and to avoid mixing files that do not require management by users. 12 | 13 | Details on structural changes and how to update from projects prior to Cubism 4 SDK for Web beta2 are described in the [Cubism SDK Manual]. Please be sure to check it when updating. 14 | 15 | [Cubism SDK Manual]: https://docs.live2d.com/cubism-sdk-manual/warning-for-cubism4-web-r1-update/ 16 | 17 | 18 | ## [Caution] About the duplicate declaration error in dependent packages (2023-02-23) 19 | 20 | A duplicate declaration error may occur due to `@types/node` among the dependency packages used in the Cubism 4 SDK for Web Samples. 21 | 22 | We have confirmed that this can be resolved by one of the following procedures. 23 | 24 | ### Solution 1: Use npm-check-updates 25 | 26 | 1. Navigate to the `/Samples/TypeScript/Demo` directory in Terminal. 27 | 1. Execute the command `npm i -g npm-check-updates`. 28 | 1. Execute the command `ncu`. 29 | 30 | ### Solution 2: Reinstall @types/node explicitly 31 | 32 | 1. Navigate to the `/Samples/TypeScript/Demo` directory in Terminal. 33 | 1. Execute the command `npm uninstall @types/node`. 34 | 1. Execute the command `npm install @types/node`. 35 | 36 | --- 37 | 38 | ©Live2D 39 | -------------------------------------------------------------------------------- /README.ja.md: -------------------------------------------------------------------------------- 1 | [English](README.md) / [日本語](README.ja.md) 2 | 3 | --- 4 | 5 | # Cubism Web Samples 6 | 7 | Live2D Cubism Editor で出力したモデルを表示するアプリケーションのサンプル実装です。 8 | 9 | Cubism Web Framework および Live2D Cubism Core と組み合わせて使用します。 10 | 11 | 12 | ## ライセンス 13 | 14 | 本 SDK を使用する前に、[ライセンス](LICENSE.md)をご確認ください。 15 | 16 | 17 | ## お知らせ 18 | 19 | 本 SDK を使用する前に、[お知らせ](NOTICE.ja.md)をご確認ください。 20 | 21 | 22 | ## Cubism 5新機能や過去バージョンとの互換性について 23 | 24 | 本 SDK はCubism 5に対応した製品です。 25 | Cubism 5 Editorに搭載された新機能のSDK対応については [こちら](https://docs.live2d.com/cubism-sdk-manual/cubism-5-new-functions/)をご確認ください。 26 | 過去バージョンのCubism SDKとの互換性については [こちら](https://docs.live2d.com/cubism-sdk-manual/compatibility-with-cubism-5/)をご確認ください。 27 | 28 | ## ディレクトリ構成 29 | 30 | ``` 31 | . 32 | ├─ .vscode # Visual Studio Code 用プロジェクト設定ディレクトリ 33 | ├─ Core # Live2D Cubism Core が含まれるディレクトリ 34 | ├─ Framework # レンダリングやアニメーション機能などのソースコードが含まれるディレクトリ 35 | └─ Samples 36 | ├─ Resources # モデルのファイルや画像などのリソースが含まれるディレクトリ 37 | └─ TypeScript # TypeScript のサンプルプロジェクトが含まれるディレクトリ 38 | ``` 39 | 40 | 41 | ## Live2D Cubism Core for Web 42 | 43 | モデルをロードするためのライブラリです。 44 | 45 | 当リポジトリではCubism Coreを管理していません。 46 | [こちら](https://www.live2d.com/download/cubism-sdk/download-web/)からCubism SDK for Webをダウンロードして、 47 | Coreディレクトリのファイルをコピーしてください。 48 | 49 | 50 | ## 開発環境構築 51 | 52 | 1. [Node.js] と [Visual Studio Code] をインストールします 53 | 1. Visual Studio Code で **本 SDK のトップディレクトリ** を開き、推奨拡張機能をインストールします 54 | * ポップアップ通知の他、拡張機能タブから `@recommended` を入力することで確認できます 55 | 56 | ### サンプルデモの動作確認 57 | 58 | コマンドパレット(*View > Command Palette...*)で `>Tasks: Run Task` を入力することで、タスク一覧が表示されます。 59 | 60 | 1. タスク一覧から `npm: install - Samples/TypeScript/Demo` を選択して依存パッケージのダウンロードを行います 61 | 1. タスク一覧から `npm: build - Samples/TypeScript/Demo` を選択してサンプルデモのビルドを行います 62 | 1. タスク一覧から `npm: serve - Samples/TypeScript/Demo` を選択して動作確認用の簡易サーバを起動します 63 | 1. ブラウザの URL 欄に `http://localhost:5000` と入力してアクセスします 64 | 1. コマンドパレットから `>Tasks: Terminate Task` を入力して `npm: serve` を選択すると簡易サーバが終了します 65 | 66 | その他のタスクに関してはサンプルプロジェクトの [README.md](Samples/TypeScript/README.ja.md) を参照ください。 67 | 68 | NOTE: デバック用の設定は、`.vscode/tasks.json` に記述しています。 69 | 70 | ### プロジェクトのデバック 71 | 72 | Visual Studio Code で **本 SDK のトップディレクトリ** を開き、 *F5* キーを入力すると Debugger for Chrome が起動します。 73 | 74 | Visual Studio Code 上でブレイクポイントを貼って Chrome ブラウザと連動してデバックを行うことができます。 75 | 76 | NOTE: デバック用の設定は、`.vscode/launch.json` に記述しています。 77 | 78 | 79 | ## SDKマニュアル 80 | 81 | [Cubism SDK Manual](https://docs.live2d.com/cubism-sdk-manual/top/) 82 | 83 | 84 | ## 変更履歴 85 | 86 | Samples : [CHANGELOG.md](CHANGELOG.md) 87 | 88 | Framework : [CHANGELOG.md](Framework/CHANGELOG.md) 89 | 90 | Core : [CHANGELOG.md](Core/CHANGELOG.md) 91 | 92 | 93 | ## 開発環境 94 | 95 | ### Node.js 96 | 97 | * 24.0.1 98 | * 22.15.0 99 | 100 | 101 | ## 動作確認環境 102 | 103 | | プラットフォーム | ブラウザ | バージョン | 104 | | --- | --- | --- | 105 | | Android | Google Chrome | 136.0.7103.87 | 106 | | Android | Microsoft Edge | 136.0.3240.50 | 107 | | Android | Mozilla Firefox | 138.0.2 | 108 | | iOS / iPadOS | Google Chrome | 136.0.7103.91 | 109 | | iOS / iPadOS | Microsoft Edge | 136.0.3240.61 | 110 | | iOS / iPadOS | Mozilla Firefox | 138.1 | 111 | | iOS / iPadOS | Safari | 18.4 | 112 | | macOS | Google Chrome | 136.0.7103.93 | 113 | | macOS | Microsoft Edge | 136.0.3240.64 | 114 | | macOS | Mozilla Firefox | 138.0.1 | 115 | | macOS | Safari | 18.4 | 116 | | Windows | Google Chrome | 136.0.7103.93 | 117 | | Windows | Microsoft Edge | 136.0.3240.64 | 118 | | Windows | Mozilla Firefox | 138.0.1 | 119 | 120 | Note: 動作確認時のサーバの起動は `./Samples/TypeScript/Demo/package.json` の `serve` スクリプトを使用して行っています。 121 | 122 | 123 | ## プロジェクトへの貢献 124 | 125 | プロジェクトに貢献する方法はたくさんあります。バグのログの記録、このGitHubでのプルリクエストの送信、Live2Dコミュニティでの問題の報告と提案の作成です。 126 | 127 | ### フォークとプルリクエスト 128 | 129 | 修正、改善、さらには新機能をもたらすかどうかにかかわらず、プルリクエストに感謝します。ただし、ラッパーは可能な限り軽量で浅くなるように設計されているため、バグ修正とメモリ/パフォーマンスの改善のみを行う必要があることに注意してください。メインリポジトリを可能な限りクリーンに保つために、必要に応じて個人用フォークと機能ブランチを作成してください。 130 | 131 | ### バグ 132 | 133 | Live2Dコミュニティでは、問題のレポートと機能リクエストを定期的にチェックしています。バグレポートを提出する前に、Live2Dコミュニティで検索して、問題のレポートまたは機能リクエストがすでに投稿されているかどうかを確認してください。問題がすでに存在する場合は、関連するコメントを追記してください。 134 | 135 | ### 提案 136 | 137 | SDKの将来についてのフィードバックにも関心があります。Live2Dコミュニティで提案や機能のリクエストを送信できます。このプロセスをより効果的にするために、それらをより明確に定義するのに役立つより多くの情報を含めるようお願いしています。 138 | 139 | 140 | ## フォーラム 141 | 142 | ユーザー同士でCubism SDKの活用方法の提案や質問をしたい場合は、是非フォーラムをご活用ください。 143 | 144 | - [Live2D 公式クリエイターズフォーラム](https://creatorsforum.live2d.com/) 145 | - [Live2D Creator's Forum(English)](https://community.live2d.com/) 146 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [English](README.md) / [日本語](README.ja.md) 2 | 3 | --- 4 | 5 | # Cubism Web Samples 6 | 7 | This is a sample implementation of an application that displays models output by Live2D Cubism Editor. 8 | 9 | It is used in conjunction with the Cubism Web Framework and Live2D Cubism Core. 10 | 11 | 12 | ## License 13 | 14 | Please check the [license](LICENSE.md) before using this SDK. 15 | 16 | 17 | ## Notices 18 | 19 | Please check the [notices](NOTICE.md) before using this SDK. 20 | 21 | 22 | ## Compatibility with Cubism 5 new features and previous Cubism SDK versions 23 | 24 | This SDK is compatible with Cubism 5. 25 | For SDK compatibility with new features in Cubism 5 Editor, please refer to [here](https://docs.live2d.com/en/cubism-sdk-manual/cubism-5-new-functions/). 26 | For compatibility with previous versions of Cubism SDK, please refer to [here](https://docs.live2d.com/en/cubism-sdk-manual/compatibility-with-cubism-5/). 27 | 28 | 29 | 30 | ## Directory structure 31 | 32 | ``` 33 | . 34 | ├─ .vscode # Project settings directory for Visual Studio Code 35 | ├─ Core # Directory containing Live2D Cubism Core 36 | ├─ Framework # Directory containing source code such as rendering and animation functions 37 | └─ Samples 38 | ├─ Resources # Directory containing resources such as model files and images 39 | └─ TypeScript # Directory containing TypeScript sample projects 40 | ``` 41 | 42 | 43 | ## Live2D Cubism Core for Web 44 | 45 | A library for loading the model. 46 | 47 | This repository does not manage Cubism Core. 48 | Download the Cubism SDK for Web from [here](https://www.live2d.com/download/cubism-sdk/download-web/) and copy the files in the Core directory. 49 | 50 | 51 | ## Development environment construction 52 | 53 | 1. Install [Node.js] and [Visual Studio Code] 54 | 1. Open **the top directory of this SDK** in Visual Studio Code and install the recommended extensions 55 | * In addition to pop-up notifications, you can check the others by typing `@recommended` from the Extensions tab 56 | 57 | ### Operation check of sample demo 58 | 59 | Enter `>Tasks: Run Task` in the command palette (*View > Command Palette...*) to display the task list. 60 | 61 | 1. Select `npm: install - Samples/TypeScript/Demo` from the task list to download the dependent packages 62 | 1. Select `npm: build - Samples/TypeScript/Demo` from the task list to build the sample demo 63 | 1. Select `npm: serve - Samples/TypeScript/Demo` from the task list to start the simple server for operation check 64 | 1. Enter `http://localhost:5000` in the URL field of your browser to access it 65 | 1. Enter `>Tasks: Terminate Task` from the command palette and select `npm: serve` to terminate the simple server 66 | 67 | For other tasks, see [README.md](Samples/TypeScript/README.md) of the sample project. 68 | 69 | NOTE: Settings for debugging are described in `.vscode/tasks.json`. 70 | 71 | ### Project debugging 72 | 73 | Open **the top directory of this SDK** in Visual Studio Code and enter the *F5* key to start Debugger for Chrome. 74 | 75 | You can place breakpoints in Visual Studio Code to debug in conjunction with the Chrome browser. 76 | 77 | NOTE: Settings for debugging are described in `.vscode/launch.json`. 78 | 79 | 80 | ## SDK manual 81 | 82 | [Cubism SDK Manual](https://docs.live2d.com/cubism-sdk-manual/top/) 83 | 84 | 85 | ## Changelog 86 | 87 | Samples : [CHANGELOG.md](CHANGELOG.md) 88 | 89 | Framework : [CHANGELOG.md](Framework/CHANGELOG.md) 90 | 91 | Core : [CHANGELOG.md](Core/CHANGELOG.md) 92 | 93 | 94 | ## Development environment 95 | 96 | ### Node.js 97 | 98 | * 24.0.1 99 | * 22.15.0 100 | 101 | 102 | ## Operation environment 103 | 104 | | Platform | Browser | Version | 105 | | --- | --- | --- | 106 | | Android | Google Chrome | 136.0.7103.87 | 107 | | Android | Microsoft Edge | 136.0.3240.50 | 108 | | Android | Mozilla Firefox | 138.0.2 | 109 | | iOS / iPadOS | Google Chrome | 136.0.7103.91 | 110 | | iOS / iPadOS | Microsoft Edge | 136.0.3240.61 | 111 | | iOS / iPadOS | Mozilla Firefox | 138.1 | 112 | | iOS / iPadOS | Safari | 18.4 | 113 | | macOS | Google Chrome | 136.0.7103.93 | 114 | | macOS | Microsoft Edge | 136.0.3240.64 | 115 | | macOS | Mozilla Firefox | 138.0.1 | 116 | | macOS | Safari | 18.4 | 117 | | Windows | Google Chrome | 136.0.7103.93 | 118 | | Windows | Microsoft Edge | 136.0.3240.64 | 119 | | Windows | Mozilla Firefox | 138.0.1 | 120 | 121 | Note: You can start the server for operation check by running the `serve` script of `./Samples/TypeScript/Demo/package.json`. 122 | 123 | 124 | ## Contributing 125 | 126 | There are many ways to contribute to the project: logging bugs, submitting pull requests on this GitHub, and reporting issues and making suggestions in Live2D Community. 127 | 128 | ### Forking And Pull Requests 129 | 130 | We very much appreciate your pull requests, whether they bring fixes, improvements, or even new features. Note, however, that the wrapper is designed to be as lightweight and shallow as possible and should therefore only be subject to bug fixes and memory/performance improvements. To keep the main repository as clean as possible, create a personal fork and feature branches there as needed. 131 | 132 | ### Bugs 133 | 134 | We are regularly checking issue-reports and feature requests at Live2D Community. Before filing a bug report, please do a search in Live2D Community to see if the issue-report or feature request has already been posted. If you find your issue already exists, make relevant comments and add your reaction. 135 | 136 | ### Suggestions 137 | 138 | We're also interested in your feedback for the future of the SDK. You can submit a suggestion or feature request at Live2D Community. To make this process more effective, we're asking that you include more information to help define them more clearly. 139 | 140 | 141 | ## Forum 142 | 143 | If you want to suggest or ask questions about how to use the Cubism SDK between users, please use the forum. 144 | 145 | - [Live2D Creator's Forum](https://community.live2d.com/) 146 | - [Live2D 公式クリエイターズフォーラム (Japanese)](https://creatorsforum.live2d.com/) 147 | -------------------------------------------------------------------------------- /Samples/Resources/Haru/Haru.2048/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Haru/Haru.2048/texture_00.png -------------------------------------------------------------------------------- /Samples/Resources/Haru/Haru.2048/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Haru/Haru.2048/texture_01.png -------------------------------------------------------------------------------- /Samples/Resources/Haru/Haru.cdi3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Parameters": [ 4 | { 5 | "Id": "ParamAngleX", 6 | "GroupId": "ParamGroupFace", 7 | "Name": "角度 X" 8 | }, 9 | { 10 | "Id": "ParamAngleY", 11 | "GroupId": "ParamGroupFace", 12 | "Name": "角度 Y" 13 | }, 14 | { 15 | "Id": "ParamAngleZ", 16 | "GroupId": "ParamGroupFace", 17 | "Name": "角度 Z" 18 | }, 19 | { 20 | "Id": "ParamTere", 21 | "GroupId": "ParamGroupFace", 22 | "Name": "照れ" 23 | }, 24 | { 25 | "Id": "ParamFaceForm", 26 | "GroupId": "ParamGroupFace", 27 | "Name": "顔の拡縮" 28 | }, 29 | { 30 | "Id": "ParamEyeLOpen", 31 | "GroupId": "ParamGroupEyes", 32 | "Name": "左目 開閉" 33 | }, 34 | { 35 | "Id": "ParamEyeLSmile", 36 | "GroupId": "ParamGroupEyes", 37 | "Name": "左目 笑顔" 38 | }, 39 | { 40 | "Id": "ParamEyeROpen", 41 | "GroupId": "ParamGroupEyes", 42 | "Name": "右目 開閉" 43 | }, 44 | { 45 | "Id": "ParamEyeRSmile", 46 | "GroupId": "ParamGroupEyes", 47 | "Name": "右目 笑顔" 48 | }, 49 | { 50 | "Id": "ParamEyeForm", 51 | "GroupId": "ParamGroupEyes", 52 | "Name": "眼 変形" 53 | }, 54 | { 55 | "Id": "ParamEyeBallForm", 56 | "GroupId": "ParamGroupEyes", 57 | "Name": "目玉 収縮" 58 | }, 59 | { 60 | "Id": "ParamTear", 61 | "GroupId": "ParamGroupEyes", 62 | "Name": "涙" 63 | }, 64 | { 65 | "Id": "ParamEyeBallX", 66 | "GroupId": "ParamGroupEyes", 67 | "Name": "目玉 X" 68 | }, 69 | { 70 | "Id": "ParamEyeBallY", 71 | "GroupId": "ParamGroupEyes", 72 | "Name": "目玉 Y" 73 | }, 74 | { 75 | "Id": "ParamBrowLY", 76 | "GroupId": "ParamGroup", 77 | "Name": "左眉 上下" 78 | }, 79 | { 80 | "Id": "ParamBrowRY", 81 | "GroupId": "ParamGroup", 82 | "Name": "右眉 上下" 83 | }, 84 | { 85 | "Id": "ParamBrowLX", 86 | "GroupId": "ParamGroup", 87 | "Name": "左眉 左右" 88 | }, 89 | { 90 | "Id": "ParamBrowRX", 91 | "GroupId": "ParamGroup", 92 | "Name": "右眉 左右" 93 | }, 94 | { 95 | "Id": "ParamBrowLAngle", 96 | "GroupId": "ParamGroup", 97 | "Name": "左眉 角度" 98 | }, 99 | { 100 | "Id": "ParamBrowRAngle", 101 | "GroupId": "ParamGroup", 102 | "Name": "右眉 角度" 103 | }, 104 | { 105 | "Id": "ParamBrowLForm", 106 | "GroupId": "ParamGroup", 107 | "Name": "左眉 変形" 108 | }, 109 | { 110 | "Id": "ParamBrowRForm", 111 | "GroupId": "ParamGroup", 112 | "Name": "右眉 変形" 113 | }, 114 | { 115 | "Id": "ParamMouthForm", 116 | "GroupId": "ParamGroupMouth", 117 | "Name": "口 変形" 118 | }, 119 | { 120 | "Id": "ParamMouthOpenY", 121 | "GroupId": "ParamGroupMouth", 122 | "Name": "口 開閉" 123 | }, 124 | { 125 | "Id": "ParamScarf", 126 | "GroupId": "ParamGroup2", 127 | "Name": "スカーフ揺れ" 128 | }, 129 | { 130 | "Id": "ParamBodyAngleX", 131 | "GroupId": "ParamGroup2", 132 | "Name": "体の回転 X" 133 | }, 134 | { 135 | "Id": "ParamBodyAngleY", 136 | "GroupId": "ParamGroup2", 137 | "Name": "体の回転 Y" 138 | }, 139 | { 140 | "Id": "ParamBodyAngleZ", 141 | "GroupId": "ParamGroup2", 142 | "Name": "体の回転 Z" 143 | }, 144 | { 145 | "Id": "ParamBodyUpper", 146 | "GroupId": "ParamGroup2", 147 | "Name": "上体" 148 | }, 149 | { 150 | "Id": "ParamBreath", 151 | "GroupId": "ParamGroup2", 152 | "Name": "呼吸" 153 | }, 154 | { 155 | "Id": "ParamBustY", 156 | "GroupId": "ParamGroup2", 157 | "Name": "胸 揺れ" 158 | }, 159 | { 160 | "Id": "ParamArmLA", 161 | "GroupId": "ParamGroupArms", 162 | "Name": "左腕 A" 163 | }, 164 | { 165 | "Id": "ParamArmRA", 166 | "GroupId": "ParamGroupArms", 167 | "Name": "右腕 A" 168 | }, 169 | { 170 | "Id": "ParamArmLB", 171 | "GroupId": "ParamGroupArms", 172 | "Name": "右腕 B" 173 | }, 174 | { 175 | "Id": "ParamArmRB", 176 | "GroupId": "ParamGroupArms", 177 | "Name": "左腕 B" 178 | }, 179 | { 180 | "Id": "ParamHandChangeR", 181 | "GroupId": "ParamGroupArms", 182 | "Name": "右手切替" 183 | }, 184 | { 185 | "Id": "ParamHandAngleR", 186 | "GroupId": "ParamGroupArms", 187 | "Name": "右手首角度" 188 | }, 189 | { 190 | "Id": "ParamHandDhangeL", 191 | "GroupId": "ParamGroupArms", 192 | "Name": "左手切替" 193 | }, 194 | { 195 | "Id": "ParamHandAngleL", 196 | "GroupId": "ParamGroupArms", 197 | "Name": "左手首角度" 198 | }, 199 | { 200 | "Id": "ParamHairFront", 201 | "GroupId": "ParamGroup3", 202 | "Name": "髪揺れ 前" 203 | }, 204 | { 205 | "Id": "ParamHairSide", 206 | "GroupId": "ParamGroup3", 207 | "Name": "髪揺れ 横" 208 | }, 209 | { 210 | "Id": "ParamHairBack", 211 | "GroupId": "ParamGroup3", 212 | "Name": "髪揺れ 後" 213 | } 214 | ], 215 | "ParameterGroups": [ 216 | { 217 | "Id": "ParamGroupFace", 218 | "GroupId": "", 219 | "Name": "顔" 220 | }, 221 | { 222 | "Id": "ParamGroupEyes", 223 | "GroupId": "", 224 | "Name": "目" 225 | }, 226 | { 227 | "Id": "ParamGroup", 228 | "GroupId": "", 229 | "Name": "眉毛" 230 | }, 231 | { 232 | "Id": "ParamGroupMouth", 233 | "GroupId": "", 234 | "Name": "口" 235 | }, 236 | { 237 | "Id": "ParamGroup2", 238 | "GroupId": "", 239 | "Name": "胴体" 240 | }, 241 | { 242 | "Id": "ParamGroupArms", 243 | "GroupId": "", 244 | "Name": "腕" 245 | }, 246 | { 247 | "Id": "ParamGroup3", 248 | "GroupId": "", 249 | "Name": "髪揺れ" 250 | } 251 | ], 252 | "Parts": [ 253 | { 254 | "Id": "Part01Core", 255 | "Name": "コアパーツ" 256 | }, 257 | { 258 | "Id": "Part01Hoho001", 259 | "Name": "頬" 260 | }, 261 | { 262 | "Id": "Part01Brow001", 263 | "Name": "まゆ毛" 264 | }, 265 | { 266 | "Id": "Part01Tear", 267 | "Name": "涙" 268 | }, 269 | { 270 | "Id": "Part01EyeBall001", 271 | "Name": "目玉" 272 | }, 273 | { 274 | "Id": "Part01Eye001", 275 | "Name": "目" 276 | }, 277 | { 278 | "Id": "Part01Nose001", 279 | "Name": "鼻" 280 | }, 281 | { 282 | "Id": "Part01Mouth001", 283 | "Name": "口" 284 | }, 285 | { 286 | "Id": "Part01Face001", 287 | "Name": "顔" 288 | }, 289 | { 290 | "Id": "Part01Ear001", 291 | "Name": "耳" 292 | }, 293 | { 294 | "Id": "Part01Neck001", 295 | "Name": "首" 296 | }, 297 | { 298 | "Id": "Part01HairFront001", 299 | "Name": "前髪" 300 | }, 301 | { 302 | "Id": "Part01HairSide001", 303 | "Name": "横髪" 304 | }, 305 | { 306 | "Id": "Part01HairBack001", 307 | "Name": "後ろ髪" 308 | }, 309 | { 310 | "Id": "Part01ArmRB001", 311 | "Name": "左腕 B" 312 | }, 313 | { 314 | "Id": "Part01ArmLB001", 315 | "Name": "右腕 B" 316 | }, 317 | { 318 | "Id": "Part01ArmRA001", 319 | "Name": "右腕 A" 320 | }, 321 | { 322 | "Id": "Part01ArmLA001", 323 | "Name": "左腕 A" 324 | }, 325 | { 326 | "Id": "Part01Body001", 327 | "Name": "制服" 328 | }, 329 | { 330 | "Id": "Part01Sketch", 331 | "Name": "[ 下絵 ]" 332 | } 333 | ] 334 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/Haru.moc3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Haru/Haru.moc3 -------------------------------------------------------------------------------- /Samples/Resources/Haru/Haru.model3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "FileReferences": { 4 | "Moc": "Haru.moc3", 5 | "Textures": [ 6 | "Haru.2048/texture_00.png", 7 | "Haru.2048/texture_01.png" 8 | ], 9 | "Physics": "Haru.physics3.json", 10 | "Pose": "Haru.pose3.json", 11 | "DisplayInfo": "Haru.cdi3.json", 12 | "Expressions": [ 13 | { 14 | "Name": "F01", 15 | "File": "expressions/F01.exp3.json" 16 | }, 17 | { 18 | "Name": "F02", 19 | "File": "expressions/F02.exp3.json" 20 | }, 21 | { 22 | "Name": "F03", 23 | "File": "expressions/F03.exp3.json" 24 | }, 25 | { 26 | "Name": "F04", 27 | "File": "expressions/F04.exp3.json" 28 | }, 29 | { 30 | "Name": "F05", 31 | "File": "expressions/F05.exp3.json" 32 | }, 33 | { 34 | "Name": "F06", 35 | "File": "expressions/F06.exp3.json" 36 | }, 37 | { 38 | "Name": "F07", 39 | "File": "expressions/F07.exp3.json" 40 | }, 41 | { 42 | "Name": "F08", 43 | "File": "expressions/F08.exp3.json" 44 | } 45 | ], 46 | "Motions": { 47 | "Idle": [ 48 | { 49 | "File": "motions/haru_g_idle.motion3.json", 50 | "FadeInTime": 0.5, 51 | "FadeOutTime": 0.5 52 | }, 53 | { 54 | "File": "motions/haru_g_m15.motion3.json", 55 | "FadeInTime": 0.5, 56 | "FadeOutTime": 0.5 57 | } 58 | ], 59 | "TapBody": [ 60 | { 61 | "File": "motions/haru_g_m26.motion3.json", 62 | "FadeInTime": 0.5, 63 | "FadeOutTime": 0.5, 64 | "Sound": "sounds/haru_talk_13.wav" 65 | }, 66 | { 67 | "File": "motions/haru_g_m06.motion3.json", 68 | "FadeInTime": 0.5, 69 | "FadeOutTime": 0.5, 70 | "Sound": "sounds/haru_Info_14.wav" 71 | }, 72 | { 73 | "File": "motions/haru_g_m20.motion3.json", 74 | "FadeInTime": 0.5, 75 | "FadeOutTime": 0.5, 76 | "Sound": "sounds/haru_normal_6.wav" 77 | }, 78 | { 79 | "File": "motions/haru_g_m09.motion3.json", 80 | "FadeInTime": 0.5, 81 | "FadeOutTime": 0.5, 82 | "Sound": "sounds/haru_Info_04.wav" 83 | } 84 | ] 85 | }, 86 | "UserData": "Haru.userdata3.json" 87 | }, 88 | "Groups": [ 89 | { 90 | "Target": "Parameter", 91 | "Name": "EyeBlink", 92 | "Ids": [ 93 | "ParamEyeLOpen", 94 | "ParamEyeROpen" 95 | ] 96 | }, 97 | { 98 | "Target": "Parameter", 99 | "Name": "LipSync", 100 | "Ids": [ 101 | "ParamMouthOpenY" 102 | ] 103 | } 104 | ], 105 | "HitAreas": [ 106 | { 107 | "Id": "HitArea", 108 | "Name": "Head" 109 | }, 110 | { 111 | "Id": "HitArea2", 112 | "Name": "Body" 113 | } 114 | ] 115 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/Haru.physics3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Meta": { 4 | "PhysicsSettingCount": 4, 5 | "TotalInputCount": 14, 6 | "TotalOutputCount": 4, 7 | "VertexCount": 8, 8 | "EffectiveForces": { 9 | "Gravity": { 10 | "X": 0, 11 | "Y": -1 12 | }, 13 | "Wind": { 14 | "X": 0, 15 | "Y": 0 16 | } 17 | }, 18 | "PhysicsDictionary": [ 19 | { 20 | "Id": "PhysicsSetting1", 21 | "Name": "前髪" 22 | }, 23 | { 24 | "Id": "PhysicsSetting2", 25 | "Name": "横髪" 26 | }, 27 | { 28 | "Id": "PhysicsSetting3", 29 | "Name": "後ろ髪" 30 | }, 31 | { 32 | "Id": "PhysicsSetting4", 33 | "Name": "スカーフ" 34 | } 35 | ] 36 | }, 37 | "PhysicsSettings": [ 38 | { 39 | "Id": "PhysicsSetting1", 40 | "Input": [ 41 | { 42 | "Source": { 43 | "Target": "Parameter", 44 | "Id": "ParamAngleX" 45 | }, 46 | "Weight": 60, 47 | "Type": "X", 48 | "Reflect": false 49 | }, 50 | { 51 | "Source": { 52 | "Target": "Parameter", 53 | "Id": "ParamAngleZ" 54 | }, 55 | "Weight": 60, 56 | "Type": "Angle", 57 | "Reflect": false 58 | }, 59 | { 60 | "Source": { 61 | "Target": "Parameter", 62 | "Id": "ParamBodyAngleX" 63 | }, 64 | "Weight": 40, 65 | "Type": "X", 66 | "Reflect": false 67 | }, 68 | { 69 | "Source": { 70 | "Target": "Parameter", 71 | "Id": "ParamBodyAngleZ" 72 | }, 73 | "Weight": 40, 74 | "Type": "Angle", 75 | "Reflect": false 76 | } 77 | ], 78 | "Output": [ 79 | { 80 | "Destination": { 81 | "Target": "Parameter", 82 | "Id": "ParamHairFront" 83 | }, 84 | "VertexIndex": 1, 85 | "Scale": 1.821, 86 | "Weight": 100, 87 | "Type": "Angle", 88 | "Reflect": false 89 | } 90 | ], 91 | "Vertices": [ 92 | { 93 | "Position": { 94 | "X": 0, 95 | "Y": 0 96 | }, 97 | "Mobility": 1, 98 | "Delay": 1, 99 | "Acceleration": 1, 100 | "Radius": 0 101 | }, 102 | { 103 | "Position": { 104 | "X": 0, 105 | "Y": 8 106 | }, 107 | "Mobility": 0.95, 108 | "Delay": 0.8, 109 | "Acceleration": 1.5, 110 | "Radius": 8 111 | } 112 | ], 113 | "Normalization": { 114 | "Position": { 115 | "Minimum": -10, 116 | "Default": 0, 117 | "Maximum": 10 118 | }, 119 | "Angle": { 120 | "Minimum": -10, 121 | "Default": 0, 122 | "Maximum": 10 123 | } 124 | } 125 | }, 126 | { 127 | "Id": "PhysicsSetting2", 128 | "Input": [ 129 | { 130 | "Source": { 131 | "Target": "Parameter", 132 | "Id": "ParamAngleX" 133 | }, 134 | "Weight": 60, 135 | "Type": "X", 136 | "Reflect": false 137 | }, 138 | { 139 | "Source": { 140 | "Target": "Parameter", 141 | "Id": "ParamAngleZ" 142 | }, 143 | "Weight": 60, 144 | "Type": "Angle", 145 | "Reflect": false 146 | }, 147 | { 148 | "Source": { 149 | "Target": "Parameter", 150 | "Id": "ParamBodyAngleX" 151 | }, 152 | "Weight": 40, 153 | "Type": "X", 154 | "Reflect": false 155 | }, 156 | { 157 | "Source": { 158 | "Target": "Parameter", 159 | "Id": "ParamBodyAngleZ" 160 | }, 161 | "Weight": 40, 162 | "Type": "Angle", 163 | "Reflect": false 164 | } 165 | ], 166 | "Output": [ 167 | { 168 | "Destination": { 169 | "Target": "Parameter", 170 | "Id": "ParamHairSide" 171 | }, 172 | "VertexIndex": 1, 173 | "Scale": 1.593, 174 | "Weight": 100, 175 | "Type": "Angle", 176 | "Reflect": false 177 | } 178 | ], 179 | "Vertices": [ 180 | { 181 | "Position": { 182 | "X": 0, 183 | "Y": 0 184 | }, 185 | "Mobility": 1, 186 | "Delay": 1, 187 | "Acceleration": 1, 188 | "Radius": 0 189 | }, 190 | { 191 | "Position": { 192 | "X": 0, 193 | "Y": 8 194 | }, 195 | "Mobility": 0.95, 196 | "Delay": 0.8, 197 | "Acceleration": 1, 198 | "Radius": 8 199 | } 200 | ], 201 | "Normalization": { 202 | "Position": { 203 | "Minimum": -10, 204 | "Default": 0, 205 | "Maximum": 10 206 | }, 207 | "Angle": { 208 | "Minimum": -10, 209 | "Default": 0, 210 | "Maximum": 10 211 | } 212 | } 213 | }, 214 | { 215 | "Id": "PhysicsSetting3", 216 | "Input": [ 217 | { 218 | "Source": { 219 | "Target": "Parameter", 220 | "Id": "ParamAngleX" 221 | }, 222 | "Weight": 60, 223 | "Type": "X", 224 | "Reflect": false 225 | }, 226 | { 227 | "Source": { 228 | "Target": "Parameter", 229 | "Id": "ParamAngleZ" 230 | }, 231 | "Weight": 60, 232 | "Type": "Angle", 233 | "Reflect": false 234 | }, 235 | { 236 | "Source": { 237 | "Target": "Parameter", 238 | "Id": "ParamBodyAngleX" 239 | }, 240 | "Weight": 40, 241 | "Type": "X", 242 | "Reflect": false 243 | }, 244 | { 245 | "Source": { 246 | "Target": "Parameter", 247 | "Id": "ParamBodyAngleZ" 248 | }, 249 | "Weight": 40, 250 | "Type": "Angle", 251 | "Reflect": false 252 | } 253 | ], 254 | "Output": [ 255 | { 256 | "Destination": { 257 | "Target": "Parameter", 258 | "Id": "ParamHairBack" 259 | }, 260 | "VertexIndex": 1, 261 | "Scale": 1.943, 262 | "Weight": 100, 263 | "Type": "Angle", 264 | "Reflect": false 265 | } 266 | ], 267 | "Vertices": [ 268 | { 269 | "Position": { 270 | "X": 0, 271 | "Y": 0 272 | }, 273 | "Mobility": 1, 274 | "Delay": 1, 275 | "Acceleration": 1, 276 | "Radius": 0 277 | }, 278 | { 279 | "Position": { 280 | "X": 0, 281 | "Y": 8 282 | }, 283 | "Mobility": 0.95, 284 | "Delay": 0.8, 285 | "Acceleration": 1.5, 286 | "Radius": 8 287 | } 288 | ], 289 | "Normalization": { 290 | "Position": { 291 | "Minimum": -10, 292 | "Default": 0, 293 | "Maximum": 10 294 | }, 295 | "Angle": { 296 | "Minimum": -10, 297 | "Default": 0, 298 | "Maximum": 10 299 | } 300 | } 301 | }, 302 | { 303 | "Id": "PhysicsSetting4", 304 | "Input": [ 305 | { 306 | "Source": { 307 | "Target": "Parameter", 308 | "Id": "ParamBodyAngleX" 309 | }, 310 | "Weight": 100, 311 | "Type": "X", 312 | "Reflect": false 313 | }, 314 | { 315 | "Source": { 316 | "Target": "Parameter", 317 | "Id": "ParamBodyAngleZ" 318 | }, 319 | "Weight": 100, 320 | "Type": "Angle", 321 | "Reflect": false 322 | } 323 | ], 324 | "Output": [ 325 | { 326 | "Destination": { 327 | "Target": "Parameter", 328 | "Id": "ParamScarf" 329 | }, 330 | "VertexIndex": 1, 331 | "Scale": 0.873, 332 | "Weight": 100, 333 | "Type": "Angle", 334 | "Reflect": false 335 | } 336 | ], 337 | "Vertices": [ 338 | { 339 | "Position": { 340 | "X": 0, 341 | "Y": 0 342 | }, 343 | "Mobility": 1, 344 | "Delay": 1, 345 | "Acceleration": 1, 346 | "Radius": 0 347 | }, 348 | { 349 | "Position": { 350 | "X": 0, 351 | "Y": 10 352 | }, 353 | "Mobility": 0.9, 354 | "Delay": 0.6, 355 | "Acceleration": 1.5, 356 | "Radius": 10 357 | } 358 | ], 359 | "Normalization": { 360 | "Position": { 361 | "Minimum": -10, 362 | "Default": 0, 363 | "Maximum": 10 364 | }, 365 | "Angle": { 366 | "Minimum": -10, 367 | "Default": 0, 368 | "Maximum": 10 369 | } 370 | } 371 | } 372 | ] 373 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/Haru.pose3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Pose", 3 | "Groups": [ 4 | [ 5 | { 6 | "Id": "Part01ArmRA001", 7 | "Link": [] 8 | }, 9 | { 10 | "Id": "Part01ArmRB001", 11 | "Link": [] 12 | } 13 | ], 14 | [ 15 | { 16 | "Id": "Part01ArmLA001", 17 | "Link": [] 18 | }, 19 | { 20 | "Id": "Part01ArmLB001", 21 | "Link": [] 22 | } 23 | ] 24 | ] 25 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/Haru.userdata3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Meta": { 4 | "UserDataCount": 3, 5 | "TotalUserDataSize": 9 6 | }, 7 | "UserData": [ 8 | { 9 | "Target": "ArtMesh", 10 | "Id": "D_PSD_27", 11 | "Value": "tai" 12 | }, 13 | { 14 | "Target": "ArtMesh", 15 | "Id": "D_PSD_25", 16 | "Value": "tai" 17 | }, 18 | { 19 | "Target": "ArtMesh", 20 | "Id": "D_PSD_24", 21 | "Value": "tai" 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/expressions/F01.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamMouthForm", 6 | "Value": 0.27, 7 | "Blend": "Add" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/expressions/F02.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamBrowLY", 6 | "Value": -1, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamBrowRY", 11 | "Value": -1, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamBrowLForm", 16 | "Value": 1, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamBrowRForm", 21 | "Value": 1, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamMouthOpenY", 26 | "Value": 1, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeForm", 31 | "Value": 0.54, 32 | "Blend": "Add" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/expressions/F03.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamBrowLY", 6 | "Value": -1, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamBrowRY", 11 | "Value": -1, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamBrowLX", 16 | "Value": -1, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamBrowRX", 21 | "Value": -1, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamBrowRAngle", 26 | "Value": -1, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamBrowLForm", 31 | "Value": -1, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamBrowRForm", 36 | "Value": -1, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamMouthForm", 41 | "Value": -2, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamMouthOpenY", 46 | "Value": 1, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamEyeForm", 51 | "Value": -1, 52 | "Blend": "Add" 53 | } 54 | ] 55 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/expressions/F04.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0.8, 7 | "Blend": "Multiply" 8 | }, 9 | { 10 | "Id": "ParamEyeROpen", 11 | "Value": 0.8, 12 | "Blend": "Multiply" 13 | }, 14 | { 15 | "Id": "ParamBrowLY", 16 | "Value": -0.56, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamBrowRY", 21 | "Value": -0.56, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamBrowRX", 26 | "Value": -1, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamBrowLAngle", 31 | "Value": 0.35, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamBrowRAngle", 36 | "Value": 0.35, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLForm", 41 | "Value": -0.74, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRForm", 46 | "Value": -0.74, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamMouthForm", 51 | "Value": -1.76, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamEyeForm", 56 | "Value": 1, 57 | "Blend": "Add" 58 | } 59 | ] 60 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/expressions/F05.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0, 7 | "Blend": "Multiply" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 1, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeROpen", 16 | "Value": 0, 17 | "Blend": "Multiply" 18 | }, 19 | { 20 | "Id": "ParamEyeRSmile", 21 | "Value": 1, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamBrowLY", 26 | "Value": 0.32, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamBrowRY", 31 | "Value": 0.32, 32 | "Blend": "Add" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/expressions/F06.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 2, 7 | "Blend": "Multiply" 8 | }, 9 | { 10 | "Id": "ParamEyeROpen", 11 | "Value": 2, 12 | "Blend": "Multiply" 13 | }, 14 | { 15 | "Id": "ParamBrowLY", 16 | "Value": 1, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamBrowRY", 21 | "Value": 1, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamMouthForm", 26 | "Value": -1, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeBallForm", 31 | "Value": -0.65, 32 | "Blend": "Add" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/expressions/F07.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0.89, 7 | "Blend": "Multiply" 8 | }, 9 | { 10 | "Id": "ParamEyeROpen", 11 | "Value": 0.89, 12 | "Blend": "Multiply" 13 | }, 14 | { 15 | "Id": "ParamBrowLY", 16 | "Value": -0.56, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamBrowRY", 21 | "Value": -0.56, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamBrowLX", 26 | "Value": -1, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamBrowRX", 31 | "Value": -1, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamBrowLAngle", 36 | "Value": 0.35, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowRAngle", 41 | "Value": 0.35, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowLForm", 46 | "Value": -0.74, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowRForm", 51 | "Value": -0.74, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamMouthForm", 56 | "Value": -0.46, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamTere", 61 | "Value": 1, 62 | "Blend": "Add" 63 | } 64 | ] 65 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/expressions/F08.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0.8, 7 | "Blend": "Multiply" 8 | }, 9 | { 10 | "Id": "ParamEyeROpen", 11 | "Value": 0.8, 12 | "Blend": "Multiply" 13 | }, 14 | { 15 | "Id": "ParamBrowLForm", 16 | "Value": -0.33, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamBrowRForm", 21 | "Value": -0.33, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamMouthForm", 26 | "Value": -1.76, 27 | "Blend": "Add" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Samples/Resources/Haru/sounds/haru_Info_04.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Haru/sounds/haru_Info_04.wav -------------------------------------------------------------------------------- /Samples/Resources/Haru/sounds/haru_Info_14.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Haru/sounds/haru_Info_14.wav -------------------------------------------------------------------------------- /Samples/Resources/Haru/sounds/haru_normal_6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Haru/sounds/haru_normal_6.wav -------------------------------------------------------------------------------- /Samples/Resources/Haru/sounds/haru_talk_13.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Haru/sounds/haru_talk_13.wav -------------------------------------------------------------------------------- /Samples/Resources/Hiyori/Hiyori.2048/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Hiyori/Hiyori.2048/texture_00.png -------------------------------------------------------------------------------- /Samples/Resources/Hiyori/Hiyori.2048/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Hiyori/Hiyori.2048/texture_01.png -------------------------------------------------------------------------------- /Samples/Resources/Hiyori/Hiyori.moc3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Hiyori/Hiyori.moc3 -------------------------------------------------------------------------------- /Samples/Resources/Hiyori/Hiyori.model3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "FileReferences": { 4 | "Moc": "Hiyori.moc3", 5 | "Textures": [ 6 | "Hiyori.2048/texture_00.png", 7 | "Hiyori.2048/texture_01.png" 8 | ], 9 | "Physics": "Hiyori.physics3.json", 10 | "Pose": "Hiyori.pose3.json", 11 | "UserData": "Hiyori.userdata3.json", 12 | "DisplayInfo": "Hiyori.cdi3.json", 13 | "Motions": { 14 | "Idle": [ 15 | { 16 | "File": "motions/Hiyori_m01.motion3.json", 17 | "FadeInTime": 0.5, 18 | "FadeOutTime": 0.5 19 | }, 20 | { 21 | "File": "motions/Hiyori_m02.motion3.json", 22 | "FadeInTime": 0.5, 23 | "FadeOutTime": 0.5 24 | }, 25 | { 26 | "File": "motions/Hiyori_m03.motion3.json", 27 | "FadeInTime": 0.5, 28 | "FadeOutTime": 0.5 29 | }, 30 | { 31 | "File": "motions/Hiyori_m05.motion3.json", 32 | "FadeInTime": 0.5, 33 | "FadeOutTime": 0.5 34 | }, 35 | { 36 | "File": "motions/Hiyori_m06.motion3.json", 37 | "FadeInTime": 0.5, 38 | "FadeOutTime": 0.5 39 | }, 40 | { 41 | "File": "motions/Hiyori_m07.motion3.json", 42 | "FadeInTime": 0.5, 43 | "FadeOutTime": 0.5 44 | }, 45 | { 46 | "File": "motions/Hiyori_m08.motion3.json", 47 | "FadeInTime": 0.5, 48 | "FadeOutTime": 0.5 49 | }, 50 | { 51 | "File": "motions/Hiyori_m09.motion3.json", 52 | "FadeInTime": 0.5, 53 | "FadeOutTime": 0.5 54 | }, 55 | { 56 | "File": "motions/Hiyori_m10.motion3.json", 57 | "FadeInTime": 0.5, 58 | "FadeOutTime": 0.5 59 | } 60 | ], 61 | "TapBody": [ 62 | { 63 | "File": "motions/Hiyori_m04.motion3.json", 64 | "FadeInTime": 0.5, 65 | "FadeOutTime": 0.5 66 | } 67 | ] 68 | } 69 | }, 70 | "Groups": [ 71 | { 72 | "Target": "Parameter", 73 | "Name": "LipSync", 74 | "Ids": [ 75 | "ParamMouthOpenY" 76 | ] 77 | }, 78 | { 79 | "Target": "Parameter", 80 | "Name": "EyeBlink", 81 | "Ids": [ 82 | "ParamEyeLOpen", 83 | "ParamEyeROpen" 84 | ] 85 | } 86 | ], 87 | "HitAreas": [ 88 | { 89 | "Id": "HitArea", 90 | "Name": "Body" 91 | } 92 | ] 93 | } -------------------------------------------------------------------------------- /Samples/Resources/Hiyori/Hiyori.pose3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Pose", 3 | "FadeInTime": 0.5, 4 | "Groups": [ 5 | [ 6 | { 7 | "Id": "PartArmA", 8 | "Link": [] 9 | }, 10 | { 11 | "Id": "PartArmB", 12 | "Link": [] 13 | } 14 | ] 15 | ] 16 | } -------------------------------------------------------------------------------- /Samples/Resources/Hiyori/Hiyori.userdata3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Meta": { 4 | "UserDataCount": 7, 5 | "TotalUserDataSize": 35 6 | }, 7 | "UserData": [ 8 | { 9 | "Target": "ArtMesh", 10 | "Id": "ArtMesh93", 11 | "Value": "ribon" 12 | }, 13 | { 14 | "Target": "ArtMesh", 15 | "Id": "ArtMesh94", 16 | "Value": "ribon" 17 | }, 18 | { 19 | "Target": "ArtMesh", 20 | "Id": "ArtMesh95", 21 | "Value": "ribon" 22 | }, 23 | { 24 | "Target": "ArtMesh", 25 | "Id": "ArtMesh57", 26 | "Value": "ribon" 27 | }, 28 | { 29 | "Target": "ArtMesh", 30 | "Id": "ArtMesh58", 31 | "Value": "ribon" 32 | }, 33 | { 34 | "Target": "ArtMesh", 35 | "Id": "ArtMesh59", 36 | "Value": "ribon" 37 | }, 38 | { 39 | "Target": "ArtMesh", 40 | "Id": "ArtMesh60", 41 | "Value": "ribon" 42 | } 43 | ] 44 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/Mao.2048/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Mao/Mao.2048/texture_00.png -------------------------------------------------------------------------------- /Samples/Resources/Mao/Mao.moc3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Mao/Mao.moc3 -------------------------------------------------------------------------------- /Samples/Resources/Mao/Mao.model3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "FileReferences": { 4 | "Moc": "Mao.moc3", 5 | "Textures": [ 6 | "Mao.2048/texture_00.png" 7 | ], 8 | "Physics": "Mao.physics3.json", 9 | "Pose": "Mao.pose3.json", 10 | "DisplayInfo": "Mao.cdi3.json", 11 | "Expressions": [ 12 | { 13 | "Name": "exp_01", 14 | "File": "expressions/exp_01.exp3.json" 15 | }, 16 | { 17 | "Name": "exp_02", 18 | "File": "expressions/exp_02.exp3.json" 19 | }, 20 | { 21 | "Name": "exp_03", 22 | "File": "expressions/exp_03.exp3.json" 23 | }, 24 | { 25 | "Name": "exp_04", 26 | "File": "expressions/exp_04.exp3.json" 27 | }, 28 | { 29 | "Name": "exp_05", 30 | "File": "expressions/exp_05.exp3.json" 31 | }, 32 | { 33 | "Name": "exp_06", 34 | "File": "expressions/exp_06.exp3.json" 35 | }, 36 | { 37 | "Name": "exp_07", 38 | "File": "expressions/exp_07.exp3.json" 39 | }, 40 | { 41 | "Name": "exp_08", 42 | "File": "expressions/exp_08.exp3.json" 43 | } 44 | ], 45 | "Motions": { 46 | "Idle": [ 47 | { 48 | "File": "motions/mtn_01.motion3.json" 49 | }, 50 | { 51 | "File": "motions/sample_01.motion3.json" 52 | } 53 | ], 54 | "TapBody": [ 55 | { 56 | "File": "motions/mtn_02.motion3.json" 57 | }, 58 | { 59 | "File": "motions/mtn_03.motion3.json" 60 | }, 61 | { 62 | "File": "motions/mtn_04.motion3.json" 63 | }, 64 | { 65 | "File": "motions/special_01.motion3.json" 66 | }, 67 | { 68 | "File": "motions/special_02.motion3.json" 69 | }, 70 | { 71 | "File": "motions/special_03.motion3.json" 72 | } 73 | ] 74 | } 75 | }, 76 | "Groups": [ 77 | { 78 | "Target": "Parameter", 79 | "Name": "LipSync", 80 | "Ids": [ 81 | "ParamA" 82 | ] 83 | }, 84 | { 85 | "Target": "Parameter", 86 | "Name": "EyeBlink", 87 | "Ids": [ 88 | "ParamEyeLOpen", 89 | "ParamEyeROpen" 90 | ] 91 | } 92 | ], 93 | "HitAreas": [ 94 | { 95 | "Id": "HitAreaHead", 96 | "Name": "Head" 97 | }, 98 | { 99 | "Id": "HitAreaBody", 100 | "Name": "Body" 101 | } 102 | ] 103 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/Mao.pose3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Pose", 3 | "Groups": [ 4 | [ 5 | { 6 | "Id": "PartArmLA", 7 | "Link": [] 8 | }, 9 | { 10 | "Id": "PartArmLB", 11 | "Link": [] 12 | } 13 | ], 14 | [ 15 | { 16 | "Id": "PartArmRA", 17 | "Link": [] 18 | }, 19 | { 20 | "Id": "PartArmRB", 21 | "Link": [] 22 | } 23 | ] 24 | ] 25 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/expressions/exp_01.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "FadeInTime": 0.5, 4 | "FadeOutTime": 0.5, 5 | "Parameters": [ 6 | { 7 | "Id": "ParamCheek", 8 | "Value": 0, 9 | "Blend": "Add" 10 | }, 11 | { 12 | "Id": "ParamEyeLOpen", 13 | "Value": 1, 14 | "Blend": "Multiply" 15 | }, 16 | { 17 | "Id": "ParamEyeLSmile", 18 | "Value": 0, 19 | "Blend": "Add" 20 | }, 21 | { 22 | "Id": "ParamEyeLForm", 23 | "Value": 0, 24 | "Blend": "Add" 25 | }, 26 | { 27 | "Id": "ParamEyeROpen", 28 | "Value": 1, 29 | "Blend": "Multiply" 30 | }, 31 | { 32 | "Id": "ParamEyeRSmile", 33 | "Value": 0, 34 | "Blend": "Add" 35 | }, 36 | { 37 | "Id": "ParamEyeRForm", 38 | "Value": 0, 39 | "Blend": "Add" 40 | }, 41 | { 42 | "Id": "ParamEyeBallX", 43 | "Value": 0, 44 | "Blend": "Add" 45 | }, 46 | { 47 | "Id": "ParamEyeBallY", 48 | "Value": 0, 49 | "Blend": "Add" 50 | }, 51 | { 52 | "Id": "ParamEyeBallForm", 53 | "Value": 0, 54 | "Blend": "Add" 55 | }, 56 | { 57 | "Id": "ParamEyeEffect", 58 | "Value": 0, 59 | "Blend": "Add" 60 | }, 61 | { 62 | "Id": "ParamBrowLY", 63 | "Value": 0, 64 | "Blend": "Add" 65 | }, 66 | { 67 | "Id": "ParamBrowRY", 68 | "Value": 0, 69 | "Blend": "Add" 70 | }, 71 | { 72 | "Id": "ParamBrowLX", 73 | "Value": 0, 74 | "Blend": "Add" 75 | }, 76 | { 77 | "Id": "ParamBrowRX", 78 | "Value": 0, 79 | "Blend": "Add" 80 | }, 81 | { 82 | "Id": "ParamBrowLAngle", 83 | "Value": 0, 84 | "Blend": "Add" 85 | }, 86 | { 87 | "Id": "ParamBrowRAngle", 88 | "Value": 0, 89 | "Blend": "Add" 90 | }, 91 | { 92 | "Id": "ParamBrowLForm", 93 | "Value": 0, 94 | "Blend": "Add" 95 | }, 96 | { 97 | "Id": "ParamBrowRForm", 98 | "Value": 0, 99 | "Blend": "Add" 100 | }, 101 | { 102 | "Id": "ParamA", 103 | "Value": 0, 104 | "Blend": "Add" 105 | }, 106 | { 107 | "Id": "ParamI", 108 | "Value": 0, 109 | "Blend": "Add" 110 | }, 111 | { 112 | "Id": "ParamU", 113 | "Value": 0, 114 | "Blend": "Add" 115 | }, 116 | { 117 | "Id": "ParamE", 118 | "Value": 0, 119 | "Blend": "Add" 120 | }, 121 | { 122 | "Id": "ParamO", 123 | "Value": 0, 124 | "Blend": "Add" 125 | }, 126 | { 127 | "Id": "ParamMouthUp", 128 | "Value": 0, 129 | "Blend": "Add" 130 | }, 131 | { 132 | "Id": "ParamMouthDown", 133 | "Value": 0, 134 | "Blend": "Add" 135 | }, 136 | { 137 | "Id": "ParamMouthAngry", 138 | "Value": 0, 139 | "Blend": "Add" 140 | }, 141 | { 142 | "Id": "ParamMouthAngryLine", 143 | "Value": 0, 144 | "Blend": "Add" 145 | } 146 | ] 147 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/expressions/exp_02.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "FadeInTime": 0.5, 4 | "FadeOutTime": 0.5, 5 | "Parameters": [ 6 | { 7 | "Id": "ParamCheek", 8 | "Value": 0, 9 | "Blend": "Add" 10 | }, 11 | { 12 | "Id": "ParamEyeLOpen", 13 | "Value": 0, 14 | "Blend": "Multiply" 15 | }, 16 | { 17 | "Id": "ParamEyeLSmile", 18 | "Value": 1, 19 | "Blend": "Add" 20 | }, 21 | { 22 | "Id": "ParamEyeLForm", 23 | "Value": 0, 24 | "Blend": "Add" 25 | }, 26 | { 27 | "Id": "ParamEyeROpen", 28 | "Value": 0, 29 | "Blend": "Multiply" 30 | }, 31 | { 32 | "Id": "ParamEyeRSmile", 33 | "Value": 1, 34 | "Blend": "Add" 35 | }, 36 | { 37 | "Id": "ParamEyeRForm", 38 | "Value": 0, 39 | "Blend": "Add" 40 | }, 41 | { 42 | "Id": "ParamEyeBallX", 43 | "Value": 0, 44 | "Blend": "Add" 45 | }, 46 | { 47 | "Id": "ParamEyeBallY", 48 | "Value": 0, 49 | "Blend": "Add" 50 | }, 51 | { 52 | "Id": "ParamEyeBallForm", 53 | "Value": 0, 54 | "Blend": "Add" 55 | }, 56 | { 57 | "Id": "ParamEyeEffect", 58 | "Value": 0, 59 | "Blend": "Add" 60 | }, 61 | { 62 | "Id": "ParamBrowLY", 63 | "Value": 0, 64 | "Blend": "Add" 65 | }, 66 | { 67 | "Id": "ParamBrowRY", 68 | "Value": 0, 69 | "Blend": "Add" 70 | }, 71 | { 72 | "Id": "ParamBrowLX", 73 | "Value": 0, 74 | "Blend": "Add" 75 | }, 76 | { 77 | "Id": "ParamBrowRX", 78 | "Value": 0, 79 | "Blend": "Add" 80 | }, 81 | { 82 | "Id": "ParamBrowLAngle", 83 | "Value": 0, 84 | "Blend": "Add" 85 | }, 86 | { 87 | "Id": "ParamBrowRAngle", 88 | "Value": 0, 89 | "Blend": "Add" 90 | }, 91 | { 92 | "Id": "ParamBrowLForm", 93 | "Value": 0, 94 | "Blend": "Add" 95 | }, 96 | { 97 | "Id": "ParamBrowRForm", 98 | "Value": 0, 99 | "Blend": "Add" 100 | }, 101 | { 102 | "Id": "ParamA", 103 | "Value": 0, 104 | "Blend": "Add" 105 | }, 106 | { 107 | "Id": "ParamI", 108 | "Value": 0, 109 | "Blend": "Add" 110 | }, 111 | { 112 | "Id": "ParamU", 113 | "Value": 0, 114 | "Blend": "Add" 115 | }, 116 | { 117 | "Id": "ParamE", 118 | "Value": 0, 119 | "Blend": "Add" 120 | }, 121 | { 122 | "Id": "ParamO", 123 | "Value": 0, 124 | "Blend": "Add" 125 | }, 126 | { 127 | "Id": "ParamMouthUp", 128 | "Value": 0, 129 | "Blend": "Add" 130 | }, 131 | { 132 | "Id": "ParamMouthDown", 133 | "Value": 0, 134 | "Blend": "Add" 135 | }, 136 | { 137 | "Id": "ParamMouthAngry", 138 | "Value": 0, 139 | "Blend": "Add" 140 | }, 141 | { 142 | "Id": "ParamMouthAngryLine", 143 | "Value": 0, 144 | "Blend": "Add" 145 | } 146 | ] 147 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/expressions/exp_03.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "FadeInTime": 0.5, 4 | "FadeOutTime": 0.5, 5 | "Parameters": [ 6 | { 7 | "Id": "ParamCheek", 8 | "Value": 0, 9 | "Blend": "Add" 10 | }, 11 | { 12 | "Id": "ParamEyeLOpen", 13 | "Value": 0, 14 | "Blend": "Multiply" 15 | }, 16 | { 17 | "Id": "ParamEyeLSmile", 18 | "Value": 0, 19 | "Blend": "Add" 20 | }, 21 | { 22 | "Id": "ParamEyeLForm", 23 | "Value": 0, 24 | "Blend": "Add" 25 | }, 26 | { 27 | "Id": "ParamEyeROpen", 28 | "Value": 0, 29 | "Blend": "Multiply" 30 | }, 31 | { 32 | "Id": "ParamEyeRSmile", 33 | "Value": 0, 34 | "Blend": "Add" 35 | }, 36 | { 37 | "Id": "ParamEyeRForm", 38 | "Value": 0, 39 | "Blend": "Add" 40 | }, 41 | { 42 | "Id": "ParamEyeBallX", 43 | "Value": 0, 44 | "Blend": "Add" 45 | }, 46 | { 47 | "Id": "ParamEyeBallY", 48 | "Value": 0, 49 | "Blend": "Add" 50 | }, 51 | { 52 | "Id": "ParamEyeBallForm", 53 | "Value": 0, 54 | "Blend": "Add" 55 | }, 56 | { 57 | "Id": "ParamEyeEffect", 58 | "Value": 0, 59 | "Blend": "Add" 60 | }, 61 | { 62 | "Id": "ParamBrowLY", 63 | "Value": 0, 64 | "Blend": "Add" 65 | }, 66 | { 67 | "Id": "ParamBrowRY", 68 | "Value": 0, 69 | "Blend": "Add" 70 | }, 71 | { 72 | "Id": "ParamBrowLX", 73 | "Value": 0, 74 | "Blend": "Add" 75 | }, 76 | { 77 | "Id": "ParamBrowRX", 78 | "Value": 0, 79 | "Blend": "Add" 80 | }, 81 | { 82 | "Id": "ParamBrowLAngle", 83 | "Value": 0, 84 | "Blend": "Add" 85 | }, 86 | { 87 | "Id": "ParamBrowRAngle", 88 | "Value": 0, 89 | "Blend": "Add" 90 | }, 91 | { 92 | "Id": "ParamBrowLForm", 93 | "Value": 0, 94 | "Blend": "Add" 95 | }, 96 | { 97 | "Id": "ParamBrowRForm", 98 | "Value": 0, 99 | "Blend": "Add" 100 | }, 101 | { 102 | "Id": "ParamA", 103 | "Value": 0, 104 | "Blend": "Add" 105 | }, 106 | { 107 | "Id": "ParamI", 108 | "Value": 0, 109 | "Blend": "Add" 110 | }, 111 | { 112 | "Id": "ParamU", 113 | "Value": 0, 114 | "Blend": "Add" 115 | }, 116 | { 117 | "Id": "ParamE", 118 | "Value": 0, 119 | "Blend": "Add" 120 | }, 121 | { 122 | "Id": "ParamO", 123 | "Value": 0, 124 | "Blend": "Add" 125 | }, 126 | { 127 | "Id": "ParamMouthUp", 128 | "Value": 0, 129 | "Blend": "Add" 130 | }, 131 | { 132 | "Id": "ParamMouthDown", 133 | "Value": 0, 134 | "Blend": "Add" 135 | }, 136 | { 137 | "Id": "ParamMouthAngry", 138 | "Value": 0, 139 | "Blend": "Add" 140 | }, 141 | { 142 | "Id": "ParamMouthAngryLine", 143 | "Value": 0, 144 | "Blend": "Add" 145 | } 146 | ] 147 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/expressions/exp_04.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "FadeInTime": 0.5, 4 | "FadeOutTime": 0.5, 5 | "Parameters": [ 6 | { 7 | "Id": "ParamCheek", 8 | "Value": 0, 9 | "Blend": "Add" 10 | }, 11 | { 12 | "Id": "ParamEyeLOpen", 13 | "Value": 1.2, 14 | "Blend": "Multiply" 15 | }, 16 | { 17 | "Id": "ParamEyeLSmile", 18 | "Value": 1, 19 | "Blend": "Add" 20 | }, 21 | { 22 | "Id": "ParamEyeLForm", 23 | "Value": 0, 24 | "Blend": "Add" 25 | }, 26 | { 27 | "Id": "ParamEyeROpen", 28 | "Value": 1.2, 29 | "Blend": "Multiply" 30 | }, 31 | { 32 | "Id": "ParamEyeRSmile", 33 | "Value": 1, 34 | "Blend": "Add" 35 | }, 36 | { 37 | "Id": "ParamEyeRForm", 38 | "Value": 0, 39 | "Blend": "Add" 40 | }, 41 | { 42 | "Id": "ParamEyeBallX", 43 | "Value": 0, 44 | "Blend": "Add" 45 | }, 46 | { 47 | "Id": "ParamEyeBallY", 48 | "Value": 0, 49 | "Blend": "Add" 50 | }, 51 | { 52 | "Id": "ParamEyeBallForm", 53 | "Value": 0, 54 | "Blend": "Add" 55 | }, 56 | { 57 | "Id": "ParamEyeEffect", 58 | "Value": 1, 59 | "Blend": "Add" 60 | }, 61 | { 62 | "Id": "ParamBrowLY", 63 | "Value": 0, 64 | "Blend": "Add" 65 | }, 66 | { 67 | "Id": "ParamBrowRY", 68 | "Value": 0, 69 | "Blend": "Add" 70 | }, 71 | { 72 | "Id": "ParamBrowLX", 73 | "Value": 0, 74 | "Blend": "Add" 75 | }, 76 | { 77 | "Id": "ParamBrowRX", 78 | "Value": 0, 79 | "Blend": "Add" 80 | }, 81 | { 82 | "Id": "ParamBrowLAngle", 83 | "Value": 0, 84 | "Blend": "Add" 85 | }, 86 | { 87 | "Id": "ParamBrowRAngle", 88 | "Value": 0, 89 | "Blend": "Add" 90 | }, 91 | { 92 | "Id": "ParamBrowLForm", 93 | "Value": 0, 94 | "Blend": "Add" 95 | }, 96 | { 97 | "Id": "ParamBrowRForm", 98 | "Value": 0, 99 | "Blend": "Add" 100 | }, 101 | { 102 | "Id": "ParamA", 103 | "Value": 0, 104 | "Blend": "Add" 105 | }, 106 | { 107 | "Id": "ParamI", 108 | "Value": 0, 109 | "Blend": "Add" 110 | }, 111 | { 112 | "Id": "ParamU", 113 | "Value": 0, 114 | "Blend": "Add" 115 | }, 116 | { 117 | "Id": "ParamE", 118 | "Value": 0, 119 | "Blend": "Add" 120 | }, 121 | { 122 | "Id": "ParamO", 123 | "Value": 0, 124 | "Blend": "Add" 125 | }, 126 | { 127 | "Id": "ParamMouthUp", 128 | "Value": 0, 129 | "Blend": "Add" 130 | }, 131 | { 132 | "Id": "ParamMouthDown", 133 | "Value": 0, 134 | "Blend": "Add" 135 | }, 136 | { 137 | "Id": "ParamMouthAngry", 138 | "Value": 0, 139 | "Blend": "Add" 140 | }, 141 | { 142 | "Id": "ParamMouthAngryLine", 143 | "Value": 0, 144 | "Blend": "Add" 145 | } 146 | ] 147 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/expressions/exp_05.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "FadeInTime": 0.5, 4 | "FadeOutTime": 0.5, 5 | "Parameters": [ 6 | { 7 | "Id": "ParamCheek", 8 | "Value": 0, 9 | "Blend": "Add" 10 | }, 11 | { 12 | "Id": "ParamEyeLOpen", 13 | "Value": 1, 14 | "Blend": "Multiply" 15 | }, 16 | { 17 | "Id": "ParamEyeLSmile", 18 | "Value": 0, 19 | "Blend": "Add" 20 | }, 21 | { 22 | "Id": "ParamEyeLForm", 23 | "Value": 0, 24 | "Blend": "Add" 25 | }, 26 | { 27 | "Id": "ParamEyeROpen", 28 | "Value": 1, 29 | "Blend": "Multiply" 30 | }, 31 | { 32 | "Id": "ParamEyeRSmile", 33 | "Value": 0, 34 | "Blend": "Add" 35 | }, 36 | { 37 | "Id": "ParamEyeRForm", 38 | "Value": 0, 39 | "Blend": "Add" 40 | }, 41 | { 42 | "Id": "ParamEyeBallX", 43 | "Value": 0, 44 | "Blend": "Add" 45 | }, 46 | { 47 | "Id": "ParamEyeBallY", 48 | "Value": 0, 49 | "Blend": "Add" 50 | }, 51 | { 52 | "Id": "ParamEyeBallForm", 53 | "Value": 0, 54 | "Blend": "Add" 55 | }, 56 | { 57 | "Id": "ParamEyeEffect", 58 | "Value": 0, 59 | "Blend": "Add" 60 | }, 61 | { 62 | "Id": "ParamBrowLY", 63 | "Value": 0, 64 | "Blend": "Add" 65 | }, 66 | { 67 | "Id": "ParamBrowRY", 68 | "Value": 0, 69 | "Blend": "Add" 70 | }, 71 | { 72 | "Id": "ParamBrowLX", 73 | "Value": 0, 74 | "Blend": "Add" 75 | }, 76 | { 77 | "Id": "ParamBrowRX", 78 | "Value": 0, 79 | "Blend": "Add" 80 | }, 81 | { 82 | "Id": "ParamBrowLAngle", 83 | "Value": -1, 84 | "Blend": "Add" 85 | }, 86 | { 87 | "Id": "ParamBrowRAngle", 88 | "Value": -1, 89 | "Blend": "Add" 90 | }, 91 | { 92 | "Id": "ParamBrowLForm", 93 | "Value": -1, 94 | "Blend": "Add" 95 | }, 96 | { 97 | "Id": "ParamBrowRForm", 98 | "Value": -1, 99 | "Blend": "Add" 100 | }, 101 | { 102 | "Id": "ParamA", 103 | "Value": 0, 104 | "Blend": "Add" 105 | }, 106 | { 107 | "Id": "ParamI", 108 | "Value": 0, 109 | "Blend": "Add" 110 | }, 111 | { 112 | "Id": "ParamU", 113 | "Value": 0, 114 | "Blend": "Add" 115 | }, 116 | { 117 | "Id": "ParamE", 118 | "Value": 0, 119 | "Blend": "Add" 120 | }, 121 | { 122 | "Id": "ParamO", 123 | "Value": 0, 124 | "Blend": "Add" 125 | }, 126 | { 127 | "Id": "ParamMouthUp", 128 | "Value": -1, 129 | "Blend": "Add" 130 | }, 131 | { 132 | "Id": "ParamMouthDown", 133 | "Value": 1, 134 | "Blend": "Add" 135 | }, 136 | { 137 | "Id": "ParamMouthAngry", 138 | "Value": 0, 139 | "Blend": "Add" 140 | }, 141 | { 142 | "Id": "ParamMouthAngryLine", 143 | "Value": 0, 144 | "Blend": "Add" 145 | } 146 | ] 147 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/expressions/exp_06.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "FadeInTime": 0.5, 4 | "FadeOutTime": 0.5, 5 | "Parameters": [ 6 | { 7 | "Id": "ParamCheek", 8 | "Value": 1, 9 | "Blend": "Add" 10 | }, 11 | { 12 | "Id": "ParamEyeLOpen", 13 | "Value": 1, 14 | "Blend": "Multiply" 15 | }, 16 | { 17 | "Id": "ParamEyeLSmile", 18 | "Value": 0, 19 | "Blend": "Add" 20 | }, 21 | { 22 | "Id": "ParamEyeLForm", 23 | "Value": 0, 24 | "Blend": "Add" 25 | }, 26 | { 27 | "Id": "ParamEyeROpen", 28 | "Value": 1, 29 | "Blend": "Multiply" 30 | }, 31 | { 32 | "Id": "ParamEyeRSmile", 33 | "Value": 0, 34 | "Blend": "Add" 35 | }, 36 | { 37 | "Id": "ParamEyeRForm", 38 | "Value": 0, 39 | "Blend": "Add" 40 | }, 41 | { 42 | "Id": "ParamEyeBallX", 43 | "Value": 0, 44 | "Blend": "Add" 45 | }, 46 | { 47 | "Id": "ParamEyeBallY", 48 | "Value": 0, 49 | "Blend": "Add" 50 | }, 51 | { 52 | "Id": "ParamEyeBallForm", 53 | "Value": 0, 54 | "Blend": "Add" 55 | }, 56 | { 57 | "Id": "ParamEyeEffect", 58 | "Value": 0, 59 | "Blend": "Add" 60 | }, 61 | { 62 | "Id": "ParamBrowLY", 63 | "Value": 0, 64 | "Blend": "Add" 65 | }, 66 | { 67 | "Id": "ParamBrowRY", 68 | "Value": 0, 69 | "Blend": "Add" 70 | }, 71 | { 72 | "Id": "ParamBrowLX", 73 | "Value": 0, 74 | "Blend": "Add" 75 | }, 76 | { 77 | "Id": "ParamBrowRX", 78 | "Value": 0, 79 | "Blend": "Add" 80 | }, 81 | { 82 | "Id": "ParamBrowLAngle", 83 | "Value": -1, 84 | "Blend": "Add" 85 | }, 86 | { 87 | "Id": "ParamBrowRAngle", 88 | "Value": -1, 89 | "Blend": "Add" 90 | }, 91 | { 92 | "Id": "ParamBrowLForm", 93 | "Value": -1, 94 | "Blend": "Add" 95 | }, 96 | { 97 | "Id": "ParamBrowRForm", 98 | "Value": -1, 99 | "Blend": "Add" 100 | }, 101 | { 102 | "Id": "ParamA", 103 | "Value": 0, 104 | "Blend": "Add" 105 | }, 106 | { 107 | "Id": "ParamI", 108 | "Value": 0, 109 | "Blend": "Add" 110 | }, 111 | { 112 | "Id": "ParamU", 113 | "Value": 0, 114 | "Blend": "Add" 115 | }, 116 | { 117 | "Id": "ParamE", 118 | "Value": 0, 119 | "Blend": "Add" 120 | }, 121 | { 122 | "Id": "ParamO", 123 | "Value": 0, 124 | "Blend": "Add" 125 | }, 126 | { 127 | "Id": "ParamMouthUp", 128 | "Value": 0, 129 | "Blend": "Add" 130 | }, 131 | { 132 | "Id": "ParamMouthDown", 133 | "Value": 0, 134 | "Blend": "Add" 135 | }, 136 | { 137 | "Id": "ParamMouthAngry", 138 | "Value": 0, 139 | "Blend": "Add" 140 | }, 141 | { 142 | "Id": "ParamMouthAngryLine", 143 | "Value": 0, 144 | "Blend": "Add" 145 | } 146 | ] 147 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/expressions/exp_07.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "FadeInTime": 0.5, 4 | "FadeOutTime": 0.5, 5 | "Parameters": [ 6 | { 7 | "Id": "ParamCheek", 8 | "Value": 0, 9 | "Blend": "Add" 10 | }, 11 | { 12 | "Id": "ParamEyeLOpen", 13 | "Value": 1.2, 14 | "Blend": "Multiply" 15 | }, 16 | { 17 | "Id": "ParamEyeLSmile", 18 | "Value": 0, 19 | "Blend": "Add" 20 | }, 21 | { 22 | "Id": "ParamEyeLForm", 23 | "Value": 0, 24 | "Blend": "Add" 25 | }, 26 | { 27 | "Id": "ParamEyeROpen", 28 | "Value": 1.2, 29 | "Blend": "Multiply" 30 | }, 31 | { 32 | "Id": "ParamEyeRSmile", 33 | "Value": 0, 34 | "Blend": "Add" 35 | }, 36 | { 37 | "Id": "ParamEyeRForm", 38 | "Value": 0, 39 | "Blend": "Add" 40 | }, 41 | { 42 | "Id": "ParamEyeBallX", 43 | "Value": 0, 44 | "Blend": "Add" 45 | }, 46 | { 47 | "Id": "ParamEyeBallY", 48 | "Value": 0, 49 | "Blend": "Add" 50 | }, 51 | { 52 | "Id": "ParamEyeBallForm", 53 | "Value": -1, 54 | "Blend": "Add" 55 | }, 56 | { 57 | "Id": "ParamEyeEffect", 58 | "Value": 0, 59 | "Blend": "Add" 60 | }, 61 | { 62 | "Id": "ParamBrowLY", 63 | "Value": 0, 64 | "Blend": "Add" 65 | }, 66 | { 67 | "Id": "ParamBrowRY", 68 | "Value": 0, 69 | "Blend": "Add" 70 | }, 71 | { 72 | "Id": "ParamBrowLX", 73 | "Value": 0, 74 | "Blend": "Add" 75 | }, 76 | { 77 | "Id": "ParamBrowRX", 78 | "Value": 0, 79 | "Blend": "Add" 80 | }, 81 | { 82 | "Id": "ParamBrowLAngle", 83 | "Value": 0, 84 | "Blend": "Add" 85 | }, 86 | { 87 | "Id": "ParamBrowRAngle", 88 | "Value": 0, 89 | "Blend": "Add" 90 | }, 91 | { 92 | "Id": "ParamBrowLForm", 93 | "Value": 1, 94 | "Blend": "Add" 95 | }, 96 | { 97 | "Id": "ParamBrowRForm", 98 | "Value": 1, 99 | "Blend": "Add" 100 | }, 101 | { 102 | "Id": "ParamA", 103 | "Value": 0, 104 | "Blend": "Add" 105 | }, 106 | { 107 | "Id": "ParamI", 108 | "Value": 0, 109 | "Blend": "Add" 110 | }, 111 | { 112 | "Id": "ParamU", 113 | "Value": 0, 114 | "Blend": "Add" 115 | }, 116 | { 117 | "Id": "ParamE", 118 | "Value": 0, 119 | "Blend": "Add" 120 | }, 121 | { 122 | "Id": "ParamO", 123 | "Value": 0, 124 | "Blend": "Add" 125 | }, 126 | { 127 | "Id": "ParamMouthUp", 128 | "Value": -1, 129 | "Blend": "Add" 130 | }, 131 | { 132 | "Id": "ParamMouthDown", 133 | "Value": 1, 134 | "Blend": "Add" 135 | }, 136 | { 137 | "Id": "ParamMouthAngry", 138 | "Value": 0, 139 | "Blend": "Add" 140 | }, 141 | { 142 | "Id": "ParamMouthAngryLine", 143 | "Value": 0, 144 | "Blend": "Add" 145 | } 146 | ] 147 | } -------------------------------------------------------------------------------- /Samples/Resources/Mao/expressions/exp_08.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "FadeInTime": 0.5, 4 | "FadeOutTime": 0.5, 5 | "Parameters": [ 6 | { 7 | "Id": "ParamCheek", 8 | "Value": 0, 9 | "Blend": "Add" 10 | }, 11 | { 12 | "Id": "ParamEyeLOpen", 13 | "Value": 1, 14 | "Blend": "Multiply" 15 | }, 16 | { 17 | "Id": "ParamEyeLSmile", 18 | "Value": 0, 19 | "Blend": "Add" 20 | }, 21 | { 22 | "Id": "ParamEyeLForm", 23 | "Value": 1, 24 | "Blend": "Add" 25 | }, 26 | { 27 | "Id": "ParamEyeROpen", 28 | "Value": 1, 29 | "Blend": "Multiply" 30 | }, 31 | { 32 | "Id": "ParamEyeRSmile", 33 | "Value": 0, 34 | "Blend": "Add" 35 | }, 36 | { 37 | "Id": "ParamEyeRForm", 38 | "Value": 1, 39 | "Blend": "Add" 40 | }, 41 | { 42 | "Id": "ParamEyeBallX", 43 | "Value": 0, 44 | "Blend": "Add" 45 | }, 46 | { 47 | "Id": "ParamEyeBallY", 48 | "Value": 0, 49 | "Blend": "Add" 50 | }, 51 | { 52 | "Id": "ParamEyeBallForm", 53 | "Value": 0, 54 | "Blend": "Add" 55 | }, 56 | { 57 | "Id": "ParamEyeEffect", 58 | "Value": 0, 59 | "Blend": "Add" 60 | }, 61 | { 62 | "Id": "ParamBrowLY", 63 | "Value": 0, 64 | "Blend": "Add" 65 | }, 66 | { 67 | "Id": "ParamBrowRY", 68 | "Value": 0, 69 | "Blend": "Add" 70 | }, 71 | { 72 | "Id": "ParamBrowLX", 73 | "Value": 0, 74 | "Blend": "Add" 75 | }, 76 | { 77 | "Id": "ParamBrowRX", 78 | "Value": 0, 79 | "Blend": "Add" 80 | }, 81 | { 82 | "Id": "ParamBrowLAngle", 83 | "Value": 0, 84 | "Blend": "Add" 85 | }, 86 | { 87 | "Id": "ParamBrowRAngle", 88 | "Value": 0, 89 | "Blend": "Add" 90 | }, 91 | { 92 | "Id": "ParamBrowLForm", 93 | "Value": 0, 94 | "Blend": "Add" 95 | }, 96 | { 97 | "Id": "ParamBrowRForm", 98 | "Value": 0, 99 | "Blend": "Add" 100 | }, 101 | { 102 | "Id": "ParamA", 103 | "Value": 0, 104 | "Blend": "Add" 105 | }, 106 | { 107 | "Id": "ParamI", 108 | "Value": 0, 109 | "Blend": "Add" 110 | }, 111 | { 112 | "Id": "ParamU", 113 | "Value": 0, 114 | "Blend": "Add" 115 | }, 116 | { 117 | "Id": "ParamE", 118 | "Value": 0, 119 | "Blend": "Add" 120 | }, 121 | { 122 | "Id": "ParamO", 123 | "Value": 0, 124 | "Blend": "Add" 125 | }, 126 | { 127 | "Id": "ParamMouthUp", 128 | "Value": -1, 129 | "Blend": "Add" 130 | }, 131 | { 132 | "Id": "ParamMouthDown", 133 | "Value": 0, 134 | "Blend": "Add" 135 | }, 136 | { 137 | "Id": "ParamMouthAngry", 138 | "Value": 1, 139 | "Blend": "Add" 140 | }, 141 | { 142 | "Id": "ParamMouthAngryLine", 143 | "Value": 1, 144 | "Blend": "Add" 145 | } 146 | ] 147 | } -------------------------------------------------------------------------------- /Samples/Resources/Mark/Mark.2048/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Mark/Mark.2048/texture_00.png -------------------------------------------------------------------------------- /Samples/Resources/Mark/Mark.cdi3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Parameters": [ 4 | { 5 | "Id": "ParamAngleX", 6 | "GroupId": "", 7 | "Name": "角度 X" 8 | }, 9 | { 10 | "Id": "ParamAngleY", 11 | "GroupId": "", 12 | "Name": "角度 Y" 13 | }, 14 | { 15 | "Id": "ParamAngleZ", 16 | "GroupId": "", 17 | "Name": "角度 Z" 18 | }, 19 | { 20 | "Id": "ParamEyeLOpen", 21 | "GroupId": "", 22 | "Name": "左目 開閉" 23 | }, 24 | { 25 | "Id": "ParamEyeROpen", 26 | "GroupId": "", 27 | "Name": "右目 開閉" 28 | }, 29 | { 30 | "Id": "ParamEyeBallX", 31 | "GroupId": "", 32 | "Name": "目玉 X" 33 | }, 34 | { 35 | "Id": "ParamEyeBallY", 36 | "GroupId": "", 37 | "Name": "目玉 Y" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "GroupId": "", 42 | "Name": "左眉 上下" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "GroupId": "", 47 | "Name": "右眉 上下" 48 | }, 49 | { 50 | "Id": "ParamMouthOpenY", 51 | "GroupId": "", 52 | "Name": "口 開閉" 53 | }, 54 | { 55 | "Id": "ParamArmL", 56 | "GroupId": "", 57 | "Name": "左腕" 58 | }, 59 | { 60 | "Id": "ParamArmR", 61 | "GroupId": "", 62 | "Name": "右腕" 63 | }, 64 | { 65 | "Id": "ParamLeftLeg", 66 | "GroupId": "", 67 | "Name": "左脚" 68 | }, 69 | { 70 | "Id": "ParamRightLeg", 71 | "GroupId": "", 72 | "Name": "右脚" 73 | }, 74 | { 75 | "Id": "ParamBodyAngleX", 76 | "GroupId": "", 77 | "Name": "体の回転 X" 78 | }, 79 | { 80 | "Id": "ParamBodyAngleY", 81 | "GroupId": "", 82 | "Name": "体の回転 Y" 83 | }, 84 | { 85 | "Id": "ParamBodyAngleZ", 86 | "GroupId": "", 87 | "Name": "体の回転 Z" 88 | }, 89 | { 90 | "Id": "ParamBreath", 91 | "GroupId": "", 92 | "Name": "呼吸" 93 | }, 94 | { 95 | "Id": "ParamHairFront", 96 | "GroupId": "", 97 | "Name": "髪揺れ 前" 98 | }, 99 | { 100 | "Id": "ParamHairSide", 101 | "GroupId": "", 102 | "Name": "髪揺れ 横" 103 | }, 104 | { 105 | "Id": "ParamHairBack", 106 | "GroupId": "", 107 | "Name": "髪揺れ 後" 108 | } 109 | ], 110 | "ParameterGroups": [], 111 | "Parts": [ 112 | { 113 | "Id": "PartHead", 114 | "Name": "頭部" 115 | }, 116 | { 117 | "Id": "PartBody", 118 | "Name": "体" 119 | }, 120 | { 121 | "Id": "PartArmL", 122 | "Name": "左腕" 123 | }, 124 | { 125 | "Id": "PartArmR", 126 | "Name": "右腕" 127 | }, 128 | { 129 | "Id": "PartHairBack", 130 | "Name": "後ろ髪" 131 | }, 132 | { 133 | "Id": "Part", 134 | "Name": "コア" 135 | }, 136 | { 137 | "Id": "PartHairFront", 138 | "Name": "前髪" 139 | }, 140 | { 141 | "Id": "PartEyeL", 142 | "Name": "左目" 143 | }, 144 | { 145 | "Id": "PartEyeR", 146 | "Name": "右目" 147 | }, 148 | { 149 | "Id": "PartHairSide", 150 | "Name": "横髪" 151 | }, 152 | { 153 | "Id": "PartMouth", 154 | "Name": "口" 155 | }, 156 | { 157 | "Id": "PartFace", 158 | "Name": "顔" 159 | }, 160 | { 161 | "Id": "PartEyeBallL", 162 | "Name": "左目玉" 163 | }, 164 | { 165 | "Id": "PartEyeWhiteL", 166 | "Name": "左白目" 167 | }, 168 | { 169 | "Id": "PartEyeBallR", 170 | "Name": "右目玉" 171 | }, 172 | { 173 | "Id": "PartEyeWhiteR", 174 | "Name": "右白目" 175 | }, 176 | { 177 | "Id": "PartOral", 178 | "Name": "口内" 179 | } 180 | ] 181 | } -------------------------------------------------------------------------------- /Samples/Resources/Mark/Mark.moc3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Mark/Mark.moc3 -------------------------------------------------------------------------------- /Samples/Resources/Mark/Mark.model3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "FileReferences": { 4 | "Moc": "Mark.moc3", 5 | "Textures": [ 6 | "Mark.2048/texture_00.png" 7 | ], 8 | "Physics": "Mark.physics3.json", 9 | "UserData": "Mark.userdata3.json", 10 | "DisplayInfo": "Mark.cdi3.json", 11 | "Motions": { 12 | "Idle": [ 13 | { 14 | "File": "motions/mark_m01.motion3.json", 15 | "FadeInTime": 0.5, 16 | "FadeOutTime": 0.5 17 | }, 18 | { 19 | "File": "motions/mark_m02.motion3.json", 20 | "FadeInTime": 0.5, 21 | "FadeOutTime": 0.5 22 | }, 23 | { 24 | "File": "motions/mark_m03.motion3.json", 25 | "FadeInTime": 0.5, 26 | "FadeOutTime": 0.5 27 | }, 28 | { 29 | "File": "motions/mark_m04.motion3.json", 30 | "FadeInTime": 0.5, 31 | "FadeOutTime": 0.5 32 | }, 33 | { 34 | "File": "motions/mark_m05.motion3.json", 35 | "FadeInTime": 0.5, 36 | "FadeOutTime": 0.5 37 | }, 38 | { 39 | "File": "motions/mark_m06.motion3.json", 40 | "FadeInTime": 0.5, 41 | "FadeOutTime": 0.5 42 | } 43 | ] 44 | } 45 | }, 46 | "Groups": [ 47 | { 48 | "Target": "Parameter", 49 | "Name": "LipSync", 50 | "Ids": [] 51 | }, 52 | { 53 | "Target": "Parameter", 54 | "Name": "EyeBlink", 55 | "Ids": [ 56 | "ParamEyeLOpen", 57 | "ParamEyeROpen" 58 | ] 59 | } 60 | ], 61 | "HitAreas": [] 62 | } -------------------------------------------------------------------------------- /Samples/Resources/Mark/Mark.physics3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Meta": { 4 | "PhysicsSettingCount": 1, 5 | "TotalInputCount": 4, 6 | "TotalOutputCount": 3, 7 | "VertexCount": 2, 8 | "EffectiveForces": { 9 | "Gravity": { 10 | "X": 0, 11 | "Y": -1 12 | }, 13 | "Wind": { 14 | "X": 0, 15 | "Y": 0 16 | } 17 | }, 18 | "PhysicsDictionary": [ 19 | { 20 | "Id": "PhysicsSetting1", 21 | "Name": "髪揺れ" 22 | } 23 | ] 24 | }, 25 | "PhysicsSettings": [ 26 | { 27 | "Id": "PhysicsSetting1", 28 | "Input": [ 29 | { 30 | "Source": { 31 | "Target": "Parameter", 32 | "Id": "ParamAngleX" 33 | }, 34 | "Weight": 60, 35 | "Type": "X", 36 | "Reflect": false 37 | }, 38 | { 39 | "Source": { 40 | "Target": "Parameter", 41 | "Id": "ParamAngleZ" 42 | }, 43 | "Weight": 60, 44 | "Type": "Angle", 45 | "Reflect": false 46 | }, 47 | { 48 | "Source": { 49 | "Target": "Parameter", 50 | "Id": "ParamBodyAngleX" 51 | }, 52 | "Weight": 40, 53 | "Type": "X", 54 | "Reflect": false 55 | }, 56 | { 57 | "Source": { 58 | "Target": "Parameter", 59 | "Id": "ParamBodyAngleZ" 60 | }, 61 | "Weight": 40, 62 | "Type": "Angle", 63 | "Reflect": false 64 | } 65 | ], 66 | "Output": [ 67 | { 68 | "Destination": { 69 | "Target": "Parameter", 70 | "Id": "ParamHairFront" 71 | }, 72 | "VertexIndex": 1, 73 | "Scale": 1.397, 74 | "Weight": 100, 75 | "Type": "Angle", 76 | "Reflect": false 77 | }, 78 | { 79 | "Destination": { 80 | "Target": "Parameter", 81 | "Id": "ParamHairSide" 82 | }, 83 | "VertexIndex": 1, 84 | "Scale": 1.397, 85 | "Weight": 100, 86 | "Type": "Angle", 87 | "Reflect": false 88 | }, 89 | { 90 | "Destination": { 91 | "Target": "Parameter", 92 | "Id": "ParamHairBack" 93 | }, 94 | "VertexIndex": 1, 95 | "Scale": 1.397, 96 | "Weight": 100, 97 | "Type": "Angle", 98 | "Reflect": false 99 | } 100 | ], 101 | "Vertices": [ 102 | { 103 | "Position": { 104 | "X": 0, 105 | "Y": 0 106 | }, 107 | "Mobility": 1, 108 | "Delay": 1, 109 | "Acceleration": 1, 110 | "Radius": 0 111 | }, 112 | { 113 | "Position": { 114 | "X": 0, 115 | "Y": 15 116 | }, 117 | "Mobility": 0.95, 118 | "Delay": 0.8, 119 | "Acceleration": 1.5, 120 | "Radius": 15 121 | } 122 | ], 123 | "Normalization": { 124 | "Position": { 125 | "Minimum": -10, 126 | "Default": 0, 127 | "Maximum": 10 128 | }, 129 | "Angle": { 130 | "Minimum": -10, 131 | "Default": 0, 132 | "Maximum": 10 133 | } 134 | } 135 | } 136 | ] 137 | } -------------------------------------------------------------------------------- /Samples/Resources/Mark/Mark.userdata3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Meta": { 4 | "UserDataCount": 5, 5 | "TotalUserDataSize": 20 6 | }, 7 | "UserData": [ 8 | { 9 | "Target": "ArtMesh", 10 | "Id": "Hair2", 11 | "Value": "hair" 12 | }, 13 | { 14 | "Target": "ArtMesh", 15 | "Id": "Hair4", 16 | "Value": "hair" 17 | }, 18 | { 19 | "Target": "ArtMesh", 20 | "Id": "Hair5", 21 | "Value": "hair" 22 | }, 23 | { 24 | "Target": "ArtMesh", 25 | "Id": "Hair3", 26 | "Value": "hair" 27 | }, 28 | { 29 | "Target": "ArtMesh", 30 | "Id": "Hair1", 31 | "Value": "hair" 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/Natori.2048/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Natori/Natori.2048/texture_00.png -------------------------------------------------------------------------------- /Samples/Resources/Natori/Natori.moc3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Natori/Natori.moc3 -------------------------------------------------------------------------------- /Samples/Resources/Natori/Natori.model3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "FileReferences": { 4 | "Moc": "Natori.moc3", 5 | "Textures": [ 6 | "Natori.2048/texture_00.png" 7 | ], 8 | "Physics": "Natori.physics3.json", 9 | "Pose": "Natori.pose3.json", 10 | "DisplayInfo": "Natori.cdi3.json", 11 | "Expressions": [ 12 | { 13 | "Name": "Angry", 14 | "File": "exp/Angry.exp3.json" 15 | }, 16 | { 17 | "Name": "Blushing", 18 | "File": "exp/Blushing.exp3.json" 19 | }, 20 | { 21 | "Name": "Normal", 22 | "File": "exp/Normal.exp3.json" 23 | }, 24 | { 25 | "Name": "Sad", 26 | "File": "exp/Sad.exp3.json" 27 | }, 28 | { 29 | "Name": "Smile", 30 | "File": "exp/Smile.exp3.json" 31 | }, 32 | { 33 | "Name": "Surprised", 34 | "File": "exp/Surprised.exp3.json" 35 | }, 36 | { 37 | "Name": "exp_01", 38 | "File": "exp/exp_01.exp3.json" 39 | }, 40 | { 41 | "Name": "exp_02", 42 | "File": "exp/exp_02.exp3.json" 43 | }, 44 | { 45 | "Name": "exp_03", 46 | "File": "exp/exp_03.exp3.json" 47 | }, 48 | { 49 | "Name": "exp_04", 50 | "File": "exp/exp_04.exp3.json" 51 | }, 52 | { 53 | "Name": "exp_05", 54 | "File": "exp/exp_05.exp3.json" 55 | } 56 | ], 57 | "Motions": { 58 | "Idle": [ 59 | { 60 | "File": "motions/mtn_00.motion3.json" 61 | }, 62 | { 63 | "File": "motions/mtn_01.motion3.json" 64 | }, 65 | { 66 | "File": "motions/mtn_02.motion3.json" 67 | } 68 | ], 69 | "TapBody": [ 70 | { 71 | "File": "motions/mtn_03.motion3.json" 72 | }, 73 | { 74 | "File": "motions/mtn_04.motion3.json" 75 | }, 76 | { 77 | "File": "motions/mtn_05.motion3.json" 78 | }, 79 | { 80 | "File": "motions/mtn_06.motion3.json" 81 | }, 82 | { 83 | "File": "motions/mtn_07.motion3.json" 84 | } 85 | ] 86 | } 87 | }, 88 | "Groups": [ 89 | { 90 | "Target": "Parameter", 91 | "Name": "LipSync", 92 | "Ids": [ 93 | "ParamMouthOpenY" 94 | ] 95 | }, 96 | { 97 | "Target": "Parameter", 98 | "Name": "EyeBlink", 99 | "Ids": [ 100 | "ParamEyeLOpen", 101 | "ParamEyeROpen" 102 | ] 103 | } 104 | ], 105 | "HitAreas": [ 106 | { 107 | "Id": "HitAreaHead", 108 | "Name": "Head" 109 | }, 110 | { 111 | "Id": "HitAreaBody", 112 | "Name": "Body" 113 | } 114 | ] 115 | } 116 | -------------------------------------------------------------------------------- /Samples/Resources/Natori/Natori.pose3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Pose", 3 | "FadeInTime": 0.2, 4 | "Groups": [ 5 | [ 6 | { 7 | "Id": "PartArmAL", 8 | "Link": [] 9 | }, 10 | { 11 | "Id": "PartArmCL", 12 | "Link": [] 13 | }, 14 | { 15 | "Id": "PartArmDL", 16 | "Link": [] 17 | } 18 | ], 19 | [ 20 | { 21 | "Id": "PartArmAR", 22 | "Link": [] 23 | }, 24 | { 25 | "Id": "PartArmBR", 26 | "Link": [] 27 | }, 28 | { 29 | "Id": "PartArmER", 30 | "Link": [] 31 | } 32 | ], 33 | [ 34 | { 35 | "Id": "PartWatchA", 36 | "Link": [] 37 | }, 38 | { 39 | "Id": "PartWatchB", 40 | "Link": [] 41 | } 42 | ] 43 | ] 44 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/Angry.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": -2, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": 0, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": -2, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": 0.3, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": 0.3, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": -0.4, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": -0.4, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": -1, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 0, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": -1, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 0, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": -2, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 0, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/Blushing.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": 0, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": 0, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": 0, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": 0, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": 0, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": -1, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 0, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": -1, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 0, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": -2, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 1, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 1, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/Normal.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": 0, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": 0, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": 0, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": 0, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": 0, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": 0, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 0, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": 0, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 0, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": 0, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 0, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/Sad.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": -2, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": 0, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": -2, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": 0, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": 0, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": -1, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 0, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": -1, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 0, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": -1, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 0, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/Smile.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": -1, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 1, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": 0, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": -1, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 1, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": 0, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": 0, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": 0, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": 1, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 1, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": 0, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 0, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": 0, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 0, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/Surprised.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0.3, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": 0, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": 0.3, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": 0, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": -1, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0.2, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0.2, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": -0.1, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": -0.1, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0.1, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0.1, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": 0, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 0, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": 0, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 0, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": -3, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 1, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/exp_01.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": 3, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": 0, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": 3, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": -0.1, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": -0.1, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": 0, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": 0, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": 0, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 1, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": 0, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 1, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": 1, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 1, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/exp_02.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": 1, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": 0, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": 1, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0.1, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0.1, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": 0, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": 0, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0.1, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0.1, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": 0, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 1, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": 0, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 1, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": 1, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 0, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 1, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/exp_03.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": 0, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": 0, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": 0, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": 0, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": 0, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": -1, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 0, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": -1, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 0, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": -2, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 1, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/exp_04.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": 0.2, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": 0, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": 0.2, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": 0, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0.2, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0.2, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": -0.1, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": -0.1, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0.1, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0.1, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": 0, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 0, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": 0, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 0, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": -3, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 0, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Natori/exp/exp_05.exp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Live2D Expression", 3 | "Parameters": [ 4 | { 5 | "Id": "ParamEyeLOpen", 6 | "Value": -1, 7 | "Blend": "Add" 8 | }, 9 | { 10 | "Id": "ParamEyeLSmile", 11 | "Value": 0, 12 | "Blend": "Add" 13 | }, 14 | { 15 | "Id": "ParamEyeLForm", 16 | "Value": 0, 17 | "Blend": "Add" 18 | }, 19 | { 20 | "Id": "ParamEyeROpen", 21 | "Value": -1, 22 | "Blend": "Add" 23 | }, 24 | { 25 | "Id": "ParamEyeRSmile", 26 | "Value": 0, 27 | "Blend": "Add" 28 | }, 29 | { 30 | "Id": "ParamEyeRForm", 31 | "Value": 0, 32 | "Blend": "Add" 33 | }, 34 | { 35 | "Id": "ParamEyeBallForm", 36 | "Value": 0, 37 | "Blend": "Add" 38 | }, 39 | { 40 | "Id": "ParamBrowLY", 41 | "Value": 0, 42 | "Blend": "Add" 43 | }, 44 | { 45 | "Id": "ParamBrowRY", 46 | "Value": 0, 47 | "Blend": "Add" 48 | }, 49 | { 50 | "Id": "ParamBrowLX", 51 | "Value": 0, 52 | "Blend": "Add" 53 | }, 54 | { 55 | "Id": "ParamBrowRX", 56 | "Value": 0, 57 | "Blend": "Add" 58 | }, 59 | { 60 | "Id": "ParamBrowLAngle", 61 | "Value": 0, 62 | "Blend": "Add" 63 | }, 64 | { 65 | "Id": "ParamBrowRAngle", 66 | "Value": 0, 67 | "Blend": "Add" 68 | }, 69 | { 70 | "Id": "ParamBrowLForm", 71 | "Value": 1, 72 | "Blend": "Add" 73 | }, 74 | { 75 | "Id": "ParamBrowLForm2", 76 | "Value": 0, 77 | "Blend": "Add" 78 | }, 79 | { 80 | "Id": "ParamBrowRForm", 81 | "Value": 1, 82 | "Blend": "Add" 83 | }, 84 | { 85 | "Id": "ParamBrowRForm2", 86 | "Value": 0, 87 | "Blend": "Add" 88 | }, 89 | { 90 | "Id": "ParamMouthForm", 91 | "Value": -3, 92 | "Blend": "Add" 93 | }, 94 | { 95 | "Id": "ParamMouthOpenY", 96 | "Value": 0, 97 | "Blend": "Add" 98 | }, 99 | { 100 | "Id": "ParamMouthForm2", 101 | "Value": 1, 102 | "Blend": "Add" 103 | }, 104 | { 105 | "Id": "ParamTeethOn", 106 | "Value": 0, 107 | "Blend": "Add" 108 | }, 109 | { 110 | "Id": "ParamCheek", 111 | "Value": 0, 112 | "Blend": "Add" 113 | }, 114 | { 115 | "Id": "ParamGlassUD", 116 | "Value": 0, 117 | "Blend": "Add" 118 | }, 119 | { 120 | "Id": "ParamGrassWhite", 121 | "Value": 0, 122 | "Blend": "Add" 123 | }, 124 | { 125 | "Id": "ParamGrassHighlight", 126 | "Value": 0, 127 | "Blend": "Add" 128 | }, 129 | { 130 | "Id": "ParamGrassHighlightMove", 131 | "Value": 0, 132 | "Blend": "Add" 133 | } 134 | ] 135 | } -------------------------------------------------------------------------------- /Samples/Resources/Rice/Rice.2048/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Rice/Rice.2048/texture_00.png -------------------------------------------------------------------------------- /Samples/Resources/Rice/Rice.2048/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Rice/Rice.2048/texture_01.png -------------------------------------------------------------------------------- /Samples/Resources/Rice/Rice.moc3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Rice/Rice.moc3 -------------------------------------------------------------------------------- /Samples/Resources/Rice/Rice.model3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "FileReferences": { 4 | "Moc": "Rice.moc3", 5 | "Textures": [ 6 | "Rice.2048/texture_00.png", 7 | "Rice.2048/texture_01.png" 8 | ], 9 | "Physics": "Rice.physics3.json", 10 | "DisplayInfo": "Rice.cdi3.json", 11 | "Motions": { 12 | "Idle": [ 13 | { 14 | "File": "motions/idle.motion3.json" 15 | } 16 | ], 17 | "TapBody": [ 18 | { 19 | "File": "motions/mtn_01.motion3.json" 20 | }, 21 | { 22 | "File": "motions/mtn_02.motion3.json" 23 | }, 24 | { 25 | "File": "motions/mtn_03.motion3.json" 26 | } 27 | ] 28 | } 29 | }, 30 | "Groups": [ 31 | { 32 | "Target": "Parameter", 33 | "Name": "EyeBlink", 34 | "Ids": [ 35 | "ParamEyeLOpen", 36 | "ParamEyeROpen" 37 | ] 38 | }, 39 | { 40 | "Target": "Parameter", 41 | "Name": "LipSync", 42 | "Ids": [] 43 | } 44 | ], 45 | "HitAreas": [ 46 | { 47 | "Id": "HitAreaBody", 48 | "Name": "Body" 49 | } 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /Samples/Resources/Wanko/Wanko.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Wanko/Wanko.1024/texture_00.png -------------------------------------------------------------------------------- /Samples/Resources/Wanko/Wanko.cdi3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Parameters": [ 4 | { 5 | "Id": "PARAM_ANGLE_X", 6 | "GroupId": "", 7 | "Name": "角度 X" 8 | }, 9 | { 10 | "Id": "PARAM_ANGLE_Y", 11 | "GroupId": "", 12 | "Name": "角度 Y" 13 | }, 14 | { 15 | "Id": "PARAM_ANGLE_Z", 16 | "GroupId": "", 17 | "Name": "角度 Z" 18 | }, 19 | { 20 | "Id": "PARAM_EYE_L_OPEN", 21 | "GroupId": "", 22 | "Name": "左眼 開閉" 23 | }, 24 | { 25 | "Id": "PARAM_EYE_R_OPEN", 26 | "GroupId": "", 27 | "Name": "右眼 開閉" 28 | }, 29 | { 30 | "Id": "PARAM_MOUTH_FORM", 31 | "GroupId": "", 32 | "Name": "口 変形" 33 | }, 34 | { 35 | "Id": "PARAM_MOUTH_OPEN_Y", 36 | "GroupId": "", 37 | "Name": "口 開閉" 38 | }, 39 | { 40 | "Id": "PARAM_TERE", 41 | "GroupId": "", 42 | "Name": "照れ" 43 | }, 44 | { 45 | "Id": "PARAM_BODY_ANGLE_X", 46 | "GroupId": "", 47 | "Name": "体の回転 X" 48 | }, 49 | { 50 | "Id": "PARAM_BODY_ANGLE_Z", 51 | "GroupId": "", 52 | "Name": "体の回転 Z" 53 | }, 54 | { 55 | "Id": "PARAM_BODY_ANGLE_Y", 56 | "GroupId": "", 57 | "Name": "体の回転 Y" 58 | }, 59 | { 60 | "Id": "PARAM_BREATH", 61 | "GroupId": "", 62 | "Name": "呼吸" 63 | }, 64 | { 65 | "Id": "PARAM_BOWL_LID", 66 | "GroupId": "", 67 | "Name": "お椀 ふた" 68 | }, 69 | { 70 | "Id": "PARAM_YUGE_01", 71 | "GroupId": "", 72 | "Name": "湯気" 73 | }, 74 | { 75 | "Id": "PARAM_YUGE_02", 76 | "GroupId": "", 77 | "Name": "湯気" 78 | }, 79 | { 80 | "Id": "PARAM_EFFECT", 81 | "GroupId": "", 82 | "Name": "エフェクト" 83 | }, 84 | { 85 | "Id": "PARAM_EAR_L", 86 | "GroupId": "", 87 | "Name": "左耳" 88 | }, 89 | { 90 | "Id": "PARAM_EAR_R", 91 | "GroupId": "", 92 | "Name": "右耳" 93 | }, 94 | { 95 | "Id": "PARAM_HAND_L", 96 | "GroupId": "", 97 | "Name": "左手" 98 | }, 99 | { 100 | "Id": "PARAM_HAND_R", 101 | "GroupId": "", 102 | "Name": "右手" 103 | }, 104 | { 105 | "Id": "PARAM_SWING", 106 | "GroupId": "", 107 | "Name": "揺れ" 108 | }, 109 | { 110 | "Id": "PARAM_BOWL_SWING", 111 | "GroupId": "", 112 | "Name": "揺れ お椀" 113 | }, 114 | { 115 | "Id": "PARAM_FACE_01", 116 | "GroupId": "", 117 | "Name": "どや キリッ" 118 | }, 119 | { 120 | "Id": "PARAM_BASE_X", 121 | "GroupId": "", 122 | "Name": "全体の左右" 123 | }, 124 | { 125 | "Id": "PARAM_BASE_Y", 126 | "GroupId": "", 127 | "Name": "全体の上下" 128 | } 129 | ], 130 | "ParameterGroups": [], 131 | "Parts": [ 132 | { 133 | "Id": "PARTS_01_SKETCH", 134 | "Name": "[ 下絵 ]" 135 | }, 136 | { 137 | "Id": "PARTS_01_BACKGROUND", 138 | "Name": "背景" 139 | }, 140 | { 141 | "Id": "PARTS_01_BOWL", 142 | "Name": "お椀" 143 | }, 144 | { 145 | "Id": "PARTS_01_BODY", 146 | "Name": "体" 147 | }, 148 | { 149 | "Id": "PARTS_01_EAR_001", 150 | "Name": "耳" 151 | }, 152 | { 153 | "Id": "PARTS_01_NOSE_001", 154 | "Name": "鼻" 155 | }, 156 | { 157 | "Id": "PARTS_01_MOUTH_001", 158 | "Name": "口" 159 | }, 160 | { 161 | "Id": "PARTS_01_BROW_001", 162 | "Name": "まゆ毛" 163 | }, 164 | { 165 | "Id": "PARTS_01_EYE_BALL_001", 166 | "Name": "目玉" 167 | }, 168 | { 169 | "Id": "PARTS_01_EYE_001", 170 | "Name": "目" 171 | }, 172 | { 173 | "Id": "PARTS_01_FACE_001", 174 | "Name": "顔" 175 | }, 176 | { 177 | "Id": "PARTS_01_HOHO", 178 | "Name": "頬" 179 | }, 180 | { 181 | "Id": "PARTS_01_EFFECT", 182 | "Name": "エフェクト" 183 | }, 184 | { 185 | "Id": "PARTS_01_ITEM_16", 186 | "Name": "蕎麦6杯目" 187 | }, 188 | { 189 | "Id": "PARTS_01_ITEM_15", 190 | "Name": "ベニテングタケ" 191 | }, 192 | { 193 | "Id": "PARTS_01_ITEM_14", 194 | "Name": "蕎麦5杯目" 195 | }, 196 | { 197 | "Id": "PARTS_01_ITEM_13", 198 | "Name": "しいたけ" 199 | }, 200 | { 201 | "Id": "PARTS_01_ITEM_12", 202 | "Name": "みかん" 203 | }, 204 | { 205 | "Id": "PARTS_01_ITEM_11", 206 | "Name": "蕎麦4杯目" 207 | }, 208 | { 209 | "Id": "PARTS_01_ITEM_10", 210 | "Name": "王冠" 211 | }, 212 | { 213 | "Id": "PARTS_01_ITEM_09", 214 | "Name": "まゆげ" 215 | }, 216 | { 217 | "Id": "PARTS_01_ITEM_08", 218 | "Name": "蕎麦3杯目" 219 | }, 220 | { 221 | "Id": "PARTS_01_ITEM_07", 222 | "Name": "アフロ" 223 | }, 224 | { 225 | "Id": "PARTS_01_ITEM_06", 226 | "Name": "リボン" 227 | }, 228 | { 229 | "Id": "PARTS_01_ITEM_05", 230 | "Name": "蕎麦2杯目" 231 | }, 232 | { 233 | "Id": "PARTS_01_ITEM_04", 234 | "Name": "星" 235 | }, 236 | { 237 | "Id": "PARTS_01_ITEM_03", 238 | "Name": "ひげ" 239 | }, 240 | { 241 | "Id": "PARTS_01_ITEM_02", 242 | "Name": "蕎麦1杯目" 243 | }, 244 | { 245 | "Id": "PARTS_01_ITEM_01", 246 | "Name": "たんぽぽ" 247 | }, 248 | { 249 | "Id": "PARTS_01_CORE_ITEM", 250 | "Name": "コア アイテム" 251 | }, 252 | { 253 | "Id": "PARTS_01_CORE", 254 | "Name": "コア" 255 | }, 256 | { 257 | "Id": "ROUGH", 258 | "Name": "ラフ" 259 | } 260 | ] 261 | } -------------------------------------------------------------------------------- /Samples/Resources/Wanko/Wanko.moc3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/Wanko/Wanko.moc3 -------------------------------------------------------------------------------- /Samples/Resources/Wanko/Wanko.model3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "FileReferences": { 4 | "Moc": "Wanko.moc3", 5 | "Textures": [ 6 | "Wanko.1024/texture_00.png" 7 | ], 8 | "Physics": "Wanko.physics3.json", 9 | "DisplayInfo": "Wanko.cdi3.json", 10 | "Motions": { 11 | "Idle": [ 12 | { 13 | "File": "motions/idle_01.motion3.json" 14 | }, 15 | { 16 | "File": "motions/idle_03.motion3.json" 17 | }, 18 | { 19 | "File": "motions/idle_04.motion3.json" 20 | } 21 | ], 22 | "TapBody": [ 23 | { 24 | "File": "motions/touch_02.motion3.json" 25 | }, 26 | { 27 | "File": "motions/touch_04.motion3.json" 28 | } 29 | ] 30 | } 31 | }, 32 | "Groups": [ 33 | { 34 | "Target": "Parameter", 35 | "Name": "EyeBlink", 36 | "Ids": [ 37 | "PARAM_EYE_L_OPEN", 38 | "PARAM_EYE_R_OPEN" 39 | ] 40 | }, 41 | { 42 | "Target": "Parameter", 43 | "Name": "LipSync", 44 | "Ids": [ 45 | "PARAM_MOUTH_OPEN_Y" 46 | ] 47 | } 48 | ], 49 | "HitAreas": [ 50 | { 51 | "Id": "HitArea", 52 | "Name": "Body" 53 | } 54 | ] 55 | } -------------------------------------------------------------------------------- /Samples/Resources/Wanko/Wanko.physics3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Meta": { 4 | "PhysicsSettingCount": 4, 5 | "TotalInputCount": 14, 6 | "TotalOutputCount": 4, 7 | "VertexCount": 8, 8 | "EffectiveForces": { 9 | "Gravity": { 10 | "X": 0, 11 | "Y": -1 12 | }, 13 | "Wind": { 14 | "X": 0, 15 | "Y": 0 16 | } 17 | }, 18 | "PhysicsDictionary": [ 19 | { 20 | "Id": "PhysicsSetting1", 21 | "Name": "お椀揺れ" 22 | }, 23 | { 24 | "Id": "PhysicsSetting2", 25 | "Name": "揺れ" 26 | }, 27 | { 28 | "Id": "PhysicsSetting3", 29 | "Name": "右耳" 30 | }, 31 | { 32 | "Id": "PhysicsSetting4", 33 | "Name": "左耳" 34 | } 35 | ] 36 | }, 37 | "PhysicsSettings": [ 38 | { 39 | "Id": "PhysicsSetting1", 40 | "Input": [ 41 | { 42 | "Source": { 43 | "Target": "Parameter", 44 | "Id": "PARAM_BODY_ANGLE_X" 45 | }, 46 | "Weight": 100, 47 | "Type": "X", 48 | "Reflect": false 49 | }, 50 | { 51 | "Source": { 52 | "Target": "Parameter", 53 | "Id": "PARAM_BODY_ANGLE_Z" 54 | }, 55 | "Weight": 100, 56 | "Type": "Angle", 57 | "Reflect": false 58 | } 59 | ], 60 | "Output": [ 61 | { 62 | "Destination": { 63 | "Target": "Parameter", 64 | "Id": "PARAM_BOWL_SWING" 65 | }, 66 | "VertexIndex": 1, 67 | "Scale": 1, 68 | "Weight": 100, 69 | "Type": "Angle", 70 | "Reflect": false 71 | } 72 | ], 73 | "Vertices": [ 74 | { 75 | "Position": { 76 | "X": 0, 77 | "Y": 0 78 | }, 79 | "Mobility": 1, 80 | "Delay": 1, 81 | "Acceleration": 1, 82 | "Radius": 0 83 | }, 84 | { 85 | "Position": { 86 | "X": 0, 87 | "Y": 3 88 | }, 89 | "Mobility": 0.8, 90 | "Delay": 0.9, 91 | "Acceleration": 1.5, 92 | "Radius": 3 93 | } 94 | ], 95 | "Normalization": { 96 | "Position": { 97 | "Minimum": -10, 98 | "Default": 0, 99 | "Maximum": 10 100 | }, 101 | "Angle": { 102 | "Minimum": -10, 103 | "Default": 0, 104 | "Maximum": 10 105 | } 106 | } 107 | }, 108 | { 109 | "Id": "PhysicsSetting2", 110 | "Input": [ 111 | { 112 | "Source": { 113 | "Target": "Parameter", 114 | "Id": "PARAM_BODY_ANGLE_Y" 115 | }, 116 | "Weight": 100, 117 | "Type": "X", 118 | "Reflect": false 119 | }, 120 | { 121 | "Source": { 122 | "Target": "Parameter", 123 | "Id": "PARAM_BODY_ANGLE_Z" 124 | }, 125 | "Weight": 100, 126 | "Type": "Angle", 127 | "Reflect": false 128 | } 129 | ], 130 | "Output": [ 131 | { 132 | "Destination": { 133 | "Target": "Parameter", 134 | "Id": "PARAM_SWING" 135 | }, 136 | "VertexIndex": 1, 137 | "Scale": 1, 138 | "Weight": 100, 139 | "Type": "Angle", 140 | "Reflect": false 141 | } 142 | ], 143 | "Vertices": [ 144 | { 145 | "Position": { 146 | "X": 0, 147 | "Y": 0 148 | }, 149 | "Mobility": 1, 150 | "Delay": 1, 151 | "Acceleration": 1, 152 | "Radius": 0 153 | }, 154 | { 155 | "Position": { 156 | "X": 0, 157 | "Y": 5 158 | }, 159 | "Mobility": 0.85, 160 | "Delay": 0.9, 161 | "Acceleration": 1, 162 | "Radius": 5 163 | } 164 | ], 165 | "Normalization": { 166 | "Position": { 167 | "Minimum": -10, 168 | "Default": 0, 169 | "Maximum": 10 170 | }, 171 | "Angle": { 172 | "Minimum": -10, 173 | "Default": 0, 174 | "Maximum": 10 175 | } 176 | } 177 | }, 178 | { 179 | "Id": "PhysicsSetting3", 180 | "Input": [ 181 | { 182 | "Source": { 183 | "Target": "Parameter", 184 | "Id": "PARAM_ANGLE_X" 185 | }, 186 | "Weight": 50, 187 | "Type": "X", 188 | "Reflect": false 189 | }, 190 | { 191 | "Source": { 192 | "Target": "Parameter", 193 | "Id": "PARAM_ANGLE_Y" 194 | }, 195 | "Weight": 20, 196 | "Type": "X", 197 | "Reflect": false 198 | }, 199 | { 200 | "Source": { 201 | "Target": "Parameter", 202 | "Id": "PARAM_ANGLE_Z" 203 | }, 204 | "Weight": 60, 205 | "Type": "Angle", 206 | "Reflect": false 207 | }, 208 | { 209 | "Source": { 210 | "Target": "Parameter", 211 | "Id": "PARAM_BODY_ANGLE_X" 212 | }, 213 | "Weight": 30, 214 | "Type": "X", 215 | "Reflect": false 216 | }, 217 | { 218 | "Source": { 219 | "Target": "Parameter", 220 | "Id": "PARAM_BODY_ANGLE_Z" 221 | }, 222 | "Weight": 40, 223 | "Type": "Angle", 224 | "Reflect": false 225 | } 226 | ], 227 | "Output": [ 228 | { 229 | "Destination": { 230 | "Target": "Parameter", 231 | "Id": "PARAM_EAR_R" 232 | }, 233 | "VertexIndex": 1, 234 | "Scale": 1.5, 235 | "Weight": 100, 236 | "Type": "Angle", 237 | "Reflect": false 238 | } 239 | ], 240 | "Vertices": [ 241 | { 242 | "Position": { 243 | "X": 0, 244 | "Y": 0 245 | }, 246 | "Mobility": 1, 247 | "Delay": 1, 248 | "Acceleration": 1, 249 | "Radius": 0 250 | }, 251 | { 252 | "Position": { 253 | "X": 0, 254 | "Y": 5.5 255 | }, 256 | "Mobility": 0.95, 257 | "Delay": 0.9, 258 | "Acceleration": 1.5, 259 | "Radius": 5.5 260 | } 261 | ], 262 | "Normalization": { 263 | "Position": { 264 | "Minimum": -10, 265 | "Default": 0, 266 | "Maximum": 10 267 | }, 268 | "Angle": { 269 | "Minimum": -10, 270 | "Default": 0, 271 | "Maximum": 10 272 | } 273 | } 274 | }, 275 | { 276 | "Id": "PhysicsSetting4", 277 | "Input": [ 278 | { 279 | "Source": { 280 | "Target": "Parameter", 281 | "Id": "PARAM_ANGLE_X" 282 | }, 283 | "Weight": 50, 284 | "Type": "X", 285 | "Reflect": false 286 | }, 287 | { 288 | "Source": { 289 | "Target": "Parameter", 290 | "Id": "PARAM_ANGLE_Y" 291 | }, 292 | "Weight": 20, 293 | "Type": "X", 294 | "Reflect": true 295 | }, 296 | { 297 | "Source": { 298 | "Target": "Parameter", 299 | "Id": "PARAM_ANGLE_Z" 300 | }, 301 | "Weight": 60, 302 | "Type": "Angle", 303 | "Reflect": false 304 | }, 305 | { 306 | "Source": { 307 | "Target": "Parameter", 308 | "Id": "PARAM_BODY_ANGLE_X" 309 | }, 310 | "Weight": 30, 311 | "Type": "X", 312 | "Reflect": false 313 | }, 314 | { 315 | "Source": { 316 | "Target": "Parameter", 317 | "Id": "PARAM_BODY_ANGLE_Z" 318 | }, 319 | "Weight": 40, 320 | "Type": "Angle", 321 | "Reflect": false 322 | } 323 | ], 324 | "Output": [ 325 | { 326 | "Destination": { 327 | "Target": "Parameter", 328 | "Id": "PARAM_EAR_L" 329 | }, 330 | "VertexIndex": 1, 331 | "Scale": 1.5, 332 | "Weight": 100, 333 | "Type": "Angle", 334 | "Reflect": false 335 | } 336 | ], 337 | "Vertices": [ 338 | { 339 | "Position": { 340 | "X": 0, 341 | "Y": 0 342 | }, 343 | "Mobility": 1, 344 | "Delay": 1, 345 | "Acceleration": 1, 346 | "Radius": 0 347 | }, 348 | { 349 | "Position": { 350 | "X": 0, 351 | "Y": 5.5 352 | }, 353 | "Mobility": 0.95, 354 | "Delay": 0.9, 355 | "Acceleration": 1.5, 356 | "Radius": 5.5 357 | } 358 | ], 359 | "Normalization": { 360 | "Position": { 361 | "Minimum": -10, 362 | "Default": 0, 363 | "Maximum": 10 364 | }, 365 | "Angle": { 366 | "Minimum": -10, 367 | "Default": 0, 368 | "Maximum": 10 369 | } 370 | } 371 | } 372 | ] 373 | } -------------------------------------------------------------------------------- /Samples/Resources/Wanko/motions/touch_01.motion3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Meta": { 4 | "Duration": 2, 5 | "Fps": 30.0, 6 | "Loop": true, 7 | "AreBeziersRestricted": true, 8 | "CurveCount": 22, 9 | "TotalSegmentCount": 70, 10 | "TotalPointCount": 188, 11 | "UserDataCount": 0, 12 | "TotalUserDataSize": 0 13 | }, 14 | "Curves": [ 15 | { 16 | "Target": "Parameter", 17 | "Id": "PARAM_ANGLE_X", 18 | "Segments": [ 19 | 0, 20 | 0, 21 | 1, 22 | 0.122, 23 | 0, 24 | 0.244, 25 | 0, 26 | 0.367, 27 | 0, 28 | 1, 29 | 0.622, 30 | 0, 31 | 0.878, 32 | 0, 33 | 1.133, 34 | 0, 35 | 1, 36 | 1.411, 37 | 0, 38 | 1.689, 39 | 0, 40 | 1.967, 41 | 0, 42 | 0, 43 | 2, 44 | 0 45 | ] 46 | }, 47 | { 48 | "Target": "Parameter", 49 | "Id": "PARAM_ANGLE_Y", 50 | "Segments": [ 51 | 0, 52 | 0, 53 | 1, 54 | 0.122, 55 | 0, 56 | 0.244, 57 | 0, 58 | 0.367, 59 | 0, 60 | 1, 61 | 0.422, 62 | 0, 63 | 0.478, 64 | 30, 65 | 0.533, 66 | 30, 67 | 1, 68 | 0.633, 69 | 30, 70 | 0.733, 71 | 0, 72 | 0.833, 73 | 0, 74 | 1, 75 | 0.933, 76 | 0, 77 | 1.033, 78 | 0, 79 | 1.133, 80 | 0, 81 | 1, 82 | 1.411, 83 | 0, 84 | 1.689, 85 | 0, 86 | 1.967, 87 | 0, 88 | 0, 89 | 2, 90 | 0 91 | ] 92 | }, 93 | { 94 | "Target": "Parameter", 95 | "Id": "PARAM_ANGLE_Z", 96 | "Segments": [ 97 | 0, 98 | 0, 99 | 1, 100 | 0.122, 101 | 0, 102 | 0.244, 103 | 0, 104 | 0.367, 105 | 0, 106 | 1, 107 | 0.522, 108 | 0, 109 | 0.678, 110 | 30, 111 | 0.833, 112 | 30, 113 | 1, 114 | 0.933, 115 | 30, 116 | 1.033, 117 | 30, 118 | 1.133, 119 | 30, 120 | 1, 121 | 1.411, 122 | 30, 123 | 1.689, 124 | 30, 125 | 1.967, 126 | 30, 127 | 0, 128 | 2, 129 | 30 130 | ] 131 | }, 132 | { 133 | "Target": "Parameter", 134 | "Id": "PARAM_EYE_L_OPEN", 135 | "Segments": [ 136 | 0, 137 | 1, 138 | 1, 139 | 0.656, 140 | 1, 141 | 1.311, 142 | 1, 143 | 1.967, 144 | 1, 145 | 0, 146 | 2, 147 | 1 148 | ] 149 | }, 150 | { 151 | "Target": "Parameter", 152 | "Id": "PARAM_EYE_R_OPEN", 153 | "Segments": [ 154 | 0, 155 | 1, 156 | 1, 157 | 0.656, 158 | 1, 159 | 1.311, 160 | 1, 161 | 1.967, 162 | 1, 163 | 0, 164 | 2, 165 | 1 166 | ] 167 | }, 168 | { 169 | "Target": "Parameter", 170 | "Id": "PARAM_MOUTH_OPEN_Y", 171 | "Segments": [ 172 | 0, 173 | 1, 174 | 1, 175 | 0.656, 176 | 1, 177 | 1.311, 178 | 1, 179 | 1.967, 180 | 1, 181 | 0, 182 | 2, 183 | 1 184 | ] 185 | }, 186 | { 187 | "Target": "Parameter", 188 | "Id": "PARAM_BODY_ANGLE_X", 189 | "Segments": [ 190 | 0, 191 | 0, 192 | 1, 193 | 0.122, 194 | 0, 195 | 0.244, 196 | 0, 197 | 0.367, 198 | 0, 199 | 1, 200 | 0.522, 201 | 0, 202 | 0.678, 203 | 2, 204 | 0.833, 205 | 2, 206 | 1, 207 | 0.933, 208 | 2, 209 | 1.033, 210 | 2, 211 | 1.133, 212 | 2, 213 | 1, 214 | 1.411, 215 | 2, 216 | 1.689, 217 | 2, 218 | 1.967, 219 | 2, 220 | 0, 221 | 2, 222 | 2 223 | ] 224 | }, 225 | { 226 | "Target": "Parameter", 227 | "Id": "PARAM_BODY_ANGLE_Z", 228 | "Segments": [ 229 | 0, 230 | 0, 231 | 1, 232 | 0.378, 233 | 0, 234 | 0.756, 235 | 0, 236 | 1.133, 237 | 0, 238 | 1, 239 | 1.411, 240 | 0, 241 | 1.689, 242 | 0, 243 | 1.967, 244 | 0, 245 | 0, 246 | 2, 247 | 0 248 | ] 249 | }, 250 | { 251 | "Target": "Parameter", 252 | "Id": "PARAM_BODY_ANGLE_Y", 253 | "Segments": [ 254 | 0, 255 | 0, 256 | 1, 257 | 0.122, 258 | 0, 259 | 0.244, 260 | 0, 261 | 0.367, 262 | 0, 263 | 1, 264 | 0.422, 265 | 0, 266 | 0.478, 267 | 6, 268 | 0.533, 269 | 6, 270 | 1, 271 | 0.633, 272 | 6, 273 | 0.733, 274 | 0, 275 | 0.833, 276 | 0, 277 | 1, 278 | 0.933, 279 | 0, 280 | 1.033, 281 | 0, 282 | 1.133, 283 | 0, 284 | 1, 285 | 1.411, 286 | 0, 287 | 1.689, 288 | 0, 289 | 1.967, 290 | 0, 291 | 0, 292 | 2, 293 | 0 294 | ] 295 | }, 296 | { 297 | "Target": "Parameter", 298 | "Id": "PARAM_BREATH", 299 | "Segments": [ 300 | 0, 301 | 0, 302 | 1, 303 | 0.656, 304 | 0, 305 | 1.311, 306 | 0, 307 | 1.967, 308 | 0, 309 | 0, 310 | 2, 311 | 0 312 | ] 313 | }, 314 | { 315 | "Target": "Parameter", 316 | "Id": "PARAM_BOWL_LID", 317 | "Segments": [ 318 | 0, 319 | 50, 320 | 1, 321 | 0.656, 322 | 50, 323 | 1.311, 324 | 50, 325 | 1.967, 326 | 50, 327 | 0, 328 | 2, 329 | 50 330 | ] 331 | }, 332 | { 333 | "Target": "Parameter", 334 | "Id": "PARAM_YUGE_01", 335 | "Segments": [ 336 | 0, 337 | 0, 338 | 1, 339 | 0.656, 340 | 0, 341 | 1.311, 342 | 0, 343 | 1.967, 344 | 0, 345 | 0, 346 | 2, 347 | 0 348 | ] 349 | }, 350 | { 351 | "Target": "Parameter", 352 | "Id": "PARAM_YUGE_02", 353 | "Segments": [ 354 | 0, 355 | 0, 356 | 1, 357 | 0.656, 358 | 0, 359 | 1.311, 360 | 0, 361 | 1.967, 362 | 0, 363 | 0, 364 | 2, 365 | 0 366 | ] 367 | }, 368 | { 369 | "Target": "Parameter", 370 | "Id": "PARAM_EFFECT", 371 | "Segments": [ 372 | 0, 373 | 0, 374 | 1, 375 | 0.656, 376 | 0, 377 | 1.311, 378 | 0, 379 | 1.967, 380 | 0, 381 | 0, 382 | 2, 383 | 0 384 | ] 385 | }, 386 | { 387 | "Target": "Parameter", 388 | "Id": "PARAM_EAR_L", 389 | "Segments": [ 390 | 0, 391 | 0, 392 | 1, 393 | 0.122, 394 | 0, 395 | 0.244, 396 | 0, 397 | 0.367, 398 | 0, 399 | 1, 400 | 0.444, 401 | 0, 402 | 0.522, 403 | 1, 404 | 0.6, 405 | 1, 406 | 1, 407 | 0.667, 408 | 1, 409 | 0.733, 410 | -1, 411 | 0.8, 412 | -1, 413 | 1, 414 | 0.856, 415 | -1, 416 | 0.911, 417 | 0.31, 418 | 0.967, 419 | 0.31, 420 | 1, 421 | 1.022, 422 | 0.31, 423 | 1.078, 424 | -0.2, 425 | 1.133, 426 | -0.2, 427 | 1, 428 | 1.2, 429 | -0.2, 430 | 1.267, 431 | 0, 432 | 1.333, 433 | 0, 434 | 1, 435 | 1.544, 436 | 0, 437 | 1.756, 438 | 0, 439 | 1.967, 440 | 0, 441 | 0, 442 | 2, 443 | 0 444 | ] 445 | }, 446 | { 447 | "Target": "Parameter", 448 | "Id": "PARAM_EAR_R", 449 | "Segments": [ 450 | 0, 451 | 0, 452 | 1, 453 | 0.122, 454 | 0, 455 | 0.244, 456 | 0, 457 | 0.367, 458 | 0, 459 | 1, 460 | 0.444, 461 | 0, 462 | 0.522, 463 | -1, 464 | 0.6, 465 | -1, 466 | 1, 467 | 0.667, 468 | -1, 469 | 0.733, 470 | 1, 471 | 0.8, 472 | 1, 473 | 1, 474 | 0.856, 475 | 1, 476 | 0.911, 477 | -0.34, 478 | 0.967, 479 | -0.34, 480 | 1, 481 | 1.022, 482 | -0.34, 483 | 1.078, 484 | 0.16, 485 | 1.133, 486 | 0.16, 487 | 1, 488 | 1.2, 489 | 0.16, 490 | 1.267, 491 | 0, 492 | 1.333, 493 | 0, 494 | 1, 495 | 1.544, 496 | 0, 497 | 1.756, 498 | 0, 499 | 1.967, 500 | 0, 501 | 0, 502 | 2, 503 | 0 504 | ] 505 | }, 506 | { 507 | "Target": "Parameter", 508 | "Id": "PARAM_HAND_L", 509 | "Segments": [ 510 | 0, 511 | 0, 512 | 1, 513 | 0.656, 514 | 0, 515 | 1.311, 516 | 0, 517 | 1.967, 518 | 0, 519 | 0, 520 | 2, 521 | 0 522 | ] 523 | }, 524 | { 525 | "Target": "Parameter", 526 | "Id": "PARAM_HAND_R", 527 | "Segments": [ 528 | 0, 529 | 0, 530 | 1, 531 | 0.656, 532 | 0, 533 | 1.311, 534 | 0, 535 | 1.967, 536 | 0, 537 | 0, 538 | 2, 539 | 0 540 | ] 541 | }, 542 | { 543 | "Target": "Parameter", 544 | "Id": "PARAM_SWING", 545 | "Segments": [ 546 | 0, 547 | 0, 548 | 0, 549 | 2, 550 | 0 551 | ] 552 | }, 553 | { 554 | "Target": "Parameter", 555 | "Id": "PARAM_BOWL_SWING", 556 | "Segments": [ 557 | 0, 558 | 0, 559 | 0, 560 | 2, 561 | 0 562 | ] 563 | }, 564 | { 565 | "Target": "Parameter", 566 | "Id": "PARAM_FACE_01", 567 | "Segments": [ 568 | 0, 569 | 0, 570 | 1, 571 | 0.656, 572 | 0, 573 | 1.311, 574 | 0, 575 | 1.967, 576 | 0, 577 | 0, 578 | 2, 579 | 0 580 | ] 581 | }, 582 | { 583 | "Target": "Parameter", 584 | "Id": "PARAM_BASE_X", 585 | "Segments": [ 586 | 0, 587 | 0, 588 | 0, 589 | 2, 590 | 0 591 | ] 592 | } 593 | ] 594 | } -------------------------------------------------------------------------------- /Samples/Resources/Wanko/motions/touch_05.motion3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 3, 3 | "Meta": { 4 | "Duration": 1.5, 5 | "Fps": 30.0, 6 | "Loop": true, 7 | "AreBeziersRestricted": true, 8 | "CurveCount": 22, 9 | "TotalSegmentCount": 58, 10 | "TotalPointCount": 152, 11 | "UserDataCount": 0, 12 | "TotalUserDataSize": 0 13 | }, 14 | "Curves": [ 15 | { 16 | "Target": "Parameter", 17 | "Id": "PARAM_ANGLE_X", 18 | "Segments": [ 19 | 0, 20 | 0, 21 | 1, 22 | 0.067, 23 | 0, 24 | 0.133, 25 | 0, 26 | 0.2, 27 | 0, 28 | 1, 29 | 0.4, 30 | 0, 31 | 0.6, 32 | 0, 33 | 0.8, 34 | 0, 35 | 1, 36 | 1.022, 37 | 0, 38 | 1.244, 39 | 0, 40 | 1.467, 41 | 0, 42 | 0, 43 | 1.5, 44 | 0 45 | ] 46 | }, 47 | { 48 | "Target": "Parameter", 49 | "Id": "PARAM_ANGLE_Y", 50 | "Segments": [ 51 | 0, 52 | -11, 53 | 1, 54 | 0.067, 55 | -11, 56 | 0.133, 57 | -11, 58 | 0.2, 59 | -11, 60 | 1, 61 | 0.3, 62 | -11, 63 | 0.4, 64 | 10, 65 | 0.5, 66 | 10, 67 | 1, 68 | 0.6, 69 | 10, 70 | 0.7, 71 | 0, 72 | 0.8, 73 | 0, 74 | 1, 75 | 1.022, 76 | 0, 77 | 1.244, 78 | 0, 79 | 1.467, 80 | 0, 81 | 0, 82 | 1.5, 83 | 0 84 | ] 85 | }, 86 | { 87 | "Target": "Parameter", 88 | "Id": "PARAM_ANGLE_Z", 89 | "Segments": [ 90 | 0, 91 | 0, 92 | 1, 93 | 0.489, 94 | 0, 95 | 0.978, 96 | 0, 97 | 1.467, 98 | 0, 99 | 0, 100 | 1.5, 101 | 0 102 | ] 103 | }, 104 | { 105 | "Target": "Parameter", 106 | "Id": "PARAM_EYE_L_OPEN", 107 | "Segments": [ 108 | 0, 109 | 0, 110 | 1, 111 | 0.067, 112 | 0, 113 | 0.133, 114 | 0, 115 | 0.2, 116 | 0, 117 | 1, 118 | 0.4, 119 | 0, 120 | 0.6, 121 | 0, 122 | 0.8, 123 | 0, 124 | 1, 125 | 1.022, 126 | 0, 127 | 1.244, 128 | 0, 129 | 1.467, 130 | 0, 131 | 0, 132 | 1.5, 133 | 0 134 | ] 135 | }, 136 | { 137 | "Target": "Parameter", 138 | "Id": "PARAM_EYE_R_OPEN", 139 | "Segments": [ 140 | 0, 141 | 0, 142 | 1, 143 | 0.067, 144 | 0, 145 | 0.133, 146 | 0, 147 | 0.2, 148 | 0, 149 | 1, 150 | 0.4, 151 | 0, 152 | 0.6, 153 | 0, 154 | 0.8, 155 | 0, 156 | 1, 157 | 1.022, 158 | 0, 159 | 1.244, 160 | 0, 161 | 1.467, 162 | 0, 163 | 0, 164 | 1.5, 165 | 0 166 | ] 167 | }, 168 | { 169 | "Target": "Parameter", 170 | "Id": "PARAM_MOUTH_OPEN_Y", 171 | "Segments": [ 172 | 0, 173 | 0, 174 | 1, 175 | 0.067, 176 | 0, 177 | 0.133, 178 | 0, 179 | 0.2, 180 | 0, 181 | 1, 182 | 0.3, 183 | 0, 184 | 0.4, 185 | 0, 186 | 0.5, 187 | 0, 188 | 1, 189 | 0.6, 190 | 0, 191 | 0.7, 192 | 0, 193 | 0.8, 194 | 0, 195 | 1, 196 | 1.022, 197 | 0, 198 | 1.244, 199 | 0, 200 | 1.467, 201 | 0, 202 | 0, 203 | 1.5, 204 | 0 205 | ] 206 | }, 207 | { 208 | "Target": "Parameter", 209 | "Id": "PARAM_BODY_ANGLE_X", 210 | "Segments": [ 211 | 0, 212 | 0, 213 | 1, 214 | 0.489, 215 | 0, 216 | 0.978, 217 | 0, 218 | 1.467, 219 | 0, 220 | 0, 221 | 1.5, 222 | 0 223 | ] 224 | }, 225 | { 226 | "Target": "Parameter", 227 | "Id": "PARAM_BODY_ANGLE_Z", 228 | "Segments": [ 229 | 0, 230 | 0, 231 | 1, 232 | 0.489, 233 | 0, 234 | 0.978, 235 | 0, 236 | 1.467, 237 | 0, 238 | 0, 239 | 1.5, 240 | 0 241 | ] 242 | }, 243 | { 244 | "Target": "Parameter", 245 | "Id": "PARAM_BODY_ANGLE_Y", 246 | "Segments": [ 247 | 0, 248 | 0, 249 | 1, 250 | 0.067, 251 | 0, 252 | 0.133, 253 | 0, 254 | 0.2, 255 | 0, 256 | 1, 257 | 0.3, 258 | 0, 259 | 0.4, 260 | 4, 261 | 0.5, 262 | 4, 263 | 1, 264 | 0.6, 265 | 4, 266 | 0.7, 267 | 0, 268 | 0.8, 269 | 0, 270 | 1, 271 | 1.022, 272 | 0, 273 | 1.244, 274 | 0, 275 | 1.467, 276 | 0, 277 | 0, 278 | 1.5, 279 | 0 280 | ] 281 | }, 282 | { 283 | "Target": "Parameter", 284 | "Id": "PARAM_BREATH", 285 | "Segments": [ 286 | 0, 287 | 0, 288 | 1, 289 | 0.489, 290 | 0, 291 | 0.978, 292 | 0, 293 | 1.467, 294 | 0, 295 | 0, 296 | 1.5, 297 | 0 298 | ] 299 | }, 300 | { 301 | "Target": "Parameter", 302 | "Id": "PARAM_BOWL_LID", 303 | "Segments": [ 304 | 0, 305 | 50, 306 | 1, 307 | 0.489, 308 | 50, 309 | 0.978, 310 | 50, 311 | 1.467, 312 | 50, 313 | 0, 314 | 1.5, 315 | 50 316 | ] 317 | }, 318 | { 319 | "Target": "Parameter", 320 | "Id": "PARAM_YUGE_01", 321 | "Segments": [ 322 | 0, 323 | 0, 324 | 1, 325 | 0.489, 326 | 0, 327 | 0.978, 328 | 0, 329 | 1.467, 330 | 0, 331 | 0, 332 | 1.5, 333 | 0 334 | ] 335 | }, 336 | { 337 | "Target": "Parameter", 338 | "Id": "PARAM_YUGE_02", 339 | "Segments": [ 340 | 0, 341 | 0, 342 | 1, 343 | 0.489, 344 | 0, 345 | 0.978, 346 | 0, 347 | 1.467, 348 | 0, 349 | 0, 350 | 1.5, 351 | 0 352 | ] 353 | }, 354 | { 355 | "Target": "Parameter", 356 | "Id": "PARAM_EFFECT", 357 | "Segments": [ 358 | 0, 359 | 0, 360 | 1, 361 | 0.489, 362 | 0, 363 | 0.978, 364 | 0, 365 | 1.467, 366 | 0, 367 | 0, 368 | 1.5, 369 | 0 370 | ] 371 | }, 372 | { 373 | "Target": "Parameter", 374 | "Id": "PARAM_EAR_L", 375 | "Segments": [ 376 | 0, 377 | 0, 378 | 1, 379 | 0.489, 380 | 0, 381 | 0.978, 382 | 0, 383 | 1.467, 384 | 0, 385 | 0, 386 | 1.5, 387 | 0 388 | ] 389 | }, 390 | { 391 | "Target": "Parameter", 392 | "Id": "PARAM_EAR_R", 393 | "Segments": [ 394 | 0, 395 | 0, 396 | 1, 397 | 0.489, 398 | 0, 399 | 0.978, 400 | 0, 401 | 1.467, 402 | 0, 403 | 0, 404 | 1.5, 405 | 0 406 | ] 407 | }, 408 | { 409 | "Target": "Parameter", 410 | "Id": "PARAM_HAND_L", 411 | "Segments": [ 412 | 0, 413 | 0, 414 | 1, 415 | 0.067, 416 | 0, 417 | 0.133, 418 | 0, 419 | 0.2, 420 | 0, 421 | 1, 422 | 0.622, 423 | 0, 424 | 1.044, 425 | 0, 426 | 1.467, 427 | 0, 428 | 0, 429 | 1.5, 430 | 0 431 | ] 432 | }, 433 | { 434 | "Target": "Parameter", 435 | "Id": "PARAM_HAND_R", 436 | "Segments": [ 437 | 0, 438 | 0, 439 | 1, 440 | 0.067, 441 | 0, 442 | 0.133, 443 | 0, 444 | 0.2, 445 | 0, 446 | 1, 447 | 0.622, 448 | 0, 449 | 1.044, 450 | 0, 451 | 1.467, 452 | 0, 453 | 0, 454 | 1.5, 455 | 0 456 | ] 457 | }, 458 | { 459 | "Target": "Parameter", 460 | "Id": "PARAM_SWING", 461 | "Segments": [ 462 | 0, 463 | 0, 464 | 0, 465 | 1.5, 466 | 0 467 | ] 468 | }, 469 | { 470 | "Target": "Parameter", 471 | "Id": "PARAM_BOWL_SWING", 472 | "Segments": [ 473 | 0, 474 | 0, 475 | 0, 476 | 1.5, 477 | 0 478 | ] 479 | }, 480 | { 481 | "Target": "Parameter", 482 | "Id": "PARAM_FACE_01", 483 | "Segments": [ 484 | 0, 485 | 0, 486 | 1, 487 | 0.489, 488 | 0, 489 | 0.978, 490 | 0, 491 | 1.467, 492 | 0, 493 | 0, 494 | 1.5, 495 | 0 496 | ] 497 | }, 498 | { 499 | "Target": "Parameter", 500 | "Id": "PARAM_BASE_X", 501 | "Segments": [ 502 | 0, 503 | 0, 504 | 0, 505 | 1.5, 506 | 0 507 | ] 508 | } 509 | ] 510 | } -------------------------------------------------------------------------------- /Samples/Resources/back_class_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/back_class_normal.png -------------------------------------------------------------------------------- /Samples/Resources/icon_gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Live2D/CubismWebSamples/cff37ade29cf180753d93e14d96c3e7da1c6dd74/Samples/Resources/icon_gear.png -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/copy_resources.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | "use strict"; 9 | const fs = require('fs'); 10 | const publicResources = [ 11 | {src: '../../../Core', dst: './public/Core'}, 12 | {src: '../../Resources', dst: './public/Resources'}, 13 | ]; 14 | 15 | publicResources.forEach((e)=>{if (fs.existsSync(e.dst)) fs.rmSync(e.dst, { recursive: true })}); 16 | publicResources.forEach((e)=>fs.cpSync(e.src, e.dst, {recursive: true})); 17 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import eslint from '@eslint/js'; 2 | import tseslint from 'typescript-eslint'; 3 | import globals from 'globals'; 4 | import eslintConfigPrettier from 'eslint-config-prettier'; 5 | import eslintPluginPrettier from 'eslint-plugin-prettier'; 6 | 7 | export default tseslint.config( 8 | eslint.configs.recommended, 9 | tseslint.configs.eslintRecommended, 10 | ...tseslint.configs.recommended, 11 | ...tseslint.configs.recommendedTypeChecked, 12 | eslintConfigPrettier, 13 | { 14 | languageOptions: 15 | { 16 | parserOptions: 17 | { 18 | sourceType: 'module', 19 | ecmaVersion: 2020, 20 | project: './tsconfig.json', 21 | }, 22 | globals: 23 | { 24 | ...globals.browser, 25 | }, 26 | }, 27 | plugins: 28 | { 29 | 'prettier': eslintPluginPrettier, 30 | }, 31 | rules: 32 | { 33 | 'prettier/prettier': [ 34 | 'error', 35 | { 36 | singleQuote: true, 37 | trailingComma: 'none', 38 | arrowParens: 'avoid', 39 | } 40 | ], 41 | camelcase: 'off', 42 | '@typescript-eslint/naming-convention': [ 43 | 'warn', 44 | { 45 | selector: 'default', 46 | format: ['camelCase'], 47 | }, 48 | { 49 | selector: 'import', 50 | format: ['PascalCase'], 51 | }, 52 | { 53 | selector: 'variable', 54 | format: [], 55 | custom: { 56 | // 指定の文字列で始まるものと特定の文字を含むものは許容 57 | regex: '^[A-Z]|^csm|^iterator|Shader', 58 | match: true, 59 | }, 60 | modifiers: ['exported', 'const'], 61 | }, 62 | { 63 | selector: 'variable', 64 | format: ['camelCase'], 65 | }, 66 | { 67 | selector: 'variable', 68 | format: [], 69 | custom: { 70 | // 指定の文字列で始まるものは許容 71 | regex: '^[A-Z]|^s_', 72 | match: true, 73 | }, 74 | modifiers: ['global'] 75 | }, 76 | { 77 | selector: 'enum', 78 | format: ['PascalCase'], 79 | }, 80 | { 81 | selector: 'enumMember', 82 | format: [], 83 | custom: { 84 | // 大文字から始まること 85 | regex: '^[A-Z]', 86 | match: true, 87 | } 88 | }, 89 | { 90 | selector: 'classProperty', 91 | format: ['PascalCase'], 92 | modifiers: ['static', 'readonly'] 93 | }, 94 | { 95 | selector: 'classProperty', 96 | format: ['camelCase'], 97 | leadingUnderscore: 'allow', 98 | }, 99 | { 100 | selector: 'class', 101 | format: [], 102 | custom: { 103 | // 指定の文字列で始まるか、指定の文字列で終わること 104 | regex: '^[A-Z]|^csm|^iterator|_WebGL$', 105 | match: true, 106 | } 107 | }, 108 | { 109 | selector: 'interface', 110 | format: ['camelCase', 'PascalCase'], 111 | }, 112 | { 113 | selector: 'parameter', 114 | format: ['camelCase'], 115 | }, 116 | { 117 | selector: 'classMethod', 118 | format: ['camelCase'], 119 | }, 120 | { 121 | selector: 'objectLiteralProperty', 122 | format: ['camelCase', 'PascalCase'], 123 | }, 124 | { 125 | selector: 'typeAlias', 126 | format: [], 127 | custom: { 128 | // 指定の文字列で始まるものは許容 129 | regex: '^[A-Z]|^[a-z]|^CSM_|^csm|^iterator', 130 | match: true, 131 | }, 132 | modifiers: ['exported'] 133 | }, 134 | { 135 | selector: 'typeAlias', 136 | format: ['camelCase'], 137 | }, 138 | { 139 | selector: 'typeParameter', 140 | format: [], 141 | custom: 142 | { 143 | // 「大文字+アンダースコア以外の文字」、あるいは「大文字1文字」 144 | // あるいは、「`T`+アンダースコア」で始まる場合 145 | regex: '^[A-Z][^_]|^[A-Z]|^T_$', 146 | match: true, 147 | }, 148 | leadingUnderscore: 'allow', 149 | }, 150 | ], // @typescript-eslint/naming-convention 151 | '@typescript-eslint/no-use-before-define': 'off', 152 | '@typescript-eslint/ban-ts-comment': 'off', 153 | '@typescript-eslint/unbound-method': 'off', 154 | '@typescript-eslint/no-unsafe-assignment': 'off', 155 | '@typescript-eslint/no-unsafe-return': 'off', 156 | '@typescript-eslint/no-floating-promises': 'off', 157 | '@typescript-eslint/no-unused-vars': 'off', 158 | '@typescript-eslint/no-explicit-any': 'off', 159 | }, 160 | }, 161 | { 162 | // ignores property はなぜか単独で指定していないと効果がない。 163 | ignores: [ 164 | '**/*.*', 165 | '!src/**/*.ts', 166 | ], 167 | }, 168 | ); 169 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | TypeScript HTML App 7 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "start": "node copy_resources.js && vite --host", 5 | "build": "tsc --noEmit && node copy_resources.js && vite build --mode development", 6 | "build:prod": "node copy_resources.js && vite build", 7 | "copy_resources": "node copy_resources.js", 8 | "test": "tsc --noEmit", 9 | "lint": "eslint", 10 | "lint:fix": "eslint --fix", 11 | "serve": "vite preview --port 5000 --host", 12 | "clean": "rimraf dist" 13 | }, 14 | "devDependencies": { 15 | "@eslint/js": "^9.26.0", 16 | "eslint": "^9.26.0", 17 | "eslint-config-prettier": "^10.1.5", 18 | "eslint-plugin-prettier": "^5.4.0", 19 | "prettier": "^3.5.3", 20 | "rimraf": "^6.0.1", 21 | "typescript": "^5.8.3", 22 | "typescript-eslint": "^8.32.0", 23 | "vite": "^6.3.5" 24 | }, 25 | "optionalDependencies": { 26 | "fsevents": "*" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/public/.gitignore: -------------------------------------------------------------------------------- 1 | /Core/ 2 | /Resources/ 3 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/lappdefine.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | import { LogLevel } from '@framework/live2dcubismframework'; 9 | 10 | /** 11 | * Sample Appで使用する定数 12 | */ 13 | 14 | // Canvas width and height pixel values, or dynamic screen size ('auto'). 15 | export const CanvasSize: { width: number; height: number } | 'auto' = 'auto'; 16 | 17 | // キャンバスの数 18 | export const CanvasNum = 1; 19 | 20 | // 画面 21 | export const ViewScale = 1.0; 22 | export const ViewMaxScale = 2.0; 23 | export const ViewMinScale = 0.8; 24 | 25 | export const ViewLogicalLeft = -1.0; 26 | export const ViewLogicalRight = 1.0; 27 | export const ViewLogicalBottom = -1.0; 28 | export const ViewLogicalTop = 1.0; 29 | 30 | export const ViewLogicalMaxLeft = -2.0; 31 | export const ViewLogicalMaxRight = 2.0; 32 | export const ViewLogicalMaxBottom = -2.0; 33 | export const ViewLogicalMaxTop = 2.0; 34 | 35 | // 相対パス 36 | export const ResourcesPath = '../../Resources/'; 37 | 38 | // モデルの後ろにある背景の画像ファイル 39 | export const BackImageName = 'back_class_normal.png'; 40 | 41 | // 歯車 42 | export const GearImageName = 'icon_gear.png'; 43 | 44 | // 終了ボタン 45 | export const PowerImageName = 'CloseNormal.png'; 46 | 47 | // モデル定義--------------------------------------------- 48 | // モデルを配置したディレクトリ名の配列 49 | // ディレクトリ名とmodel3.jsonの名前を一致させておくこと 50 | export const ModelDir: string[] = [ 51 | 'Haru', 52 | 'Hiyori', 53 | 'Mark', 54 | 'Natori', 55 | 'Rice', 56 | 'Mao', 57 | 'Wanko' 58 | ]; 59 | export const ModelDirSize: number = ModelDir.length; 60 | 61 | // 外部定義ファイル(json)と合わせる 62 | export const MotionGroupIdle = 'Idle'; // アイドリング 63 | export const MotionGroupTapBody = 'TapBody'; // 体をタップしたとき 64 | 65 | // 外部定義ファイル(json)と合わせる 66 | export const HitAreaNameHead = 'Head'; 67 | export const HitAreaNameBody = 'Body'; 68 | 69 | // モーションの優先度定数 70 | export const PriorityNone = 0; 71 | export const PriorityIdle = 1; 72 | export const PriorityNormal = 2; 73 | export const PriorityForce = 3; 74 | 75 | // MOC3の整合性検証オプション 76 | export const MOCConsistencyValidationEnable = true; 77 | // motion3.jsonの整合性検証オプション 78 | export const MotionConsistencyValidationEnable = true; 79 | 80 | // デバッグ用ログの表示オプション 81 | export const DebugLogEnable = true; 82 | export const DebugTouchLogEnable = false; 83 | 84 | // Frameworkから出力するログのレベル設定 85 | export const CubismLoggingLevel: LogLevel = LogLevel.LogLevel_Verbose; 86 | 87 | // デフォルトのレンダーターゲットサイズ 88 | export const RenderTargetWidth = 1900; 89 | export const RenderTargetHeight = 1000; 90 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/lappdelegate.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | import { csmVector } from '@framework/type/csmvector'; 9 | import { CubismFramework, Option } from '@framework/live2dcubismframework'; 10 | import * as LAppDefine from './lappdefine'; 11 | import { LAppPal } from './lapppal'; 12 | import { LAppSubdelegate } from './lappsubdelegate'; 13 | import { CubismLogError } from '@framework/utils/cubismdebug'; 14 | 15 | export let s_instance: LAppDelegate = null; 16 | 17 | /** 18 | * アプリケーションクラス。 19 | * Cubism SDKの管理を行う。 20 | */ 21 | export class LAppDelegate { 22 | /** 23 | * クラスのインスタンス(シングルトン)を返す。 24 | * インスタンスが生成されていない場合は内部でインスタンスを生成する。 25 | * 26 | * @return クラスのインスタンス 27 | */ 28 | public static getInstance(): LAppDelegate { 29 | if (s_instance == null) { 30 | s_instance = new LAppDelegate(); 31 | } 32 | 33 | return s_instance; 34 | } 35 | 36 | /** 37 | * クラスのインスタンス(シングルトン)を解放する。 38 | */ 39 | public static releaseInstance(): void { 40 | if (s_instance != null) { 41 | s_instance.release(); 42 | } 43 | 44 | s_instance = null; 45 | } 46 | 47 | /** 48 | * ポインタがアクティブになるときに呼ばれる。 49 | */ 50 | private onPointerBegan(e: PointerEvent): void { 51 | for ( 52 | let ite = this._subdelegates.begin(); 53 | ite.notEqual(this._subdelegates.end()); 54 | ite.preIncrement() 55 | ) { 56 | ite.ptr().onPointBegan(e.pageX, e.pageY); 57 | } 58 | } 59 | 60 | /** 61 | * ポインタが動いたら呼ばれる。 62 | */ 63 | private onPointerMoved(e: PointerEvent): void { 64 | for ( 65 | let ite = this._subdelegates.begin(); 66 | ite.notEqual(this._subdelegates.end()); 67 | ite.preIncrement() 68 | ) { 69 | ite.ptr().onPointMoved(e.pageX, e.pageY); 70 | } 71 | } 72 | 73 | /** 74 | * ポインタがアクティブでなくなったときに呼ばれる。 75 | */ 76 | private onPointerEnded(e: PointerEvent): void { 77 | for ( 78 | let ite = this._subdelegates.begin(); 79 | ite.notEqual(this._subdelegates.end()); 80 | ite.preIncrement() 81 | ) { 82 | ite.ptr().onPointEnded(e.pageX, e.pageY); 83 | } 84 | } 85 | 86 | /** 87 | * ポインタがキャンセルされると呼ばれる。 88 | */ 89 | private onPointerCancel(e: PointerEvent): void { 90 | for ( 91 | let ite = this._subdelegates.begin(); 92 | ite.notEqual(this._subdelegates.end()); 93 | ite.preIncrement() 94 | ) { 95 | ite.ptr().onTouchCancel(e.pageX, e.pageY); 96 | } 97 | } 98 | 99 | /** 100 | * Resize canvas and re-initialize view. 101 | */ 102 | public onResize(): void { 103 | for (let i = 0; i < this._subdelegates.getSize(); i++) { 104 | this._subdelegates.at(i).onResize(); 105 | } 106 | } 107 | 108 | /** 109 | * 実行処理。 110 | */ 111 | public run(): void { 112 | // メインループ 113 | const loop = (): void => { 114 | // インスタンスの有無の確認 115 | if (s_instance == null) { 116 | return; 117 | } 118 | 119 | // 時間更新 120 | LAppPal.updateTime(); 121 | 122 | for (let i = 0; i < this._subdelegates.getSize(); i++) { 123 | this._subdelegates.at(i).update(); 124 | } 125 | 126 | // ループのために再帰呼び出し 127 | requestAnimationFrame(loop); 128 | }; 129 | loop(); 130 | } 131 | 132 | /** 133 | * 解放する。 134 | */ 135 | private release(): void { 136 | this.releaseEventListener(); 137 | this.releaseSubdelegates(); 138 | 139 | // Cubism SDKの解放 140 | CubismFramework.dispose(); 141 | 142 | this._cubismOption = null; 143 | } 144 | 145 | /** 146 | * イベントリスナーを解除する。 147 | */ 148 | private releaseEventListener(): void { 149 | document.removeEventListener('pointerup', this.pointBeganEventListener); 150 | this.pointBeganEventListener = null; 151 | document.removeEventListener('pointermove', this.pointMovedEventListener); 152 | this.pointMovedEventListener = null; 153 | document.removeEventListener('pointerdown', this.pointEndedEventListener); 154 | this.pointEndedEventListener = null; 155 | document.removeEventListener('pointerdown', this.pointCancelEventListener); 156 | this.pointCancelEventListener = null; 157 | } 158 | 159 | /** 160 | * Subdelegate を解放する 161 | */ 162 | private releaseSubdelegates(): void { 163 | for ( 164 | let ite = this._subdelegates.begin(); 165 | ite.notEqual(this._subdelegates.end()); 166 | ite.preIncrement() 167 | ) { 168 | ite.ptr().release(); 169 | } 170 | 171 | this._subdelegates.clear(); 172 | this._subdelegates = null; 173 | } 174 | 175 | /** 176 | * APPに必要な物を初期化する。 177 | */ 178 | public initialize(): boolean { 179 | // Cubism SDKの初期化 180 | this.initializeCubism(); 181 | 182 | this.initializeSubdelegates(); 183 | this.initializeEventListener(); 184 | 185 | return true; 186 | } 187 | 188 | /** 189 | * イベントリスナーを設定する。 190 | */ 191 | private initializeEventListener(): void { 192 | this.pointBeganEventListener = this.onPointerBegan.bind(this); 193 | this.pointMovedEventListener = this.onPointerMoved.bind(this); 194 | this.pointEndedEventListener = this.onPointerEnded.bind(this); 195 | this.pointCancelEventListener = this.onPointerCancel.bind(this); 196 | 197 | // ポインタ関連コールバック関数登録 198 | document.addEventListener('pointerdown', this.pointBeganEventListener, { 199 | passive: true 200 | }); 201 | document.addEventListener('pointermove', this.pointMovedEventListener, { 202 | passive: true 203 | }); 204 | document.addEventListener('pointerup', this.pointEndedEventListener, { 205 | passive: true 206 | }); 207 | document.addEventListener('pointercancel', this.pointCancelEventListener, { 208 | passive: true 209 | }); 210 | } 211 | 212 | /** 213 | * Cubism SDKの初期化 214 | */ 215 | private initializeCubism(): void { 216 | LAppPal.updateTime(); 217 | 218 | // setup cubism 219 | this._cubismOption.logFunction = LAppPal.printMessage; 220 | this._cubismOption.loggingLevel = LAppDefine.CubismLoggingLevel; 221 | CubismFramework.startUp(this._cubismOption); 222 | 223 | // initialize cubism 224 | CubismFramework.initialize(); 225 | } 226 | 227 | /** 228 | * Canvasを生成配置、Subdelegateを初期化する 229 | */ 230 | private initializeSubdelegates(): void { 231 | let width: number = 100; 232 | let height: number = 100; 233 | if (LAppDefine.CanvasNum > 3) { 234 | const widthunit: number = Math.ceil(Math.sqrt(LAppDefine.CanvasNum)); 235 | const heightUnit = Math.ceil(LAppDefine.CanvasNum / widthunit); 236 | width = 100.0 / widthunit; 237 | height = 100.0 / heightUnit; 238 | } else { 239 | width = 100.0 / LAppDefine.CanvasNum; 240 | } 241 | 242 | this._canvases.prepareCapacity(LAppDefine.CanvasNum); 243 | this._subdelegates.prepareCapacity(LAppDefine.CanvasNum); 244 | for (let i = 0; i < LAppDefine.CanvasNum; i++) { 245 | const canvas = document.createElement('canvas'); 246 | this._canvases.pushBack(canvas); 247 | canvas.style.width = `${width}vw`; 248 | canvas.style.height = `${height}vh`; 249 | 250 | // キャンバスを DOM に追加 251 | document.body.appendChild(canvas); 252 | } 253 | 254 | for (let i = 0; i < this._canvases.getSize(); i++) { 255 | const subdelegate = new LAppSubdelegate(); 256 | subdelegate.initialize(this._canvases.at(i)); 257 | this._subdelegates.pushBack(subdelegate); 258 | } 259 | 260 | for (let i = 0; i < LAppDefine.CanvasNum; i++) { 261 | if (this._subdelegates.at(i).isContextLost()) { 262 | CubismLogError( 263 | `The context for Canvas at index ${i} was lost, possibly because the acquisition limit for WebGLRenderingContext was reached.` 264 | ); 265 | } 266 | } 267 | } 268 | 269 | /** 270 | * Privateなコンストラクタ 271 | */ 272 | private constructor() { 273 | this._cubismOption = new Option(); 274 | this._subdelegates = new csmVector(); 275 | this._canvases = new csmVector(); 276 | } 277 | 278 | /** 279 | * Cubism SDK Option 280 | */ 281 | private _cubismOption: Option; 282 | 283 | /** 284 | * 操作対象のcanvas要素 285 | */ 286 | private _canvases: csmVector; 287 | 288 | /** 289 | * Subdelegate 290 | */ 291 | private _subdelegates: csmVector; 292 | 293 | /** 294 | * 登録済みイベントリスナー 関数オブジェクト 295 | */ 296 | private pointBeganEventListener: (this: Document, ev: PointerEvent) => void; 297 | 298 | /** 299 | * 登録済みイベントリスナー 関数オブジェクト 300 | */ 301 | private pointMovedEventListener: (this: Document, ev: PointerEvent) => void; 302 | 303 | /** 304 | * 登録済みイベントリスナー 関数オブジェクト 305 | */ 306 | private pointEndedEventListener: (this: Document, ev: PointerEvent) => void; 307 | 308 | /** 309 | * 登録済みイベントリスナー 関数オブジェクト 310 | */ 311 | private pointCancelEventListener: (this: Document, ev: PointerEvent) => void; 312 | } 313 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/lappglmanager.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | /** 9 | * Cubism SDKのサンプルで使用するWebGLを管理するクラス 10 | */ 11 | export class LAppGlManager { 12 | public constructor() { 13 | this._gl = null; 14 | } 15 | 16 | public initialize(canvas: HTMLCanvasElement): boolean { 17 | // glコンテキストを初期化 18 | this._gl = canvas.getContext('webgl2'); 19 | 20 | if (!this._gl) { 21 | // gl初期化失敗 22 | alert('Cannot initialize WebGL. This browser does not support.'); 23 | this._gl = null; 24 | // document.body.innerHTML = 25 | // 'This browser does not support the <canvas> element.'; 26 | return false; 27 | } 28 | return true; 29 | } 30 | 31 | /** 32 | * 解放する。 33 | */ 34 | public release(): void {} 35 | 36 | public getGl(): WebGLRenderingContext | WebGL2RenderingContext { 37 | return this._gl; 38 | } 39 | 40 | private _gl: WebGLRenderingContext | WebGL2RenderingContext = null; 41 | } 42 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/lapplive2dmanager.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | import { CubismMatrix44 } from '@framework/math/cubismmatrix44'; 9 | import { ACubismMotion } from '@framework/motion/acubismmotion'; 10 | import { csmVector } from '@framework/type/csmvector'; 11 | 12 | import * as LAppDefine from './lappdefine'; 13 | import { LAppModel } from './lappmodel'; 14 | import { LAppPal } from './lapppal'; 15 | import { LAppSubdelegate } from './lappsubdelegate'; 16 | 17 | /** 18 | * サンプルアプリケーションにおいてCubismModelを管理するクラス 19 | * モデル生成と破棄、タップイベントの処理、モデル切り替えを行う。 20 | */ 21 | export class LAppLive2DManager { 22 | /** 23 | * 現在のシーンで保持しているすべてのモデルを解放する 24 | */ 25 | private releaseAllModel(): void { 26 | this._models.clear(); 27 | } 28 | 29 | /** 30 | * 画面をドラッグした時の処理 31 | * 32 | * @param x 画面のX座標 33 | * @param y 画面のY座標 34 | */ 35 | public onDrag(x: number, y: number): void { 36 | const model: LAppModel = this._models.at(0); 37 | if (model) { 38 | model.setDragging(x, y); 39 | } 40 | } 41 | 42 | /** 43 | * 画面をタップした時の処理 44 | * 45 | * @param x 画面のX座標 46 | * @param y 画面のY座標 47 | */ 48 | public onTap(x: number, y: number): void { 49 | if (LAppDefine.DebugLogEnable) { 50 | LAppPal.printMessage( 51 | `[APP]tap point: {x: ${x.toFixed(2)} y: ${y.toFixed(2)}}` 52 | ); 53 | } 54 | 55 | const model: LAppModel = this._models.at(0); 56 | 57 | if (model.hitTest(LAppDefine.HitAreaNameHead, x, y)) { 58 | if (LAppDefine.DebugLogEnable) { 59 | LAppPal.printMessage(`[APP]hit area: [${LAppDefine.HitAreaNameHead}]`); 60 | } 61 | model.setRandomExpression(); 62 | } else if (model.hitTest(LAppDefine.HitAreaNameBody, x, y)) { 63 | if (LAppDefine.DebugLogEnable) { 64 | LAppPal.printMessage(`[APP]hit area: [${LAppDefine.HitAreaNameBody}]`); 65 | } 66 | model.startRandomMotion( 67 | LAppDefine.MotionGroupTapBody, 68 | LAppDefine.PriorityNormal, 69 | this.finishedMotion, 70 | this.beganMotion 71 | ); 72 | } 73 | } 74 | 75 | /** 76 | * 画面を更新するときの処理 77 | * モデルの更新処理及び描画処理を行う 78 | */ 79 | public onUpdate(): void { 80 | const { width, height } = this._subdelegate.getCanvas(); 81 | 82 | const projection: CubismMatrix44 = new CubismMatrix44(); 83 | const model: LAppModel = this._models.at(0); 84 | 85 | if (model.getModel()) { 86 | if (model.getModel().getCanvasWidth() > 1.0 && width < height) { 87 | // 横に長いモデルを縦長ウィンドウに表示する際モデルの横サイズでscaleを算出する 88 | model.getModelMatrix().setWidth(2.0); 89 | projection.scale(1.0, width / height); 90 | } else { 91 | projection.scale(height / width, 1.0); 92 | } 93 | 94 | // 必要があればここで乗算 95 | if (this._viewMatrix != null) { 96 | projection.multiplyByMatrix(this._viewMatrix); 97 | } 98 | } 99 | 100 | model.update(); 101 | model.draw(projection); // 参照渡しなのでprojectionは変質する。 102 | } 103 | 104 | /** 105 | * 次のシーンに切りかえる 106 | * サンプルアプリケーションではモデルセットの切り替えを行う。 107 | */ 108 | public nextScene(): void { 109 | const no: number = (this._sceneIndex + 1) % LAppDefine.ModelDirSize; 110 | this.changeScene(no); 111 | } 112 | 113 | /** 114 | * シーンを切り替える 115 | * サンプルアプリケーションではモデルセットの切り替えを行う。 116 | * @param index 117 | */ 118 | private changeScene(index: number): void { 119 | this._sceneIndex = index; 120 | 121 | if (LAppDefine.DebugLogEnable) { 122 | LAppPal.printMessage(`[APP]model index: ${this._sceneIndex}`); 123 | } 124 | 125 | // ModelDir[]に保持したディレクトリ名から 126 | // model3.jsonのパスを決定する。 127 | // ディレクトリ名とmodel3.jsonの名前を一致させておくこと。 128 | const model: string = LAppDefine.ModelDir[index]; 129 | const modelPath: string = LAppDefine.ResourcesPath + model + '/'; 130 | let modelJsonName: string = LAppDefine.ModelDir[index]; 131 | modelJsonName += '.model3.json'; 132 | 133 | this.releaseAllModel(); 134 | const instance = new LAppModel(); 135 | instance.setSubdelegate(this._subdelegate); 136 | instance.loadAssets(modelPath, modelJsonName); 137 | this._models.pushBack(instance); 138 | } 139 | 140 | public setViewMatrix(m: CubismMatrix44) { 141 | for (let i = 0; i < 16; i++) { 142 | this._viewMatrix.getArray()[i] = m.getArray()[i]; 143 | } 144 | } 145 | 146 | /** 147 | * モデルの追加 148 | */ 149 | public addModel(sceneIndex: number = 0): void { 150 | this._sceneIndex = sceneIndex; 151 | this.changeScene(this._sceneIndex); 152 | } 153 | 154 | /** 155 | * コンストラクタ 156 | */ 157 | public constructor() { 158 | this._subdelegate = null; 159 | this._viewMatrix = new CubismMatrix44(); 160 | this._models = new csmVector(); 161 | this._sceneIndex = 0; 162 | } 163 | 164 | /** 165 | * 解放する。 166 | */ 167 | public release(): void {} 168 | 169 | /** 170 | * 初期化する。 171 | * @param subdelegate 172 | */ 173 | public initialize(subdelegate: LAppSubdelegate): void { 174 | this._subdelegate = subdelegate; 175 | this.changeScene(this._sceneIndex); 176 | } 177 | 178 | /** 179 | * 自身が所属するSubdelegate 180 | */ 181 | private _subdelegate: LAppSubdelegate; 182 | 183 | _viewMatrix: CubismMatrix44; // モデル描画に用いるview行列 184 | _models: csmVector; // モデルインスタンスのコンテナ 185 | private _sceneIndex: number; // 表示するシーンのインデックス値 186 | 187 | // モーション再生開始のコールバック関数 188 | beganMotion = (self: ACubismMotion): void => { 189 | LAppPal.printMessage('Motion Began:'); 190 | console.log(self); 191 | }; 192 | // モーション再生終了のコールバック関数 193 | finishedMotion = (self: ACubismMotion): void => { 194 | LAppPal.printMessage('Motion Finished:'); 195 | console.log(self); 196 | }; 197 | } 198 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/lapppal.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | /** 9 | * プラットフォーム依存機能を抽象化する Cubism Platform Abstraction Layer. 10 | * 11 | * ファイル読み込みや時刻取得等のプラットフォームに依存する関数をまとめる。 12 | */ 13 | export class LAppPal { 14 | /** 15 | * ファイルをバイトデータとして読みこむ 16 | * 17 | * @param filePath 読み込み対象ファイルのパス 18 | * @return 19 | * { 20 | * buffer, 読み込んだバイトデータ 21 | * size ファイルサイズ 22 | * } 23 | */ 24 | public static loadFileAsBytes( 25 | filePath: string, 26 | callback: (arrayBuffer: ArrayBuffer, size: number) => void 27 | ): void { 28 | fetch(filePath) 29 | .then(response => response.arrayBuffer()) 30 | .then(arrayBuffer => callback(arrayBuffer, arrayBuffer.byteLength)); 31 | } 32 | 33 | /** 34 | * デルタ時間(前回フレームとの差分)を取得する 35 | * @return デルタ時間[ms] 36 | */ 37 | public static getDeltaTime(): number { 38 | return this.deltaTime; 39 | } 40 | 41 | public static updateTime(): void { 42 | this.currentFrame = Date.now(); 43 | this.deltaTime = (this.currentFrame - this.lastFrame) / 1000; 44 | this.lastFrame = this.currentFrame; 45 | } 46 | 47 | /** 48 | * メッセージを出力する 49 | * @param message 文字列 50 | */ 51 | public static printMessage(message: string): void { 52 | console.log(message); 53 | } 54 | 55 | static lastUpdate = Date.now(); 56 | 57 | static currentFrame = 0.0; 58 | static lastFrame = 0.0; 59 | static deltaTime = 0.0; 60 | } 61 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/lappsprite.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | import { LAppSubdelegate } from './lappsubdelegate'; 9 | 10 | /** 11 | * スプライトを実装するクラス 12 | * 13 | * テクスチャID、Rectの管理 14 | */ 15 | export class LAppSprite { 16 | /** 17 | * コンストラクタ 18 | * @param x x座標 19 | * @param y y座標 20 | * @param width 横幅 21 | * @param height 高さ 22 | * @param textureId テクスチャ 23 | */ 24 | public constructor( 25 | x: number, 26 | y: number, 27 | width: number, 28 | height: number, 29 | textureId: WebGLTexture 30 | ) { 31 | this._rect = new Rect(); 32 | this._rect.left = x - width * 0.5; 33 | this._rect.right = x + width * 0.5; 34 | this._rect.up = y + height * 0.5; 35 | this._rect.down = y - height * 0.5; 36 | this._texture = textureId; 37 | this._vertexBuffer = null; 38 | this._uvBuffer = null; 39 | this._indexBuffer = null; 40 | 41 | this._positionLocation = null; 42 | this._uvLocation = null; 43 | this._textureLocation = null; 44 | 45 | this._positionArray = null; 46 | this._uvArray = null; 47 | this._indexArray = null; 48 | 49 | this._firstDraw = true; 50 | } 51 | 52 | /** 53 | * 解放する。 54 | */ 55 | public release(): void { 56 | this._rect = null; 57 | 58 | const gl = this._subdelegate.getGlManager().getGl(); 59 | 60 | gl.deleteTexture(this._texture); 61 | this._texture = null; 62 | 63 | gl.deleteBuffer(this._uvBuffer); 64 | this._uvBuffer = null; 65 | 66 | gl.deleteBuffer(this._vertexBuffer); 67 | this._vertexBuffer = null; 68 | 69 | gl.deleteBuffer(this._indexBuffer); 70 | this._indexBuffer = null; 71 | } 72 | 73 | /** 74 | * テクスチャを返す 75 | */ 76 | public getTexture(): WebGLTexture { 77 | return this._texture; 78 | } 79 | 80 | /** 81 | * 描画する。 82 | * @param programId シェーダープログラム 83 | * @param canvas 描画するキャンパス情報 84 | */ 85 | public render(programId: WebGLProgram): void { 86 | if (this._texture == null) { 87 | // ロードが完了していない 88 | return; 89 | } 90 | 91 | const gl = this._subdelegate.getGlManager().getGl(); 92 | 93 | // 初回描画時 94 | if (this._firstDraw) { 95 | // 何番目のattribute変数か取得 96 | this._positionLocation = gl.getAttribLocation(programId, 'position'); 97 | gl.enableVertexAttribArray(this._positionLocation); 98 | 99 | this._uvLocation = gl.getAttribLocation(programId, 'uv'); 100 | gl.enableVertexAttribArray(this._uvLocation); 101 | 102 | // 何番目のuniform変数か取得 103 | this._textureLocation = gl.getUniformLocation(programId, 'texture'); 104 | 105 | // uniform属性の登録 106 | gl.uniform1i(this._textureLocation, 0); 107 | 108 | // uvバッファ、座標初期化 109 | { 110 | this._uvArray = new Float32Array([ 111 | 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 112 | ]); 113 | 114 | // uvバッファを作成 115 | this._uvBuffer = gl.createBuffer(); 116 | } 117 | 118 | // 頂点バッファ、座標初期化 119 | { 120 | const maxWidth = this._subdelegate.getCanvas().width; 121 | const maxHeight = this._subdelegate.getCanvas().height; 122 | 123 | // 頂点データ 124 | this._positionArray = new Float32Array([ 125 | (this._rect.right - maxWidth * 0.5) / (maxWidth * 0.5), 126 | (this._rect.up - maxHeight * 0.5) / (maxHeight * 0.5), 127 | (this._rect.left - maxWidth * 0.5) / (maxWidth * 0.5), 128 | (this._rect.up - maxHeight * 0.5) / (maxHeight * 0.5), 129 | (this._rect.left - maxWidth * 0.5) / (maxWidth * 0.5), 130 | (this._rect.down - maxHeight * 0.5) / (maxHeight * 0.5), 131 | (this._rect.right - maxWidth * 0.5) / (maxWidth * 0.5), 132 | (this._rect.down - maxHeight * 0.5) / (maxHeight * 0.5) 133 | ]); 134 | 135 | // 頂点バッファを作成 136 | this._vertexBuffer = gl.createBuffer(); 137 | } 138 | 139 | // 頂点インデックスバッファ、初期化 140 | { 141 | // インデックスデータ 142 | this._indexArray = new Uint16Array([0, 1, 2, 3, 2, 0]); 143 | 144 | // インデックスバッファを作成 145 | this._indexBuffer = gl.createBuffer(); 146 | } 147 | 148 | this._firstDraw = false; 149 | } 150 | 151 | // UV座標登録 152 | gl.bindBuffer(gl.ARRAY_BUFFER, this._uvBuffer); 153 | gl.bufferData(gl.ARRAY_BUFFER, this._uvArray, gl.STATIC_DRAW); 154 | 155 | // attribute属性を登録 156 | gl.vertexAttribPointer(this._uvLocation, 2, gl.FLOAT, false, 0, 0); 157 | 158 | // 頂点座標を登録 159 | gl.bindBuffer(gl.ARRAY_BUFFER, this._vertexBuffer); 160 | gl.bufferData(gl.ARRAY_BUFFER, this._positionArray, gl.STATIC_DRAW); 161 | 162 | // attribute属性を登録 163 | gl.vertexAttribPointer(this._positionLocation, 2, gl.FLOAT, false, 0, 0); 164 | 165 | // 頂点インデックスを作成 166 | gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indexBuffer); 167 | gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this._indexArray, gl.DYNAMIC_DRAW); 168 | 169 | // モデルの描画 170 | gl.bindTexture(gl.TEXTURE_2D, this._texture); 171 | gl.drawElements( 172 | gl.TRIANGLES, 173 | this._indexArray.length, 174 | gl.UNSIGNED_SHORT, 175 | 0 176 | ); 177 | } 178 | 179 | /** 180 | * 当たり判定 181 | * @param pointX x座標 182 | * @param pointY y座標 183 | */ 184 | public isHit(pointX: number, pointY: number): boolean { 185 | // 画面サイズを取得する。 186 | const { height } = this._subdelegate.getCanvas(); 187 | 188 | // Y座標は変換する必要あり 189 | const y = height - pointY; 190 | 191 | return ( 192 | pointX >= this._rect.left && 193 | pointX <= this._rect.right && 194 | y <= this._rect.up && 195 | y >= this._rect.down 196 | ); 197 | } 198 | 199 | /** 200 | * setter 201 | * @param subdelegate 202 | */ 203 | public setSubdelegate(subdelegate: LAppSubdelegate): void { 204 | this._subdelegate = subdelegate; 205 | } 206 | 207 | _texture: WebGLTexture; // テクスチャ 208 | _vertexBuffer: WebGLBuffer; // 頂点バッファ 209 | _uvBuffer: WebGLBuffer; // uv頂点バッファ 210 | _indexBuffer: WebGLBuffer; // 頂点インデックスバッファ 211 | _rect: Rect; // 矩形 212 | 213 | _positionLocation: number; 214 | _uvLocation: number; 215 | _textureLocation: WebGLUniformLocation; 216 | 217 | _positionArray: Float32Array; 218 | _uvArray: Float32Array; 219 | _indexArray: Uint16Array; 220 | 221 | _firstDraw: boolean; 222 | 223 | private _subdelegate: LAppSubdelegate; 224 | } 225 | 226 | export class Rect { 227 | public left: number; // 左辺 228 | public right: number; // 右辺 229 | public up: number; // 上辺 230 | public down: number; // 下辺 231 | } 232 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/lapptexturemanager.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | import { csmVector, iterator } from '@framework/type/csmvector'; 9 | import { LAppGlManager } from './lappglmanager'; 10 | 11 | /** 12 | * テクスチャ管理クラス 13 | * 画像読み込み、管理を行うクラス。 14 | */ 15 | export class LAppTextureManager { 16 | /** 17 | * コンストラクタ 18 | */ 19 | public constructor() { 20 | this._textures = new csmVector(); 21 | } 22 | 23 | /** 24 | * 解放する。 25 | */ 26 | public release(): void { 27 | for ( 28 | let ite: iterator = this._textures.begin(); 29 | ite.notEqual(this._textures.end()); 30 | ite.preIncrement() 31 | ) { 32 | this._glManager.getGl().deleteTexture(ite.ptr().id); 33 | } 34 | this._textures = null; 35 | } 36 | 37 | /** 38 | * 画像読み込み 39 | * 40 | * @param fileName 読み込む画像ファイルパス名 41 | * @param usePremultiply Premult処理を有効にするか 42 | * @return 画像情報、読み込み失敗時はnullを返す 43 | */ 44 | public createTextureFromPngFile( 45 | fileName: string, 46 | usePremultiply: boolean, 47 | callback: (textureInfo: TextureInfo) => void 48 | ): void { 49 | // search loaded texture already 50 | for ( 51 | let ite: iterator = this._textures.begin(); 52 | ite.notEqual(this._textures.end()); 53 | ite.preIncrement() 54 | ) { 55 | if ( 56 | ite.ptr().fileName == fileName && 57 | ite.ptr().usePremultply == usePremultiply 58 | ) { 59 | // 2回目以降はキャッシュが使用される(待ち時間なし) 60 | // WebKitでは同じImageのonloadを再度呼ぶには再インスタンスが必要 61 | // 詳細:https://stackoverflow.com/a/5024181 62 | ite.ptr().img = new Image(); 63 | ite 64 | .ptr() 65 | .img.addEventListener('load', (): void => callback(ite.ptr()), { 66 | passive: true 67 | }); 68 | ite.ptr().img.src = fileName; 69 | return; 70 | } 71 | } 72 | 73 | // データのオンロードをトリガーにする 74 | const img = new Image(); 75 | img.addEventListener( 76 | 'load', 77 | (): void => { 78 | // テクスチャオブジェクトの作成 79 | const tex: WebGLTexture = this._glManager.getGl().createTexture(); 80 | 81 | // テクスチャを選択 82 | this._glManager 83 | .getGl() 84 | .bindTexture(this._glManager.getGl().TEXTURE_2D, tex); 85 | 86 | // テクスチャにピクセルを書き込む 87 | this._glManager 88 | .getGl() 89 | .texParameteri( 90 | this._glManager.getGl().TEXTURE_2D, 91 | this._glManager.getGl().TEXTURE_MIN_FILTER, 92 | this._glManager.getGl().LINEAR_MIPMAP_LINEAR 93 | ); 94 | this._glManager 95 | .getGl() 96 | .texParameteri( 97 | this._glManager.getGl().TEXTURE_2D, 98 | this._glManager.getGl().TEXTURE_MAG_FILTER, 99 | this._glManager.getGl().LINEAR 100 | ); 101 | 102 | // Premult処理を行わせる 103 | if (usePremultiply) { 104 | this._glManager 105 | .getGl() 106 | .pixelStorei( 107 | this._glManager.getGl().UNPACK_PREMULTIPLY_ALPHA_WEBGL, 108 | 1 109 | ); 110 | } 111 | 112 | // テクスチャにピクセルを書き込む 113 | this._glManager 114 | .getGl() 115 | .texImage2D( 116 | this._glManager.getGl().TEXTURE_2D, 117 | 0, 118 | this._glManager.getGl().RGBA, 119 | this._glManager.getGl().RGBA, 120 | this._glManager.getGl().UNSIGNED_BYTE, 121 | img 122 | ); 123 | 124 | // ミップマップを生成 125 | this._glManager 126 | .getGl() 127 | .generateMipmap(this._glManager.getGl().TEXTURE_2D); 128 | 129 | // テクスチャをバインド 130 | this._glManager 131 | .getGl() 132 | .bindTexture(this._glManager.getGl().TEXTURE_2D, null); 133 | 134 | const textureInfo: TextureInfo = new TextureInfo(); 135 | if (textureInfo != null) { 136 | textureInfo.fileName = fileName; 137 | textureInfo.width = img.width; 138 | textureInfo.height = img.height; 139 | textureInfo.id = tex; 140 | textureInfo.img = img; 141 | textureInfo.usePremultply = usePremultiply; 142 | if (this._textures != null) { 143 | this._textures.pushBack(textureInfo); 144 | } 145 | } 146 | 147 | callback(textureInfo); 148 | }, 149 | { passive: true } 150 | ); 151 | img.src = fileName; 152 | } 153 | 154 | /** 155 | * 画像の解放 156 | * 157 | * 配列に存在する画像全てを解放する。 158 | */ 159 | public releaseTextures(): void { 160 | for (let i = 0; i < this._textures.getSize(); i++) { 161 | this._glManager.getGl().deleteTexture(this._textures.at(i).id); 162 | this._textures.set(i, null); 163 | } 164 | 165 | this._textures.clear(); 166 | } 167 | 168 | /** 169 | * 画像の解放 170 | * 171 | * 指定したテクスチャの画像を解放する。 172 | * @param texture 解放するテクスチャ 173 | */ 174 | public releaseTextureByTexture(texture: WebGLTexture): void { 175 | for (let i = 0; i < this._textures.getSize(); i++) { 176 | if (this._textures.at(i).id != texture) { 177 | continue; 178 | } 179 | 180 | this._glManager.getGl().deleteTexture(this._textures.at(i).id); 181 | this._textures.set(i, null); 182 | this._textures.remove(i); 183 | break; 184 | } 185 | } 186 | 187 | /** 188 | * 画像の解放 189 | * 190 | * 指定した名前の画像を解放する。 191 | * @param fileName 解放する画像ファイルパス名 192 | */ 193 | public releaseTextureByFilePath(fileName: string): void { 194 | for (let i = 0; i < this._textures.getSize(); i++) { 195 | if (this._textures.at(i).fileName == fileName) { 196 | this._glManager.getGl().deleteTexture(this._textures.at(i).id); 197 | this._textures.set(i, null); 198 | this._textures.remove(i); 199 | break; 200 | } 201 | } 202 | } 203 | 204 | /** 205 | * setter 206 | * @param glManager 207 | */ 208 | public setGlManager(glManager: LAppGlManager): void { 209 | this._glManager = glManager; 210 | } 211 | 212 | _textures: csmVector; 213 | private _glManager: LAppGlManager; 214 | } 215 | 216 | /** 217 | * 画像情報構造体 218 | */ 219 | export class TextureInfo { 220 | img: HTMLImageElement; // 画像 221 | id: WebGLTexture = null; // テクスチャ 222 | width = 0; // 横幅 223 | height = 0; // 高さ 224 | usePremultply: boolean; // Premult処理を有効にするか 225 | fileName: string; // ファイル名 226 | } 227 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/lappview.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | import { CubismMatrix44 } from '@framework/math/cubismmatrix44'; 9 | import { CubismViewMatrix } from '@framework/math/cubismviewmatrix'; 10 | 11 | import * as LAppDefine from './lappdefine'; 12 | import { LAppDelegate } from './lappdelegate'; 13 | import { LAppPal } from './lapppal'; 14 | import { LAppSprite } from './lappsprite'; 15 | import { TextureInfo } from './lapptexturemanager'; 16 | import { TouchManager } from './touchmanager'; 17 | import { LAppSubdelegate } from './lappsubdelegate'; 18 | 19 | /** 20 | * 描画クラス。 21 | */ 22 | export class LAppView { 23 | /** 24 | * コンストラクタ 25 | */ 26 | public constructor() { 27 | this._programId = null; 28 | this._back = null; 29 | this._gear = null; 30 | 31 | // タッチ関係のイベント管理 32 | this._touchManager = new TouchManager(); 33 | 34 | // デバイス座標からスクリーン座標に変換するための 35 | this._deviceToScreen = new CubismMatrix44(); 36 | 37 | // 画面の表示の拡大縮小や移動の変換を行う行列 38 | this._viewMatrix = new CubismViewMatrix(); 39 | } 40 | 41 | /** 42 | * 初期化する。 43 | */ 44 | public initialize(subdelegate: LAppSubdelegate): void { 45 | this._subdelegate = subdelegate; 46 | const { width, height } = subdelegate.getCanvas(); 47 | 48 | const ratio: number = width / height; 49 | const left: number = -ratio; 50 | const right: number = ratio; 51 | const bottom: number = LAppDefine.ViewLogicalLeft; 52 | const top: number = LAppDefine.ViewLogicalRight; 53 | 54 | this._viewMatrix.setScreenRect(left, right, bottom, top); // デバイスに対応する画面の範囲。 Xの左端、Xの右端、Yの下端、Yの上端 55 | this._viewMatrix.scale(LAppDefine.ViewScale, LAppDefine.ViewScale); 56 | 57 | this._deviceToScreen.loadIdentity(); 58 | if (width > height) { 59 | const screenW: number = Math.abs(right - left); 60 | this._deviceToScreen.scaleRelative(screenW / width, -screenW / width); 61 | } else { 62 | const screenH: number = Math.abs(top - bottom); 63 | this._deviceToScreen.scaleRelative(screenH / height, -screenH / height); 64 | } 65 | this._deviceToScreen.translateRelative(-width * 0.5, -height * 0.5); 66 | 67 | // 表示範囲の設定 68 | this._viewMatrix.setMaxScale(LAppDefine.ViewMaxScale); // 限界拡張率 69 | this._viewMatrix.setMinScale(LAppDefine.ViewMinScale); // 限界縮小率 70 | 71 | // 表示できる最大範囲 72 | this._viewMatrix.setMaxScreenRect( 73 | LAppDefine.ViewLogicalMaxLeft, 74 | LAppDefine.ViewLogicalMaxRight, 75 | LAppDefine.ViewLogicalMaxBottom, 76 | LAppDefine.ViewLogicalMaxTop 77 | ); 78 | } 79 | 80 | /** 81 | * 解放する 82 | */ 83 | public release(): void { 84 | this._viewMatrix = null; 85 | this._touchManager = null; 86 | this._deviceToScreen = null; 87 | 88 | this._gear.release(); 89 | this._gear = null; 90 | 91 | this._back.release(); 92 | this._back = null; 93 | 94 | this._subdelegate.getGlManager().getGl().deleteProgram(this._programId); 95 | this._programId = null; 96 | } 97 | 98 | /** 99 | * 描画する。 100 | */ 101 | public render(): void { 102 | this._subdelegate.getGlManager().getGl().useProgram(this._programId); 103 | 104 | if (this._back) { 105 | this._back.render(this._programId); 106 | } 107 | if (this._gear) { 108 | this._gear.render(this._programId); 109 | } 110 | 111 | this._subdelegate.getGlManager().getGl().flush(); 112 | 113 | const lapplive2dmanager = this._subdelegate.getLive2DManager(); 114 | if (lapplive2dmanager != null) { 115 | lapplive2dmanager.setViewMatrix(this._viewMatrix); 116 | 117 | lapplive2dmanager.onUpdate(); 118 | } 119 | } 120 | 121 | /** 122 | * 画像の初期化を行う。 123 | */ 124 | public initializeSprite(): void { 125 | const width: number = this._subdelegate.getCanvas().width; 126 | const height: number = this._subdelegate.getCanvas().height; 127 | const textureManager = this._subdelegate.getTextureManager(); 128 | const resourcesPath = LAppDefine.ResourcesPath; 129 | 130 | let imageName = ''; 131 | 132 | // 背景画像初期化 133 | imageName = LAppDefine.BackImageName; 134 | 135 | // 非同期なのでコールバック関数を作成 136 | const initBackGroundTexture = (textureInfo: TextureInfo): void => { 137 | const x: number = width * 0.5; 138 | const y: number = height * 0.5; 139 | 140 | const fwidth = textureInfo.width * 2.0; 141 | const fheight = height * 0.95; 142 | this._back = new LAppSprite(x, y, fwidth, fheight, textureInfo.id); 143 | this._back.setSubdelegate(this._subdelegate); 144 | }; 145 | 146 | textureManager.createTextureFromPngFile( 147 | resourcesPath + imageName, 148 | false, 149 | initBackGroundTexture 150 | ); 151 | 152 | // 歯車画像初期化 153 | imageName = LAppDefine.GearImageName; 154 | const initGearTexture = (textureInfo: TextureInfo): void => { 155 | const x = width - textureInfo.width * 0.5; 156 | const y = height - textureInfo.height * 0.5; 157 | const fwidth = textureInfo.width; 158 | const fheight = textureInfo.height; 159 | this._gear = new LAppSprite(x, y, fwidth, fheight, textureInfo.id); 160 | this._gear.setSubdelegate(this._subdelegate); 161 | }; 162 | 163 | textureManager.createTextureFromPngFile( 164 | resourcesPath + imageName, 165 | false, 166 | initGearTexture 167 | ); 168 | 169 | // シェーダーを作成 170 | if (this._programId == null) { 171 | this._programId = this._subdelegate.createShader(); 172 | } 173 | } 174 | 175 | /** 176 | * タッチされた時に呼ばれる。 177 | * 178 | * @param pointX スクリーンX座標 179 | * @param pointY スクリーンY座標 180 | */ 181 | public onTouchesBegan(pointX: number, pointY: number): void { 182 | this._touchManager.touchesBegan( 183 | pointX * window.devicePixelRatio, 184 | pointY * window.devicePixelRatio 185 | ); 186 | } 187 | 188 | /** 189 | * タッチしているときにポインタが動いたら呼ばれる。 190 | * 191 | * @param pointX スクリーンX座標 192 | * @param pointY スクリーンY座標 193 | */ 194 | public onTouchesMoved(pointX: number, pointY: number): void { 195 | const posX = pointX * window.devicePixelRatio; 196 | const posY = pointY * window.devicePixelRatio; 197 | 198 | const lapplive2dmanager = this._subdelegate.getLive2DManager(); 199 | 200 | const viewX: number = this.transformViewX(this._touchManager.getX()); 201 | const viewY: number = this.transformViewY(this._touchManager.getY()); 202 | 203 | this._touchManager.touchesMoved(posX, posY); 204 | 205 | lapplive2dmanager.onDrag(viewX, viewY); 206 | } 207 | 208 | /** 209 | * タッチが終了したら呼ばれる。 210 | * 211 | * @param pointX スクリーンX座標 212 | * @param pointY スクリーンY座標 213 | */ 214 | public onTouchesEnded(pointX: number, pointY: number): void { 215 | const posX = pointX * window.devicePixelRatio; 216 | const posY = pointY * window.devicePixelRatio; 217 | 218 | const lapplive2dmanager = this._subdelegate.getLive2DManager(); 219 | 220 | // タッチ終了 221 | lapplive2dmanager.onDrag(0.0, 0.0); 222 | 223 | // シングルタップ 224 | const x: number = this.transformViewX(posX); 225 | const y: number = this.transformViewY(posY); 226 | 227 | if (LAppDefine.DebugTouchLogEnable) { 228 | LAppPal.printMessage(`[APP]touchesEnded x: ${x} y: ${y}`); 229 | } 230 | lapplive2dmanager.onTap(x, y); 231 | 232 | // 歯車にタップしたか 233 | if (this._gear.isHit(posX, posY)) { 234 | lapplive2dmanager.nextScene(); 235 | } 236 | } 237 | 238 | /** 239 | * X座標をView座標に変換する。 240 | * 241 | * @param deviceX デバイスX座標 242 | */ 243 | public transformViewX(deviceX: number): number { 244 | const screenX: number = this._deviceToScreen.transformX(deviceX); // 論理座標変換した座標を取得。 245 | return this._viewMatrix.invertTransformX(screenX); // 拡大、縮小、移動後の値。 246 | } 247 | 248 | /** 249 | * Y座標をView座標に変換する。 250 | * 251 | * @param deviceY デバイスY座標 252 | */ 253 | public transformViewY(deviceY: number): number { 254 | const screenY: number = this._deviceToScreen.transformY(deviceY); // 論理座標変換した座標を取得。 255 | return this._viewMatrix.invertTransformY(screenY); 256 | } 257 | 258 | /** 259 | * X座標をScreen座標に変換する。 260 | * @param deviceX デバイスX座標 261 | */ 262 | public transformScreenX(deviceX: number): number { 263 | return this._deviceToScreen.transformX(deviceX); 264 | } 265 | 266 | /** 267 | * Y座標をScreen座標に変換する。 268 | * 269 | * @param deviceY デバイスY座標 270 | */ 271 | public transformScreenY(deviceY: number): number { 272 | return this._deviceToScreen.transformY(deviceY); 273 | } 274 | 275 | _touchManager: TouchManager; // タッチマネージャー 276 | _deviceToScreen: CubismMatrix44; // デバイスからスクリーンへの行列 277 | _viewMatrix: CubismViewMatrix; // viewMatrix 278 | _programId: WebGLProgram; // シェーダID 279 | _back: LAppSprite; // 背景画像 280 | _gear: LAppSprite; // ギア画像 281 | _changeModel: boolean; // モデル切り替えフラグ 282 | _isClick: boolean; // クリック中 283 | private _subdelegate: LAppSubdelegate; 284 | } 285 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/main.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | import { LAppDelegate } from './lappdelegate'; 9 | import * as LAppDefine from './lappdefine'; 10 | 11 | /** 12 | * ブラウザロード後の処理 13 | */ 14 | window.addEventListener( 15 | 'load', 16 | (): void => { 17 | // Initialize WebGL and create the application instance 18 | if (!LAppDelegate.getInstance().initialize()) { 19 | return; 20 | } 21 | 22 | LAppDelegate.getInstance().run(); 23 | }, 24 | { passive: true } 25 | ); 26 | 27 | /** 28 | * 終了時の処理 29 | */ 30 | window.addEventListener( 31 | 'beforeunload', 32 | (): void => LAppDelegate.releaseInstance(), 33 | { passive: true } 34 | ); 35 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/src/touchmanager.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright(c) Live2D Inc. All rights reserved. 3 | * 4 | * Use of this source code is governed by the Live2D Open Software license 5 | * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. 6 | */ 7 | 8 | export class TouchManager { 9 | /** 10 | * コンストラクタ 11 | */ 12 | constructor() { 13 | this._startX = 0.0; 14 | this._startY = 0.0; 15 | this._lastX = 0.0; 16 | this._lastY = 0.0; 17 | this._lastX1 = 0.0; 18 | this._lastY1 = 0.0; 19 | this._lastX2 = 0.0; 20 | this._lastY2 = 0.0; 21 | this._lastTouchDistance = 0.0; 22 | this._deltaX = 0.0; 23 | this._deltaY = 0.0; 24 | this._scale = 1.0; 25 | this._touchSingle = false; 26 | this._flipAvailable = false; 27 | } 28 | 29 | public getCenterX(): number { 30 | return this._lastX; 31 | } 32 | 33 | public getCenterY(): number { 34 | return this._lastY; 35 | } 36 | 37 | public getDeltaX(): number { 38 | return this._deltaX; 39 | } 40 | 41 | public getDeltaY(): number { 42 | return this._deltaY; 43 | } 44 | 45 | public getStartX(): number { 46 | return this._startX; 47 | } 48 | 49 | public getStartY(): number { 50 | return this._startY; 51 | } 52 | 53 | public getScale(): number { 54 | return this._scale; 55 | } 56 | 57 | public getX(): number { 58 | return this._lastX; 59 | } 60 | 61 | public getY(): number { 62 | return this._lastY; 63 | } 64 | 65 | public getX1(): number { 66 | return this._lastX1; 67 | } 68 | 69 | public getY1(): number { 70 | return this._lastY1; 71 | } 72 | 73 | public getX2(): number { 74 | return this._lastX2; 75 | } 76 | 77 | public getY2(): number { 78 | return this._lastY2; 79 | } 80 | 81 | public isSingleTouch(): boolean { 82 | return this._touchSingle; 83 | } 84 | 85 | public isFlickAvailable(): boolean { 86 | return this._flipAvailable; 87 | } 88 | 89 | public disableFlick(): void { 90 | this._flipAvailable = false; 91 | } 92 | 93 | /** 94 | * タッチ開始時イベント 95 | * @param deviceX タッチした画面のxの値 96 | * @param deviceY タッチした画面のyの値 97 | */ 98 | public touchesBegan(deviceX: number, deviceY: number): void { 99 | this._lastX = deviceX; 100 | this._lastY = deviceY; 101 | this._startX = deviceX; 102 | this._startY = deviceY; 103 | this._lastTouchDistance = -1.0; 104 | this._flipAvailable = true; 105 | this._touchSingle = true; 106 | } 107 | 108 | /** 109 | * ドラッグ時のイベント 110 | * @param deviceX タッチした画面のxの値 111 | * @param deviceY タッチした画面のyの値 112 | */ 113 | public touchesMoved(deviceX: number, deviceY: number): void { 114 | this._lastX = deviceX; 115 | this._lastY = deviceY; 116 | this._lastTouchDistance = -1.0; 117 | this._touchSingle = true; 118 | } 119 | 120 | /** 121 | * フリックの距離測定 122 | * @return フリック距離 123 | */ 124 | public getFlickDistance(): number { 125 | return this.calculateDistance( 126 | this._startX, 127 | this._startY, 128 | this._lastX, 129 | this._lastY 130 | ); 131 | } 132 | 133 | /** 134 | * 点1から点2への距離を求める 135 | * 136 | * @param x1 1つ目のタッチした画面のxの値 137 | * @param y1 1つ目のタッチした画面のyの値 138 | * @param x2 2つ目のタッチした画面のxの値 139 | * @param y2 2つ目のタッチした画面のyの値 140 | */ 141 | public calculateDistance( 142 | x1: number, 143 | y1: number, 144 | x2: number, 145 | y2: number 146 | ): number { 147 | return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); 148 | } 149 | 150 | /** 151 | * 2つ目の値から、移動量を求める。 152 | * 違う方向の場合は移動量0。同じ方向の場合は、絶対値が小さい方の値を参照する。 153 | * 154 | * @param v1 1つ目の移動量 155 | * @param v2 2つ目の移動量 156 | * 157 | * @return 小さい方の移動量 158 | */ 159 | public calculateMovingAmount(v1: number, v2: number): number { 160 | if (v1 > 0.0 != v2 > 0.0) { 161 | return 0.0; 162 | } 163 | 164 | const sign: number = v1 > 0.0 ? 1.0 : -1.0; 165 | const absoluteValue1 = Math.abs(v1); 166 | const absoluteValue2 = Math.abs(v2); 167 | return ( 168 | sign * (absoluteValue1 < absoluteValue2 ? absoluteValue1 : absoluteValue2) 169 | ); 170 | } 171 | 172 | _startY: number; // タッチを開始した時のxの値 173 | _startX: number; // タッチを開始した時のyの値 174 | _lastX: number; // シングルタッチ時のxの値 175 | _lastY: number; // シングルタッチ時のyの値 176 | _lastX1: number; // ダブルタッチ時の一つ目のxの値 177 | _lastY1: number; // ダブルタッチ時の一つ目のyの値 178 | _lastX2: number; // ダブルタッチ時の二つ目のxの値 179 | _lastY2: number; // ダブルタッチ時の二つ目のyの値 180 | _lastTouchDistance: number; // 2本以上でタッチしたときの指の距離 181 | _deltaX: number; // 前回の値から今回の値へのxの移動距離。 182 | _deltaY: number; // 前回の値から今回の値へのyの移動距離。 183 | _scale: number; // このフレームで掛け合わせる拡大率。拡大操作中以外は1。 184 | _touchSingle: boolean; // シングルタッチ時はtrue 185 | _flipAvailable: boolean; // フリップが有効かどうか 186 | } 187 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "moduleResolution": "node", 5 | "esModuleInterop": true, 6 | "experimentalDecorators": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "outDir": "./dist", 9 | "removeComments": true, 10 | "sourceMap": true, 11 | "baseUrl": "./", 12 | "paths": { 13 | "@framework/*": ["../../../Framework/src/*"] 14 | }, 15 | "noImplicitAny": true, 16 | "useUnknownInCatchVariables": true 17 | }, 18 | "include": [ 19 | "src/**/*.ts", 20 | "../../../Core/*.ts" 21 | ], 22 | "exclude": [ 23 | "node_modules", 24 | "dist" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /Samples/TypeScript/Demo/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, UserConfig, ConfigEnv } from 'vite'; 2 | import path from 'path'; 3 | 4 | export default defineConfig((env: ConfigEnv): UserConfig => { 5 | let common: UserConfig = { 6 | server: { 7 | port: 5000, 8 | }, 9 | root: './', 10 | base: '/', 11 | publicDir: './public', 12 | resolve: { 13 | extensions: ['.ts', '.js'], 14 | alias: { 15 | '@framework': path.resolve(__dirname, '../../../Framework/src'), 16 | } 17 | }, 18 | build: { 19 | target: 'modules', 20 | assetsDir: 'assets', 21 | outDir: './dist', 22 | sourcemap: env.mode == 'development' ? true : false, 23 | }, 24 | }; 25 | return common; 26 | }); 27 | -------------------------------------------------------------------------------- /Samples/TypeScript/README.ja.md: -------------------------------------------------------------------------------- 1 | [English](README.md) / [日本語](README.ja.md) 2 | 3 | --- 4 | 5 | # Cubism Web Samples for TypeScript 6 | 7 | TypeScript で実装したアプリケーションのサンプル実装です。 8 | 9 | 10 | ## 開発環境 11 | 12 | | パッケージ | バージョン | 13 | | --- | --- | 14 | | TypeScript | 5.8.3 | 15 | | Vite | 6.3.5 | 16 | 17 | その他のパッケージに関しては、各プロジェクトの `package.json` を確認してください。 18 | また、その他の開発環境・動作確認環境はトップディレクトリにある [README.md](/README.ja.md) を参照してください。 19 | 20 | 21 | ## タスク一覧 22 | 23 | ### `npm: start` 24 | 25 | 開発用のローカルサーバが起動され、プロジェクトの監視ビルドが行われます。 26 | プロジェクトの変更を行うと自動的に再ビルドが行われ、ブラウザのリロードが発生します。 27 | [プロジェクトのデバック]から Visual Studio Code 上でデバックを行うことができます。 28 | 29 | Visual Studio Code 上で終了する場合は、 30 | コマンドパレットから `>Tasks: Terminate Task` を入力してタスクを選択します。 31 | 32 | ### `npm: build` 33 | 34 | `dist` ディレクトリに、TypeScript のビルド成果物を出力します。 35 | Vite を用いて1つにまとめられた JavaScript ファイルが出力されます。 36 | 動作に必要なファイルもコピーされます。 37 | 38 | `tsconfig.json` 及び `vite.config.mts` を編集することで設定内容を変更できます。 39 | 40 | ### `npm: build:prod` 41 | 42 | 上記のビルドを最適化した上で行います。 43 | ビルドサイズが削減されるため、本番環境用の成果物の出力に使用します。 44 | 45 | ### `npm: test` 46 | 47 | TypeScript の型チェックテストを行います。 48 | 49 | `tsconfig.json` を編集することで設定内容を変更できます。 50 | 51 | ### `npm: lint` 52 | 53 | `src` ディレクトリ内の TypeScript ファイルの静的解析を行います。 54 | 55 | `.eslintrc.yml` を編集することで設定内容を変更できます。 56 | 57 | ### `npm: lint:fix` 58 | 59 | `src` ディレクトリ内の TypeScript ファイルの静的解析及び自動修正を行います。 60 | 61 | `.eslintrc.yml` を編集することで設定内容を変更できます。 62 | 63 | ### `npm: serve` 64 | 65 | 簡易ローカルサーバを起動します。 66 | ブラウザからサーバ内の `/Samples/TypeScript/Demo` にアクセスすることで index.html の確認ができます。 67 | 事前にプロジェクトのビルドを行なっている必要があります。 68 | 69 | 本番環境に近い環境で成果物の検証を行うことができます。 70 | 71 | ### `npm: clean` 72 | 73 | ビルド成果物ディレクトリ(`dist`)を削除します。 74 | -------------------------------------------------------------------------------- /Samples/TypeScript/README.md: -------------------------------------------------------------------------------- 1 | [English](README.md) / [日本語](README.ja.md) 2 | 3 | --- 4 | 5 | # Cubism Web Samples for TypeScript 6 | 7 | This is a sample implementation of an application implemented with TypeScript. 8 | 9 | 10 | ## Development environment 11 | 12 | | Package | Version | 13 | | --- | --- | 14 | | TypeScript | 5.8.3 | 15 | | Vite | 6.3.5 | 16 | 17 | For other packages, check the `package.json` for each project. 18 | For other development environments and operation environments, see [README.md](/README.md) in the top directory. 19 | 20 | 21 | ## Task list 22 | 23 | ### `npm: start` 24 | 25 | Starts a local server for development and creates a project monitor build. 26 | Any changes you make to the project will automatically rebuild and cause the browser to reload. 27 | You can debug in Visual Studio Code from [Debug Project]. 28 | 29 | To terminate in Visual Studio Code, type `>Tasks: Terminate Task` and select the task from the command palette. 30 | 31 | ### `npm: build` 32 | 33 | Outputs a TypeScript build deliverable to the `dist` directory. 34 | The output is a JavaScript file that has been bundled into one using Vite. 35 | When you execute this command, it will also copy the necessary files for operation. 36 | 37 | You can change the settings by editing `tsconfig.json` and `vite.config.mts`. 38 | 39 | ### `npm: build:prod` 40 | 41 | Creates above build after optimizing it. 42 | It is used to output deliverables for production environments as it reduces the build size. 43 | 44 | ### `npm: test` 45 | 46 | Performs a TypeScript type check test. 47 | 48 | You can change the settings by editing `tsconfig.json`. 49 | 50 | ### `npm: lint` 51 | 52 | Performs static analysis of TypeScript files in the `src` directory. 53 | 54 | You can change the settings by editing `.eslintrc.yml`. 55 | 56 | ### `npm: lint:fix` 57 | 58 | Performs static analysis and automatic modification of TypeScript files in the `src` directory. 59 | 60 | You can change the settings by editing `.eslintrc.yml`. 61 | 62 | ### `npm: serve` 63 | 64 | Starts a simple local server. 65 | You can check the index.html by accessing `/Samples/TypeScript/Demo` in the server from your browser. 66 | The project needs to be built in advance. 67 | 68 | Deliverables can be verified in an environment close to the production environment. 69 | 70 | ### `npm: clean` 71 | 72 | Deletes the build deliverable directory (`dist`). 73 | --------------------------------------------------------------------------------