UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.34 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{TextureWrapMode as r,SizedStencilFormat as e}from"../../../../../webgl/enums.js";import{FramebufferObject as s}from"../../../../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as t}from"../../../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as o}from"../../../../../webgl/TextureDescriptor.js";function i(i,h,u){const l=new o(h,u);return l.wrapMode=r.CLAMP_TO_EDGE,new s(i,l,new t(e.STENCIL_INDEX8,h,u))}class h{constructor(){this._width=void 0,this._height=void 0,this._resources=null}dispose(){this._resources&&(this._resources.sharedBlur1Fbo.dispose(),this._resources.sharedBlur2Fbo.dispose(),this._resources=null)}_initialize(r,e,s){this._width=e,this._height=s;const t=i(r,e,s),o=i(r,e,s);this._resources={sharedBlur1Fbo:t,sharedBlur2Fbo:o}}setup(r,e,s){!this._resources||this._width===e&&this._height===s||this.dispose(),this._resources||this._initialize(r,e,s)}get sharedBlur1Tex(){return this._resources.sharedBlur1Fbo.colorTexture}get sharedBlur1Fbo(){return this._resources.sharedBlur1Fbo}get sharedBlur2Tex(){return this._resources.sharedBlur2Fbo.colorTexture}get sharedBlur2Fbo(){return this._resources.sharedBlur2Fbo}}export{h as default};