The MoxiEntity instance managing logic for this container
Update TilingSprite dimensions (e.g., on window resize)
Override updateParallax to use tilePosition instead of container position. This provides seamless infinite scrolling without visible seams.
Since the ParallaxBackground container now follows the camera, layers inside stay at (0,0) and only use tilePosition for the parallax scrolling effect.
Camera scale is used to resize the TilingSprite to cover the viewport at different zoom levels.
Specialized parallax layer using PIXI.TilingSprite for efficient infinite scrolling.
This is the recommended approach for large, repeating backgrounds like sky, clouds, or ground textures. TilingSprite is optimized for repeating patterns and uses tilePosition for seamless scrolling without repositioning the container.
Example