Components/Pixel type

Pixel type

<piix-type> turns any font into chunky blocks with an extruded shadow. Pixels rain in on load, lift around the cursor and ripple when clicked. Pals can walk on it: it exposes the real letter outline.

Customise

Click the letters for a ripple. The bug walks the actual tops of the blocks.

piix-type
Shape
Shadow
Replay

    

Attributes

<piix-type>
AttributeWhat it doesDefault
textthe text; | for a line breakelement text
rowsrasterising resolution: letter height in blocks18
cellsize of one block in CSS px8
fitshrink blocks to fit the container widthoff
color / shadeblock colour / shadow colourcurrentColor / none
depthshadow depth, in blocks1
gapgap between blocks, as a fraction of a block0.1
shapesquare dot round plus diamond: how each block is drawnsquare
font / weightfont family and weight to rasterise; any loaded font worksinherited / 800
alignleft center right for multi-line textleft
intronone skips the rain-inon

Methods: replay() rains it in again. Pals use piixSurface(x) to find the letter tops and piixImpact(x, y) to send a ripple when they land.