UNPKG

@xeokit/xeokit-sdk

Version:

3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision

39 lines (34 loc) 778 B
/** * A texture within a {@link SceneModelTextureSet}. * * * Created with {@link SceneModel#createTexture} * * Belongs to many {@link SceneModelTextureSet}s * * Stored by ID in {@link SceneModel#textures}} */ export class SceneModelTexture { /** * @private * @param cfg */ constructor(cfg) { /** * Unique ID of this SceneModelTexture. * * The SceneModelTexture is registered against this ID in {@link SceneModel#textures}. */ this.id = cfg.id; /** * @private */ this.texture = cfg.texture; } /** * @private */ destroy() { if (this.texture) { this.texture.destroy(); this.texture = null; } } }