@nodaro/shared 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/shared",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "Shared types, model catalog, wire contracts, and structural vocabularies for the Nodaro platform and SDK.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -199,6 +199,9 @@ describe("scene3d v2 resources — content hash", () => {
199
199
 
200
200
  it("changes when any content changes", async () => {
201
201
  const base = await computeScene3DPlanV2ContentHash(planV2())
202
+ const shadowed = planV2()
203
+ shadowed.lighting = { ...shadowed.lighting, preset: "clay-studio-v2" }
204
+ expect(await computeScene3DPlanV2ContentHash(shadowed)).not.toBe(base)
202
205
  const recoloured = planV2()
203
206
  recoloured.objects[1].materialBindings = [
204
207
  { role: "bodyPaint", materialName: "Body Paint", color: "#00ff00" },
@@ -754,6 +754,9 @@ describe("scene3d v2 — references and engines", () => {
754
754
  })
755
755
 
756
756
  it("pins the clay lighting preset", () => {
757
+ for (const preset of ["clay-studio-v1", "clay-studio-v2"] as const) {
758
+ expect(scene3DPlanV2Schema.safeParse(planV2({ lighting: { ...planV2().lighting, preset } })).success).toBe(true)
759
+ }
757
760
  expect(scene3DPlanV2Schema.safeParse(planV2({ lighting: { ...planV2().lighting, preset: "neon" as never } })).success).toBe(
758
761
  false,
759
762
  )
package/src/scene3d-v2.ts CHANGED
@@ -251,7 +251,7 @@ export const SCENE3D_PRIMITIVE_MATERIAL_ROLE = "identity"
251
251
 
252
252
  /** The standardized clay look, pinned by id. Browser preview, critic stills and
253
253
  * the final export must implement a given preset identically. */
254
- export const SCENE3D_CLAY_LIGHTING_PRESETS = ["clay-studio-v1"] as const
254
+ export const SCENE3D_CLAY_LIGHTING_PRESETS = ["clay-studio-v1", "clay-studio-v2"] as const
255
255
  export type Scene3DClayLightingPreset = (typeof SCENE3D_CLAY_LIGHTING_PRESETS)[number]
256
256
 
257
257
  // ---------------------------------------------------------------------------