UNPKG

@itwin/core-frontend

Version:
70 lines 3.1 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 { dispose, disposeArray } from "@itwin/core-bentley"; /** A set of [[RenderGraphic]]s and [[CanvasDecoration]]s produced by [[Tool]]s and [[Decorator]]s, used to decorate the contents of a [[Viewport]]. * @public * @extensions */ export class Decorations { _skyBox; _viewBackground; // drawn first, view units, with no zbuffer, smooth shading, default lighting. e.g., a skybox _normal; // drawn with zbuffer, with scene lighting _world; // drawn with zbuffer, with default lighting, smooth shading _worldOverlay; // drawn in overlay mode, world units _viewOverlay; // drawn in overlay mode, view units canvasDecorations; /** A view decoration created from a [[SkyBox]] rendered behind all other geometry to provide environmental context. */ get skyBox() { return this._skyBox; } set skyBox(skyBox) { dispose(this._skyBox); this._skyBox = skyBox; } /** A view decoration drawn as the background of the view. @see [[GraphicType.ViewBackground]]. */ get viewBackground() { return this._viewBackground; } set viewBackground(viewBackground) { dispose(this._viewBackground); this._viewBackground = viewBackground; } /** Decorations drawn as if they were part of the scene. @see [[GraphicType.Scene]]. */ get normal() { return this._normal; } set normal(normal) { disposeArray(this._normal); this._normal = normal; } /** Decorations drawn as if they were part of the world, but ignoring the view's [[ViewFlags]]. @see [[GraphicType.WorldDecoration]]. */ get world() { return this._world; } set world(world) { disposeArray(this._world); this._world = world; } /** Overlay decorations drawn in world coordinates. @see [[GraphicType.WorldOverlay]]. */ get worldOverlay() { return this._worldOverlay; } set worldOverlay(worldOverlay) { disposeArray(this._worldOverlay); this._worldOverlay = worldOverlay; } /** Overlay decorations drawn in view coordinates. @see [[GraphicType.ViewOverlay]]. */ get viewOverlay() { return this._viewOverlay; } set viewOverlay(viewOverlay) { disposeArray(this._viewOverlay); this._viewOverlay = viewOverlay; } [Symbol.dispose]() { this.skyBox = undefined; this.viewBackground = undefined; this.world = undefined; this.worldOverlay = undefined; this.viewOverlay = undefined; this.normal = undefined; } /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */ dispose() { this[Symbol.dispose](); } } //# sourceMappingURL=Decorations.js.map