px chased: 000000
about onandemo.js

o-nandemo (何でも) — "anything"

onandemo.js

oneko.js, but anything chases your cursor.

it's already chasing you. who's next:

or mint one of your own.

install
drop-in
<script src="https://unpkg.com/onandemo/dist/onandemo.js"></script>

swap with data-preset="soldier" or "slime" — the files ship inside the package.

npm
bun add onandemo
import { onandemo } from "onandemo";

const destroy = onandemo(); // the cat
onandemo({ sheet: "/dino.png", frameMap }); // anything
make your own
  1. 01 try — summon the bundled three — they're loose on this desktop already.
  2. 02 make — no art skills? the recipe prompts your image model. have pixels? the playground slices anything.
  3. 03 mint — the playground turns your creature into a link. send it; whoever opens it gets chased. nothing uploads — the whole companion lives in the url.
  4. 04 immortalize — pr your companion into the package. it ships on npm, works as data-preset everywhere, and notice.md credits you.
anatomy of a companion — neko.gif

a sheet is a grid of cells; a frame map names them. this is the actual cat — all 32 cells, mapped. hover around.

the classic cat sprite sheet, 8 by 4 cells

cell: hover a cell

the knobs
sheet + frameMap your art and its map
preset "neko" bundled companion by name
speed 10 px per tick
restRadius 48 rest distance
scale 1 display multiplier
zIndex 2147483647 stacking
persist true remembers its spot
the manners
  • bails out under prefers-reduced-motion — no element, no listeners.
  • never intercepts input; hidden from assistive tech.
  • the loop dies when the element leaves the DOM.
  • remembers where it was (persist: false opts out).
  • ten frames per second, always. the shuffle is the charm.

inherited from oneko, engine behavior rather than options. not configurable on purpose.