threepipe
Version:
A 3D viewer framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.
32 lines • 1.15 kB
TypeScript
import { IMaterial } from './IMaterial';
import { Source, Texture, TextureEventMap } from 'three';
import { IRenderTarget } from '../rendering';
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;
}
export type ITextureEventMap = TextureEventMap;
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;
};
_appliedMaterials?: Set<IMaterial>;
_target?: IRenderTarget;
}
export declare function upgradeTexture(this: ITexture): void;
//# sourceMappingURL=ITexture.d.ts.map