AreaCompOpt:
Options for the area component.
group
Component Types
shape?: Shape
The shape of the area (currently only Rect and Polygon is supported).
add([
sprite("butterfly"),
pos(100, 200),
// a triangle shape!
area({ shape: new Polygon([vec2(0), vec2(100), vec2(-100, 100)]) }),
])
scale?: number | Vec2
Area scale.
offset?: Vec2
Area offset.
cursor?: Cursor
Cursor on hover.
collisionIgnore?: Tag[]
If this object should ignore collisions against certain other objects.
since
v3000.0
restitution?: number
Bounciness factor between 0 and 1.
since
v4000.0
friction?: number
Friction factor between 0 and 1.
since
v4000.0