three-to-cannon
Advanced tools
Comparing version 4.3.0 to 5.0.1
import { Quaternion as CQuaternion, Shape, Vec3 } from 'cannon-es'; | ||
import { Object3D } from 'three'; | ||
export declare type BoxParameters = { | ||
export type BoxParameters = { | ||
x: number; | ||
@@ -8,3 +8,3 @@ y: number; | ||
}; | ||
export declare type CylinderParameters = { | ||
export type CylinderParameters = { | ||
radiusTop: number; | ||
@@ -15,14 +15,14 @@ radiusBottom: number; | ||
}; | ||
export declare type SphereParameters = { | ||
export type SphereParameters = { | ||
radius: number; | ||
}; | ||
export declare type ConvexPolyhedronParameters = { | ||
export type ConvexPolyhedronParameters = { | ||
vertices: Float32Array; | ||
faces: number[][]; | ||
}; | ||
export declare type TrimeshParameters = { | ||
export type TrimeshParameters = { | ||
vertices: Float32Array; | ||
indices: Uint32Array; | ||
}; | ||
declare type ShapeTypeToShapeParameters = { | ||
type ShapeTypeToShapeParameters = { | ||
Box: BoxParameters; | ||
@@ -29,0 +29,0 @@ Cylinder: CylinderParameters; |
@@ -0,0 +0,0 @@ import { BufferGeometry, Object3D, Vector3 } from 'three'; |
@@ -874,11 +874,4 @@ import { Quaternion as Quaternion$1, Box, Vec3, Cylinder, Sphere, ConvexPolyhedron, Trimesh } from 'cannon-es'; | ||
function normalizeGeometry(mesh) { | ||
let geometry = mesh.geometry; | ||
if (geometry.toBufferGeometry) { | ||
geometry = geometry.toBufferGeometry(); | ||
} else { | ||
// Preserve original type, e.g. CylinderBufferGeometry. | ||
geometry = geometry.clone(); | ||
} | ||
// Preserve original type, e.g. CylinderBufferGeometry. | ||
const geometry = mesh.geometry.clone(); | ||
mesh.updateMatrixWorld(); | ||
@@ -885,0 +878,0 @@ mesh.matrixWorld.decompose(_v1, _q1, _v2); |
@@ -874,11 +874,4 @@ import { Quaternion as Quaternion$1, Box, Vec3, Cylinder, Sphere, ConvexPolyhedron, Trimesh } from 'cannon-es'; | ||
function normalizeGeometry(mesh) { | ||
let geometry = mesh.geometry; | ||
if (geometry.toBufferGeometry) { | ||
geometry = geometry.toBufferGeometry(); | ||
} else { | ||
// Preserve original type, e.g. CylinderBufferGeometry. | ||
geometry = geometry.clone(); | ||
} | ||
// Preserve original type, e.g. CylinderBufferGeometry. | ||
const geometry = mesh.geometry.clone(); | ||
mesh.updateMatrixWorld(); | ||
@@ -885,0 +878,0 @@ mesh.matrixWorld.decompose(_v1, _q1, _v2); |
@@ -876,11 +876,4 @@ (function (global, factory) { | ||
function normalizeGeometry(mesh) { | ||
let geometry = mesh.geometry; | ||
if (geometry.toBufferGeometry) { | ||
geometry = geometry.toBufferGeometry(); | ||
} else { | ||
// Preserve original type, e.g. CylinderBufferGeometry. | ||
geometry = geometry.clone(); | ||
} | ||
// Preserve original type, e.g. CylinderBufferGeometry. | ||
const geometry = mesh.geometry.clone(); | ||
mesh.updateMatrixWorld(); | ||
@@ -887,0 +880,0 @@ mesh.matrixWorld.decompose(_v1, _q1, _v2); |
{ | ||
"name": "three-to-cannon", | ||
"version": "4.3.0", | ||
"version": "5.0.1", | ||
"description": "Convert a THREE.Mesh to a CANNON.Shape.", | ||
@@ -18,4 +18,4 @@ "type": "module", | ||
"watch": "microbundle watch --format cjs,esm,modern,umd --no-compress --globals three=THREE --external three", | ||
"test": "ava test/*.test.ts", | ||
"coverage": "c8 --reporter=lcov --reporter=text ava test/*.ts --tap", | ||
"test": "ava --no-worker-threads test/*.test.ts", | ||
"coverage": "c8 --reporter=lcov --reporter=text ava --no-worker-threads test/*.ts --tap", | ||
"coverage:report": "c8 report --reporter=text-lcov > coverage/coverage.lcov", | ||
@@ -49,16 +49,16 @@ "preversion": "rimraf dist/* && npm run dist && npm test", | ||
"dependencies": { | ||
"@types/three": ">=0.142.0" | ||
"@types/three": ">=0.160.0" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "5.41.0", | ||
"@typescript-eslint/parser": "5.41.0", | ||
"ava": "5.0.1", | ||
"c8": "7.12.0", | ||
"@typescript-eslint/eslint-plugin": "6.17.0", | ||
"@typescript-eslint/parser": "6.17.0", | ||
"ava": "6.0.1", | ||
"c8": "8.0.1", | ||
"cannon-es": "0.20.0", | ||
"eslint": "8.26.0", | ||
"eslint": "8.56.0", | ||
"microbundle": "0.15.1", | ||
"rimraf": "3.0.2", | ||
"three": "0.140.0", | ||
"ts-node": "10.9.1", | ||
"typescript": "4.8.4" | ||
"rimraf": "5.0.5", | ||
"three": "0.160.0", | ||
"tsx": "^4.7.0", | ||
"typescript": "5.3.3" | ||
}, | ||
@@ -84,5 +84,5 @@ "files": [ | ||
"nodeArguments": [ | ||
"--loader=ts-node/esm" | ||
"--import=tsx" | ||
] | ||
} | ||
} |
# three-to-cannon | ||
[![Latest NPM release](https://img.shields.io/npm/v/three-to-cannon.svg)](https://www.npmjs.com/package/three-to-cannon) | ||
[![Minzipped size](https://badgen.net/bundlephobia/minzip/three-to-cannon)](https://bundlephobia.com/result?p=three-to-cannon) | ||
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/three-to-cannon)](https://bundlephobia.com/package/three-to-cannon) | ||
[![License](https://img.shields.io/badge/license-MIT-007ec6.svg)](https://github.com/donmccurdy/three-to-cannon/blob/master/LICENSE) | ||
@@ -6,0 +6,0 @@ [![Build Status](https://github.com/donmccurdy/three-to-cannon/workflows/build/badge.svg?branch=main&event=push)](https://github.com/donmccurdy/three-to-cannon/actions?query=workflow%3Abuild) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
552709
5247
Updated@types/three@>=0.160.0