eulerjs API / @eulerjs/scene / PhysicsData
PhysicsData
Defined in: packages/scene/src/ScenePhysics.ts:14
What an object's userData.physics says about it: three.js's own convention, as its RapierPhysics, JoltPhysics and AmmoPhysics read it (mass and restitution), and a little more. A glTF node's extras arrive in userData, so a Blender custom property physics comes through as this.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
body? | | Body | Body[] | Written by ScenePhysics: the body made for the object, or for an InstancedMesh one for each instance. | packages/scene/src/ScenePhysics.ts:29 |
collider? | | ColliderShorthand | "mesh" | What it collides as, in place of the shape chosen for it: a shape fitted around its meshes (see fitCollider), or 'mesh' for its triangles, which only a static or kinematic body can be. | packages/scene/src/ScenePhysics.ts:27 |
friction? | number | Coulomb friction coefficient. Defaults to 0.5. | packages/scene/src/ScenePhysics.ts:20 |
mass? | number | In kg. 0 or none: the object doesn't move. | packages/scene/src/ScenePhysics.ts:16 |
restitution? | number | How bouncy, usually from 0 to 1. Defaults to 0. | packages/scene/src/ScenePhysics.ts:18 |
type? | BodyType | Overrides what mass makes it: 'kinematic' for an object moved by hand, say. | packages/scene/src/ScenePhysics.ts:22 |
