Example page · Ex. 10 Class IV · Curiosities
glyphfield
A painting that is an endpoint. Poll it and the field of glyphs morphs a little further.
- Each glyph is an element with a stable id. The server sends its weight, softness and tilt as custom properties; there is no canvas and no
requestAnimationFrame. innerMorphtouches only the attributes that changed. CSS transitions paint the three seconds between one state and the next.- The placard is in the response too. Even the wall label is server-rendered.
- The state is a function of the clock. Everyone polling right now sees this painting at this state. Stop polling and it stops.
- Kind
- art experiment
- Language
- Ruby
- htmx
- 4.x
- Status
- experimental
- Licence
- CC BY-NC 4.0
- Edition
- 1 of ∞
§1Description
What it is.
A small Ruby server that holds one field of letters and a clock, and answers every GET with the painting as it stands.
How it works.
Most htmx demos are about state you own: a form, a cart, a row you can delete. glyphfield is about state you visit. Ninety-six letters from its own name, each with a weight, a softness and a tilt, drifting on three slow waves. The server never pushes; the wall asks, and morph hangs the answer in place.
It exists to find out what hypermedia looks like when nobody is filling anything in. The answer, so far, is that the browser's transitions make a decent paintbrush.
- Name
- glyph + field, as in wheat and as in physics. Both move without being asked.
- Where it runs
- Any wall that can poll. Best on a large screen in a quiet room, left alone.
- Not the same as
- A screensaver. It only moves while something asks it to.
§2Source
- Maintainers
- example-maintainer, example-2Made-up handles: an example has no people
- Repository
- NoneAn example, listed to show the page at size
- Register
- projects.jsonEx. 10, an example number: examples never take a register No.
- Skin
- skin-glyphfield.cssworn inside fig. 1 only
- Frame
- Signalthe house frame; a skin dresses only the demo window
- Run
ruby field.rbserves the painting on:4567/field- Hang
<div hx-get="/field" hx-trigger="every 3s" hx-swap="innerMorph">- Light
field.css. The transitions are the brushwork; don't skip it- Needs
- htmx 4.x · Ruby 3.3 · one variable font
- Edition
- open. Every running server shows the same painting