babylon-mmd
Version:
babylon.js mmd loader and runtime
29 lines (28 loc) • 1.28 kB
TypeScript
import type { IRuntimeMorph } from "./mmdMorphControllerBase";
import { MmdMorphControllerBase } from "./mmdMorphControllerBase";
/**
* The MmdMorphController uses `MorphTargetManager` to handle position uv morphs, while the material, bone, and group morphs are handled by CPU bound
*
* As a result, it reproduces the behavior of the MMD morph system
*/
export declare class MmdMorphController extends MmdMorphControllerBase {
/**
* Sets the weight of the morph
*
* If there are multiple morphs with the same name, all of them will be set to the same weight, this is the behavior of MMD
* @param morphName Name of the morph
* @param weight Weight of the morph
*/
setMorphWeight(morphName: string, weight: number): void;
/**
* Sets the weight of the morph from the index
*
* This method is faster than `setMorphWeight` because it does not need to search the morphs with the given name
* @param morphIndex Index of the morph
* @param weight Weight of the morph
*/
setMorphWeightFromIndex(morphIndex: number, weight: number): void;
protected _resetBoneMorph(morph: IRuntimeMorph): void;
private readonly _tempQuaternion;
protected _applyBoneMorph(morph: IRuntimeMorph, weight: number): void;
}