resize method

void resize(
  1. Vector2 newSize
)

If the ParallaxComponent isn't used your own wrapper needs to call this on creation.

Implementation

void resize(Vector2 newSize) {
  if (!isSized) {
    _size = Vector2.zero();
  }
  if (newSize != _size || !isSized) {
    _size.setFrom(newSize);
    _clipRect = _size.toRect();
    layers.forEach((layer) => layer.resize(_size));
  }
  isSized |= true;
}