@qntx/q
v0.2.0
Published
Independent MIT living cube pet.
Readme
@qntx/q
Independent MIT living cube pet named Q.
Default: body #000000, eyes #ffffff, cube 191×191×172 at roundness 0.73. Moods: the Grok bot named states (sleeping … celebrate).
Playback
import { Q } from "@qntx/q/react";
export function App() {
return <Q mood="happy" size={240} />;
}import { createQ } from "@qntx/q/dom";
const mount = createQ("#stage", { size: 240 });
mount.play("listening");import { loadQ } from "@qntx/q";
const q = loadQ();
q.play("happy");
const frame = q.evaluate();play eases 500 ms. update keeps the current sequence step. evaluate lerps the live pose and does not schedule animation frames.
Authoring
import {
loadQ,
previewFrame,
cloneStoredSequence,
patchSequencePose,
parsePayload,
serializePayload,
} from "@qntx/q";
import { paint, startPaintLoop } from "@qntx/q/dom";
const runtime = loadQ({ payload, mood: "excited" });
const stop = startPaintLoop(svg, (now) =>
hold ? previewFrame(payload.pet, hold, view) : runtime.evaluate(now, view),
);
runtime.update(patchSequencePose(payload, "happy", 0, { headX: 12 }));previewFrame snapshots a stored expression (timeMs: 0, no blink or ambient). startPaintLoop owns visibility-aware requestAnimationFrame.
This package does not include studio persist, pointer orbit, logo remesh, header hover, or a catalog showcase sequence.
QPayload version: 1 is unstable while this package is 0.x. That is not a schema freeze.
