diff --git a/Cargo.lock b/Cargo.lock index 04c99a1..5c1d95c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -445,12 +445,6 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.22.1" @@ -575,12 +569,6 @@ dependencies = [ "syn 3.0.9", ] -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "byteorder-lite" version = "0.1.0" @@ -963,6 +951,14 @@ dependencies = [ "objc2-app-kit 0.3.2", ] +[[package]] +name = "craft-mesh" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=57288edafdc45552e30481cc649021de446abfa0#57288edafdc45552e30481cc649021de446abfa0" +dependencies = [ + "serde_json", +] + [[package]] name = "craft-metadata" version = "0.1.0" @@ -2063,45 +2059,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "gltf" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ce1918195723ce6ac74e80542c5a96a40c2b26162c1957a5cd70799b8cacf7" -dependencies = [ - "base64 0.13.1", - "byteorder", - "gltf-json", - "image", - "lazy_static", - "serde_json", - "urlencoding", -] - -[[package]] -name = "gltf-derive" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14070e711538afba5d6c807edb74bcb84e5dbb9211a3bf5dea0dfab5b24f4c51" -dependencies = [ - "inflections", - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "gltf-json" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6176f9d60a7eab0a877e8e96548605dedbde9190a7ae1e80bbcc1c9af03ab14" -dependencies = [ - "gltf-derive", - "serde", - "serde_derive", - "serde_json", -] - [[package]] name = "glutin" version = "0.32.3" @@ -2537,12 +2494,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "inflections" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" - [[package]] name = "io-extras" version = "0.19.0" @@ -2942,6 +2893,7 @@ dependencies = [ "base64 0.22.1", "craft-fonts-build", "craft-mcmat", + "craft-mesh", "craft-mime", "craft-svg", "craft-texture 0.1.0 (git+https://github.com/storytold/craft-libs?rev=726ad0f8290bedb6ced60fa06200a6b574f9990d)", @@ -2949,7 +2901,6 @@ dependencies = [ "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=b6d9feed23ceae249b40593ed84a668343091627)", "dds", "flate2", - "gltf", "image", "materialcraft-core", "materialcraft-geom", @@ -2959,7 +2910,6 @@ dependencies = [ "serde_json", "sha2", "thiserror 2.0.21", - "tobj", "zip 2.6.1", ] @@ -3034,6 +2984,7 @@ dependencies = [ "js-sys", "log", "materialcraft-engine", + "materialcraft-formats", "materialcraft-ui-egui", "wasm-bindgen", "wasm-bindgen-futures", @@ -5019,12 +4970,6 @@ version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" -[[package]] -name = "tobj" -version = "4.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eb8e04167c1c0c76b5de63226fd733485ad63ef71e40de31e16272f47b099e2" - [[package]] name = "tokio" version = "1.54.1" @@ -5290,12 +5235,6 @@ dependencies = [ "log", ] -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - [[package]] name = "usvg" version = "0.48.1" diff --git a/Cargo.toml b/Cargo.toml index e3c1636..da4ec39 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,12 +40,14 @@ rust-version = "1.95" repository = "https://github.com/storytold/materialcraft" [workspace.dependencies] -# Standard Base64 output; strict SBS decoding remains app-local. +# Standard Base64 output; strict SBS decoding remains app-local craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "ea24422ae9859dc5da398d0462bc87f8e02e0d10", version = "0.1.0" } craft-texture-dds = { package = "craft-texture", version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "726ad0f8290bedb6ced60fa06200a6b574f9990d", features = ["dds"] } +# Read 3D meshes through craft-mesh; keep mesh processing app-local +craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "57288edafdc45552e30481cc649021de446abfa0", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping; SBS model and serialization policy stay app-local. craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "b6d9feed23ceae249b40593ed84a668343091627" } -# SVG: bounded parsing (usvg re-exported) and drawing (resvg) behind the shared checks. +# Bound SVG parsing and drawing through craft-svg craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "57288edafdc45552e30481cc649021de446abfa0", features = ["tree-render"] } # internal materialcraft-core = { path = "crates/core" } @@ -64,7 +66,6 @@ serde = { version = "1", features = ["derive"] } serde_json = "1" sha2 = "0.10" # MIT OR Apache-2.0; stable content keys for persistent previews. glam = { version = "0.30", features = ["serde", "bytemuck"] } -bytemuck = { version = "1", features = ["derive"] } rayon = "1" log = "0.4" image = { version = "0.25", default-features = false, features = ["png", "jpeg", "tga", "tiff", "exr", "hdr", "bmp", "webp", "gif", "pnm"] } @@ -76,8 +77,6 @@ wgpu = "30" rfd = "0.17" rustix = { version = "1", default-features = false, features = ["std", "fs", "process"] } zip = { version = "2", default-features = false, features = ["deflate"] } -gltf = { version = "1.4", default-features = false, features = ["import", "utils"] } -tobj = { version = "4", default-features = false } mikktspace = { version = "0.3", default-features = false, features = ["glam"] } rmcp = { version = "3.5", default-features = false, features = ["server", "macros", "transport-io"] } tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-std", "sync", "net", "io-util", "time"] } diff --git a/README.md b/README.md index 0dc9428..a2155a8 100644 --- a/README.md +++ b/README.md @@ -178,12 +178,13 @@ The details are in [`docs/control-protocol.md`](docs/control-protocol.md). MaterialCraft is under active development. [**ROADMAP.md**](ROADMAP.md) has the parity estimate by area, the remaining work and what's next. -**Current focus (2026-11-05):** primitive editing and native SBS save/load. The old Rust -procedural library has been removed. The replacement includes 30 main-graph entries, 85 function -operations and three pattern node kinds. Start with **File → New → Atomic sample**. +**Current focus (2026-11-16):** node behavior, regression coverage and SBS save/load. The old Rust +procedural library has been removed. The replacement includes 29 main-graph entries, 85 function +operations and four pattern node kinds. Start with **File → New → Atomic sample**. See [the primitive workflow](docs/atomic-workflow.md) for usage, validation scope and limitations. -Reference-app rendering parity and full SBS library loading are still pending. +The [catalog status](docs/node-catalog-parity.md) records implemented behavior and remaining work. +Full numerical compatibility and arbitrary SBS interoperability remain unestablished. **Workspace:** `crates/{core, geom, nodes, eval, formats, engine, render, automation, ui-egui}` and `apps/{materialcraft, materialcraft-cli, materialcraft-web}`. The egui frontend is its own diff --git a/ROADMAP.md b/ROADMAP.md index 37dcf3e..3fb8c5d 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,25 +1,29 @@ # MaterialCraft roadmap -**Current focus (2026-11-08):** native primitive editing, reusable SBS functions and interoperable save/load. +**Current focus (2026-11-16):** node behavior, regression coverage and interoperable save/load. -The old Rust procedural library has been removed. The main catalog has 30 entries: 26 native +The old Rust procedural library has been removed. The main catalog has 29 entries: 25 native primitives and four graph input/output items. Functions have 85 operations; pattern graphs have Quadrant, Switch, Iterate and Dot. See [the primitive workflow](docs/atomic-workflow.md) for usage and limits. -Earlier percentage estimates and node counts are superseded by this change. Reference-app -rendering parity and arbitrary SBS round trips have not been established. +Earlier percentage estimates and node counts are superseded by this change. Full numerical +compatibility and arbitrary SBS round trips have not been established. The +[catalog status](docs/node-catalog-parity.md) records available nodes, implemented corrections +and behavior that remains untested. ## Next steps -1. Verify the original atomic sample in the reference application -2. Compare primitive outputs and parameter semantics against reference results -3. Validate the converted standard library in the reference application and establish redistribution rights +1. Extend atomic sample and SBS interoperability coverage +2. Resolve the primitive, processor and map gaps in the catalog status +3. Validate the converted standard library and establish redistribution rights 4. Extend the SBS library beyond reusable functions to processing graphs ## Progress log | Date | What landed | |---|---| +| 2026-11-16 | Corrected six atomic nodes: filter kernels and Float32 arithmetic, rectangular scaling, independent tiling, channel selection and save/load, and empty Text/SVG backgrounds. [Behavior and validation](docs/atomic-parity-improvements.md) | +| 2026-11-15 | Corrected node defaults, typed unconnected inputs, missing-texture output and SBS serialization; updated catalog counts and remaining validation scope | | 2026-11-08 | Explorer folder hierarchy and package/folder/graph context menus, native SBS empty folders and resource paths, undoable copy/move/rename/remove, and package reload/save-copy actions | | 2026-11-08 | Portable `sbs://` function instances in the Library, preserved package folders and missing references, and a converted library retaining all 171 supplied function bodies (2,334 nodes); external runtime equivalence and redistribution rights remain unverified | | 2026-11-02 | Cross-app materials: `.mcmat` portable materials, Send to TextureCraft, input-node preview images (mesh maps from TextureCraft), live re-cooks from TextureCraft through the CLI | diff --git a/apps/materialcraft-web/Cargo.toml b/apps/materialcraft-web/Cargo.toml index e52df34..68221c9 100644 --- a/apps/materialcraft-web/Cargo.toml +++ b/apps/materialcraft-web/Cargo.toml @@ -19,9 +19,11 @@ materialcraft-ui-egui = { workspace = true } log = { workspace = true } [target.'cfg(target_arch = "wasm32")'.dependencies] -# `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. +# `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "persistence"] } +# The SBS library's `resources/`, which the browser build downloads at startup +materialcraft-formats = { workspace = true } wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" js-sys = "0.3" -web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlCanvasElement", "Location", "KeyboardEvent", "EventTarget", "AddEventListenerOptions"] } +web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlCanvasElement", "Location", "KeyboardEvent", "EventTarget", "AddEventListenerOptions", "Response", "RequestInit", "AbortController", "AbortSignal"] } diff --git a/apps/materialcraft-web/index.html b/apps/materialcraft-web/index.html index 9cce260..ddc2176 100644 --- a/apps/materialcraft-web/index.html +++ b/apps/materialcraft-web/index.html @@ -6,6 +6,8 @@ MaterialCraft + +