@theinterfaces-lab/loop
v0.1.0
Published
Loop is the wire — carry normalized packets between inputs and outputs.
Readme
@theinterfaces-lab/loop
Loop is the wire. You author the two ends; Loop carries a normalized packet between them and never renders anything itself.
By Interfaces Lab.
Install
npm install @theinterfaces-lab/loopOr use directly in the browser — no build step required:
<script type="module">
import loop from "./dist/index.js";
</script>Quick start
import loop from "@theinterfaces-lab/loop";
const dpad = loop.input("dpad");
loop.tick(() => {
el.style.transform = `translate(${dpad.value.x * 100}px, ${dpad.value.y * 100}px)`;
});Examples
Open with a local static server (npx serve examples):
| Example | What it shows |
|---------|---------------|
| 01-live-text.html | Keyboard text → live mirror (data path) |
| 02-dpad-square.html | D-pad moves a square — keyboard or gamepad (value Vec) |
| 03-sliders-cube.html | Sliders rotate a 3D cube — gamepad, MIDI, or on-screen (value scalars) |
API
loop.source(def) loop.transform(def) loop.sink(def) loop.component(def)
loop.pipe(...stages) loop.connect(a, b)
loop.input(name) loop.output(name) loop.tick(fn)See SPEC.md for the full v0.1 specification.
Develop
npm install
npm run build
npm run validateLicense
MIT
