Container for all parallax layers that manages global parallax behavior and coordinates with the Camera system.
Inspired by Godot's ParallaxBackground node.
const parallax = new ParallaxBackground();const skyLayer = new TilingParallaxLayer({ texture: skyTexture, scrollScale: new PIXI.Point(0.2, 0.2)});parallax.addLayer(skyLayer);scene.addChild(parallax); Copy
const parallax = new ParallaxBackground();const skyLayer = new TilingParallaxLayer({ texture: skyTexture, scrollScale: new PIXI.Point(0.2, 0.2)});parallax.addLayer(skyLayer);scene.addChild(parallax);
The MoxiEntity instance managing logic for this container
Adds a ParallaxLayer to the background
Get the effective camera position for parallax calculation
Get the effective camera scale/zoom for parallax calculation
Container for all parallax layers that manages global parallax behavior and coordinates with the Camera system.
Inspired by Godot's ParallaxBackground node.
Example