Socket
Socket
Sign inDemoInstall

three-to-cannon

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    three-to-cannon

Convert a THREE.Mesh to a CANNON.Shape.


Version published
Weekly downloads
595
decreased by-22.22%
Maintainers
1
Install size
26.9 kB
Created
Weekly downloads
 

Readme

Source

three-to-cannon

Build Status

Convert a THREE.Mesh to a CANNON.Shape, and optional optimizations with simplified shapes.

Usage

npm install --save three-to-cannon
mesh2shape = require('three-to-cannon');

// Automatic.
var shape = mesh2shape(object3D);

// Bounding box (AABB).
var shape = mesh2shape(object3D, {type: mesh2shape.Type.BOX});

// Bounding sphere.
var shape = mesh2shape(object3D, {type: mesh2shape.Type.SPHERE});

// Cylinder.
var shape = mesh2shape(object3D, {type: mesh2shape.Type.CYLINDER});

// Convex hull.
var shape = mesh2shape(object3D, {type: mesh2shape.Type.HULL});

// Mesh (not recommended).
var shape = mesh2shape(object3D, {type: mesh2shape.Type.MESH});

Keywords

FAQs

Last updated on 10 Jun 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc