Parallax class

A full parallax, several layers of images drawn out on the screen and each layer moves with different velocities to give an effect of depth.

Constructors

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

Properties

baseVelocity Vector2
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isSized bool
getter/setter pair
layers List<ParallaxLayer>
final
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 pair

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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Canvas canvas, {Vector2? position}) → void
resize(Vector2 newSize) → void
If the ParallaxComponent isn't used your own wrapper needs to call this on creation.
toString() String
A string representation of this object.
inherited
update(double dt) → void

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.