@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 662 B
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
import{releaseMaybe as e}from"../../../../../core/maybe.js";import{isPromiseLike as t}from"../../../../../core/promiseUtils.js";class s{constructor(s,r){this._textures=s,this.loadPromise=null,this._disposed=!1;const i=this._textures.acquire(r);t(i)?(i.then((t=>{this._disposed?e(t):this._textureRef=t})),this.loadPromise=i):this._textureRef=i}dispose(){this._textureRef=e(this._textureRef),this._disposed=!0}get glTexture(){return null!=this._textureRef?this._textureRef.glTexture:null}}export{s as RenderTexture};