import type * as THREEType from 'three';
import type { BoxelDefinition } from '@playdrop/boxel-core';
import type { BoxelSceneResult } from './types.js';
import type { BuildSkinnedMeshResult } from './skinned-mesh.js';
export type InstantiateEntityObject3DMode = 'hierarchy' | 'merged' | 'skinned';
interface InstantiateBaseResult {
    mode: InstantiateEntityObject3DMode;
    dispose(): void;
}
export interface InstantiateHierarchyResult extends InstantiateBaseResult {
    mode: 'hierarchy';
    object: THREEType.Group;
    scene: BoxelSceneResult;
    clips: THREEType.AnimationClip[];
    findNode(nodeId: string): THREEType.Object3D | undefined;
    forEachNode(visitor: (node: THREEType.Object3D, nodeId: string) => void): void;
}
export interface InstantiateMergedResult extends InstantiateBaseResult {
    mode: 'merged';
    object: THREEType.Group;
}
export interface InstantiateSkinnedResult extends InstantiateBaseResult {
    mode: 'skinned';
    object: THREEType.SkinnedMesh;
    skeleton: THREEType.Skeleton;
    boneMap: Map<string, THREEType.Bone>;
    clips: THREEType.AnimationClip[];
    stats: BuildSkinnedMeshResult['stats'];
    warnings: string[];
    findBone(nodeId: string): THREEType.Bone | undefined;
    forEachBone(visitor: (bone: THREEType.Bone, nodeId: string) => void): void;
}
export type InstantiateEntityObject3DResult = InstantiateHierarchyResult | InstantiateMergedResult | InstantiateSkinnedResult;
export interface InstantiateEntityObject3DOptions {
    THREE: typeof THREEType;
    entity: BoxelDefinition;
    mode?: InstantiateEntityObject3DMode;
}
export declare function instantiateEntityObject3D(options: InstantiateEntityObject3DOptions): InstantiateEntityObject3DResult;
export {};
