new PIXI.Live2DSprite(modelDefine, options)
json modelDefine: The content of [name].model.json.
json options: optional parameters
- eyeBlink
booleandefault: true - lipSyncWithSound
booleandefault: true - debugLog
booleandefault: false - debugMouseLog
booleandefault: false - randomMotion
booleandefault: true - defaultMotionGroup
stringdefault: 'idle' - priorityDefault
numberdefault: 1 - priorityForce
numberdefault: 3 - audioPlayer
functionCustom audio player, pass (filename, rootPath) as - parameters
.adjustScale(cx, cy, scale)
cx: center for scale, between 0-1.
cy: center for scale, between 0-1.
scale: ratio for scale.
.adjustTranslate(shiftX, shiftY)
shiftX: between 0-1.
shiftY: between 0-1.
.setLipSync(value)
.setRandomExpression()
.startRandomMotion(name, priority)
.startRandomMotionOnce(name, priority)
.stopRandomMotion()
.startMotion(name, no, priority)
.playSound(filename, host='/')
.hitTest(id, x, y)
If id is not null, it will test a specific part of model. Or it will test all parts, which will return true if only any part of model returns true.
.setViewPoint(x, y)
.getParamFloat(key)
.setParamFloat(key, value, weight=1)
.addToParamFloat(key, value, weight=1)
.multParamFloat(key, value, weight=1)