Skip to content

About

the lattice's Patchwork

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

lattice

knitting together, in patchwork: write a pattern in javascript, watch it knit, check it, and turn it into kcode for a kniterate, with everyone else in the project there too. it's at lattice.patchwork.inkandswitch.com.

what's here

  • packages/lattice: the frame. your projects down the side, a project's panes in the middle, inspectors down the right, and the knitting tools that are lattice's own (the animation, the 3d view, checks, yarns, swatches and machines).
  • packages/knitoutjs: knitout in patchwork. the editor, the visualiser, building a pattern, and the standalone "Knitout JS".
  • packages/wm: the panes, the files, who else is here, and calls.
  • packages/versions: the history down the right.
  • latticex: a terminal on your computer, shared into a project.
  • src/main.ts, vite/, scripts/: the site, and running it.
pnpm install
pnpm dev        # the site, and a tunnel to send someone (--no-tunnel for none)
pnpm test
pnpm build

an install while pnpm dev's running (a new pkg-base, say) starts the site again, on the same port, and the tunnel stays where it is.

the tunnel's a new trycloudflare.com address each time. for one that stays the same, make a named tunnel on a domain your cloudflare account has, once:

cloudflared tunnel login
cloudflared tunnel create lattice-dev
cloudflared tunnel route dns lattice-dev lattice-dev.example.com

then LATTICE_TUNNEL_HOST=lattice-dev.example.com pnpm dev (export it from your shell's profile to have it always), and the link to send is the same every time. LATTICE_TUNNEL_NAME is the tunnel's name, if it isn't lattice-dev.

who made it

lattice is by chee and Mimi Reyburn, at ink & switch, on patchwork.

most of the knitting is other people's work, carried over:

and the patchwork side:

  • versions is by Mimi Reyburn, made from drafts in patchwork-pkg-base.
  • calls are made from chee's call experiment in patchwork.
  • ink (drawing on someone's screen while you follow them) is drawn by perfect-freehand, Steve Ruiz's (MIT), set as tldraw sets it, in chee's port from aftersun, whose way of pinning ink to the words it's on it takes too.
  • faces in a call are found by google's mediapipe face detector (Apache 2.0), fetched from jsdelivr, not kept here.
  • patchwork and automerge are ink & switch's.
  • solid-automerge (packages/lattice/vendor/solid-automerge.js) is chee's, and amtext (packages/lattice/vendor/amtext), the .patchworkfolder format (a .latticeproject is one), is from knit.patchwork.inkandswitch.com.

the fonts lattice brings (packages/lattice/fonts) are all under the SIL Open Font License: Jost, Atkinson Hyperlegible Next, Fraunces, IBM Plex Mono (IBM), JetBrains Mono, Victor Mono and Fantasque Sans Mono (Jany Belluz), each by its project's authors.

licence

knitoutjs and wm are AGPL-3.0-or-later. the code carried over keeps its own: the visualiser, the kniterate backend and lezer are MIT (their notices are in packages/knitoutjs/core/vendor/LICENSE.md), as is perfect-freehand (its notice is in packages/wm/vendor/LICENSE.md), and the fonts are OFL (each folder has its LICENSE).

About

the lattice's Patchwork

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages