import { CacheOptions, ContextManager, Event, Observable, Stream } from '@zcomponent/core'; import * as THREE from 'three'; import { Object3D } from '../Object3D'; interface GLTFConstructorProps { /** @zprop * @zvalues files *.+(glb|gltf) */ source: string; /** * @zprop * @zdefault false */ frustumCulled?: boolean; /** * If true, this component will store the downloaded GLTF model in IndexedDB, with a key held in session storage * to allow rapid reloading without relying on the browser cache. * @zignore */ sessionCache?: boolean; /** * Provides options for caching the downloaded GLTF model in page load, session or persistent storage. * @zignore */ cache?: CacheOptions; } /** * Loads a 3D model of the GLTF format (.glb or .gltf). * * Supports Draco compressed files. * * To override the materials of the model, place Material components as children of this component and set the `attachTo` property to the name of the material in the GLTF file. * * Other components can be attached to the model by using the `AttachmentPoint` component. Add `AttachmentPoint` components as children of this component and set the `attachTo` property to the name of the node in the GLTF file. * * Root element: [THREE.Group](https://threejs.org/docs/index.html?q=Grou#api/en/objects/Group) * * @zcomponent * @zgroup 3D Models * @zicon deployed_code * @ztag three/Object3D/GLTF * @ztag three/Object3D/AttachmentSource/GLTF * @ztag three/MaterialHost/GLTF * @zparents three/Object3D/Group/** */ export declare class GLTF extends Object3D { protected constructorProps: GLTFConstructorProps; onAnimationUpdate: Event<[]>; loaded: Promise; private _gltf; private _meshes; morphTargetMeshes: Observable>>, never>; mixer: Observable; animationClips: Observable, never>; nodesByName: Observable>, never>; materials: Observable>, never>; private _defaultMaterialsByMesh; /** * @zstreams animations */ streams: { [id: string]: Stream; }; constructor(contextManager: ContextManager, constructorProps: GLTFConstructorProps); private _updateAttachments; private _updateAttachmentPoints; private _load; /** * @zprop * @zgroup Appearance * @zgrouppriority 11 * @zdefault true */ castShadow: Observable; /** * @zprop * @zgroup Appearance * @zgrouppriority 11 * @zdefault true */ receiveShadow: Observable; dispose(): never; private _updateFrame; } export {};