Skip to content

feat: polyhedra zoo, Glyph rename, camera-wraps-scene, rasterizer + gallery overhaul#3

Merged
apresmoi merged 40 commits into
mainfrom
feat/polyhedra-zoo
May 23, 2026
Merged

feat: polyhedra zoo, Glyph rename, camera-wraps-scene, rasterizer + gallery overhaul#3
apresmoi merged 40 commits into
mainfrom
feat/polyhedra-zoo

Conversation

@apresmoi
Copy link
Copy Markdown
Owner

Summary

Big consolidated branch covering several connected workstreams since main.

Core / geometry

  • Polyhedra zoo — 39 new polygon factories in @glyphcss/core covering the Platonic solids, Kepler-Poinsot stars, Archimedean / Catalan duals, prism / antiprism / bipyramid / trapezohedron families, and round primitives (sphere, cylinder, cone, torus, pyramid).
  • Geometry registryresolveGeometry(name, opts) lookup over 44 generators (used by <GlyphMesh geometry=\"…\"> in React / Vue / HTML).
  • Cap winding fixes for the axially-symmetric helpers; cuboctahedron face-order fix.

API surface

  • Renamed Glyphcss*Glyph* across components, hooks, vanilla factories, and custom-element tags. No BC shims.
  • <GlyphCamera> is the ergonomic default — an orthographic alias. Perspective remains explicit.
  • Tree flipped to camera-wraps-scene in React, Vue, and the custom-element side.
  • Geometry shortcut wired through <GlyphMesh geometry=\"…\"> in all three bindings.

Rasterizer

  • Per-pixel barycentric depth + half-space inside test — fixes the angle-dependent silhouette "bread" artifact.
  • Always-on backface culling.
  • Always-on 4×4 Bayer ordered dithering between adjacent ramp glyphs.
  • Opt-in Gouraud smooth shading with crease angle.

Examples scaffold

  • New examples/{vanilla,html,react,vue}/{baked-shapes,solid-mesh,hotspot} apps demonstrating cross-path parity. All use autoSize: true.

Gallery

  • Migrated website/src/glyph-runtime.ts to the public createGlyphScene API so library fixes propagate.
  • Primitives bucket with all 44 generators in the sidebar.
  • Hotspot positioning fixes (inline-block + isolation: isolate), reconnected line-height slider, fixed vertical drag direction.
  • Removed axes / show-ground / light-helper toggles and dots / braille / runes glyph palettes.
  • Wireframe N-gon fix — cube faces no longer render with fan-triangulation diagonals.
  • CodePanel now updates when primitives are selected.

autoSize

  • New scene option that auto-fits cols/rows to the host's box via ResizeObserver + monospace cell probe.

Docs

  • Intro page demo now shows the apple mesh in solid mode (was a hand-coded wireframe cuboctahedron).
  • New api/{react,vue,html}.mdx pages registered in the sidebar.

Test plan

  • pnpm test — full vitest suite across core / glyphcss / react / vue
  • pnpm build — packages + website (catches DTS / declaration breakage that vitest misses)
  • /introduction renders the apple mesh in solid mode
  • /gallery — switch between primitives, OBJ / GLB / VOX, wireframe + solid, all glyph palettes
  • Wireframe of primitive-cube shows 12 edges only (no face diagonals)
  • CodePanel updates when changing primitives; cylinder snippet includes upright rotation
  • Each examples/<framework>/<scene>/ app boots and renders against the published API

apresmoi added 30 commits May 20, 2026 01:16
@apresmoi apresmoi merged commit c771c8f into main May 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant