You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For STL hunts, `--keep-known` keeps warning-only models under `known/` and the report includes `warningCategoriesByKind` plus `stlDiagnostics` on retained rows. Unknown STL warning text, throws, zero-polygon outputs, and suspicious DOM collapses remain `interesting/`.
Copy file name to clipboardExpand all lines: AGENTS.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ All solid/atlas tags work in both modes. The `.vox` direct-matrix fast path is b
55
55
### Meshing implications (what generators must respect)
56
56
57
57
-**Polygon count is the dominant cost.** Each polygon is one DOM node, one `matrix3d`, one paint. Halving the polygon count is almost always worth a more complex mesher.
58
-
-**Lossy optimization favors low DOM render cost.** The default `"lossy"``loadMesh` / core import path first bakes solid texture swatches, merges visually redundant baked swatch colors, and tries endpoint-preserving static triangle simplification for eligible non-animated meshes. It then scores exact and approximate merge candidates by estimated render cost and keeps the cheapest direct candidate. Static simplification has a relaxed seam-key pass plus a stricter source-vertex fallback, and is accepted only when the final optimized DOM leaf count is lower than the baseline optimizer result. The polygon optimizer can also try a more aggressive triangle-pair merge candidate inside the same boundary displacement budget, but accepts it only when the render-cost win is material and whole-mesh seam diagnostics do not get worse. It avoids per-candidate seam-repair passes in the import path; targeted seam repair remains a lower-level helper for explicit repair workflows.
58
+
- **Lossy optimization favors low DOM render cost.** The default `"lossy"` `loadMesh` / core import path first bakes solid texture swatches, merges visually redundant baked swatch colors, and tries endpoint-preserving static triangle simplification for eligible non-animated meshes. It then scores exact and approximate merge candidates by estimated render cost and keeps the cheapest direct candidate. Static simplification has a relaxed seam-key pass plus a stricter source-vertex fallback, and is accepted only when the final optimized DOM leaf count is lower than the baseline optimizer result. The polygon optimizer can also try a more aggressive triangle-pair merge candidate inside the same boundary displacement budget, but accepts it only when the render-cost win is material and whole-mesh seam diagnostics do not get worse. STL parse results are the conservative exception: they keep the lossless optimizer path and skip ray-based interior culling because public CAD/STL corpora frequently contain shell, winding, or topology quirks where false-positive culling is a visible data-loss bug. It avoids per-candidate seam-repair passes in the import path; targeted seam repair remains a lower-level helper for explicit repair workflows.
59
59
-**Fill ratio matters.** A textured polygon's atlas slice equals its local-2D bounding rect. Empty space inside that slice is wasted bitmap pixels. Prefer shapes with high `area / boundingRect.area`:
60
60
- axis-aligned rectangle = 1.0 (and hits the fastest path)
61
61
- right-isosceles triangle = 0.5
@@ -73,7 +73,7 @@ The current exception is imported skeletal animation. glTF/GLB skinning changes
73
73
| Where JS runs | Where JS does NOT run |
74
74
|---|---|
75
75
| Scene construction (`createPolyScene`, mesh ops, vertex snapping) | Per-frame polygon paint |
76
-
| OBJ/glTF/GLB import, mesh optimisation, coplanar merging | Per-frame Lambert evaluation (dynamic mode is pure CSS) |
76
+
| OBJ/STL/glTF/GLB import, mesh optimisation, coplanar merging | Per-frame Lambert evaluation (dynamic mode is pure CSS) |
77
77
| Atlas planning + rasterisation (one-shot to `<canvas>`, then `toBlob`) | Per-frame atlas redraw (only on baked-mode light changes) |
78
78
| Control input handling (`PolyOrbitControls`, `PolyMapControls`, `PolyTransformControls`) | Per-frame transform recomputation of every polygon for camera/mesh motion — only the scene-root or mesh-root transform changes |
79
79
| Camera math (matrix4 product → scene-root `transform` CSS var) | Per-polygon JS in any hot path |
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# PolyCSS
2
2
3
-
A CSS polygon mesh library. A 3D engine for the DOM. Renders OBJ/MTL, GLB and VOX as real HTML elements transformed with CSS `matrix3d(...)`. Supports colors, textures, lighting, shadows, shapes and animations. Works with React, Vue or plain JavaScript.
3
+
A CSS polygon mesh library. A 3D engine for the DOM. Renders OBJ/MTL, STL, glTF/GLB, and VOX as real HTML elements transformed with CSS `matrix3d(...)`. Supports colors, textures, lighting, shadows, shapes and animations. Works with React, Vue or plain JavaScript.
4
4
5
5
Visit [polycss.com](https://polycss.com) for docs and model examples.
6
6
@@ -82,7 +82,7 @@ export default function App() {
82
82
-`polygons` accepts pre-parsed geometry.
83
83
-`position`, `scale`, and `rotation` transform the mesh wrapper.
84
84
-`autoCenter` shifts the mesh bbox center to local origin.
85
-
-`meshResolution` chooses `"lossy"` (default) or `"lossless"` optimization.
85
+
-`meshResolution` chooses `"lossy"` (default) or `"lossless"` optimization. STL imports use the conservative lossless path in both modes.
86
86
-`castShadow` emits CSS-projected shadows in dynamic lighting mode.
87
87
88
88
### Controls
@@ -160,6 +160,7 @@ scene.add(mesh);
160
160
Supported formats:
161
161
162
162
- OBJ + MTL, including `map_Kd` textures and UV coordinates.
163
+
- STL triangle meshes, including binary Magics face colors. STL has no standard units, textures, UVs, or hierarchy, so imports skip lossy simplification and ray-based interior culling.
163
164
- glTF / GLB, including embedded images and `TEXCOORD_0`.
164
165
- MagicaVoxel `.vox`, with direct voxel fast paths when eligible.
Copy file name to clipboardExpand all lines: packages/core/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
# PolyCSS
6
6
7
-
A CSS polygon mesh engine. A 3D renderer for the DOM. Renders OBJ, glTF, GLB, MagicaVoxel `.vox`, and generated primitives as real HTML elements transformed with CSS `matrix3d(...)`. Supports colors, textures, lighting, shadows, controls, selection, animation, and per-polygon interaction. Works with React, Vue, custom elements, or plain JavaScript.
7
+
A CSS polygon mesh engine. A 3D renderer for the DOM. Renders OBJ, STL, glTF, GLB, MagicaVoxel `.vox`, and generated primitives as real HTML elements transformed with CSS `matrix3d(...)`. Supports colors, textures, lighting, shadows, controls, selection, animation, and per-polygon interaction. Works with React, Vue, custom elements, or plain JavaScript.
8
8
9
9
Visit [polycss.com](https://polycss.com) for docs and model examples.
-`position`, `scale`, and `rotation` transform the mesh wrapper.
101
101
-`autoCenter` shifts the mesh bbox center to local origin.
102
-
-`meshResolution` chooses `"lossy"` (default) or `"lossless"` optimization. Lossy also applies bounded seam repair.
102
+
-`meshResolution` chooses `"lossy"` (default) or `"lossless"` optimization. Lossy also applies bounded seam repair; STL imports use the conservative lossless path in both modes.
103
103
-`castShadow` emits CSS-projected shadows in dynamic lighting mode.
104
104
105
105
### Controls
@@ -165,6 +165,7 @@ scene.add(mesh);
165
165
Supported formats:
166
166
167
167
- OBJ + MTL, including `map_Kd` textures and UV coordinates.
168
+
- STL triangle meshes, including binary Magics face colors. STL has no standard units, textures, UVs, or hierarchy, so imports skip lossy simplification and ray-based interior culling.
168
169
- glTF / GLB, including embedded images and `TEXCOORD_0`.
169
170
- MagicaVoxel `.vox`, with direct voxel fast paths when eligible.
0 commit comments