three-to-cannon:将THREE.Mesh转换为CANNON.Shape

时间:2024-05-17 18:38:37
【文件属性】:

文件名称:three-to-cannon:将THREE.Mesh转换为CANNON.Shape

文件大小:92KB

文件格式:ZIP

更新时间:2024-05-17 18:38:37

threejs physics cannonjs JavaScript

三加农炮 将THREE.Mesh转换为CANNON.Shape,并使用简化的形状进行可选的优化。 用法 安装: npm install -- save three - to - cannon 进口: // ES6 import { threeToCannon } from 'three-to-cannon' ; // CommonJS threeToCannon = require ( 'three-to-cannon' ) . threeToCannon ; 用: // Automatic. const shape = threeToCannon ( object3D ) ; // Bounding box (AABB). const shape = threeToCannon ( object3D , { type : threeToCannon . Type . BOX


【文件预览】:
three-to-cannon-main
----package.json(2KB)
----.eslintrc.json(894B)
----.github()
--------workflows()
----test()
--------index.test.ts(4KB)
----src()
--------utils.ts(6KB)
--------index.ts(7KB)
----tsconfig.json(219B)
----.gitignore(18B)
----lib()
--------ConvexHull.d.ts(279B)
--------ConvexHull.js(23KB)
----README.md(1KB)
----yarn.lock(203KB)

网友评论