Jolt doesn't support this and requires you to recreate the shape. Since
the shape -> collider relationship is 1:N, we can't really create a new
shape because we'd have to figure out which colliders/compoundshapes to
assign it to, which isn't feasible.
refs are cumbersome because they require storing an int and they require
manual cleanup when the object is destroyed.
Instead, we'll go with a pure Lua solution using a table in the
registry. The table has weak keys containing the LÖVR object, and the
values are the userdata. This doesn't require any manual cleanup,
reduces the size of objects by 8 bytes, and is about 25% faster.
The "vec3 is 4 floats" thing was consistently confusing to people. It's
reverted everywhere except for Curve.
maf now has full sets of methods for vec2/vec3/vec4, for consistency.
Vector bindings now use luax_readvec* helper functions for the
number/vector variants, and use maf for most functionality, which cleans
things up a lot.
- Add helper functions for creating shapes to avoid duplication between
newShape and newShapeCollider.
- Add lovr.physics.newMeshShape and lovr.physics.newTerrainShape
- Register TerrainShape so it has all the base Shape methods
- Smooth out a few TerrainShape warnings