three-to-cannon
Advanced tools
Comparing version 1.0.2 to 1.0.3
16
index.js
@@ -174,2 +174,10 @@ var CANNON = require('cannon'), | ||
); | ||
// Include metadata for serialization. | ||
shape._type = CANNON.Shape.types.CYLINDER; // Patch schteppe/cannon.js#329. | ||
shape.radiusTop = params.radiusTop; | ||
shape.radiusBottom = params.radiusBottom; | ||
shape.height = params.height; | ||
shape.numSegments = params.radialSegments; | ||
shape.orientation = new CANNON.Quaternion(); | ||
@@ -202,2 +210,10 @@ shape.orientation.setFromEuler(THREE.Math.degToRad(-90), 0, 0, 'XYZ').normalize(); | ||
shape = new CANNON.Cylinder(radius, radius, height, 12); | ||
// Include metadata for serialization. | ||
shape._type = CANNON.Shape.types.CYLINDER; // Patch schteppe/cannon.js#329. | ||
shape.radiusTop = radius; | ||
shape.radiusBottom = radius; | ||
shape.height = height; | ||
shape.numSegments = 12; | ||
shape.orientation = new CANNON.Quaternion(); | ||
@@ -204,0 +220,0 @@ shape.orientation.setFromEuler( |
{ | ||
"name": "three-to-cannon", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"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
23052
618