Here you will find properties that allow changing speed, position, repeat pattern and parallax effect of backgrounds in-game, among other properties like
# Positioning and movement
Each background has these properties that set how background is positioned in the viewport:
| || ||How much to shift the texture horizontally, in pixels.|
| || ||How much to shift the texture vertically, in pixels.|
| || |
The speed at which the background's texture moves by X and Y axes, wrapping around its area.
The value is measured in pixels per frame. It also takes
| || |
A value that makes background move faster or slower relative to other objects. It is often used to create an effect of depth.
| || ||Set it to |
| || ||One of |
# Removing a background
Similar to types, a background can be removed with
bg.kill = true;, where
bg is the backgrond that needs to be removed.
# Other interesting properties
Backgrounds inherit lots of properties and methods of
PIXI.TilingSprite, and there are some you can find useful:
| || ||Opacity of the layer between 0 and 1. |
| || ||The color of the background. |
| || ||How to mix the background with the rest of the world. Defaults to |