UNPKG

@itwin/core-frontend

Version:
33 lines 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextureDrape = void 0; /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ /** @packageDocumentation * @module WebGL */ const core_bentley_1 = require("@itwin/core-bentley"); const core_geometry_1 = require("@itwin/core-geometry"); class TextureDrape { _texture; _projectionMatrix = core_geometry_1.Matrix4d.createIdentity(); get texture() { return this._texture; } get projectionMatrix() { return this._projectionMatrix; } get isReady() { return this._texture !== undefined; } collectStatistics(stats) { if (undefined !== this._texture) stats.addPlanarClassifier(this._texture.bytesUsed); } get isDisposed() { return undefined === this.texture; } [Symbol.dispose]() { this._texture = (0, core_bentley_1.dispose)(this._texture); } getParams(params) { params[0] = 5.0; // Inside, pure texture. params[1] = 0.0; // Outside, off. } } exports.TextureDrape = TextureDrape; //# sourceMappingURL=TextureDrape.js.map