Merge pull request #3 from cocor-au-lait/feature/avoid-namespace
Avoiding needless namespace syntax to simplify importsmaster
commit
c80e158a66
|
@ -23,7 +23,6 @@ rules:
|
|||
- error
|
||||
- allow:
|
||||
- constructors
|
||||
'@typescript-eslint/no-namespace': warn
|
||||
'no-fallthrough': warn
|
||||
'@typescript-eslint/unbound-method': off
|
||||
'no-inner-declarations': off
|
||||
|
|
|
@ -10,4 +10,5 @@ dist/
|
|||
# Exclude some VSCode setting files.
|
||||
.vscode/*
|
||||
!/.vscode/extensions.json
|
||||
!/.vscode/settings.json
|
||||
!/.vscode/tasks.json
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"typescript.tsdk": "./node_modules/typescript/lib"
|
||||
}
|
|
@ -3,8 +3,8 @@
|
|||
"scripts": {
|
||||
"build": "tsc",
|
||||
"test": "tsc --noEmit",
|
||||
"lint": "eslint src -f codeframe --ext .ts",
|
||||
"lint:fix": "eslint src -f codeframe --ext .ts --fix",
|
||||
"lint": "eslint src --ext .ts",
|
||||
"lint:fix": "eslint src --ext .ts --fix",
|
||||
"clean": "rimraf dist"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -10,56 +10,109 @@
|
|||
* デフォルト値の仕様は以下のマニュアルに基づく<br>
|
||||
* https://docs.live2d.com/cubism-editor-manual/standard-parametor-list/
|
||||
*/
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismDefaultParameterId = Object.freeze<Record<string, string>>({
|
||||
// パーツID
|
||||
export const HitAreaPrefix = 'HitArea';
|
||||
export const HitAreaHead = 'Head';
|
||||
export const HitAreaBody = 'Body';
|
||||
export const PartsIdCore = 'Parts01Core';
|
||||
export const PartsArmPrefix = 'Parts01Arm_';
|
||||
export const PartsArmLPrefix = 'Parts01ArmL_';
|
||||
export const PartsArmRPrefix = 'Parts01ArmR_';
|
||||
|
||||
HitAreaPrefix: 'HitArea',
|
||||
HitAreaHead: 'Head',
|
||||
HitAreaBody: 'Body',
|
||||
PartsIdCore: 'Parts01Core',
|
||||
PartsArmPrefix: 'Parts01Arm_',
|
||||
PartsArmLPrefix: 'Parts01ArmL_',
|
||||
PartsArmRPrefix: 'Parts01ArmR_',
|
||||
// パラメータID
|
||||
export const ParamAngleX = 'ParamAngleX';
|
||||
export const ParamAngleY = 'ParamAngleY';
|
||||
export const ParamAngleZ = 'ParamAngleZ';
|
||||
export const ParamEyeLOpen = 'ParamEyeLOpen';
|
||||
export const ParamEyeLSmile = 'ParamEyeLSmile';
|
||||
export const ParamEyeROpen = 'ParamEyeROpen';
|
||||
export const ParamEyeRSmile = 'ParamEyeRSmile';
|
||||
export const ParamEyeBallX = 'ParamEyeBallX';
|
||||
export const ParamEyeBallY = 'ParamEyeBallY';
|
||||
export const ParamEyeBallForm = 'ParamEyeBallForm';
|
||||
export const ParamBrowLY = 'ParamBrowLY';
|
||||
export const ParamBrowRY = 'ParamBrowRY';
|
||||
export const ParamBrowLX = 'ParamBrowLX';
|
||||
export const ParamBrowRX = 'ParamBrowRX';
|
||||
export const ParamBrowLAngle = 'ParamBrowLAngle';
|
||||
export const ParamBrowRAngle = 'ParamBrowRAngle';
|
||||
export const ParamBrowLForm = 'ParamBrowLForm';
|
||||
export const ParamBrowRForm = 'ParamBrowRForm';
|
||||
export const ParamMouthForm = 'ParamMouthForm';
|
||||
export const ParamMouthOpenY = 'ParamMouthOpenY';
|
||||
export const ParamCheek = 'ParamCheek';
|
||||
export const ParamBodyAngleX = 'ParamBodyAngleX';
|
||||
export const ParamBodyAngleY = 'ParamBodyAngleY';
|
||||
export const ParamBodyAngleZ = 'ParamBodyAngleZ';
|
||||
export const ParamBreath = 'ParamBreath';
|
||||
export const ParamArmLA = 'ParamArmLA';
|
||||
export const ParamArmRA = 'ParamArmRA';
|
||||
export const ParamArmLB = 'ParamArmLB';
|
||||
export const ParamArmRB = 'ParamArmRB';
|
||||
export const ParamHandL = 'ParamHandL';
|
||||
export const ParamHandR = 'ParamHandR';
|
||||
export const ParamHairFront = 'ParamHairFront';
|
||||
export const ParamHairSide = 'ParamHairSide';
|
||||
export const ParamHairBack = 'ParamHairBack';
|
||||
export const ParamHairFluffy = 'ParamHairFluffy';
|
||||
export const ParamShoulderY = 'ParamShoulderY';
|
||||
export const ParamBustX = 'ParamBustX';
|
||||
export const ParamBustY = 'ParamBustY';
|
||||
export const ParamBaseX = 'ParamBaseX';
|
||||
export const ParamBaseY = 'ParamBaseY';
|
||||
export const ParamNONE = 'NONE:';
|
||||
ParamAngleX: 'ParamAngleX',
|
||||
ParamAngleY: 'ParamAngleY',
|
||||
ParamAngleZ: 'ParamAngleZ',
|
||||
ParamEyeLOpen: 'ParamEyeLOpen',
|
||||
ParamEyeLSmile: 'ParamEyeLSmile',
|
||||
ParamEyeROpen: 'ParamEyeROpen',
|
||||
ParamEyeRSmile: 'ParamEyeRSmile',
|
||||
ParamEyeBallX: 'ParamEyeBallX',
|
||||
ParamEyeBallY: 'ParamEyeBallY',
|
||||
ParamEyeBallForm: 'ParamEyeBallForm',
|
||||
ParamBrowLY: 'ParamBrowLY',
|
||||
ParamBrowRY: 'ParamBrowRY',
|
||||
ParamBrowLX: 'ParamBrowLX',
|
||||
ParamBrowRX: 'ParamBrowRX',
|
||||
ParamBrowLAngle: 'ParamBrowLAngle',
|
||||
ParamBrowRAngle: 'ParamBrowRAngle',
|
||||
ParamBrowLForm: 'ParamBrowLForm',
|
||||
ParamBrowRForm: 'ParamBrowRForm',
|
||||
ParamMouthForm: 'ParamMouthForm',
|
||||
ParamMouthOpenY: 'ParamMouthOpenY',
|
||||
ParamCheek: 'ParamCheek',
|
||||
ParamBodyAngleX: 'ParamBodyAngleX',
|
||||
ParamBodyAngleY: 'ParamBodyAngleY',
|
||||
ParamBodyAngleZ: 'ParamBodyAngleZ',
|
||||
ParamBreath: 'ParamBreath',
|
||||
ParamArmLA: 'ParamArmLA',
|
||||
ParamArmRA: 'ParamArmRA',
|
||||
ParamArmLB: 'ParamArmLB',
|
||||
ParamArmRB: 'ParamArmRB',
|
||||
ParamHandL: 'ParamHandL',
|
||||
ParamHandR: 'ParamHandR',
|
||||
ParamHairFront: 'ParamHairFront',
|
||||
ParamHairSide: 'ParamHairSide',
|
||||
ParamHairBack: 'ParamHairBack',
|
||||
ParamHairFluffy: 'ParamHairFluffy',
|
||||
ParamShoulderY: 'ParamShoulderY',
|
||||
ParamBustX: 'ParamBustX',
|
||||
ParamBustY: 'ParamBustY',
|
||||
ParamBaseX: 'ParamBaseX',
|
||||
ParamBaseY: 'ParamBaseY',
|
||||
ParamNONE: 'NONE:'
|
||||
});
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismdefaultparameterid';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const HitAreaBody = $.CubismDefaultParameterId.HitAreaBody;
|
||||
export const HitAreaHead = $.CubismDefaultParameterId.HitAreaHead;
|
||||
export const HitAreaPrefix = $.CubismDefaultParameterId.HitAreaPrefix;
|
||||
export const ParamAngleX = $.CubismDefaultParameterId.ParamAngleX;
|
||||
export const ParamAngleY = $.CubismDefaultParameterId.ParamAngleY;
|
||||
export const ParamAngleZ = $.CubismDefaultParameterId.ParamAngleZ;
|
||||
export const ParamArmLA = $.CubismDefaultParameterId.ParamArmLA;
|
||||
export const ParamArmLB = $.CubismDefaultParameterId.ParamArmLB;
|
||||
export const ParamArmRA = $.CubismDefaultParameterId.ParamArmRA;
|
||||
export const ParamArmRB = $.CubismDefaultParameterId.ParamArmRB;
|
||||
export const ParamBaseX = $.CubismDefaultParameterId.ParamBaseX;
|
||||
export const ParamBaseY = $.CubismDefaultParameterId.ParamBaseY;
|
||||
export const ParamBodyAngleX = $.CubismDefaultParameterId.ParamBodyAngleX;
|
||||
export const ParamBodyAngleY = $.CubismDefaultParameterId.ParamBodyAngleY;
|
||||
export const ParamBodyAngleZ = $.CubismDefaultParameterId.ParamBodyAngleZ;
|
||||
export const ParamBreath = $.CubismDefaultParameterId.ParamBreath;
|
||||
export const ParamBrowLAngle = $.CubismDefaultParameterId.ParamBrowLAngle;
|
||||
export const ParamBrowLForm = $.CubismDefaultParameterId.ParamBrowLForm;
|
||||
export const ParamBrowLX = $.CubismDefaultParameterId.ParamBrowLX;
|
||||
export const ParamBrowLY = $.CubismDefaultParameterId.ParamBrowLY;
|
||||
export const ParamBrowRAngle = $.CubismDefaultParameterId.ParamBrowRAngle;
|
||||
export const ParamBrowRForm = $.CubismDefaultParameterId.ParamBrowRForm;
|
||||
export const ParamBrowRX = $.CubismDefaultParameterId.ParamBrowRX;
|
||||
export const ParamBrowRY = $.CubismDefaultParameterId.ParamBrowRY;
|
||||
export const ParamBustX = $.CubismDefaultParameterId.ParamBustX;
|
||||
export const ParamBustY = $.CubismDefaultParameterId.ParamBustY;
|
||||
export const ParamCheek = $.CubismDefaultParameterId.ParamCheek;
|
||||
export const ParamEyeBallForm = $.CubismDefaultParameterId.ParamEyeBallForm;
|
||||
export const ParamEyeBallX = $.CubismDefaultParameterId.ParamEyeBallX;
|
||||
export const ParamEyeBallY = $.CubismDefaultParameterId.ParamEyeBallY;
|
||||
export const ParamEyeLOpen = $.CubismDefaultParameterId.ParamEyeLOpen;
|
||||
export const ParamEyeLSmile = $.CubismDefaultParameterId.ParamEyeLSmile;
|
||||
export const ParamEyeROpen = $.CubismDefaultParameterId.ParamEyeROpen;
|
||||
export const ParamEyeRSmile = $.CubismDefaultParameterId.ParamEyeRSmile;
|
||||
export const ParamHairBack = $.CubismDefaultParameterId.ParamHairBack;
|
||||
export const ParamHairFluffy = $.CubismDefaultParameterId.ParamHairFluffy;
|
||||
export const ParamHairFront = $.CubismDefaultParameterId.ParamHairFront;
|
||||
export const ParamHairSide = $.CubismDefaultParameterId.ParamHairSide;
|
||||
export const ParamHandL = $.CubismDefaultParameterId.ParamHandL;
|
||||
export const ParamHandR = $.CubismDefaultParameterId.ParamHandR;
|
||||
export const ParamMouthForm = $.CubismDefaultParameterId.ParamMouthForm;
|
||||
export const ParamMouthOpenY = $.CubismDefaultParameterId.ParamMouthOpenY;
|
||||
export const ParamNONE = $.CubismDefaultParameterId.ParamNONE;
|
||||
export const ParamShoulderY = $.CubismDefaultParameterId.ParamShoulderY;
|
||||
export const PartsArmLPrefix = $.CubismDefaultParameterId.PartsArmLPrefix;
|
||||
export const PartsArmPrefix = $.CubismDefaultParameterId.PartsArmPrefix;
|
||||
export const PartsArmRPrefix = $.CubismDefaultParameterId.PartsArmRPrefix;
|
||||
export const PartsIdCore = $.CubismDefaultParameterId.PartsIdCore;
|
||||
}
|
||||
|
|
|
@ -5,22 +5,13 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismframework } from './live2dcubismframework';
|
||||
import { Live2DCubismFramework as icubismmodelsetting } from './icubismmodelsetting';
|
||||
import { Live2DCubismFramework as cubismid } from './id/cubismid';
|
||||
import { Live2DCubismFramework as cubismjson } from './utils/cubismjson';
|
||||
import { Live2DCubismFramework as csmmap } from './type/csmmap';
|
||||
import { Live2DCubismFramework as csmvector } from './type/csmvector';
|
||||
import csmVector = csmvector.csmVector;
|
||||
import csmMap = csmmap.csmMap;
|
||||
import iterator = csmmap.iterator;
|
||||
import CubismFramework = cubismframework.CubismFramework;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismJson = cubismjson.CubismJson;
|
||||
import Value = cubismjson.Value;
|
||||
import ICubismModelSetting = icubismmodelsetting.ICubismModelSetting;
|
||||
import { ICubismModelSetting } from './icubismmodelsetting';
|
||||
import { CubismIdHandle } from './id/cubismid';
|
||||
import { CubismFramework } from './live2dcubismframework';
|
||||
import { csmMap, iterator } from './type/csmmap';
|
||||
import { csmVector } from './type/csmvector';
|
||||
import { CubismJson, Value } from './utils/cubismjson';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* Model3Jsonのキー文字列
|
||||
*/
|
||||
|
@ -142,9 +133,7 @@ export namespace Live2DCubismFramework {
|
|||
.getValueByString(FileReferences)
|
||||
.getValueByString(Pose)
|
||||
);
|
||||
this._jsonValue.pushBack(
|
||||
this._json.getRoot().getValueByString(HitAreas)
|
||||
);
|
||||
this._jsonValue.pushBack(this._json.getRoot().getValueByString(HitAreas));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,9 +250,7 @@ export namespace Live2DCubismFramework {
|
|||
return '';
|
||||
}
|
||||
|
||||
return this._jsonValue
|
||||
.at(FrequestNode.FrequestNode_Physics)
|
||||
.getRawString();
|
||||
return this._jsonValue.at(FrequestNode.FrequestNode_Physics).getRawString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -287,9 +274,7 @@ export namespace Live2DCubismFramework {
|
|||
return 0;
|
||||
}
|
||||
|
||||
return this._jsonValue
|
||||
.at(FrequestNode.FrequestNode_Expressions)
|
||||
.getSize();
|
||||
return this._jsonValue.at(FrequestNode.FrequestNode_Expressions).getSize();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -640,9 +625,7 @@ export namespace Live2DCubismFramework {
|
|||
* @return false キーが存在しない
|
||||
*/
|
||||
private isExistTextureFiles(): boolean {
|
||||
const node: Value = this._jsonValue.at(
|
||||
FrequestNode.FrequestNode_Textures
|
||||
);
|
||||
const node: Value = this._jsonValue.at(FrequestNode.FrequestNode_Textures);
|
||||
return !node.isNull() && !node.isError();
|
||||
}
|
||||
|
||||
|
@ -652,9 +635,7 @@ export namespace Live2DCubismFramework {
|
|||
* @return false キーが存在しない
|
||||
*/
|
||||
private isExistHitAreas(): boolean {
|
||||
const node: Value = this._jsonValue.at(
|
||||
FrequestNode.FrequestNode_HitAreas
|
||||
);
|
||||
const node: Value = this._jsonValue.at(FrequestNode.FrequestNode_HitAreas);
|
||||
return !node.isNull() && !node.isError();
|
||||
}
|
||||
|
||||
|
@ -839,4 +820,11 @@ export namespace Live2DCubismFramework {
|
|||
private _json: CubismJson;
|
||||
private _jsonValue: csmVector<Value>;
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmodelsettingjson';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismModelSettingJson = $.CubismModelSettingJson;
|
||||
export type CubismModelSettingJson = $.CubismModelSettingJson;
|
||||
}
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* 呼吸機能
|
||||
*
|
||||
|
@ -40,9 +36,7 @@ export namespace Live2DCubismFramework {
|
|||
* 呼吸のパラメータの紐づけ
|
||||
* @param breathParameters 呼吸を紐づけたいパラメータのリスト
|
||||
*/
|
||||
public setParameters(
|
||||
breathParameters: csmVector<BreathParameterData>
|
||||
): void {
|
||||
public setParameters(breathParameters: csmVector<BreathParameterData>): void {
|
||||
this._breathParameters = breathParameters;
|
||||
}
|
||||
|
||||
|
@ -59,10 +53,7 @@ export namespace Live2DCubismFramework {
|
|||
* @param model 対象のモデル
|
||||
* @param deltaTimeSeconds デルタ時間[秒]
|
||||
*/
|
||||
public updateParameters(
|
||||
model: CubismModel,
|
||||
deltaTimeSeconds: number
|
||||
): void {
|
||||
public updateParameters(model: CubismModel, deltaTimeSeconds: number): void {
|
||||
this._currentTime += deltaTimeSeconds;
|
||||
|
||||
const t: number = this._currentTime * 2.0 * 3.14159;
|
||||
|
@ -121,4 +112,13 @@ export namespace Live2DCubismFramework {
|
|||
cycle: number; // 呼吸を正弦波としたときの、波の周期
|
||||
weight: number; // パラメータへの重み
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismbreath';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const BreathParameterData = $.BreathParameterData;
|
||||
export type BreathParameterData = $.BreathParameterData;
|
||||
export const CubismBreath = $.CubismBreath;
|
||||
export type CubismBreath = $.CubismBreath;
|
||||
}
|
||||
|
|
|
@ -5,16 +5,11 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { Live2DCubismFramework as icubismmodelsetting } from '../icubismmodelsetting';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import ICubismModelSetting = icubismmodelsetting.ICubismModelSetting;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import { ICubismModelSetting } from '../icubismmodelsetting';
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* 自動まばたき機能
|
||||
*
|
||||
|
@ -88,10 +83,7 @@ export namespace Live2DCubismFramework {
|
|||
* @param model 対象のモデル
|
||||
* @param deltaTimeSeconds デルタ時間[秒]
|
||||
*/
|
||||
public updateParameters(
|
||||
model: CubismModel,
|
||||
deltaTimeSeconds: number
|
||||
): void {
|
||||
public updateParameters(model: CubismModel, deltaTimeSeconds: number): void {
|
||||
this._userTimeSeconds += deltaTimeSeconds;
|
||||
let parameterValue: number;
|
||||
let t = 0.0;
|
||||
|
@ -229,4 +221,13 @@ export namespace Live2DCubismFramework {
|
|||
EyeState_Closed, // まぶたが閉じている状態
|
||||
EyeState_Opening // まぶたが開いていく途中の状態
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismeyeblink';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismEyeBlink = $.CubismEyeBlink;
|
||||
export type CubismEyeBlink = $.CubismEyeBlink;
|
||||
export const EyeState = $.EyeState;
|
||||
export type EyeState = $.EyeState;
|
||||
}
|
||||
|
|
|
@ -5,20 +5,12 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import { Live2DCubismFramework as cubismjson } from '../utils/cubismjson';
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import iterator = csmvector.iterator;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import CubismFramework = cubismframework.CubismFramework;
|
||||
import CubismJson = cubismjson.CubismJson;
|
||||
import Value = cubismjson.Value;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismFramework } from '../live2dcubismframework';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import { csmVector, iterator } from '../type/csmvector';
|
||||
import { CubismJson, Value } from '../utils/cubismjson';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
const Epsilon = 0.001;
|
||||
const DefaultFadeInSeconds = 0.5;
|
||||
|
||||
|
@ -119,10 +111,7 @@ export namespace Live2DCubismFramework {
|
|||
* @param model 対象のモデル
|
||||
* @param deltaTimeSeconds デルタ時間[秒]
|
||||
*/
|
||||
public updateParameters(
|
||||
model: CubismModel,
|
||||
deltaTimeSeconds: number
|
||||
): void {
|
||||
public updateParameters(model: CubismModel, deltaTimeSeconds: number): void {
|
||||
// 前回のモデルと同じでない場合は初期化が必要
|
||||
if (model != this._lastModel) {
|
||||
// パラメータインデックスの初期化
|
||||
|
@ -171,10 +160,7 @@ export namespace Live2DCubismFramework {
|
|||
}
|
||||
|
||||
model.setPartOpacityByIndex(partsIndex, j == beginIndex ? 1.0 : 0.0);
|
||||
model.setParameterValueByIndex(
|
||||
paramIndex,
|
||||
j == beginIndex ? 1.0 : 0.0
|
||||
);
|
||||
model.setParameterValueByIndex(paramIndex, j == beginIndex ? 1.0 : 0.0);
|
||||
|
||||
for (let k = 0; k < this._partGroups.at(j).link.getSize(); ++k) {
|
||||
this._partGroups
|
||||
|
@ -402,4 +388,13 @@ export namespace Live2DCubismFramework {
|
|||
partIndex: number; // パーツのインデックス
|
||||
link: csmVector<PartData>; // 連動するパラメータ
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismpose';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismPose = $.CubismPose;
|
||||
export type CubismPose = $.CubismPose;
|
||||
export const PartData = $.PartData;
|
||||
export type PartData = $.PartData;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* メモリアロケーションを抽象化したクラス
|
||||
*
|
||||
|
@ -42,4 +41,11 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
public abstract deallocateAligned(alignedMemory: any): void;
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './icubismallcator';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const ICubismAllocator = $.ICubismAllocator;
|
||||
export type ICubismAllocator = $.ICubismAllocator;
|
||||
}
|
||||
|
|
|
@ -5,12 +5,9 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismid } from './id/cubismid';
|
||||
import { Live2DCubismFramework as csmmap } from './type/csmmap';
|
||||
import csmMap = csmmap.csmMap;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import { CubismIdHandle } from './id/cubismid';
|
||||
import { csmMap } from './type/csmmap';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* モデル設定情報を取り扱う関数を宣言した純粋仮想クラス。
|
||||
*
|
||||
|
@ -196,4 +193,11 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
public abstract getLipSyncParameterId(index: number): CubismIdHandle;
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './icubismmodelsetting';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const ICubismModelSetting = $.ICubismModelSetting;
|
||||
export type ICubismModelSetting = $.ICubismModelSetting;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,8 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import csmString = csmstring.csmString;
|
||||
import { csmString } from '../type/csmstring';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* パラメータ名・パーツ名・Drawable名を保持
|
||||
*
|
||||
|
@ -70,4 +68,12 @@ export namespace Live2DCubismFramework {
|
|||
}
|
||||
|
||||
export declare type CubismIdHandle = CubismId;
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismid';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismId = $.CubismId;
|
||||
export type CubismId = $.CubismId;
|
||||
export type CubismIdHandle = $.CubismIdHandle;
|
||||
}
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { Live2DCubismFramework as cubismid } from './cubismid';
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import csmString = csmstring.csmString;
|
||||
import CubismId = cubismid.CubismId;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import { csmString } from '../type/csmstring';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
import { CubismId } from './cubismid';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* ID名の管理
|
||||
*
|
||||
|
@ -115,4 +111,11 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
private _ids: csmVector<CubismId>; // 登録されているIDのリスト
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismidmanager';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismIdManager = $.CubismIdManager;
|
||||
export type CubismIdManager = $.CubismIdManager;
|
||||
}
|
||||
|
|
|
@ -5,17 +5,14 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismjson } from './utils/cubismjson';
|
||||
import { Live2DCubismFramework as cubismidmanager } from './id/cubismidmanager';
|
||||
import { Live2DCubismFramework as cubismrenderer } from './rendering/cubismrenderer';
|
||||
import { CubismIdManager } from './id/cubismidmanager';
|
||||
import { CubismRenderer } from './rendering/cubismrenderer';
|
||||
import {
|
||||
CSM_ASSERT,
|
||||
CubismLogInfo,
|
||||
CubismLogWarning,
|
||||
CSM_ASSERT
|
||||
CubismLogWarning
|
||||
} from './utils/cubismdebug';
|
||||
import Value = cubismjson.Value;
|
||||
import CubismIdManager = cubismidmanager.CubismIdManager;
|
||||
import CubismRenderer = cubismrenderer.CubismRenderer;
|
||||
import { Value } from './utils/cubismjson';
|
||||
|
||||
export function strtod(s: string, endPtr: string[]): number {
|
||||
let index = 0;
|
||||
|
@ -47,7 +44,6 @@ export function strtod(s: string, endPtr: string[]): number {
|
|||
return d;
|
||||
}
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
// ファイルスコープの変数を初期化
|
||||
|
||||
let s_isStarted = false;
|
||||
|
@ -58,10 +54,10 @@ export namespace Live2DCubismFramework {
|
|||
/**
|
||||
* Framework内で使う定数の宣言
|
||||
*/
|
||||
export namespace Constant {
|
||||
export const vertexOffset = 0; // メッシュ頂点のオフセット値
|
||||
export const vertexStep = 2; // メッシュ頂点のステップ値
|
||||
}
|
||||
export const Constant = Object.freeze<Record<string, number>>({
|
||||
vertexOffset: 0, // メッシュ頂点のオフセット値
|
||||
vertexStep: 2 // メッシュ頂点のステップ値
|
||||
});
|
||||
|
||||
export function csmDelete<T>(address: T): void {
|
||||
if (!address) {
|
||||
|
@ -252,7 +248,6 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
private constructor() {}
|
||||
}
|
||||
}
|
||||
|
||||
export class Option {
|
||||
logFunction: Live2DCubismCore.csmLogFunction; // ログ出力の関数オブジェクト
|
||||
|
@ -270,3 +265,13 @@ export enum LogLevel {
|
|||
LogLevel_Error, // エラーログ
|
||||
LogLevel_Off // ログ出力無効
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './live2dcubismframework';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const Constant = $.Constant;
|
||||
export const csmDelete = $.csmDelete;
|
||||
export const CubismFramework = $.CubismFramework;
|
||||
export type CubismFramework = $.CubismFramework;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,8 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismvector2 } from './cubismvector2';
|
||||
import CubismVector2 = cubismvector2.CubismVector2;
|
||||
import { CubismVector2 } from './cubismvector2';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* 数値計算などに使用するユーティリティクラス
|
||||
*/
|
||||
|
@ -192,4 +190,11 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
private constructor() {}
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmath';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismMath = $.CubismMath;
|
||||
export type CubismMath = $.CubismMath;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* 4x4の行列
|
||||
*
|
||||
|
@ -305,4 +304,11 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
protected _tr: Float32Array; // 4x4行列データ
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmatrix44';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismMatrix44 = $.CubismMatrix44;
|
||||
export type CubismMatrix44 = $.CubismMatrix44;
|
||||
}
|
||||
|
|
|
@ -5,13 +5,9 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as csmmap } from '../type/csmmap';
|
||||
import { Live2DCubismFramework as cubismmatrix44 } from './cubismmatrix44';
|
||||
import csmMap = csmmap.csmMap;
|
||||
import iterator = csmmap.iterator;
|
||||
import CubismMatrix44 = cubismmatrix44.CubismMatrix44;
|
||||
import { csmMap, iterator } from '../type/csmmap';
|
||||
import { CubismMatrix44 } from './cubismmatrix44';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* モデル座標設定用の4x4行列
|
||||
*
|
||||
|
@ -220,4 +216,11 @@ export namespace Live2DCubismFramework {
|
|||
private _width: number; // 横幅
|
||||
private _height: number; // 縦幅
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmodelmatrix';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismModelMatrix = $.CubismModelMatrix;
|
||||
export type CubismModelMatrix = $.CubismModelMatrix;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,8 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismmath } from './cubismmath';
|
||||
import CubismMath = cubismmath.CubismMath;
|
||||
import { CubismMath } from './cubismmath';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
const FrameRate = 30;
|
||||
const Epsilon = 0.01;
|
||||
|
||||
|
@ -161,4 +159,11 @@ export namespace Live2DCubismFramework {
|
|||
private _lastTimeSeconds: number; // 最後の実行時間[秒]
|
||||
private _userTimeSeconds: number; // デルタ時間の積算値[秒]
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismtargetpoint';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismTargetPoint = $.CubismTargetPoint;
|
||||
export type CubismTargetPoint = $.CubismTargetPoint;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* 2次元ベクトル型
|
||||
*
|
||||
|
@ -160,4 +159,11 @@ export namespace Live2DCubismFramework {
|
|||
return !this.isEqual(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismvector2';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismVector2 = $.CubismVector2;
|
||||
export type CubismVector2 = $.CubismVector2;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,8 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismmatrix44 } from './cubismmatrix44';
|
||||
import CubismMatrix44 = cubismmatrix44.CubismMatrix44;
|
||||
import { CubismMatrix44 } from './cubismmatrix44';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* カメラの位置変更に使うと便利な4x4行列
|
||||
*
|
||||
|
@ -43,10 +41,7 @@ export namespace Live2DCubismFramework {
|
|||
x = this._screenLeft - this._tr[0] * this._maxLeft - this._tr[12];
|
||||
}
|
||||
|
||||
if (
|
||||
this._tr[0] * this._maxRight + (this._tr[12] + x) <
|
||||
this._screenRight
|
||||
) {
|
||||
if (this._tr[0] * this._maxRight + (this._tr[12] + x) < this._screenRight) {
|
||||
x = this._screenRight - this._tr[0] * this._maxRight - this._tr[12];
|
||||
}
|
||||
|
||||
|
@ -334,4 +329,11 @@ export namespace Live2DCubismFramework {
|
|||
private _maxScale: number; // 拡大率の最大値
|
||||
private _minScale: number; // 拡大率の最小値
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismviewmatrix';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismViewMatrix = $.CubismViewMatrix;
|
||||
export type CubismViewMatrix = $.CubismViewMatrix;
|
||||
}
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismmodel } from './cubismmodel';
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import { CSM_ASSERT } from '../utils/cubismdebug';
|
||||
import { CubismModel } from './cubismmodel';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* Mocデータの管理
|
||||
*
|
||||
|
@ -97,4 +95,11 @@ export namespace Live2DCubismFramework {
|
|||
_moc: Live2DCubismCore.Moc; // Mocデータ
|
||||
_modelCount: number; // Mocデータから作られたモデルの個数
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmoc';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismMoc = $.CubismMoc;
|
||||
export type CubismMoc = $.CubismMoc;
|
||||
}
|
||||
|
|
|
@ -5,19 +5,13 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismrenderer } from '../rendering/cubismrenderer';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import { Live2DCubismFramework as csmmap } from '../type/csmmap';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismFramework } from '../live2dcubismframework';
|
||||
import { CubismBlendMode } from '../rendering/cubismrenderer';
|
||||
import { csmMap } from '../type/csmmap';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
import { CSM_ASSERT } from '../utils/cubismdebug';
|
||||
import CubismFramework = cubismframework.CubismFramework;
|
||||
import CubismBlendMode = cubismrenderer.CubismBlendMode;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import csmMap = csmmap.csmMap;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* モデル
|
||||
*
|
||||
|
@ -43,8 +37,7 @@ export namespace Live2DCubismFramework {
|
|||
}
|
||||
|
||||
return (
|
||||
this._model.canvasinfo.CanvasWidth /
|
||||
this._model.canvasinfo.PixelsPerUnit
|
||||
this._model.canvasinfo.CanvasWidth / this._model.canvasinfo.PixelsPerUnit
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -57,8 +50,7 @@ export namespace Live2DCubismFramework {
|
|||
}
|
||||
|
||||
return (
|
||||
this._model.canvasinfo.CanvasHeight /
|
||||
this._model.canvasinfo.PixelsPerUnit
|
||||
this._model.canvasinfo.CanvasHeight / this._model.canvasinfo.PixelsPerUnit
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -530,8 +522,7 @@ export namespace Live2DCubismFramework {
|
|||
* @return drawableの頂点リスト
|
||||
*/
|
||||
public getDrawableVertexPositions(drawableIndex: number): Float32Array {
|
||||
const verticesArray: Float32Array[] = this._model.drawables
|
||||
.vertexPositions;
|
||||
const verticesArray: Float32Array[] = this._model.drawables.vertexPositions;
|
||||
return verticesArray[drawableIndex];
|
||||
}
|
||||
|
||||
|
@ -647,9 +638,7 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
public getDrawableDynamicFlagIsVisible(drawableIndex: number): boolean {
|
||||
const dynamicFlags: Uint8Array = this._model.drawables.dynamicFlags;
|
||||
return Live2DCubismCore.Utils.hasIsVisibleBit(
|
||||
dynamicFlags[drawableIndex]
|
||||
);
|
||||
return Live2DCubismCore.Utils.hasIsVisibleBit(dynamicFlags[drawableIndex]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -819,4 +808,11 @@ export namespace Live2DCubismFramework {
|
|||
private _partIds: csmVector<CubismIdHandle>;
|
||||
private _drawableIds: csmVector<CubismIdHandle>;
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmodel';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismModel = $.CubismModel;
|
||||
export type CubismModel = $.CubismModel;
|
||||
}
|
||||
|
|
|
@ -5,18 +5,12 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismmodeluserdatajson } from './cubismmodeluserdatajson';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import CubismFramework = cubismframework.CubismFramework;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import csmString = csmstring.csmString;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismModelUserDataJson = cubismmodeluserdatajson.CubismModelUserDataJson;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismFramework } from '../live2dcubismframework';
|
||||
import { csmString } from '../type/csmstring';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
import { CubismModelUserDataJson } from './cubismmodeluserdatajson';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
const ArtMesh = 'ArtMesh';
|
||||
|
||||
/**
|
||||
|
@ -43,10 +37,7 @@ export namespace Live2DCubismFramework {
|
|||
* @param size バッファのサイズ
|
||||
* @return 作成されたインスタンス
|
||||
*/
|
||||
public static create(
|
||||
buffer: ArrayBuffer,
|
||||
size: number
|
||||
): CubismModelUserData {
|
||||
public static create(buffer: ArrayBuffer, size: number): CubismModelUserData {
|
||||
const ret: CubismModelUserData = new CubismModelUserData();
|
||||
|
||||
ret.parseUserData(buffer, size);
|
||||
|
@ -133,4 +124,13 @@ export namespace Live2DCubismFramework {
|
|||
private _userDataNodes: csmVector<CubismModelUserDataNode>; // ユーザーデータ構造体配列
|
||||
private _artMeshUserDataNode: csmVector<CubismModelUserDataNode>; // 閲覧リストの保持
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmodeluserdata';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismModelUserData = $.CubismModelUserData;
|
||||
export type CubismModelUserData = $.CubismModelUserData;
|
||||
export const CubismModelUserDataNode = $.CubismModelUserDataNode;
|
||||
export type CubismModelUserDataNode = $.CubismModelUserDataNode;
|
||||
}
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismjson } from '../utils/cubismjson';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import CubismFramework = cubismframework.CubismFramework;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismJson = cubismjson.CubismJson;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismFramework } from '../live2dcubismframework';
|
||||
import { CubismJson } from '../utils/cubismjson';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
const Meta = 'Meta';
|
||||
const UserDataCount = 'UserDataCount';
|
||||
const TotalUserDataSize = 'TotalUserDataSize';
|
||||
|
@ -111,4 +107,11 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
private _json: CubismJson;
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmodeluserdatajson';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismModelUserDataJson = $.CubismModelUserDataJson;
|
||||
export type CubismModelUserDataJson = $.CubismModelUserDataJson;
|
||||
}
|
||||
|
|
|
@ -5,46 +5,26 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import { Live2DCubismFramework as cubismmotionmanager } from '../motion/cubismmotionmanager';
|
||||
import { Live2DCubismFramework as cubismtargetpoint } from '../math/cubismtargetpoint';
|
||||
import { Live2DCubismFramework as cubismmodelmatrix } from '../math/cubismmodelmatrix';
|
||||
import { Live2DCubismFramework as cubismmoc } from './cubismmoc';
|
||||
import { Live2DCubismFramework as cubismmodel } from './cubismmodel';
|
||||
import { Live2DCubismFramework as acubismmotion } from '../motion/acubismmotion';
|
||||
import { Live2DCubismFramework as cubismmotion } from '../motion/cubismmotion';
|
||||
import { Live2DCubismFramework as cubismexpressionmotion } from '../motion/cubismexpressionmotion';
|
||||
import { Live2DCubismFramework as cubismpose } from '../effect/cubismpose';
|
||||
import { Live2DCubismFramework as cubismmodeluserdata } from './cubismmodeluserdata';
|
||||
import { Live2DCubismFramework as cubismphysics } from '../physics/cubismphysics';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import { Live2DCubismFramework as cubismmotionqueuemanager } from '../motion/cubismmotionqueuemanager';
|
||||
import { Live2DCubismFramework as cubismbreath } from '../effect/cubismbreath';
|
||||
import { Live2DCubismFramework as cubismeyeblink } from '../effect/cubismeyeblink';
|
||||
import { Live2DCubismFramework as cubismrenderer_webgl } from '../rendering/cubismrenderer_webgl';
|
||||
import { CubismBreath } from '../effect/cubismbreath';
|
||||
import { CubismEyeBlink } from '../effect/cubismeyeblink';
|
||||
import { CubismPose } from '../effect/cubismpose';
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { Constant } from '../live2dcubismframework';
|
||||
import { CubismModelMatrix } from '../math/cubismmodelmatrix';
|
||||
import { CubismTargetPoint } from '../math/cubismtargetpoint';
|
||||
import { ACubismMotion, FinishedMotionCallback } from '../motion/acubismmotion';
|
||||
import { CubismExpressionMotion } from '../motion/cubismexpressionmotion';
|
||||
import { CubismMotion } from '../motion/cubismmotion';
|
||||
import { CubismMotionManager } from '../motion/cubismmotionmanager';
|
||||
import { CubismMotionQueueManager } from '../motion/cubismmotionqueuemanager';
|
||||
import { CubismPhysics } from '../physics/cubismphysics';
|
||||
import { CubismRenderer_WebGL } from '../rendering/cubismrenderer_webgl';
|
||||
import { csmString } from '../type/csmstring';
|
||||
import { CubismLogError, CubismLogInfo } from '../utils/cubismdebug';
|
||||
import CubismRenderer_WebGL = cubismrenderer_webgl.CubismRenderer_WebGL;
|
||||
import CubismEyeBlink = cubismeyeblink.CubismEyeBlink;
|
||||
import CubismBreath = cubismbreath.CubismBreath;
|
||||
import CubismMotionQueueManager = cubismmotionqueuemanager.CubismMotionQueueManager;
|
||||
import csmString = csmstring.csmString;
|
||||
import Constant = cubismframework.Constant;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismPhysics = cubismphysics.CubismPhysics;
|
||||
import CubismModelUserData = cubismmodeluserdata.CubismModelUserData;
|
||||
import CubismPose = cubismpose.CubismPose;
|
||||
import CubismExpressionMotion = cubismexpressionmotion.CubismExpressionMotion;
|
||||
import CubismMotion = cubismmotion.CubismMotion;
|
||||
import ACubismMotion = acubismmotion.ACubismMotion;
|
||||
import FinishedMotionCallback = acubismmotion.FinishedMotionCallback;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import CubismMoc = cubismmoc.CubismMoc;
|
||||
import CubismModelMatrix = cubismmodelmatrix.CubismModelMatrix;
|
||||
import CubismTargetPoint = cubismtargetpoint.CubismTargetPoint;
|
||||
import CubismMotionManager = cubismmotionmanager.CubismMotionManager;
|
||||
import { CubismMoc } from './cubismmoc';
|
||||
import { CubismModel } from './cubismmodel';
|
||||
import { CubismModelUserData } from './cubismmodeluserdata';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* ユーザーが実際に使用するモデル
|
||||
*
|
||||
|
@ -450,4 +430,11 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
private _renderer: CubismRenderer_WebGL; // レンダラ
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismusermodel';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismUserModel = $.CubismUserModel;
|
||||
export type CubismUserModel = $.CubismUserModel;
|
||||
}
|
||||
|
|
|
@ -5,19 +5,13 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismmath } from '../math/cubismmath';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import { Live2DCubismFramework as cubismmotionqueueentry } from './cubismmotionqueueentry';
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { CubismMath } from '../math/cubismmath';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import { csmString } from '../type/csmstring';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
import { CSM_ASSERT } from '../utils/cubismdebug';
|
||||
import csmVector = csmvector.csmVector;
|
||||
import csmString = csmstring.csmString;
|
||||
import CubismMotionQueueEntry = cubismmotionqueueentry.CubismMotionQueueEntry;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import CubismMath = cubismmath.CubismMath;
|
||||
import { CubismMotionQueueEntry } from './cubismmotionqueueentry';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/** モーション再生終了コールバック関数定義 */
|
||||
export type FinishedMotionCallback = (self: ACubismMotion) => void;
|
||||
|
||||
|
@ -275,4 +269,12 @@ export namespace Live2DCubismFramework {
|
|||
// モーション再生終了コールバック関数
|
||||
public _onFinishedMotion?: FinishedMotionCallback;
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './acubismmotion';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const ACubismMotion = $.ACubismMotion;
|
||||
export type ACubismMotion = $.ACubismMotion;
|
||||
export type FinishedMotionCallback = $.FinishedMotionCallback;
|
||||
}
|
||||
|
|
|
@ -5,24 +5,14 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as acubismmotion } from './acubismmotion';
|
||||
import { Live2DCubismFramework as cubismjson } from '../utils/cubismjson';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import { Live2DCubismFramework as cubismmotionqueueentry } from './cubismmotionqueueentry';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import JsonFloat = cubismjson.JsonFloat;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import CubismMotionQueueEntry = cubismmotionqueueentry.CubismMotionQueueEntry;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import CubismFramework = cubismframework.CubismFramework;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismJson = cubismjson.CubismJson;
|
||||
import Value = cubismjson.Value;
|
||||
import ACubismMotion = acubismmotion.ACubismMotion;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismFramework } from '../live2dcubismframework';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
import { CubismJson, Value } from '../utils/cubismjson';
|
||||
import { ACubismMotion } from './acubismmotion';
|
||||
import { CubismMotionQueueEntry } from './cubismmotionqueueentry';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
// exp3.jsonのキーとデフォルト
|
||||
const ExpressionKeyFadeIn = 'FadeInTime';
|
||||
const ExpressionKeyFadeOut = 'FadeOutTime';
|
||||
|
@ -86,8 +76,7 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
if (
|
||||
param.getValueByString(ExpressionKeyBlend).isNull() ||
|
||||
param.getValueByString(ExpressionKeyBlend).getString() ==
|
||||
BlendValueAdd
|
||||
param.getValueByString(ExpressionKeyBlend).getString() == BlendValueAdd
|
||||
) {
|
||||
blendType = ExpressionBlendType.ExpressionBlendType_Add;
|
||||
} else if (
|
||||
|
@ -196,4 +185,15 @@ export namespace Live2DCubismFramework {
|
|||
blendType: ExpressionBlendType; // パラメータの演算種類
|
||||
value: number; // 値
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismexpressionmotion';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismExpressionMotion = $.CubismExpressionMotion;
|
||||
export type CubismExpressionMotion = $.CubismExpressionMotion;
|
||||
export const ExpressionBlendType = $.ExpressionBlendType;
|
||||
export type ExpressionBlendType = $.ExpressionBlendType;
|
||||
export const ExpressionParameter = $.ExpressionParameter;
|
||||
export type ExpressionParameter = $.ExpressionParameter;
|
||||
}
|
||||
|
|
|
@ -5,36 +5,26 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismmotionjson } from './cubismmotionjson';
|
||||
import { Live2DCubismFramework as cubismmotioninternal } from './cubismmotioninternal';
|
||||
import { Live2DCubismFramework as acubismmotion } from './acubismmotion';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import { Live2DCubismFramework as cubismmotionqueueentry } from './cubismmotionqueueentry';
|
||||
import { Live2DCubismFramework as cubismmath } from '../math/cubismmath';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import { CubismLogDebug, CSM_ASSERT } from '../utils/cubismdebug';
|
||||
import csmString = csmstring.csmString;
|
||||
import CubismMotionData = cubismmotioninternal.CubismMotionData;
|
||||
import CubismMotionSegment = cubismmotioninternal.CubismMotionSegment;
|
||||
import CubismMotionPoint = cubismmotioninternal.CubismMotionPoint;
|
||||
import CubismMotionEvent = cubismmotioninternal.CubismMotionEvent;
|
||||
import CubismMotionSegmentType = cubismmotioninternal.CubismMotionSegmentType;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismMotionCurve = cubismmotioninternal.CubismMotionCurve;
|
||||
import CubismMotionCurveTarget = cubismmotioninternal.CubismMotionCurveTarget;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import CubismMath = cubismmath.CubismMath;
|
||||
import CubismMotionQueueEntry = cubismmotionqueueentry.CubismMotionQueueEntry;
|
||||
import CubismFramework = cubismframework.CubismFramework;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import ACubismMotion = acubismmotion.ACubismMotion;
|
||||
import FinishedMotionCallback = acubismmotion.FinishedMotionCallback;
|
||||
import CubismMotionJson = cubismmotionjson.CubismMotionJson;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismFramework } from '../live2dcubismframework';
|
||||
import { CubismMath } from '../math/cubismmath';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import { csmString } from '../type/csmstring';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
import { CSM_ASSERT, CubismLogDebug } from '../utils/cubismdebug';
|
||||
import { ACubismMotion, FinishedMotionCallback } from './acubismmotion';
|
||||
import {
|
||||
CubismMotionCurve,
|
||||
CubismMotionCurveTarget,
|
||||
CubismMotionData,
|
||||
CubismMotionEvent,
|
||||
CubismMotionPoint,
|
||||
CubismMotionSegment,
|
||||
CubismMotionSegmentType
|
||||
} from './cubismmotioninternal';
|
||||
import { CubismMotionJson } from './cubismmotionjson';
|
||||
import { CubismMotionQueueEntry } from './cubismmotionqueueentry';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
const EffectNameEyeBlink = 'EyeBlink';
|
||||
const EffectNameLipSync = 'LipSync';
|
||||
const TargetNameModel = 'Model';
|
||||
|
@ -101,8 +91,7 @@ export namespace Live2DCubismFramework {
|
|||
const curve: CubismMotionCurve = motionData.curves.at(index);
|
||||
|
||||
let target = -1;
|
||||
const totalSegmentCount: number =
|
||||
curve.baseSegmentIndex + curve.segmentCount;
|
||||
const totalSegmentCount: number = curve.baseSegmentIndex + curve.segmentCount;
|
||||
let pointPosition = 0;
|
||||
for (let i: number = curve.baseSegmentIndex; i < totalSegmentCount; ++i) {
|
||||
// Get first point of next segment.
|
||||
|
@ -126,10 +115,7 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
const segment: CubismMotionSegment = motionData.segments.at(target);
|
||||
|
||||
return segment.evaluate(
|
||||
motionData.points.get(segment.basePointIndex),
|
||||
time
|
||||
);
|
||||
return segment.evaluate(motionData.points.get(segment.basePointIndex), time);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -677,9 +663,7 @@ export namespace Live2DCubismFramework {
|
|||
if (json.getMotionCurveTarget(curveCount) == TargetNameModel) {
|
||||
this._motionData.curves.at(curveCount).type =
|
||||
CubismMotionCurveTarget.CubismMotionCurveTarget_Model;
|
||||
} else if (
|
||||
json.getMotionCurveTarget(curveCount) == TargetNameParameter
|
||||
) {
|
||||
} else if (json.getMotionCurveTarget(curveCount) == TargetNameParameter) {
|
||||
this._motionData.curves.at(curveCount).type =
|
||||
CubismMotionCurveTarget.CubismMotionCurveTarget_Parameter;
|
||||
} else if (
|
||||
|
@ -724,10 +708,7 @@ export namespace Live2DCubismFramework {
|
|||
).time = json.getMotionCurveSegment(curveCount, segmentPosition);
|
||||
this._motionData.points.at(
|
||||
totalPointCount
|
||||
).value = json.getMotionCurveSegment(
|
||||
curveCount,
|
||||
segmentPosition + 1
|
||||
);
|
||||
).value = json.getMotionCurveSegment(curveCount, segmentPosition + 1);
|
||||
|
||||
totalPointCount += 1;
|
||||
segmentPosition += 2;
|
||||
|
@ -942,4 +923,11 @@ export namespace Live2DCubismFramework {
|
|||
public _modelCurveIdEyeBlink: CubismIdHandle; // モデルが持つ自動まばたき用パラメータIDのハンドル。 モデルとモーションを対応付ける。
|
||||
public _modelCurveIdLipSync: CubismIdHandle; // モデルが持つリップシンク用パラメータIDのハンドル。 モデルとモーションを対応付ける。
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmotion';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismMotion = $.CubismMotion;
|
||||
export type CubismMotion = $.CubismMotion;
|
||||
}
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import csmVector = csmvector.csmVector;
|
||||
import csmString = csmstring.csmString;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { csmString } from '../type/csmstring';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* @brief モーションカーブの種類
|
||||
*
|
||||
|
@ -137,4 +133,24 @@ export namespace Live2DCubismFramework {
|
|||
points: csmVector<CubismMotionPoint>; // ポイントのリスト
|
||||
events: csmVector<CubismMotionEvent>; // イベントのリスト
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmotioninternal';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismMotionCurve = $.CubismMotionCurve;
|
||||
export type CubismMotionCurve = $.CubismMotionCurve;
|
||||
export const CubismMotionCurveTarget = $.CubismMotionCurveTarget;
|
||||
export type CubismMotionCurveTarget = $.CubismMotionCurveTarget;
|
||||
export const CubismMotionData = $.CubismMotionData;
|
||||
export type CubismMotionData = $.CubismMotionData;
|
||||
export const CubismMotionEvent = $.CubismMotionEvent;
|
||||
export type CubismMotionEvent = $.CubismMotionEvent;
|
||||
export const CubismMotionPoint = $.CubismMotionPoint;
|
||||
export type CubismMotionPoint = $.CubismMotionPoint;
|
||||
export const CubismMotionSegment = $.CubismMotionSegment;
|
||||
export type CubismMotionSegment = $.CubismMotionSegment;
|
||||
export const CubismMotionSegmentType = $.CubismMotionSegmentType;
|
||||
export type CubismMotionSegmentType = $.CubismMotionSegmentType;
|
||||
export type csmMotionSegmentEvaluationFunction = $.csmMotionSegmentEvaluationFunction;
|
||||
}
|
||||
|
|
|
@ -5,16 +5,11 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismjson } from '../utils/cubismjson';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import csmString = csmstring.csmString;
|
||||
import CubismFramework = cubismframework.CubismFramework;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismJson = cubismjson.CubismJson;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismFramework } from '../live2dcubismframework';
|
||||
import { csmString } from '../type/csmstring';
|
||||
import { CubismJson } from '../utils/cubismjson';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
// JSON keys
|
||||
const Meta = 'Meta';
|
||||
const Duration = 'Duration';
|
||||
|
@ -356,4 +351,11 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
_json: CubismJson; // motion3.jsonのデータ
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmotionjson';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismMotionJson = $.CubismMotionJson;
|
||||
export type CubismMotionJson = $.CubismMotionJson;
|
||||
}
|
||||
|
|
|
@ -5,15 +5,13 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismmotionqueuemanager } from './cubismmotionqueuemanager';
|
||||
import { Live2DCubismFramework as acubismmotion } from './acubismmotion';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import CubismMotionQueueEntryHandle = cubismmotionqueuemanager.CubismMotionQueueEntryHandle;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import ACubismMotion = acubismmotion.ACubismMotion;
|
||||
import CubismMotionQueueManager = cubismmotionqueuemanager.CubismMotionQueueManager;
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import { ACubismMotion } from './acubismmotion';
|
||||
import {
|
||||
CubismMotionQueueEntryHandle,
|
||||
CubismMotionQueueManager
|
||||
} from './cubismmotionqueuemanager';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* モーションの管理
|
||||
*
|
||||
|
@ -86,10 +84,7 @@ export namespace Live2DCubismFramework {
|
|||
public updateMotion(model: CubismModel, deltaTimeSeconds: number): boolean {
|
||||
this._userTimeSeconds += deltaTimeSeconds;
|
||||
|
||||
const updated: boolean = super.doUpdateMotion(
|
||||
model,
|
||||
this._userTimeSeconds
|
||||
);
|
||||
const updated: boolean = super.doUpdateMotion(model, this._userTimeSeconds);
|
||||
|
||||
if (this.isFinished()) {
|
||||
this._currentPriority = 0; // 再生中のモーションの優先度を解除
|
||||
|
@ -121,4 +116,11 @@ export namespace Live2DCubismFramework {
|
|||
_currentPriority: number; // 現在再生中のモーションの優先度
|
||||
_reservePriority: number; // 再生予定のモーションの優先度。再生中は0になる。モーションファイルを別スレッドで読み込むときの機能。
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmotionmanager';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismMotionManager = $.CubismMotionManager;
|
||||
export type CubismMotionManager = $.CubismMotionManager;
|
||||
}
|
||||
|
|
|
@ -5,12 +5,9 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as acubismmotion } from './acubismmotion';
|
||||
import { Live2DCubismFramework as cubismmotionqueuemanager } from './cubismmotionqueuemanager';
|
||||
import CubismMotionQueueEntryHandle = cubismmotionqueuemanager.CubismMotionQueueEntryHandle;
|
||||
import ACubismMotion = acubismmotion.ACubismMotion;
|
||||
import { ACubismMotion } from './acubismmotion';
|
||||
import { CubismMotionQueueEntryHandle } from './cubismmotionqueuemanager';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* CubismMotionQueueManagerで再生している各モーションの管理クラス。
|
||||
*/
|
||||
|
@ -246,4 +243,11 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
_motionQueueEntryHandle: CubismMotionQueueEntryHandle; // インスタンスごとに一意の値を持つ識別番号
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmotionqueueentry';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismMotionQueueEntry = $.CubismMotionQueueEntry;
|
||||
export type CubismMotionQueueEntry = $.CubismMotionQueueEntry;
|
||||
}
|
||||
|
|
|
@ -5,19 +5,12 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as acubismmotion } from './acubismmotion';
|
||||
import { Live2DCubismFramework as cubismmotionqueueentry } from './cubismmotionqueueentry';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import csmString = csmstring.csmString;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import iterator = csmvector.iterator;
|
||||
import CubismMotionQueueEntry = cubismmotionqueueentry.CubismMotionQueueEntry;
|
||||
import ACubismMotion = acubismmotion.ACubismMotion;
|
||||
import { ACubismMotion } from './acubismmotion';
|
||||
import { CubismMotionQueueEntry } from './cubismmotionqueueentry';
|
||||
import { csmVector, iterator } from '../type/csmvector';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import { csmString } from '../type/csmstring';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* モーション再生の管理
|
||||
*
|
||||
|
@ -217,9 +210,7 @@ export namespace Live2DCubismFramework {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
motionQueueEntry._motionQueueEntryHandle == motionQueueEntryNumber
|
||||
) {
|
||||
if (motionQueueEntry._motionQueueEntryHandle == motionQueueEntryNumber) {
|
||||
return motionQueueEntry;
|
||||
}
|
||||
}
|
||||
|
@ -249,10 +240,7 @@ export namespace Live2DCubismFramework {
|
|||
* @return true モデルへパラメータ値の反映あり
|
||||
* @return false モデルへパラメータ値の反映なし(モーションの変化なし)
|
||||
*/
|
||||
public doUpdateMotion(
|
||||
model: CubismModel,
|
||||
userTimeSeconds: number
|
||||
): boolean {
|
||||
public doUpdateMotion(model: CubismModel, userTimeSeconds: number): boolean {
|
||||
let updated = false;
|
||||
|
||||
// ------- 処理を行う --------
|
||||
|
@ -347,4 +335,15 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
export declare type CubismMotionQueueEntryHandle = any;
|
||||
export const InvalidMotionQueueEntryHandleValue: CubismMotionQueueEntryHandle = -1;
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismmotionqueuemanager';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismMotionQueueManager = $.CubismMotionQueueManager;
|
||||
export type CubismMotionQueueManager = $.CubismMotionQueueManager;
|
||||
export const InvalidMotionQueueEntryHandleValue =
|
||||
$.InvalidMotionQueueEntryHandleValue;
|
||||
export type CubismMotionQueueEntryHandle = $.CubismMotionQueueEntryHandle;
|
||||
export type CubismMotionEventFunction = $.CubismMotionEventFunction;
|
||||
}
|
||||
|
|
|
@ -5,25 +5,21 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismphysicsinternal } from './cubismphysicsinternal';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import { Live2DCubismFramework as cubismvector2 } from '../math/cubismvector2';
|
||||
import { Live2DCubismFramework as cubismmath } from '../math/cubismmath';
|
||||
import { Live2DCubismFramework as cubismphysicsjson } from './cubismphysicsjson';
|
||||
import CubismPhysicsJson = cubismphysicsjson.CubismPhysicsJson;
|
||||
import CubismMath = cubismmath.CubismMath;
|
||||
import CubismPhysicsRig = cubismphysicsinternal.CubismPhysicsRig;
|
||||
import CubismPhysicsSubRig = cubismphysicsinternal.CubismPhysicsSubRig;
|
||||
import CubismPhysicsInput = cubismphysicsinternal.CubismPhysicsInput;
|
||||
import CubismPhysicsOutput = cubismphysicsinternal.CubismPhysicsOutput;
|
||||
import CubismPhysicsParticle = cubismphysicsinternal.CubismPhysicsParticle;
|
||||
import CubismPhysicsSource = cubismphysicsinternal.CubismPhysicsSource;
|
||||
import CubismPhysicsTargetType = cubismphysicsinternal.CubismPhysicsTargetType;
|
||||
import CubismPhysicsNormalization = cubismphysicsinternal.CubismPhysicsNormalization;
|
||||
import CubismVector2 = cubismvector2.CubismVector2;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import { CubismMath } from '../math/cubismmath';
|
||||
import { CubismVector2 } from '../math/cubismvector2';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import {
|
||||
CubismPhysicsInput,
|
||||
CubismPhysicsNormalization,
|
||||
CubismPhysicsOutput,
|
||||
CubismPhysicsParticle,
|
||||
CubismPhysicsRig,
|
||||
CubismPhysicsSource,
|
||||
CubismPhysicsSubRig,
|
||||
CubismPhysicsTargetType
|
||||
} from './cubismphysicsinternal';
|
||||
import { CubismPhysicsJson } from './cubismphysicsjson';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
// physics types tags.
|
||||
const PhysicsTypeTagX = 'X';
|
||||
const PhysicsTypeTagY = 'Y';
|
||||
|
@ -103,9 +99,7 @@ export namespace Live2DCubismFramework {
|
|||
totalTranslation.x = 0.0;
|
||||
totalTranslation.y = 0.0;
|
||||
currentSetting = this._physicsRig.settings.at(settingIndex);
|
||||
currentInput = this._physicsRig.inputs.get(
|
||||
currentSetting.baseInputIndex
|
||||
);
|
||||
currentInput = this._physicsRig.inputs.get(currentSetting.baseInputIndex);
|
||||
currentOutput = this._physicsRig.outputs.get(
|
||||
currentSetting.baseOutputIndex
|
||||
);
|
||||
|
@ -170,9 +164,7 @@ export namespace Live2DCubismFramework {
|
|||
}
|
||||
|
||||
if (currentOutput[i].destinationParameterIndex == -1) {
|
||||
currentOutput[
|
||||
i
|
||||
].destinationParameterIndex = model.getParameterIndex(
|
||||
currentOutput[i].destinationParameterIndex = model.getParameterIndex(
|
||||
currentOutput[i].destination.id
|
||||
);
|
||||
}
|
||||
|
@ -196,8 +188,7 @@ export namespace Live2DCubismFramework {
|
|||
const destinationParameterIndex: number =
|
||||
currentOutput[i].destinationParameterIndex;
|
||||
const outParameterValue: Float32Array =
|
||||
!Float32Array.prototype.slice &&
|
||||
'subarray' in Float32Array.prototype
|
||||
!Float32Array.prototype.slice && 'subarray' in Float32Array.prototype
|
||||
? JSON.parse(
|
||||
JSON.stringify(
|
||||
parameterValue.subarray(destinationParameterIndex)
|
||||
|
@ -321,19 +312,13 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
this._physicsRig.settings.at(
|
||||
i
|
||||
).normalizationAngle.minimum = json.getNormalizationAngleMinimumValue(
|
||||
i
|
||||
);
|
||||
).normalizationAngle.minimum = json.getNormalizationAngleMinimumValue(i);
|
||||
this._physicsRig.settings.at(
|
||||
i
|
||||
).normalizationAngle.maximum = json.getNormalizationAngleMaximumValue(
|
||||
i
|
||||
);
|
||||
).normalizationAngle.maximum = json.getNormalizationAngleMaximumValue(i);
|
||||
this._physicsRig.settings.at(
|
||||
i
|
||||
).normalizationAngle.defalut = json.getNormalizationAngleDefaultValue(
|
||||
i
|
||||
);
|
||||
).normalizationAngle.defalut = json.getNormalizationAngleDefaultValue(i);
|
||||
|
||||
// Input
|
||||
this._physicsRig.settings.at(i).inputCount = json.getInputCount(i);
|
||||
|
@ -341,9 +326,10 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
for (let j = 0; j < this._physicsRig.settings.at(i).inputCount; ++j) {
|
||||
this._physicsRig.inputs.at(inputIndex + j).sourceParameterIndex = -1;
|
||||
this._physicsRig.inputs.at(
|
||||
inputIndex + j
|
||||
).weight = json.getInputWeight(i, j);
|
||||
this._physicsRig.inputs.at(inputIndex + j).weight = json.getInputWeight(
|
||||
i,
|
||||
j
|
||||
);
|
||||
this._physicsRig.inputs.at(
|
||||
inputIndex + j
|
||||
).reflect = json.getInputReflect(i, j);
|
||||
|
@ -436,16 +422,10 @@ export namespace Live2DCubismFramework {
|
|||
outputIndex += this._physicsRig.settings.at(i).outputCount;
|
||||
|
||||
// Particle
|
||||
this._physicsRig.settings.at(i).particleCount = json.getParticleCount(
|
||||
i
|
||||
);
|
||||
this._physicsRig.settings.at(i).particleCount = json.getParticleCount(i);
|
||||
this._physicsRig.settings.at(i).baseParticleIndex = particleIndex;
|
||||
|
||||
for (
|
||||
let j = 0;
|
||||
j < this._physicsRig.settings.at(i).particleCount;
|
||||
++j
|
||||
) {
|
||||
for (let j = 0; j < this._physicsRig.settings.at(i).particleCount; ++j) {
|
||||
this._physicsRig.particles.at(
|
||||
particleIndex + j
|
||||
).mobility = json.getParticleMobility(i, j);
|
||||
|
@ -487,9 +467,7 @@ export namespace Live2DCubismFramework {
|
|||
++settingIndex
|
||||
) {
|
||||
currentSetting = this._physicsRig.settings.at(settingIndex);
|
||||
strand = this._physicsRig.particles.get(
|
||||
currentSetting.baseParticleIndex
|
||||
);
|
||||
strand = this._physicsRig.particles.get(currentSetting.baseParticleIndex);
|
||||
|
||||
// Initialize the top of particle.
|
||||
strand[0].initialPosition = new CubismVector2(0.0, 0.0);
|
||||
|
@ -811,9 +789,7 @@ export namespace Live2DCubismFramework {
|
|||
}
|
||||
|
||||
if (delay != 0.0) {
|
||||
strand[i].velocity = strand[i].position.substract(
|
||||
strand[i].lastPosition
|
||||
);
|
||||
strand[i].velocity = strand[i].position.substract(strand[i].lastPosition);
|
||||
strand[i].velocity = strand[i].velocity.divisionByScalar(delay);
|
||||
strand[i].velocity = strand[i].velocity.multiplyByScaler(
|
||||
strand[i].mobility
|
||||
|
@ -946,4 +922,13 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
return isInverted ? result : result * -1.0;
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismphysics';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismPhysics = $.CubismPhysics;
|
||||
export type CubismPhysics = $.CubismPhysics;
|
||||
export const Options = $.Options;
|
||||
export type Options = $.Options;
|
||||
}
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismvector2 } from '../math/cubismvector2';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import csmVector = csmvector.csmVector;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismVector2 = cubismvector2.CubismVector2;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismVector2 } from '../math/cubismvector2';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* 物理演算の適用先の種類
|
||||
*/
|
||||
|
@ -222,4 +218,32 @@ export namespace Live2DCubismFramework {
|
|||
gravity: CubismVector2; // 重力
|
||||
wind: CubismVector2; // 風
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismphysicsinternal';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismPhysicsInput = $.CubismPhysicsInput;
|
||||
export type CubismPhysicsInput = $.CubismPhysicsInput;
|
||||
export const CubismPhysicsNormalization = $.CubismPhysicsNormalization;
|
||||
export type CubismPhysicsNormalization = $.CubismPhysicsNormalization;
|
||||
export const CubismPhysicsOutput = $.CubismPhysicsOutput;
|
||||
export type CubismPhysicsOutput = $.CubismPhysicsOutput;
|
||||
export const CubismPhysicsParameter = $.CubismPhysicsParameter;
|
||||
export type CubismPhysicsParameter = $.CubismPhysicsParameter;
|
||||
export const CubismPhysicsParticle = $.CubismPhysicsParticle;
|
||||
export type CubismPhysicsParticle = $.CubismPhysicsParticle;
|
||||
export const CubismPhysicsRig = $.CubismPhysicsRig;
|
||||
export type CubismPhysicsRig = $.CubismPhysicsRig;
|
||||
export const CubismPhysicsSource = $.CubismPhysicsSource;
|
||||
export type CubismPhysicsSource = $.CubismPhysicsSource;
|
||||
export const CubismPhysicsSubRig = $.CubismPhysicsSubRig;
|
||||
export type CubismPhysicsSubRig = $.CubismPhysicsSubRig;
|
||||
export const CubismPhysicsTargetType = $.CubismPhysicsTargetType;
|
||||
export type CubismPhysicsTargetType = $.CubismPhysicsTargetType;
|
||||
export const PhysicsJsonEffectiveForces = $.PhysicsJsonEffectiveForces;
|
||||
export type PhysicsJsonEffectiveForces = $.PhysicsJsonEffectiveForces;
|
||||
export type normalizedPhysicsParameterValueGetter = $.normalizedPhysicsParameterValueGetter;
|
||||
export type physicsScaleGetter = $.physicsScaleGetter;
|
||||
export type physicsValueGetter = $.physicsValueGetter;
|
||||
}
|
||||
|
|
|
@ -5,16 +5,11 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismjson } from '../utils/cubismjson';
|
||||
import { Live2DCubismFramework as cubismvector2 } from '../math/cubismvector2';
|
||||
import { Live2DCubismFramework as cubismid } from '../id/cubismid';
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import CubismFramework = cubismframework.CubismFramework;
|
||||
import CubismIdHandle = cubismid.CubismIdHandle;
|
||||
import CubismVector2 = cubismvector2.CubismVector2;
|
||||
import CubismJson = cubismjson.CubismJson;
|
||||
import { CubismIdHandle } from '../id/cubismid';
|
||||
import { CubismFramework } from '../live2dcubismframework';
|
||||
import { CubismVector2 } from '../math/cubismvector2';
|
||||
import { CubismJson } from '../utils/cubismjson';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
// JSON keys
|
||||
const Position = 'Position';
|
||||
const X = 'X';
|
||||
|
@ -342,10 +337,7 @@ export namespace Live2DCubismFramework {
|
|||
* @param inputIndex 入力のインデックス
|
||||
* @return 入力の種類
|
||||
*/
|
||||
public getInputType(
|
||||
physicsSettingIndex: number,
|
||||
inputIndex: number
|
||||
): string {
|
||||
public getInputType(physicsSettingIndex: number, inputIndex: number): string {
|
||||
return this._json
|
||||
.getRoot()
|
||||
.getValueByString(PhysicsSettings)
|
||||
|
@ -646,4 +638,11 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
_json: CubismJson; // physics3.jsonデータ
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismphysicsjson';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismPhysicsJson = $.CubismPhysicsJson;
|
||||
export type CubismPhysicsJson = $.CubismPhysicsJson;
|
||||
}
|
||||
|
|
|
@ -5,12 +5,9 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismmatrix44 } from '../math/cubismmatrix44';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import CubismMatrix44 = cubismmatrix44.CubismMatrix44;
|
||||
import { CubismMatrix44 } from '../math/cubismmatrix44';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* モデル描画を処理するレンダラ
|
||||
*
|
||||
|
@ -264,4 +261,15 @@ export namespace Live2DCubismFramework {
|
|||
B: number; // 青チャンネル
|
||||
A: number; // αチャンネル
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismrenderer';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismBlendMode = $.CubismBlendMode;
|
||||
export type CubismBlendMode = $.CubismBlendMode;
|
||||
export const CubismRenderer = $.CubismRenderer;
|
||||
export type CubismRenderer = $.CubismRenderer;
|
||||
export const CubismTextureColor = $.CubismTextureColor;
|
||||
export type CubismTextureColor = $.CubismTextureColor;
|
||||
}
|
||||
|
|
|
@ -5,25 +5,19 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as cubismframework } from '../live2dcubismframework';
|
||||
import { Live2DCubismFramework as csmrect } from '../type/csmrectf';
|
||||
import { Live2DCubismFramework as cubismrenderer } from './cubismrenderer';
|
||||
import { Live2DCubismFramework as cubismmodel } from '../model/cubismmodel';
|
||||
import { Live2DCubismFramework as cubsimmatrix44 } from '../math/cubismmatrix44';
|
||||
import { Live2DCubismFramework as csmmap } from '../type/csmmap';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { Constant } from '../live2dcubismframework';
|
||||
import { CubismMatrix44 } from '../math/cubismmatrix44';
|
||||
import { CubismModel } from '../model/cubismmodel';
|
||||
import { csmMap } from '../type/csmmap';
|
||||
import { csmRect } from '../type/csmrectf';
|
||||
import { csmVector } from '../type/csmvector';
|
||||
import { CubismLogError } from '../utils/cubismdebug';
|
||||
import Constant = cubismframework.Constant;
|
||||
import CubismMatrix44 = cubsimmatrix44.CubismMatrix44;
|
||||
import csmRect = csmrect.csmRect;
|
||||
import csmMap = csmmap.csmMap;
|
||||
import csmVector = csmvector.csmVector;
|
||||
import CubismModel = cubismmodel.CubismModel;
|
||||
import CubismRenderer = cubismrenderer.CubismRenderer;
|
||||
import CubismBlendMode = cubismrenderer.CubismBlendMode;
|
||||
import CubismTextureColor = cubismrenderer.CubismTextureColor;
|
||||
import {
|
||||
CubismBlendMode,
|
||||
CubismRenderer,
|
||||
CubismTextureColor
|
||||
} from './cubismrenderer';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
const ColorChannelCount = 4; // 実験時に1チャンネルの場合は1、RGBだけの場合は3、アルファも含める場合は4
|
||||
|
||||
const shaderCount = 10; // シェーダーの数 = マスク生成用 + (通常用 + 加算 + 乗算) * (マスク無の乗算済アルファ対応版 + マスク有の乗算済アルファ対応版 + マスク有反転の乗算済アルファ対応版)
|
||||
|
@ -490,12 +484,8 @@ export namespace Live2DCubismFramework {
|
|||
}
|
||||
this._tmpMatrixForDraw.setMatrix(this._tmpMatrix.getArray());
|
||||
}
|
||||
clipContext._matrixForMask.setMatrix(
|
||||
this._tmpMatrixForMask.getArray()
|
||||
);
|
||||
clipContext._matrixForDraw.setMatrix(
|
||||
this._tmpMatrixForDraw.getArray()
|
||||
);
|
||||
clipContext._matrixForMask.setMatrix(this._tmpMatrixForMask.getArray());
|
||||
clipContext._matrixForDraw.setMatrix(this._tmpMatrixForDraw.getArray());
|
||||
|
||||
const clipDrawCount: number = clipContext._clippingIdCount;
|
||||
for (let i = 0; i < clipDrawCount; i++) {
|
||||
|
@ -503,9 +493,7 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
// 頂点情報が更新されておらず、信頼性がない場合は描画をパスする
|
||||
if (
|
||||
!model.getDrawableDynamicFlagVertexPositionsDidChange(
|
||||
clipDrawIndex
|
||||
)
|
||||
!model.getDrawableDynamicFlagVertexPositionsDidChange(clipDrawIndex)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1200,26 +1188,14 @@ export namespace Live2DCubismFramework {
|
|||
);
|
||||
|
||||
// 加算も通常と同じシェーダーを利用する
|
||||
this._shaderSets.at(4).shaderProgram = this._shaderSets.at(
|
||||
1
|
||||
).shaderProgram;
|
||||
this._shaderSets.at(5).shaderProgram = this._shaderSets.at(
|
||||
2
|
||||
).shaderProgram;
|
||||
this._shaderSets.at(6).shaderProgram = this._shaderSets.at(
|
||||
3
|
||||
).shaderProgram;
|
||||
this._shaderSets.at(4).shaderProgram = this._shaderSets.at(1).shaderProgram;
|
||||
this._shaderSets.at(5).shaderProgram = this._shaderSets.at(2).shaderProgram;
|
||||
this._shaderSets.at(6).shaderProgram = this._shaderSets.at(3).shaderProgram;
|
||||
|
||||
// 乗算も通常と同じシェーダーを利用する
|
||||
this._shaderSets.at(7).shaderProgram = this._shaderSets.at(
|
||||
1
|
||||
).shaderProgram;
|
||||
this._shaderSets.at(8).shaderProgram = this._shaderSets.at(
|
||||
2
|
||||
).shaderProgram;
|
||||
this._shaderSets.at(9).shaderProgram = this._shaderSets.at(
|
||||
3
|
||||
).shaderProgram;
|
||||
this._shaderSets.at(7).shaderProgram = this._shaderSets.at(1).shaderProgram;
|
||||
this._shaderSets.at(8).shaderProgram = this._shaderSets.at(2).shaderProgram;
|
||||
this._shaderSets.at(9).shaderProgram = this._shaderSets.at(3).shaderProgram;
|
||||
|
||||
// SetupMask
|
||||
this._shaderSets.at(
|
||||
|
@ -1234,9 +1210,7 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(0).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
0
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(0).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(0).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
|
@ -1272,9 +1246,7 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(1).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
1
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(1).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(1).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
|
@ -1302,15 +1274,11 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(2).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
2
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(2).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(2).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
2
|
||||
).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(2).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(2).shaderProgram,
|
||||
's_texture1'
|
||||
);
|
||||
|
@ -1350,15 +1318,11 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(3).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
3
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(3).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(3).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
3
|
||||
).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(3).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(3).shaderProgram,
|
||||
's_texture1'
|
||||
);
|
||||
|
@ -1398,9 +1362,7 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(4).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
4
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(4).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(4).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
|
@ -1428,15 +1390,11 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(5).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
5
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(5).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(5).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
5
|
||||
).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(5).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(5).shaderProgram,
|
||||
's_texture1'
|
||||
);
|
||||
|
@ -1476,15 +1434,11 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(6).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
6
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(6).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(6).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
6
|
||||
).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(6).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(6).shaderProgram,
|
||||
's_texture1'
|
||||
);
|
||||
|
@ -1524,9 +1478,7 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(7).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
7
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(7).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(7).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
|
@ -1554,15 +1506,11 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(8).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
8
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(8).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(8).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
8
|
||||
).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(8).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(8).shaderProgram,
|
||||
's_texture1'
|
||||
);
|
||||
|
@ -1602,15 +1550,11 @@ export namespace Live2DCubismFramework {
|
|||
this._shaderSets.at(9).shaderProgram,
|
||||
'a_texCoord'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
9
|
||||
).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(9).samplerTexture0Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(9).shaderProgram,
|
||||
's_texture0'
|
||||
);
|
||||
this._shaderSets.at(
|
||||
9
|
||||
).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(9).samplerTexture1Location = this.gl.getUniformLocation(
|
||||
this._shaderSets.at(9).shaderProgram,
|
||||
's_texture1'
|
||||
);
|
||||
|
@ -2256,4 +2200,23 @@ export namespace Live2DCubismFramework {
|
|||
CubismRenderer.staticRelease = (): void => {
|
||||
CubismRenderer_WebGL.doStaticRelease();
|
||||
};
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismrenderer_webgl';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismClippingContext = $.CubismClippingContext;
|
||||
export type CubismClippingContext = $.CubismClippingContext;
|
||||
export const CubismClippingManager_WebGL = $.CubismClippingManager_WebGL;
|
||||
export type CubismClippingManager_WebGL = $.CubismClippingManager_WebGL;
|
||||
export const CubismRenderTextureResource = $.CubismRenderTextureResource;
|
||||
export type CubismRenderTextureResource = $.CubismRenderTextureResource;
|
||||
export const CubismRenderer_WebGL = $.CubismRenderer_WebGL;
|
||||
export type CubismRenderer_WebGL = $.CubismRenderer_WebGL;
|
||||
export const CubismShaderSet = $.CubismShaderSet;
|
||||
export type CubismShaderSet = $.CubismShaderSet;
|
||||
export const CubismShader_WebGL = $.CubismShader_WebGL;
|
||||
export type CubismShader_WebGL = $.CubismShader_WebGL;
|
||||
export const ShaderNames = $.ShaderNames;
|
||||
export type ShaderNames = $.ShaderNames;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
import { CubismLogDebug } from '../utils/cubismdebug';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* Key-Valueのペアを定義するクラス
|
||||
* csmMapクラスの内部データで使用する。
|
||||
|
@ -302,4 +301,15 @@ export namespace Live2DCubismFramework {
|
|||
_index: number; // コンテナのインデックス値
|
||||
_map: csmMap<_KeyT, _ValT>; // コンテナ
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './csmmap';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const csmMap = $.csmMap;
|
||||
export type csmMap<K, V> = $.csmMap<K, V>;
|
||||
export const csmPair = $.csmPair;
|
||||
export type csmPair<K, V> = $.csmPair<K, V>;
|
||||
export const iterator = $.iterator;
|
||||
export type iterator<K, V> = $.iterator<K, V>;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* 矩形形状(座標・長さはfloat値)を定義するクラス
|
||||
*/
|
||||
|
@ -80,4 +79,11 @@ export namespace Live2DCubismFramework {
|
|||
public width: number; // 幅
|
||||
public height: number; // 高さ
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './csmrectf';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const csmRect = $.csmRect;
|
||||
export type csmRect = $.csmRect;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* 文字列クラス。
|
||||
*/
|
||||
|
@ -98,4 +97,11 @@ export namespace Live2DCubismFramework {
|
|||
|
||||
s: string;
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './csmstring';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const csmString = $.csmString;
|
||||
export type csmString = $.csmString;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* ベクター型(可変配列型)
|
||||
*/
|
||||
|
@ -341,4 +340,13 @@ export namespace Live2DCubismFramework {
|
|||
_index: number; // コンテナのインデックス値
|
||||
_vector: csmVector<T>; // コンテナ
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './csmvector';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const csmVector = $.csmVector;
|
||||
export type csmVector<T> = $.csmVector<T>;
|
||||
export const iterator = $.iterator;
|
||||
export type iterator<T> = $.iterator<T>;
|
||||
}
|
||||
|
|
|
@ -5,21 +5,18 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import {
|
||||
Live2DCubismFramework as cubismframework,
|
||||
LogLevel
|
||||
} from '../live2dcubismframework';
|
||||
import {
|
||||
CSM_LOG_LEVEL,
|
||||
CSM_LOG_LEVEL_VERBOSE,
|
||||
CSM_LOG_LEVEL_DEBUG,
|
||||
CSM_LOG_LEVEL_ERROR,
|
||||
CSM_LOG_LEVEL_INFO,
|
||||
CSM_LOG_LEVEL_WARNING,
|
||||
CSM_LOG_LEVEL_ERROR
|
||||
CSM_LOG_LEVEL_VERBOSE,
|
||||
CSM_LOG_LEVEL_WARNING
|
||||
} from '../cubismframeworkconfig';
|
||||
import { CubismFramework, LogLevel } from '../live2dcubismframework';
|
||||
|
||||
export const CubismLogPrint = (level: LogLevel, fmt: string, args: any[]) => {
|
||||
Live2DCubismFramework.CubismDebug.print(level, '[CSM]' + fmt, args);
|
||||
CubismDebug.print(level, '[CSM]' + fmt, args);
|
||||
};
|
||||
|
||||
export const CubismLogPrintIn = (level: LogLevel, fmt: string, args: any[]) => {
|
||||
|
@ -98,8 +95,6 @@ if (CSM_LOG_LEVEL <= CSM_LOG_LEVEL_VERBOSE) {
|
|||
};
|
||||
}
|
||||
|
||||
//------------ LIVE2D NAMESPACE ------------
|
||||
export namespace Live2DCubismFramework {
|
||||
/**
|
||||
* デバッグ用のユーティリティクラス。
|
||||
* ログの出力、バイトのダンプなど
|
||||
|
@ -113,18 +108,14 @@ export namespace Live2DCubismFramework {
|
|||
* @param format 書式付き文字列
|
||||
* @param args 可変長引数
|
||||
*/
|
||||
public static print(
|
||||
logLevel: LogLevel,
|
||||
format: string,
|
||||
args?: any[]
|
||||
): void {
|
||||
public static print(logLevel: LogLevel, format: string, args?: any[]): void {
|
||||
// オプションで設定されたログ出力レベルを下回る場合はログに出さない
|
||||
if (logLevel < cubismframework.CubismFramework.getLoggingLevel()) {
|
||||
if (logLevel < CubismFramework.getLoggingLevel()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const logPrint: Live2DCubismCore.csmLogFunction =
|
||||
cubismframework.CubismFramework.coreLogFunction;
|
||||
CubismFramework.coreLogFunction;
|
||||
|
||||
if (!logPrint) return;
|
||||
|
||||
|
@ -161,6 +152,11 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
private constructor() {}
|
||||
}
|
||||
}
|
||||
|
||||
//------------ LIVE2D NAMESPACE ------------
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismdebug';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismDebug = $.CubismDebug;
|
||||
export type CubismDebug = $.CubismDebug;
|
||||
}
|
||||
|
|
|
@ -5,18 +5,12 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
import { Live2DCubismFramework as csmstring } from '../type/csmstring';
|
||||
import { Live2DCubismFramework as csmmap } from '../type/csmmap';
|
||||
import { Live2DCubismFramework as csmvector } from '../type/csmvector';
|
||||
import { CubismLogInfo } from './cubismdebug';
|
||||
import { strtod } from '../live2dcubismframework';
|
||||
import csmVector = csmvector.csmVector;
|
||||
import csmVector_iterator = csmvector.iterator;
|
||||
import csmMap = csmmap.csmMap;
|
||||
import csmMap_iterator = csmmap.iterator;
|
||||
import csmString = csmstring.csmString;
|
||||
import { csmMap, iterator as csmMap_iterator } from '../type/csmmap';
|
||||
import { csmString } from '../type/csmstring';
|
||||
import { csmVector, iterator as csmVector_iterator } from '../type/csmvector';
|
||||
import { CubismLogInfo } from './cubismdebug';
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
// StaticInitializeNotForClientCall()で初期化する
|
||||
const CSM_JSON_ERROR_TYPE_MISMATCH = 'Error: type mismatch';
|
||||
const CSM_JSON_ERROR_INDEX_OF_BOUNDS = 'Error: index out of bounds';
|
||||
|
@ -624,12 +618,7 @@ export namespace Live2DCubismFramework {
|
|||
}
|
||||
|
||||
// 値をチェック
|
||||
const value: Value = this.parseValue(
|
||||
buffer,
|
||||
length,
|
||||
i,
|
||||
localRetEndPos2
|
||||
);
|
||||
const value: Value = this.parseValue(buffer, length, i, localRetEndPos2);
|
||||
if (this._error) {
|
||||
return null;
|
||||
}
|
||||
|
@ -685,12 +674,7 @@ export namespace Live2DCubismFramework {
|
|||
// , が続く限りループ
|
||||
for (; i < length; i++) {
|
||||
// : をチェック
|
||||
const value: Value = this.parseValue(
|
||||
buffer,
|
||||
length,
|
||||
i,
|
||||
localRetEndpos2
|
||||
);
|
||||
const value: Value = this.parseValue(buffer, length, i, localRetEndpos2);
|
||||
|
||||
if (this._error) {
|
||||
return null;
|
||||
|
@ -1243,4 +1227,27 @@ export namespace Live2DCubismFramework {
|
|||
private _map: csmMap<string, Value>; // JSON要素の値
|
||||
private _keys: csmVector<string>; // JSON要素の値
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismjson';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismJson = $.CubismJson;
|
||||
export type CubismJson = $.CubismJson;
|
||||
export const JsonArray = $.JsonArray;
|
||||
export type JsonArray = $.JsonArray;
|
||||
export const JsonBoolean = $.JsonBoolean;
|
||||
export type JsonBoolean = $.JsonBoolean;
|
||||
export const JsonError = $.JsonError;
|
||||
export type JsonError = $.JsonError;
|
||||
export const JsonFloat = $.JsonFloat;
|
||||
export type JsonFloat = $.JsonFloat;
|
||||
export const JsonMap = $.JsonMap;
|
||||
export type JsonMap = $.JsonMap;
|
||||
export const JsonNullvalue = $.JsonNullvalue;
|
||||
export type JsonNullvalue = $.JsonNullvalue;
|
||||
export const JsonString = $.JsonString;
|
||||
export type JsonString = $.JsonString;
|
||||
export const Value = $.Value;
|
||||
export type Value = $.Value;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
export namespace Live2DCubismFramework {
|
||||
export class CubismString {
|
||||
/**
|
||||
* 標準出力の書式を適用した文字列を取得する。
|
||||
|
@ -120,4 +119,11 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
private constructor() {}
|
||||
}
|
||||
|
||||
// Namespace definition for compatibility.
|
||||
import * as $ from './cubismstring';
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
export namespace Live2DCubismFramework {
|
||||
export const CubismString = $.CubismString;
|
||||
export type CubismString = $.CubismString;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue