Commit 443d7e0
Add a single file browser demo
Nothing to install and nothing to download: index.html is a small standalone
version of the same idea, in about 1600 lines of HTML, CSS and JavaScript
with no dependencies and no build step.
It carries over the parts that matter: the Scratch 3 shapes drawn as SVG
paths from the same puzzle geometry, one continuous drawer that glides
between sections, dragging with snapping, C shaped mouths, reporters that
drop into slots, and the Python appearing live beside you to copy or save.
A small interpreter means Run really works in the page, and clicking a loose
block still reports its answer in a bubble. Each block is described once and
that description drives all three things: how it is drawn, the Python it
generates and how it runs. Pointer events throughout, so a mouse, a pen or a
finger all work.
Twenty six blocks across five categories. Everything else stays in the
desktop app, which the page links to.
The glide and the interpreter step on timers rather than animation frames,
so both still finish properly in a background tab where no frames are drawn.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 8212381 commit 443d7e0
2 files changed
Lines changed: 1636 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
333 | 340 | | |
334 | 341 | | |
335 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
336 | 369 | | |
337 | 370 | | |
338 | 371 | | |
| |||
0 commit comments