Pixel UI/Scenes/Galaxy

Galaxy

A spiral galaxy with planets in orbit; the pointer tilts it.

<piix-scene>WebGL
Colours
Sky
Fade

A golden core, spiral arms of dust and light, six planets on their orbits (two with rings, all lit from the core) and the odd shooting star. The pointer tilts the whole disk toward you.

Installation

<!-- once, anywhere on the page: every component -->
<script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/piixpal.min.js"></script>

Usage

<piix-scene kind="galaxy" height="460px"></piix-scene>

Examples

As a hero

Give Hero a scene and your content sits on top of it.

Now open

Somewhere new

A whole place, drawn in pixels, behind your words.

Explore

On a normal page

sky="none" cuts the sky out, so your page shows through. Add fade to dissolve an edge.

Repainted

Give it a palette and the whole scene is redrawn in those colours.

Fewer colours

levels sets how many shades each colour channel gets. 2 or 3 is very retro.

API reference

AttributeWhat it doesDefault
kindsakura alps lake galaxy rays vortex train poppies castle vistasakura
skynone makes the sky see-through–
fadetop bottom both: dissolve that edge in dithered pixels–
paletterepaint it in a palette instead of its own colours–
levelsshades per colour channel, 2 to 166
pixelsize of one pixel, in px4
dither0 for flat colour, 1 for full dither1
speed1 is normal, 0 holds still1
heightwhen not filling: px or any CSS length480px
fillsit behind the content of the parent element–

Accessibility