parallax.module
README.md
pixelParallax.parallax
Background bands for 2D parallax, any number of layers, driven by your own camera code. create(layers, opts) spawns one band per layer ({ material, factor, yFactor?, stretch? }, far first; opts = baseY, depth, parent, name), update(p, { x, y, halfW, halfH, zoom? }) moves and rescrolls them for a view, setVisible, destroy. bandUV(view, factor, yFactor, baseY, zoom) is the pixel-exact mapping (scroll rounded to whole screen pixels). IMAGE_W / IMAGE_H = 20 x 11.25 world units per picture. Used by pixelParallax.ParallaxBackground and twoDKit.parallax.