Commit Graph
469 Commits
Author SHA1 Message Date
dotCooCoo 2ee4537c65 Merge main into feat/image-craft-texture 2026-11-16 16:45:08 -08:00
Chris Hassebrook b2c7b0e83d Merge pull request #258 from storytold/function-node-parity
Function node parity
2026-11-16 19:25:35 -05:00
chasse20 591845cfa2 Auto: Preserve finite HDR constants in sharpen
Use wider arithmetic only when finite inputs overflow a Float32 axial difference. Add a regression while preserving the existing ramp results.
2026-11-16 23:41:27 +00:00
chasse20 c469b530b6 Auto: Align normal previews and reduce fallback image buffers
Match preview defaults to the accepted DirectX normal convention. Preserve finite HDR blur values and infer missing dot operands from the connected vector width.

Avoid full-size fallback images in channel shuffle and raster compositing, skip incompatible background resampling, and return early for missing gradients. Complete scoped naming, spacing and comment cleanup and remove the unused workspace bytemuck declaration.

Integrate main's shared format readers and external web library resources.

Validated with affected-package release tests, Clippy, layer and wasm checks, panic_hunt, offscreen snapshots, and comparable resource probes.
2026-11-16 23:03:07 +00:00
FredApps e9b270eb94 web: ship the SBS library's bitmaps beside the wasm, not inside it (#263)
* web: ship the SBS library's bitmaps beside the wasm, not inside it

