Interface
AreaCompOpt
:Options for the area component.
group
Component Types
shape
?: ShapeThe 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 | Vec2Area scale.
offset
?: Vec2Area offset.
cursor
?: CursorCursor on hover.
collisionIgnore
?: Tag[]If this object should ignore collisions against certain other objects.
since
v3000.0
restitution
?: numberBounciness factor between 0 and 1.
since
v4000.0
friction
?: numberFriction factor between 0 and 1.
since
v4000.0