AreaOpts
Defined in: packages/threeplay/src/plugins/physics/types.ts:24
Options of area().
Properties
Section titled “Properties”friction?
Section titled “friction?”
optionalfriction?:number
Defined in: packages/threeplay/src/plugins/physics/types.ts:38
offset?
Section titled “offset?”
optionaloffset?: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).
restitution?
Section titled “restitution?”
optionalrestitution?:number
Defined in: packages/threeplay/src/plugins/physics/types.ts:39
sensor?
Section titled “sensor?”
optionalsensor?:boolean
Defined in: packages/threeplay/src/plugins/physics/types.ts:37
A sensor detects overlaps but nothing bounces off it. Default: true without body().
shape?
Section titled “shape?”
optionalshape?:"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.
optionalsize?:Vec3Like
Defined in: packages/threeplay/src/plugins/physics/types.ts:33
Explicit size (local units, scaled with the object), overriding the derived one.