CameraParallax class

Inheritance

Constructors

CameraParallax(List<ParallaxLayer> layers, {Vector2? size, Vector2? baseVelocity})

Properties

baseVelocity Vector2
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isSized bool
getter/setter pairinherited
layers List<ParallaxLayer>
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Vector2
Do not modify this directly, since the layers won't be resized if you do.
getter/setter pairinherited

Methods

currentOffset() Vector2
The base offset of the parallax, can be used in an outer update loop if you want to transition the parallax to a certain position.
inherited
moveParallax(Vector2 velocity, double dt) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Canvas canvas, {Vector2? position}) → void
inherited
resize(Vector2 newSize) → void
If the ParallaxComponent isn't used your own wrapper needs to call this on creation.
inherited
toString() String
A string representation of this object.
inherited
update(double dt) → void
override

Operators

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

Static Methods

load(Iterable<ParallaxData> dataList, {Vector2? size, Vector2? baseVelocity, Vector2? velocityMultiplierDelta, ImageRepeat repeat = ImageRepeat.repeatX, Alignment alignment = Alignment.bottomLeft, LayerFill fill = LayerFill.height, Images? images, FilterQuality? filterQuality}) Future<Parallax>
Note that this method only should be used if all of your layers should have the same layer arguments (how the images should be repeated, aligned and filled), otherwise load the ParallaxLayers individually and use the normal constructor.
override