import type { Material } from "@babylonjs/core/Materials/material";
import type { Mesh } from "@babylonjs/core/Meshes/mesh";
import type { MorphTargetManager } from "@babylonjs/core/Morph/morphTargetManager";
import type { Nullable } from "@babylonjs/core/types";
import type { MmdModelMetadata } from "../../Loader/mmdModelMetadata";
import type { ILogger } from "../ILogger";
import type { IMmdMaterialProxyConstructor } from "../IMmdMaterialProxy";
import type { RuntimeMorph } from "../mmdMorphControllerBase";
import { MmdMorphControllerBase } from "../mmdMorphControllerBase";
import type { IWasmTypedArray } from "./IWasmTypedArray";
/**
 * The MmdWasmMorphController uses `MorphTargetManager` to handle position uv morphs, while the material, bone, and group morphs are handled by CPU bound
 *
 * bone morphs are handled by WASM
 *
 * As a result, it reproduces the behavior of the MMD morph system
 */
export declare class MmdWasmMorphController extends MmdMorphControllerBase {
    private readonly _wasmMorphWeights;
    private readonly _wasmMorphIndexMap;
    /**
     * Creates a new MmdWasmMorphController
     * @param wasmMorphWeights WASM side morph weights
     * @param wasmMorphIndexMap Mmd morph to WASM morph index map
     * @param materials MMD materials which are order of mmd metadata
     * @param meshes MMD meshes which are order of mmd metadata
     * @param materialProxyConstructor The constructor of `IMmdMaterialProxy`
     * @param morphsMetadata Morphs metadata
     * @param morphTargetManagers MorphTargetManagers
     * @param logger Logger
     */
    constructor(wasmMorphWeights: IWasmTypedArray<Float32Array>, wasmMorphIndexMap: Int32Array, materials: readonly Material[], meshes: readonly Mesh[], materialProxyConstructor: Nullable<IMmdMaterialProxyConstructor<Material>>, morphsMetadata: readonly MmdModelMetadata.Morph[], morphTargetManagers: MorphTargetManager[], logger: ILogger);
    /**
     * 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
     *
     * IMPORTANT: when wasm runtime using buffered evaluation, this method must be called before waiting for the WasmMmdRuntime.lock
     * otherwise, it can cause a datarace
     * @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
     *
     * IMPORTANT: when wasm runtime using buffere evaluation, this method with upadteWasm must be called before waiting for the WasmMmdRuntime.lock
     * otherwise, it can cause a datarace
     * @param morphIndex Index of the morph
     * @param weight Weight of the morph
     * @param updateWasm Whether to update the WASM side morph weight (default: true)
     */
    setMorphWeightFromIndex(morphIndex: number, weight: number, updateWasm?: boolean): void;
    /**
     * Set the weights of all morphs to 0
     *
     * IMPORTANT: when wasm runtime using buffered evaluation, this method must be called before waiting for the WasmMmdRuntime.lock
     * otherwise, it can cause a datarace
     */
    resetMorphWeights(): void;
    /**
     * Synchronize the morph weights to WASM side
     *
     * IMPORTANT: when wasm runtime using buffered evaluation, this method must be called before waiting for the WasmMmdRuntime.lock
     * otherwise, it can cause a datarace
     */
    syncWasmMorphWeights(): void;
    protected _resetBoneMorph(_morph: RuntimeMorph): void;
    protected _applyBoneMorph(_morph: RuntimeMorph, _weight: number): void;
    /**
     * @internal
     * Morph index map from js morph index to wasm morph index
     */
    get wasmMorphIndexMap(): ArrayLike<number>;
}
