/** * BabylonVMD(BVMD) representation * prerequisite: frames are sorted by frameNumber * condition: all strings are 4 byte aligned * * signature: uint8[4] "BVMD" * version: uint8[3] - major, minor, patch * padding: uint8 - for align to 4 byte * sizeofheader: uint32 - size of header = 20(4 * 5) * { - if position is 0 then there is no data * positionToBoneTrack: uint32 - position(ptr) to boneTrackCount * positionToMovableBoneTrack: uint32 - position(ptr) to movableBoneTrackCount * positionToMorphTrack: uint32 - position(ptr) to morphTrackCount * positionToPropertyTrack: uint32 - position(ptr) to propertyFrameCount * positionToCameraTrack: uint32 - position(ptr) to cameraFrameCount * } * * boneTrackCount: uint32 * { * trackName: uint32, uint8[], uint8[0-3] - length, string, dynamicPadding * frameCount: uint32 * frameNumbers: uint32[frameCount] * rotations: float32[frameCount * 4] - [..., x, y, z, w, ...] * rotationInterpolations: uint8[frameCount * 4] - [..., x1, x2, y1, y2, ...] * physicsToggle: uint8[frameCount] - [..., physicsTogle, ...] * dynamicPadding: uint8[0-3] - for align physicsToggle to 4 byte * }[boneTrackCount] * * movableBoneTrackCount: uint32 * { * trackName: uint32, uint8[], uint8[0-3] - length, string, dynamicPadding * frameCount: uint32 * frameNumbers: uint32[frameCount] * positions: float32[frameCount * 3] - [..., x, y, z, ...] * positionInterpolations: uint8[frameCount * 12] - [..., x_x1, x_x2, x_y1, x_y2, y_x1, y_x2, y_y1, y_y2, z_x1, z_x2, z_y1, z_y2, ...] * rotations: float32[frameCount * 4] - [..., x, y, z, w, ...] * rotationInterpolations: uint8[frameCount * 4] - [..., x1, x2, y1, y2, ...] * physicsToggle: uint8[frameCount] - [..., physicsTogle, ...] * dynamicPadding: uint8[0-3] - for align physicsToggle to 4 byte * }[movableBoneTrackCount] * * morphTrackCount: uint32 * { * trackName: uint32, uint8[], uint8[0-3] - length, string, dynamicPadding * frameCount: uint32 * frameNumbers: uint32[frameCount] * weights: float32[frameCount] - [..., weight, ...] * }[morphTrackCount] * * propertyFrameCount: uint32 * frameNumbers: uint32[frameCount] * visibles: uint8[frameCount] - [..., visible, ...] * dynamicPadding: uint8[0-3] - for align visibles to 4 byte * ikBoneNameCount: uint32 * { * ikBoneName: uint32, uint8[], uint8[0-3] - length, string, dynamicPadding * ikState: uint8[frameCount] - [..., ikState, ...] * dynamicPadding: uint8[0-3] - for align ikState to 4 byte * }[ikBoneNameCount] * * cameraFrameCount: uint32 * frameNumbers: uint32[frameCount] * positions: float32[frameCount * 3] - [..., x, y, z, ...] * positionInterpolations: uint8[frameCount * 12] - [..., x_x1, x_x2, x_y1, x_y2, y_x1, y_x2, y_y1, y_y2, z_x1, z_x2, z_y1, z_y2, ...] * rotations: float32[frameCount * 3] - [..., x, y, z, ...] * rotationInterpolations: uint8[frameCount * 4] - [..., x1, x2, y1, y2, ...] * distances: float32[frameCount] - [..., distance, ...] * distanceInterpolations: uint8[frameCount * 4] - [..., x1, x2, y1, y2, ...] * fovs: float32[frameCount] - [..., fov, ...] * fovInterpolations: uint8[frameCount * 4] - [..., x1, x2, y1, y2, ...] */ import type { MmdAnimationBase } from "../Animation/mmdAnimationBase"; /** * BVMD converter */ export declare class BvmdConverter { private constructor(); /** * BVMD format version * [major, minor, patch] */ static readonly Version: readonly [3, 0, 0]; /** * Convert mmd animation to BVMD * @param animation mmd animation from VMD/BVMD * @returns converted BVMD */ static Convert(animation: MmdAnimationBase): ArrayBuffer; }