UNPKG

@itwin/core-frontend

Version:
74 lines 3.35 kB
"use strict"; /*--------------------------------------------------------------------------------------------- * 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 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Decorations = void 0; const core_bentley_1 = require("@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 */ 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) { (0, core_bentley_1.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) { (0, core_bentley_1.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) { (0, core_bentley_1.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) { (0, core_bentley_1.disposeArray)(this._world); this._world = world; } /** Overlay decorations drawn in world coordinates. @see [[GraphicType.WorldOverlay]]. */ get worldOverlay() { return this._worldOverlay; } set worldOverlay(worldOverlay) { (0, core_bentley_1.disposeArray)(this._worldOverlay); this._worldOverlay = worldOverlay; } /** Overlay decorations drawn in view coordinates. @see [[GraphicType.ViewOverlay]]. */ get viewOverlay() { return this._viewOverlay; } set viewOverlay(viewOverlay) { (0, core_bentley_1.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](); } } exports.Decorations = Decorations; //# sourceMappingURL=Decorations.js.map