Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

three-to-cannon

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-to-cannon - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

test/index.js

18

index.js

@@ -19,3 +19,3 @@ var CANNON = require('cannon'),

*/
module.exports = CANNON.mesh2shape = function (object, options) {
var mesh2shape = function (object, options) {
options = options || {};

@@ -70,4 +70,6 @@

CANNON.mesh2shape.Type = Type;
mesh2shape.Type = Type;
module.exports = CANNON.mesh2shape = mesh2shape;
/******************************************************************************

@@ -309,3 +311,4 @@ * Shape construction

if (meshes[0].geometry.isBufferGeometry) {
if (meshes[0].geometry.attributes.position) {
if (meshes[0].geometry.attributes.position
&& meshes[0].geometry.attributes.position.itemSize > 2) {
tmp.fromBufferGeometry(meshes[0].geometry);

@@ -326,4 +329,9 @@ }

if (mesh.geometry.isBufferGeometry) {
tmp.fromBufferGeometry(mesh.geometry);
combined.merge(tmp, mesh.matrixWorld);
if (mesh.geometry.attributes.position
&& mesh.geometry.attributes.position.itemSize > 2) {
var tmpGeom = new THREE.Geometry();
tmpGeom.fromBufferGeometry(mesh.geometry);
combined.merge(tmpGeom, mesh.matrixWorld);
tmpGeom.dispose();
}
} else {

@@ -330,0 +338,0 @@ combined.merge(mesh.geometry, mesh.matrixWorld);

{
"name": "three-to-cannon",
"version": "1.1.2",
"version": "1.2.0",
"description": "Convert a THREE.Mesh to a CANNON.Shape.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "node test/index.js",
"preversion": "npm run test",
"postversion": "git push && git push --tags && npm publish"

@@ -30,3 +31,7 @@ },

"cannon": "github:donmccurdy/cannon.js#v0.6.2-dev1"
},
"devDependencies": {
"cannon": "github:donmccurdy/cannon.js#v0.6.2-dev1",
"three": "^0.89.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc