UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

33 lines 1.67 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ /** @packageDocumentation * @module Rendering */ import { RenderTexture } from "../RenderTexture"; /** Parameters used to construct a [[RenderTexture]] in old RenderTexture functions. * Use RenderSystem.createTexture and CreateTextureArgs instead. * @internal */ export class RenderTextureParams { /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element. * Textures created on the front-end generally have no key. */ key; /** Indicates the type of texture. */ type; /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately. * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed. */ isOwned; constructor(key, type = RenderTexture.Type.Normal, isOwned = false) { this.key = key; this.type = type; this.isOwned = isOwned; } get isTileSection() { return RenderTexture.Type.TileSection === this.type; } get isGlyph() { return RenderTexture.Type.Glyph === this.type; } get isSkyBox() { return RenderTexture.Type.SkyBox === this.type; } } //# sourceMappingURL=RenderTextureParams.js.map