ParallaxLayer class
Represents one layer in the parallax, draws out an image on a canvas in the manner specified by the parallaxImage.
Constructors
- ParallaxLayer(ParallaxRenderer parallaxRenderer, {Vector2? velocityMultiplier})
-
parallaxRenderer
is the representation of the renderer with data of how the layer should behave.velocityMultiplier
will be used to determine the velocity of the layer by multiplying the Parallax.baseVelocity with thevelocityMultiplier
.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- parallaxRenderer → ParallaxRenderer
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- velocityMultiplier ↔ Vector2
-
getter/setter pair
Methods
-
currentOffset(
) → Vector2 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
Canvas canvas) → void -
resize(
Vector2 size) → void -
toString(
) → String -
A string representation of this object.
inherited
-
update(
Vector2 delta, double dt) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
load(
ParallaxData data, {Vector2? velocityMultiplier, ImageRepeat repeat = ImageRepeat.repeatX, Alignment alignment = Alignment.bottomLeft, LayerFill fill = LayerFill.height, Images? images, FilterQuality? filterQuality}) → Future< ParallaxLayer> -
Takes a data of a parallax renderer, and optionally arguments for how it
should repeat (
repeat
), which edge it should align with (alignment
), which axis it should fill the image on (fill
) andimages
which is the image cache that should be used. If no image cache is set, the global flame cache is used.