UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 887 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{ViewingMode as e}from"../../../../../ViewingMode.js";import{RenderCommandEncoder as r}from"./RenderCommandEncoder.js";class t{constructor(r){this._idCounter=0,this._bufferWriters=new Map,this._dispatchRenderCommandsCallback=async()=>{},this.globalViewingMode=!1,this.globalViewingMode=r.viewingMode===e.Global,this._dispatchRenderCommandsCallback=r.dispatchRenderCommandsCallback}generateId(e=""){return`${e}${this._idCounter++}`}createEncoder(){return new r(this)}async dispatchRenderCommands(e,r){0!==e.length&&await this._dispatchRenderCommandsCallback(e,r)}registerRenderGeometryBufferWriter(e,r){this._bufferWriters.set(e,r)}getRenderGeometryBufferWriter(e){return this._bufferWriters.get(e)}}export{t as RenderCommandContext};