UNPKG

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.

56 lines 1.9 kB
import { IMaterial } from './IMaterial'; import { Source, Texture, TextureEventMap } from 'three'; import { IRenderTarget } from '../rendering'; import { ChangeEvent, UiObjectConfig } from 'uiconfig.js'; import { IObject3D } from './IObject'; export interface ITextureUserData { mimeType?: string; embedUrlImagePreviews?: boolean; /** * Automatically dispose texture when not used by any material that's applied to some object in the scene. * Works only after it's applied to a material once. */ disposeOnIdle?: boolean; timeline?: { enabled: boolean; delay?: number; scale?: number; start?: number; end?: number; }; } export type ITextureEventMap = TextureEventMap; declare module 'three' { interface TextureEventMap { textureUpdate: { bubbleToObject?: boolean; bubbleToParent?: boolean; uiChangeEvent?: ChangeEvent; }; } } export interface ITexture<TE extends ITextureEventMap = ITextureEventMap> extends Texture<TE> { assetType?: 'texture'; userData: ITextureUserData; readonly isTexture: true; isDataTexture?: boolean; isCubeTexture?: boolean; isVideoTexture?: boolean; isCanvasTexture?: boolean; isCompressedTexture?: boolean; is3DDataTexture?: boolean; setDirty?(): void; source: Source & { _sourceImgBuffer?: ArrayBuffer | Uint8Array; _canSerialize?: boolean; }; /** * Objects/Materials in the scene that are using this texture. * This is set in the {@link Object3DManager} when the objects are added/removed from the scene. Do not modify this set directly. */ appliedObjects?: Set<IObject3D | IMaterial>; _target?: IRenderTarget; uiConfig?: UiObjectConfig; } export declare function upgradeTexture(this: ITexture): void; //# sourceMappingURL=ITexture.d.ts.map