import type { IMmdAnimationTrack, IMmdBoneAnimationTrack, IMmdMorphAnimationTrack, IMmdMovableBoneAnimationTrack, IMmdPropertyAnimationTrack } from "./IMmdAnimationTrack"; /** * MMD animation track base class */ export declare abstract class MmdAnimationTrack implements IMmdAnimationTrack { /** * Track type */ readonly trackType: string; /** * Track name for bind to model's bone/morph */ readonly name: string; /** * Frame numbers of this track * * The frame numbers must be sorted in ascending order * * Repr: [..., frameNumber, ...] */ readonly frameNumbers: Uint32Array; /** * Create a new `MmdAnimationTrack` instance * @param trackType Track type * @param trackName Track name for bind to model * @param frameCount Frame count of this track * @param arrayBuffer ArrayBuffer for zero-copy initialization * @param byteOffset Byte offset of frame numbers in arrayBuffer */ constructor(trackType: string, trackName: string, frameCount: number, arrayBuffer?: ArrayBufferLike, byteOffset?: number); /** * Check if all frame numbers are valid(sorted) * @returns true if all frame numbers are valid */ validate(): boolean; /** * 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 bone animation track * * Contains bone rotation and rotation cubic interpolation data */ export declare class MmdBoneAnimationTrack extends MmdAnimationTrack implements IMmdBoneAnimationTrack { /** * Bone rotation data in quaternion * * The rotation data must be sorted by frame number in ascending order * * Repr: [..., x, y, z, w, ...] */ readonly rotations: Float32Array; /** * Rotation cubic interpolation data * * The rotation interpolation data must be sorted by frame number in ascending order * * Repr: [..., x1, x2, y1, y2, ...] */ readonly rotationInterpolations: Uint8Array; /** * Physics toggles data * * The physics toggles 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, ...] */ readonly 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 arrayBuffer ArrayBuffer for zero-copy initialization * @param frameNumberByteOffset Byte offset of frame numbers in arrayBuffer * @param rotationByteOffset Byte offset of rotations in arrayBuffer * @param rotationInterpolationByteOffset Byte offset of rotation interpolations in arrayBuffer * @param physicsToggleByteOffset Byte offset of physics toggles in arrayBuffer */ constructor(trackName: string, frameCount: number, arrayBuffer?: ArrayBufferLike, frameNumberByteOffset?: number, rotationByteOffset?: number, rotationInterpolationByteOffset?: number, physicsToggleByteOffset?: number); } /** * MMD movable bone animation track * * Contains bone position, rotation and position/rotation cubic interpolation data */ export declare class MmdMovableBoneAnimationTrack extends MmdAnimationTrack implements IMmdMovableBoneAnimationTrack { /** * Bone position data in vector3 * * The position data must be sorted by frame number in ascending order * * Repr: [..., x, y, z, ...] */ readonly positions: Float32Array; /** * 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, ...] */ readonly positionInterpolations: Uint8Array; /** * Bone rotation data in quaternion * * The rotation data must be sorted by frame number in ascending order * * Repr: [..., x, y, z, w, ...] */ readonly rotations: Float32Array; /** * Rotation cubic interpolation data * * The rotation interpolation data must be sorted by frame number in ascending order * * Repr: [..., x1, x2, y1, y2, ...] */ readonly rotationInterpolations: Uint8Array; /** * Physics toggles data * * The physics toggles 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, ...] */ readonly 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 arrayBuffer ArrayBuffer for zero-copy initialization * @param frameNumberByteOffset Byte offset of frame numbers in arrayBuffer * @param positionByteOffset Byte offset of positions in arrayBuffer * @param positionInterpolationByteOffset Byte offset of position interpolations in arrayBuffer * @param rotationByteOffset Byte offset of rotations in arrayBuffer * @param rotationInterpolationByteOffset Byte offset of rotation interpolations in arrayBuffer * @param physicsToggleByteOffset Byte offset of physics toggles in arrayBuffer */ constructor(trackName: string, frameCount: number, arrayBuffer?: ArrayBufferLike, frameNumberByteOffset?: number, positionByteOffset?: number, positionInterpolationByteOffset?: number, rotationByteOffset?: number, rotationInterpolationByteOffset?: number, physicsToggleByteOffset?: number); } /** * MMD morph animation track * * Contains morph weight data * * Weight data will be linear interpolated so there is no interpolation data */ export declare class MmdMorphAnimationTrack extends MmdAnimationTrack implements IMmdMorphAnimationTrack { /** * Morph weight data * * The weight data must be sorted by frame number in ascending order * * Repr: [..., weight, ...] */ readonly 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 arrayBuffer ArrayBuffer for zero-copy initialization * @param frameNumberByteOffset Byte offset of frame numbers in arrayBuffer * @param weightByteOffset Byte offset of weights in arrayBuffer */ constructor(trackName: string, frameCount: number, arrayBuffer?: ArrayBufferLike, frameNumberByteOffset?: number, weightByteOffset?: number); } /** * MMD camera animation track * * Contains camera position, rotation, distance, fov and their cubic interpolation data */ export declare class MmdCameraAnimationTrack extends MmdAnimationTrack { /** * Camera position data in vector3 * * The position data must be sorted by frame number in ascending order * * Repr: [..., x, y, z, ...] */ readonly positions: Float32Array; /** * 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, ...] */ readonly positionInterpolations: Uint8Array; /** * Camera rotation data in yaw/pitch/roll * * The rotation data must be sorted by frame number in ascending order * * Repr: [..., x, y, z, ...] */ readonly rotations: Float32Array; /** * Rotation cubic interpolation data * * The rotation interpolation data must be sorted by frame number in ascending order * * Repr: [..., x1, x2, y1, y2, ...] */ readonly rotationInterpolations: Uint8Array; /** * Camera distance data * * The distance data must be sorted by frame number in ascending order * * Repr: [..., distance, ...] */ readonly distances: Float32Array; /** * Distance cubic interpolation data * * The distance interpolation data must be sorted by frame number in ascending order * * Repr: [..., x1, x2, y1, y2, ...] */ readonly distanceInterpolations: Uint8Array; /** * Camera fov data in degrees * * The fov data must be sorted by frame number in ascending order * * Repr: [..., fov, ...] */ readonly fovs: Float32Array; /** * Fov cubic interpolation data * * The fov interpolation data must be sorted by frame number in ascending order * * Repr: [..., x1, x2, y1, y2, ...] */ readonly fovInterpolations: Uint8Array; /** * Create a new `MmdCameraAnimationTrack` instance * @param frameCount Frame count of this track * @param arrayBuffer ArrayBuffer for zero-copy initialization * @param frameNumberByteOffset Byte offset of frame numbers in arrayBuffer * @param positionByteOffset Byte offset of positions in arrayBuffer * @param positionInterpolationByteOffset Byte offset of position interpolations in arrayBuffer * @param rotationByteOffset Byte offset of rotations in arrayBuffer * @param rotationInterpolationByteOffset Byte offset of rotation interpolations in arrayBuffer * @param distanceByteOffset Byte offset of distances in arrayBuffer * @param distanceInterpolationByteOffset Byte offset of distance interpolations in arrayBuffer * @param fovByteOffset Byte offset of fovs in arrayBuffer * @param fovInterpolationByteOffset Byte offset of fov interpolations in arrayBuffer */ constructor(frameCount: number, arrayBuffer?: ArrayBufferLike, frameNumberByteOffset?: number, positionByteOffset?: number, positionInterpolationByteOffset?: number, rotationByteOffset?: number, rotationInterpolationByteOffset?: number, distanceByteOffset?: number, distanceInterpolationByteOffset?: number, fovByteOffset?: number, fovInterpolationByteOffset?: number); } /** * MMD property animation track * * Contains visibility and ik state data * * Visibility and ik state will be step interpolated */ export declare class MmdPropertyAnimationTrack extends MmdAnimationTrack 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, ...] */ 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 arrayBuffer ArrayBuffer for zero-copy initialization * @param frameNumberByteOffset Byte offset of frame numbers in arrayBuffer * @param visibleByteOffset Byte offset of visibilities in arrayBuffer * @param ikStateByteOffsets Byte offsets of IK states in arrayBuffer */ constructor(frameCount: number, ikBoneNames: readonly string[], arrayBuffer?: ArrayBufferLike, frameNumberByteOffset?: number, visibleByteOffset?: number, ikStateByteOffsets?: number[]); /** * Get nth bone IK state data * * The IK state data must be sorted by frame number in ascending order * * Repr: [..., ikState, ...] * @param n Ik bone index * @returns IK state key frame values */ getIkState(n: number): Uint8Array; }