@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.12 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{glLayout as e}from"../../../support/buffer/glUtil.js";import{GLMaterials as t}from"../GLMaterials.js";import{VertexArrayObject as r}from"../VertexArrayObject.js";import{VertexBuffer as s}from"../../../../webgl/VertexBuffer.js";class o{constructor(o,i){this.geometry=i;const n=o.renderContext.rctx,m=i.renderGeometry,{material:a,layout:u,buffer:l}=m;this._materials=o.materials,a.setParameters({instancedDoublePrecision:!0}),this.glMaterials=new t(a,this._materials),this.vbo=new s(n,e(u),l),this.vao=new r(n,this.vbo)}destroy(){this.glMaterials.dispose(),this.vbo.dispose(),this.vao.dispose()}get material(){return this.geometry.renderGeometry.material}get layout(){return this.geometry.renderGeometry.layout}get boundingInfo(){return this.geometry.boundingInfo}get numTriangles(){return this.numVertices/3}get numVertices(){return this.geometry.renderGeometry.numVertices}get usedMemory(){return 128+this.vbo.usedMemory+this.vao.usedMemory}intersect(e,t,r,s,o,i,n,m){return this.geometry.intersect(e,t,r,s,o,i,n,m)}}export{o as LodComponentData};