├── .babelrc ├── .gitignore ├── .npmignore ├── LICENSE.txt ├── docs └── API.md ├── example ├── 7_room2_a.jpg ├── assets │ └── haru │ │ ├── expressions │ │ ├── f01.exp.json │ │ ├── f02.exp.json │ │ ├── f03.exp.json │ │ ├── f04.exp.json │ │ ├── f05.exp.json │ │ ├── f06.exp.json │ │ ├── f07.exp.json │ │ └── f08.exp.json │ │ ├── haru.model.json │ │ ├── haru.physics.json │ │ ├── haru.pose.json │ │ ├── haru_01.1024 │ │ ├── texture_00.png │ │ ├── texture_01.png │ │ └── texture_02.png │ │ ├── haru_01.moc │ │ ├── haru_01.model.json │ │ ├── haru_02.1024 │ │ ├── texture_00.png │ │ ├── texture_01.png │ │ └── texture_02.png │ │ ├── haru_02.moc │ │ ├── haru_02.model.json │ │ ├── motions │ │ ├── flickHead_00.mtn │ │ ├── idle_00.mtn │ │ ├── idle_01.mtn │ │ ├── idle_02.mtn │ │ ├── pinchIn_00.mtn │ │ ├── pinchOut_00.mtn │ │ ├── shake_00.mtn │ │ ├── tapBody_00.mtn │ │ ├── tapBody_01.mtn │ │ ├── tapBody_02.mtn │ │ ├── tapBody_03.mtn │ │ ├── tapBody_04.mtn │ │ ├── tapBody_05.mtn │ │ ├── tapBody_06.mtn │ │ ├── tapBody_07.mtn │ │ ├── tapBody_08.mtn │ │ └── tapBody_09.mtn │ │ └── sounds │ │ ├── flickHead_00.mp3 │ │ ├── pinchIn_00.mp3 │ │ ├── pinchOut_00.mp3 │ │ ├── shake_00.mp3 │ │ ├── tapBody_00.mp3 │ │ ├── tapBody_01.mp3 │ │ └── tapBody_02.mp3 ├── index.html ├── index.js ├── pixiv4.jpg ├── readme.txt └── sound │ └── 星のカケラ.mp3 ├── package.json ├── readme.md ├── src ├── index.js └── lib │ ├── LAppModel.js │ ├── Live2DFramework.js │ ├── MatrixStack.js │ ├── ModelSettingJson.js │ ├── glMatrix-common.js │ ├── glMatrix-mat4.js │ ├── live2d.js │ └── netUtils.js ├── webpack.config.example.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["latest"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /example 2 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The following license applies to some parts of the software which is from Live2D Inc. 2 | 3 | This is a Software Development Kit (SDK) for developing Live2D-Cubism-powered applications on WebGL. 4 | The SDK contains proprietary libraries and sample projects. 5 | Read this document when using the SDK. 6 | 7 | Read Live2D License Agreement 8 | for business 9 | http://live2d.com/en/sdk_license_cubism 10 | 11 | for indie 12 | http://live2d.com/en/sdk_license_cubism_indie 13 | 14 | After agree and accept Live2D SDK License Agreement, the content in the following folders may be placed in the server which you control 15 | 16 | ========================== 17 | 18 | The following license applies to pixi.js. 19 | 20 | https://github.com/pixijs/pixi.js/blob/master/LICENSE 21 | 22 | ========================== 23 | 24 | The following license applies to the other parts of the software. 25 | 26 | MIT License 27 | 28 | Copyright (c) 2016 Icemic Jia 29 | 30 | Permission is hereby granted, free of charge, to any person obtaining a copy 31 | of this software and associated documentation files (the "Software"), to deal 32 | in the Software without restriction, including without limitation the rights 33 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 34 | copies of the Software, and to permit persons to whom the Software is 35 | furnished to do so, subject to the following conditions: 36 | 37 | The above copyright notice and this permission notice shall be included in all 38 | copies or substantial portions of the Software. 39 | 40 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 41 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 42 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 43 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 44 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 45 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 46 | SOFTWARE. 47 | -------------------------------------------------------------------------------- /docs/API.md: -------------------------------------------------------------------------------- 1 | # API 2 | 3 | **new PIXI.Live2DSprite(modelDefine, options)** 4 | 5 | `json` modelDefine: The content of [name].model.json.
6 | `json` options: optional parameters 7 | 8 | - eyeBlink `boolean` `default: true` 9 | - lipSyncWithSound `boolean` `default: true` 10 | - debugLog `boolean` `default: false` 11 | - debugMouseLog `boolean` `default: false` 12 | - randomMotion `boolean` `default: true` 13 | - defaultMotionGroup `string` `default: 'idle'` 14 | - priorityDefault `number` `default: 1` 15 | - priorityForce `number` `default: 3` 16 | - audioPlayer `function` Custom audio player, pass (filename, rootPath) as - parameters 17 | 18 | **.adjustScale(cx, cy, scale)** 19 | 20 | cx: center for scale, between 0-1.
21 | cy: center for scale, between 0-1.
22 | scale: ratio for scale. 23 | 24 | **.adjustTranslate(shiftX, shiftY)** 25 | 26 | shiftX: between 0-1.
27 | shiftY: between 0-1\. 28 | 29 | **.setLipSync(value)** 30 | 31 | **.setRandomExpression()** 32 | 33 | **.startRandomMotion(name, priority)** 34 | 35 | **.startRandomMotionOnce(name, priority)** 36 | 37 | **.stopRandomMotion()** 38 | 39 | **.startMotion(name, no, priority)** 40 | 41 | **.playSound(filename, host='/')** 42 | 43 | **.hitTest(id, x, y)** 44 | 45 | If `id` is not `null`, it will test a specific part of model. Or it will test all parts, which will return `true` if only any part of model returns true. 46 | 47 | **.setViewPoint(x, y)** 48 | 49 | **.getParamFloat(key)** 50 | 51 | **.setParamFloat(key, value, weight=1)** 52 | 53 | **.addToParamFloat(key, value, weight=1)** 54 | 55 | **.multParamFloat(key, value, weight=1)** 56 | -------------------------------------------------------------------------------- /example/7_room2_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/7_room2_a.jpg -------------------------------------------------------------------------------- /example/assets/haru/expressions/f01.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500 5 | } -------------------------------------------------------------------------------- /example/assets/haru/expressions/f02.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | { 7 | "id":"PARAM_MOUTH_FORM", 8 | "val":0, 9 | "def":1 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /example/assets/haru/expressions/f03.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_FORM","val":-1}, 7 | {"id":"PARAM_BROW_L_ANGLE","val":-0.5}, 8 | {"id":"PARAM_BROW_R_ANGLE","val":-0.5}, 9 | {"id":"PARAM_BROW_L_FORM","val":-0.5}, 10 | {"id":"PARAM_BROW_R_FORM","val":-0.5}, 11 | {"id":"PARAM_MOUTH_FORM","val":-1,"def":1} 12 | ] 13 | } -------------------------------------------------------------------------------- /example/assets/haru/expressions/f04.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_L_OPEN","val":0.9,"calc":"mult"}, 7 | {"id":"PARAM_EYE_R_OPEN","val":0.9,"calc":"mult"}, 8 | {"id":"PARAM_EYE_FORM","val":1}, 9 | {"id":"PARAM_BROW_L_ANGLE","val":0.3}, 10 | {"id":"PARAM_BROW_R_ANGLE","val":0.3}, 11 | {"id":"PARAM_BROW_L_FORM","val":-0.5}, 12 | {"id":"PARAM_BROW_R_FORM","val":-0.5}, 13 | {"id":"PARAM_MOUTH_FORM","val":-0.5,"def":1} 14 | ] 15 | } -------------------------------------------------------------------------------- /example/assets/haru/expressions/f05.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_L_OPEN","val":0,"calc":"mult"}, 7 | {"id":"PARAM_EYE_L_SMILE","val":1}, 8 | {"id":"PARAM_EYE_R_OPEN","val":0,"calc":"mult"}, 9 | {"id":"PARAM_EYE_R_SMILE","val":1}, 10 | {"id":"PARAM_BROW_L_Y","val":0.3}, 11 | {"id":"PARAM_BROW_R_Y","val":0.3}, 12 | {"id":"PARAM_BROW_L_FORM","val":0.2}, 13 | {"id":"PARAM_BROW_R_FORM","val":0.2} 14 | ] 15 | } -------------------------------------------------------------------------------- /example/assets/haru/expressions/f06.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_L_OPEN","val":2,"calc":"mult"}, 7 | {"id":"PARAM_EYE_R_OPEN","val":2,"calc":"mult"}, 8 | {"id":"PARAM_EYE_BALL_FORM","val":-1}, 9 | {"id":"PARAM_BROW_L_Y","val":0.3}, 10 | {"id":"PARAM_BROW_R_Y","val":0.3}, 11 | {"id":"PARAM_BROW_L_FORM","val":0.5}, 12 | {"id":"PARAM_BROW_R_FORM","val":0.5}, 13 | {"id":"PARAM_MOUTH_FORM","val":-0.21,"def":1} 14 | ] 15 | } -------------------------------------------------------------------------------- /example/assets/haru/expressions/f07.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_L_OPEN","val":0.9,"calc":"mult"}, 7 | {"id":"PARAM_EYE_R_OPEN","val":0.9,"calc":"mult"}, 8 | {"id":"PARAM_EYE_FORM","val":0.3}, 9 | {"id":"PARAM_BROW_L_ANGLE","val":0.25}, 10 | {"id":"PARAM_BROW_R_ANGLE","val":0.25}, 11 | {"id":"PARAM_BROW_L_FORM","val":-0.47}, 12 | {"id":"PARAM_BROW_R_FORM","val":-0.43}, 13 | {"id":"PARAM_MOUTH_FORM","val":0.5,"def":1}, 14 | {"id":"PARAM_TERE","val":1} 15 | ] 16 | } -------------------------------------------------------------------------------- /example/assets/haru/expressions/f08.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_L_OPEN","val":0.8,"calc":"mult"}, 7 | {"id":"PARAM_EYE_R_OPEN","val":0.8,"calc":"mult"}, 8 | {"id":"PARAM_BROW_L_FORM","val":-0.5}, 9 | {"id":"PARAM_BROW_R_FORM","val":-0.5}, 10 | {"id":"PARAM_MOUTH_FORM","val":-1,"def":1} 11 | ] 12 | } -------------------------------------------------------------------------------- /example/assets/haru/haru.model.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Model Setting", 3 | "name":"haru", 4 | "model":"haru_01.moc", 5 | "textures": 6 | [ 7 | "haru_01.1024/texture_00.png", 8 | "haru_01.1024/texture_01.png", 9 | "haru_01.1024/texture_02.png" 10 | ], 11 | "physics":"haru.physics.json", 12 | "pose":"haru.pose.json", 13 | "expressions": 14 | [ 15 | {"name":"f01","file":"expressions/f01.exp.json"}, 16 | {"name":"f02","file":"expressions/f02.exp.json"}, 17 | {"name":"f03","file":"expressions/f03.exp.json"}, 18 | {"name":"f04","file":"expressions/f04.exp.json"}, 19 | {"name":"f05","file":"expressions/f05.exp.json"}, 20 | {"name":"f06","file":"expressions/f06.exp.json"}, 21 | {"name":"f07","file":"expressions/f07.exp.json"}, 22 | {"name":"f08","file":"expressions/f08.exp.json"} 23 | ], 24 | "layout": 25 | { 26 | "center_x":0, 27 | "y":1.2, 28 | "width":2.9 29 | }, 30 | "hit_areas": 31 | [ 32 | {"name":"head", "id":"D_REF.HEAD"}, 33 | {"name":"body", "id":"D_REF.BODY"} 34 | ], 35 | "motions": 36 | { 37 | "idle": 38 | [ 39 | {"file":"motions/idle_00.mtn" ,"fade_in":2000, "fade_out":2000}, 40 | {"file":"motions/idle_01.mtn" ,"fade_in":2000, "fade_out":2000}, 41 | {"file":"motions/idle_02.mtn" ,"fade_in":2000, "fade_out":2000} 42 | ], 43 | "tap_body": 44 | [ 45 | { "file":"motions/tapBody_00.mtn" , "sound":"sounds/tapBody_00.mp3"}, 46 | { "file":"motions/tapBody_01.mtn" , "sound":"sounds/tapBody_01.mp3"}, 47 | { "file":"motions/tapBody_02.mtn" , "sound":"sounds/tapBody_02.mp3"} 48 | ], 49 | "pinch_in": 50 | [ 51 | { "file":"motions/pinchIn_00.mtn", "sound":"sounds/pinchIn_00.mp3" } 52 | ], 53 | "pinch_out": 54 | [ 55 | { "file":"motions/pinchOut_00.mtn", "sound":"sounds/pinchOut_00.mp3" } 56 | ], 57 | "shake": 58 | [ 59 | { "file":"motions/shake_00.mtn", "sound":"sounds/shake_00.mp3","fade_in":500 } 60 | ], 61 | "flick_head": 62 | [ 63 | { "file":"motions/flickHead_00.mtn", "sound":"sounds/flickHead_00.mp3" } 64 | ] 65 | } 66 | } -------------------------------------------------------------------------------- /example/assets/haru/haru.physics.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Physics", 3 | "physics_hair": 4 | [ 5 | { 6 | "comment":"hair front", 7 | "setup": 8 | { 9 | "length":0.17, 10 | "regist":0.5, 11 | "mass":0.1 12 | }, 13 | "src": 14 | [ 15 | { 16 | "id":"PARAM_ANGLE_X", 17 | "ptype":"x", 18 | "scale":0.005, 19 | "weight":1 20 | }, 21 | { 22 | "id":"PARAM_ANGLE_Z", 23 | "ptype":"angle", 24 | "scale":0.8, 25 | "weight":1 26 | } 27 | ], 28 | "targets": 29 | [ 30 | { 31 | "id":"PARAM_HAIR_FRONT", 32 | "ptype":"angle", 33 | "scale":0.025, 34 | "weight":1 35 | } 36 | ] 37 | }, 38 | { 39 | "comment":"hair back", 40 | "setup": 41 | { 42 | "length":0.34, 43 | "regist":0.5, 44 | "mass":0.2 45 | }, 46 | "src": 47 | [ 48 | { 49 | "id":"PARAM_ANGLE_X", 50 | "ptype":"x", 51 | "scale":0.005, 52 | "weight":1 53 | }, 54 | { 55 | "id":"PARAM_ANGLE_Z", 56 | "ptype":"angle", 57 | "scale":0.8, 58 | "weight":1 59 | } 60 | ], 61 | "targets": 62 | [ 63 | { 64 | "id":"PARAM_HAIR_BACK", 65 | "ptype":"angle", 66 | "scale":0.025, 67 | "weight":1 68 | } 69 | ] 70 | } 71 | ] 72 | } -------------------------------------------------------------------------------- /example/assets/haru/haru.pose.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Pose", 3 | 4 | "parts_visible": 5 | [ 6 | { 7 | "group": 8 | [ 9 | { 10 | "id":"PARTS_01_ARM_L_A_001", 11 | "link": 12 | [ 13 | "PARTS_01_ARM_L_A_002" 14 | ] 15 | }, 16 | { 17 | "id":"PARTS_01_ARM_L_B_001", 18 | "link": 19 | [ 20 | "PARTS_01_ARM_L_B_002" 21 | ] 22 | } 23 | ] 24 | }, 25 | { 26 | "group": 27 | [ 28 | { 29 | "id":"PARTS_01_ARM_R_A_001", 30 | "link": 31 | [ 32 | "PARTS_01_ARM_R_A_002" 33 | ] 34 | }, 35 | { 36 | "id":"PARTS_01_ARM_R_B_001", 37 | "link": 38 | [ 39 | "PARTS_01_ARM_R_B_002" 40 | ] 41 | } 42 | ] 43 | } 44 | ] 45 | 46 | } 47 | -------------------------------------------------------------------------------- /example/assets/haru/haru_01.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/haru_01.1024/texture_00.png -------------------------------------------------------------------------------- /example/assets/haru/haru_01.1024/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/haru_01.1024/texture_01.png -------------------------------------------------------------------------------- /example/assets/haru/haru_01.1024/texture_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/haru_01.1024/texture_02.png -------------------------------------------------------------------------------- /example/assets/haru/haru_01.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/haru_01.moc -------------------------------------------------------------------------------- /example/assets/haru/haru_01.model.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Model Setting", 3 | "name":"haru", 4 | "model":"haru_01.moc", 5 | "textures": 6 | [ 7 | "haru_01.1024/texture_00.png", 8 | "haru_01.1024/texture_01.png", 9 | "haru_01.1024/texture_02.png" 10 | ], 11 | "physics":"haru.physics.json", 12 | "pose":"haru.pose.json", 13 | "expressions": 14 | [ 15 | {"name":"f01","file":"expressions/f01.exp.json"}, 16 | {"name":"f02","file":"expressions/f02.exp.json"}, 17 | {"name":"f03","file":"expressions/f03.exp.json"}, 18 | {"name":"f04","file":"expressions/f04.exp.json"} 19 | ], 20 | "layout": 21 | { 22 | "center_x":0.5, 23 | "y":1, 24 | "width":2 25 | }, 26 | "hit_areas": 27 | [ 28 | {"name":"head", "id":"D_REF.HEAD"}, 29 | {"name":"body", "id":"D_REF.BODY"} 30 | ], 31 | "motions": 32 | { 33 | "idle": 34 | [ 35 | {"file":"motions/idle_00.mtn" ,"fade_in":2000, "fade_out":2000}, 36 | {"file":"motions/idle_01.mtn" ,"fade_in":2000, "fade_out":2000}, 37 | {"file":"motions/idle_02.mtn" ,"fade_in":2000, "fade_out":2000} 38 | ], 39 | "tap_body": 40 | [ 41 | { "file":"motions/tapBody_00.mtn" }, 42 | { "file":"motions/tapBody_01.mtn" }, 43 | { "file":"motions/tapBody_02.mtn" }, 44 | { "file":"motions/tapBody_03.mtn" }, 45 | { "file":"motions/tapBody_04.mtn" } 46 | ] 47 | } 48 | } -------------------------------------------------------------------------------- /example/assets/haru/haru_02.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/haru_02.1024/texture_00.png -------------------------------------------------------------------------------- /example/assets/haru/haru_02.1024/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/haru_02.1024/texture_01.png -------------------------------------------------------------------------------- /example/assets/haru/haru_02.1024/texture_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/haru_02.1024/texture_02.png -------------------------------------------------------------------------------- /example/assets/haru/haru_02.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/haru_02.moc -------------------------------------------------------------------------------- /example/assets/haru/haru_02.model.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Model Setting", 3 | "model":"haru_02.moc", 4 | "textures": 5 | [ 6 | "haru_02.1024/texture_00.png", 7 | "haru_02.1024/texture_01.png", 8 | "haru_02.1024/texture_02.png" 9 | ], 10 | "physics":"haru.physics.json", 11 | "pose":"haru.pose.json", 12 | "expressions": 13 | [ 14 | {"name":"f01","file":"expressions/f01.exp.json"}, 15 | {"name":"f05","file":"expressions/f05.exp.json"}, 16 | {"name":"f06","file":"expressions/f06.exp.json"}, 17 | {"name":"f07","file":"expressions/f07.exp.json"}, 18 | {"name":"f08","file":"expressions/f08.exp.json"} 19 | ], 20 | "layout": 21 | { 22 | "center_x":-0.5, 23 | "y":1, 24 | "width":2 25 | }, 26 | "hit_areas": 27 | [ 28 | {"name":"head", "id":"D_REF.HEAD"}, 29 | {"name":"body", "id":"D_REF.BODY"} 30 | ], 31 | "motions": 32 | { 33 | "idle": 34 | [ 35 | {"file":"motions/idle_01.mtn" ,"fade_in":2000, "fade_out":2000}, 36 | {"file":"motions/idle_02.mtn" ,"fade_in":2000, "fade_out":2000} 37 | ], 38 | "tap_body": 39 | [ 40 | { "file":"motions/tapBody_05.mtn" }, 41 | { "file":"motions/tapBody_06.mtn" }, 42 | { "file":"motions/tapBody_07.mtn" }, 43 | { "file":"motions/tapBody_08.mtn" }, 44 | { "file":"motions/tapBody_09.mtn" } 45 | ] 46 | } 47 | } -------------------------------------------------------------------------------- /example/assets/haru/motions/flickHead_00.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=14,13.79,13.18,12.23,10.96,9.42,7.64,5.72,3.61,1.4,-0.88,-3.12,-5.4,-7.61,-9.72,-11.64,-13.42,-14.96,-16.23,-17.18,-17.79,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18 5 | PARAM_BODY_ANGLE_X=3 6 | PARAM_BODY_ANGLE_Y=0,0.15,0.5,0.94,1.37,1.71,1.93,2,1.97,1.9,1.79,1.65,1.48,1.29,1.1,0.9,0.71,0.52,0.35,0.21,0.1,0.03,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7 | PARAM_BODY_ANGLE_Z=1,0.94,0.76,0.48,0.12,-0.3,-0.76,-1.25,-1.75,-2.24,-2.7,-3.12,-3.48,-3.76,-3.94,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=8 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0,0,0,0,0,0,0,0,0.4,0.79,0.796,0.8,0.7,0.61,0.51,0.42,0.55,0.67,0.55,0.42,0.52,0.61,0.51,0.4,0.396,0.392,0.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15 | PARAM_MOUTH_FORM=1 16 | PARAM_EYE_L_OPEN=0 17 | PARAM_BUST_Y=0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=1 20 | PARAM_BROW_L_FORM=0 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0 24 | PARAM_BROW_R_ANGLE=0 25 | PARAM_EYE_R_SMILE=1 26 | PARAM_ARM_R_A=1 27 | PARAM_BROW_R_FORM=0 28 | PARAM_EYE_R_OPEN=0 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=1 33 | PARAM_EYE_BALL_X=0 34 | PARAM_EYE_BALL_Y=0 35 | PARAM_ARM_L_B=0 -------------------------------------------------------------------------------- /example/assets/haru/motions/idle_00.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=0,0.005,0.021,0.05,0.08,0.12,0.18,0.24,0.31,0.39,0.48,0.57,0.68,0.79,0.91,1.03,1.17,1.31,1.46,1.62,1.78,1.95,2.13,2.31,2.5,2.7,2.9,3.11,3.32,3.54,3.77,4,4.24,4.49,4.74,5,5.27,5.54,5.8,6.06,6.3,6.54,6.77,6.99,7.21,7.42,7.62,7.82,8.01,8.19,8.37,8.54,8.7,8.86,9.01,9.15,9.3,9.43,9.56,9.68,9.79,9.9,10.01,10.11,10.2,10.29,10.37,10.45,10.52,10.59,10.65,10.71,10.76,10.81,10.85,10.88,10.91,10.94,10.96,10.979,10.991,10.998,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10.95,10.82,10.61,10.33,9.99,9.59,9.14,8.64,8.12,7.54,6.95,6.34,5.71,5.06,4.41,3.75,3.11,2.47,1.85,1.24,0.65,0.09,-0.43,-0.93,-1.37,-1.78,-2.13,-2.43,-2.67,-2.85,-2.96,-3,-3,-3,-3,-3,-3,-3,-2.94,-2.76,-2.49,-2.12,-1.69,-1.21,-0.68,-0.13,0.43,0.99,1.53,2.04,2.52,2.94,3.3,3.6,3.82,3.95,4,3.96,3.86,3.71,3.5,3.25,2.96,2.64,2.29,1.93,1.54,1.15,0.75,0.35,-0.05,-0.43,-0.81,-1.17,-1.51,-1.83,-2.11,-2.37,-2.58,-2.76,-2.89,-2.97,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-2.98,-2.91,-2.79,-2.64,-2.46,-2.25,-2,-1.74,-1.45,-1.16,-0.84,-0.52,-0.2,0.12,0.44,0.76,1.07,1.36,1.64,1.9,2.14,2.35,2.54,2.7,2.83,2.92,2.98,3,2.993,2.973,2.94,2.9,2.84,2.78,2.7,2.62,2.53,2.44,2.33,2.23,2.11,2,1.88,1.76,1.64,1.52,1.39,1.27,1.15,1.03,0.92,0.81,0.7,0.6,0.51,0.42,0.34,0.26,0.2,0.14,0.09,0.05,0.02,0.006,0 5 | PARAM_BODY_ANGLE_X=0,0,0,0,0,0,0,0,0,0,0.003,0.014,0.032,0.06,0.09,0.13,0.18,0.24,0.31,0.38,0.46,0.56,0.66,0.78,0.9,1.03,1.18,1.33,1.5,1.68,1.87,2.07,2.28,2.51,2.75,3,3.28,3.55,3.82,4.09,4.34,4.6,4.85,5.09,5.33,5.56,5.78,6,6.22,6.43,6.64,6.83,7.02,7.21,7.4,7.57,7.74,7.91,8.07,8.22,8.37,8.51,8.64,8.77,8.89,9.01,9.12,9.23,9.32,9.41,9.5,9.58,9.65,9.72,9.77,9.83,9.87,9.91,9.94,9.97,9.986,9.996,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9.984,9.94,9.86,9.76,9.64,9.5,9.33,9.16,8.97,8.77,8.56,8.35,8.13,7.92,7.71,7.5,7.29,7.09,6.91,6.73,6.57,6.43,6.31,6.2,6.11,6.05,6.01,6,6,6,6,6,6,6,6,6,6,5.987,5.95,5.89,5.8,5.7,5.58,5.45,5.31,5.15,4.99,4.83,4.66,4.49,4.33,4.16,4,3.81,3.64,3.47,3.32,3.18,3.05,2.93,2.82,2.72,2.62,2.54,2.46,2.39,2.33,2.27,2.22,2.17,2.13,2.1,2.07,2.05,2.031,2.017,2.008,2.002,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2.009,2.03,2.07,2.13,2.19,2.26,2.34,2.42,2.5,2.58,2.66,2.74,2.81,2.87,2.93,2.97,2.99,3,2.995,2.98,2.96,2.92,2.88,2.83,2.78,2.72,2.65,2.57,2.49,2.41,2.32,2.22,2.13,2.03,1.92,1.82,1.71,1.61,1.5,1.39,1.29,1.18,1.08,0.97,0.87,0.78,0.68,0.59,0.51,0.43,0.35,0.28,0.22,0.17,0.12,0.08,0.04,0.02,0.005,0 6 | PARAM_BODY_ANGLE_Y=0 7 | PARAM_BODY_ANGLE_Z=0,0,0,0,0,0,0,0,0,0,-0.008,-0.03,-0.06,-0.11,-0.17,-0.23,-0.3,-0.38,-0.47,-0.56,-0.65,-0.75,-0.85,-0.95,-1.05,-1.16,-1.26,-1.36,-1.45,-1.55,-1.64,-1.72,-1.8,-1.87,-1.94,-2,-2.06,-2.12,-2.17,-2.22,-2.27,-2.32,-2.36,-2.4,-2.44,-2.48,-2.52,-2.55,-2.59,-2.62,-2.65,-2.68,-2.7,-2.73,-2.75,-2.78,-2.8,-2.816,-2.835,-2.851,-2.867,-2.882,-2.896,-2.908,-2.92,-2.93,-2.94,-2.949,-2.957,-2.964,-2.97,-2.975,-2.98,-2.985,-2.988,-2.991,-2.994,-2.996,-2.997,-2.999,-2.999,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-2.992,-2.97,-2.93,-2.88,-2.82,-2.75,-2.67,-2.58,-2.48,-2.39,-2.28,-2.17,-2.07,-1.96,-1.85,-1.75,-1.64,-1.55,-1.45,-1.37,-1.29,-1.22,-1.15,-1.1,-1.06,-1.03,-1.006,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1.01,-1.04,-1.09,-1.15,-1.23,-1.33,-1.45,-1.57,-1.71,-1.87,-2.03,-2.21,-2.4,-2.59,-2.79,-3,-3.25,-3.49,-3.71,-3.92,-4.12,-4.31,-4.48,-4.65,-4.8,-4.94,-5.08,-5.2,-5.32,-5.42,-5.51,-5.6,-5.68,-5.75,-5.81,-5.86,-5.9,-5.94,-5.96,-5.984,-5.996,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-5.98,-5.92,-5.83,-5.72,-5.57,-5.4,-5.22,-5.03,-4.82,-4.61,-4.39,-4.18,-3.97,-3.78,-3.6,-3.43,-3.28,-3.17,-3.08,-3.02,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-2.996,-2.985,-2.967,-2.94,-2.91,-2.87,-2.83,-2.78,-2.72,-2.66,-2.6,-2.52,-2.45,-2.37,-2.28,-2.19,-2.1,-2,-1.9,-1.81,-1.71,-1.62,-1.54,-1.45,-1.37,-1.29,-1.21,-1.14,-1.06,-0.99,-0.93,-0.86,-0.8,-0.74,-0.68,-0.63,-0.58,-0.53,-0.48,-0.43,-0.39,-0.35,-0.31,-0.27,-0.24,-0.21,-0.18,-0.15,-0.13,-0.11,-0.085,-0.067,-0.051,-0.038,-0.026,-0.017,-0.009,-0.004,-0.001,0 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=0,-0,-0,-0.002,-0.004,-0.008,-0.015,-0.024,-0.037,-0.053,-0.073,-0.1,-0.13,-0.16,-0.2,-0.25,-0.3,-0.36,-0.42,-0.5,-0.58,-0.67,-0.77,-0.87,-0.99,-1.12,-1.25,-1.4,-1.56,-1.72,-1.91,-2.1,-2.3,-2.52,-2.75,-3,-3.27,-3.55,-3.83,-4.12,-4.4,-4.69,-4.98,-5.27,-5.57,-5.86,-6.15,-6.45,-6.74,-7.03,-7.32,-7.6,-7.88,-8.16,-8.44,-8.71,-8.98,-9.24,-9.5,-9.74,-9.99,-10.22,-10.46,-10.68,-10.9,-11.11,-11.3,-11.5,-11.68,-11.85,-12.01,-12.16,-12.3,-12.43,-12.54,-12.64,-12.74,-12.82,-12.88,-12.93,-12.97,-12.99,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-12.96,-12.84,-12.64,-12.37,-12.04,-11.65,-11.21,-10.73,-10.21,-9.65,-9.06,-8.46,-7.84,-7.21,-6.58,-5.95,-5.33,-4.71,-4.11,-3.54,-2.99,-2.48,-2,-1.56,-1.17,-0.82,-0.54,-0.31,-0.14,-0.04,0,0,0,0,0,0,0,0,-0.09,-0.34,-0.74,-1.26,-1.87,-2.56,-3.32,-4.1,-4.9,-5.7,-6.47,-7.2,-7.88,-8.48,-9,-9.43,-9.74,-9.93,-10,-9.93,-9.75,-9.46,-9.07,-8.61,-8.07,-7.47,-6.83,-6.15,-5.43,-4.71,-3.97,-3.21,-2.48,-1.77,-1.06,-0.4,0.24,0.82,1.35,1.82,2.23,2.55,2.8,2.95,3,2.983,2.93,2.85,2.74,2.59,2.43,2.23,2.02,1.78,1.53,1.25,0.97,0.66,0.35,0.03,-0.3,-0.64,-0.98,-1.33,-1.67,-2.02,-2.36,-2.7,-3.03,-3.35,-3.66,-3.97,-4.25,-4.53,-4.78,-5.02,-5.23,-5.43,-5.59,-5.74,-5.85,-5.93,-5.98,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6.04,-6.16,-6.34,-6.59,-6.9,-7.26,-7.66,-8.1,-8.58,-9.07,-9.6,-10.13,-10.66,-11.21,-11.74,-12.26,-12.78,-13.27,-13.73,-14.17,-14.57,-14.92,-15.24,-15.5,-15.71,-15.87,-15.97,-16,-15.96,-15.86,-15.68,-15.45,-15.16,-14.82,-14.42,-13.99,-13.51,-12.99,-12.45,-11.87,-11.28,-10.66,-10.03,-9.39,-8.74,-8.08,-7.43,-6.79,-6.14,-5.52,-4.91,-4.32,-3.75,-3.21,-2.71,-2.23,-1.79,-1.39,-1.04,-0.73,-0.48,-0.27,-0.12,-0.03,0 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=0,0.019,0.08,0.17,0.29,0.44,0.63,0.83,1.06,1.31,1.59,1.88,2.18,2.5,2.84,3.18,3.53,3.9,4.27,4.64,5.01,5.39,5.77,6.14,6.52,6.88,7.24,7.6,7.94,8.28,8.6,8.91,9.21,9.49,9.75,10,10.24,10.48,10.71,10.92,11.13,11.32,11.51,11.68,11.85,12.01,12.16,12.3,12.44,12.56,12.68,12.8,12.9,13,13.1,13.18,13.26,13.34,13.41,13.47,13.53,13.59,13.64,13.69,13.73,13.77,13.8,13.83,13.86,13.89,13.91,13.925,13.941,13.955,13.966,13.976,13.983,13.989,13.993,13.997,13.999,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13.95,13.82,13.61,13.32,12.96,12.55,12.08,11.55,11,10.39,9.76,9.11,8.45,7.77,7.08,6.41,5.73,5.07,4.43,3.81,3.22,2.67,2.15,1.67,1.25,0.89,0.58,0.33,0.15,0.04,0,0,0,0,0,0,0,0,0.003,0.011,0.02,0.03,0.039,0.043,0.041,0.032,0.013,-0.02,-0.06,-0.12,-0.19,-0.28,-0.38,-0.51,-0.65,-0.82,-1,-1.28,-1.66,-2.11,-2.64,-3.22,-3.86,-4.54,-5.24,-5.97,-6.72,-7.47,-8.23,-8.98,-9.71,-10.42,-11.11,-11.76,-12.37,-12.94,-13.44,-13.89,-14.27,-14.58,-14.81,-14.95,-15,-14.989,-14.95,-14.9,-14.82,-14.73,-14.62,-14.49,-14.35,-14.19,-14.02,-13.84,-13.65,-13.44,-13.24,-13.02,-12.8,-12.57,-12.35,-12.11,-11.89,-11.65,-11.43,-11.2,-10.98,-10.76,-10.56,-10.35,-10.16,-9.98,-9.81,-9.65,-9.51,-9.38,-9.27,-9.18,-9.1,-9.05,-9.01,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-8.993,-8.973,-8.94,-8.9,-8.84,-8.77,-8.69,-8.61,-8.51,-8.4,-8.28,-8.16,-8.02,-7.88,-7.74,-7.58,-7.42,-7.25,-7.08,-6.9,-6.72,-6.53,-6.35,-6.15,-5.95,-5.76,-5.55,-5.35,-5.14,-4.94,-4.73,-4.53,-4.32,-4.11,-3.91,-3.7,-3.5,-3.3,-3.1,-2.91,-2.71,-2.52,-2.34,-2.16,-1.98,-1.81,-1.65,-1.49,-1.33,-1.19,-1.05,-0.91,-0.78,-0.67,-0.56,-0.46,-0.36,-0.28,-0.21,-0.15,-0.09,-0.05,-0.02,-0.006,0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0 15 | PARAM_MOUTH_FORM=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=0,-0,-0.001,-0.003,-0.005,-0.008,-0.011,-0.015,-0.019,-0.024,-0.03,-0.036,-0.042,-0.048,-0.056,-0.063,-0.071,-0.079,-0.087,-0.096,-0.105,-0.114,-0.123,-0.133,-0.143,-0.153,-0.163,-0.173,-0.183,-0.194,-0.204,-0.215,-0.225,-0.236,-0.246,-0.257,-0.267,-0.277,-0.287,-0.297,-0.307,-0.317,-0.326,-0.335,-0.344,-0.353,-0.361,-0.369,-0.377,-0.384,-0.392,-0.398,-0.404,-0.41,-0.416,-0.421,-0.425,-0.429,-0.432,-0.435,-0.437,-0.439,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.437,-0.43,-0.418,-0.402,-0.382,-0.36,-0.33,-0.3,-0.27,-0.24,-0.21,-0.17,-0.14,-0.1,-0.07,-0.03,0,0.04,0.07,0.11,0.14,0.17,0.2,0.22,0.24,0.258,0.273,0.287,0.298,0.308,0.316,0.323,0.328,0.332,0.335,0.338,0.339,0.34,0.34,0.29,0.15,-0.02,-0.19,-0.33,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.379,-0.378,-0.375,-0.371,-0.365,-0.359,-0.351,-0.341,-0.331,-0.319,-0.305,-0.291,-0.274,-0.256,-0.237,-0.216,-0.19,-0.17,-0.14,-0.11,-0.08,-0.05,-0.02,0.06,0.14,0.21,0.26,0.28,0.28,0.277,0.274,0.27,0.265,0.259,0.252,0.245,0.236,0.227,0.218,0.208,0.197,0.187,0.176,0.164,0.153,0.141,0.13,0.119,0.107,0.097,0.086,0.076,0.066,0.056,0.047,0.039,0.031,0.024,0.018,0.013,0.008,0.005,0.002,0.001,0 34 | PARAM_EYE_BALL_Y=0,0,0.002,0.004,0.007,0.011,0.016,0.022,0.028,0.035,0.043,0.051,0.06,0.069,0.079,0.09,0.101,0.113,0.125,0.137,0.15,0.163,0.177,0.191,0.205,0.219,0.233,0.248,0.263,0.278,0.292,0.308,0.322,0.338,0.352,0.367,0.382,0.397,0.411,0.425,0.439,0.453,0.467,0.48,0.493,0.505,0.517,0.529,0.54,0.551,0.561,0.57,0.579,0.587,0.595,0.602,0.608,0.614,0.619,0.623,0.626,0.628,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.628,0.624,0.616,0.606,0.594,0.58,0.563,0.545,0.525,0.5,0.48,0.46,0.44,0.41,0.39,0.36,0.34,0.31,0.29,0.26,0.24,0.22,0.195,0.178,0.162,0.148,0.136,0.125,0.116,0.108,0.101,0.096,0.091,0.087,0.085,0.082,0.081,0.08,0.08,0.096,0.13,0.19,0.24,0.27,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.292,0.296,0.303,0.313,0.324,0.337,0.351,0.365,0.381,0.397,0.413,0.429,0.445,0.46,0.475,0.488,0.501,0.512,0.521,0.529,0.535,0.539,0.54,0.54,0.54,0.54,0.54,0.54,0.539,0.535,0.529,0.521,0.512,0.5,0.487,0.472,0.456,0.438,0.42,0.401,0.381,0.36,0.34,0.32,0.29,0.27,0.25,0.23,0.21,0.19,0.17,0.146,0.127,0.108,0.091,0.075,0.06,0.047,0.035,0.025,0.016,0.009,0.004,0.001,0 35 | PARAM_ARM_L_B=0 36 | VISIBLE:PARTS_01_ARM_L_A_001=1 37 | VISIBLE:PARTS_01_ARM_R_A_001=1 38 | VISIBLE:PARTS_01_ARM_L_B_001=0 39 | VISIBLE:PARTS_01_ARM_R_B_001=0 -------------------------------------------------------------------------------- /example/assets/haru/motions/idle_01.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=0,-0.08,-0.29,-0.62,-1.05,-1.54,-2.08,-2.64,-3.21,-3.77,-4.3,-4.77,-5.19,-5.53,-5.79,-5.95,-6,-5.93,-5.74,-5.43,-5.02,-4.53,-3.94,-3.3,-2.59,-1.84,-1.05,-0.25,0.57,1.38,2.17,2.94,3.68,4.37,5,5.61,6.18,6.69,7.14,7.55,7.91,8.23,8.52,8.77,8.99,9.19,9.35,9.49,9.62,9.71,9.79,9.86,9.91,9.95,9.97,9.989,9.997,10,9.97,9.89,9.77,9.59,9.37,9.12,8.82,8.48,8.12,7.72,7.29,6.84,6.37,5.87,5.36,4.83,4.29,3.75,3.19,2.63,2.07,1.51,0.95,0.4,-0.14,-0.68,-1.2,-1.7,-2.2,-2.67,-3.11,-3.54,-3.93,-4.3,-4.64,-4.94,-5.21,-5.44,-5.64,-5.79,-5.91,-5.98,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-5.98,-5.92,-5.83,-5.7,-5.54,-5.35,-5.13,-4.89,-4.62,-4.33,-4.02,-3.69,-3.35,-3,-2.63,-2.25,-1.86,-1.46,-1.07,-0.66,-0.25,0.15,0.56,0.96,1.36,1.75,2.14,2.51,2.88,3.23,3.56,3.89,4.2,4.48,4.75,5,5.22,5.42,5.59,5.73,5.85,5.93,5.98,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6.02,6.09,6.21,6.36,6.54,6.75,7,7.26,7.55,7.84,8.16,8.48,8.8,9.12,9.44,9.76,10.07,10.36,10.64,10.9,11.14,11.35,11.54,11.7,11.83,11.92,11.98,12,11.982,11.93,11.84,11.73,11.58,11.41,11.2,10.97,10.72,10.44,10.15,9.83,9.49,9.13,8.76,8.38,7.97,7.56,7.13,6.69,6.24,5.79,5.32,4.86,4.38,3.9,3.42,2.94,2.45,1.97,1.49,1.01,0.53,0.06,-0.41,-0.86,-1.31,-1.76,-2.19,-2.61,-3.02,-3.42,-3.8,-4.17,-4.52,-4.85,-5.17,-5.47,-5.75,-6,-6.24,-6.47,-6.69,-6.89,-7.09,-7.27,-7.43,-7.59,-7.74,-7.88,-8,-8.12,-8.23,-8.33,-8.42,-8.5,-8.58,-8.65,-8.71,-8.76,-8.81,-8.85,-8.89,-8.92,-8.95,-8.97,-8.985,-8.999,-9.009,-9.017,-9.021,-9.024,-9.024,-9.023,-9.02,-9.017,-9.013,-9.01,-9.006,-9.003,-9.001,-9,-9,-9 5 | PARAM_BODY_ANGLE_X=0,-0.04,-0.14,-0.31,-0.52,-0.77,-1.04,-1.32,-1.61,-1.88,-2.15,-2.39,-2.6,-2.77,-2.89,-2.97,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-2.992,-2.97,-2.93,-2.88,-2.82,-2.75,-2.66,-2.57,-2.47,-2.37,-2.26,-2.14,-2.02,-1.9,-1.77,-1.64,-1.52,-1.39,-1.26,-1.14,-1.02,-0.9,-0.78,-0.67,-0.57,-0.47,-0.38,-0.3,-0.22,-0.16,-0.1,-0.06,-0.03,-0.007,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.008,0.03,0.07,0.12,0.18,0.25,0.34,0.44,0.54,0.65,0.78,0.9,1.04,1.18,1.32,1.47,1.62,1.77,1.92,2.08,2.23,2.38,2.53,2.68,2.82,2.96,3.1,3.22,3.35,3.46,3.56,3.66,3.75,3.82,3.88,3.93,3.97,3.99,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4.007,4.026,4.06,4.1,4.16,4.23,4.31,4.4,4.5,4.61,4.73,4.86,5,5.15,5.31,5.47,5.64,5.82,6,6.22,6.42,6.61,6.78,6.94,7.09,7.22,7.34,7.45,7.55,7.64,7.71,7.78,7.84,7.89,7.93,7.96,7.98,7.996,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7.981,7.93,7.84,7.72,7.57,7.39,7.19,6.97,6.72,6.46,6.18,5.9,5.6,5.29,4.98,4.66,4.34,4.02,3.71,3.4,3.1,2.82,2.54,2.28,2.03,1.81,1.61,1.43,1.28,1.16,1.07,1.02,1,1,1 6 | PARAM_BODY_ANGLE_Y=0 7 | PARAM_BODY_ANGLE_Z=0,0.011,0.04,0.09,0.16,0.25,0.35,0.46,0.59,0.73,0.88,1.03,1.19,1.36,1.54,1.71,1.89,2.07,2.24,2.42,2.59,2.76,2.92,3.07,3.22,3.35,3.48,3.59,3.7,3.78,3.86,3.92,3.96,3.99,4,3.994,3.975,3.95,3.91,3.86,3.81,3.76,3.7,3.64,3.57,3.51,3.44,3.38,3.32,3.26,3.21,3.16,3.11,3.07,3.04,3.02,3.005,3,3,3,3,3,3,3,3,3,2.992,2.97,2.93,2.88,2.82,2.75,2.66,2.57,2.47,2.37,2.26,2.14,2.02,1.9,1.77,1.64,1.52,1.39,1.26,1.14,1.02,0.9,0.78,0.67,0.57,0.47,0.38,0.3,0.22,0.16,0.1,0.06,0.03,0.007,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.004,-0.015,-0.034,-0.06,-0.09,-0.13,-0.17,-0.22,-0.27,-0.33,-0.39,-0.45,-0.52,-0.59,-0.66,-0.73,-0.81,-0.88,-0.96,-1.04,-1.12,-1.19,-1.27,-1.34,-1.41,-1.48,-1.55,-1.61,-1.67,-1.73,-1.78,-1.83,-1.87,-1.91,-1.94,-1.97,-1.985,-1.996,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2.018,-2.07,-2.15,-2.25,-2.37,-2.51,-2.66,-2.82,-2.98,-3.14,-3.29,-3.44,-3.58,-3.7,-3.8,-3.89,-3.95,-3.99,-4,-3.983,-3.93,-3.86,-3.76,-3.65,-3.52,-3.38,-3.24,-3.09,-2.94,-2.8,-2.66,-2.52,-2.4,-2.29,-2.19,-2.11,-2.05,-2.01,-2,-2.01,-2.04,-2.08,-2.15,-2.22,-2.31,-2.41,-2.53,-2.65,-2.78,-2.91,-3.06,-3.2,-3.35,-3.5,-3.65,-3.8,-3.94,-4.09,-4.22,-4.35,-4.47,-4.59,-4.69,-4.78,-4.85,-4.92,-4.96,-4.99,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-4.987,-4.95,-4.88,-4.8,-4.69,-4.57,-4.42,-4.26,-4.09,-3.9,-3.7,-3.5,-3.28,-3.06,-2.84,-2.61,-2.39,-2.16,-1.94,-1.72,-1.5,-1.3,-1.1,-0.91,-0.74,-0.58,-0.43,-0.31,-0.2,-0.12,-0.05,-0.01,0,0,0 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=0,-0.08,-0.29,-0.62,-1.05,-1.54,-2.08,-2.64,-3.21,-3.77,-4.3,-4.77,-5.19,-5.53,-5.79,-5.95,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-5.99,-5.96,-5.91,-5.85,-5.76,-5.67,-5.56,-5.43,-5.29,-5.14,-4.98,-4.81,-4.64,-4.45,-4.26,-4.06,-3.86,-3.65,-3.45,-3.24,-3.03,-2.82,-2.61,-2.4,-2.2,-1.99,-1.8,-1.61,-1.43,-1.25,-1.08,-0.92,-0.78,-0.64,-0.51,-0.4,-0.3,-0.21,-0.14,-0.08,-0.03,-0.01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.02,0.08,0.17,0.3,0.45,0.63,0.83,1.05,1.29,1.53,1.8,2.06,2.33,2.6,2.87,3.13,3.39,3.63,3.87,4.08,4.28,4.46,4.62,4.75,4.86,4.93,4.98,5,4.9,4.63,4.23,3.69,3.07,2.37,1.61,0.83,0.01,-0.81,-1.61,-2.38,-3.12,-3.8,-4.42,-4.96,-5.39,-5.72,-5.93,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-5.99,-5.96,-5.91,-5.85,-5.76,-5.67,-5.56,-5.43,-5.29,-5.14,-4.98,-4.81,-4.63,-4.44,-4.25,-4.05,-3.85,-3.64,-3.43,-3.22,-3,-2.78,-2.57,-2.36,-2.15,-1.95,-1.75,-1.56,-1.37,-1.19,-1.02,-0.86,-0.71,-0.57,-0.44,-0.33,-0.24,-0.15,-0.09,-0.04,-0.01,0,0,0 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=0,-0.05,-0.19,-0.41,-0.7,-1.02,-1.39,-1.76,-2.14,-2.51,-2.86,-3.18,-3.46,-3.69,-3.86,-3.96,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-3.993,-3.973,-3.94,-3.9,-3.84,-3.78,-3.7,-3.62,-3.53,-3.43,-3.32,-3.21,-3.09,-2.97,-2.84,-2.71,-2.57,-2.44,-2.3,-2.16,-2.02,-1.88,-1.74,-1.6,-1.46,-1.33,-1.2,-1.07,-0.95,-0.83,-0.72,-0.62,-0.52,-0.43,-0.34,-0.27,-0.2,-0.14,-0.09,-0.05,-0.02,-0.006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.018,0.07,0.16,0.28,0.42,0.6,0.81,1.04,1.29,1.57,1.87,2.19,2.53,2.88,3.25,3.63,4.02,4.43,4.85,5.26,5.69,6.13,6.56,7,7.44,7.87,8.31,8.74,9.15,9.57,9.98,10.37,10.75,11.12,11.47,11.81,12.13,12.43,12.71,12.96,13.19,13.4,13.58,13.72,13.84,13.93,13.98,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13.98,13.91,13.8,13.64,13.45,13.22,12.96,12.67,12.35,11.99,11.63,11.23,10.81,10.37,9.92,9.45,8.98,8.49,8,7.5,7,6.5,6,5.51,5.02,4.55,4.08,3.63,3.19,2.77,2.37,2.01,1.65,1.33,1.04,0.78,0.55,0.36,0.2,0.09,0.02,0,0,0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0 15 | PARAM_MOUTH_FORM=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.01,0.04,0.08,0.13,0.18,0.24,0.3,0.36,0.4,0.44,0.47,0.493,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=0,0.003,0.011,0.024,0.04,0.059,0.08,0.1,0.12,0.14,0.165,0.183,0.199,0.212,0.222,0.228,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.229,0.224,0.218,0.209,0.197,0.184,0.169,0.151,0.132,0.11,0.09,0.07,0.04,0.02,-0.01,-0.04,-0.07,-0.09,-0.12,-0.15,-0.18,-0.21,-0.24,-0.27,-0.3,-0.32,-0.35,-0.38,-0.4,-0.43,-0.45,-0.47,-0.493,-0.512,-0.529,-0.545,-0.559,-0.571,-0.581,-0.589,-0.595,-0.599,-0.6,-0.6,-0.6,-0.6,-0.6,-0.6,-0.6,-0.6,-0.6,-0.6,-0.6,-0.581,-0.53,-0.47,-0.39,-0.31,-0.23,-0.16,-0.1,-0.04,-0.01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.002,-0.008,-0.017,-0.029,-0.044,-0.062,-0.081,-0.1,-0.13,-0.15,-0.18,-0.2,-0.23,-0.26,-0.28,-0.31,-0.33,-0.36,-0.38,-0.4,-0.42,-0.437,-0.453,-0.466,-0.476,-0.484,-0.488,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.49,-0.489,-0.487,-0.483,-0.478,-0.471,-0.463,-0.454,-0.443,-0.432,-0.42,-0.407,-0.393,-0.378,-0.363,-0.347,-0.331,-0.314,-0.297,-0.28,-0.263,-0.245,-0.227,-0.21,-0.193,-0.176,-0.159,-0.143,-0.127,-0.112,-0.097,-0.083,-0.07,-0.058,-0.047,-0.036,-0.027,-0.019,-0.012,-0.007,-0.003,-0.001,0,0,0 34 | PARAM_EYE_BALL_Y=0,0.003,0.012,0.026,0.044,0.06,0.09,0.11,0.13,0.16,0.18,0.199,0.216,0.231,0.241,0.248,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.248,0.246,0.244,0.24,0.236,0.232,0.226,0.221,0.214,0.208,0.201,0.193,0.185,0.178,0.169,0.161,0.152,0.144,0.135,0.126,0.117,0.109,0.1,0.091,0.083,0.075,0.067,0.059,0.052,0.045,0.039,0.032,0.027,0.021,0.017,0.012,0.009,0.006,0.003,0.001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0,-0.002,-0.004,-0.008,-0.012,-0.016,-0.022,-0.027,-0.033,-0.04,-0.047,-0.054,-0.061,-0.068,-0.075,-0.081,-0.088,-0.094,-0.101,-0.106,-0.111,-0.116,-0.12,-0.124,-0.126,-0.128,-0.13,-0.13,-0.127,-0.119,-0.106,-0.09,-0.07,-0.05,-0.03,-0,0.02,0.05,0.07,0.1,0.12,0.14,0.161,0.178,0.191,0.201,0.208,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.209,0.207,0.205,0.202,0.198,0.194,0.19,0.185,0.18,0.174,0.168,0.162,0.156,0.149,0.142,0.135,0.127,0.12,0.113,0.105,0.097,0.09,0.083,0.075,0.068,0.061,0.054,0.048,0.042,0.036,0.03,0.025,0.02,0.016,0.012,0.008,0.005,0.003,0.001,0,0,0,0 35 | PARAM_ARM_L_B=0 36 | VISIBLE:PARTS_01_ARM_L_A_001=1 37 | VISIBLE:PARTS_01_ARM_R_A_001=1 38 | VISIBLE:PARTS_01_ARM_L_B_001=0 39 | VISIBLE:PARTS_01_ARM_R_B_001=0 -------------------------------------------------------------------------------- /example/assets/haru/motions/idle_02.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=0,-0.013,-0.05,-0.11,-0.2,-0.31,-0.44,-0.59,-0.75,-0.94,-1.14,-1.35,-1.58,-1.82,-2.07,-2.34,-2.6,-2.88,-3.17,-3.46,-3.75,-4.05,-4.35,-4.65,-4.95,-5.25,-5.54,-5.83,-6.12,-6.4,-6.66,-6.93,-7.18,-7.42,-7.65,-7.86,-8.06,-8.25,-8.41,-8.56,-8.69,-8.8,-8.89,-8.95,-8.99,-9,-8.96,-8.83,-8.63,-8.36,-8.04,-7.64,-7.2,-6.72,-6.19,-5.63,-5.03,-4.42,-3.77,-3.11,-2.45,-1.77,-1.08,-0.4,0.27,0.93,1.58,2.22,2.83,3.42,3.97,4.49,4.97,5.41,5.81,6.16,6.45,6.68,6.86,6.96,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6.9,6.63,6.19,5.61,4.91,4.09,3.17,2.17,1.1,-0.02,-1.19,-2.38,-3.61,-4.84,-6.07,-7.29,-8.47,-9.64,-10.74,-11.79,-12.76,-13.68,-14.5,-15.22,-15.83,-16.33,-16.7,-16.92,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-16.9,-16.62,-16.16,-15.56,-14.83,-13.97,-13.01,-11.97,-10.85,-9.68,-8.47,-7.23,-5.94,-4.66,-3.38,-2.11,-0.88,0.33,1.48,2.58,3.59,4.54,5.4,6.14,6.79,7.3,7.68,7.92,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7.9,7.61,7.17,6.57,5.86,5.03,4.11,3.12,2.08,0.98,-0.13,-1.28,-2.44,-3.56,-4.67,-5.75,-6.77,-7.75,-8.65,-9.47,-10.19,-10.81,-11.31,-11.69,-11.92,-12,-11.91,-11.65,-11.24,-10.7,-10.02,-9.24,-8.34,-7.37,-6.33,-5.25,-4.09,-2.92,-1.74,-0.55,0.62,1.78,2.92,3.99,5.01,5.96,6.85,7.62,8.32,8.91,9.37,9.71,9.93,10,9.981,9.92,9.83,9.71,9.55,9.36,9.15,8.91,8.65,8.37,8.07,7.75,7.42,7.07,6.72,6.35,5.99,5.61,5.23,4.86,4.48,4.11,3.74,3.39,3.03,2.69,2.36,2.05,1.75,1.47,1.21,0.97,0.76,0.56,0.4,0.26,0.15,0.07,0.02,0,0,0,0,0,0,0 5 | PARAM_BODY_ANGLE_X=0,0.019,0.07,0.16,0.27,0.41,0.56,0.73,0.9,1.09,1.28,1.48,1.67,1.86,2.04,2.22,2.38,2.53,2.66,2.78,2.87,2.94,2.98,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3.008,3.03,3.07,3.12,3.18,3.25,3.33,3.42,3.52,3.62,3.72,3.83,3.94,4.06,4.17,4.28,4.38,4.48,4.58,4.67,4.75,4.82,4.88,4.93,4.97,4.99,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,4.97,4.87,4.72,4.53,4.29,4.02,3.71,3.4,3.06,2.72,2.37,2.03,1.7,1.39,1.09,0.83,0.59,0.38,0.22,0.1,0.03,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.03,-0.1,-0.22,-0.36,-0.54,-0.75,-0.97,-1.21,-1.46,-1.71,-1.97,-2.23,-2.48,-2.72,-2.95,-3.17,-3.37,-3.55,-3.7,-3.83,-3.92,-3.98,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-3.998,-3.992,-3.981,-3.967,-3.949,-3.93,-3.9,-3.87,-3.84,-3.8,-3.77,-3.72,-3.68,-3.63,-3.58,-3.53,-3.47,-3.41,-3.35,-3.29,-3.22,-3.16,-3.09,-3.02,-2.94,-2.87,-2.79,-2.71,-2.63,-2.55,-2.47,-2.38,-2.3,-2.21,-2.12,-2.03,-1.94,-1.85,-1.76,-1.67,-1.57,-1.48,-1.38,-1.29,-1.19,-1.1,-1,-0.9,-0.81,-0.72,-0.64,-0.57,-0.5,-0.44,-0.38,-0.33,-0.29,-0.24,-0.21,-0.17,-0.14,-0.12,-0.1,-0.076,-0.059,-0.045,-0.033,-0.024,-0.016,-0.011,-0.006,-0.003,-0.001,-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6 | PARAM_BODY_ANGLE_Y=0 7 | PARAM_BODY_ANGLE_Z=0,-0.003,-0.011,-0.025,-0.045,-0.07,-0.1,-0.13,-0.17,-0.21,-0.25,-0.3,-0.35,-0.4,-0.46,-0.52,-0.58,-0.64,-0.7,-0.77,-0.83,-0.9,-0.97,-1.03,-1.1,-1.17,-1.23,-1.3,-1.36,-1.42,-1.48,-1.54,-1.6,-1.65,-1.7,-1.75,-1.79,-1.83,-1.87,-1.9,-1.93,-1.96,-1.975,-1.989,-1.997,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1.992,-1.97,-1.93,-1.88,-1.82,-1.75,-1.67,-1.58,-1.48,-1.38,-1.28,-1.17,-1.06,-0.94,-0.83,-0.72,-0.62,-0.52,-0.42,-0.33,-0.25,-0.18,-0.12,-0.07,-0.03,-0.01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.006,-0.025,-0.05,-0.09,-0.14,-0.19,-0.24,-0.3,-0.36,-0.43,-0.49,-0.56,-0.62,-0.68,-0.74,-0.79,-0.84,-0.89,-0.93,-0.96,-0.98,-0.995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-0.97,-0.9,-0.79,-0.64,-0.46,-0.26,-0.03,0.22,0.48,0.76,1.03,1.32,1.61,1.89,2.17,2.44,2.69,2.94,3.16,3.37,3.55,3.7,3.83,3.92,3.98,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3.984,3.94,3.86,3.76,3.64,3.5,3.33,3.16,2.97,2.77,2.56,2.35,2.13,1.92,1.71,1.5,1.29,1.09,0.91,0.73,0.57,0.43,0.31,0.2,0.11,0.05,0.01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=0,-0.05,-0.2,-0.43,-0.72,-1.09,-1.49,-1.94,-2.41,-2.91,-3.42,-3.94,-4.45,-4.95,-5.45,-5.91,-6.34,-6.74,-7.1,-7.41,-7.66,-7.84,-7.96,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-7.96,-7.83,-7.63,-7.36,-7.04,-6.64,-6.2,-5.72,-5.19,-4.63,-4.03,-3.42,-2.77,-2.11,-1.45,-0.77,-0.08,0.6,1.27,1.93,2.58,3.22,3.83,4.42,4.97,5.49,5.97,6.41,6.81,7.16,7.45,7.68,7.86,7.96,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7.97,7.88,7.73,7.54,7.3,7.03,6.72,6.39,6.03,5.66,5.27,4.87,4.46,4.05,3.64,3.24,2.84,2.45,2.09,1.74,1.41,1.11,0.83,0.59,0.39,0.22,0.1,0.03,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.06,-0.21,-0.46,-0.79,-1.18,-1.63,-2.14,-2.68,-3.26,-3.86,-4.47,-5.11,-5.74,-6.36,-6.97,-7.56,-8.12,-8.66,-9.16,-9.61,-10,-10.34,-10.62,-10.83,-10.96,-11,-10.989,-10.96,-10.9,-10.83,-10.74,-10.63,-10.5,-10.36,-10.2,-10.02,-9.84,-9.64,-9.43,-9.21,-8.98,-8.73,-8.48,-8.22,-7.96,-7.69,-7.41,-7.13,-6.85,-6.56,-6.27,-5.97,-5.69,-5.39,-5.1,-4.8,-4.51,-4.23,-3.95,-3.67,-3.39,-3.12,-2.86,-2.61,-2.36,-2.12,-1.89,-1.67,-1.46,-1.26,-1.07,-0.9,-0.74,-0.59,-0.46,-0.34,-0.24,-0.16,-0.09,-0.04,-0.01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=0,0.1,0.37,0.81,1.36,2.04,2.8,3.63,4.52,5.46,6.4,7.38,8.34,9.29,10.21,11.08,11.89,12.64,13.31,13.88,14.36,14.71,14.92,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15.005,15.021,15.05,15.08,15.12,15.17,15.22,15.29,15.35,15.42,15.5,15.57,15.65,15.74,15.82,15.9,15.99,16.07,16.16,16.24,16.32,16.4,16.48,16.55,16.62,16.69,16.75,16.8,16.85,16.89,16.93,16.96,16.98,16.995,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,16.93,16.74,16.43,16.02,15.52,14.94,14.29,13.58,12.82,12.03,11.2,10.35,9.48,8.61,7.74,6.88,6.04,5.22,4.43,3.69,3,2.35,1.77,1.26,0.83,0.48,0.21,0.05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0 15 | PARAM_MOUTH_FORM=0.5,0.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-0.25,-0.29,-0.32,-0.36,-0.39,-0.43,-0.46,-0.49,-0.51,-0.54,-0.555,-0.569,-0.577,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.579,-0.578,-0.575,-0.572,-0.568,-0.563,-0.558,-0.551,-0.545,-0.538,-0.53,-0.523,-0.515,-0.506,-0.498,-0.49,-0.481,-0.473,-0.464,-0.456,-0.448,-0.44,-0.432,-0.425,-0.418,-0.411,-0.405,-0.4,-0.395,-0.391,-0.387,-0.384,-0.382,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.378,-0.374,-0.367,-0.358,-0.347,-0.334,-0.319,-0.304,-0.287,-0.269,-0.25,-0.231,-0.212,-0.193,-0.173,-0.154,-0.135,-0.117,-0.099,-0.082,-0.067,-0.053,-0.04,-0.028,-0.018,-0.011,-0.005,-0.001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.001,0.002,0.003,0.004,0.006,0.007,0.009,0.011,0.012,0.014,0.016,0.017,0.019,0.021,0.022,0.024,0.025,0.026,0.027,0.028,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.029,0.03,0.03,0.028,0.03,0.027,0.03,0.026,0.03,0.024,0.024,0.02,0.022,0.022,0.021,0.02,0.019,0.019,0.018,0.02,0.016,0.016,0.015,0.014,0.01,0.012,0.012,0.011,0.01,0.01,0.009,0.008,0.01,0.006,0.006,0.01,0.005,0.004,0,0.003,0,0,0.002,0,0.001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 34 | PARAM_EYE_BALL_Y=0,0.001,0.005,0.011,0.019,0.029,0.039,0.051,0.063,0.076,0.09,0.103,0.117,0.13,0.143,0.155,0.166,0.177,0.186,0.194,0.201,0.206,0.209,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.208,0.203,0.195,0.183,0.17,0.153,0.135,0.114,0.09,0.07,0.04,0.02,-0.01,-0.04,-0.06,-0.09,-0.12,-0.15,-0.18,-0.21,-0.23,-0.26,-0.29,-0.31,-0.33,-0.35,-0.38,-0.394,-0.41,-0.425,-0.437,-0.447,-0.454,-0.458,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.458,-0.453,-0.445,-0.433,-0.42,-0.404,-0.387,-0.367,-0.35,-0.33,-0.3,-0.28,-0.26,-0.23,-0.21,-0.19,-0.16,-0.14,-0.12,-0.1,-0.081,-0.064,-0.048,-0.034,-0.022,-0.013,-0.006,-0.001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.004,0.014,0.03,0.05,0.08,0.11,0.14,0.17,0.21,0.25,0.29,0.33,0.37,0.41,0.45,0.49,0.52,0.56,0.59,0.62,0.65,0.67,0.686,0.699,0.707,0.71,0.709,0.707,0.704,0.699,0.693,0.686,0.678,0.668,0.658,0.647,0.635,0.622,0.609,0.594,0.579,0.564,0.548,0.531,0.514,0.496,0.479,0.46,0.442,0.423,0.405,0.386,0.367,0.348,0.329,0.31,0.291,0.273,0.255,0.237,0.219,0.202,0.185,0.168,0.152,0.137,0.122,0.108,0.094,0.081,0.069,0.058,0.048,0.038,0.029,0.022,0.015,0.01,0.006,0.003,0.001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 35 | PARAM_ARM_L_B=0 36 | VISIBLE:PARTS_01_ARM_L_A_001=1 37 | VISIBLE:PARTS_01_ARM_R_A_001=1 38 | VISIBLE:PARTS_01_ARM_L_B_001=0 39 | VISIBLE:PARTS_01_ARM_R_B_001=0 -------------------------------------------------------------------------------- /example/assets/haru/motions/pinchIn_00.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=0,0.27,0.96,1.98,3.23,4.62,6.08,7.55,8.99,10.32,11.53,12.53,13.32,13.82,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14 5 | PARAM_BODY_ANGLE_X=0,0,0,0,0.1,0.34,0.67,1.05,1.45,1.84,2.21,2.52,2.78,2.94,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 6 | PARAM_BODY_ANGLE_Y=0,0,0,0,0.36,0.93,1.46,1.85,2,1.84,1.44,0.89,0.25,-0.41,-1.07,-1.69,-2.21,-2.63,-2.9,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3 7 | PARAM_BODY_ANGLE_Z=0 8 | PARAM_ARM_R_B=2,2.16,2.5,2.92,3.36,3.76,4.1,4.32,4.4,4.385,4.35,4.3,4.25,4.22,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=0,-0.19,-0.69,-1.41,-2.31,-3.3,-4.34,-5.4,-6.42,-7.37,-8.24,-8.95,-9.51,-9.87,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10 11 | PARAM_BROW_R_Y=0,0.006,0.02,0.04,0.07,0.1,0.13,0.16,0.19,0.21,0.24,0.26,0.276,0.286,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29 12 | PARAM_ANGLE_X=0,0.36,1.31,2.68,4.38,6.27,8.25,10.25,12.19,14.01,15.65,17,18.07,18.76,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0,0,0,0,0,0,0,0,0.22,0.45,0.31,0.16,0.16,0.16,0.16,0.16,0.51,0.86,0.77,0.67,0.7,0.72,0.58,0.44,0.3,0.16,0.45,0.73,0.746,0.763,0.78,0.797,0.814,0.831,0.51,0.19,0.54,0.89,0.85,0.81,0.76,0.72,0.68,0.64,0.647,0.659,0.44,0.23,0.31,0.39,0.376,0.361,0.18,0,0,0,0,0,0,0 15 | PARAM_MOUTH_FORM=0 16 | PARAM_EYE_L_OPEN=2,1.981,1.93,1.86,1.77,1.67,1.57,1.46,1.36,1.26,1.18,1.11,1.05,1.01,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 17 | PARAM_BUST_Y=0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=0 20 | PARAM_BROW_L_FORM=0,-0.013,-0.05,-0.1,-0.16,-0.22,-0.3,-0.37,-0.44,-0.5,-0.56,-0.61,-0.65,-0.67,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68,-0.68 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0,0.005,0.018,0.037,0.06,0.09,0.11,0.14,0.17,0.19,0.21,0.233,0.247,0.257,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26 24 | PARAM_BROW_R_ANGLE=0 25 | PARAM_EYE_R_SMILE=0 26 | PARAM_ARM_R_A=0.5 27 | PARAM_BROW_R_FORM=0,-0.012,-0.04,-0.09,-0.14,-0.2,-0.26,-0.33,-0.39,-0.45,-0.5,-0.55,-0.58,-0.6,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61,-0.61 28 | PARAM_EYE_R_OPEN=2,1.981,1.93,1.86,1.77,1.67,1.57,1.46,1.36,1.26,1.18,1.11,1.05,1.01,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 29 | PARAM_TERE=0,0.019,0.07,0.14,0.23,0.33,0.43,0.54,0.64,0.74,0.82,0.89,0.95,0.99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=0,-0.011,-0.04,-0.08,-0.13,-0.19,-0.25,-0.31,-0.37,-0.43,-0.48,-0.52,-0.55,-0.57,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58,-0.58 34 | PARAM_EYE_BALL_Y=0,0.005,0.017,0.035,0.06,0.08,0.11,0.13,0.16,0.18,0.21,0.224,0.238,0.247,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25 35 | PARAM_ARM_L_B=2,2.09,2.29,2.54,2.79,3.03,3.22,3.35,3.4,3.385,3.35,3.3,3.25,3.22,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2 36 | VISIBLE:PARTS_01_ARM_L_A_001=0 37 | VISIBLE:PARTS_01_ARM_R_A_001=0 38 | VISIBLE:PARTS_01_ARM_L_B_001=1 39 | VISIBLE:PARTS_01_ARM_R_B_001=1 -------------------------------------------------------------------------------- /example/assets/haru/motions/pinchOut_00.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=0,-0.24,-0.88,-1.85,-3.06,-4.4,-5.82,-7.22,-8.53,-9.69,-10.66,-11.39,-11.84,-12,-11.73,-10.97,-9.77,-8.2,-6.36,-4.24,-1.93,0.51,3,5.49,7.93,10.24,12.36,14.2,15.77,16.97,17.73,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18 5 | PARAM_BODY_ANGLE_X=0,-0.07,-0.21,-0.38,-0.57,-0.73,-0.87,-0.97,-1,-0.93,-0.75,-0.48,-0.16,0.16,0.48,0.75,0.93,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 6 | PARAM_BODY_ANGLE_Y=0 7 | PARAM_BODY_ANGLE_Z=0,-0.07,-0.21,-0.38,-0.57,-0.73,-0.87,-0.97,-1,-0.92,-0.71,-0.38,0.05,0.54,1.08,1.64,2.21,2.77,3.3,3.77,4.19,4.53,4.79,4.95,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=0,0.21,0.76,1.55,2.54,3.63,4.78,5.93,7.06,8.11,9.06,9.84,10.46,10.86,11,10.86,10.49,9.93,9.22,8.41,7.52,6.57,5.63,4.66,3.75,2.89,2.09,1.39,0.82,0.38,0.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0,0,0,0,0,0,0,0,0.36,0.73,0.36,0,0.004,0.008,0.39,0.77,0.68,0.59,0.3,0.02,0.29,0.57,0.48,0.4,0.31,0.22,0.44,0.67,0.45,0.24,0.12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15 | PARAM_MOUTH_FORM=1 16 | PARAM_EYE_L_OPEN=0 17 | PARAM_BUST_Y=0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=1 20 | PARAM_BROW_L_FORM=0 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0 24 | PARAM_BROW_R_ANGLE=0 25 | PARAM_EYE_R_SMILE=1 26 | PARAM_ARM_R_A=0.5,0.5,0.5,0.5,0.5,0.497,0.487,0.473,0.456,0.436,0.42,0.39,0.374,0.357,0.343,0.333,0.33,0.337,0.354,0.38,0.4,0.43,0.46,0.48,0.51,0.524,0.536,0.54,0.539,0.535,0.531,0.526,0.521,0.515,0.511,0.506,0.503,0.501,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5 27 | PARAM_BROW_R_FORM=0 28 | PARAM_EYE_R_OPEN=0 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0,0.03,0.1,0.21,0.33,0.46,0.58,0.69,0.76,0.79,0.76,0.7,0.6,0.47,0.34,0.2,0.05,-0.09,-0.22,-0.34,-0.44,-0.51,-0.56,-0.58,-0.571,-0.55,-0.5,-0.45,-0.39,-0.32,-0.24,-0.16,-0.07,0.01,0.09,0.17,0.24,0.3,0.35,0.4,0.42,0.43,0.419,0.39,0.36,0.33,0.31,0.28,0.266,0.26 31 | PARAM_HAIR_FRONT=0,0.02,0.08,0.17,0.27,0.38,0.48,0.57,0.63,0.65,0.63,0.57,0.49,0.4,0.29,0.17,0.06,-0.06,-0.16,-0.26,-0.33,-0.4,-0.44,-0.45,-0.442,-0.42,-0.38,-0.33,-0.28,-0.21,-0.14,-0.07,0.01,0.09,0.16,0.23,0.3,0.35,0.4,0.44,0.46,0.47,0.454,0.42,0.37,0.33,0.29,0.25,0.23,0.22 32 | PARAM_ARM_L_A=0.5,0.5,0.5,0.5,0.5,0.497,0.489,0.477,0.461,0.444,0.425,0.406,0.389,0.373,0.361,0.353,0.35,0.356,0.371,0.39,0.42,0.44,0.47,0.49,0.51,0.526,0.536,0.54,0.539,0.535,0.531,0.526,0.521,0.515,0.511,0.506,0.503,0.501,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5 33 | PARAM_EYE_BALL_X=0 34 | PARAM_EYE_BALL_Y=0 35 | PARAM_ARM_L_B=0 36 | VISIBLE:PARTS_01_ARM_L_A_001=1 37 | VISIBLE:PARTS_01_ARM_R_A_001=1 38 | VISIBLE:PARTS_01_ARM_L_B_001=0 39 | VISIBLE:PARTS_01_ARM_R_B_001=0 -------------------------------------------------------------------------------- /example/assets/haru/motions/shake_00.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26 4 | PARAM_ANGLE_Z=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.85,2.69,4.99,7.37,9.55,11.35,12.55,13,12.38,10.72,8.16,4.94,1.37,-2.5,-6.37,-9.94,-13.16,-15.72,-17.38,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18 5 | PARAM_BODY_ANGLE_X=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.26,-0.83,-1.54,-2.27,-2.94,-3.49,-3.86,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4 6 | PARAM_BODY_ANGLE_Y=5,4.67,3.96,3.08,2.16,1.33,0.63,0.17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7 | PARAM_BODY_ANGLE_Z=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2,0.62,1.15,1.7,2.2,2.62,2.9,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.52,-1.66,-3.07,-4.54,-5.88,-6.99,-7.72,-8,-7.86,-7.49,-6.91,-6.18,-5.37,-4.5,-3.63,-2.82,-2.09,-1.51,-1.14,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.13,-0.42,-0.8,-1.24,-1.7,-2.16,-2.6,-3,-3.4,-3.74,-4.03,-4.28,-4.47,-4.64,-4.77,-4.86,-4.93,-4.97,-4.99,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0,0,0,0,0,0,0,0,0.24,0.49,0.45,0.42,0.32,0.22,0.31,0.39,0.21,0.03,0.048,0.064,0.08,0.096,0.112,0.128,0.145,0.161,0.177,0.193,0.209,0.225,0.242,0.258,0.274,0.29,0.46,0.63,0.56,0.5,0.51,0.518,0.26,0,0,0,0.23,0.45,0.458,0.461,0.464,0.467,0.47,0.473,0.475,0.478,0.24,0,0,0,0.27,0.54,0.541,0.54,0.54,0.539,0.538,0.54,0.537,0.536,0.54,0.535,0.534,0.53,0.27,0,0,0,0,0,0,0,0,0 15 | PARAM_MOUTH_FORM=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.02,0.08,0.15,0.22,0.28,0.33,0.37,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38 16 | PARAM_EYE_L_OPEN=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1.996,1.982,1.96,1.93,1.89,1.83,1.77,1.7,1.61,1.52,1.41,1.29,1.15,1,0.78,0.59,0.43,0.28,0.16,0.07,0.02,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 17 | PARAM_BUST_Y=0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.07,0.21,0.38,0.57,0.73,0.87,0.97,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 20 | PARAM_BROW_L_FORM=0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.47,0.32,0.13,-0.06,-0.24,-0.39,-0.48,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0 24 | PARAM_BROW_R_ANGLE=0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26 25 | PARAM_EYE_R_SMILE=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.07,0.21,0.38,0.57,0.73,0.87,0.97,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 26 | PARAM_ARM_R_A=0,0.03,0.1,0.19,0.28,0.37,0.44,0.48,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.506,0.523,0.55,0.58,0.62,0.66,0.7,0.74,0.79,0.83,0.87,0.9,0.94,0.96,0.983,0.996,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 27 | PARAM_BROW_R_FORM=0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.58,0.51,0.35,0.16,-0.04,-0.23,-0.38,-0.48,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52,-0.52 28 | PARAM_EYE_R_OPEN=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1.996,1.982,1.96,1.93,1.89,1.83,1.77,1.7,1.61,1.52,1.41,1.29,1.15,1,0.78,0.59,0.43,0.28,0.16,0.07,0.02,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 29 | PARAM_TERE=0.5 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0,0.03,0.1,0.19,0.28,0.37,0.44,0.48,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.506,0.523,0.55,0.58,0.62,0.66,0.7,0.74,0.79,0.83,0.87,0.9,0.94,0.96,0.983,0.996,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 33 | PARAM_EYE_BALL_X=0 34 | PARAM_EYE_BALL_Y=0 35 | PARAM_ARM_L_B=0 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_00.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0.13 4 | PARAM_ANGLE_Z=-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-14.23,-12.29,-9.67,-6.61,-3.42,-0.28,2.69,5.2,7.22,8.52,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9 5 | PARAM_BODY_ANGLE_X=-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-4.94,-4.77,-4.56,-4.3,-4.04,-3.77,-3.53,-3.32,-3.15,-3.04,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3 6 | PARAM_BODY_ANGLE_Y=0 7 | PARAM_BODY_ANGLE_Z=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.13,-0.45,-0.89,-1.4,-1.93,-2.45,-2.95,-3.37,-3.7,-3.92,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4 8 | PARAM_ARM_R_B=-1 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-15.49,-14.2,-12.45,-10.4,-8.28,-6.19,-4.2,-2.54,-1.19,-0.32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,16.45,15.08,13.23,11.05,8.8,6.57,4.47,2.69,1.26,0.34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0,0,0,0,0,0,0,0,0.32,0.64,0.46,0.29,0.31,0.34,0.28,0.22,0.43,0.64,0.32,0,0.31,0.61,0.54,0.47,0.24,0,0.27,0.53,0.514,0.494,0.475,0.455,0.28,0.11,0.32,0.53,0.528,0.523,0.518,0.512,0.507,0.502,0.25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15 | PARAM_MOUTH_FORM=0 16 | PARAM_EYE_L_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 17 | PARAM_BUST_Y=0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=0 20 | PARAM_BROW_L_FORM=0.38 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0 24 | PARAM_BROW_R_ANGLE=0.19 25 | PARAM_EYE_R_SMILE=0 26 | PARAM_ARM_R_A=0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.694,0.68,0.66,0.64,0.61,0.59,0.57,0.549,0.533,0.524,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52,0.52 27 | PARAM_BROW_R_FORM=0.38 28 | PARAM_EYE_R_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.484,-0.44,-0.39,-0.33,-0.26,-0.19,-0.13,-0.08,-0.04,-0.01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 34 | PARAM_EYE_BALL_Y=0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.79,0.76,0.7,0.61,0.51,0.41,0.31,0.21,0.13,0.06,0.02,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 35 | PARAM_ARM_L_B=3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.4,3.419,3.47,3.53,3.61,3.69,3.77,3.84,3.9,3.96,3.99,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 36 | VISIBLE:PARTS_01_ARM_L_A_001=0 37 | VISIBLE:PARTS_01_ARM_R_A_001=0 38 | VISIBLE:PARTS_01_ARM_L_B_001=1 39 | VISIBLE:PARTS_01_ARM_R_B_001=1 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_01.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.22,0.216,0.205,0.189,0.169,0.15,0.12,0.1,0.08,0.06,0.039,0.023,0.011,0.003,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 4 | PARAM_ANGLE_Z=-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-10.79,-10.18,-9.23,-8.02,-6.58,-5.01,-3.35,-1.65,0.01,1.58,3.02,4.23,5.18,5.79,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 5 | PARAM_BODY_ANGLE_X=-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1.96,-1.86,-1.72,-1.54,-1.34,-1.13,-0.92,-0.72,-0.53,-0.35,-0.21,-0.1,-0.03,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6 | PARAM_BODY_ANGLE_Y=-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-0.981,-0.93,-0.86,-0.77,-0.67,-0.57,-0.46,-0.36,-0.26,-0.18,-0.11,-0.05,-0.01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7 | PARAM_BODY_ANGLE_Z=0 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.45,-1.55,-3,-4.45,-5.55,-6,-5.79,-5.24,-4.44,-3.49,-2.51,-1.56,-0.76,-0.21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 11 | PARAM_BROW_R_Y=0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.307,0.299,0.287,0.273,0.257,0.241,0.224,0.207,0.192,0.178,0.167,0.158,0.152,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15 12 | PARAM_ANGLE_X=0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0,0,0,0,0,0,0,0,0.24,0.48,0.36,0.24,0.12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.21,0.42,0.46,0.51,0.56,0.6,0.47,0.35,0.5,0.66,0.39,0.12,0.06,0,0.3,0.6,0.56,0.51,0.56,0.61,0.53,0.45,0.23,0,0,0,0,0,0,0,0,0 15 | PARAM_MOUTH_FORM=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.01,0.04,0.08,0.12,0.18,0.23,0.29,0.35,0.4,0.44,0.48,0.51,0.533,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54 16 | PARAM_EYE_L_OPEN=1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.26,1.259,1.256,1.251,1.244,1.234,1.221,1.206,1.187,1.17,1.14,1.11,1.08,1.04,1,0.73,0.34,0.08,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 17 | PARAM_BUST_Y=0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=0 20 | PARAM_BROW_L_FORM=0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.417,0.408,0.395,0.378,0.361,0.342,0.323,0.304,0.287,0.272,0.259,0.249,0.242,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.268,0.262,0.253,0.242,0.23,0.218,0.205,0.193,0.182,0.171,0.163,0.156,0.152,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15 24 | PARAM_BROW_R_ANGLE=0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.26,0.255,0.242,0.223,0.2,0.17,0.15,0.12,0.09,0.07,0.05,0.027,0.013,0.003,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 25 | PARAM_EYE_R_SMILE=0 26 | PARAM_ARM_R_A=0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.72,0.68,0.63,0.6,0.59,0.603,0.64,0.68,0.73,0.79,0.84,0.89,0.94,0.97,0.99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 27 | PARAM_BROW_R_FORM=0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.426,0.417,0.403,0.386,0.367,0.347,0.327,0.308,0.29,0.274,0.26,0.249,0.242,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24 28 | PARAM_EYE_R_OPEN=1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.29,1.289,1.286,1.28,1.272,1.26,1.246,1.229,1.208,1.18,1.16,1.12,1.09,1.05,1,0.73,0.34,0.08,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.72,0.69,0.65,0.62,0.59,0.58,0.593,0.63,0.67,0.73,0.78,0.84,0.89,0.93,0.97,0.99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 33 | PARAM_EYE_BALL_X=0 34 | PARAM_EYE_BALL_Y=0 35 | PARAM_ARM_L_B=0 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_02.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13.85,13.43,12.8,11.98,11.02,9.93,8.76,7.55,6.3,5.03,3.79,2.59,1.44,0.4,-0.56,-1.39,-2.06,-2.56,-2.89,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3 5 | PARAM_BODY_ANGLE_X=0,-0.06,-0.24,-0.53,-0.91,-1.37,-1.88,-2.44,-3.04,-3.65,-4.27,-4.9,-5.49,-6.05,-6.56,-7,-7.38,-7.71,-7.99,-8.23,-8.43,-8.58,-8.71,-8.81,-8.88,-8.93,-8.97,-8.988,-8.997,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 6 | PARAM_BODY_ANGLE_Y=0,-0.05,-0.19,-0.42,-0.7,-1.04,-1.41,-1.8,-2.2,-2.59,-2.96,-3.3,-3.58,-3.81,-3.95,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4 7 | PARAM_BODY_ANGLE_Z=0 8 | PARAM_ARM_R_B=0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.894,0.877,0.85,0.81,0.77,0.72,0.67,0.61,0.55,0.49,0.43,0.37,0.31,0.25,0.2,0.15,0.11,0.07,0.04,0.02,0.005,0,0,0,0,0,0,0,0,0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14.29,-15.01,-16,-17.15,-18.34,-19.52,-20.64,-21.57,-22.33,-22.82,-23,-22.59,-21.48,-19.88,-17.98,-16.02,-14.12,-12.52,-11.41,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10.71,9.99,9,7.85,6.66,5.48,4.36,3.43,2.67,2.18,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0,0,0,0,0,0,0,0,0.03,0.05,0.2,0.35,0.42,0.49,0.38,0.27,0.42,0.56,0.584,0.604,0.51,0.41,0.23,0.05,0.35,0.64,0.5,0.36,0.365,0.369,0.373,0.376,0.51,0.64,0.54,0.44,0.34,0.24,0.34,0.44,0.425,0.412,0.398,0.384,0.44,0.49,0.37,0.25,0.12,0,0,0,0,0,0,0,0,0,0,0,0 15 | PARAM_MOUTH_FORM=0 16 | PARAM_EYE_L_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 17 | PARAM_BUST_Y=0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=0 20 | PARAM_BROW_L_FORM=-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72,-0.72 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0 24 | PARAM_BROW_R_ANGLE=0 25 | PARAM_EYE_R_SMILE=0 26 | PARAM_ARM_R_A=0.5 27 | PARAM_BROW_R_FORM=-0.73 28 | PARAM_EYE_R_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 29 | PARAM_TERE=1 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=-0.82,-0.818,-0.811,-0.8,-0.787,-0.771,-0.753,-0.734,-0.716,-0.697,-0.679,-0.663,-0.65,-0.639,-0.632,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.63,-0.625,-0.612,-0.591,-0.56,-0.53,-0.5,-0.46,-0.42,-0.38,-0.34,-0.3,-0.26,-0.22,-0.19,-0.16,-0.13,-0.11,-0.094,-0.084,-0.08,-0.08,-0.08,-0.08,-0.08,-0.08,-0.08,-0.08,-0.08,-0.08,-0.08 34 | PARAM_EYE_BALL_Y=-0.5,-0.498,-0.494,-0.487,-0.479,-0.469,-0.458,-0.446,-0.434,-0.422,-0.411,-0.401,-0.393,-0.386,-0.382,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.372,-0.35,-0.32,-0.27,-0.22,-0.16,-0.1,-0.03,0.04,0.11,0.17,0.24,0.3,0.36,0.41,0.45,0.49,0.52,0.534,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54 35 | PARAM_ARM_L_B=2.8,2.801,2.805,2.81,2.818,2.826,2.835,2.845,2.855,2.865,2.874,2.882,2.89,2.895,2.899,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.9,2.881,2.83,2.74,2.62,2.49,2.33,2.15,1.97,1.77,1.58,1.37,1.18,0.99,0.8,0.63,0.48,0.34,0.22,0.13,0.06,0.01,0,0,0,0,0,0,0,0,0 36 | VISIBLE:PARTS_01_ARM_L_A_001=0 37 | VISIBLE:PARTS_01_ARM_R_A_001=0 38 | VISIBLE:PARTS_01_ARM_L_B_001=1 39 | VISIBLE:PARTS_01_ARM_R_B_001=1 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_03.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=0 5 | PARAM_BODY_ANGLE_X=0 6 | PARAM_BODY_ANGLE_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.08,0.26,0.5,0.74,0.92,1,0.9,0.62,0.22,-0.25,-0.75,-1.22,-1.62,-1.9,-2,-1.96,-1.85,-1.69,-1.49,-1.27,-1.03,-0.8,-0.58,-0.39,-0.22,-0.1,-0.03,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7 | PARAM_BODY_ANGLE_Z=0 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.6,2.06,4,5.94,7.4,8,7.04,4.45,0.72,-3.71,-8.29,-12.72,-16.45,-19.04,-20,-19.6,-18.53,-16.92,-14.9,-12.67,-10.29,-7.96,-5.78,-3.86,-2.24,-1.02,-0.26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0 15 | PARAM_MOUTH_FORM=1 16 | PARAM_EYE_L_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.93,0.75,0.53,0.32,0.15,0.04,0,0,0,0,0,0,0,0,0,0,0.07,0.21,0.38,0.57,0.73,0.87,0.97,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 17 | PARAM_BUST_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.08,-0.21,-0.33,-0.42,-0.45,-0.39,-0.25,-0.06,0.14,0.28,0.34,0.28,0.12,-0.06,-0.25,-0.39,-0.49,-0.52,-0.46,-0.34,-0.18,-0.02,0.13,0.25,0.33,0.36,0.32,0.24,0.13,0.03,-0.05,-0.1,-0.12,-0.111,-0.09,-0.06,-0.03,-0.01,0,0,0,0,0,0,0,0,0,0 18 | PARAM_EYE_FORM=0.5 19 | PARAM_EYE_L_SMILE=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.07,0.25,0.47,0.68,0.85,0.96,1,1,1,1,1,1,1,1,1,1,0.93,0.79,0.62,0.43,0.27,0.13,0.03,0,0,0,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EN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.93,0.75,0.53,0.32,0.15,0.04,0,0,0,0,0,0,0,0,0,0,0.07,0.21,0.38,0.57,0.73,0.87,0.97,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=0 34 | PARAM_EYE_BALL_Y=0 35 | PARAM_ARM_L_B=0 36 | VISIBLE:PARTS_01_ARM_L_A_001=1 37 | VISIBLE:PARTS_01_ARM_R_A_001=1 38 | VISIBLE:PARTS_01_ARM_L_B_001=0 39 | VISIBLE:PARTS_01_ARM_R_B_001=0 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_04.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5 4 | PARAM_ANGLE_Z=-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-14.78,-14.21,-13.45,-12.55,-11.62,-10.71,-9.84,-9.11,-8.52,-8.14,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8 5 | PARAM_BODY_ANGLE_X=-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-7.66,-6.9,-6,-5.05,-4.39,-3.89,-3.53,-3.28,-3.12,-3.03,-3,-3,-3,-3,-3,-3,-3,-2.97,-2.9,-2.78,-2.62,-2.44,-2.22,-1.99,-1.75,-1.5,-1.25,-1.01,-0.78,-0.56,-0.38,-0.22,-0.1,-0.03,0,0,0,0,0,0,0,0,0,0,0 6 | PARAM_BODY_ANGLE_Y=0 7 | PARAM_BODY_ANGLE_Z=5 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-13.97,-13.89,-13.78,-13.65,-13.52,-13.39,-13.26,-13.16,-13.07,-13.02,-13,-13,-13,-13,-13,-13,-13,-12.96,-12.83,-12.63,-12.37,-12.06,-11.71,-11.32,-10.92,-10.5,-10.08,-9.68,-9.29,-8.94,-8.63,-8.37,-8.17,-8.04,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-13.11,-8.34,-2.17,4.36,10.38,15.36,19,22.21,23.04,23.06,23,23,23,23,23,23,23,22.87,22.48,21.88,21.1,20.18,19.12,17.96,16.75,15.5,14.25,13.04,11.88,10.82,9.9,9.12,8.52,8.13,8,8,8,8,8,8,8,8,8,8,8 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0 15 | PARAM_MOUTH_FORM=-1 16 | PARAM_EYE_L_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1 17 | PARAM_BUST_Y=0 18 | PARAM_EYE_FORM=-1 19 | PARAM_EYE_L_SMILE=0 20 | PARAM_BROW_L_FORM=-0.5 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0 24 | PARAM_BROW_R_ANGLE=-0.5 25 | PARAM_EYE_R_SMILE=0 26 | PARAM_ARM_R_A=-1 27 | PARAM_BROW_R_FORM=-0.5 28 | PARAM_EYE_R_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=-1 33 | PARAM_EYE_BALL_X=0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.43,0.447,0.49,0.55,0.62,0.69,0.76,0.82,0.88,0.92,0.95,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.95,0.92,0.87,0.81,0.74,0.66,0.57,0.48,0.38,0.29,0.2,0.11,0.03,-0.04,-0.1,-0.15,-0.18,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19 34 | PARAM_EYE_BALL_Y=0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.337,0.354,0.38,0.4,0.43,0.46,0.48,0.51,0.524,0.536,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.543,0.547,0.551,0.557,0.563,0.57,0.578,0.585,0.592,0.6,0.607,0.613,0.619,0.623,0.627,0.629,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63,0.63 35 | PARAM_ARM_L_B=0 36 | VISIBLE:PARTS_01_ARM_L_A_001=1 37 | VISIBLE:PARTS_01_ARM_R_A_001=1 38 | VISIBLE:PARTS_01_ARM_L_B_001=0 39 | VISIBLE:PARTS_01_ARM_R_B_001=0 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_05.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-3.93,-3.72,-3.41,-2.99,-2.5,-1.93,-1.31,-0.67,0,0.67,1.31,1.93,2.5,2.99,3.41,3.72,3.93,4,3.9,3.61,3.17,2.6,1.92,1.18,0.4,-0.4,-1.18,-1.92,-2.6,-3.17,-3.61,-3.9,-4,-3.91,-3.66,-3.28,-2.78,-2.21,-1.57,-0.92,-0.25,0.39,1.01,1.57,2.06,2.46,2.75,2.94,3,2.97,2.9,2.78,2.62,2.44,2.22,1.99,1.75,1.5,1.25,1.01,0.78,0.56,0.38,0.22,0.1,0.03,0,0,0,0,0,0,0,0,0,0,0 5 | PARAM_BODY_ANGLE_X=-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-0.96,-0.86,-0.7,-0.49,-0.25,0.04,0.34,0.67,1,1.33,1.66,1.96,2.25,2.49,2.7,2.86,2.96,3,2.89,2.59,2.15,1.62,1.02,0.39,-0.24,-0.85,-1.42,-1.94,-2.37,-2.71,-2.92,-3,-2.95,-2.81,-2.59,-2.3,-1.98,-1.61,-1.24,-0.86,-0.49,-0.14,0.18,0.46,0.69,0.86,0.96,1,0.991,0.97,0.93,0.87,0.81,0.74,0.66,0.58,0.5,0.42,0.34,0.26,0.19,0.13,0.07,0.03,0.01,0,0,0,0,0,0,0,0,0,0 6 | PARAM_BODY_ANGLE_Y=0 7 | PARAM_BODY_ANGLE_Z=0 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6.003,-6.014,-6.032,-6.06,-6.1,-6.15,-6.21,-6.28,-6.37,-6.48,-6.6,-6.74,-6.9,-7.07,-7.27,-7.49,-7.73,-8,-8.28,-8.56,-8.85,-9.12,-9.4,-9.66,-9.9,-10.13,-10.34,-10.53,-10.69,-10.82,-10.92,-10.98,-11,-11.003,-11.008,-11.014,-11.017,-11.014,-11.003,-10.98,-10.95,-10.9,-10.83,-10.74,-10.64,-10.51,-10.36,-10.19,-10,-9.7,-9.29,-8.78,-8.18,-7.52,-6.8,-6.04,-5.26,-4.48,-3.71,-2.97,-2.28,-1.65,-1.11,-0.65,-0.3,-0.08,0,0,0,0,0,0,0,0,0,0,0 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-11.67,-10.73,-9.25,-7.31,-5.04,-2.42,0.42,3.42,6.5,9.58,12.58,15.42,18.04,20.31,22.25,23.73,24.67,25,24.37,22.59,19.79,16.23,11.99,7.37,2.49,-2.49,-7.37,-11.99,-16.23,-19.79,-22.59,-24.37,-25,-24.39,-22.68,-20.04,-16.64,-12.7,-8.35,-3.88,0.69,5.13,9.37,13.17,16.53,19.27,21.29,22.57,23,22.79,22.21,21.29,20.09,18.67,17.05,15.28,13.41,11.5,9.59,7.72,5.95,4.33,2.91,1.71,0.79,0.21,0,0,0,0,0,0,0,0,0,0,0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0 15 | PARAM_MOUTH_FORM=-1 16 | PARAM_EYE_L_OPEN=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.14,0.37,0.59,0.74,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8 17 | PARAM_BUST_Y=0,0.001,0.004,0.009,0.016,0.024,0.033,0.044,0.056,0.069,0.083,0.098,0.113,0.128,0.144,0.16,0.176,0.192,0.207,0.222,0.237,0.251,0.264,0.276,0.287,0.296,0.304,0.311,0.316,0.319,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=0 20 | PARAM_BROW_L_FORM=-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.14,0.37,0.59,0.74,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=0 34 | PARAM_EYE_BALL_Y=0 35 | PARAM_ARM_L_B=0 36 | VISIBLE:PARTS_01_ARM_L_A_001=0 37 | VISIBLE:PARTS_01_ARM_R_A_001=0 38 | VISIBLE:PARTS_01_ARM_L_B_001=1 39 | VISIBLE:PARTS_01_ARM_R_B_001=1 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_06.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-16.6,-15.52,-13.87,-11.82,-9.46,-6.88,-4.12,-1.37,1.43,4.08,6.59,8.91,10.95,12.62,13.9,14.71,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 5 | PARAM_BODY_ANGLE_X=-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-9.9,-9.66,-9.33,-8.95,-8.55,-8.16,-7.79,-7.48,-7.22,-7.06,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7 6 | PARAM_BODY_ANGLE_Y=0 7 | PARAM_BODY_ANGLE_Z=5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,4.92,4.72,4.41,4.03,3.59,3.1,2.59,2.07,1.54,1.05,0.58,0.14,-0.24,-0.55,-0.79,-0.95,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 8 | PARAM_ARM_R_B=5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,4.996,4.986,4.969,4.95,4.92,4.9,4.87,4.84,4.81,4.79,4.76,4.74,4.723,4.711,4.703,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7,4.7 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5.1,-5.37,-5.78,-6.29,-6.89,-7.53,-8.22,-8.91,-9.61,-10.27,-10.9,-11.48,-11.99,-12.41,-12.72,-12.93,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-20.85,-20.45,-19.83,-19.06,-18.17,-17.2,-16.17,-15.14,-14.09,-13.1,-12.15,-11.29,-10.52,-9.89,-9.41,-9.11,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0 15 | PARAM_MOUTH_FORM=0 16 | PARAM_EYE_L_OPEN=0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.61,0.29,0.07,0,0,0,0.14,0.37,0.59,0.74,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8 17 | PARAM_BUST_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.014,-0.05,-0.11,-0.17,-0.24,-0.3,-0.36,-0.4,-0.41,-0.396,-0.36,-0.3,-0.23,-0.15,-0.07,0.01,0.09,0.16,0.22,0.26,0.27,0.24,0.15,0.05,-0.04,-0.12,-0.17,-0.19,-0.176,-0.14,-0.1,-0.05,-0.01,0,0,0,0,0,0,0,0,0,0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=0 20 | PARAM_BROW_L_FORM=0 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0 24 | PARAM_BROW_R_ANGLE=0 25 | PARAM_EYE_R_SMILE=0 26 | PARAM_ARM_R_A=0.5 27 | PARAM_BROW_R_FORM=0 28 | PARAM_EYE_R_OPEN=0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.61,0.29,0.07,0,0,0,0.14,0.37,0.59,0.74,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.82,-0.76,-0.62,-0.44,-0.21,0.01,0.24,0.46,0.64,0.78,0.88,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91,0.91 34 | PARAM_EYE_BALL_Y=0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.31,0.25,0.17,0.08,-0.01,-0.11,-0.19,-0.27,-0.33,-0.37,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38,-0.38 35 | PARAM_ARM_L_B=-1 36 | VISIBLE:PARTS_01_ARM_L_A_001=0 37 | VISIBLE:PARTS_01_ARM_R_A_001=0 38 | VISIBLE:PARTS_01_ARM_L_B_001=1 39 | VISIBLE:PARTS_01_ARM_R_B_001=1 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_07.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=-17,-16.85,-16.43,-15.74,-14.81,-13.65,-12.31,-10.79,-9.11,-7.29,-5.35,-3.28,-1.17,1.04,3.26,5.5,7.74,9.96,12.17,14.28,16.35,18.29,20.11,21.79,23.31,24.65,25.81,26.74,27.43,27.85,28,28,28,28,28,28,28,28,28,28,28,28,28,28,27.93,27.71,27.36,26.88,26.28,25.58,24.8,23.92,22.97,21.95,20.88,19.76,18.6,17.42,16.21,15,13.81,13,12.47,12.16,12.03,12,12.85,14.69,16.99,19.37,21.55,23.35,24.55,25,25,25,25,25,25,25,25,24.94,24.75,24.45,24.01,23.45,22.76,21.91,20.94,19.79,18.5,17,15.11,13.32,11.64,10.17,8.88,7.83,7.02,6.45,6.11,6,6,6,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ARM_R_B=-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-0.993,-0.974,-0.94,-0.91,-0.86,-0.8,-0.74,-0.68,-0.61,-0.54,-0.46,-0.39,-0.32,-0.26,-0.2,-0.14,-0.09,-0.06,-0.03,-0.007,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-9.987,-9.95,-9.9,-9.83,-9.74,-9.65,-9.56,-9.46,-9.37,-9.28,-9.2,-9.13,-9.08,-9.04,-9.01,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9.13,-9.45,-9.89,-10.4,-10.93,-11.45,-11.95,-12.37,-12.7,-12.92,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,16.87,16.52,15.97,15.26,14.44,13.53,12.6,11.65,10.72,9.84,9.05,8.35,7.78,7.36,7.09,7,7.15,7.55,8.13,8.85,9.64,10.47,11.32,12.13,12.9,13.59,14.16,14.61,14.9,15,15,15,15,15,15,15,15,14.9,14.66,14.33,13.95,13.55,13.16,12.79,12.48,12.22,12.06,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0 15 | PARAM_MOUTH_FORM=1 16 | PARAM_EYE_L_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.07,0.21,0.38,0.57,0.73,0.87,0.97,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 17 | PARAM_BUST_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.11,-0.29,-0.41,-0.45,-0.41,-0.32,-0.18,-0.03,0.14,0.29,0.42,0.52,0.58,0.6,0.57,0.48,0.35,0.2,0.04,-0.11,-0.24,-0.33,-0.36,-0.32,-0.23,-0.13,-0.01,0.09,0.17,0.23,0.25,0.231,0.19,0.13,0.06,0.02,0,0,0,0,0,0,0,0,0,0 18 | PARAM_EYE_FORM=0.5 19 | PARAM_EYE_L_SMILE=0 20 | PARAM_BROW_L_FORM=0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,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0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2 28 | PARAM_EYE_R_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.07,0.21,0.38,0.57,0.73,0.87,0.97,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.47,-0.469,-0.466,-0.461,-0.454,-0.447,-0.439,-0.43,-0.422,-0.414,-0.406,-0.398,-0.392,-0.387,-0.383,-0.381,-0.38,-0.382,-0.388,-0.397,-0.409,-0.424,-0.442,-0.46,-0.481,-0.5,-0.52,-0.55,-0.57,-0.59,-0.61,-0.628,-0.646,-0.661,-0.673,-0.682,-0.688,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69 34 | PARAM_EYE_BALL_Y=0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.496,0.486,0.47,0.45,0.43,0.4,0.37,0.34,0.32,0.29,0.27,0.249,0.233,0.22,0.213,0.21,0.21,0.212,0.214,0.218,0.221,0.226,0.231,0.236,0.242,0.247,0.253,0.258,0.264,0.269,0.274,0.279,0.282,0.286,0.288,0.289,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29,0.29 35 | PARAM_ARM_L_B=3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3.015,3.06,3.12,3.21,3.31,3.42,3.53,3.64,3.75,3.86,3.95,4.04,4.11,4.16,4.19,4.2,4.194,4.179,4.16,4.13,4.1,4.07,4.04,4.01,3.98,3.95,3.93,3.915,3.904,3.9,3.9,3.9,3.9,3.9,3.9,3.9,3.9,3.87,3.8,3.68,3.53,3.34,3.12,2.89,2.63,2.36,2.09,1.81,1.54,1.27,1.01,0.78,0.56,0.37,0.22,0.1,0.03,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 36 | VISIBLE:PARTS_01_ARM_L_A_001=0 37 | VISIBLE:PARTS_01_ARM_R_A_001=0 38 | VISIBLE:PARTS_01_ARM_L_B_001=1 39 | VISIBLE:PARTS_01_ARM_R_B_001=1 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_08.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,17.65,16.66,15.1,13.06,10.66,7.91,4.91,1.74,-1.5,-4.74,-7.91,-10.91,-13.66,-16.06,-18.1,-19.66,-20.65,-21,-20.29,-18.46,-15.78,-12.46,-8.78,-4.93,-1.04,2.75,6.28,9.47,12.11,14.19,15.53,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 5 | PARAM_BODY_ANGLE_X=3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2.991,2.97,2.93,2.87,2.81,2.74,2.66,2.58,2.5,2.42,2.34,2.26,2.19,2.13,2.07,2.03,2.01,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 6 | PARAM_BODY_ANGLE_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.07,-0.25,-0.52,-0.84,-1.16,-1.48,-1.75,-1.93,-2,-1.93,-1.75,-1.48,-1.16,-0.84,-0.52,-0.25,-0.07,0,-0.13,-0.41,-0.77,-1.13,-1.47,-1.75,-1.93,-2,-1.85,-1.48,-1,-0.52,-0.15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3 12 | PARAM_ANGLE_X=10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9.87,9.52,8.96,8.23,7.37,6.38,5.3,4.16,3,1.84,0.7,-0.38,-1.37,-2.23,-2.96,-3.52,-3.87,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0 15 | PARAM_MOUTH_FORM=1 16 | PARAM_EYE_L_OPEN=0 17 | PARAM_BUST_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.16,0.42,0.59,0.65,0.58,0.43,0.24,0.04,-0.14,-0.29,-0.39,-0.43,-0.4,-0.32,-0.21,-0.08,0.06,0.19,0.3,0.38,0.41,0.34,0.18,-0.01,-0.21,-0.36,-0.46,-0.49,-0.42,-0.25,-0.05,0.16,0.35,0.51,0.61,0.65,0.58,0.41,0.19,-0.01,-0.18,-0.28,-0.32,-0.28,-0.19,-0.07,0.06,0.15,0.19,0.16,0.1,0.05,0.01,0,0,0,0,0,0,0,0,0,0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=1 20 | PARAM_BROW_L_FORM=0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,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2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2 28 | PARAM_EYE_R_OPEN=0 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5 33 | PARAM_EYE_BALL_X=-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32,-0.32 34 | PARAM_EYE_BALL_Y=0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54,0.54 35 | PARAM_ARM_L_B=2.5 36 | VISIBLE:PARTS_01_ARM_L_A_001=0 37 | VISIBLE:PARTS_01_ARM_R_A_001=0 38 | VISIBLE:PARTS_01_ARM_L_B_001=1 39 | VISIBLE:PARTS_01_ARM_R_B_001=1 -------------------------------------------------------------------------------- /example/assets/haru/motions/tapBody_09.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.018,-0.05,-0.07,-0.092,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,-0.1 4 | PARAM_ANGLE_Z=0 5 | PARAM_BODY_ANGLE_X=0 6 | PARAM_BODY_ANGLE_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.89,2.32,3.66,4.62,5,4.84,4.44,3.89,3.25,2.59,1.93,1.31,0.79,0.37,0.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7 | PARAM_BODY_ANGLE_Z=0 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=0 11 | PARAM_BROW_R_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.05,0.14,0.22,0.28,0.3,0.3,0.3,0.3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.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.47,0.42,0.38,0.34,0.33,0.343,0.38,0.42,0.48,0.53,0.59,0.64,0.68,0.72,0.74,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75 33 | PARAM_EYE_BALL_X=0 34 | PARAM_EYE_BALL_Y=0 35 | PARAM_ARM_L_B=0 36 | VISIBLE:PARTS_01_ARM_L_A_001=1 37 | VISIBLE:PARTS_01_ARM_R_A_001=1 38 | VISIBLE:PARTS_01_ARM_L_B_001=0 39 | VISIBLE:PARTS_01_ARM_R_B_001=0 -------------------------------------------------------------------------------- /example/assets/haru/sounds/flickHead_00.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/sounds/flickHead_00.mp3 -------------------------------------------------------------------------------- /example/assets/haru/sounds/pinchIn_00.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/sounds/pinchIn_00.mp3 -------------------------------------------------------------------------------- /example/assets/haru/sounds/pinchOut_00.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/sounds/pinchOut_00.mp3 -------------------------------------------------------------------------------- /example/assets/haru/sounds/shake_00.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/sounds/shake_00.mp3 -------------------------------------------------------------------------------- /example/assets/haru/sounds/tapBody_00.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/sounds/tapBody_00.mp3 -------------------------------------------------------------------------------- /example/assets/haru/sounds/tapBody_01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/sounds/tapBody_01.mp3 -------------------------------------------------------------------------------- /example/assets/haru/sounds/tapBody_02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/assets/haru/sounds/tapBody_02.mp3 -------------------------------------------------------------------------------- /example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Pixi-Live2D 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 35 | 36 | 37 |
38 |

