Most interface physics runs one way. Something moves, and the page watches.
I build Fundamental, a relational field runtime for interfaces. Elements bend a shared field, and the field bends them back. The second half is the part I care about. The field reports what it feels as live CSS variables, so the page can style itself from the result.
Bodies
A body is any element with a data-body attribute. Its value is one or more force tokens.
<field-root render="dots"></field-root> <h1 data-body="attract" data-strength="1.2" data-feedback>Mass</h1> <button data-body="repel" data-range="240">Keep clear</button> <field-root> goes on the page once. It finds every [data-body] element and wires it into the field. With data-feedback, an element gets the write-back. Its --d and --field-density variables change as the field moves around it. Those are ordinary CSS variables. Any rule can read them.
Nothing on screen by default
A field created without a render mode draws nothing. It still runs the simulation and reports through --field-* variables, events, queries and snapshots. The particle canvas is opt-in with render: 'dots', as above. The demo looks like particles, so this surprises people. The particles are one render surface, not the system.
Trying it needs no build step.
import { createField } from 'https://esm.sh/@fundamental-engine/vanilla'; createField(document.querySelector('canvas'), { render: 'dots' }); Where it stands
It is a 0.x preview at 0.12.0, MIT licensed, with seven packages on npm. It ships in production apps and has no third-party adopters yet.
The core API is frozen and grows additively. The query, snapshot, diff and replay APIs are experimental. Swift and Kotlin ports exist at preview status, built from source only.
I haven't shown that this model fits every interface. It fits the ones where an element should behave according to what is near it.
Elements bend the field. The test is what a page does when the field bends back.
Related: https://fundamentalengine.com/