The SBS library import (#219) embeds every file under assets/sbs into
every build, the browser one included. Its resources/ bitmaps are already
compressed PNG/EXR/BMP (14.1 MB, deflate saves 1%), and with them the
release wasm grew from 14.3 MB to 33.3 MB, past the 24 MiB gate in
packaging/web/package.sh that guards Cloudflare Pages' 25 MiB file cap.
The nightly Release dry run has failed on Web (wasm) since.

For wasm32 the formats build script now leaves resources/ out of the
embedded library and lists it as EXTERNAL_ASSETS. index.html copies
assets/sbs/resources to sbs/resources in the dist, and the web app
downloads those files at startup (in parallel, before the session is
created) and hands them to library::install, so library::read serves
them as before. A failed download is logged and surfaces as a missing
asset on the nodes that use it; startup goes on. Native builds still
embed everything.

* web: bound the startup download of the library resources

A response that sends headers and then stalls would keep download_library,
and with it the loading screen, pending for good. One AbortController now
covers every request and body, aborted after two minutes; whatever is still
pending fails, is logged, and startup goes on without it.
2026-11-16 22:12:24 +01:00
FredApps c382a005f0 Merge pull request #260 from storytold/onee/778-craft-mesh
formats: read 3D-view meshes through craft-mesh
2026-11-16 13:45:01 +01:00
FredApps 2eeaf1fbff formats: center placed positions in f64 before converting to f32
A unit quad with a large node translation was collapsing: the world-space
positions were cast to f32 first, and at magnitude 2^25 the f32 spacing is
4, so all four corners rounded to one point. normalize_to could not recover
the shape. Center and scale in f64, then convert.
2026-11-16 13:01:50 +01:00
FredApps 0708c4d9d8 Merge remote-tracking branch 'origin/main' into onee/778-craft-mesh
# Conflicts:
#	Cargo.lock
2026-11-16 12:38:46 +01:00
dotCooCoo caf79e955f Merge main into feat/image-craft-texture 2026-11-16 03:23:48 -08:00
FredApps b71c02cacd Merge pull request #259 from storytold/onee/789-svg-shared-tree
#789: read SVG resources through craft-svg's bounded tree and draw
2026-11-16 12:14:36 +01:00
FredApps 9eb2a8d5db formats: inverse-transpose normals, mirrored winding and all-or-none UVs for placed meshes
Normals of a placed mesh now go through craft_mesh::transform_normal, so a
non-uniform scale leaves them perpendicular to the surface. A mirrored
placement (craft_mesh::is_mirror) has its triangles' winding reversed so they
keep facing out. When any placed mesh has no UVs the combined mesh keeps none,
so load_mesh projects them instead of leaving that mesh on one texel.

Refs storytold/craft-libs#778
2026-11-16 12:11:06 +01:00
FredApps ff00b06a4c #789: share one usvg nesting budget between an SVG and the SVGs it embeds
The document gets 32 levels and the image resolver is seeded with them, so
embedded SVGs (and their embeddings) only get the remaining 32 of a 64-level
total, about 1 MB of usvg stack. Previously the tree depth of 64 applied to the
document and to each embedded SVG separately.
2026-11-16 11:33:51 +01:00
FredApps c3860d2300 formats: read 3D-view meshes through craft-mesh
OBJ and glTF/GLB meshes for the 3D view now come from craft-mesh's obj and
gltf readers (craft-libs main 57288eda) instead of the tobj and gltf crates.
Meshes are placed with Scene::instances, so a mesh under a transformed parent
node takes its parent's transform. Normalisation, box UVs, tangents and the
vertex/triangle limits stay in the app.

Refs storytold/craft-libs#778
2026-11-16 11:24:49 +01:00
FredApps e25de7b9a8 #789: read SVG resources through craft-svg's bounded tree and draw
The SVG node's resources were parsed and drawn with a direct usvg/resvg 0.47
dependency, so a hostile file could expand entities, nest past the stack or
allocate layers without a bound. Parsing now goes through craft_svg::tree
(preflight on bytes, SVGZ, entities, attributes and nesting; an image resolver
that never reads linked files and bounds embedded images) and drawing through
craft_svg::tree::draw::render, which refuses a drawing whose buffers would
exceed 1 GiB. The direct resvg dependency is removed.

Part of storytold/craft-libs#778 and storytold/craft-libs#789.
2026-11-16 11:11:35 +01:00
chasse20 2adfed268f Remove comparison tooling and simplify node docs 2026-11-16 03:57:33 -05:00
chasse20 04d1b3889f Fix atomic filters, channel selection and backgrounds 2026-11-16 03:32:03 -05:00
dotCooCoo d82c730b98 Merge main into feat/image-craft-texture 2026-11-15 22:51:27 -08:00
FredApps 983e3276f6 Merge pull request #255 from storytold/refactor/shared-sbs-base64
Use shared Base64 encoding for SBS embedded resources
2026-11-16 07:41:54 +01:00
chasse20 9f390d4960 Fix node defaults, missing inputs and SBS serialization 2026-11-16 01:34:47 -05:00
FredApps fa58e0b8af Merge main into refactor/shared-sbs-base64 2026-11-16 06:47:27 +01:00
dotCooCoo 542cb68fea Merge main into feat/image-craft-texture 2026-11-15 17:02:18 -08:00
FredApps 627fbedd37 Merge pull request #254 from storytold/extract/shared-dds-float
Use shared DDS float surface decoding
2026-11-16 01:37:11 +01:00
FredApps 8402c56d45 formats: name the dds test header by its module path 2026-11-16 01:10:30 +01:00
FredApps 3cd7d04743 Merge remote-tracking branch 'origin/main' into w254
# Conflicts:
#	Cargo.lock
#	Cargo.toml
2026-11-16 01:06:53 +01:00
dotCooCoo 7742002746 Merge main into feat/image-craft-texture 2026-11-15 15:55:02 -08:00
Dylan M. Taylor 271890af61 Merge pull request #253 from storytold/extract/shared-format-codec
Reuse shared XML escaping for SBS attributes
2026-11-15 18:04:47 -05:00
Dylan M. Taylor faa78d4175 Reuse shared Base64 output for SBS embedded resources 2026-11-15 14:26:33 -05:00
Dylan M. Taylor c0d8e921eb Use shared DDS float surface decoder
Keep original MaterialCraft transfer and first-surface policy; move backend access and checked allocation to craft-texture.
2026-11-15 14:00:31 -05:00
dotCooCoo bee8c3feb8 Merge main into feat/image-craft-texture
main's per-axis wrapping, stored sampling and integer-sampling flag now
come from craft-texture (storytold/craft-libs#1709). Every craft-libs
dependency is pinned to that pull request's head, 92fb3fa8.
2026-11-15 10:48:09 -08:00
FredApps 6c3b35c396 Merge pull request #219 from storytold/191-sbs-based-node-imports
SBS Based Node Imports
2026-11-15 18:59:42 +01:00
dotCooCoo e6b0429652 Merge main into feat/image-craft-texture 2026-11-15 09:28:48 -08:00
Dylan M. Taylor 258e74cc86 Merge pull request #252 from storytold/codex/zip-guard-pin
Adopt shared ZIP64 entry-count guard fix
2026-11-15 11:54:33 -05:00
Dylan M. Taylor 5cf55f805c Keep shared XML lockfile entry in Cargo order 2026-11-15 11:44:04 -05:00
FredApps ed08636c7c Merge main shared material archive integration 2026-11-15 17:27:13 +01:00
Dylan M. Taylor fd0f4bd4c1 Reuse shared XML escaping for SBS attributes 2026-11-15 11:08:29 -05:00
Dylan M. Taylor 3e361b2af5 Adopt shared ZIP64 entry-count guard fix 2026-11-15 15:47:19 +00:00
FredApps f0cfb5682d Isolate resize render timing from parallel UI tests 2026-11-15 16:43:14 +01:00
dotCooCoo 3ef47a1dff Merge main into feat/image-craft-texture 2026-11-15 06:09:37 -08:00
Dylan M. Taylor 18c25a3f87 Merge pull request #246 from storytold/codex/shared-mcmat-consumer
Use shared portable material archives
2026-11-15 08:43:00 -05:00
Dylan M. Taylor 5d7dcd8029 Pin merged shared material format 2026-11-15 13:08:27 +00:00
Dylan M. Taylor 01f0c70648 Use bounded portable material detection 2026-11-15 11:39:50 +00:00
Dylan M. Taylor f4e079b49d Use shared portable material archive 2026-11-15 11:36:22 +00:00
FredApps 46a7d647d2 Fix missing If/Else value branch types 2026-11-15 11:19:47 +01:00
dotCooCoo 06a2af7eea Image: blur keeps images made with raised limits
The sampled-kernel and box passes of `ops::gaussian` built their output
with the default limits. For an image wider or taller than 8192 pixels,
made with a raised `max_side`, the sampled pass clamped its output to
8192 pixels and the box pass returned the unblurred source. Both passes
now build their output with limits that admit the source's size.
2026-11-14 16:31:03 -08:00
chasse20 6c26296dce Auto: Normalize library resource paths before relativizing
Normalize the library resource path alongside the destination to avoid Windows verbatim-prefix mismatches. Assert that saving retains the portable relative link resources/tile.svg.
2026-11-15 00:14:53 +00:00
dotCooCoo 9744afda83 Image: use craft-texture's image planes and sampling
Replace the local materialcraft-image crate with craft-texture from
storytold/craft-libs (storytold/craft-libs#1216), with its parallel
feature on. engine re-exports it as `engine::image`. Every craft-libs
dependency moves to the same revision, 29fb8f8e.

The image fields are private in craft-texture. Callers read them through
width(), height(), kind() and data(), and decoders, the pixel processor
and the pattern raster build images with Image::from_data, which rejects
an empty size or a buffer of the wrong length with an error.

This changes some pixels at the edges of the float range:
- a repeated sample far from the origin keeps its phase instead of
  stopping at a clamped texel position
- generate_uv spreads its coordinates over the clamped size
- bilinear samples and box downsampling of values near f32::MAX stay
  finite
- linear_to_srgb(NaN) returns NaN instead of -0.055

The box blur's running sum in nodes/src/ops.rs now uses f64 as well,
so a blur of values near f32::MAX no longer overflows.

#225 fixes the generate_uv fault in the local crate; craft-texture
includes that fix.
2026-11-14 15:59:55 -08:00
chasse20 a21a62b211 Auto: Remove normal-map display-toggle integration test
Remove display_toggle_updates_the_session_and_rerenders_the_normal_map.
Retain the ignored normal-convention snapshot test.
2026-11-14 23:44:36 +00:00
chasse20 b41dec44a0 Auto: Merge main and preserve SBS resource loading repairs
Integrate main through 6f19501, including bounded automation reads,
exclusive atomic-write temporaries, and SBS resource-name tracking.

Resolve the reader conflicts by retaining linked resources, replacements,
and font fallback while reserving all names in the shared set. Add mixed
resource round-trip coverage for the integration.

Validation: 96 targeted release tests; scoped clippy, wasm, and formatting.
2026-11-14 22:57:51 +00:00
chasse20 1a7225c8c2 Auto: Reuse SBS parsing and fix stale preview cache failures
Integrate main's read limits and preserve the font, evaluator, converter,
and measured preview repairs. Complete the scoped type, comment, and
spacing cleanup.

Reuse one validated XML document for library layout and graph reads.
Associate cache maintenance completion with its submitted revision so
old failures cannot consume new settings or clear requests.
2026-11-14 22:52:26 +00:00
Dylan M. Taylor 6f19501a4b automation: cap workspace and trusted-local reads at 2 GiB (#240)
* automation: cap workspace and trusted-local reads at 2 GiB

* automation: format the read-cap changes

* automation: drop unneeded mut from capped reads

* automation: cover trusted read size and file-kind checks
2026-11-14 17:31:30 -05:00