Summary
This release contains the new Trimesh and ConeTwistConstraint classes along with a few fixes and optimizations for convex collisions. It should be fully backwards compatible with the previous v0.6.1.
Fixes
- Fixed narrowphase bug for compound sphere/sphere shape collision.
- Fixed bug in
RaycastVehiclethat didn't caused the world listeners to not add/remove properly. - Fixed sphere/plane contacts points when radius != 1.
- Fixed bug in
Heightfieldthat made some things pass through the field. - Fix in
ConvexPolyhedron.prototype.computeEdgesalong with some narrowphase optimizations makes convex/convex collisions more performant.
Additions
- Added methods
.raycastAll,.raycastClosestand.raycastAnytoWorld. - Added
idproperties toEquationandShape. - Added
Trimeshclass, including sphere and plane collisions. - Added method
Body.prototype.vectorToLocalFrame. - Made method
Body.prototype.addShapechainable. - Added options for
Bodyconstructor:shape,fixedRotation,allowSleep,sleepSpeedLimit,sleepTimeLimit,collisionFilterGroup,collisionFilterMask,angularDamping. - Per-material restitution and friction that falls back on the old behavior. See properties
frictionandrestitutionin theMaterialclass. DistanceConstraintdistance now defaults to the distance between the bodies.- Exposed
Ray.pointInTriangle. - Added methods
vectorToWorldFrame,vectorToLocalFrame,pointToLocalandpointToWorldtoTransform. - Added method
World.prototype.clearForces. - Added method
ContactEquation.prototype.getImpactVelocityAlongNormal. Sphereconstructor now throws an error ifradiusis negative.- The
AABBclass is now exposed. - Added methods
AABB.prototype.getCorners,.toLocalFrame,.toWorldFrame,.cloneand.contains. - Added property
materialto Shapeinstances. It is thus possible to set per-shape materials, that will override theBodymaterial if it is set. - Added
World.prototype.removeBody, deprecatedWorld.prototype.remove. - Added
Constraint.prototype.enableand.disable. HingeConstraintnow extendsPointToPointConstraintclass.- Added static properties
Vec3.UNIT_X,Vec3.UNIT_Y,Vec3.UNIT_Z. - Added class
ConeTwistConstraint. - Added class
Octree. - Added property
uniqueAxestoConvexPolyhedron.
Removed
HingeConstraint.prototype.getRotationalEquation1- use property.rotationalEquation1insteadHingeConstraint.prototype.getRotationalEquation2- use property.rotationalEquation2insteadHingeConstraint.prototype.getPointToPointEquation1- use property.equationXinsteadHingeConstraint.prototype.getPointToPointEquation2- use property.equationYinsteadHingeConstraint.prototype.getPointToPointEquation3- use property.equationZinstead
Deprecated
World.prototype.remove- useWorld.prototype.removeBodyinstead.- Passing
resulttoRay.prototype.intersectBody(body, result)is deprecated - please set the.resultproperty of theRayinstead. Vec3.prototype.normand.norm2are deprecated - use.lengthand.lengthSquared()instead.Vec3.prototype.multis deprecated - use.scaleinstead.- The
preStepandpostStepproperties ofBodyare deprecated - use the events with the same name inWorldinstead. World.prototype.numObjects()is deprecated - useworld.bodies.lengthinstead.World.prototype.rayTestis deprecated - use.raycastAll,.raycastClosestor.raycastAnyinstead.