click head to sing a song; click body to emit a motion

39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | const PIXI = require('pixi.js'); 2 | import '../src/index'; 3 | 4 | const renderer = new PIXI.WebGLRenderer(800, 600); 5 | document.getElementById('app').appendChild(renderer.view); 6 | const stage = new PIXI.Container(); 7 | 8 | const modelHaru = { 9 | "type":"Live2D Model Setting", 10 | "name":"haru", 11 | "model":"assets/haru/haru_01.moc", 12 | "textures": 13 | [ 14 | "assets/haru/haru_01.1024/texture_00.png", 15 | "assets/haru/haru_01.1024/texture_01.png", 16 | "assets/haru/haru_01.1024/texture_02.png" 17 | ], 18 | "physics":"assets/haru/haru.physics.json", 19 | "pose":"assets/haru/haru.pose.json", 20 | "expressions": 21 | [ 22 | {"name":"f01","file":"assets/haru/expressions/f01.exp.json"}, 23 | {"name":"f02","file":"assets/haru/expressions/f02.exp.json"}, 24 | {"name":"f03","file":"assets/haru/expressions/f03.exp.json"}, 25 | {"name":"f04","file":"assets/haru/expressions/f04.exp.json"}, 26 | {"name":"f05","file":"assets/haru/expressions/f05.exp.json"}, 27 | {"name":"f06","file":"assets/haru/expressions/f06.exp.json"}, 28 | {"name":"f07","file":"assets/haru/expressions/f07.exp.json"}, 29 | {"name":"f08","file":"assets/haru/expressions/f08.exp.json"} 30 | ], 31 | "layout": 32 | { 33 | "center_x": 0, 34 | "y": 1.2, 35 | "width": 2.9 36 | }, 37 | "hit_areas": 38 | [ 39 | {"name":"head", "id":"D_REF.HEAD"}, 40 | {"name":"body", "id":"D_REF.BODY"} 41 | ], 42 | "motions": 43 | { 44 | "idle": 45 | [ 46 | {"file":"assets/haru/motions/idle_00.mtn" ,"fade_in":2000, "fade_out":2000}, 47 | {"file":"assets/haru/motions/idle_01.mtn" ,"fade_in":2000, "fade_out":2000}, 48 | {"file":"assets/haru/motions/idle_02.mtn" ,"fade_in":2000, "fade_out":2000} 49 | ], 50 | "tap_body": 51 | [ 52 | { "file":"assets/haru/motions/tapBody_00.mtn" , "sound":"assets/haru/sounds/tapBody_00.mp3"}, 53 | { "file":"assets/haru/motions/tapBody_01.mtn" , "sound":"assets/haru/sounds/tapBody_01.mp3"}, 54 | { "file":"assets/haru/motions/tapBody_02.mtn" , "sound":"assets/haru/sounds/tapBody_02.mp3"} 55 | ], 56 | "pinch_in": 57 | [ 58 | { "file":"assets/haru/motions/pinchIn_00.mtn", "sound":"assets/haru/sounds/pinchIn_00.mp3" } 59 | ], 60 | "pinch_out": 61 | [ 62 | { "file":"assets/haru/motions/pinchOut_00.mtn", "sound":"assets/haru/sounds/pinchOut_00.mp3" } 63 | ], 64 | "shake": 65 | [ 66 | { "file":"assets/haru/motions/shake_00.mtn", "sound":"assets/haru/sounds/shake_00.mp3","fade_in":500 } 67 | ], 68 | "flick_head": 69 | [ 70 | { "file":"assets/haru/motions/flickHead_00.mtn", "sound":"assets/haru/sounds/flickHead_00.mp3" } 71 | ] 72 | } 73 | }; 74 | 75 | 76 | 77 | const sprite = new PIXI.Sprite.fromImage('./7_room2_a.jpg'); 78 | stage.addChild(sprite); 79 | 80 | // setTimeout(() => { 81 | // const sprite2 = new PIXI.Sprite.fromImage('./pixiv4.jpg'); 82 | // sprite2.y = 350; 83 | // stage.addChildAt(sprite2, 1); 84 | // }, 1000) 85 | 86 | const live2dSprite = new PIXI.Live2DSprite(modelHaru, { 87 | debugLog: false, 88 | randomMotion: false, 89 | eyeBlink: false, 90 | // audioPlayer: (...args) => console.log(...args) 91 | }); 92 | stage.addChild(live2dSprite); 93 | 94 | live2dSprite.x = -105; 95 | // live2dSprite.y = -150; 96 | live2dSprite.adjustScale(0,0,0.7); 97 | live2dSprite.adjustTranslate(0.4, 0); 98 | live2dSprite.startRandomMotion('idle'); 99 | 100 | live2dSprite.on('click', (evt) => { 101 | const point = evt.data.global; 102 | if (live2dSprite.hitTest('body', point.x, point.y)) { 103 | live2dSprite.startRandomMotionOnce('tap_body'); 104 | } 105 | if (live2dSprite.hitTest('head', point.x, point.y)) { 106 | live2dSprite.playSound('星のカケラ.mp3', 'sound/'); 107 | } 108 | }); 109 | live2dSprite.on('mousemove', (evt) => { 110 | const point = evt.data.global; 111 | live2dSprite.setViewPoint(point.x, point.y); 112 | }); 113 | 114 | function animate() { 115 | requestAnimationFrame(animate); 116 | renderer.render(stage); 117 | } 118 | animate(); 119 | -------------------------------------------------------------------------------- /example/pixiv4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/pixiv4.jpg -------------------------------------------------------------------------------- /example/readme.txt: -------------------------------------------------------------------------------- 1 | Live2D model 'haru' is from Live2D Demo (copyright Live2D Inc.). 2 | Background image '7_room2_a.jpg' is from http://www7b.biglobe.ne.jp/~osumashi/. 3 | BGM is '星のカケラ', Miku's demo song, outputted using Vocaloid. 4 | 5 | The file 'index.js' in this folder is free to use or modify for any purpose. 6 | -------------------------------------------------------------------------------- /example/sound/星のカケラ.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avgjs/pixi-live2d/5b8a65e82f2b12db029a3bf7dea90c7797736b1e/example/sound/星のカケラ.mp3 -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pixi-live2d", 3 | "version": "1.2.1", 4 | "description": "Display live2D model as a sprite in pixi.js.", 5 | "main": "dist/pixi-live2d.js", 6 | "scripts": { 7 | "prepublish": "npm run build", 8 | "build": "webpack --progress --colors --devtool source-map", 9 | "build-min": "webpack --progress --colors --devtool source-map --optimize-minimize", 10 | "build-watch": "webpack --progress --colors --devtool source-map --watch", 11 | "dev": "webpack-dev-server --config ./webpack.config.example.js --progress --colors --devtool source-map --hot --host 0.0.0.0 --compress", 12 | "test": "echo \"Error: no test specified\" && exit 1" 13 | }, 14 | "keywords": [ 15 | "live2d", 16 | "pixi.js", 17 | "waifu", 18 | "anime" 19 | ], 20 | "author": "Icemic Jia ", 21 | "homepage": "https://github.com/avgjs/pixi-live2d", 22 | "bugs": { 23 | "url": "https://github.com/avgjs/pixi-live2d/issues" 24 | }, 25 | "repository": { 26 | "type": "git", 27 | "url": "https://github.com/avgjs/pixi-live2d.git" 28 | }, 29 | "license": "MIT", 30 | "dependencies": {}, 31 | "devDependencies": { 32 | "babel-core": "^6.17.0", 33 | "babel-loader": "^6.2.5", 34 | "babel-preset-latest": "^6.16.0", 35 | "pixi.js": "^4.0.3", 36 | "webpack": "^1.13.2", 37 | "webpack-dev-server": "^1.16.2" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # pixi-live2d 2 | 3 | Display live2D model as a sprite in [pixi.js](https://github.com/pixijs/pixi.js). 4 | 5 | -------------------------------------------------------------------------------- 6 | 7 | [Installation](#installation) | [Example](#example) | [API](#api) | [License](#license) | [Donation](#donation) 8 | 9 | Pixi-live2d is a plugin for pixi.js for displaying live2D model as a sprite in pixi.js. 10 | 11 | - Only available in WebGL 12 | - ECMAScript 2015+ 13 | - [Have a look at example!](https://avgjs.github.io/pixi-live2d-example/) 14 | - [Make me know](mailto:bingfeng.web@gmail.com?subject=Hey,%20I%20made%20a%20cool%20work%20with%20your%20plugin!) if you use my plugin for cool things! 15 | 16 | ## Installation 17 | 18 | ```bash 19 | npm install pixi-live2d 20 | ``` 21 | 22 | **Attention** 23 | 24 | Because of [the SDK policy](http://sites.cybernoids.jp/cubism-sdk2_e/policy-sdk) of Live2D Inc., SDK file has been removed from the package, so you have to [download](http://sites.cybernoids.jp/cubism-sdk2_e/webgl2-1) and import it by yourself. 25 | 26 | for example in HTML file: 27 | 28 | ```html 29 | 30 | ``` 31 | 32 | or just require it 33 | 34 | ```javascript 35 | require('live2d.min.js'); 36 | ``` 37 | 38 | ## Example 39 | 40 | ```javascript 41 | import PIXI from 'pixi.js'; 42 | import 'pixi-live2d'; 43 | 44 | const renderer = new PIXI.WebGLRenderer(800, 600); 45 | document.body.appendChild(renderer.view); 46 | const stage = new PIXI.Container(); 47 | 48 | const live2dSprite = new PIXI.Live2DSprite(modelHaru); 49 | stage.addChild(live2dSprite); 50 | 51 | live2dSprite.startRandomMotion('idle'); 52 | live2dSprite.on('mousemove', (evt) => { 53 | const point = evt.data.global; 54 | live2dSprite.setViewPoint(point.x, point.y); 55 | }); 56 | 57 | function animate() { 58 | requestAnimationFrame(animate); 59 | renderer.render(stage); 60 | } 61 | animate(); 62 | ``` 63 | 64 | You can find a more complex one at [`example` folder](./example), or [visit it online](https://avgjs.github.io/pixi-live2d-example/). 65 | 66 | ## API 67 | 68 | [docs/API.md](./docs/API.md) 69 | 70 | ## License 71 | 72 | This plugin is distributed under MIT license, and you should agree with the licenses of Live2D and pixi.js. 73 | 74 | For more detail, please read [LICENSE.txt](./LICENSE.txt). 75 | 76 | ## Donation 77 | 78 | The plugin is free for charge, if you like it don't forget to buy me a coffee! 79 | 80 | ko-fi:
81 | [![Buy Me a Coffee at ko-fi.com](https://az743702.vo.msecnd.net/cdn/kofi4.png?v=b)](https://ko-fi.com/A742BTX) 82 | 83 | alipay:
84 | ![](https://cloud.githubusercontent.com/assets/837432/19645521/a71da460-9a27-11e6-9605-aed9e251dd7a.png) 85 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | UtSystem, 3 | UtDebug, 4 | LDTransform, 5 | LDGL, 6 | Live2D, 7 | Live2DModelWebGL, 8 | Live2DModelJS, 9 | Live2DMotion, 10 | MotionQueueManager, 11 | PhysicsHair, 12 | AMotion, 13 | PartsDataID, 14 | DrawDataID, 15 | BaseDataID, 16 | ParamID 17 | } from '../src/lib/live2d'; 18 | const PIXI = require('pixi.js'); 19 | import LAppModel from './lib/LAppModel'; 20 | import { Live2DFramework, L2DTargetPoint, L2DViewMatrix, L2DMatrix44 } from './lib/Live2DFramework'; 21 | import MatrixStack from './lib/MatrixStack'; 22 | 23 | /** 24 | * @class 25 | * @memberof PIXI 26 | * @param modelDefine {object} Content of {name}.model.js file 27 | * @param [options] {object} The optional parameters 28 | * @param [options.eyeBlink=true] {boolean} 29 | * @param [options.lipSyncWithSound=true] {boolean} 30 | * @param [options.debugLog=false] {boolean} 31 | * @param [options.debugMouseLog=false] {boolean} 32 | * @param [options.randomMotion=true] {boolean} 33 | * @param [options.defaultMotionGroup="idle"] {string} 34 | * @param [options.priorityDefault=1] {number} 35 | * @param [options.priorityForce=3] {number} 36 | * @param [options.audioPlayer=3] {function} Custom audio player, pass (filename, rootPath) as parameters 37 | * 38 | */ 39 | export default class Live2DSprite extends PIXI.Sprite { 40 | constructor(modelDefine, options) { 41 | super(); 42 | 43 | this.interactive = true; 44 | 45 | this.platform = window.navigator.platform.toLowerCase(); 46 | 47 | const fullOptions = Object.assign({ 48 | priorityForce: 3, 49 | priorityDefault: 1, 50 | debugLog: false, 51 | debugMouseLog: false, 52 | eyeBlink: true, 53 | lipSyncWithSound: true, 54 | randomMotion: true, 55 | defaultMotionGroup: "idle", 56 | audioPlayer: null 57 | }, options); 58 | 59 | Live2D.init(); 60 | this.model = new LAppModel(fullOptions); 61 | 62 | this.gl = null; 63 | this.canvas = null; 64 | 65 | this.dragMgr = null; /*new L2DTargetPoint();*/ 66 | this.viewMatrix = null; /*new L2DViewMatrix();*/ 67 | this.projMatrix = null; /*new L2DMatrix44()*/ 68 | this.deviceToScreen = null; /*new L2DMatrix44();*/ 69 | 70 | this.texture = null; 71 | 72 | this.modelReady = false; 73 | this.onModelReady = []; 74 | this.modelDefine = modelDefine; 75 | 76 | } 77 | 78 | /** 79 | * @private 80 | */ 81 | init() { 82 | 83 | 84 | var width = this.canvas.width; 85 | var height = this.canvas.height; 86 | 87 | this.texture = PIXI.RenderTexture.create(width, height); 88 | 89 | this.canvasWidth = this.canvas.width; 90 | this.canvasHeight = this.canvas.height; 91 | 92 | this.dragMgr = new L2DTargetPoint(); 93 | 94 | var ratio = height / width; 95 | var left = -1; 96 | var right = 1; 97 | var bottom = -ratio; 98 | var top = ratio; 99 | 100 | this.viewMatrix = new L2DViewMatrix(); 101 | this.viewMatrix.setMaxScreenRect(-2, 2, -2, 2); 102 | this.viewMatrix.setScreenRect(left, right, bottom, top); 103 | // this.viewMatrix.setMaxScale(2); 104 | // this.viewMatrix.setMinScale(0.5); 105 | // this.viewMatrix.adjustScale(0, 0, 0.7); 106 | 107 | this.projMatrix = new L2DMatrix44(); 108 | this.projMatrix.multScale(ratio, 1); // flip for rtt 109 | 110 | this.deviceToScreen = new L2DMatrix44(); 111 | this.deviceToScreen.multTranslate( -width / 2.0, -height / 2.0); 112 | this.deviceToScreen.multScale(2 / width, -2 / height); 113 | 114 | Live2D.setGL(this.gl); 115 | 116 | this.x = width / 2; 117 | this.y = height / 2; 118 | this.anchor.x = 0.5; 119 | this.anchor.y = 0.5; 120 | this.scale.y = -1; 121 | 122 | this.gl.clearColor(0.0, 0.0, 0.0, 0.0); 123 | this.model.load(this.gl, this.modelDefine, () => { 124 | this.modelReady = true; 125 | }); 126 | } 127 | 128 | /** 129 | * @private 130 | */ 131 | draw() { 132 | MatrixStack.reset(); 133 | MatrixStack.loadIdentity(); 134 | 135 | this.dragMgr.update(); 136 | this.model.setDrag(this.dragMgr.getX(), this.dragMgr.getY()); 137 | 138 | // this.viewMatrix.adjustTranslate(-this.x / this.canvasWidth, -this.y / this.canvasHeight); 139 | // this.viewMatrix.adjustScale(this.anchor.x, this.anchor.y, this.scale.x, this.scale.y); 140 | 141 | MatrixStack.multMatrix(this.projMatrix.getArray()); 142 | MatrixStack.multMatrix(this.viewMatrix.getArray()); 143 | // MatrixStack.multMatrix(this.deviceToScreen.getArray()); 144 | MatrixStack.push(); 145 | 146 | this.model.update(); 147 | this.model.draw(this.gl); 148 | 149 | MatrixStack.pop(); 150 | } 151 | 152 | _renderWebGL(renderer) { 153 | if (!this.gl) { 154 | this.gl = renderer.gl; 155 | this.canvas = renderer.view; 156 | this.modelDefine && this.init(this.modelDefine); 157 | } 158 | 159 | if (!this.modelReady) { 160 | const gl = renderer.gl; 161 | // it is unreasonable how the next line works...😂 162 | gl.activeTexture(gl.TEXTURE0); 163 | return; 164 | } 165 | 166 | while (this.onModelReady.length) { 167 | const func = this.onModelReady.shift(); 168 | func(); 169 | } 170 | 171 | if (!this.visible) { 172 | return; 173 | } 174 | 175 | const useVAO = !!(renderer.createVao && renderer.bindVao); 176 | 177 | let _activeVao; 178 | if (useVAO) { 179 | _activeVao = renderer._activeVao; 180 | } else { 181 | renderer.flush(); 182 | } 183 | 184 | const gl = renderer.gl; 185 | 186 | const arrayBuffer = gl.getParameter(gl.ARRAY_BUFFER_BINDING); 187 | const elementArrayBuffer = gl.getParameter(gl.ELEMENT_ARRAY_BUFFER_BINDING); 188 | const currentProgram = gl.getParameter(gl.CURRENT_PROGRAM); 189 | 190 | let activeTexture; 191 | if (!useVAO) { 192 | activeTexture = gl.getParameter(gl.ACTIVE_TEXTURE); 193 | } 194 | 195 | gl.activeTexture(gl.TEXTURE0); 196 | const texture0 = gl.getParameter(gl.TEXTURE_BINDING_2D); 197 | gl.activeTexture(gl.TEXTURE1); 198 | const texture1 = gl.getParameter(gl.TEXTURE_BINDING_2D); 199 | 200 | const frontFace = gl.getParameter(gl.FRONT_FACE); 201 | const colorWhiteMask = gl.getParameter(gl.COLOR_WRITEMASK); 202 | 203 | let vertexAttr0Enabled, vertexAttr1Enabled, vertexAttr2Enabled, vertexAttr3Enabled; 204 | if (!useVAO) { 205 | vertexAttr0Enabled = gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_ENABLED); 206 | vertexAttr1Enabled = gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_ENABLED); 207 | vertexAttr2Enabled = gl.getVertexAttrib(2, gl.VERTEX_ATTRIB_ARRAY_ENABLED); 208 | vertexAttr3Enabled = gl.getVertexAttrib(3, gl.VERTEX_ATTRIB_ARRAY_ENABLED); 209 | } 210 | const scissorTestEnabled = gl.isEnabled(gl.SCISSOR_TEST); 211 | const stencilTestEnabled = gl.isEnabled(gl.STENCIL_TEST); 212 | const depthTestEnabled = gl.isEnabled(gl.DEPTH_TEST); 213 | const cullFaceEnabled = gl.isEnabled(gl.CULL_FACE); 214 | const blendEnabled = gl.isEnabled(gl.BLEND); 215 | 216 | const _activeTextureLocation = renderer._activeTexture ? renderer._activeTextureLocation : 0; 217 | const _activeRenderTarget = renderer._activeRenderTarget; 218 | 219 | let vao; 220 | if (useVAO) { 221 | vao = renderer.createVao(); 222 | renderer.bindVao(vao); 223 | } 224 | renderer.bindRenderTexture(this.texture); 225 | gl.clearColor(0.0, 0.0, 0.0, 0.0); 226 | gl.clear(gl.COLOR_BUFFER_BIT); 227 | gl.frontFace(gl.CW); 228 | this.draw(); 229 | if (!useVAO) { 230 | renderer._activeTextureLocation = _activeTextureLocation; 231 | gl.activeTexture(gl.TEXTURE0 + _activeTextureLocation); 232 | } 233 | gl.bindTexture(gl.TEXTURE_2D, null); 234 | gl.useProgram(currentProgram); 235 | renderer.bindRenderTarget(_activeRenderTarget); 236 | 237 | gl.bindBuffer(gl.ARRAY_BUFFER, arrayBuffer); 238 | gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementArrayBuffer); 239 | 240 | gl.activeTexture(gl.TEXTURE0); 241 | gl.bindTexture(gl.TEXTURE_2D, texture0); 242 | gl.activeTexture(gl.TEXTURE1); 243 | gl.bindTexture(gl.TEXTURE_2D, texture1); 244 | 245 | if (!useVAO) { 246 | gl.activeTexture(activeTexture); 247 | } 248 | gl.frontFace(frontFace); 249 | gl.colorMask(...colorWhiteMask); 250 | // 251 | if (!useVAO) { 252 | vertexAttr0Enabled ? gl.enableVertexAttribArray(0) : gl.disableVertexAttribArray(0); 253 | vertexAttr1Enabled ? gl.enableVertexAttribArray(1) : gl.disableVertexAttribArray(1); 254 | vertexAttr2Enabled ? gl.enableVertexAttribArray(2) : gl.disableVertexAttribArray(2); 255 | vertexAttr3Enabled ? gl.enableVertexAttribArray(3) : gl.disableVertexAttribArray(3); 256 | } 257 | scissorTestEnabled ? gl.enable(gl.SCISSOR_TEST) : gl.disable(gl.SCISSOR_TEST); 258 | stencilTestEnabled ? gl.enable(gl.STENCIL_TEST) : gl.disable(gl.STENCIL_TEST); 259 | depthTestEnabled ? gl.enable(gl.DEPTH_TEST) : gl.disable(gl.DEPTH_TEST); 260 | cullFaceEnabled ? gl.enable(gl.CULL_FACE) : gl.disable(gl.CULL_FACE); 261 | blendEnabled ? gl.enable(gl.BLEND) : gl.disable(gl.BLEND); 262 | 263 | if (useVAO) { 264 | vao.unbind(); 265 | vao.destroy(); 266 | renderer.bindVao(_activeVao); 267 | } 268 | 269 | super._renderWebGL(renderer); 270 | } 271 | 272 | destroy(...args) { 273 | this.model.release(); 274 | super.destroy(...args); 275 | } 276 | 277 | containsPoint(point) { 278 | if (this.modelReady) { 279 | return this.hitTest(null, point.x, point.y); 280 | } 281 | return false; 282 | } 283 | 284 | /* Live2D methods */ 285 | 286 | 287 | /* Transforms */ 288 | 289 | adjustScale(cx, cy, scale) { 290 | this.onModelReady.push(() => { 291 | this.viewMatrix.adjustScale(cx, cy, scale); 292 | }); 293 | } 294 | adjustTranslate(shiftX, shiftY) { 295 | this.onModelReady.push(() => { 296 | this.viewMatrix.adjustTranslate(shiftX, -shiftY); 297 | }); 298 | } 299 | 300 | /** 301 | * specify `PARAM_MOUTH_OPEN_Y` of Live2D model. 302 | * @param value {Number} between 0~1, set to `null` will disable it. 303 | */ 304 | setLipSync(value) { 305 | if (value === null) { 306 | this.model.setLipSync(false); 307 | } else { 308 | this.model.setLipSync(true); 309 | this.model.setLipSyncValue(value); 310 | } 311 | } 312 | setRandomExpression() { 313 | this.onModelReady.push(() => { 314 | this.model.setRandomExpression(); 315 | }); 316 | } 317 | startRandomMotion(name, priority) { 318 | this.onModelReady.push(() => { 319 | this.model.startRandomMotion(name, priority); 320 | }); 321 | } 322 | startRandomMotionOnce(name, priority) { 323 | this.onModelReady.push(() => { 324 | this.model.startRandomMotionOnce(name, priority); 325 | }); 326 | } 327 | stopRandomMotion() { 328 | this.onModelReady.push(() => { 329 | this.model.stopRandomMotion(); 330 | }); 331 | } 332 | startMotion(name, no, priority) { 333 | this.onModelReady.push(() => { 334 | this.model.startMotion(name, no, priority); 335 | }); 336 | } 337 | playSound(filename, host='/') { 338 | this.onModelReady.push(() => { 339 | this.model.playSound(filename, host); 340 | }); 341 | } 342 | 343 | /* Event methods */ 344 | hitTest(id, x, y) { 345 | return this.model.hitTest(id, 346 | this.viewMatrix.invertTransformX(this.deviceToScreen.transformX(x)), 347 | this.viewMatrix.invertTransformY(this.deviceToScreen.transformY(y))); 348 | } 349 | setViewPoint(x, y) { 350 | this.dragMgr.setPoint(this.viewMatrix.invertTransformX(this.deviceToScreen.transformX(x)), 351 | this.viewMatrix.invertTransformY(this.deviceToScreen.transformY(y))); 352 | } 353 | 354 | 355 | /* Some raw methods of Live2D */ 356 | getParamFloat(key) { 357 | return this.model.getLive2DModel().getParamFloat(key); 358 | } 359 | setParamFloat(key, value, weight=1) { 360 | this.model.getLive2DModel().setParamFloat(key, value, weight); 361 | } 362 | addToParamFloat(key, value, weight=1) { 363 | this.model.getLive2DModel().addToParamFloat(key, value, weight); 364 | } 365 | multParamFloat(key, value, weight=1) { 366 | this.model.getLive2DModel().multParamFloat(key, value, weight); 367 | } 368 | 369 | } 370 | 371 | if (PIXI) { 372 | PIXI.Live2DSprite = Live2DSprite; 373 | } else { 374 | console.error('Error: Cannot find global variable `PIXI`, Live2D plguin will not be installed.'); 375 | } 376 | -------------------------------------------------------------------------------- /src/lib/LAppModel.js: -------------------------------------------------------------------------------- 1 | //============================================================ 2 | //============================================================ 3 | // class LAppModel extends L2DBaseModel 4 | //============================================================ 5 | //============================================================ 6 | 7 | import { L2DBaseModel, L2DEyeBlink } from './Live2DFramework'; 8 | import MatrixStack from './MatrixStack'; 9 | import ModelSettingJson from './ModelSettingJson'; 10 | 11 | export default function LAppModel(options) 12 | { 13 | //L2DBaseModel.apply(this, arguments); 14 | L2DBaseModel.prototype.constructor.call(this); 15 | 16 | this.options = options; 17 | 18 | this.randomMotion = this.options.randomMotion; 19 | this.randomMotionGroup = null; 20 | this.randomMotionPriority = null; 21 | 22 | this.modelHomeDir = ""; 23 | this.modelSetting = null; 24 | this.tmpMatrix = []; 25 | 26 | this.audioElement = null; 27 | this.audioContext = null; 28 | this.audioAnalyser = null; 29 | } 30 | 31 | LAppModel.prototype = new L2DBaseModel(); 32 | 33 | 34 | LAppModel.prototype.load = function(gl, modelDefine, callback) 35 | { 36 | this.setUpdating(true); 37 | this.setInitialized(false); 38 | 39 | this.modelHomeDir = './'; 40 | 41 | this.modelSetting = new ModelSettingJson(modelDefine); 42 | 43 | var thisRef = this; 44 | 45 | // this.modelSetting.loadModelSetting(modelSettingPath, function(){ 46 | 47 | var path = thisRef.modelHomeDir + thisRef.modelSetting.getModelFile(); 48 | thisRef.loadModelData(path, function(model){ 49 | 50 | for (var i = 0; i < thisRef.modelSetting.getTextureNum(); i++) 51 | { 52 | 53 | var texPaths = thisRef.modelHomeDir + 54 | thisRef.modelSetting.getTextureFile(i); 55 | 56 | thisRef.loadTexture(gl, i, texPaths, function() { 57 | 58 | if( thisRef.isTexLoaded ) { 59 | 60 | if (thisRef.modelSetting.getExpressionNum() > 0) 61 | { 62 | 63 | thisRef.expressions = {}; 64 | 65 | for (var j = 0; j < thisRef.modelSetting.getExpressionNum(); j++) 66 | { 67 | var expName = thisRef.modelSetting.getExpressionName(j); 68 | var expFilePath = thisRef.modelHomeDir + 69 | thisRef.modelSetting.getExpressionFile(j); 70 | 71 | thisRef.loadExpression(expName, expFilePath); 72 | } 73 | } 74 | else 75 | { 76 | thisRef.expressionManager = null; 77 | thisRef.expressions = {}; 78 | } 79 | 80 | 81 | 82 | if (!thisRef.eyeBlink) 83 | { 84 | thisRef.eyeBlink = new L2DEyeBlink(); 85 | } 86 | 87 | 88 | if (thisRef.modelSetting.getPhysicsFile()) 89 | { 90 | thisRef.loadPhysics(thisRef.modelHomeDir + 91 | thisRef.modelSetting.getPhysicsFile()); 92 | } 93 | else 94 | { 95 | thisRef.physics = null; 96 | } 97 | 98 | 99 | 100 | if (thisRef.modelSetting.getPoseFile()) 101 | { 102 | thisRef.loadPose( 103 | thisRef.modelHomeDir + 104 | thisRef.modelSetting.getPoseFile(), 105 | function() { 106 | thisRef.pose.updateParam(thisRef.live2DModel); 107 | } 108 | ); 109 | } 110 | else 111 | { 112 | thisRef.pose = null; 113 | } 114 | 115 | 116 | 117 | if (thisRef.modelSetting.getLayout()) 118 | { 119 | var layout = thisRef.modelSetting.getLayout(); 120 | if (layout["width"] != null) 121 | thisRef.modelMatrix.setWidth(layout["width"]); 122 | if (layout["height"] != null) 123 | thisRef.modelMatrix.setHeight(layout["height"]); 124 | 125 | if (layout["x"] != null) 126 | thisRef.modelMatrix.setX(layout["x"]); 127 | if (layout["y"] != null) 128 | thisRef.modelMatrix.setY(layout["y"]); 129 | if (layout["center_x"] != null) 130 | thisRef.modelMatrix.centerX(layout["center_x"]); 131 | if (layout["center_y"] != null) 132 | thisRef.modelMatrix.centerY(layout["center_y"]); 133 | if (layout["top"] != null) 134 | thisRef.modelMatrix.top(layout["top"]); 135 | if (layout["bottom"] != null) 136 | thisRef.modelMatrix.bottom(layout["bottom"]); 137 | if (layout["left"] != null) 138 | thisRef.modelMatrix.left(layout["left"]); 139 | if (layout["right"] != null) 140 | thisRef.modelMatrix.right(layout["right"]); 141 | } 142 | 143 | for (var j = 0; j < thisRef.modelSetting.getInitParamNum(); j++) 144 | { 145 | 146 | thisRef.live2DModel.setParamFloat( 147 | thisRef.modelSetting.getInitParamID(j), 148 | thisRef.modelSetting.getInitParamValue(j) 149 | ); 150 | } 151 | 152 | for (var j = 0; j < thisRef.modelSetting.getInitPartsVisibleNum(); j++) 153 | { 154 | 155 | thisRef.live2DModel.setPartsOpacity( 156 | thisRef.modelSetting.getInitPartsVisibleID(j), 157 | thisRef.modelSetting.getInitPartsVisibleValue(j) 158 | ); 159 | } 160 | 161 | 162 | 163 | thisRef.live2DModel.saveParam(); 164 | // thisRef.live2DModel.setGL(gl); 165 | 166 | 167 | thisRef.preloadMotionGroup(thisRef.options.defaultMotionGroup); 168 | thisRef.mainMotionManager.stopAllMotions(); 169 | 170 | thisRef.setUpdating(false); 171 | thisRef.setInitialized(true); 172 | 173 | if (typeof callback == "function") callback(); 174 | 175 | } 176 | }); 177 | } 178 | }); 179 | // }); 180 | }; 181 | 182 | 183 | 184 | LAppModel.prototype.release = function(gl) 185 | { 186 | // this.live2DModel.deleteTextures(); 187 | // var pm = Live2DFramework.getPlatformManager(); 188 | // 189 | // gl.deleteTexture(pm.texture); 190 | } 191 | 192 | 193 | 194 | LAppModel.prototype.preloadMotionGroup = function(name) 195 | { 196 | var thisRef = this; 197 | 198 | for (var i = 0; i < this.modelSetting.getMotionNum(name); i++) 199 | { 200 | var file = this.modelSetting.getMotionFile(name, i); 201 | this.loadMotion(file, this.modelHomeDir + file, function(motion) { 202 | motion.setFadeIn(thisRef.modelSetting.getMotionFadeIn(name, i)); 203 | motion.setFadeOut(thisRef.modelSetting.getMotionFadeOut(name, i)); 204 | }); 205 | 206 | } 207 | } 208 | 209 | 210 | LAppModel.prototype.update = function() 211 | { 212 | // console.log("--> LAppModel.update()"); 213 | 214 | if(!this.live2DModel) 215 | { 216 | if (this.options.debugLog) console.error("Failed to update."); 217 | 218 | return; 219 | } 220 | 221 | var timeMSec = UtSystem.getUserTimeMSec() - this.startTimeMSec; 222 | var timeSec = timeMSec / 1000.0; 223 | var t = timeSec * 2 * Math.PI; 224 | 225 | 226 | if (this.mainMotionManager.isFinished() && this.randomMotion) 227 | { 228 | this.startRandomMotion(this.randomMotionGroup || this.options.defaultMotionGroup, this.randomMotionPriority || this.options.priorityDefault); 229 | } 230 | 231 | //----------------------------------------------------------------- 232 | 233 | 234 | this.live2DModel.loadParam(); 235 | 236 | 237 | 238 | var update = this.mainMotionManager.updateParam(this.live2DModel); 239 | if (!update) { 240 | 241 | if(this.eyeBlink && this.options.eyeBlink) { 242 | this.eyeBlink.updateParam(this.live2DModel); 243 | } 244 | } 245 | 246 | 247 | this.live2DModel.saveParam(); 248 | 249 | //----------------------------------------------------------------- 250 | 251 | 252 | if (this.expressionManager && 253 | this.expressions && 254 | !this.expressionManager.isFinished()) 255 | { 256 | this.expressionManager.updateParam(this.live2DModel); 257 | } 258 | 259 | 260 | 261 | this.live2DModel.addToParamFloat("PARAM_ANGLE_X", this.dragX * 30, 1); 262 | this.live2DModel.addToParamFloat("PARAM_ANGLE_Y", this.dragY * 30, 1); 263 | this.live2DModel.addToParamFloat("PARAM_ANGLE_Z", (this.dragX * this.dragY) * -30, 1); 264 | 265 | 266 | 267 | this.live2DModel.addToParamFloat("PARAM_BODY_ANGLE_X", this.dragX*10, 1); 268 | 269 | 270 | 271 | this.live2DModel.addToParamFloat("PARAM_EYE_BALL_X", this.dragX, 1); 272 | this.live2DModel.addToParamFloat("PARAM_EYE_BALL_Y", this.dragY, 1); 273 | 274 | 275 | 276 | // this.live2DModel.addToParamFloat("PARAM_ANGLE_X", 277 | // Number((15 * Math.sin(t / 6.5345))), 0.5); 278 | // this.live2DModel.addToParamFloat("PARAM_ANGLE_Y", 279 | // Number((8 * Math.sin(t / 3.5345))), 0.5); 280 | // this.live2DModel.addToParamFloat("PARAM_ANGLE_Z", 281 | // Number((10 * Math.sin(t / 5.5345))), 0.5); 282 | // this.live2DModel.addToParamFloat("PARAM_BODY_ANGLE_X", 283 | // Number((4 * Math.sin(t / 15.5345))), 0.5); 284 | // this.live2DModel.setParamFloat("PARAM_BREATH", 285 | // Number((0.5 + 0.5 * Math.sin(t / 3.2345))), 1); 286 | 287 | 288 | if (this.physics) 289 | { 290 | this.physics.updateParam(this.live2DModel); 291 | } 292 | 293 | if (this.lipSync) 294 | { 295 | this.live2DModel.setParamFloat("PARAM_MOUTH_OPEN_Y", 296 | this.lipSyncValue); 297 | } 298 | 299 | 300 | if( this.pose ) { 301 | this.pose.updateParam(this.live2DModel); 302 | } 303 | 304 | this.live2DModel.update(); 305 | }; 306 | 307 | 308 | 309 | LAppModel.prototype.setRandomExpression = function() 310 | { 311 | var tmp = []; 312 | for (var name in this.expressions) 313 | { 314 | tmp.push(name); 315 | } 316 | 317 | var no = parseInt(Math.random() * tmp.length); 318 | 319 | this.setExpression(tmp[no]); 320 | } 321 | 322 | 323 | 324 | LAppModel.prototype.startRandomMotion = function(name, priority) 325 | { 326 | var max = this.modelSetting.getMotionNum(name); 327 | var no = parseInt(Math.random() * max); 328 | this.startMotion(name, no, priority); 329 | this.randomMotion = true; 330 | this.randomMotionGroup = name; 331 | this.randomMotionPriority = priority; 332 | } 333 | LAppModel.prototype.startRandomMotionOnce = function(name, priority) 334 | { 335 | var max = this.modelSetting.getMotionNum(name); 336 | var no = parseInt(Math.random() * max); 337 | this.startMotion(name, no, priority); 338 | } 339 | 340 | LAppModel.prototype.stopRandomMotion = function() 341 | { 342 | this.randomMotion = false; 343 | this.randomMotionGroup = null; 344 | this.randomMotionPriority = null; 345 | } 346 | 347 | 348 | 349 | LAppModel.prototype.startMotion = function(name, no, priority) 350 | { 351 | // console.log("startMotion : " + name + " " + no + " " + priority); 352 | 353 | var motionName = this.modelSetting.getMotionFile(name, no); 354 | 355 | if (motionName == null || motionName == "") 356 | { 357 | if (this.options.debugLog) 358 | console.warn("Failed to motion."); 359 | return; 360 | } 361 | 362 | if (priority == this.options.priorityForce) 363 | { 364 | this.mainMotionManager.setReservePriority(priority); 365 | } 366 | else if (!this.mainMotionManager.reserveMotion(priority)) 367 | { 368 | if (this.options.debugLog) 369 | console.log("Motion is running.") 370 | return; 371 | } 372 | 373 | var thisRef = this; 374 | var motion; 375 | 376 | if (this.motions[name] == null) 377 | { 378 | this.loadMotion(null, this.modelHomeDir + motionName, function(mtn) { 379 | motion = mtn; 380 | 381 | 382 | thisRef.setFadeInFadeOut(name, no, priority, motion); 383 | 384 | }); 385 | } 386 | else 387 | { 388 | motion = this.motions[name]; 389 | 390 | 391 | thisRef.setFadeInFadeOut(name, no, priority, motion); 392 | } 393 | } 394 | 395 | 396 | LAppModel.prototype.setFadeInFadeOut = function(name, no, priority, motion) 397 | { 398 | var motionName = this.modelSetting.getMotionFile(name, no); 399 | 400 | motion.setFadeIn(this.modelSetting.getMotionFadeIn(name, no)); 401 | motion.setFadeOut(this.modelSetting.getMotionFadeOut(name, no)); 402 | 403 | 404 | if (this.options.debugLog) 405 | console.log("Start motion : " + motionName); 406 | 407 | if (this.modelSetting.getMotionSound(name, no) == null) 408 | { 409 | this.mainMotionManager.startMotionPrio(motion, priority); 410 | } 411 | else 412 | { 413 | var soundName = this.modelSetting.getMotionSound(name, no); 414 | // var player = new Sound(this.modelHomeDir + soundName); 415 | 416 | if (this.options.debugLog) 417 | console.log("Start sound : " + soundName); 418 | 419 | this.playSound(soundName, this.modelHomeDir); 420 | 421 | this.mainMotionManager.startMotionPrio(motion, priority); 422 | } 423 | } 424 | 425 | LAppModel.prototype.playSound = function(filename, host) 426 | { 427 | if (this.options.audioPlayer) { 428 | this.options.audioPlayer(filename, host); 429 | } else { 430 | const audio = this.audioElement || document.createElement("audio"); 431 | !this.audioElement && (this.audioElement = audio); 432 | audio.src = host + filename; 433 | 434 | const AudioContext = window.AudioContext || window.webkitAudioContext; 435 | if (AudioContext && this.options.lipSyncWithSound) { 436 | const context = this.audioContext || new AudioContext(); 437 | if (!this.audioContext) { 438 | this.audioContext = context; 439 | this.audioElementSource = context.createMediaElementSource(audio); 440 | } 441 | const source = this.audioElementSource; 442 | const analyser = this.audioAnalyser || context.createAnalyser(); 443 | !this.audioAnalyser && (this.audioAnalyser = analyser); 444 | 445 | analyser.fftSize = 32; 446 | var bufferLength = analyser.frequencyBinCount; 447 | let cache = []; 448 | let lastTime = Date.now(); 449 | const intervalId = setInterval(() => { 450 | const dataArray = new Uint8Array(bufferLength); 451 | analyser.getByteFrequencyData(dataArray); 452 | const value = (dataArray[9] + dataArray[10] + dataArray[11]) / 3; 453 | if (Date.now() - lastTime < 33) { 454 | cache.push(value); 455 | } else { 456 | const lipValue = cache.length ? 457 | (cache.reduce((previous, current) => current += previous) / cache.length / 100) 458 | : this.lipSyncValue; 459 | this.lipSync = true; 460 | this.lipSyncValue = lipValue; 461 | lastTime = Date.now(); 462 | cache = []; 463 | } 464 | }, 0); 465 | audio.addEventListener('ended', () => { 466 | clearInterval(intervalId); 467 | this.lipSyncValue = 0; 468 | }); 469 | source.connect(analyser); 470 | analyser.connect(context.destination); 471 | } 472 | audio.play(); 473 | } 474 | } 475 | 476 | 477 | LAppModel.prototype.setExpression = function(name) 478 | { 479 | var motion = this.expressions[name]; 480 | 481 | if (this.options.debugLog) 482 | console.log("Expression : " + name); 483 | 484 | this.expressionManager.startMotion(motion, false); 485 | } 486 | 487 | 488 | 489 | LAppModel.prototype.draw = function(gl) 490 | { 491 | //console.log("--> LAppModel.draw()"); 492 | 493 | // if(this.live2DModel == null) return; 494 | 495 | 496 | MatrixStack.push(); 497 | 498 | MatrixStack.multMatrix(this.modelMatrix.getArray()); 499 | 500 | this.tmpMatrix = MatrixStack.getMatrix() 501 | this.live2DModel.setMatrix(this.tmpMatrix); 502 | this.live2DModel.draw(); 503 | 504 | MatrixStack.pop(); 505 | 506 | }; 507 | 508 | 509 | 510 | LAppModel.prototype.hitTest = function(id, testX, testY) 511 | { 512 | var len = this.modelSetting.getHitAreaNum(); 513 | let hit = false; 514 | for (var i = 0; i < len; i++) 515 | { 516 | // NOTE: id == null means to test all ids. 517 | if (id == null) { 518 | var drawID = this.modelSetting.getHitAreaID(i); 519 | hit = this.hitTestSimple(drawID, testX, testY); 520 | if (hit) { 521 | return hit; 522 | } 523 | } else if (id == this.modelSetting.getHitAreaName(i)) { 524 | var drawID = this.modelSetting.getHitAreaID(i); 525 | 526 | return this.hitTestSimple(drawID, testX, testY); 527 | } 528 | } 529 | 530 | return false; 531 | } 532 | -------------------------------------------------------------------------------- /src/lib/MatrixStack.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * (c) Modified by Icemic 8 | */ 9 | 10 | const mat4 = require('./glMatrix-mat4'); 11 | 12 | const MatrixStack = {}; 13 | 14 | export default MatrixStack; 15 | 16 | 17 | MatrixStack.matrixStack = [ 18 | 1, 0, 0, 0, 19 | 0, 1, 0, 0, 20 | 0, 0, 1, 0, 21 | 0, 0, 0, 1 22 | ]; 23 | 24 | 25 | MatrixStack.depth = 0; 26 | 27 | 28 | MatrixStack.currentMatrix = [ 29 | 1, 0, 0, 0, 30 | 0, 1, 0, 0, 31 | 0, 0, 1, 0, 32 | 0, 0, 0, 1 33 | ]; 34 | 35 | 36 | MatrixStack.tmp = new Array(16); 37 | 38 | 39 | 40 | MatrixStack.reset = function() 41 | { 42 | this.depth = 0; 43 | } 44 | 45 | 46 | 47 | MatrixStack.loadIdentity = function() 48 | { 49 | // for (var i = 0; i < 16; i++) 50 | // { 51 | // this.currentMatrix[i] = (i % 5 == 0) ? 1 : 0; 52 | // } 53 | this.currentMatrix = [ 54 | 1, 0, 0, 0, 55 | 0, 1, 0, 0, 56 | 0, 0, 1, 0, 57 | 0, 0, 0, 1 58 | ]; 59 | } 60 | 61 | 62 | 63 | MatrixStack.push = function() 64 | { 65 | // var offset = this.depth * 16; 66 | // var nextOffset = (this.depth + 1) * 16; 67 | 68 | // if (this.matrixStack.length < nextOffset + 16) 69 | // { 70 | // this.matrixStack.length = nextOffset + 16; 71 | // } 72 | 73 | // for (var i = 0; i < 16; i++) 74 | // { 75 | // this.matrixStack[nextOffset + i] = this.currentMatrix[i]; 76 | // } 77 | this.matrixStack.push(this.currentMatrix); 78 | 79 | this.depth++; 80 | } 81 | 82 | 83 | 84 | MatrixStack.pop = function() 85 | { 86 | this.depth--; 87 | if (this.depth < 0) 88 | { 89 | myError("Invalid matrix stack."); 90 | this.depth = 0; 91 | } 92 | 93 | // var offset = this.depth * 16; 94 | // for (var i = 0; i < 16; i++) 95 | // { 96 | // this.currentMatrix[i] = this.matrixStack[offset + i]; 97 | // } 98 | this.currentMatrix = this.matrixStack.pop(); 99 | } 100 | 101 | 102 | 103 | MatrixStack.getMatrix = function() 104 | { 105 | return this.currentMatrix; 106 | } 107 | 108 | 109 | 110 | MatrixStack.multMatrix = function(matNew) 111 | { 112 | // var i, j, k; 113 | 114 | // for (i = 0; i < 16; i++) 115 | // { 116 | // this.tmp[i] = 0; 117 | // } 118 | 119 | // for (i = 0; i < 4; i++) 120 | // { 121 | // for (j = 0; j < 4; j++) 122 | // { 123 | // for (k = 0; k < 4; k++) 124 | // { 125 | // this.tmp[i + j * 4] += this.currentMatrix[i + k * 4] * matNew[k + j * 4]; 126 | // } 127 | // } 128 | // } 129 | // for (i = 0; i < 16; i++) 130 | // { 131 | // this.currentMatrix[i] = this.tmp[i]; 132 | // } 133 | mat4.multiply(this.currentMatrix, this.currentMatrix, matNew); 134 | } 135 | -------------------------------------------------------------------------------- /src/lib/ModelSettingJson.js: -------------------------------------------------------------------------------- 1 | export default function ModelSettingJson(json) 2 | { 3 | this.NAME = "name"; 4 | this.ID = "id"; 5 | this.MODEL = "model"; 6 | this.TEXTURES = "textures"; 7 | this.HIT_AREAS = "hit_areas"; 8 | this.PHYSICS = "physics"; 9 | this.POSE = "pose"; 10 | this.EXPRESSIONS = "expressions"; 11 | this.MOTION_GROUPS = "motions"; 12 | this.SOUND = "sound"; 13 | this.FADE_IN = "fade_in"; 14 | this.FADE_OUT = "fade_out"; 15 | this.LAYOUT = "layout"; 16 | this.INIT_PARAM = "init_param"; 17 | this.INIT_PARTS_VISIBLE = "init_parts_visible"; 18 | this.VALUE = "val"; 19 | this.FILE = "file"; 20 | 21 | this.json = json || {}; 22 | } 23 | 24 | 25 | // ModelSettingJson.prototype.loadModelSetting = function(path, callback) 26 | // { 27 | // var thisRef = this; 28 | // var pm = Live2DFramework.getPlatformManager(); 29 | // pm.loadBytes(path, function(buf) { 30 | // var str = String.fromCharCode.apply(null,new Uint8Array(buf)); 31 | // thisRef.json = JSON.parse(str); 32 | // callback(); 33 | // }); 34 | // }; 35 | 36 | 37 | ModelSettingJson.prototype.getTextureFile = function(n) 38 | { 39 | if (this.json[this.TEXTURES] == null || this.json[this.TEXTURES][n] == null) 40 | return null; 41 | 42 | return this.json[this.TEXTURES][n]; 43 | } 44 | 45 | 46 | ModelSettingJson.prototype.getModelFile = function() 47 | { 48 | return this.json[this.MODEL]; 49 | }; 50 | 51 | 52 | ModelSettingJson.prototype.getTextureNum = function() 53 | { 54 | if (this.json[this.TEXTURES] == null) return 0; 55 | 56 | return this.json[this.TEXTURES].length; 57 | } 58 | 59 | 60 | ModelSettingJson.prototype.getHitAreaNum = function() 61 | { 62 | if (this.json[this.HIT_AREAS] == null) 63 | return 0; 64 | 65 | return this.json[this.HIT_AREAS].length; 66 | } 67 | 68 | 69 | ModelSettingJson.prototype.getHitAreaID = function(n) 70 | { 71 | if (this.json[this.HIT_AREAS] == null || 72 | this.json[this.HIT_AREAS][n] == null) 73 | return null; 74 | 75 | return this.json[this.HIT_AREAS][n][this.ID]; 76 | } 77 | 78 | 79 | ModelSettingJson.prototype.getHitAreaName = function(n) 80 | { 81 | if (this.json[this.HIT_AREAS] == null || 82 | this.json[this.HIT_AREAS][n] == null) 83 | return null; 84 | 85 | return this.json[this.HIT_AREAS][n][this.NAME]; 86 | } 87 | 88 | 89 | ModelSettingJson.prototype.getPhysicsFile = function() 90 | { 91 | return this.json[this.PHYSICS]; 92 | } 93 | 94 | 95 | ModelSettingJson.prototype.getPoseFile = function() 96 | { 97 | return this.json[this.POSE]; 98 | } 99 | 100 | 101 | ModelSettingJson.prototype.getExpressionNum = function() 102 | { 103 | return (this.json[this.EXPRESSIONS] == null) ? 0 : this.json[this.EXPRESSIONS].length; 104 | } 105 | 106 | 107 | ModelSettingJson.prototype.getExpressionFile = function(n) 108 | { 109 | if (this.json[this.EXPRESSIONS] == null) 110 | return null; 111 | return this.json[this.EXPRESSIONS][n][this.FILE]; 112 | } 113 | 114 | 115 | ModelSettingJson.prototype.getExpressionName = function(n) 116 | { 117 | if (this.json[this.EXPRESSIONS] == null) 118 | return null; 119 | return this.json[this.EXPRESSIONS][n][this.NAME]; 120 | } 121 | 122 | 123 | ModelSettingJson.prototype.getLayout = function() 124 | { 125 | return this.json[this.LAYOUT]; 126 | } 127 | 128 | 129 | ModelSettingJson.prototype.getInitParamNum = function() 130 | { 131 | return (this.json[this.INIT_PARAM] == null) ? 0 : this.json[this.INIT_PARAM].length; 132 | } 133 | 134 | 135 | ModelSettingJson.prototype.getMotionNum = function(name) 136 | { 137 | if (this.json[this.MOTION_GROUPS] == null || 138 | this.json[this.MOTION_GROUPS][name] == null) 139 | return 0; 140 | 141 | return this.json[this.MOTION_GROUPS][name].length; 142 | } 143 | 144 | 145 | ModelSettingJson.prototype.getMotionFile = function(name, n) 146 | { 147 | if (this.json[this.MOTION_GROUPS] == null || 148 | this.json[this.MOTION_GROUPS][name] == null || 149 | this.json[this.MOTION_GROUPS][name][n] == null) 150 | return null; 151 | 152 | return this.json[this.MOTION_GROUPS][name][n][this.FILE]; 153 | } 154 | 155 | 156 | ModelSettingJson.prototype.getMotionSound = function(name, n) 157 | { 158 | if (this.json[this.MOTION_GROUPS] == null || 159 | this.json[this.MOTION_GROUPS][name] == null || 160 | this.json[this.MOTION_GROUPS][name][n] == null || 161 | this.json[this.MOTION_GROUPS][name][n][this.SOUND] == null) 162 | return null; 163 | 164 | return this.json[this.MOTION_GROUPS][name][n][this.SOUND]; 165 | } 166 | 167 | 168 | ModelSettingJson.prototype.getMotionFadeIn = function(name, n) 169 | { 170 | if (this.json[this.MOTION_GROUPS] == null || 171 | this.json[this.MOTION_GROUPS][name] == null || 172 | this.json[this.MOTION_GROUPS][name][n] == null || 173 | this.json[this.MOTION_GROUPS][name][n][this.FADE_IN] == null) 174 | return 1000; 175 | 176 | return this.json[this.MOTION_GROUPS][name][n][this.FADE_IN]; 177 | } 178 | 179 | 180 | ModelSettingJson.prototype.getMotionFadeOut = function(name, n) 181 | { 182 | if (this.json[this.MOTION_GROUPS] == null || 183 | this.json[this.MOTION_GROUPS][name] == null || 184 | this.json[this.MOTION_GROUPS][name][n] == null || 185 | this.json[this.MOTION_GROUPS][name][n][this.FADE_OUT] == null) 186 | return 1000; 187 | 188 | return this.json[this.MOTION_GROUPS][name][n][this.FADE_OUT]; 189 | } 190 | 191 | 192 | ModelSettingJson.prototype.getInitParamID = function(n) 193 | { 194 | if (this.json[this.INIT_PARAM] == null || 195 | this.json[this.INIT_PARAM][n] == null) 196 | return null; 197 | 198 | return this.json[this.INIT_PARAM][n][this.ID]; 199 | } 200 | 201 | 202 | ModelSettingJson.prototype.getInitParamValue = function(n) 203 | { 204 | if (this.json[this.INIT_PARAM] == null || this.json[this.INIT_PARAM][n] == null) 205 | return NaN; 206 | 207 | return this.json[this.INIT_PARAM][n][this.VALUE]; 208 | } 209 | 210 | 211 | ModelSettingJson.prototype.getInitPartsVisibleNum = function() 212 | { 213 | return (this.json[this.INIT_PARTS_VISIBLE] == null) ? 0 : this.json[this.INIT_PARTS_VISIBLE].length; 214 | } 215 | 216 | 217 | ModelSettingJson.prototype.getInitPartsVisibleID = function(n) 218 | { 219 | if (this.json[this.INIT_PARTS_VISIBLE] == null || this.json[this.INIT_PARTS_VISIBLE][n] == null) 220 | return null; 221 | return this.json[this.INIT_PARTS_VISIBLE][n][this.ID]; 222 | } 223 | 224 | 225 | ModelSettingJson.prototype.getInitPartsVisibleValue = function(n) 226 | { 227 | if (this.json[this.INIT_PARTS_VISIBLE] == null || this.json[this.INIT_PARTS_VISIBLE][n] == null) 228 | return NaN; 229 | 230 | return this.json[this.INIT_PARTS_VISIBLE][n][this.VALUE]; 231 | } 232 | -------------------------------------------------------------------------------- /src/lib/glMatrix-common.js: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. */ 20 | 21 | /** 22 | * @class Common utilities 23 | * @name glMatrix 24 | */ 25 | var glMatrix = {}; 26 | 27 | // Configuration Constants 28 | glMatrix.EPSILON = 0.000001; 29 | glMatrix.ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array; 30 | glMatrix.RANDOM = Math.random; 31 | glMatrix.ENABLE_SIMD = false; 32 | 33 | var self = this || window || global; 34 | 35 | // Capability detection 36 | glMatrix.SIMD_AVAILABLE = (glMatrix.ARRAY_TYPE === self.Float32Array) && ('SIMD' in self); 37 | glMatrix.USE_SIMD = glMatrix.ENABLE_SIMD && glMatrix.SIMD_AVAILABLE; 38 | 39 | /** 40 | * Sets the type of array used when creating new vectors and matrices 41 | * 42 | * @param {Type} type Array type, such as Float32Array or Array 43 | */ 44 | glMatrix.setMatrixArrayType = function(type) { 45 | glMatrix.ARRAY_TYPE = type; 46 | } 47 | 48 | var degree = Math.PI / 180; 49 | 50 | /** 51 | * Convert Degree To Radian 52 | * 53 | * @param {Number} a Angle in Degrees 54 | */ 55 | glMatrix.toRadian = function(a){ 56 | return a * degree; 57 | } 58 | 59 | /** 60 | * Tests whether or not the arguments have approximately the same value, within an absolute 61 | * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less 62 | * than or equal to 1.0, and a relative tolerance is used for larger values) 63 | * 64 | * @param {Number} a The first number to test. 65 | * @param {Number} b The second number to test. 66 | * @returns {Boolean} True if the numbers are approximately equal, false otherwise. 67 | */ 68 | glMatrix.equals = function(a, b) { 69 | return Math.abs(a - b) <= glMatrix.EPSILON*Math.max(1.0, Math.abs(a), Math.abs(b)); 70 | } 71 | 72 | module.exports = glMatrix; -------------------------------------------------------------------------------- /src/lib/live2d.js: -------------------------------------------------------------------------------- 1 | // const log = console.log; 2 | // console.log = () => {}; 3 | // const __ = require('./live2dsdk'); 4 | // console.log = log; 5 | 6 | export { 7 | UtSystem, 8 | UtDebug, 9 | LDTransform, 10 | LDGL, 11 | Live2D, 12 | Live2DModelWebGL, 13 | Live2DModelJS, 14 | Live2DMotion, 15 | MotionQueueManager, 16 | PhysicsHair, 17 | AMotion, 18 | PartsDataID, 19 | DrawDataID, 20 | BaseDataID, 21 | ParamID 22 | }; 23 | -------------------------------------------------------------------------------- /src/lib/netUtils.js: -------------------------------------------------------------------------------- 1 | import { Live2DModelWebGL } from '../../src/lib/live2d'; 2 | 3 | export function loadBytes(path, type, callback) { 4 | var request = new XMLHttpRequest(); 5 | request.open('GET',path, true); 6 | request.responseType = type; 7 | request.onload = () => { 8 | switch (request.status) { 9 | case 200: 10 | callback(request.response); 11 | break; 12 | default: 13 | console.error( 'Failed to load (' + request.status + ') : ' + path ); 14 | break; 15 | } 16 | } 17 | request.send(null); 18 | } 19 | -------------------------------------------------------------------------------- /webpack.config.example.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | var webpack = require('webpack'); 4 | 5 | module.exports = { 6 | entry: "./example/index.js", 7 | output: { 8 | path: path.resolve(__dirname, './example-dist'), 9 | filename: "index.js", 10 | libraryTarget: 'umd' 11 | }, 12 | resolve: { 13 | extensions: ['', '.js'] 14 | }, 15 | module: { 16 | loaders: [ 17 | { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}, 18 | ] 19 | }, 20 | plugins: [ 21 | new webpack.BannerPlugin(fs.readFileSync('./LICENSE.txt', 'utf8')), 22 | ], 23 | devServer: { 24 | contentBase: './example/', 25 | historyApiFallback: true, 26 | hot: true, 27 | inline: true, 28 | progress: true, 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | var webpack = require('webpack'); 4 | var min = (process.argv.indexOf('--optimize-minimize') === -1) ? '' : '.min'; 5 | 6 | module.exports = { 7 | entry: "./src/index.js", 8 | output: { 9 | path: path.resolve(__dirname, './dist'), 10 | filename: `pixi-live2d${min}.js`, 11 | libraryTarget: 'umd' 12 | }, 13 | resolve: { 14 | extensions: ['', '.js'] 15 | }, 16 | module: { 17 | loaders: [ 18 | { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}, 19 | ] 20 | }, 21 | externals: { 22 | "pixi.js": "PIXI" 23 | }, 24 | plugins: [ 25 | new webpack.BannerPlugin(fs.readFileSync('./LICENSE.txt', 'utf8')), 26 | ], 27 | devServer: { 28 | historyApiFallback: true, 29 | hot: true, 30 | inline: true, 31 | progress: true, 32 | } 33 | }; 34 | --------------------------------------------------------------------------------