CameraBoundsComponent class

A rectangle a camera can be confined to, centred on its entity.

It lives on an entity of its own rather than on the camera, so it is a thing in the level: visible, selectable, resized with the same handles as a shape — and shared by every camera that names it.

Inheritance
Implemented types

Constructors

CameraBoundsComponent({double width = 4000, double height = 800})
Bounds width by height world units, 4000 × 800 unless given.

Properties

componentType → Type
Type identifier for this component
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
height ↔ double
Full height of the allowed area, in world units, centred on the entity.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width ↔ double
Full width of the allowed area, in world units, centred on the entity.
getter/setter pair

Methods

cameraBoundsAt(Offset entityPosition) → Rect
The allowed area in world space, for an entity at entityPosition.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAttach(EntityId entityId) → void
Called when this component is added to an entity.
inherited
onDetach(EntityId entityId) → void
Called when this component is removed from an entity.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited