Update to Cubism 4 SDK for Web R5 beta4

This commit is contained in:
wada
2022-07-07 11:30:03 +09:00
parent 55b7a9233e
commit 4e14ef622d
4 changed files with 51 additions and 4 deletions

View File

@ -416,6 +416,18 @@ export class CubismModel {
return this._model.parameters.count;
}
/**
* パラメータの種類の取得
* @param parameterIndex パラメータのインデックス
* @return csmParameterType_Normal -> 通常のパラメータ
* csmParameterType_BlendShape -> ブレンドシェイプパラメータ
*/
public getParameterType(
parameterIndex: number
): Live2DCubismCore.csmParameterType {
return this._model.parameters.types[parameterIndex];
}
/**
* パラメータの最大値の取得
* @param parameterIndex パラメータのインデックス
@ -788,6 +800,15 @@ export class CubismModel {
return screenColor;
}
/**
* Drawableの親パーツのインデックスの取得
* @param drawableIndex Drawableのインデックス
* @return drawableの親パーツのインデックス
*/
public getDrawableParentPartIndex(drawableIndex: number): number {
return this._model.drawables.parentPartIndices[drawableIndex];
}
/**
* Drawableのカリング情報の取得
* @param drawableIndex Drawableのインデックス