UNPKG

@itwin/core-frontend

Version:
29 lines 1.19 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 WebGL */ import { dispose } from "@itwin/core-bentley"; import { Matrix4d } from "@itwin/core-geometry"; export class TextureDrape { _texture; _projectionMatrix = 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 = dispose(this._texture); } getParams(params) { params[0] = 5.0; // Inside, pure texture. params[1] = 0.0; // Outside, off. } } //# sourceMappingURL=TextureDrape.js.map