Expand description
Raw FFI bindings to the Live2D Cubism SDK Core (v5).
These bindings correspond to Live2DCubismCore.h (SDK v5).
All functions are unsafe — see the Cubism SDK documentation for usage.
§Memory Alignment
- Moc data must be aligned to
ALIGN_OF_MOC(64 bytes). - Model memory must be aligned to
ALIGN_OF_MODEL(16 bytes).
Structs§
- csmMoc
- Opaque Cubism moc handle.
- csmModel
- Opaque Cubism model handle.
- csmVector2
- 2-component vector (X, Y).
- csmVector4
- 4-component vector (X, Y, Z, W).
Constants§
- ALIGN_
OF_ MOC - Required alignment for moc memory (bytes).
- ALIGN_
OF_ MODEL - Required alignment for model memory (bytes).
- BLEND_
ADDITIVE - BLEND_
COLOR_ DID_ CHANGE - BLEND_
MULTIPLICATIVE - DRAW_
ORDER_ DID_ CHANGE - IS_
DOUBLE_ SIDED - IS_
INVERTED_ MASK - IS_
VISIBLE - MOC_
VERSION_ 30 - MOC_
VERSION_ 33 - MOC_
VERSION_ 40 - MOC_
VERSION_ 42 - MOC_
VERSION_ 50 - MOC_
VERSION_ 53 - MOC_
VERSION_ UNKNOWN - OPACITY_
DID_ CHANGE - PARAMETER_
TYPE_ BLEND_ SHAPE - PARAMETER_
TYPE_ NORMAL - RENDER_
ORDER_ DID_ CHANGE - VERTEX_
POSITIONS_ DID_ CHANGE - VISIBILITY_
DID_ CHANGE
Functions§
- csmGet
Drawable ⚠Blend Modes - SDK v5: explicit blend mode per drawable.
- csmGet
Drawable ⚠Constant Flags - csmGet
Drawable ⚠Count - csmGet
Drawable ⚠Draw Orders - csmGet
Drawable ⚠Dynamic Flags - csmGet
Drawable ⚠Ids - csmGet
Drawable ⚠Index Counts - csmGet
Drawable ⚠Indices - csmGet
Drawable ⚠Mask Counts - csmGet
Drawable ⚠Masks - csmGet
Drawable ⚠Multiply Colors - csmGet
Drawable ⚠Opacities - csmGet
Drawable ⚠Parent Part Indices - csmGet
Drawable ⚠Screen Colors - csmGet
Drawable ⚠Texture Indices - csmGet
Drawable ⚠Vertex Counts - csmGet
Drawable ⚠Vertex Positions - csmGet
Drawable ⚠Vertex Uvs - csmGet
Latest ⚠MocVersion - csmGet
LogFunction ⚠ - csmGet
MocVersion ⚠ - csmGet
Offscreen ⚠Blend Modes - csmGet
Offscreen ⚠Constant Flags - csmGet
Offscreen ⚠Count - csmGet
Offscreen ⚠Mask Counts - csmGet
Offscreen ⚠Masks - csmGet
Offscreen ⚠Multiply Colors - csmGet
Offscreen ⚠Opacities - csmGet
Offscreen ⚠Owner Indices - csmGet
Offscreen ⚠Screen Colors - csmGet
Parameter ⚠Count - csmGet
Parameter ⚠Default Values - csmGet
Parameter ⚠Ids - csmGet
Parameter ⚠KeyCounts - csmGet
Parameter ⚠KeyValues - csmGet
Parameter ⚠Maximum Values - csmGet
Parameter ⚠Minimum Values - csmGet
Parameter ⚠Repeats - csmGet
Parameter ⚠Types - csmGet
Parameter ⚠Values - csmGet
Part ⚠Count - csmGet
Part ⚠Ids - csmGet
Part ⚠Offscreen Indices - csmGet
Part ⚠Opacities - csmGet
Part ⚠Parent Part Indices - csmGet
Render ⚠Orders - SDK v5: model-level render orders (replaces csmGetDrawableRenderOrders).
- csmGet
Sizeof ⚠Model - csmGet
Version ⚠ - csmHas
MocConsistency ⚠ - csmInitialize
Model ⚠InPlace - csmRead
Canvas ⚠Info - csmReset
Drawable ⚠Dynamic Flags - csmRevive
MocIn ⚠Place - csmSet
LogFunction ⚠ - csmUpdate
Model ⚠
Type Aliases§
- csmFlags
- Bitfield flags.
- csmLog
Function - Log handler function pointer.
- csmMoc
Version - Moc file format version.
- csmParameter
Type - Parameter type.
- csmVersion
- Cubism version identifier.