Skip to content

AreaOpts

Defined in: packages/threeplay/src/plugins/physics/types.ts:24

Options of area().

optional friction?: number

Defined in: packages/threeplay/src/plugins/physics/types.ts:38


optional offset?: Vec3Like

Defined in: packages/threeplay/src/plugins/physics/types.ts:35

Offset of the collider from the object origin, in local units (scaled with the object).


optional restitution?: number

Defined in: packages/threeplay/src/plugins/physics/types.ts:39


optional sensor?: boolean

Defined in: packages/threeplay/src/plugins/physics/types.ts:37

A sensor detects overlaps but nothing bounces off it. Default: true without body().


optional shape?: "auto" | "box" | "sphere" | "capsule" | "mesh" | "hull"

Defined in: packages/threeplay/src/plugins/physics/types.ts:31

Collider shape. "auto" (default) derives it from the object’s shape: box → cuboid, sphere → ball, capsule → capsule, cylinder/cone → same, plane → thin cuboid, mesh/model → bounding box. "mesh" builds a trimesh (static objects only), "hull" a convex hull.


optional size?: Vec3Like

Defined in: packages/threeplay/src/plugins/physics/types.ts:33

Explicit size (local units, scaled with the object), overriding the derived one.