UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 452 B
import{MaterialChangeSet as e}from"./ChangeSet.js";function r(r){const n=new Map,o=r=>{let t=n.get(r);return t||(t=new e,n.set(r,t)),t};return r.removes.forAll((e=>{t(e)&&o(e.material).removes.push(e)})),r.adds.forAll((e=>{t(e)&&o(e.material).adds.push(e)})),r.updates.forAll((e=>{t(e.renderGeometry)&&o(e.renderGeometry.material).updates.push(e)})),n}function t(e){return e.geometry.indexCount>=1}export{r as splitRenderGeometryChangeSetByMaterial};