No description
Find a file
Joey Yakimowich-Payne d4622b2cb4
feat(chess): spring-physics drag with cursor-release FLIP animation
Dragging a piece now follows the cursor with spring lag and a subtle tilt,
scales up with a deeper shadow while lifted, and on a valid drop glides
smoothly from the cursor-release position into the destination square.
Invalid drops spring back to the origin. Dragging is disabled entirely
for the non-playing side (no grab cursor, no transforms, no drag events).

Cursor tracking uses a document-level `dragover` listener — the `drag`
event on the source element is throttled by Chromium and reports 0/0 in
Firefox, so is unusable for smooth tracking.

Replaces motion`s `layoutId` FLIP with a manual implementation. Motion
measures layout rects without inline transforms, so `layoutId` always
animated from the source square instead of the cursor position. The new
approach stashes the transformed `getBoundingClientRect` on dragend and
consumes it from a `useLayoutEffect` at mount, jumping the spring to the
delta and letting it animate home — producing a true release-to-target
FLIP.
2026-04-17 13:30:36 -06:00
.github/workflows chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
.sisyphus chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
docs chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
packages feat(chess): spring-physics drag with cursor-release FLIP animation 2026-04-17 13:30:36 -06:00
scripts feat(rete): add replay engine + state-hash determinism verifier (P3.3) 2026-04-16 15:25:13 -06:00
.gitignore chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
eslint.config.js feat(rete): add append-only event log with monotonic sequence (P3.1) 2026-04-16 15:24:11 -06:00
lefthook.yml chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
LICENSE chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
package.json feat(rete): add replay engine + state-hash determinism verifier (P3.3) 2026-04-16 15:25:13 -06:00
playwright.config.ts fix(rete): inject clock into EventLog; use tsc for DTS; fix cycle.test.ts private access; add Playwright worker limit 2026-04-16 18:25:49 -06:00
README.md chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
tsconfig.base.json chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
tsconfig.json chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
vitest.workspace.ts chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00

@paratype

A Doorenbos-style Rete II rules engine for TypeScript games, with an authoritative WebSocket chess demo.

Packages

Docs

Getting Started

bun install && bun run check