This repository has been archived by the owner on May 23, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP implementation of ammo-driver.js * adding support for convex hulls and trimeshes * Add support for all (most) shape types * emit events when objects begin/end collision * basic implementation of all ammo constraint types. expose collisionFlags in ammo-body. expose debugDrawMode in system. * minor fixes * fix package and package-lock * update package.json and package-lock.json; udpate ammo.html example to latest * point back to latest ammo.js; update package-lock to newer npm format * pull changes over from mozillareality#hubs/ammo_driver branch * Revert "pull changes over from mozillareality#hubs/ammo_driver branch" This reverts commit 72ec427. * latest WIP. Fixes for properly centering mass, convex hull and trimesh generation, dynamic scaling * support dynamic scaling * fix package lock * fix constraints! * enable manually specifying halfExtents; fix checks for when type is dynamic so that kinematic objects behave properly (fixes issue where scaled kinematic objects had strange behavior with constraints) * numerous fixes/updates including: fix for cursor scale affecting constraints strangely; fix for how halfExtents/bounding boxes are being calculated; object center of mass is now set properly; overall less usage of variable references and simplification of various areas of code * fix constraint rotations (use btGeneric6DofConstraint instead of btFixedConstraint). * enable usage of ammo-body without a mesh and allow setting of orientation and position offsets. * rename detail property in collide/collide-end events * enable changing collision filters; enable switching between kinematic, dynamic and static * fix gravity for that start out as kinematic but change to dynamic later * re-add Ammo cleanup * typo * fix issues with how transforms in trimeshes were being handled * update default values for maxSubSteps and fixedTimeStep to the default values of Bullet; revert back to default timestep values in system.js * actually go back to 10 for maxSubSteps * fix package.json * change how debug draw is initialized so that it can be changed dynamically at runtime. * fix race condition with setting debug param in url * fix how initializePolyhedralFeatures is called in tick so that it properly handles when debug is toggled on/off * fix how recentering works and make it optional; refactor initBody to be more efficient; * prettier pass on ammo-body, ammo-constraint, and ammo-driver * fix issue with certain trimeshes not being generated correctly * fix package.json * update three-to-ammo * fix issue where kinematic bodies could still be nudged around by dynamic objects; update three-to-ammo * point to specific sha of three-to-ammo * fix logic bug which prevented collide-end from ever firing * performance pass: try to use activationState correctly; check if pos/rot has actually updated before updating bullet motionState; activate object if pos/rot has changed; reduce fixedTimeStep back to 60; * expose linear/angularSleepingThreshold; move auto updating of scale and generation of shapes to beforeStep * remove dead code * fix issue causing eventListeners to be removed incorrectly; optimize eventing loop slightly * replace some "let" with "const" * various cleanup from PR review * move activation states and collision flags into constants; change getVelocity to return the actual velocity vector instead of the scalar length; remove concept of "recenter" (let application handle it themselves using ammo-shape "offset" attribute). * handle when collisionFlags are explicitly updated * move shape, body, and constraint types into constants as well; add to the ammo example use of "autoGenerateShape: false" * update to latest three-to-ammo (siginificantly more efficient shape creation) * upgrade three-to-ammo (bug fixes) * wip update to support refactored three-to-ammo * update three-to-ammo (WIP branch that has the "fit" refactor) * change ACTIVATION_STATE constants to be strings * allow updating of activationState in update * fix shape removal; remove ammo.js as a dependency because it's technically a peer dependency but you can also include it via script tag. latest build of ammo.js will now be located at https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js * fix bug with removing shapes after the body has already been deleted. update three-to-ammo and ammo-debug-drawer packages * reduce garbage generation by switching to using maps during collision detection; rename `addCollideEventListener` to `EmitCollisionEvents` * fix bugs: collisionFilters not being updated correctly, static bodies not getting updated if moved around; enhancements: possible perf improvements by setting `this.physicsWorld.setForceUpdateAllAabbs(false)` * small fix to how lock constraint limits are set; small memory optimization to collision event logic * skip the first update that occurs in ammo-body so that various properties don't get incorrectly set twice * update three-to-ammo with new version that supports calling updateMatrices() when available (e.g. Hubs) * get rid of more memory allocations * avoid iterations over maps and sets in ammo-driver step to reduce more garbage generation * bump three-to-ammo * Update to latest three-to-ammo - adds support for HACD and VHACD shape types - removes compound fit * fix broken velocity tests * fix tests again * Simplify API a bit by replacing collisionFlags property with disableCollision property; explicitly expose maxSubSteps and fixedTimeStep in system for configuring the ammo-driver. revert ITERATIONS constant back to 10. * Add documentaion for ammo-driver * fix formatting * add additional documentation for ammo-body activateStates * fix table formatting * documentation typo * add missing System Configuration section (somehow got lost in copy pasting) * Elaborate a bit more on collision filtering. * fix link * fix formatting, again * typo * more cleanup * handle per-rigidBody gravity correcty. Allow gravity, damping, sleepthresholds, and angularFactor to be updated dynamically. * fix typo where using just "data" instead of "this.data" * fix updating gravity and activation states
- Loading branch information