Class: CubismInternalModel
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6902
A wrapper that manages the states of a Live2D core model, and delegates all operations to it.
Emits
Extends
Constructors
Constructor
> new CubismInternalModel(coreModel, settings, options?): CubismInternalModel
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6931
Parameters
coreModel
CubismModel
settings
options?
Returns
CubismInternalModel
Overrides
Properties
breath
> breath: CubismBreath
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6909
coreModel
> coreModel: CubismModel
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6905
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
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
eyeBlink?
> optional eyeBlink?: CubismEyeBlink
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6910
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
idParamAngleX
> idParamAngleX: CubismId
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6915
idParamAngleY
> idParamAngleY: CubismId
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6916
idParamAngleZ
> idParamAngleZ: CubismId
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6917
idParamBodyAngleX
> idParamBodyAngleX: CubismId
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6920
idParamBreath
> idParamBreath: CubismId
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6921
idParamEyeBallX
> idParamEyeBallX: CubismId
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6918
idParamEyeBallY
> idParamEyeBallY: CubismId
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6919
idParamMouthForm
> idParamMouthForm: CubismId
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6922
lipSync
> lipSync: boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6908
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
modelTransform
> protected modelTransform: Matrix
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6930
Matrix that scales by pixelsPerUnit, and moves the origin from top-left to center.
motionManager
> motionManager: CubismMotionManager
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6906
Overrides
options
> options: InternalModelOptions
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6904
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: CubismParallelMotionManager[]
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6907
Overrides
InternalModel.parallelMotionManager
physics?
> optional physics?: CubismPhysics
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6912
Overrides
pixelsPerUnit
> readonly pixelsPerUnit: number
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6926
The model's internal scale, defined in the moc3 file.
pose?
> optional pose?: CubismPose
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6911
Overrides
renderer
> renderer: CubismRenderer_WebGL
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6913
settings
> settings: CubismModelSettings
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6903
Overrides
textureFlipY
> textureFlipY: boolean
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3190
Flags whether gl.UNPACK_FLIP_Y_WEBGL should be enabled when binding the textures.
Inherited from
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:6941
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:6953
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:6951
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:6952
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:6943
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:6944
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:6945
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:6942
Gets all the hit area definitions.
Returns
Normalized definitions.
Overrides
getIdSafe()
> protected getIdSafe(id): CubismId
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6933
Parameters
id
string | undefined
Returns
CubismId
getLayout()
> protected getLayout(): CommonLayout
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6938
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:6934
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:3222
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.
Inherited from
init()
> protected init(): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6932
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:6939
Sets up the model's size and local transform by the model's layout.
Returns
void
Overrides
update()
> update(dt, now): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6947
Updates the model's parameters.
Parameters
dt
number
Elapsed time in milliseconds from last frame.
now
number
Returns
void
Overrides
updateFacialEmotion()
> updateFacialEmotion(mouthForm): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6949
Parameters
mouthForm
number
Returns
void
updateFocus()
> updateFocus(): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6948
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:6950
Parameters
dt
number
_now
number
Returns
void
updateTransform()
> updateTransform(transform): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6946
Updates the model's transform.
Parameters
transform
Matrix
The world transform.
Returns
void
Overrides
updateWebGLContext()
> updateWebGLContext(gl, glContextID): void
Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:6940
Updates WebGL context bound to this model.
Parameters
gl
WebGLRenderingContext
WebGL context.
glContextID
number
Unique ID for given WebGL context.
Returns
void