Permalink
Browse files
dirty fix for geometry without faces/vertices
- Loading branch information...
Showing
with
5 additions
and
1 deletion.
-
+5
−1
js/slacer/slicer.js
|
@@ -363,8 +363,12 @@ var SLAcer = SLAcer || {}; |
|
|
try {
|
|
|
var color = this.settings.color;
|
|
|
//var color = ((1<<24)*Math.random()|0);
|
|
|
+ var geo = new THREE.ShapeGeometry(shapes[key]);
|
|
|
+ if (!geo.faces.length || !geo.vertices.length) {
|
|
|
+ continue; // dirty fix, to do: find why?
|
|
|
+ }
|
|
|
meshes.push(new THREE.Mesh(
|
|
|
- new THREE.ShapeGeometry(shapes[key]),
|
|
|
+ geo,
|
|
|
new THREE.MeshBasicMaterial({
|
|
|
color: color, side: THREE.DoubleSide
|
|
|
})
|
|
|
0 comments on commit
f1b78f6