import { Matrix, Quaternion, Vector3 } from "@babylonjs/core/Maths/math.vector"; import type { Nullable } from "@babylonjs/core/types"; import type { MmdModelMetadata } from "../Loader/mmdModelMetadata"; import type { AppendTransformSolver } from "./appendTransformSolver"; import type { IIkSolver, IkSolver } from "./ikSolver"; import type { IMmdRuntimeLinkedBone } from "./IMmdRuntimeLinkedBone"; /** * Bone for MMD runtime * * For mmd runtime, it is necessary to override the bone system because it has a different implementation than the usual matrix update method * * Which requires the mmd runtime bone, which is the wrapper of the babylon.js bone */ export interface IMmdRuntimeBone { /** * The Babylon.js bone */ readonly linkedBone: IMmdRuntimeLinkedBone; /** * Name of the bone */ readonly name: string; /** * Parent bone */ readonly parentBone: Nullable; /** * Child bones */ readonly childBones: readonly IMmdRuntimeBone[]; /** * Transform order */ readonly transformOrder: number; /** * Bone flag * * @see PmxObject.Bone.Flag */ readonly flag: number; /** * Whether the bone transform is applied after physics */ readonly transformAfterPhysics: boolean; /** * IK solver */ readonly ikSolver: Nullable; } export declare class MmdRuntimeBone implements IMmdRuntimeBone { readonly linkedBone: IMmdRuntimeLinkedBone; readonly name: string; parentBone: Nullable; readonly childBones: MmdRuntimeBone[]; readonly transformOrder: number; readonly flag: number; readonly transformAfterPhysics: boolean; appendTransformSolver: Nullable; ikSolver: Nullable; readonly morphPositionOffset: Vector3; readonly morphRotationOffset: Quaternion; ikRotation: Nullable; readonly localMatrix: Matrix; readonly worldMatrix: Matrix; getAnimatedPositionToRef: (target: Vector3) => Vector3; getAnimatedRotationToRef: (target: Quaternion) => Quaternion; getAnimationPositionOffsetToRef: (target: Vector3) => Vector3; constructor(babylonBone: IMmdRuntimeLinkedBone, boneMetadata: MmdModelMetadata.Bone); private _getAnimatedPositionWithMorphToRef; private _getAnimatedPositionToRef; private _getAnimatedRotationToRef; private _getAnimatedRotationWithMorphToRef; private static readonly _TempVector3; private _getAnimationPositionOffsetToRef; private _getAnimationPositionOffsetWithMorphToRef; enableMorph(): void; disableMorph(): void; private static readonly _TempRotation; private static readonly _TempPosition; updateLocalMatrix(): void; private static readonly _Stack; updateWorldMatrix(): void; }