cad-editor/src/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven a4fc34c6a2 feat(web): render hatches on WebGL2 via a texture-backed renderer
WebGL2 has no vertex/fragment storage buffers, so the batched storage-buffer
hatch renderer (hatch_gpu) is disabled on wasm and real hatch fills never
rendered on the web build — the pick highlighted the boundary and the command
then appeared to cancel (issue #204).

Add a wasm-only per-hatch renderer (hatch_web_gpu + hatch_web.wgsl) that packs
the variable-length boundary / family / dash arrays into one RGBA32F data
texture read with textureLoad, instead of the fixed-size uniforms of the
wipeout path. This removes the MAX_FAMILIES (16) / MAX_HATCH_BOUNDARY_VERTS
(1024) / MAX_DASHES (128) caps, so every hatch — solid, gradient, and
arbitrarily complex line patterns — renders on the web. The fill algorithm
(in_polygon, per-family line/dash/dot, gradient, LOD, double-single vertex
transform) is identical to the desktop path; only the array ACCESS changes.
Pattern phase is anchored at world_origin with the boundary stored raw, and
scale / gradient-range clamped, to match the desktop batched renderer exactly.

Native (hatch_gpu + hatch.wgsl) and the wipeout mask renderer are untouched;
the new module and pipeline are gated on target_arch = "wasm32".

Also silence the resulting (and pre-existing) wasm-only dead-code warnings for
native-only paths so both the native and web builds compile clean.

Closes #204.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 00:53:51 +03:00
..
commands feat(annotative): synthesize per-object contexts + editable UI 2026-07-13 22:38:29 +03:00
update feat(annotative): synthesize per-object contexts + editable UI 2026-07-13 22:38:29 +03:00
view feat(annotative): synthesize per-object contexts + editable UI 2026-07-13 22:38:29 +03:00
alias.rs feat(alias): centralize command aliases in user-editable ocad.pgp (#286/#288) 2026-07-10 12:39:22 +03:00
automation.rs fix(rotate): apply a typed angle right after the centre (#159) 2026-06-25 19:58:45 +03:00
command_driver.rs fix(precision): keep BLOCK base and TEXT/MTEXT insertion points in f64 (#311) 2026-07-12 00:34:26 +03:00
config.rs refactor(config): consolidate settings into one grouped settings.json 2026-07-10 16:41:34 +03:00
document.rs fix(precision): keep typed coordinates exact in f64 (#311) 2026-07-11 21:26:40 +03:00
expr_eval.rs fix(expr-eval): bound eval_to_string against super-linear DoS 2026-06-28 22:41:02 +03:00
helpers.rs fix(precision): keep typed coordinates exact in f64 (#311) 2026-07-11 21:26:40 +03:00
history.rs feat(sysvars): persist Ortho, running OSNAP and Isolate in the drawing 2026-07-10 15:45:08 +03:00
layers.rs refactor: move resource/IO root modules under io/ 2026-06-26 23:06:40 +03:00
mod.rs feat(web): render hatches on WebGL2 via a texture-backed renderer 2026-07-14 00:53:51 +03:00
model_ops.rs fix(web): restore wasm build broken by SECTION + file association 2026-06-29 17:13:17 +03:00
mtext_editor.rs fix(precision): keep BLOCK base and TEXT/MTEXT insertion points in f64 (#311) 2026-07-12 00:34:26 +03:00
plugin_host.rs fix(plugin): auto-register unknown layers so added entities survive DWG save (#252) 2026-07-02 20:36:16 +03:00
properties.rs feat(annotative): synthesize per-object contexts + editable UI 2026-07-13 22:38:29 +03:00
recent.rs feat(thumbnail): embed a DWG preview on save, show it on the Start page 2026-07-10 23:03:23 +03:00
settings.rs refactor(config): consolidate settings into one grouped settings.json 2026-07-10 16:41:34 +03:00
style_ops.rs fix(annotative): make scale-manager rename and edits actually persist 2026-07-13 14:37:33 +03:00
text_inline.rs fix(precision): keep BLOCK base and TEXT/MTEXT insertion points in f64 (#311) 2026-07-12 00:34:26 +03:00
visibility.rs refactor(scene): group modules into role-based subfolders 2026-06-16 11:33:46 +03:00