Direct port of GCpShapeCache to JavaScript for use with ChipmunkJS and PhysicsEditor.