Commit 7c8e8a18 authored by Vlad Gaydukov's avatar Vlad Gaydukov
Browse files

fix find mesh

Showing with 6 additions and 2 deletions
+6 -2
......@@ -77,7 +77,7 @@
var cellGeometry = new THREE.BoxGeometry(0.95,0.95,0.95);
var cellMaterial = new THREE.MeshLambertMaterial({color: "green", transparent: true, opacity: 0.3})
var cellMaterial = new THREE.MeshLambertMaterial({color: "green", transparent: true, opacity: 0.2})
var matrix = new THREE.Matrix4();
for (var ch in AvvY.blockProps.properties.children) {
......@@ -100,7 +100,11 @@
if (child instanceof THREE.Mesh) {
return child
} else {
return findMesh(child.children)
child = findMesh(child.children)
if (child)
return child
else
continue
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment