ParallaxBackground
A parallax background behind a 2D scene: up to four layers (`sky`, `far`, `mid`, `near`), each a 320 x 180 picture on the `pixelParallax.parallax` shader scrolling at its own factor of the camera's motion, pixel-crisp. Put it on any scene entity; it follows `camera`, or the camer…
pixelParallax.ParallaxBackground
A parallax background behind a 2D scene: up to four layers (sky, far, mid, near), each a 320 x 180 picture on the pixelParallax.parallax shader scrolling at its own factor of the camera's motion, pixel-crisp. Put it on any scene entity; it follows camera, or the camera the renderer is using. Needs no sibling components. Fields and an example are in the package README.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2pixelParallax.ParallaxBackground: a parallax background behind a 2D scene, with no other kit. Up to four layers, far to near, each a picture that scrolls at its own fraction of the camera's motion; pixel-crisp at any window size. Put it on any scene entity: local bg = entity.spawn("Background") bg.component.add("pixelParallax.ParallaxBackground", { sky = asset.resolve("my.art.sky", "material"), skyFactor = 0, far = asset.resolve("my.art.hills", "material"), farFactor = 0.2, mid = asset.resolve("my.art.trees", "material"), midFactor = 0.45, baseY = 0, }) Each layer picture is 320 x 180 art pixels (20 x 11.25 world units at 16 per unit), repeats sideways, and uses a material on the pixelParallax.parallax shader. It follows `camera` when set, otherwise the camera the renderer is using; an orthographic camera gives exact pixels. Every peer draws its own background; nothing is synced.
key( ) → string
build( ) → void
cameraId( ) → string
tick( ) → void
update(_dt: ?) → void
| arg | type | description |
|---|---|---|
| _dt | ? |
editorUpdate(_dt: ?) → void
| arg | type | description |
|---|---|---|
| _dt | ? |
onDestroy( ) → void
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.