Comments (2)
Expected breaking changes
- remove physics from aframe-extras, or deliver only local driver
- remove support for kinematic-body
- default shape to box, not trimesh
from aframe-physics-system.
This is going to be great for performance!
Regarding collisions, physics-collider
loops through the world contact equations and used references to the collider's body object and the other bodies' references to their elements. Since we'll no longer have access to body references from the scene nor entity references from the physics worker, perhaps return a map of colliding object IDs
// in the physics worker
var collisions = {};
world.contacts.forEach( contact => {
let bodID1 = bodyToIDWeakMap.get(contact.bi), // a WeakMap global in the service worker
bodID2 = bodyToIDWeakMap.get(contact.bj);
if(collisions[bodID1]) { collisions[bodID1].push(bodID2); } else { collisions[bodID1] = [bodID2]; }
if(collisions[bodID2]) { collisions[bodID2].push(bodID1); } else { collisions[bodID2] = [bodID1]; }
});
// and in client components
var collisions = this.el.sceneEl.systems.physics.data.state.collisions,
IDMap = this.el.sceneEl.systems.physics.IDToEntityMap;
var myCollidedEntities = collisions[IDMap.get(this.physicsBodyID)] &&
collisions[IDMap.get(this.physicsBodyID)].map(IDMap.get);
My wishlist for the API would be some way to update the physics body shapes for changes in scale from super-hands
stretchable
Edit: fixed bad syntax in the example code
from aframe-physics-system.
Related Issues (20)
- How can you change restitution when using aframe physics system with ammo.js HOT 1
- Broken in A-Frame 1.2.0 HOT 21
- Getting the impulse force from a collision? (Ammo) HOT 1
- Our version of Cannon calls depreciated THREE.Geometry 14 times HOT 7
- How to prevent 3d model from going out of its physical frame?
- Cannon.js raycast vehicle support
- gltf ammo-shape loading before object3DMap.mesh information in A-frame HOT 1
- Cannon.js repository not found when trying to install aframe-physics-system using npm HOT 2
- gltf model model does not get parsed HOT 9
- Hitting crash in A-Frame Physics System (maybe when switching between kinematic & dynamic?) HOT 4
- Can't change Ammo driver friction coefficient HOT 2
- Cannot install using package managers HOT 7
- AMMO DRIVER Problem with event body-loaded in Chrome HOT 1
- Uncaught ReferenceError: arguments is not defined HOT 4
- Current NPM verison can no longer be installed, but the fix is in master. Please cut a release HOT 4
- Ammo bounce HOT 1
- Hull orientation and position incorrect.
- THREE.Geometry is not a constructor Error Aframe 1.3.0 (>1.0.4) HOT 1
- Add note in README about the c-frame fork HOT 3
- Including the Ammo.js build from mixedreality.mozilla.org HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aframe-physics-system.