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
RaycastVehicle
that didn't caused the world listeners to not add/remove properly. - Fixed sphere/plane contacts points when radius != 1.
- Fixed bug in
Heightfield
that made some things pass through the field. - Fix in
ConvexPolyhedron.prototype.computeEdges
along with some narrowphase optimizations makes convex/convex collisions more performant.
Additions
- Added methods
.raycastAll
,.raycastClosest
and.raycastAny
toWorld
. - Added
id
properties toEquation
andShape
. - Added
Trimesh
class, including sphere and plane collisions. - Added method
Body.prototype.vectorToLocalFrame
. - Made method
Body.prototype.addShape
chainable. - Added options for
Body
constructor:shape
,fixedRotation
,allowSleep
,sleepSpeedLimit
,sleepTimeLimit
,collisionFilterGroup
,collisionFilterMask
,angularDamping
. - Per-material restitution and friction that falls back on the old behavior. See properties
friction
andrestitution
in theMaterial
class. DistanceConstraint
distance now defaults to the distance between the bodies.- Exposed
Ray.pointInTriangle
. - Added methods
vectorToWorldFrame
,vectorToLocalFrame
,pointToLocal
andpointToWorld
toTransform
. - Added method
World.prototype.clearForces
. - Added method
ContactEquation.prototype.getImpactVelocityAlongNormal
. Sphere
constructor now throws an error ifradius
is negative.- The
AABB
class is now exposed. - Added methods
AABB.prototype.getCorners
,.toLocalFrame
,.toWorldFrame
,.clone
and.contains
. - Added property
material
to Shapeinstances
. It is thus possible to set per-shape materials, that will override theBody
material if it is set. - Added
World.prototype.removeBody
, deprecatedWorld.prototype.remove
. - Added
Constraint.prototype.enable
and.disable
. HingeConstraint
now extendsPointToPointConstraint
class.- Added static properties
Vec3.UNIT_X
,Vec3.UNIT_Y
,Vec3.UNIT_Z
. - Added class
ConeTwistConstraint
. - Added class
Octree
. - Added property
uniqueAxes
toConvexPolyhedron
.
Removed
HingeConstraint.prototype.getRotationalEquation1
- use property.rotationalEquation1
insteadHingeConstraint.prototype.getRotationalEquation2
- use property.rotationalEquation2
insteadHingeConstraint.prototype.getPointToPointEquation1
- use property.equationX
insteadHingeConstraint.prototype.getPointToPointEquation2
- use property.equationY
insteadHingeConstraint.prototype.getPointToPointEquation3
- use property.equationZ
instead
Deprecated
World.prototype.remove
- useWorld.prototype.removeBody
instead.- Passing
result
toRay.prototype.intersectBody(body, result)
is deprecated - please set the.result
property of theRay
instead. Vec3.prototype.norm
and.norm2
are deprecated - use.length
and.lengthSquared()
instead.Vec3.prototype.mult
is deprecated - use.scale
instead.- The
preStep
andpostStep
properties ofBody
are deprecated - use the events with the same name inWorld
instead. World.prototype.numObjects()
is deprecated - useworld.bodies.length
instead.World.prototype.rayTest
is deprecated - use.raycastAll
,.raycastClosest
or.raycastAny
instead.