this.cache = dojox.gfx3d.scheduler.bsp(this.cache, function(it){ return it; }); if(this.shape){ this.shape.clear(); }else{ this.shape = this.renderer.createGroup(); } // using naive iteration to speed things up a bit by avoiding function call overhead for(var x=0; x<this.cache.length; x++){ this.shape.createPolyline(this.cache[x]) .setStroke(this.strokeStyle) .setFill(this.toStdFill(lighting, dojox.gfx3d.vector.normalize(this.cache[x]))); } /* dojo.forEach(this.cache, function(item){ this.shape.createPolyline(item) .setStroke(this.strokeStyle) .setFill(this.toStdFill(lighting, dojox.gfx3d.vector.normalize(item))); }, this); */