eulerjs API / @eulerjs/scene / EulerPhysics
EulerPhysics()
ts
function EulerPhysics(options?): Promise<EulerPhysicsAPI>;Defined in: packages/scene/src/EulerPhysics.ts:55
eulerjs as three.js's physics addons are: await EulerPhysics() in place of await RapierPhysics(), and the rest of an example runs as it was. It steps on its own, 60 times a second, as they do, but at a fixed timestep, so the same scene always plays out the same way.
Built on ScenePhysics, so it reads userData.physics as three.js does and a little more (see PhysicsData), and fits each mesh as the plugin does: three.js's box, sphere, cylinder, cone and capsule geometries as those shapes; anything else as its hull if it moves, or as its triangles if it doesn't.
Parameters
| Parameter | Type |
|---|---|
options? | EulerPhysicsOptions |
Returns
Promise<EulerPhysicsAPI>
