threepipe
Version:
A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.
86 lines • 2.83 kB
TypeScript
import { IGeometry, IMaterial, IObject3D, ITexture } from '../core';
import { IObjectExtension } from '../core/IObject';
import { EventDispatcher, VideoTexture } from 'three';
import { ViewerTimeline } from '../utils/ViewerTimeline';
export interface Object3DManagerEventMap {
'videoAdd': {
video: VideoTexture & ITexture;
};
'videoRemove': {
video: VideoTexture & ITexture;
};
'objectAdd': {
object: IObject3D;
};
'objectRemove': {
object: IObject3D;
};
'materialAdd': {
material: IMaterial;
};
'materialRemove': {
material: IMaterial;
};
'geometryAdd': {
geometry: IGeometry;
};
'geometryRemove': {
geometry: IGeometry;
};
'textureAdd': {
texture: ITexture;
};
'textureRemove': {
texture: ITexture;
};
'dispose': object;
}
export declare class Object3DManager extends EventDispatcher<Object3DManagerEventMap> {
private _root;
private _objects;
private _objectExtensions;
private _materials;
private _geometries;
private _textures;
private _videos;
getVideos(): (VideoTexture & ITexture<import('three').TextureEventMap>)[];
autoDisposeTextures: boolean;
autoDisposeMaterials: boolean;
autoDisposeGeometries: boolean;
autoDisposeObjects: boolean;
constructor();
onPostFrame(time: ViewerTimeline): void;
setRoot(root: IObject3D): void;
registerObject(obj: IObject3D): void;
unregisterObject(obj: IObject3D): boolean;
private _rootChanged;
registerObjectExtension(ext: IObjectExtension): void;
unregisterObjectExtension(ext: IObjectExtension): void;
private _registerMaterials;
private _unregisterMaterials;
private _registerMaterial;
private _unregisterMaterial;
private _registerGeometry;
private _unregisterGeometry;
private _registerTexture;
private _unregisterTexture;
private _registerVideo;
findObject(nameOrUuid: string): IObject3D | undefined;
findObjectsByName(name: string): IObject3D[];
findMaterial(nameOrUuid: string): IMaterial | undefined;
findMaterialsByName(name: string): IMaterial[];
dispose(): void;
static readonly MaterialTextureProperties: Set<string>;
static readonly MaterialTexturePropertiesUserData: Set<string>;
static GetMapsForMaterial(material: IMaterial): Set<ITexture<import('three').TextureEventMap>>;
static readonly SceneTextureProperties: Set<string>;
static readonly Object3DTextureProperties: Set<string>;
static GetMapsForObject3D(object: IObject3D): Set<ITexture<import('three').TextureEventMap>>;
private static _addMap;
}
declare module 'three' {
interface VideoTexture {
_playid?: number;
}
}
//# sourceMappingURL=Object3DManager.d.ts.map