eulerjs examples
Each example is one short file in src/; src/stage.ts holds the three.js boilerplate they share.
- hello: a world, a body bound to a mesh, and the render loop.
- tumbling: exact inertia from meshes, and why the gyroscopic term matters.
- springs: writing your own Behavior and Plugin.
- chain: links pinned together with
DistanceJoints. - collisions: a pyramid of crates, and balls to throw at it.
- floating: cork, pine and oak afloat on a spectral sea with
@eulerjs/marine. - joints: hinges with limits and motors, a slider servo, a cone-twist joint, and fixed joints that break.
- queries: ray casts, shape casts and overlap tests.
- sensors: trigger zones and contact events.
- terrain: heightfield terrain, cylinders and cones, and a triangle mesh with
@eulerjs/bvh. - solvers: XPBD and soft step side by side.
For full games built on the same API, see examples/sailboat (buoyancy, sails, a boat hitting rocks and floating crates) and examples/city (a car, ragdoll pedestrians with joint limits, and a city of props).