CinematicBehavior class
Plays back a CinematicSequence, interpolating camera values between keyframes and firing CinematicKeyframe.onArrive callbacks exactly once.
The camera values are set directly (bypasses spring) for exact authoring.
cameraSystem.addBehavior(CinematicBehavior(
sequence: CinematicSequence([
CinematicKeyframe(time: 0, position: Offset.zero),
CinematicKeyframe(time: 3, position: Offset(200, 100),
easing: Curves.easeIn, onArrive: () => print('arrived')),
]),
onComplete: resumeGame,
));
- Inheritance
-
- Object
- CameraBehavior
- CinematicBehavior
Constructors
- CinematicBehavior({required CinematicSequence sequence, VoidCallback? onComplete})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isComplete → bool
-
When
truethe system removes this behavior automatically.no setteroverride - onComplete → VoidCallback?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sequence → CinematicSequence
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Camera camera, double dt) → void -
Called once per frame before Camera.update.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited