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

@enable3d/ammo-physics

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enable3d/ammo-physics - npm Package Compare versions

Comparing version 0.25.3 to 0.25.4

0

dist/bundle.d.ts

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

2

dist/collisionEvents.d.ts
/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ import { Events } from '@yandeu/events';

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ import { Events } from '@yandeu/events';

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ import PhysicsBody from '@enable3d/common/dist/physicsBody';

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ export default class Constraints {

@@ -0,0 +0,0 @@ declare const ConvexObjectBreaker: {

@@ -0,0 +0,0 @@ /* eslint-disable @typescript-eslint/prefer-ts-expect-error */

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

export { ConvexGeometry } from 'three/examples/jsm/geometries/ConvexGeometry.js';
export type { Geometry } from '@enable3d/three-wrapper/dist/deprecated/geometry.js';
//# sourceMappingURL=externals.d.ts.map

@@ -0,0 +0,0 @@ // we exclude these files from getting bundles with webpack

@@ -0,0 +0,0 @@ import '@enable3d/common/dist/typesAmmo';

@@ -0,0 +0,0 @@ import '@enable3d/common/dist/typesAmmo';

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -139,2 +139,3 @@ import PhysicsBody from '@enable3d/common/dist/physicsBody';

box: (boxConfig?: Types.BoxConfig, materialConfig?: Types.MaterialConfig) => ExtendedObject3D;
capsule: (capsuleConfig?: Types.CapsuleConfig, materialConfig?: Types.MaterialConfig) => ExtendedObject3D;
cylinder: (cylinderConfig?: Types.CylinderConfig, materialConfig?: Types.MaterialConfig) => ExtendedObject3D;

@@ -141,0 +142,0 @@ cone: (coneConfig?: Types.ConeConfig, materialConfig?: Types.MaterialConfig) => ExtendedObject3D;

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -17,3 +17,3 @@ import { logger } from '@enable3d/common/dist/logger';

import { Events } from '@yandeu/events';
import { BufferGeometry, Euler, Matrix4, Quaternion, REVISION, Vector3 } from 'three';
import { Box3, BufferGeometry, Euler, Matrix4, Quaternion, REVISION, Vector3 } from 'three';
import { createHACDShapes, createHullShape, createTriMeshShape, createVHACDShapes, iterateGeometries } from './three-to-ammo';

@@ -461,2 +461,3 @@ import { createTorusShape } from './torusShape';

box: (boxConfig = {}, materialConfig = {}) => this.shapes.addBox(boxConfig, materialConfig),
capsule: (capsuleConfig = {}, materialConfig = {}) => this.shapes.addCapsule(capsuleConfig, materialConfig),
cylinder: (cylinderConfig = {}, materialConfig = {}) => this.shapes.addCylinder(cylinderConfig, materialConfig),

@@ -526,4 +527,19 @@ cone: (coneConfig = {}, materialConfig = {}) => this.shapes.addCone(coneConfig, materialConfig),

// auto adjust the center for custom shapes
if (autoCenter)
object.geometry.center();
if (autoCenter) {
// mesh
if (object.isMesh && object.geometry) {
object.geometry.center();
}
// group
else if (object.isGroup) {
const box = new Box3();
const center = new Vector3();
box.setFromObject(object).getCenter(center);
object.traverse(child => {
if (child.isMesh) {
child.geometry.translate(-center.x, -center.y, -center.z);
}
});
}
}
// adjust the cylinder radius for its physcis body

@@ -530,0 +546,0 @@ if (shape === 'cylinder')

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ import { AmmoPhysics } from '../physics';

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ import { logger } from '@enable3d/common/dist/logger';

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ import { AmmoPhysics } from '../physics';

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ export default class ClosestRayResultCallback {

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ import ClosestRayResultCallback from './closestRayResultCallback';

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ import applyMixins from '@enable3d/common/dist/applyMixins';

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/
import { AddExistingConfig, BoxConfig, ConeConfig, CylinderConfig, ExtendedObject3D, ExtrudeConfig, GroundConfig, MaterialConfig, PlaneConfig, SphereConfig, TorusConfig } from '@enable3d/common/dist/types';
import { AddExistingConfig, BoxConfig, CapsuleConfig, ConeConfig, CylinderConfig, ExtendedObject3D, ExtrudeConfig, GroundConfig, MaterialConfig, PlaneConfig, SphereConfig, TorusConfig } from '@enable3d/common/dist/types';
import Factories from '@enable3d/common/dist/factories';

@@ -16,2 +16,3 @@ declare class Shapes {

addGround(groundConfig: GroundConfig, materialConfig?: MaterialConfig): ExtendedObject3D;
addCapsule(capsuleConfig?: CapsuleConfig, materialConfig?: MaterialConfig): ExtendedObject3D;
addCylinder(cylinderConfig?: CylinderConfig, materialConfig?: MaterialConfig): ExtendedObject3D;

@@ -18,0 +19,0 @@ addCone(coneConfig?: ConeConfig, materialConfig?: MaterialConfig): ExtendedObject3D;

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -32,2 +32,7 @@ class Shapes {

}
addCapsule(capsuleConfig = {}, materialConfig = {}) {
const capsule = this.factory.add.capsule(capsuleConfig, materialConfig);
this.addExisting(capsule, capsuleConfig);
return capsule;
}
addCylinder(cylinderConfig = {}, materialConfig = {}) {

@@ -34,0 +39,0 @@ const cylinder = this.factory.add.cylinder(cylinderConfig, materialConfig);

@@ -0,0 +0,0 @@ /**

@@ -0,1 +1,3 @@

/* eslint-disable prefer-const */
/* eslint-disable prefer-template */
/* eslint-disable no-prototype-builtins */

@@ -2,0 +4,0 @@ /**

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ import { Quaternion } from 'three';

/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2020 Yannick Deubel; Project Url: https://github.com/enable3d/enable3d
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|GNU GPLv3}
* @license {@link https://github.com/enable3d/enable3d/blob/master/LICENSE|LGPL-3.0}
*/

@@ -6,0 +6,0 @@ // https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=7228

{
"name": "@enable3d/ammo-physics",
"version": "0.25.3",
"version": "0.25.4",
"description": "Physics Plugin for three.js",

@@ -21,3 +21,3 @@ "main": "dist/index.js",

"author": "Yannick Deubel",
"license": "GNU GPLv3",
"license": "LGPL-3.0",
"repository": {

@@ -33,9 +33,9 @@ "type": "git",

"dependencies": {
"@enable3d/common": "^0.25.3",
"@enable3d/three-wrapper": "^0.25.3",
"@enable3d/common": "^0.25.4",
"@enable3d/three-wrapper": "^0.25.4",
"@yandeu/events": "0.0.5"
},
"peerDependencies": {
"@types/three": "0.144.0",
"three": "0.144.0"
"@types/three": "0.156.0",
"three": "0.156.1"
},

@@ -42,0 +42,0 @@ "funding": {

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

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

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