@charivo/render-live2d 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +418 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/cubismdefaultparameterid.d.ts +63 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/cubismdefaultparameterid.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/cubismframeworkconfig.d.ts +20 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/cubismframeworkconfig.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/cubismmodelsettingjson.d.ts +332 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/cubismmodelsettingjson.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/effect/cubismbreath.d.ts +74 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/effect/cubismbreath.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/effect/cubismeyeblink.d.ts +101 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/effect/cubismeyeblink.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/effect/cubismpose.d.ts +96 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/effect/cubismpose.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/icubismmodelsetting.d.ts +166 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/icubismmodelsetting.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/id/cubismid.d.ts +57 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/id/cubismid.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/id/cubismidmanager.d.ts +63 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/id/cubismidmanager.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/live2dcubismframework.d.ts +105 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/live2dcubismframework.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismmath.d.ts +158 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismmath.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismmatrix44.d.ts +147 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismmatrix44.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismmodelmatrix.d.ts +111 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismmodelmatrix.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismtargetpoint.d.ts +54 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismtargetpoint.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismvector2.d.ts +111 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismvector2.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismviewmatrix.d.ts +140 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/math/cubismviewmatrix.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismmoc.d.ts +63 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismmoc.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismmodel.d.ts +953 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismmodel.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismmodeluserdata.d.ts +73 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismmodeluserdata.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismmodeluserdatajson.d.ts +57 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismmodeluserdatajson.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismusermodel.d.ts +226 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/model/cubismusermodel.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/acubismmotion.d.ts +245 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/acubismmotion.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismexpressionmotion.d.ts +118 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismexpressionmotion.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismexpressionmotionmanager.d.ts +112 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismexpressionmotionmanager.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotion.d.ts +209 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotion.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotioninternal.d.ts +121 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotioninternal.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionjson.d.ts +170 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionjson.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionmanager.d.ts +69 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionmanager.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionqueueentry.d.ts +159 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionqueueentry.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionqueuemanager.d.ts +122 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionqueuemanager.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/physics/cubismphysics.d.ts +139 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/physics/cubismphysics.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/physics/cubismphysicsinternal.d.ts +191 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/physics/cubismphysicsinternal.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/physics/cubismphysicsjson.d.ts +225 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/physics/cubismphysicsjson.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/rendering/cubismclippingmanager.d.ts +106 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/rendering/cubismclippingmanager.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/rendering/cubismrenderer.d.ts +214 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/rendering/cubismrenderer.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/rendering/cubismrenderer_webgl.d.ts +240 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/rendering/cubismrenderer_webgl.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/rendering/cubismshader_webgl.d.ts +149 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/rendering/cubismshader_webgl.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/type/csmmap.d.ts +144 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/type/csmmap.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/type/csmrectf.d.ts +56 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/type/csmrectf.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/type/csmstring.d.ts +71 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/type/csmstring.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/type/csmvector.d.ts +144 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/type/csmvector.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/utils/cubismdebug.d.ts +49 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/utils/cubismdebug.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/utils/cubismjson.d.ts +484 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/utils/cubismjson.d.ts.map +1 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/utils/cubismjsonextension.d.ts +18 -0
- package/dist/CubismSdkForWeb-5-r.4/Framework/src/utils/cubismjsonextension.d.ts.map +1 -0
- package/dist/renderer.js +14522 -0
- package/dist/renderer.js.map +1 -0
- package/dist/src/cubism/lappdefine.d.ts +37 -0
- package/dist/src/cubism/lappdefine.d.ts.map +1 -0
- package/dist/src/cubism/lappglmanager.d.ts +16 -0
- package/dist/src/cubism/lappglmanager.d.ts.map +1 -0
- package/dist/src/cubism/lappmodel.d.ts +66 -0
- package/dist/src/cubism/lappmodel.d.ts.map +1 -0
- package/dist/src/cubism/lapppal.d.ts +20 -0
- package/dist/src/cubism/lapppal.d.ts.map +1 -0
- package/dist/src/cubism/lapptexturemanager.d.ts +26 -0
- package/dist/src/cubism/lapptexturemanager.d.ts.map +1 -0
- package/dist/src/cubism/lappwavfilehandler.d.ts +22 -0
- package/dist/src/cubism/lappwavfilehandler.d.ts.map +1 -0
- package/dist/src/cubism/model-host.d.ts +22 -0
- package/dist/src/cubism/model-host.d.ts.map +1 -0
- package/dist/src/renderer.d.ts +54 -0
- package/dist/src/renderer.d.ts.map +1 -0
- package/dist/src/utils/motion.d.ts +6 -0
- package/dist/src/utils/motion.d.ts.map +1 -0
- package/dist/src/utils/resize.d.ts +3 -0
- package/dist/src/utils/resize.d.ts.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Live2D Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by the Live2D Open Software license
|
|
5
|
+
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
|
6
|
+
*/
|
|
7
|
+
import { CubismIdHandle } from '../id/cubismid';
|
|
8
|
+
import { csmString } from '../type/csmstring';
|
|
9
|
+
import { CubismJson } from '../utils/cubismjson';
|
|
10
|
+
/**
|
|
11
|
+
* motion3.jsonのコンテナ。
|
|
12
|
+
*/
|
|
13
|
+
export declare class CubismMotionJson {
|
|
14
|
+
/**
|
|
15
|
+
* コンストラクタ
|
|
16
|
+
* @param buffer motion3.jsonが読み込まれているバッファ
|
|
17
|
+
* @param size バッファのサイズ
|
|
18
|
+
*/
|
|
19
|
+
constructor(buffer: ArrayBuffer, size: number);
|
|
20
|
+
/**
|
|
21
|
+
* デストラクタ相当の処理
|
|
22
|
+
*/
|
|
23
|
+
release(): void;
|
|
24
|
+
/**
|
|
25
|
+
* モーションの長さを取得する
|
|
26
|
+
* @return モーションの長さ[秒]
|
|
27
|
+
*/
|
|
28
|
+
getMotionDuration(): number;
|
|
29
|
+
/**
|
|
30
|
+
* モーションのループ情報の取得
|
|
31
|
+
* @return true ループする
|
|
32
|
+
* @return false ループしない
|
|
33
|
+
*/
|
|
34
|
+
isMotionLoop(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* motion3.jsonファイルの整合性チェック
|
|
37
|
+
*
|
|
38
|
+
* @return 正常なファイルの場合はtrueを返す。
|
|
39
|
+
*/
|
|
40
|
+
hasConsistency(): boolean;
|
|
41
|
+
getEvaluationOptionFlag(flagType: EvaluationOptionFlag): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* モーションカーブの個数の取得
|
|
44
|
+
* @return モーションカーブの個数
|
|
45
|
+
*/
|
|
46
|
+
getMotionCurveCount(): number;
|
|
47
|
+
/**
|
|
48
|
+
* モーションのフレームレートの取得
|
|
49
|
+
* @return フレームレート[FPS]
|
|
50
|
+
*/
|
|
51
|
+
getMotionFps(): number;
|
|
52
|
+
/**
|
|
53
|
+
* モーションのセグメントの総合計の取得
|
|
54
|
+
* @return モーションのセグメントの取得
|
|
55
|
+
*/
|
|
56
|
+
getMotionTotalSegmentCount(): number;
|
|
57
|
+
/**
|
|
58
|
+
* モーションのカーブの制御店の総合計の取得
|
|
59
|
+
* @return モーションのカーブの制御点の総合計
|
|
60
|
+
*/
|
|
61
|
+
getMotionTotalPointCount(): number;
|
|
62
|
+
/**
|
|
63
|
+
* モーションのフェードイン時間の存在
|
|
64
|
+
* @return true 存在する
|
|
65
|
+
* @return false 存在しない
|
|
66
|
+
*/
|
|
67
|
+
isExistMotionFadeInTime(): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* モーションのフェードアウト時間の存在
|
|
70
|
+
* @return true 存在する
|
|
71
|
+
* @return false 存在しない
|
|
72
|
+
*/
|
|
73
|
+
isExistMotionFadeOutTime(): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* モーションのフェードイン時間の取得
|
|
76
|
+
* @return フェードイン時間[秒]
|
|
77
|
+
*/
|
|
78
|
+
getMotionFadeInTime(): number;
|
|
79
|
+
/**
|
|
80
|
+
* モーションのフェードアウト時間の取得
|
|
81
|
+
* @return フェードアウト時間[秒]
|
|
82
|
+
*/
|
|
83
|
+
getMotionFadeOutTime(): number;
|
|
84
|
+
/**
|
|
85
|
+
* モーションのカーブの種類の取得
|
|
86
|
+
* @param curveIndex カーブのインデックス
|
|
87
|
+
* @return カーブの種類
|
|
88
|
+
*/
|
|
89
|
+
getMotionCurveTarget(curveIndex: number): string;
|
|
90
|
+
/**
|
|
91
|
+
* モーションのカーブのIDの取得
|
|
92
|
+
* @param curveIndex カーブのインデックス
|
|
93
|
+
* @return カーブのID
|
|
94
|
+
*/
|
|
95
|
+
getMotionCurveId(curveIndex: number): CubismIdHandle;
|
|
96
|
+
/**
|
|
97
|
+
* モーションのカーブのフェードイン時間の存在
|
|
98
|
+
* @param curveIndex カーブのインデックス
|
|
99
|
+
* @return true 存在する
|
|
100
|
+
* @return false 存在しない
|
|
101
|
+
*/
|
|
102
|
+
isExistMotionCurveFadeInTime(curveIndex: number): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* モーションのカーブのフェードアウト時間の存在
|
|
105
|
+
* @param curveIndex カーブのインデックス
|
|
106
|
+
* @return true 存在する
|
|
107
|
+
* @return false 存在しない
|
|
108
|
+
*/
|
|
109
|
+
isExistMotionCurveFadeOutTime(curveIndex: number): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* モーションのカーブのフェードイン時間の取得
|
|
112
|
+
* @param curveIndex カーブのインデックス
|
|
113
|
+
* @return フェードイン時間[秒]
|
|
114
|
+
*/
|
|
115
|
+
getMotionCurveFadeInTime(curveIndex: number): number;
|
|
116
|
+
/**
|
|
117
|
+
* モーションのカーブのフェードアウト時間の取得
|
|
118
|
+
* @param curveIndex カーブのインデックス
|
|
119
|
+
* @return フェードアウト時間[秒]
|
|
120
|
+
*/
|
|
121
|
+
getMotionCurveFadeOutTime(curveIndex: number): number;
|
|
122
|
+
/**
|
|
123
|
+
* モーションのカーブのセグメントの個数を取得する
|
|
124
|
+
* @param curveIndex カーブのインデックス
|
|
125
|
+
* @return モーションのカーブのセグメントの個数
|
|
126
|
+
*/
|
|
127
|
+
getMotionCurveSegmentCount(curveIndex: number): number;
|
|
128
|
+
/**
|
|
129
|
+
* モーションのカーブのセグメントの値の取得
|
|
130
|
+
* @param curveIndex カーブのインデックス
|
|
131
|
+
* @param segmentIndex セグメントのインデックス
|
|
132
|
+
* @return セグメントの値
|
|
133
|
+
*/
|
|
134
|
+
getMotionCurveSegment(curveIndex: number, segmentIndex: number): number;
|
|
135
|
+
/**
|
|
136
|
+
* イベントの個数の取得
|
|
137
|
+
* @return イベントの個数
|
|
138
|
+
*/
|
|
139
|
+
getEventCount(): number;
|
|
140
|
+
/**
|
|
141
|
+
* イベントの総文字数の取得
|
|
142
|
+
* @return イベントの総文字数
|
|
143
|
+
*/
|
|
144
|
+
getTotalEventValueSize(): number;
|
|
145
|
+
/**
|
|
146
|
+
* イベントの時間の取得
|
|
147
|
+
* @param userDataIndex イベントのインデックス
|
|
148
|
+
* @return イベントの時間[秒]
|
|
149
|
+
*/
|
|
150
|
+
getEventTime(userDataIndex: number): number;
|
|
151
|
+
/**
|
|
152
|
+
* イベントの取得
|
|
153
|
+
* @param userDataIndex イベントのインデックス
|
|
154
|
+
* @return イベントの文字列
|
|
155
|
+
*/
|
|
156
|
+
getEventValue(userDataIndex: number): csmString;
|
|
157
|
+
_json: CubismJson;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* @brief ベジェカーブの解釈方法のフラグタイプ
|
|
161
|
+
*/
|
|
162
|
+
export declare enum EvaluationOptionFlag {
|
|
163
|
+
EvaluationOptionFlag_AreBeziersRistricted = 0
|
|
164
|
+
}
|
|
165
|
+
import * as $ from './cubismmotionjson';
|
|
166
|
+
export declare namespace Live2DCubismFramework {
|
|
167
|
+
const CubismMotionJson: typeof $.CubismMotionJson;
|
|
168
|
+
type CubismMotionJson = $.CubismMotionJson;
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=cubismmotionjson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cubismmotionjson.d.ts","sourceRoot":"","sources":["../../../../../CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionjson.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAW,MAAM,qBAAqB,CAAC;AAwB1D;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;;;OAIG;gBACgB,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIpD;;OAEG;IACI,OAAO,IAAI,IAAI;IAItB;;;OAGG;IACI,iBAAiB,IAAI,MAAM;IAQlC;;;;OAIG;IACI,YAAY,IAAI,OAAO;IAQ9B;;;;OAIG;IACH,cAAc,IAAI,OAAO;IA+ElB,uBAAuB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO;IAcvE;;;OAGG;IACI,mBAAmB,IAAI,MAAM;IAQpC;;;OAGG;IACI,YAAY,IAAI,MAAM;IAQ7B;;;OAGG;IACI,0BAA0B,IAAI,MAAM;IAQ3C;;;OAGG;IACI,wBAAwB,IAAI,MAAM;IAQzC;;;;OAIG;IACI,uBAAuB,IAAI,OAAO;IAQzC;;;;OAIG;IACI,wBAAwB,IAAI,OAAO;IAQ1C;;;OAGG;IACI,mBAAmB,IAAI,MAAM;IAQpC;;;OAGG;IACI,oBAAoB,IAAI,MAAM;IAQrC;;;;OAIG;IACI,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IASvD;;;;OAIG;IACI,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc;IAW3D;;;;;OAKG;IACI,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAShE;;;;;OAKG;IACI,6BAA6B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IASjE;;;;OAIG;IACI,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAS3D;;;;OAIG;IACI,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAS5D;;;;OAIG;IACI,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAU7D;;;;;OAKG;IACI,qBAAqB,CAC1B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM;IAUT;;;OAGG;IACI,aAAa,IAAI,MAAM;IAQ9B;;;OAGG;IACI,sBAAsB,IAAI,MAAM;IAQvC;;;;OAIG;IACI,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;IASlD;;;;OAIG;IACI,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS;IAWtD,KAAK,EAAE,UAAU,CAAC;CACnB;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,yCAAyC,IAAI;CAC9C;AAGD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AAExC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,gBAAgB,2BAAqB,CAAC;IACnD,KAAY,gBAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAC;CACnD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Live2D Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by the Live2D Open Software license
|
|
5
|
+
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
|
6
|
+
*/
|
|
7
|
+
import { CubismModel } from '../model/cubismmodel';
|
|
8
|
+
import { ACubismMotion } from './acubismmotion';
|
|
9
|
+
import { CubismMotionQueueEntryHandle, CubismMotionQueueManager } from './cubismmotionqueuemanager';
|
|
10
|
+
/**
|
|
11
|
+
* モーションの管理
|
|
12
|
+
*
|
|
13
|
+
* モーションの管理を行うクラス
|
|
14
|
+
*/
|
|
15
|
+
export declare class CubismMotionManager extends CubismMotionQueueManager {
|
|
16
|
+
/**
|
|
17
|
+
* コンストラクタ
|
|
18
|
+
*/
|
|
19
|
+
constructor();
|
|
20
|
+
/**
|
|
21
|
+
* 再生中のモーションの優先度の取得
|
|
22
|
+
* @return モーションの優先度
|
|
23
|
+
*/
|
|
24
|
+
getCurrentPriority(): number;
|
|
25
|
+
/**
|
|
26
|
+
* 予約中のモーションの優先度を取得する。
|
|
27
|
+
* @return モーションの優先度
|
|
28
|
+
*/
|
|
29
|
+
getReservePriority(): number;
|
|
30
|
+
/**
|
|
31
|
+
* 予約中のモーションの優先度を設定する。
|
|
32
|
+
* @param val 優先度
|
|
33
|
+
*/
|
|
34
|
+
setReservePriority(val: number): void;
|
|
35
|
+
/**
|
|
36
|
+
* 優先度を設定してモーションを開始する。
|
|
37
|
+
*
|
|
38
|
+
* @param motion モーション
|
|
39
|
+
* @param autoDelete 再生が狩猟したモーションのインスタンスを削除するならtrue
|
|
40
|
+
* @param priority 優先度
|
|
41
|
+
* @return 開始したモーションの識別番号を返す。個別のモーションが終了したか否かを判定するIsFinished()の引数で使用する。開始できない時は「-1」
|
|
42
|
+
*/
|
|
43
|
+
startMotionPriority(motion: ACubismMotion, autoDelete: boolean, priority: number): CubismMotionQueueEntryHandle;
|
|
44
|
+
/**
|
|
45
|
+
* モーションを更新して、モデルにパラメータ値を反映する。
|
|
46
|
+
*
|
|
47
|
+
* @param model 対象のモデル
|
|
48
|
+
* @param deltaTimeSeconds デルタ時間[秒]
|
|
49
|
+
* @return true 更新されている
|
|
50
|
+
* @return false 更新されていない
|
|
51
|
+
*/
|
|
52
|
+
updateMotion(model: CubismModel, deltaTimeSeconds: number): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* モーションを予約する。
|
|
55
|
+
*
|
|
56
|
+
* @param priority 優先度
|
|
57
|
+
* @return true 予約できた
|
|
58
|
+
* @return false 予約できなかった
|
|
59
|
+
*/
|
|
60
|
+
reserveMotion(priority: number): boolean;
|
|
61
|
+
_currentPriority: number;
|
|
62
|
+
_reservePriority: number;
|
|
63
|
+
}
|
|
64
|
+
import * as $ from './cubismmotionmanager';
|
|
65
|
+
export declare namespace Live2DCubismFramework {
|
|
66
|
+
const CubismMotionManager: typeof $.CubismMotionManager;
|
|
67
|
+
type CubismMotionManager = $.CubismMotionManager;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=cubismmotionmanager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cubismmotionmanager.d.ts","sourceRoot":"","sources":["../../../../../CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionmanager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAEpC;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,wBAAwB;IAC/D;;OAEG;;IAOH;;;OAGG;IACI,kBAAkB,IAAI,MAAM;IAInC;;;OAGG;IACI,kBAAkB,IAAI,MAAM;IAInC;;;OAGG;IACI,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI5C;;;;;;;OAOG;IACI,mBAAmB,CACxB,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,OAAO,EACnB,QAAQ,EAAE,MAAM,GACf,4BAA4B;IAU/B;;;;;;;OAOG;IACI,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO;IAY1E;;;;;;OAMG;IACI,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAa/C,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAGD,OAAO,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAE3C,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,mBAAmB,8BAAwB,CAAC;IACzD,KAAY,mBAAmB,GAAG,CAAC,CAAC,mBAAmB,CAAC;CACzD"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Live2D Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by the Live2D Open Software license
|
|
5
|
+
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
|
6
|
+
*/
|
|
7
|
+
import { ACubismMotion } from './acubismmotion';
|
|
8
|
+
import { CubismMotionQueueEntryHandle } from './cubismmotionqueuemanager';
|
|
9
|
+
/**
|
|
10
|
+
* CubismMotionQueueManagerで再生している各モーションの管理クラス。
|
|
11
|
+
*/
|
|
12
|
+
export declare class CubismMotionQueueEntry {
|
|
13
|
+
/**
|
|
14
|
+
* コンストラクタ
|
|
15
|
+
*/
|
|
16
|
+
constructor();
|
|
17
|
+
/**
|
|
18
|
+
* デストラクタ相当の処理
|
|
19
|
+
*/
|
|
20
|
+
release(): void;
|
|
21
|
+
/**
|
|
22
|
+
* フェードアウト時間と開始判定の設定
|
|
23
|
+
* @param fadeOutSeconds フェードアウトにかかる時間[秒]
|
|
24
|
+
*/
|
|
25
|
+
setFadeOut(fadeOutSeconds: number): void;
|
|
26
|
+
/**
|
|
27
|
+
* フェードアウトの開始
|
|
28
|
+
* @param fadeOutSeconds フェードアウトにかかる時間[秒]
|
|
29
|
+
* @param userTimeSeconds デルタ時間の積算値[秒]
|
|
30
|
+
*/
|
|
31
|
+
startFadeOut(fadeOutSeconds: number, userTimeSeconds: number): void;
|
|
32
|
+
/**
|
|
33
|
+
* モーションの終了の確認
|
|
34
|
+
*
|
|
35
|
+
* @return true モーションが終了した
|
|
36
|
+
* @return false 終了していない
|
|
37
|
+
*/
|
|
38
|
+
isFinished(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* モーションの開始の確認
|
|
41
|
+
* @return true モーションが開始した
|
|
42
|
+
* @return false 開始していない
|
|
43
|
+
*/
|
|
44
|
+
isStarted(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* モーションの開始時刻の取得
|
|
47
|
+
* @return モーションの開始時刻[秒]
|
|
48
|
+
*/
|
|
49
|
+
getStartTime(): number;
|
|
50
|
+
/**
|
|
51
|
+
* フェードインの開始時刻の取得
|
|
52
|
+
* @return フェードインの開始時刻[秒]
|
|
53
|
+
*/
|
|
54
|
+
getFadeInStartTime(): number;
|
|
55
|
+
/**
|
|
56
|
+
* フェードインの終了時刻の取得
|
|
57
|
+
* @return フェードインの終了時刻の取得
|
|
58
|
+
*/
|
|
59
|
+
getEndTime(): number;
|
|
60
|
+
/**
|
|
61
|
+
* モーションの開始時刻の設定
|
|
62
|
+
* @param startTime モーションの開始時刻
|
|
63
|
+
*/
|
|
64
|
+
setStartTime(startTime: number): void;
|
|
65
|
+
/**
|
|
66
|
+
* フェードインの開始時刻の設定
|
|
67
|
+
* @param startTime フェードインの開始時刻[秒]
|
|
68
|
+
*/
|
|
69
|
+
setFadeInStartTime(startTime: number): void;
|
|
70
|
+
/**
|
|
71
|
+
* フェードインの終了時刻の設定
|
|
72
|
+
* @param endTime フェードインの終了時刻[秒]
|
|
73
|
+
*/
|
|
74
|
+
setEndTime(endTime: number): void;
|
|
75
|
+
/**
|
|
76
|
+
* モーションの終了の設定
|
|
77
|
+
* @param f trueならモーションの終了
|
|
78
|
+
*/
|
|
79
|
+
setIsFinished(f: boolean): void;
|
|
80
|
+
/**
|
|
81
|
+
* モーション開始の設定
|
|
82
|
+
* @param f trueならモーションの開始
|
|
83
|
+
*/
|
|
84
|
+
setIsStarted(f: boolean): void;
|
|
85
|
+
/**
|
|
86
|
+
* モーションの有効性の確認
|
|
87
|
+
* @return true モーションは有効
|
|
88
|
+
* @return false モーションは無効
|
|
89
|
+
*/
|
|
90
|
+
isAvailable(): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* モーションの有効性の設定
|
|
93
|
+
* @param v trueならモーションは有効
|
|
94
|
+
*/
|
|
95
|
+
setIsAvailable(v: boolean): void;
|
|
96
|
+
/**
|
|
97
|
+
* モーションの状態の設定
|
|
98
|
+
* @param timeSeconds 現在時刻[秒]
|
|
99
|
+
* @param weight モーション尾重み
|
|
100
|
+
*/
|
|
101
|
+
setState(timeSeconds: number, weight: number): void;
|
|
102
|
+
/**
|
|
103
|
+
* モーションの現在時刻の取得
|
|
104
|
+
* @return モーションの現在時刻[秒]
|
|
105
|
+
*/
|
|
106
|
+
getStateTime(): number;
|
|
107
|
+
/**
|
|
108
|
+
* モーションの重みの取得
|
|
109
|
+
* @return モーションの重み
|
|
110
|
+
*/
|
|
111
|
+
getStateWeight(): number;
|
|
112
|
+
/**
|
|
113
|
+
* 最後にイベントの発火をチェックした時間を取得
|
|
114
|
+
*
|
|
115
|
+
* @return 最後にイベントの発火をチェックした時間[秒]
|
|
116
|
+
*/
|
|
117
|
+
getLastCheckEventSeconds(): number;
|
|
118
|
+
/**
|
|
119
|
+
* 最後にイベントをチェックした時間を設定
|
|
120
|
+
* @param checkSeconds 最後にイベントをチェックした時間[秒]
|
|
121
|
+
*/
|
|
122
|
+
setLastCheckEventSeconds(checkSeconds: number): void;
|
|
123
|
+
/**
|
|
124
|
+
* フェードアウト開始判定の取得
|
|
125
|
+
* @return フェードアウト開始するかどうか
|
|
126
|
+
*/
|
|
127
|
+
isTriggeredFadeOut(): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* フェードアウト時間の取得
|
|
130
|
+
* @return フェードアウト時間[秒]
|
|
131
|
+
*/
|
|
132
|
+
getFadeOutSeconds(): number;
|
|
133
|
+
/**
|
|
134
|
+
* モーションの取得
|
|
135
|
+
*
|
|
136
|
+
* @return モーション
|
|
137
|
+
*/
|
|
138
|
+
getCubismMotion(): ACubismMotion;
|
|
139
|
+
_autoDelete: boolean;
|
|
140
|
+
_motion: ACubismMotion;
|
|
141
|
+
_available: boolean;
|
|
142
|
+
_finished: boolean;
|
|
143
|
+
_started: boolean;
|
|
144
|
+
_startTimeSeconds: number;
|
|
145
|
+
_fadeInStartTimeSeconds: number;
|
|
146
|
+
_endTimeSeconds: number;
|
|
147
|
+
_stateTimeSeconds: number;
|
|
148
|
+
_stateWeight: number;
|
|
149
|
+
_lastEventCheckSeconds: number;
|
|
150
|
+
private _fadeOutSeconds;
|
|
151
|
+
private _isTriggeredFadeOut;
|
|
152
|
+
_motionQueueEntryHandle: CubismMotionQueueEntryHandle;
|
|
153
|
+
}
|
|
154
|
+
import * as $ from './cubismmotionqueueentry';
|
|
155
|
+
export declare namespace Live2DCubismFramework {
|
|
156
|
+
const CubismMotionQueueEntry: typeof $.CubismMotionQueueEntry;
|
|
157
|
+
type CubismMotionQueueEntry = $.CubismMotionQueueEntry;
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=cubismmotionqueueentry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cubismmotionqueueentry.d.ts","sourceRoot":"","sources":["../../../../../CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionqueueentry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAE1E;;GAEG;AACH,qBAAa,sBAAsB;IACjC;;OAEG;;IAkBH;;OAEG;IACI,OAAO,IAAI,IAAI;IAMtB;;;OAGG;IACI,UAAU,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAK/C;;;;OAIG;IACI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI;IAY1E;;;;;OAKG;IACI,UAAU,IAAI,OAAO;IAI5B;;;;OAIG;IACI,SAAS,IAAI,OAAO;IAI3B;;;OAGG;IACI,YAAY,IAAI,MAAM;IAI7B;;;OAGG;IACI,kBAAkB,IAAI,MAAM;IAInC;;;OAGG;IACI,UAAU,IAAI,MAAM;IAI3B;;;OAGG;IACI,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI5C;;;OAGG;IACI,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIlD;;;OAGG;IACI,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIxC;;;OAGG;IACI,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAItC;;;OAGG;IACI,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAIrC;;;;OAIG;IACI,WAAW,IAAI,OAAO;IAI7B;;;OAGG;IACI,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAIvC;;;;OAIG;IACI,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAK1D;;;OAGG;IACI,YAAY,IAAI,MAAM;IAI7B;;;OAGG;IACI,cAAc,IAAI,MAAM;IAI/B;;;;OAIG;IACI,wBAAwB,IAAI,MAAM;IAIzC;;;OAGG;IACI,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAI3D;;;OAGG;IACI,kBAAkB,IAAI,OAAO;IAIpC;;;OAGG;IACI,iBAAiB,IAAI,MAAM;IAIlC;;;;OAIG;IACI,eAAe,IAAI,aAAa;IAIvC,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;IAEvB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,mBAAmB,CAAU;IAErC,uBAAuB,EAAE,4BAA4B,CAAC;CACvD;AAGD,OAAO,KAAK,CAAC,MAAM,0BAA0B,CAAC;AAE9C,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,sBAAsB,iCAA2B,CAAC;IAC/D,KAAY,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC;CAC/D"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Live2D Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by the Live2D Open Software license
|
|
5
|
+
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
|
6
|
+
*/
|
|
7
|
+
import { ACubismMotion } from './acubismmotion';
|
|
8
|
+
import { CubismMotionQueueEntry } from './cubismmotionqueueentry';
|
|
9
|
+
import { csmVector } from '../type/csmvector';
|
|
10
|
+
import { CubismModel } from '../model/cubismmodel';
|
|
11
|
+
import { csmString } from '../type/csmstring';
|
|
12
|
+
/**
|
|
13
|
+
* モーション再生の管理
|
|
14
|
+
*
|
|
15
|
+
* モーション再生の管理用クラス。CubismMotionモーションなどACubismMotionのサブクラスを再生するために使用する。
|
|
16
|
+
*
|
|
17
|
+
* @note 再生中に別のモーションが StartMotion()された場合は、新しいモーションに滑らかに変化し旧モーションは中断する。
|
|
18
|
+
* 表情用モーション、体用モーションなどを分けてモーション化した場合など、
|
|
19
|
+
* 複数のモーションを同時に再生させる場合は、複数のCubismMotionQueueManagerインスタンスを使用する。
|
|
20
|
+
*/
|
|
21
|
+
export declare class CubismMotionQueueManager {
|
|
22
|
+
/**
|
|
23
|
+
* コンストラクタ
|
|
24
|
+
*/
|
|
25
|
+
constructor();
|
|
26
|
+
/**
|
|
27
|
+
* デストラクタ
|
|
28
|
+
*/
|
|
29
|
+
release(): void;
|
|
30
|
+
/**
|
|
31
|
+
* 指定したモーションの開始
|
|
32
|
+
*
|
|
33
|
+
* 指定したモーションを開始する。同じタイプのモーションが既にある場合は、既存のモーションに終了フラグを立て、フェードアウトを開始させる。
|
|
34
|
+
*
|
|
35
|
+
* @param motion 開始するモーション
|
|
36
|
+
* @param autoDelete 再生が終了したモーションのインスタンスを削除するなら true
|
|
37
|
+
* @param userTimeSeconds Deprecated: デルタ時間の積算値[秒] 関数内で参照していないため使用は非推奨。
|
|
38
|
+
* @return 開始したモーションの識別番号を返す。個別のモーションが終了したか否かを判定するIsFinished()の引数で使用する。開始できない時は「-1」
|
|
39
|
+
*/
|
|
40
|
+
startMotion(motion: ACubismMotion, autoDelete: boolean, userTimeSeconds?: number): CubismMotionQueueEntryHandle;
|
|
41
|
+
/**
|
|
42
|
+
* 全てのモーションの終了の確認
|
|
43
|
+
* @return true 全て終了している
|
|
44
|
+
* @return false 終了していない
|
|
45
|
+
*/
|
|
46
|
+
isFinished(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* 指定したモーションの終了の確認
|
|
49
|
+
* @param motionQueueEntryNumber モーションの識別番号
|
|
50
|
+
* @return true 全て終了している
|
|
51
|
+
* @return false 終了していない
|
|
52
|
+
*/
|
|
53
|
+
isFinishedByHandle(motionQueueEntryNumber: CubismMotionQueueEntryHandle): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 全てのモーションを停止する
|
|
56
|
+
*/
|
|
57
|
+
stopAllMotions(): void;
|
|
58
|
+
/**
|
|
59
|
+
* @brief CubismMotionQueueEntryの配列の取得
|
|
60
|
+
*
|
|
61
|
+
* CubismMotionQueueEntryの配列を取得する。
|
|
62
|
+
*
|
|
63
|
+
* @return CubismMotionQueueEntryの配列へのポインタ
|
|
64
|
+
* @retval NULL 見つからなかった
|
|
65
|
+
*/
|
|
66
|
+
getCubismMotionQueueEntries(): csmVector<CubismMotionQueueEntry>;
|
|
67
|
+
/**
|
|
68
|
+
* 指定したCubismMotionQueueEntryの取得
|
|
69
|
+
|
|
70
|
+
* @param motionQueueEntryNumber モーションの識別番号
|
|
71
|
+
* @return 指定したCubismMotionQueueEntry
|
|
72
|
+
* @return null 見つからなかった
|
|
73
|
+
*/
|
|
74
|
+
getCubismMotionQueueEntry(motionQueueEntryNumber: any): CubismMotionQueueEntry;
|
|
75
|
+
/**
|
|
76
|
+
* イベントを受け取るCallbackの登録
|
|
77
|
+
*
|
|
78
|
+
* @param callback コールバック関数
|
|
79
|
+
* @param customData コールバックに返されるデータ
|
|
80
|
+
*/
|
|
81
|
+
setEventCallback(callback: CubismMotionEventFunction, customData?: any): void;
|
|
82
|
+
/**
|
|
83
|
+
* モーションを更新して、モデルにパラメータ値を反映する。
|
|
84
|
+
*
|
|
85
|
+
* @param model 対象のモデル
|
|
86
|
+
* @param userTimeSeconds デルタ時間の積算値[秒]
|
|
87
|
+
* @return true モデルへパラメータ値の反映あり
|
|
88
|
+
* @return false モデルへパラメータ値の反映なし(モーションの変化なし)
|
|
89
|
+
*/
|
|
90
|
+
doUpdateMotion(model: CubismModel, userTimeSeconds: number): boolean;
|
|
91
|
+
_userTimeSeconds: number;
|
|
92
|
+
_motions: csmVector<CubismMotionQueueEntry>;
|
|
93
|
+
_eventCallBack: CubismMotionEventFunction;
|
|
94
|
+
_eventCustomData: any;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* イベントのコールバック関数を定義
|
|
98
|
+
*
|
|
99
|
+
* イベントのコールバックに登録できる関数の型情報
|
|
100
|
+
* @param caller 発火したイベントを再生させたCubismMotionQueueManager
|
|
101
|
+
* @param eventValue 発火したイベントの文字列データ
|
|
102
|
+
* @param customData コールバックに返される登録時に指定されたデータ
|
|
103
|
+
*/
|
|
104
|
+
export interface CubismMotionEventFunction {
|
|
105
|
+
(caller: CubismMotionQueueManager, eventValue: csmString, customData: any): void;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* モーションの識別番号
|
|
109
|
+
*
|
|
110
|
+
* モーションの識別番号の定義
|
|
111
|
+
*/
|
|
112
|
+
export declare type CubismMotionQueueEntryHandle = any;
|
|
113
|
+
export declare const InvalidMotionQueueEntryHandleValue: CubismMotionQueueEntryHandle;
|
|
114
|
+
import * as $ from './cubismmotionqueuemanager';
|
|
115
|
+
export declare namespace Live2DCubismFramework {
|
|
116
|
+
const CubismMotionQueueManager: typeof $.CubismMotionQueueManager;
|
|
117
|
+
type CubismMotionQueueManager = $.CubismMotionQueueManager;
|
|
118
|
+
const InvalidMotionQueueEntryHandleValue: any;
|
|
119
|
+
type CubismMotionQueueEntryHandle = $.CubismMotionQueueEntryHandle;
|
|
120
|
+
type CubismMotionEventFunction = $.CubismMotionEventFunction;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=cubismmotionqueuemanager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cubismmotionqueuemanager.d.ts","sourceRoot":"","sources":["../../../../../CubismSdkForWeb-5-r.4/Framework/src/motion/cubismmotionqueuemanager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAY,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;;;;;;GAQG;AACH,qBAAa,wBAAwB;IACnC;;OAEG;;IAQH;;OAEG;IACI,OAAO,IAAI,IAAI;IAWtB;;;;;;;;;OASG;IACI,WAAW,CAChB,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,OAAO,EACnB,eAAe,CAAC,EAAE,MAAM,GACvB,4BAA4B;IA0B/B;;;;OAIG;IACI,UAAU,IAAI,OAAO;IAoC5B;;;;;OAKG;IACI,kBAAkB,CACvB,sBAAsB,EAAE,4BAA4B,GACnD,OAAO;IAsBV;;OAEG;IACI,cAAc,IAAI,IAAI;IAwB7B;;;;;;;OAOG;IACI,2BAA2B,IAAI,SAAS,CAAC,sBAAsB,CAAC;IAIvE;;;;;;OAMG;IACI,yBAAyB,CAC9B,sBAAsB,EAAE,GAAG,GAC1B,sBAAsB;IAqBzB;;;;;OAKG;IACI,gBAAgB,CACrB,QAAQ,EAAE,yBAAyB,EACnC,UAAU,GAAE,GAAU,GACrB,IAAI;IAKP;;;;;;;OAOG;IACI,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO;IA+D3E,gBAAgB,EAAE,MAAM,CAAC;IAEzB,QAAQ,EAAE,SAAS,CAAC,sBAAsB,CAAC,CAAC;IAC5C,cAAc,EAAE,yBAAyB,CAAC;IAC1C,gBAAgB,EAAE,GAAG,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC,CACE,MAAM,EAAE,wBAAwB,EAChC,UAAU,EAAE,SAAS,EACrB,UAAU,EAAE,GAAG,GACd,IAAI,CAAC;CACT;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,MAAM,4BAA4B,GAAG,GAAG,CAAC;AACvD,eAAO,MAAM,kCAAkC,EAAE,4BAC7C,CAAC;AAGL,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAEhD,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,wBAAwB,mCAA6B,CAAC;IACnE,KAAY,wBAAwB,GAAG,CAAC,CAAC,wBAAwB,CAAC;IAC3D,MAAM,kCAAkC,KACT,CAAC;IACvC,KAAY,4BAA4B,GAAG,CAAC,CAAC,4BAA4B,CAAC;IAC1E,KAAY,yBAAyB,GAAG,CAAC,CAAC,yBAAyB,CAAC;CACrE"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Live2D Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by the Live2D Open Software license
|
|
5
|
+
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
|
6
|
+
*/
|
|
7
|
+
import { CubismVector2 } from '../math/cubismvector2';
|
|
8
|
+
import { csmVector } from '../type/csmvector';
|
|
9
|
+
import { CubismModel } from '../model/cubismmodel';
|
|
10
|
+
import { CubismPhysicsRig } from './cubismphysicsinternal';
|
|
11
|
+
/**
|
|
12
|
+
* 物理演算クラス
|
|
13
|
+
*/
|
|
14
|
+
export declare class CubismPhysics {
|
|
15
|
+
/**
|
|
16
|
+
* インスタンスの作成
|
|
17
|
+
* @param buffer physics3.jsonが読み込まれているバッファ
|
|
18
|
+
* @param size バッファのサイズ
|
|
19
|
+
* @return 作成されたインスタンス
|
|
20
|
+
*/
|
|
21
|
+
static create(buffer: ArrayBuffer, size: number): CubismPhysics;
|
|
22
|
+
/**
|
|
23
|
+
* インスタンスを破棄する
|
|
24
|
+
* @param physics 破棄するインスタンス
|
|
25
|
+
*/
|
|
26
|
+
static delete(physics: CubismPhysics): void;
|
|
27
|
+
/**
|
|
28
|
+
* physics3.jsonをパースする。
|
|
29
|
+
* @param physicsJson physics3.jsonが読み込まれているバッファ
|
|
30
|
+
* @param size バッファのサイズ
|
|
31
|
+
*/
|
|
32
|
+
parse(physicsJson: ArrayBuffer, size: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* 現在のパラメータ値で物理演算が安定化する状態を演算する。
|
|
35
|
+
* @param model 物理演算の結果を適用するモデル
|
|
36
|
+
*/
|
|
37
|
+
stabilization(model: CubismModel): void;
|
|
38
|
+
/**
|
|
39
|
+
* 物理演算の評価
|
|
40
|
+
*
|
|
41
|
+
* Pendulum interpolation weights
|
|
42
|
+
*
|
|
43
|
+
* 振り子の計算結果は保存され、パラメータへの出力は保存された前回の結果で補間されます。
|
|
44
|
+
* The result of the pendulum calculation is saved and
|
|
45
|
+
* the output to the parameters is interpolated with the saved previous result of the pendulum calculation.
|
|
46
|
+
*
|
|
47
|
+
* 図で示すと[1]と[2]で補間されます。
|
|
48
|
+
* The figure shows the interpolation between [1] and [2].
|
|
49
|
+
*
|
|
50
|
+
* 補間の重みは最新の振り子計算タイミングと次回のタイミングの間で見た現在時間で決定する。
|
|
51
|
+
* The weight of the interpolation are determined by the current time seen between
|
|
52
|
+
* the latest pendulum calculation timing and the next timing.
|
|
53
|
+
*
|
|
54
|
+
* 図で示すと[2]と[4]の間でみた(3)の位置の重みになる。
|
|
55
|
+
* Figure shows the weight of position (3) as seen between [2] and [4].
|
|
56
|
+
*
|
|
57
|
+
* 解釈として振り子計算のタイミングと重み計算のタイミングがズレる。
|
|
58
|
+
* As an interpretation, the pendulum calculation and weights are misaligned.
|
|
59
|
+
*
|
|
60
|
+
* physics3.jsonにFPS情報が存在しない場合は常に前の振り子状態で設定される。
|
|
61
|
+
* If there is no FPS information in physics3.json, it is always set in the previous pendulum state.
|
|
62
|
+
*
|
|
63
|
+
* この仕様は補間範囲を逸脱したことが原因の震えたような見た目を回避を目的にしている。
|
|
64
|
+
* The purpose of this specification is to avoid the quivering appearance caused by deviations from the interpolation range.
|
|
65
|
+
*
|
|
66
|
+
* ------------ time -------------->
|
|
67
|
+
*
|
|
68
|
+
* |+++++|------| <- weight
|
|
69
|
+
* ==[1]====#=====[2]---(3)----(4)
|
|
70
|
+
* ^ output contents
|
|
71
|
+
*
|
|
72
|
+
* 1:_previousRigOutputs
|
|
73
|
+
* 2:_currentRigOutputs
|
|
74
|
+
* 3:_currentRemainTime (now rendering)
|
|
75
|
+
* 4:next particles timing
|
|
76
|
+
* @param model 物理演算の結果を適用するモデル
|
|
77
|
+
* @param deltaTimeSeconds デルタ時間[秒]
|
|
78
|
+
*/
|
|
79
|
+
evaluate(model: CubismModel, deltaTimeSeconds: number): void;
|
|
80
|
+
/**
|
|
81
|
+
* 物理演算結果の適用
|
|
82
|
+
* 振り子演算の最新の結果と一つ前の結果から指定した重みで適用する。
|
|
83
|
+
* @param model 物理演算の結果を適用するモデル
|
|
84
|
+
* @param weight 最新結果の重み
|
|
85
|
+
*/
|
|
86
|
+
interpolate(model: CubismModel, weight: number): void;
|
|
87
|
+
/**
|
|
88
|
+
* オプションの設定
|
|
89
|
+
* @param options オプション
|
|
90
|
+
*/
|
|
91
|
+
setOptions(options: Options): void;
|
|
92
|
+
/**
|
|
93
|
+
* オプションの取得
|
|
94
|
+
* @return オプション
|
|
95
|
+
*/
|
|
96
|
+
getOption(): Options;
|
|
97
|
+
/**
|
|
98
|
+
* コンストラクタ
|
|
99
|
+
*/
|
|
100
|
+
constructor();
|
|
101
|
+
/**
|
|
102
|
+
* デストラクタ相当の処理
|
|
103
|
+
*/
|
|
104
|
+
release(): void;
|
|
105
|
+
/**
|
|
106
|
+
* 初期化する
|
|
107
|
+
*/
|
|
108
|
+
initialize(): void;
|
|
109
|
+
_physicsRig: CubismPhysicsRig;
|
|
110
|
+
_options: Options;
|
|
111
|
+
_currentRigOutputs: csmVector<PhysicsOutput>;
|
|
112
|
+
_previousRigOutputs: csmVector<PhysicsOutput>;
|
|
113
|
+
_currentRemainTime: number;
|
|
114
|
+
_parameterCaches: Float32Array;
|
|
115
|
+
_parameterInputCaches: Float32Array;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* 物理演算のオプション
|
|
119
|
+
*/
|
|
120
|
+
export declare class Options {
|
|
121
|
+
constructor();
|
|
122
|
+
gravity: CubismVector2;
|
|
123
|
+
wind: CubismVector2;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* パラメータに適用する前の物理演算の出力結果
|
|
127
|
+
*/
|
|
128
|
+
export declare class PhysicsOutput {
|
|
129
|
+
constructor();
|
|
130
|
+
outputs: csmVector<number>;
|
|
131
|
+
}
|
|
132
|
+
import * as $ from './cubismphysics';
|
|
133
|
+
export declare namespace Live2DCubismFramework {
|
|
134
|
+
const CubismPhysics: typeof $.CubismPhysics;
|
|
135
|
+
type CubismPhysics = $.CubismPhysics;
|
|
136
|
+
const Options: typeof $.Options;
|
|
137
|
+
type Options = $.Options;
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=cubismphysics.d.ts.map
|