Parallax constructor

Parallax(
  1. List<ParallaxLayer> layers, {
  2. Vector2? size,
  3. Vector2? baseVelocity,
})

Implementation

Parallax(
  this.layers, {
  Vector2? size,
  Vector2? baseVelocity,
}) {
  this.baseVelocity = baseVelocity ?? Vector2.zero();
  if (size != null) {
    resize(size);
  }
}