three-to-cannon
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -306,3 +306,9 @@ var CANNON = require('cannon'), | ||
scale = new THREE.Vector3(); | ||
tmp = meshes[0].geometry.clone(); | ||
if (meshes[0].geometry instanceof THREE.BufferGeometry) { | ||
if (meshes[0].geometry.attributes.position) { | ||
tmp.fromBufferGeometry(meshes[0].geometry); | ||
} | ||
} else { | ||
tmp = meshes[0].geometry.clone(); | ||
} | ||
tmp.metadata = meshes[0].geometry.metadata; | ||
@@ -309,0 +315,0 @@ meshes[0].updateMatrixWorld(); |
{ | ||
"name": "three-to-cannon", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Convert a THREE.Mesh to a CANNON.Shape.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23197
621