play with incremental rendering
This commit is contained in:
parent
3edf74f027
commit
962ac81865
2 changed files with 22 additions and 0 deletions
|
|
@ -44,6 +44,16 @@
|
|||
this.show();
|
||||
for (let i=0, s=this.slices, len=s.length; i<len; i++) {
|
||||
s[i].visible = i >= newMin && i <= newMax;
|
||||
if (s[i].visible) this.lastVis = s[i];
|
||||
}
|
||||
}
|
||||
|
||||
setLastFraction(frac = 1) {
|
||||
for (let mesh of this.lastVis.children) {
|
||||
let geo = mesh.geometry;
|
||||
let pos = geo.attributes.position;
|
||||
let len = frac === 1 ? Infinity : Math.round(pos.count * frac);
|
||||
geo.setDrawRange(0, len);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue