Use this before handing work back to a user or another agent.
npm run typecheck
npm run build
npm run build:demo
git diff --check -- .- Root
index.html,demo.html,events.html,constructor.html, andreact.htmleach contain one#rootand one Vite module script. - Root HTML files do not contain pasted SVG polygons, static gradient definitions, or page CSS.
src/pagesimports the reusable renderer/editor fromsrc/squircle.legacy-static/is present in.gitignore.docs/examples/README.md,docs/react/README.md, anddocs/design/README.mddescribe the current source of truth.- Public API names use
text,textStyle, andtextColor;GPUappears only as example content or deprecated compatibility wording.
Open the Vite dev server and inspect:
/index.html: hero scene renders through React, palette buttons recolor it, and the single-state drawer can select a state./demo.html: gallery renders many React-generated presets, clicking a preset updates the main scene, and hovering a squircle swaps only material/color state./events.html: focused sibling-hover demo renders one three-layer scene, palette buttons recolor it, and function-valuedlayer.hovercrossfades non-hovered layers to wireframe./constructor.html: editor renders three default plain wireframe layers, supports layer add/delete/reorder/visibility, click selection, inspector deselection, theme switching, scene camera controls, per-layer geometry controls, palette controls, effect controls, grain controls, stroke controls, and generated React code copy./react.html: mirrors the constructor page for compatibility.
Expected results:
- No page renders all-black squircles.
- Solid and glass
metalandmesheffects are clipped to the top face and animate without moving layer geometry. - Solid and glass
grain: truevariants show subtle multiply-blended grain only inside the top face, not across the scene background. - Solid and glass
metaleffects look projected onto the tilted top plane; no individual circular blob edges are visible in a paused frame. - Chrome/Firefox
metalusessq-top-effect-metal-blur; Safari/iOSmetalusessq-top-effect-metal-softand has no animated SVG blur filters. - Solid and glass
mesheffects look like a smooth four-corner bilinear gradient; no hotspots, blobs, waves, or noise are visible. - Geometry stays fixed when selection or hover changes.
- Camera level affects the whole scene and serializes as
geometry.angleDegrees. - Radius, height, and line-size edits affect only the selected layer and serialize into that layer's
geometryobject. - Reloading
/constructor.htmlrestores layers, scene camera, theme, selection, and Code drawer state from localStorage. - No hover state changes layer gaps, transforms, scale, shadows, filters, or halos.
- A layer with
visible: falsestays fully hidden and does not block lower-layer hover on variant-only hover; it may fade in and act as a hover target only when hover explicitly setsvisible: true. - Hover states that only change text or line keep the underlying solid, glass, wireframe, metal, mesh, and grain surface stable; only the annotations crossfade.
- Hover states crossfade smoothly regardless of material, palette, effect, grain, text, or line changes.
- Programmatic changes to simple visual layer state, such as text, line, palette, material, annotation style, and visibility on non-effect surfaces, crossfade with
transitionMs; same-surface text/line changes and visibility-only changes also crossfade onmetal,mesh, andgrainlayers; actual surface-recipe swaps involvingmetal,mesh, orgrainupdate instantly to avoid blink-prone duplicate effect layers. - Visibility toggles still crossfade on
metal,mesh, andgrainlayers that also define hover configs. - Geometry, camera, offset, theme, and layer-order changes update structurally instead of morphing.
- Function-valued
layer.hoverhandles standard sibling hover without page-level layer rewriting. - Layer event callbacks fire from the layer group and can still drive external UI state for custom interactions.
- Wireframe text uses one live SVG
<text>element with gradient stroke, not duplicated label copies or primitive letter parts. - Solid text uses readable filled text on the top plane.
- Line and text annotations stay glued to the top plane.
- Transparent SVG output keeps the body background transparent.
npm run buildemitsdist/sqircle.js,dist/style.css, and type declarations.npm run build:demoemits all five React-backed HTML pages.- Generated constructor code imports
SquircleScene,SquircleLayerConfig, and@dstackai/sqircle/style.css. SquircleSceneaccepts 0-N layers andtheme="light" | "dark".SquircleSceneexposes layer click only; hover behavior is configured throughlayer.hover.SquircleEditorusesSquircleScenefor preview and exports current React code.
Confirm any visual change still follows the design docs:
- Superellipse points are generated from
src/squircle/geometry.ts, not hand-written. - Layer
geometrymay override onlyexponent,prismHeight, andinlayScale; shared camera/projection/viewBox settings remain scene-level. - Front-facing side wall uses hidden-surface removal from the sampled superellipse normals.
- Gradients use
userSpaceOnUseand palette constants fromsrc/squircle/palettes.ts. - Effects use the generated top polygon as the clip path.
- Effects author blob positions, blur, radius, and drift from local
halfSize/2 * halfSize, then project the color field with the label/isometric matrix. - Filled faces retain subtle same-family edge strokes.
- Wireframe, line, and label stroke widths remain configurable data.