Repository navigation
Public demo: the playground's viewport over the shipped scenes, with no Python - #101
Merged
Merged
Conversation
…no Python static.html grows from a scene dropdown into an editable static demo that GitHub Pages can host: - The playground's ViewerPane, object tree, render panel, view cube and design language, fixed into a three-column desk. No editor, Simulate or Optimize. - A parameter panel: slider and field per free parameter, grouped by the object whose handle moves it. An edit writes the parameter buffer at once, then installs shaders rebuilt at the new values, a values-only upload. - The construction overlay from exported compile data. Handles bound to a free parameter follow it, and dragging one edits it. Constraint-driven parameters are read-only, drawn held, and name the constraint. - Wireframe and feature edges from dual contouring on jax-js; the edges are a dihedral crease test, not the Python lattice classifier (not ported). - STL export of the current values at a chosen resolution. - WebGPU check with a message; jax-js on WebGPU or Wasm; public-tier tags. Data: cadjoint/viewer/schema/demo.py (DemoScene, emitted to payloads.d.ts), written by `python -m cadjoint.viewer.demo` into frontend/src/static/bundle, each scene run in a fresh process because unnamed primitives are numbered per process. tests/viewer/test_demo_bundle.py keeps the bundle current. Shared changes: ViewerPane takes an optional lockedHandle (absent in the playground, so behaviour there is unchanged); tier.ts's setter is stateTier. .github/workflows/demo.yml builds the demo and publishes to gh-pages/demo only when started by hand with deploy ticked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
frontend/static.htmlgrows from a scene dropdown into an editable static demo of cadjoint's playground that GitHub Pages can host. There's no Python server: the browser builds the WGSL from the scene graph, and jax-js does the meshing.ViewerPane, object tree, render popover, view cube and design language, laid out in three fixed columns. There's no editor, and no Simulate or Optimize panels.Data
cadjoint/viewer/schema/demo.py(DemoScene, emitted intopayloads.d.ts).python -m cadjoint.viewer.demo(ornpm run bundle:static) writes it tofrontend/src/static/bundle.cylinder_heightvscylinder_3_height).tests/viewer/test_demo_bundle.pykeeps the committed bundle current with the scenes. It compares floats to float32 round-off.Shared changes
ViewerPanetakes an optionallockedHandleprop. The playground doesn't pass it, so its behaviour is unchanged.tier.ts's setter is renamedstateTier.Deploy (not enabled)
.github/workflows/demo.ymlonly runs when started by hand, and only publishes (togh-pages/demo/) withdeployticked.docs.ymlalready ownsgh-pages, and Quarto replaces the branch on each docs deploy, which would deletedemo/. The durable option is to build the demo insidedocs.ymlinto_site/demo.frontend/src/static/README.mdhas the details and local run instructions.Tests
demoParametersanddemoBundletests.npm run e2e:static: 3 passed. It loads a scene, moves a slider, checks the render changed with no pipeline rebuild, checks a constraint-driven parameter is read-only, and exports an STL.tests/backends/test_wgsl_frontend.py,tests/test_wgsl_scene_codegen.py, schema, API contract, core boundary, demo bundle): 142 passed, also with-n 4.ui-auditdesign linter.Out of scope
🤖 Generated with Claude Code