Class: CubismLegacyInternalModel
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5112
A wrapper that manages the states of a Live2D core model, and delegates all operations to it.
Emits
Extends
Constructors
Constructor
> new CubismLegacyInternalModel(coreModel, settings, options?): CubismLegacyInternalModel
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5141
Parameters
coreModel
Live2DModelWebGL
settings
options?
Returns
CubismLegacyInternalModel
Overrides
Properties
angleXParamIndex
> angleXParamIndex: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5123
angleYParamIndex
> angleYParamIndex: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5124
angleZParamIndex
> angleZParamIndex: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5125
bodyAngleXParamIndex
> bodyAngleXParamIndex: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5126
breathParamIndex
> breathParamIndex: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5127
coreModel
> coreModel: Live2DModelWebGL
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5115
The managed Live2D core model.
Overrides
destroyed
> destroyed: boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3203
Flags this instance has been destroyed.
Inherited from
disableCulling
> disableCulling: boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5138
If true, the face culling will always be disabled when drawing the model, regardless of the model's internal flags.
drawDataCount
> drawDataCount: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5133
Number of the drawables in this model.
drawingMatrix
> drawingMatrix: Matrix
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3182
The final matrix to draw the model.
Inherited from
eyeballXParamIndex
> eyeballXParamIndex: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5121
eyeballYParamIndex
> eyeballYParamIndex: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5122
eyeBlink?
> optional eyeBlink?: Live2DEyeBlink
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5118
focusController
> focusController: FocusController
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3152
Inherited from
height
> readonly height: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3174
Canvas height of the model, scaled by the height of the model's layout.
Inherited from
hitAreas
> hitAreas: Record<string, CommonHitArea>
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3186
The hit area definitions, keyed by their names.
Inherited from
lipSync
> lipSync: boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5129
localTransform
> localTransform: Matrix
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3178
Local transformation, calculated from the model's layout.
Inherited from
motionManager
> motionManager: CubismLegacyMotionManager
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5116
Overrides
options
> options: InternalModelOptions
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5114
Overrides
originalHeight
> readonly originalHeight: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3166
Original canvas height of the model. Note this doesn't represent the model's real size, as the model can overflow from its canvas.
Inherited from
originalWidth
> readonly originalWidth: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3161
Original canvas width of the model. Note this doesn't represent the model's real size, as the model can overflow from its canvas.
Inherited from
parallelMotionManager
> parallelMotionManager: CubismLegacyParallelMotionManager[]
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5117
Overrides
InternalModel.parallelMotionManager
physics?
> optional physics?: Live2DPhysics
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5119
Overrides
pose?
> optional pose?: Live2DPose
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5120
Overrides
settings
> settings: CubismLegacyModelSettings
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5113
Overrides
textureFlipY
> textureFlipY: boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5128
Flags whether gl.UNPACK_FLIP_Y_WEBGL should be enabled when binding the textures.
Overrides
viewport
> viewport: [number, number, number, number]
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3194
WebGL viewport when drawing the model. The format is [x, y, width, height].
Inherited from
width
> readonly width: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3170
Canvas width of the model, scaled by the width of the model's layout.
Inherited from
prefixed
> static prefixed: string | boolean
Defined in: node_modules/eventemitter3/index.d.ts:9
Inherited from
Methods
addListener()
> addListener<T>(event, fn, context?): this
Defined in: node_modules/eventemitter3/index.d.ts:45
Type Parameters
T
T extends string | symbol
Parameters
event
T
fn
(...args) => void
context?
any
Returns
this
Inherited from
bindTexture()
> bindTexture(index, texture): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5149
Binds a texture to the model. The index must be the same as that of this texture in the ModelSettings.textures array.
Parameters
index
number
texture
WebGLTexture
Returns
void
Overrides
destroy()
> destroy(): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5160
Destroys the model and all related resources.
Returns
void
Emits
`InternalModelEvents.destroy` | destroy
Overrides
draw()
> draw(gl): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5158
Draws the model.
Parameters
gl
WebGLRenderingContext
Returns
void
Overrides
emit()
> emit<T>(event, ...args): boolean
Defined in: node_modules/eventemitter3/index.d.ts:32
Calls each of the listeners registered for a given event.
Type Parameters
T
T extends string | symbol
Parameters
event
T
args
...any[]
Returns
boolean
Inherited from
eventNames()
> eventNames(): (string | symbol)[]
Defined in: node_modules/eventemitter3/index.d.ts:15
Return an array listing the events for which the emitter has registered listeners.
Returns
(string | symbol)[]
Inherited from
extendParallelMotionManager()
> extendParallelMotionManager(managerCount): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5159
Add parallel motion manager.
Parameters
managerCount
number
Count of parallel motion managers.
Returns
void
Overrides
InternalModel.extendParallelMotionManager
getDrawableBounds()
> getDrawableBounds(index, bounds?): Bounds
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3237
Gets a drawable's bounds.
Parameters
index
number
Index of the drawable.
bounds?
Bounds
Object to store the output values.
Returns
Bounds
The bounds in model canvas space.
Inherited from
InternalModel.getDrawableBounds
getDrawableIDs()
> getDrawableIDs(): string[]
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5151
Gets all the drawables' IDs.
Returns
string[]
IDs.
Overrides
getDrawableIndex()
> getDrawableIndex(id): number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5152
Finds the index of a drawable by its ID.
Parameters
id
string
Returns
number
The index.
Overrides
InternalModel.getDrawableIndex
getDrawableVertices()
> getDrawableVertices(drawIndex): Float32Array
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5153
Gets a drawable's vertices.
Parameters
drawIndex
string | number
Returns
Float32Array
Throws
Error when the drawable cannot be found.
Overrides
InternalModel.getDrawableVertices
getHitAreaDefs()
> protected getHitAreaDefs(): CommonHitArea[]
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5150
Gets all the hit area definitions.
Returns
Normalized definitions.
Overrides
getLayout()
> protected getLayout(): CommonLayout
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5147
Gets the layout definition.
Returns
Normalized definition.
Overrides
getSize()
> protected getSize(): [number, number]
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5143
Gets the model's original canvas size.
Returns
[number, number]
[width, height]
Overrides
hitTest()
> hitTest(x, y): string[]
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5154
Hit-test on the model.
Parameters
x
number
Position in model canvas.
y
number
Position in model canvas.
Returns
string[]
The names of the hit hit areas. Can be empty if none is hit.
Overrides
init()
> protected init(): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5142
Should be called in the constructor of derived class.
Returns
void
Overrides
isHit()
> isHit(hitAreaName, x, y): boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3230
Hit-test for a single hit area.
Parameters
hitAreaName
string
The hit area's name.
x
number
Position in model canvas.
y
number
Position in model canvas.
Returns
boolean
True if hit.
Inherited from
listenerCount()
> listenerCount(event): number
Defined in: node_modules/eventemitter3/index.d.ts:27
Return the number of listeners listening to a given event.
Parameters
event
string | symbol
Returns
number
Inherited from
listeners()
> listeners<T>(event): (...args) => void[]
Defined in: node_modules/eventemitter3/index.d.ts:20
Return the listeners registered for a given event.
Type Parameters
T
T extends string | symbol
Parameters
event
T
Returns
(...args) => void[]
Inherited from
off()
> off<T>(event, fn?, context?, once?): this
Defined in: node_modules/eventemitter3/index.d.ts:69
Type Parameters
T
T extends string | symbol
Parameters
event
T
fn?
(...args) => void
context?
any
once?
boolean
Returns
this
Inherited from
on()
> on<T>(event, fn, context?): this
Defined in: node_modules/eventemitter3/index.d.ts:40
Add a listener for a given event.
Type Parameters
T
T extends string | symbol
Parameters
event
T
fn
(...args) => void
context?
any
Returns
this
Inherited from
once()
> once<T>(event, fn, context?): this
Defined in: node_modules/eventemitter3/index.d.ts:54
Add a one-time listener for a given event.
Type Parameters
T
T extends string | symbol
Parameters
event
T
fn
(...args) => void
context?
any
Returns
this
Inherited from
removeAllListeners()
> removeAllListeners(event?): this
Defined in: node_modules/eventemitter3/index.d.ts:79
Remove all listeners, or those of the specified event.
Parameters
event?
string | symbol
Returns
this
Inherited from
InternalModel.removeAllListeners
removeListener()
> removeListener<T>(event, fn?, context?, once?): this
Defined in: node_modules/eventemitter3/index.d.ts:63
Remove the listeners of a given event.
Type Parameters
T
T extends string | symbol
Parameters
event
T
fn?
(...args) => void
context?
any
once?
boolean
Returns
this
Inherited from
setupHitAreas()
> protected setupHitAreas(): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3215
Sets up the hit areas by their definitions in settings.
Returns
void
Inherited from
setupLayout()
> protected setupLayout(): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3211
Sets up the model's size and local transform by the model's layout.
Returns
void
Inherited from
update()
> update(dt, now): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5155
Updates the model's parameters.
Parameters
dt
number
Elapsed time in milliseconds from last frame.
now
number
Returns
void
Overrides
updateFocus()
> updateFocus(): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5156
Returns
void
updateMotions()
> protected updateMotions(model, now): boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3270
Updates all active motions for the model and emits lifecycle events.
This method coordinates the update cycle for both primary and parallel motion managers, ensuring all animations are synchronized with the current timestamp. It emits events before and after the update process, allowing external listeners to hook into the motion lifecycle. The return value indicates whether any motion was actively updated during this cycle.
Parameters
model
object
The model instance to apply motion updates to.
now
number
The current timestamp (in milliseconds) used to calculate motion progress.
Returns
boolean
Returns true if any motion (primary or parallel) was updated; false otherwise.
Emits
beforeMotionUpdate - Triggered before any motion updates are processed.
Emits
afterMotionUpdate - Triggered after all motion updates are completed.
Inherited from
updateNaturalMovements()
> updateNaturalMovements(_dt, now): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5157
Parameters
_dt
number
now
number
Returns
void
updateTransform()
> updateTransform(transform): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3242
Updates the model's transform.
Parameters
transform
Matrix
The world transform.
Returns
void
Inherited from
updateWebGLContext()
> updateWebGLContext(gl, glContextID): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5148
Updates WebGL context bound to this model.
Parameters
gl
WebGLRenderingContext
WebGL context.
glContextID
number
Unique ID for given WebGL context.
Returns
void