Skip to content

v0.6.2

Latest
Compare
Choose a tag to compare
@schteppe schteppe released this 28 Mar 18:37
· 64 commits to master since this release

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 to World.
  • Added id properties to Equation and Shape.
  • 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 and restitution in the Material class.
  • DistanceConstraint distance now defaults to the distance between the bodies.
  • Exposed Ray.pointInTriangle.
  • Added methods vectorToWorldFrame, vectorToLocalFrame, pointToLocal and pointToWorld to Transform.
  • Added method World.prototype.clearForces.
  • Added method ContactEquation.prototype.getImpactVelocityAlongNormal.
  • Sphere constructor now throws an error if radius is negative.
  • The AABB class is now exposed.
  • Added methods AABB.prototype.getCorners, .toLocalFrame, .toWorldFrame, .clone and .contains.
  • Added property material to Shape instances. It is thus possible to set per-shape materials, that will override the Body material if it is set.
  • Added World.prototype.removeBody, deprecated World.prototype.remove.
  • Added Constraint.prototype.enable and .disable.
  • HingeConstraint now extends PointToPointConstraint class.
  • Added static properties Vec3.UNIT_X, Vec3.UNIT_Y, Vec3.UNIT_Z.
  • Added class ConeTwistConstraint.
  • Added class Octree.
  • Added property uniqueAxes to ConvexPolyhedron.

Removed

  • HingeConstraint.prototype.getRotationalEquation1 - use property .rotationalEquation1 instead
  • HingeConstraint.prototype.getRotationalEquation2 - use property .rotationalEquation2 instead
  • HingeConstraint.prototype.getPointToPointEquation1 - use property .equationX instead
  • HingeConstraint.prototype.getPointToPointEquation2 - use property .equationY instead
  • HingeConstraint.prototype.getPointToPointEquation3 - use property .equationZ instead

Deprecated

  • World.prototype.remove - use World.prototype.removeBody instead.
  • Passing result to Ray.prototype.intersectBody(body, result) is deprecated - please set the .result property of the Ray instead.
  • Vec3.prototype.norm and .norm2 are deprecated - use .length and .lengthSquared() instead.
  • Vec3.prototype.mult is deprecated - use .scale instead.
  • The preStep and postStep properties of Body are deprecated - use the events with the same name in World instead.
  • World.prototype.numObjects() is deprecated - use world.bodies.length instead.
  • World.prototype.rayTest is deprecated - use .raycastAll, .raycastClosest or .raycastAny instead.