UNPKG

@vrame/xeokit-sdk

Version:

3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision

27 lines (21 loc) 614 B
import {VBORenderer} from "./../../../VBORenderer.js"; /** * @private */ export class VBOInstancingPointsRenderer extends VBORenderer { constructor(scene, withSAO) { super(scene, withSAO, {instancing: true}); } _draw(drawCfg) { const {gl} = this._scene.canvas; const { state, frameCtx, incrementDrawState, } = drawCfg; gl.drawArraysInstanced(gl.POINTS, 0, state.positionsBuf.numItems, state.numInstances); if (incrementDrawState) { frameCtx.drawArrays++; } } }