import type { IMmdAnimationTrack, IMmdBoneAnimationTrack, IMmdMorphAnimationTrack, IMmdMovableBoneAnimationTrack, IMmdPropertyAnimationTrack } from "../../../Loader/Animation/IMmdAnimationTrack"; import type { IMmdWasmInstance } from "../mmdWasmInstance"; /** * MMD WASM animation track base class */ export declare abstract class MmdWasmAnimationTrack implements IMmdAnimationTrack { /** * Track type */ readonly trackType: string; /** * Track name for bind to model's bone/morph */ readonly name: string; private readonly _frameNumbers; /** * Frame numbers of this track * * The frame numbers must be sorted in ascending order * * Repr: [..., frameNumber, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get frameNumbers(): Uint32Array; /** * Create a new `MmdWasmAnimationTrack` instance * @param trackType Track type * @param trackName Track name for bind to model * @param frameCount Frame count of this track * @param wasmInstance MMD WASM instance * @param byteOffset Byte offset of frame numbers in wasm memory */ constructor(trackType: string, trackName: string, frameCount: number, wasmInstance: IMmdWasmInstance, byteOffset: number); /** * The start frame of this animation */ get startFrame(): number; /** * The end frame of this animation * * If mmdAnimationTrack.validate() is false, the return value is not valid */ get endFrame(): number; } /** * MMD WASM bone animation track * * Contains bone rotation and rotation cubic interpolation data */ export declare class MmdWasmBoneAnimationTrack extends MmdWasmAnimationTrack implements IMmdBoneAnimationTrack { private readonly _rotations; /** * Bone rotation data in quaternion * * The rotation data must be sorted by frame number in ascending order * * Repr: [..., x, y, z, w, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get rotations(): Float32Array; private readonly _rotationInterpolations; /** * Rotation cubic interpolation data * * The rotation interpolation data must be sorted by frame number in ascending order * * Repr: [..., x1, x2, y1, y2, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get rotationInterpolations(): Uint8Array; private readonly _physicsToggles; /** * Physics toggle data * * The physics toggle data must be sorted by frame number in ascending order * * If the value is 1, the bone will be driven by physics, * if the value is 0, the bone will not be driven by animation * * Repr: [..., physicsToggle, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get physicsToggles(): Uint8Array; /** * Create a new `MmdBoneAnimationTrack` instance * @param trackName track name for bind to model's bone * @param frameCount frame count of this track * @param wasmInstance MMD WASM instance * @param frameNumberByteOffset Byte offset of frame numbers in wasm memory * @param rotationByteOffset Byte offset of rotations in wasm memory * @param rotationInterpolationByteOffset Byte offset of rotation interpolations in wasm memory * @param physicsToggleByteOffset Byte offset of physics toggles in wasm memory */ constructor(trackName: string, frameCount: number, wasmInstance: IMmdWasmInstance, frameNumberByteOffset: number, rotationByteOffset: number, rotationInterpolationByteOffset: number, physicsToggleByteOffset: number); } /** * MMD WASM movable bone animation track * * Contains bone position, rotation and position/rotation cubic interpolation data */ export declare class MmdWasmMovableBoneAnimationTrack extends MmdWasmAnimationTrack implements IMmdMovableBoneAnimationTrack { private readonly _positions; /** * Bone position data in vector3 * * The position data must be sorted by frame number in ascending order * * Repr: [..., x, y, z, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get positions(): Float32Array; private readonly _positionInterpolations; /** * Position cubic interpolation data * * The position interpolation data must be sorted by frame number in ascending order * * Repr: [..., x_x1, x_x2, x_y1, x_y2, y_x1, y_x2, y_y1, y_y2, z_x1, z_x2, z_y1, z_y2, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get positionInterpolations(): Uint8Array; private readonly _rotations; /** * Bone rotation data in quaternion * * The rotation data must be sorted by frame number in ascending order * * Repr: [..., x, y, z, w, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get rotations(): Float32Array; private readonly _rotationInterpolations; /** * Rotation cubic interpolation data * * The rotation interpolation data must be sorted by frame number in ascending order * * Repr: [..., x1, x2, y1, y2, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get rotationInterpolations(): Uint8Array; private readonly _physicsToggles; /** * Physics toggle data * * The physics toggle data must be sorted by frame number in ascending order * * If the value is 1, the bone will be driven by physics, * if the value is 0, the bone will not be driven by animation * * Repr: [..., physicsToggle, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get physicsToggles(): Uint8Array; /** * Create a new `MmdMovableBoneAnimationTrack` instance * @param trackName Track name for bind to model's bone * @param frameCount Frame count of this track * @param wasmInstance MMD WASM instance * @param frameNumberByteOffset Byte offset of frame numbers in wasm memory * @param positionByteOffset Byte offset of positions in wasm memory * @param positionInterpolationByteOffset Byte offset of position interpolations in wasm memory * @param rotationByteOffset Byte offset of rotations in wasm memory * @param rotationInterpolationByteOffset Byte offset of rotation interpolations in wasm memory * @param physicsToggleByteOffset Byte offset of physics toggles in wasm memory */ constructor(trackName: string, frameCount: number, wasmInstance: IMmdWasmInstance, frameNumberByteOffset: number, positionByteOffset: number, positionInterpolationByteOffset: number, rotationByteOffset: number, rotationInterpolationByteOffset: number, physicsToggleByteOffset: number); } /** * MMD WASM morph animation track * * Contains morph weight data * * Weight data will be linear interpolated so there is no interpolation data */ export declare class MmdWasmMorphAnimationTrack extends MmdWasmAnimationTrack implements IMmdMorphAnimationTrack { private readonly _weights; /** * Morph weight data * * The weight data must be sorted by frame number in ascending order * * Repr: [..., weight, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ get weights(): Float32Array; /** * Create a new `MmdMorphAnimationTrack` instance * @param trackName Track name for bind to model's morph * @param frameCount Frame count of this track * @param wasmInstance MMD WASM instance * @param frameNumberByteOffset Byte offset of frame numbers in arrayBuffer * @param weightByteOffset Byte offset of weights in arrayBuffer */ constructor(trackName: string, frameCount: number, wasmInstance: IMmdWasmInstance, frameNumberByteOffset: number, weightByteOffset: number); } /** * MMD WASM property animation track * * Contains visibility and ik state data * * Visibility and ik state will be step interpolated */ export declare class MmdWasmPropertyAnimationTrack extends MmdWasmAnimationTrack implements IMmdPropertyAnimationTrack { /** * Visibility data * * The visibility data must be sorted by frame number in ascending order * * Repr: [..., visible, ...] */ readonly visibles: Uint8Array; /** * IK bone names * * Repr: [..., ikBoneName, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope */ readonly ikBoneNames: readonly string[]; private readonly _ikStates; /** * Create a new `MmdPropertyAnimationTrack` instance * @param frameCount Frame count of this track * @param ikBoneCount IK bone count of this track * @param wasmInstance MMD WASM instance * @param frameNumberByteOffset Byte offset of frame numbers in wasm memory * @param visibles Visibilities data * @param ikStateByteOffsets Byte offsets of IK states in wasm memory */ constructor(frameCount: number, ikBoneNames: readonly string[], wasmInstance: IMmdWasmInstance, frameNumberByteOffset: number, visibles: Uint8Array, ikStateByteOffsets: number[]); /** * Get nth bone IK state data * * The IK state data must be sorted by frame number in ascending order * * Repr: [..., ikState, ...] * * This array reference should not be copied elsewhere and must be read and written with minimal scope * @param n Ik bone index * @returns IK state key frame values */ getIkState(n: number): Uint8Array; }