(mesh)
| 97 | } |
| 98 | |
| 99 | getCenterPoint(mesh) { |
| 100 | const middle = new Vector3(); |
| 101 | const geometry = mesh.geometry; |
| 102 | |
| 103 | geometry.computeBoundingBox(); |
| 104 | |
| 105 | middle.x = (geometry.boundingBox.max.x + geometry.boundingBox.min.x) / 2; |
| 106 | middle.y = (geometry.boundingBox.max.y + geometry.boundingBox.min.y) / 2; |
| 107 | middle.z = (geometry.boundingBox.max.z + geometry.boundingBox.min.z) / 2; |
| 108 | |
| 109 | mesh.localToWorld( middle ); |
| 110 | |
| 111 | return middle; |
| 112 | } |
| 113 | |
| 114 | nodesToShape( nodes ){ |
| 115 | const shape = new Shape(); |