this.cache = dojox.gfx3d.scheduler.bsp(this.cache, function(it){ return it; }); // only the last 3 polys are visible. var cache = this.cache.slice(3); if(this.shape){ this.shape.clear(); }else{ this.shape = this.renderer.createGroup(); } for(var x=0; x<cache.length; x++){ this.shape.createPolyline(cache[x]) .setStroke(this.strokeStyle) .setFill(this.toStdFill(lighting, dojox.gfx3d.vector.normalize(cache[x]))); } /* dojo.forEach(cache, function(item){ this.shape.createPolyline(item) .setStroke(this.strokeStyle) .setFill(this.toStdFill(lighting, dojox.gfx3d.vector.normalize(item))); }, this); */