Interface: Live2DRuntime
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4095
Represents a Cubism version.
Properties
version
> version: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4099
The version number. Higher version takes priority when matching the runtime.
Methods
createCoreModel()
> createCoreModel(data, options?): any
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4125
Creates a core model.
Parameters
data
ArrayBuffer
Content of the moc file.
options?
Returns
any
Created core model.
createInternalModel()
> createInternalModel(coreModel, settings, options?): InternalModel
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4133
Creates an InternalModel.
Parameters
coreModel
any
Core model that must belong to this runtime.
settings
ModelSettings of this model.
options?
Options that will be passed to the InternalModel's constructor.
Returns
Created InternalModel.
createModelSettings()
> createModelSettings(json): ModelSettings
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4118
Creates a ModelSettings.
Parameters
json
object
The settings JSON object.
Returns
Created ModelSettings.
createPhysics()
> createPhysics(coreModel, data): any
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4147
Creates a physics.
Parameters
coreModel
any
Core model that must belong to this runtime.
data
any
Content of the physics file.
Returns
any
Created physics.
createPose()
> createPose(coreModel, data): any
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4140
Creates a pose.
Parameters
coreModel
any
Core model that must belong to this runtime.
data
any
Content of the pose file.
Returns
any
Created pose.
isValidMoc()
> isValidMoc(modelData): boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4112
Checks if the data is a valid moc to create the core model.
Parameters
modelData
ArrayBuffer
The moc content.
Returns
boolean
True if the data is valid.
ready()
> ready(): Promise<void>
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4106
Returns
Promise<void>
test()
> test(source): boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:4105
Checks if the source belongs to this runtime.
Parameters
source
any
Either a settings JSON object or a ModelSettings instance.
Returns
boolean
True if the source belongs to this runtime.