From 2971e3d8e64ff548b3df49b9e82e88db95e17678 Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Sat, 21 Nov 2026 00:24:02 +0700 Subject: [PATCH] test(formats): retain crafted USDC mesh acceptance (#704) --- ATTRIBUTION.md | 1 + .../src/mesh_import/usd/fixtures/LICENSE-MIT | 21 ++++++++++++++++++ .../src/mesh_import/usd/fixtures/README.md | 12 ++++++++++ .../usd/fixtures/crafted-references.usdc | Bin 0 -> 1170 bytes crates/formats/src/mesh_import/usd/tests.rs | 12 ++++++++++ 5 files changed, 46 insertions(+) create mode 100644 crates/formats/src/mesh_import/usd/fixtures/LICENSE-MIT create mode 100644 crates/formats/src/mesh_import/usd/fixtures/README.md create mode 100644 crates/formats/src/mesh_import/usd/fixtures/crafted-references.usdc diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 5d607a5c..500328aa 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -24,6 +24,7 @@ licensed and keep their license file next to them. | `docs/images/texturecraft-lantern.png` | README render: a storm lantern (original procedural mesh of lathes and swept wires, eight texture sets) in chipped red enamel, rust, soot, tarnished brass and glass with an emissive flame (`texturecraft-cli render --camera Hero --samples 2048`, 1200×900) | TextureCraft contributors | original model and render by TextureCraft | MIT OR Apache-2.0 | | `docs/images/texturecraft-camera.png` | README render: a rangefinder camera (original procedural mesh) in black enamel worn to brass, leatherette, chrome and coated glass; the lens distance scale is an original image drawn in code (`texturecraft-cli render --camera Hero --samples 2048`, 1200×900) | TextureCraft contributors | original model and render by TextureCraft | MIT OR Apache-2.0 | | `docs/brand/artcraft-*.svg`, `docs/brand/artcraft-*.png` | ArtCraft logo and mark | ArtCraft Team | storytold/craftrules `assets/brand/` | ArtCraft brand terms, not open source ([`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt)) | +| `crates/formats/src/mesh_import/usd/fixtures/crafted-references.usdc` | Synthetic USDC class/reference/time-sample acceptance fixture | ArtCraft Team and craft-libs contributors | [Pinned generator and provenance](crates/formats/src/mesh_import/usd/fixtures/README.md) | MIT (`crates/formats/src/mesh_import/usd/fixtures/LICENSE-MIT`) | ## Third-party assets compiled into the binary diff --git a/crates/formats/src/mesh_import/usd/fixtures/LICENSE-MIT b/crates/formats/src/mesh_import/usd/fixtures/LICENSE-MIT new file mode 100644 index 00000000..e1450bdf --- /dev/null +++ b/crates/formats/src/mesh_import/usd/fixtures/LICENSE-MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 ArtCraft Team and the craft-libs contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/crates/formats/src/mesh_import/usd/fixtures/README.md b/crates/formats/src/mesh_import/usd/fixtures/README.md new file mode 100644 index 00000000..d0c4e5f6 --- /dev/null +++ b/crates/formats/src/mesh_import/usd/fixtures/README.md @@ -0,0 +1,12 @@ +# Crafted USDC acceptance fixture + +`crafted-references.usdc` is synthetic test data, not an external product asset. + +Generated from `scene::write::tests::crafted_crate_with_references_time_samples_and_inlined_values` in [craft-libs at 3dff4793](https://github.com/storytold/craft-libs/blob/3dff4793f1a5bd1f99a4fe3280d48f515158dff3/crates/usd/src/scene/write.rs). The generator's existing assertions passed in [this hosted run](https://github.com/FredApps/texturecraft/actions/runs/44688984933). [Committed generation wrapper](https://github.com/FredApps/texturecraft/blob/15a07f4fc845f2d4d6594dd07e8b34e8e77de456/.github/workflows/validate-pr270.yml). Generation added only a write of the completed byte buffer; no writer logic was changed. + +The fixture restores the application-boundary assertions from TextureCraft's [pre-cutover test](https://github.com/storytold/texturecraft/blob/e099725db4425c0149eca46198acf5cc5575cced/crates/formats/src/mesh_export/usdc.rs). A class prim is referenced by a def prim with reference custom data, a double3 translation uses its first time sample, and an inlined diagonal matrix scales the single triangle. The class itself must not draw. Expected final bounds are (1, 0, 0) through (3, 2, 0). + +Size: 1,170 bytes. +SHA-256: `f270b11c6bb21c3e5b9106b5af0697d4559cbdbe36c8be8539c40d72d01d1519`. + +Source copyright: ArtCraft Team and the craft-libs contributors. Distributed under MIT; see `LICENSE-MIT` beside this fixture. diff --git a/crates/formats/src/mesh_import/usd/fixtures/crafted-references.usdc b/crates/formats/src/mesh_import/usd/fixtures/crafted-references.usdc new file mode 100644 index 0000000000000000000000000000000000000000..b88867848e4442db9c3db4beec128fe803384eb7 GIT binary patch literal 1170 zcmb_a&u`OEK zf8=l@AQCaX;v4KND2Nkv)>*s<5$+%)|`g?x{zuhyl{d!r<={R=I@@DB`_&8H|D>M!oovvfzF;r}#zli;+ zecN-ImTNRUk^(Lwl)@-hb=t&%-PJA6MW@*!kBH-uexch-VpuL)ZM{WYJVBdunmxl) z9o>XUJmR=2aq5=tp=am&x(k~!gFCM1&qr#;+1t#I2^7rUb?AzjK6qdg%eU2X{hEd_` z>+^o>8y1=@(odd*Sk)W{Q;Lj63mwaWBi0CxPfTV?p=o$>90(l$V=gu=b(KzFNRp%_ zmV)6O6PY3+({XrA8^fVhACxLJVNmsgR}8!tM>TD`T)BJVP!kjGzwl1E^ssnBqb2y4 nB7Vk~G~eZi;BN|E&1?63jvZYUlTSOrQBzBW)BHg2_XYn861