import { TypeToken } from '@gglib/utils'; import { Mat4, BoundingSphere } from '@gglib/math'; import { Device } from '../Device'; import { AnimationData } from '../AnimationData'; import { AnimationPlayer } from '../AnimationPlayer'; import { ModelSkin } from './ModelSkin'; import { ModelMeshOptions, ModelMesh } from './ModelMesh'; import { ModelNode } from './ModelNode'; import { ModelPose } from './ModelPose'; import { ModelNodeHierarchy } from './ModelNodeHierarchy'; /** * @public */ export interface ModelOptions { /** * The user defined name of the model */ name?: string; /** * Collection of meshes */ meshes?: Array; /** * Model animation data */ animations?: AnimationData[]; /** * Collection of skins */ skins?: ModelSkin[]; /** * Scene nodes */ nodes?: ModelNode[]; /** * Indices of the root nodes */ roots?: number[]; /** * Collection of cameras to preview this model */ cameras?: any[]; } /** * @public */ export declare class Model { /** * A symbol identifying the `Model[]` type. */ static readonly Array: TypeToken; /** * A symbol identifying the `ModelOptions` type. */ static readonly Options: TypeToken; /** * A symbol identifying the `ModelOptions[]` type. */ static readonly OptionsArray: TypeToken; /** * Autmatically generated unique identifier */ readonly uid: string; /** * The graphics device */ readonly device: Device; /** * Collection of meshes */ readonly meshes: ReadonlyArray; /** * Collection of skins */ readonly skins: ReadonlyArray; /** * The node hierarchy */ readonly hierarchy: ModelNodeHierarchy; /** * Model animation data */ readonly animations?: ReadonlyArray; /** * Collection of cameras to preview this model */ readonly cameras?: ReadonlyArray; private player; private pose; constructor(device: Device, options: ModelOptions); /** * Simply iterates over all meshes and renders each with its assigned material * * @remarks * This ignores the model nodes and just calls `draw()` for each mesh. */ draw(): Model; getAbsoluteBoundingSphere(transforms?: ReadonlyArray): BoundingSphere; getPose(options?: { copy?: boolean; }): ModelPose; getAnimationPlayer(options?: { copy?: boolean; }): AnimationPlayer | null; } //# sourceMappingURL=Model.d.ts.map