three-to-cannon
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -257,5 +257,9 @@ var CANNON = require('cannon'), | ||
function createBoundingSphereShape (object, options) { | ||
if (options.sphereRadius) { | ||
return new CANNON.Sphere(options.sphereRadius); | ||
} | ||
var geometry = getGeometry(object); | ||
if (!geometry) return null; | ||
geometry.computeBoundingSphere(); | ||
return new CANNON.Sphere(options.sphereRadius || geometry.boundingSphere.radius); | ||
return new CANNON.Sphere(geometry.boundingSphere.radius); | ||
} | ||
@@ -262,0 +266,0 @@ |
{ | ||
"name": "three-to-cannon", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"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
23144
622