feat: ✨ lazily-loaded Gerber viewer demo in the blog, served from R2
Embed KiCad's gerbview WASM in the graphics-to-WebGL blog post as a
click-to-load demo that opens the tiny_tapeout board entirely in-browser.
- GerberDemo.astro: lazy iframe embed + cross-origin-isolation reload guard
+ WebGL2/SharedArrayBuffer feature-detect with a poster fallback
- public/gerber-demo/{index.html,boot.js}: self-contained gerbview boot
harness (config seed, MEMFS board preload, argv auto-open)
- board/ tiny_tapeout layers + poster.png committed; wasm/ glue JS committed
(served same-origin — pthread worker can't be cross-origin), while
gerbview.wasm + kicad-resources.bin are git-ignored and served from
Cloudflare R2 (assets.pcbjam.com)
- COOP/COEP require-corp scoped to the post + /gerber-demo routes
(dev: astro.config.mjs + middleware.ts; prod: vercel.json)
- post converted to MDX (@astrojs/mdx) so it can embed the component
- scripts/: sync-demo-wasm.sh, r2-deploy.sh, r2-cors.json
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dca8e41390
commit
57f1f53d26
36 changed files with 242845 additions and 9 deletions
25
site/public/gerber-demo/board/tinytapeout-demo-B_Paste.gbr
Normal file
25
site/public/gerber-demo/board/tinytapeout-demo-B_Paste.gbr
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.9-7.0.9~ubuntu22.04.1*
|
||||
G04 #@! TF.CreationDate,2023-12-15T15:20:45-05:00*
|
||||
G04 #@! TF.ProjectId,tinytapeout-demo,74696e79-7461-4706-956f-75742d64656d,0.9.4*
|
||||
G04 #@! TF.SameCoordinates,PX35e1f20PY8044ea0*
|
||||
G04 #@! TF.FileFunction,Paste,Bot*
|
||||
G04 #@! TF.FilePolarity,Positive*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW 7.0.9-7.0.9~ubuntu22.04.1) date 2023-12-15 15:20:45*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G01*
|
||||
G04 APERTURE LIST*
|
||||
%ADD10R,1.000000X2.510000*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
G04 #@! TO.C,J11*
|
||||
X22950000Y30775000D03*
|
||||
X20410000Y27465000D03*
|
||||
X17870000Y30775000D03*
|
||||
X15330000Y27465000D03*
|
||||
X12790000Y30775000D03*
|
||||
X10250000Y27465000D03*
|
||||
G04 #@! TD*
|
||||
M02*
|
||||
Loading…
Reference in a new issue