@oeave/bakery3 0.2.0 → 0.3.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.
Files changed (46) hide show
  1. package/dist/bake/index.js +3 -3
  2. package/dist/catalog/index.js +1 -1
  3. package/dist/{chunk-KNUAOILG.js → chunk-3T3FJOSD.js} +4 -4
  4. package/dist/{chunk-KNUAOILG.js.map → chunk-3T3FJOSD.js.map} +1 -1
  5. package/dist/{chunk-6FYI6AJM.js → chunk-6FAMQZXB.js} +7 -7
  6. package/dist/{chunk-6FYI6AJM.js.map → chunk-6FAMQZXB.js.map} +1 -1
  7. package/dist/{chunk-QRCT5UGZ.js → chunk-CSSJRP5W.js} +9 -6
  8. package/dist/chunk-CSSJRP5W.js.map +1 -0
  9. package/dist/{chunk-APWUCEEB.js → chunk-EN4ROBYQ.js} +3 -3
  10. package/dist/{chunk-APWUCEEB.js.map → chunk-EN4ROBYQ.js.map} +1 -1
  11. package/dist/{chunk-JFYUDERE.js → chunk-NEK5TBEH.js} +2 -2
  12. package/dist/chunk-NEK5TBEH.js.map +1 -0
  13. package/dist/chunk-OPM2L63B.js +253 -0
  14. package/dist/chunk-OPM2L63B.js.map +1 -0
  15. package/dist/{chunk-UWBP7B54.js → chunk-R5IUPOWI.js} +3 -3
  16. package/dist/{chunk-UWBP7B54.js.map → chunk-R5IUPOWI.js.map} +1 -1
  17. package/dist/{chunk-HNMSWQU7.js → chunk-STRK4SZN.js} +3 -3
  18. package/dist/{chunk-HNMSWQU7.js.map → chunk-STRK4SZN.js.map} +1 -1
  19. package/dist/{chunk-Z7IYVH22.js → chunk-WLEFNUOH.js} +30 -279
  20. package/dist/chunk-WLEFNUOH.js.map +1 -0
  21. package/dist/{chunk-NXBAZGNB.js → chunk-X6GW43EX.js} +3 -3
  22. package/dist/{chunk-NXBAZGNB.js.map → chunk-X6GW43EX.js.map} +1 -1
  23. package/dist/devtools/index.js +7 -6
  24. package/dist/hotspots/index.d.ts +237 -31
  25. package/dist/hotspots/index.js +1013 -118
  26. package/dist/hotspots/index.js.map +1 -1
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +7 -6
  29. package/dist/node/index.cjs +1 -1
  30. package/dist/node/index.cjs.map +1 -1
  31. package/dist/node/index.js +2 -2
  32. package/dist/presets/index.js +2 -2
  33. package/dist/r3f/index.js +9 -8
  34. package/dist/r3f/index.js.map +1 -1
  35. package/dist/{room-FS26KAPQ.js → room-BM7Z7NKG.js} +4 -4
  36. package/dist/{room-FS26KAPQ.js.map → room-BM7Z7NKG.js.map} +1 -1
  37. package/dist/session-NPVBESWA.js +9 -0
  38. package/dist/{session-VCIQEO26.js.map → session-NPVBESWA.js.map} +1 -1
  39. package/dist/tsl/index.d.ts +14 -1
  40. package/dist/tsl/index.js +8 -2
  41. package/dist/tsl/index.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/chunk-JFYUDERE.js.map +0 -1
  44. package/dist/chunk-QRCT5UGZ.js.map +0 -1
  45. package/dist/chunk-Z7IYVH22.js.map +0 -1
  46. package/dist/session-VCIQEO26.js +0 -9
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/timeline/properties.ts"],"names":[],"mappings":";AA2FA,SAAS,aAAa,MAAA,EAA8C;AAClE,EAAA,MAAM,KAAA,GAAQ,MAAA;AACd,EAAA,OAAO,KAAA,CAAM,oBAAoB,KAAA,GAAQ,MAAA;AAC3C;AAcA,SAAS,QAAQ,MAAA,EAAyC;AACxD,EAAA,MAAM,KAAA,GAAQ,MAAA;AACd,EAAA,OAAO,KAAA,CAAM,UAAU,KAAA,GAAQ,MAAA;AACjC;AAGA,SAAS,WAAW,MAAA,EAA0C;AAC5D,EAAA,MAAM,KAAA,GAAQ,MAAA;AACd,EAAA,OAAA,CAAQ,MAAM,kBAAA,IAAsB,KAAA,CAAM,WAAA,KAAgB,KAAA,CAAM,SAC5D,KAAA,GACA,MAAA;AACN;AAKA,SAAS,WAAW,MAAA,EAA2C;AAC7D,E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A,OAAO,CAAA,CAAA,EAAI,QAAQ,KAAA,CAAM,CAAC,KAAK,CAAC,CAAC,GAAG,OAAA,CAAQ,KAAA,CAAM,CAAC,CAAA,IAAK,CAAC,CAAC,CAAA,EAAG,OAAA,CAAQ,MAAM,CAAC,CAAA,IAAK,CAAC,CAAC,CAAA,CAAA;AACrF","file":"chunk-OPM2L63B.js","sourcesContent":["/**\n * What can be animated, how to read it off the live object, and how to put it\n * back.\n *\n * One table, because three consumers must agree exactly: the panel (which\n * offers a list), `seek()` (which drives the live three scene, so the browser\n * is the preview) and `bake()` (which writes the numbers the renderer plays).\n * A property that reads differently from how it writes is a preview that lies\n * about the render.\n *\n * Everything is duck-typed rather than `instanceof Mesh`. three is a peer\n * dependency with no runtime import here, and duck typing is what three does\n * internally anyway, so this keeps working across a version that adds a type.\n */\n\nimport type { Camera, Object3D } from 'three';\n\n/** Values are always arrays, scalars included. One interpolation path, one\n * storage shape, and `size` is then simply `value.length`. */\nexport type PropertyValue = number[];\n\ntype AnyMaterial = {\n color?: RGB;\n emissive?: RGB;\n emissiveIntensity?: number;\n roughness?: number;\n metalness?: number;\n opacity?: number;\n transparent?: boolean;\n needsUpdate?: boolean;\n};\n\ntype RGB = {\n r: number;\n g: number;\n b: number;\n setRGB?(r: number, g: number, b: number): void;\n};\n\ntype AnyObject = Object3D & {\n isMesh?: boolean;\n isLight?: boolean;\n material?: AnyMaterial | AnyMaterial[];\n intensity?: number;\n color?: RGB;\n};\n\ntype AnyCamera = Camera & {\n isPerspectiveCamera?: boolean;\n fov?: number;\n updateProjectionMatrix?(): void;\n};\n\n/** One animatable property: how big it is, how to read it, how to write it,\n * and what it becomes on the wire. */\nexport type PropertyDefinition = {\n size: number;\n /** The live value, or undefined when this object does not have the\n * property (a mesh has no `intensity`, a light has no `roughness`). */\n read(object: Object3D): PropertyValue | undefined;\n /** Drive the live object. This is the browser preview. */\n write(object: Object3D, value: PropertyValue): void;\n /**\n * The channel this property becomes on the wire, when that differs.\n * `rotation` is authored as an euler because that is what you read off\n * `mesh.rotation`, and travels as a quaternion because that is what the\n * manifest and the renderer both speak.\n */\n channel?: string;\n /** Linear-RGB, so `bake()` knows not to touch it and the panel can show a\n * color swatch. */\n color?: boolean;\n /**\n * Whether this object has the property at all, when only some kinds do.\n * `track()` refuses the rest at the line that asked, rather than leaving\n * the renderer to refuse the clip.\n */\n appliesTo?(object: Object3D): boolean;\n};\n\ntype AimedLight = Object3D & {\n isDirectionalLight?: boolean;\n isSpotLight?: boolean;\n target?: Object3D;\n};\n\ntype HemisphereLike = Object3D & {\n isHemisphereLight?: boolean;\n groundColor?: RGB;\n};\n\nfunction hemisphereOf(object: Object3D): HemisphereLike | undefined {\n const light = object as HemisphereLike;\n return light.isHemisphereLight ? light : undefined;\n}\n\ntype SceneLike = Object3D & {\n isScene?: boolean;\n environmentIntensity?: number;\n environmentRotation?: {\n x: number;\n y: number;\n z: number;\n set(x: number, y: number, z: number): unknown;\n };\n};\n\n/** The Scene, whose environment a track on it drives. */\nfunction sceneOf(object: Object3D): SceneLike | undefined {\n const scene = object as SceneLike;\n return scene.isScene ? scene : undefined;\n}\n\n/** A directional or spot light: the two three aims at `light.target`. */\nfunction aimedLight(object: Object3D): AimedLight | undefined {\n const light = object as AimedLight;\n return (light.isDirectionalLight || light.isSpotLight) && light.target\n ? light\n : undefined;\n}\n\n/** The material the animation drives: slot zero. A multi-material mesh is\n * usually several visually distinct parts, and guessing which one \"the\n * color\" meant would be worse than asking for the child to be targeted. */\nfunction materialOf(object: Object3D): AnyMaterial | undefined {\n const material = (object as AnyObject).material;\n if (!material) return undefined;\n return Array.isArray(material) ? material[0] : material;\n}\n\nfunction readVector(\n v: { x: number; y: number; z: number } | undefined,\n): PropertyValue | undefined {\n return v ? [v.x, v.y, v.z] : undefined;\n}\n\nfunction scalar(\n get: (material: AnyMaterial) => number | undefined,\n set: (material: AnyMaterial, value: number) => void,\n): PropertyDefinition {\n return {\n size: 1,\n read(object) {\n const material = materialOf(object);\n const value = material ? get(material) : undefined;\n return typeof value === 'number' ? [value] : undefined;\n },\n write(object, value) {\n const material = materialOf(object);\n if (material) set(material, value[0]!);\n },\n };\n}\n\nfunction colorProperty(\n pick: (object: Object3D) => RGB | undefined,\n): PropertyDefinition {\n return {\n size: 3,\n color: true,\n read(object) {\n const target = pick(object);\n // three keeps Color components in its linear working space, which is\n // exactly what the channel wants: no conversion, and no round trip\n // through 8-bit hex at every one of three hundred frames.\n return target ? [target.r, target.g, target.b] : undefined;\n },\n write(object, value) {\n const target = pick(object);\n if (!target) return;\n if (target.setRGB) target.setRGB(value[0]!, value[1]!, value[2]!);\n else Object.assign(target, { r: value[0], g: value[1], b: value[2] });\n },\n };\n}\n\n/**\n * Everything animatable on an object, and nothing else.\n *\n * This list is the answer to \"what can I animate\": the panel builds its\n * picker from it, and `track()` refuses anything absent from it by name. It is\n * the intersection of what three exposes and what the renderer can reproduce.\n * Offering `wireframe` here would mean authoring a motion the render cannot\n * show, which is the silent approximation the SDK refuses everywhere else.\n */\nexport const OBJECT_PROPERTIES: Record<string, PropertyDefinition> = {\n position: {\n size: 3,\n read: (object) => readVector(object.position),\n write: (object, value) =>\n object.position.set(value[0]!, value[1]!, value[2]!),\n },\n rotation: {\n size: 3,\n channel: 'quaternion',\n read: (object) =>\n readVector(\n object.rotation as unknown as { x: number; y: number; z: number },\n ),\n write: (object, value) =>\n object.rotation.set(value[0]!, value[1]!, value[2]!),\n },\n scale: {\n size: 3,\n read: (object) => readVector(object.scale),\n write: (object, value) => object.scale.set(value[0]!, value[1]!, value[2]!),\n },\n // A light's own color (the worker drives the lamp, or for an ambient or\n // hemisphere light the dome), and a mesh's material's.\n color: colorProperty((object) =>\n (object as AnyObject).isLight\n ? (object as AnyObject).color\n : materialOf(object)?.color,\n ),\n emissive: colorProperty((object) => materialOf(object)?.emissive),\n emissiveIntensity: scalar(\n (material) => material.emissiveIntensity,\n (material, value) => {\n material.emissiveIntensity = value;\n },\n ),\n roughness: scalar(\n (material) => material.roughness,\n (material, value) => {\n material.roughness = value;\n },\n ),\n metalness: scalar(\n (material) => material.metalness,\n (material, value) => {\n material.metalness = value;\n },\n ),\n opacity: scalar(\n (material) => material.opacity,\n (material, value) => {\n material.opacity = value;\n // Without this the browser shows no change at all while the render\n // fades, and a preview that disagrees with the render is worse than a\n // flag you did not set yourself. It is only ever turned on, and only for\n // a material that is explicitly animated.\n if (value < 1 && !material.transparent) {\n material.transparent = true;\n material.needsUpdate = true;\n }\n },\n ),\n intensity: {\n size: 1,\n read(object) {\n const light = object as AnyObject;\n return light.isLight && typeof light.intensity === 'number'\n ? [light.intensity]\n : undefined;\n },\n write(object, value) {\n const light = object as AnyObject;\n if (light.isLight) light.intensity = value[0]!;\n },\n },\n /** A HemisphereLight's color from below. Its `color` is the sky. */\n groundColor: {\n ...colorProperty((object) => hemisphereOf(object)?.groundColor),\n appliesTo: (object) => hemisphereOf(object) !== undefined,\n },\n /**\n * The scene's own `environmentIntensity`, on the Scene as a target: the\n * environment's `intensity` channel. It scales the HDRI only, as in three.\n */\n environmentIntensity: {\n size: 1,\n appliesTo: (object) => sceneOf(object) !== undefined,\n read(object) {\n const value = sceneOf(object)?.environmentIntensity;\n return typeof value === 'number' ? [value] : undefined;\n },\n write(object, value) {\n const scene = sceneOf(object);\n if (scene) scene.environmentIntensity = value[0]!;\n },\n },\n /**\n * The scene's `environmentRotation`, radians, XYZ, as three holds it: the\n * environment's `rotation` channel. Unlike an object's rotation it stays\n * an euler on the wire, because that is what the environment carries.\n */\n environmentRotation: {\n size: 3,\n appliesTo: (object) => sceneOf(object) !== undefined,\n read: (object) => readVector(sceneOf(object)?.environmentRotation),\n write(object, value) {\n sceneOf(object)?.environmentRotation?.set(\n value[0]!,\n value[1]!,\n value[2]!,\n );\n },\n },\n /**\n * Where a directional or spot light aims: its `target`'s WORLD position,\n * which is what three aims it at and what the channel carries. Written\n * back through the target's parent, if it has one, so the light points at\n * the same place in the viewport as in the render.\n */\n target: {\n size: 3,\n appliesTo: (object) => aimedLight(object) !== undefined,\n read(object) {\n const target = aimedLight(object)?.target;\n if (!target) return undefined;\n target.updateMatrixWorld();\n const e = target.matrixWorld.elements;\n return [e[12]!, e[13]!, e[14]!];\n },\n write(object, value) {\n const target = aimedLight(object)?.target;\n if (!target) return;\n target.position.set(value[0]!, value[1]!, value[2]!);\n target.parent?.worldToLocal(target.position);\n target.updateMatrixWorld();\n },\n },\n};\n\n/**\n * Camera properties.\n *\n * `lookAt` is authoring-only and has no channel of its own: the wire format\n * carries a quaternion, because a lookAt point is meaningless to a renderer\n * that has already decided what \"up\" is. The conversion happens once, at bake,\n * in orbit.ts; see the note there about the straight-up degenerate case.\n */\nexport const CAMERA_PROPERTIES: Record<string, PropertyDefinition> = {\n position: OBJECT_PROPERTIES.position!,\n lookAt: {\n size: 3,\n // There is no live \"lookAt\" to read; the timeline supplies its own center\n // when a keyframe is captured. Returning undefined keeps the panel from\n // offering a capture button that would silently record the wrong thing.\n read: () => undefined,\n // Applied together with position by the timeline, never alone: aiming at a\n // point before moving to the position it was computed for produces one\n // frame of visible swing.\n write: () => undefined,\n },\n fov: {\n size: 1,\n read(object) {\n const camera = object as AnyCamera;\n return typeof camera.fov === 'number' ? [camera.fov] : undefined;\n },\n write(object, value) {\n const camera = object as AnyCamera;\n if (typeof camera.fov !== 'number') return;\n camera.fov = value[0]!;\n camera.updateProjectionMatrix?.();\n },\n },\n};\n\n/** The one lookup every consumer goes through, so the panel, `seek()` and\n * `bake()` cannot end up disagreeing about what a property means. */\nexport function propertyDefinition(\n target: 'camera' | Object3D,\n property: string,\n): PropertyDefinition | undefined {\n return target === 'camera'\n ? CAMERA_PROPERTIES[property]\n : OBJECT_PROPERTIES[property];\n}\n\n/**\n * Where a live camera is already pointing.\n *\n * A camera has no lookAt to read, only a rotation, so the point is recovered\n * by walking its own forward axis out to the distance it sits from the center\n * of interest. Assuming the origin instead would silently re-aim every camera\n * in every scene whose product is not at (0,0,0).\n */\nexport function readCameraLookAt(\n camera: Camera,\n center: [number, number, number],\n): [number, number, number] {\n camera.updateMatrixWorld();\n const e = camera.matrixWorld.elements;\n const position: [number, number, number] = [e[12]!, e[13]!, e[14]!];\n // A camera looks down its local -Z; that column of the world matrix is the\n // axis, already normalized unless the camera is under a scaled rig.\n const forward = normalize([-e[8]!, -e[9]!, -e[10]!]);\n const distance =\n Math.hypot(\n position[0] - center[0],\n position[1] - center[1],\n position[2] - center[2],\n ) || 1;\n return [\n position[0] + forward[0] * distance,\n position[1] + forward[1] * distance,\n position[2] + forward[2] * distance,\n ];\n}\n\nfunction normalize(v: [number, number, number]): [number, number, number] {\n const length = Math.hypot(v[0], v[1], v[2]);\n return length === 0\n ? [0, 0, -1]\n : [v[0] / length, v[1] / length, v[2] / length];\n}\n\n/**\n * sRGB hex → three's linear working space.\n *\n * three's own transfer function, written out rather than imported, since the\n * SDK keeps three as a peer dependency with no runtime import. Getting it\n * wrong makes every authored color land visibly darker or lighter than the\n * same hex written into the material by hand.\n */\nexport function hexToLinear(hex: string): PropertyValue {\n const value = hex.trim().replace(/^#/, '');\n const full =\n value.length === 3\n ? value\n .split('')\n .map((c) => c + c)\n .join('')\n : value;\n const int = Number.parseInt(full, 16);\n if (!Number.isFinite(int)) return [1, 1, 1];\n return [\n srgbToLinear(((int >> 16) & 255) / 255),\n srgbToLinear(((int >> 8) & 255) / 255),\n srgbToLinear((int & 255) / 255),\n ];\n}\n\n/** One component of `hexToLinear`, for a caller that already has 0–1 floats\n * rather than a hex string. Same curve, so the two cannot drift. */\nexport function srgbToLinear(c: number): number {\n return c < 0.04045\n ? c * 0.0773993808\n : Math.pow(c * 0.9478672986 + 0.0521327014, 2.4);\n}\n\n/**\n * Back the other way, for display only.\n *\n * The panel's color swatch is the one place a linear channel value has to\n * become something a CSS property understands. Nothing on the wire path calls\n * this: a round trip through 8-bit hex would quantize a color you authored\n * exactly.\n */\nexport function linearToSrgbHex(value: PropertyValue): string {\n const channel = (v: number) => {\n const srgb =\n v < 0.0031308\n ? v * 12.92\n : 1.055 * Math.pow(Math.max(v, 0), 0.41666) - 0.055;\n return Math.round(Math.max(0, Math.min(1, srgb)) * 255)\n .toString(16)\n .padStart(2, '0');\n };\n return `#${channel(value[0] ?? 0)}${channel(value[1] ?? 0)}${channel(value[2] ?? 0)}`;\n}\n"]}
@@ -85,8 +85,8 @@ var QUALITY = {
85
85
  };
86
86
 
87
87
  // src/version.ts
88
- var SDK_VERSION = "0.2.0";
88
+ var SDK_VERSION = "0.3.0";
89
89
 
90
90
  export { QUALITY, SDK_VERSION, isClipFormat, isVideoFormat, protocolVersionFor };
91
- //# sourceMappingURL=chunk-UWBP7B54.js.map
92
- //# sourceMappingURL=chunk-UWBP7B54.js.map
91
+ //# sourceMappingURL=chunk-R5IUPOWI.js.map
92
+ //# sourceMappingURL=chunk-R5IUPOWI.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/protocol/manifest.ts","../src/protocol/quality.ts","../src/version.ts"],"names":[],"mappings":";AAwCO,IAAM,gBAAA,GAAmB,KAAA;AAGzB,IAAM,qBAAA,GAAwB,KAAA;AAG9B,IAAM,yBAAA,GAA4B,KAAA;AAQlC,IAAM,sBAAA,GAAyB,KAAA;AAW/B,SAAS,mBAAmB,QAAA,EAIxB;AACT,EAAA,IAAI,QAAA,CAAS,WAAA,EAAa,GAAA,EAAK,OAAO,gBAAA;AACtC,EAAA,IAAI,QAAA,CAAS,MAAM,OAAO,qBAAA;AAC1B,EAAA,OAAO,QAAA,CAAS,YACZ,yBAAA,GACA,sBAAA;AACN;AAwTO,IAAM,aAAA,GAAgC,CAAC,KAAA,EAAO,MAAM,CAAA;AAUpD,IAAM,gBAAA,GAAmC,CAAC,cAAc,CAAA;AAGxD,SAAS,cAAc,MAAA,EAA+B;AAC3D,EAAA,OAAO,aAAA,CAAc,SAAS,MAAM,CAAA;AACtC;AAGO,SAAS,iBAAiB,MAAA,EAA+B;AAC9D,EAAA,OAAO,gBAAA,CAAiB,SAAS,MAAM,CAAA;AACzC;AAQO,SAAS,aA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;AAAA,IACrB,OAAA,EAAS,IAAA;AAAA,IACT,eAAA,EAAiB,IAAA;AAAA,IACjB,OAAA,EAAS,IAAA;AAAA,IACT,cAAA,EAAgB;AAAA;AAEpB;;;AClGO,IAAM,WAAA,GAAc","file":"chunk-UWBP7B54.js","sourcesContent":["/**\n * The scene manifest: a GLB plus a versioned sidecar.\n *\n * glTF carries geometry, materials, textures, cameras, lights, skins and\n * morph targets well. What it does not carry is the state the running\n * application was in at the moment somebody pressed Render: which objects\n * were hidden, which of four cameras was live, what the renderer's tone\n * mapping was set to, which materials the SDK could not translate and what\n * the developer wants done about them. So the GLB is an asset and this is\n * the contract. `protocolVersion` is versioned independently of the SDK, of\n * the renderer and of the material translator, which is what makes a render\n * from six months ago reproducible.\n *\n * Everything here is JSON (no class instances, no functions) because it\n * travels from the browser through the control plane to the render worker\n * and is stored verbatim for replay.\n */\n\nimport type { AnimationSpec } from './animation.js';\nimport type { RoomPresetSpec } from './room.js';\nimport type { MaterialShaderSpec } from './shader.js';\n\n/**\n * Bumped only for a change a worker cannot read straight through. A worker\n * refuses a manifest whose major it does not implement rather than guessing;\n * a plausible wrong image is worse than a refusal.\n *\n * 2.0: `shaders`, node-material graphs. Without them a worker would render\n * the exporter's gray stand-in as if it were the material.\n *\n * 3.0: `animation`, baked per-frame channels. Without them a worker would\n * hand back one still of frame zero for a five-second orbit.\n *\n * 4.0: `room`, a room preset the worker rebuilds itself (see room.ts). The\n * room's geometry is deliberately not in the GLB, so a worker that ignored\n * the field would render the product floating in nothing.\n *\n * 5.0: `environment.fog`, the scene's fog traced as a volume. A worker that\n * ignored the field would hand back the scene in clear air.\n */\nexport const PROTOCOL_VERSION = '5.0';\n\n/** What a manifest with a room preset and no fog is stamped with. */\nexport const PROTOCOL_VERSION_ROOM = '4.0';\n\n/** What an animated manifest without a room preset is stamped with. */\nexport const PROTOCOL_VERSION_ANIMATED = '3.0';\n\n/**\n * What a manifest carrying no animation is stamped with. A still is still a\n * 2.0 document (every field in it means what it meant before), so stamping\n * it higher would only strand it at a worker not yet updated. See\n * `protocolVersionFor`.\n */\nexport const PROTOCOL_VERSION_STILL = '2.0';\n\n/** Every major the current worker can render faithfully. */\nexport const SUPPORTED_PROTOCOL_MAJORS = ['1', '2', '3', '4', '5'];\n\n/**\n * The version to stamp on a manifest: the lowest major that reads every\n * field in it faithfully (5.0 with fog, 4.0 with a room preset, 3.0 if\n * animated, 2.0 otherwise), so a manifest never strands itself at an older\n * worker for a field it does not carry.\n */\nexport function protocolVersionFor(manifest: {\n animation?: AnimationSpec;\n room?: RoomPresetSpec;\n environment?: { fog?: FogSpec };\n}): string {\n if (manifest.environment?.fog) return PROTOCOL_VERSION;\n if (manifest.room) return PROTOCOL_VERSION_ROOM;\n return manifest.animation\n ? PROTOCOL_VERSION_ANIMATED\n : PROTOCOL_VERSION_STILL;\n}\n\n/** `sha256:<64 hex>`: how every immutable blob is named. See asset.ts. */\nexport type AssetHash = string;\n\nexport type Vec3 = [number, number, number];\n/** glTF order: x, y, z, w. Any conversion to another order happens in the worker. */\nexport type Quat = [number, number, number, number];\nexport type Matrix4 = number[];\n\n// ---------------------------------------------------------------------------\n// Camera\n// ---------------------------------------------------------------------------\n\n/**\n * The active camera.\n *\n * Written out in full rather than referenced into the GLB by name: a live\n * R3F camera is frequently not in the scene graph the exporter walked (it\n * is held by `useThree`, or by drei's controls), so it travels as data.\n */\nexport type CameraSpec =\n | {\n type: 'perspective';\n /** Vertical FOV in degrees, matching three's `PerspectiveCamera.fov`. */\n fov: number;\n /**\n * The viewport's aspect ratio at capture time.\n *\n * The render matches vertical fov, so a wider output shows more at the\n * sides rather than cropping the top and bottom. Recorded so the\n * control plane can default the output to the viewport's own shape.\n */\n aspect?: number;\n near: number;\n far: number;\n position: Vec3;\n quaternion: Quat;\n /** three's `.zoom`, which scales the projection and is easy to forget. */\n zoom?: number;\n /** Present when the developer named a camera; only ever a label. */\n name?: string;\n /**\n * Depth of field, off unless present. `fStop` is a full-frame f-number\n * at this `fov`; `focalDistance` is in metres along the view axis.\n * `target` is the world point it was measured to: a worker that reads\n * it keeps that point sharp on every frame of a clip, and one that\n * does not still focuses the first frame right.\n */\n focus?: { fStop: number; focalDistance: number; target?: Vec3 };\n }\n | {\n type: 'orthographic';\n left: number;\n right: number;\n top: number;\n bottom: number;\n near: number;\n far: number;\n position: Vec3;\n quaternion: Quat;\n zoom?: number;\n name?: string;\n };\n\n// ---------------------------------------------------------------------------\n// Runtime state: the part glTF cannot express\n// ---------------------------------------------------------------------------\n\n/**\n * What the application had done to the scene by render time.\n *\n * Visibility is an explicit hidden list rather than \"export only what is\n * visible\" on purpose: the GLB is content-addressed and cached, and a\n * configurator that toggles one part between renders would otherwise miss\n * the cache every time. Ship one GLB with every variant in it, then hide\n * per render: the first render uploads the model, the next one uploads a\n * few KB.\n */\nexport type RuntimeState = {\n /** Object ids (see `objectId` in capture) the SDK found with `visible === false`. */\n hiddenObjectIds?: string[];\n /**\n * Transform overrides, for objects the application moved after export or\n * that were exported from a shared cached GLB.\n */\n transforms?: Array<{\n objectId: string;\n position?: Vec3;\n quaternion?: Quat;\n scale?: Vec3;\n }>;\n /** Morph target influences, by object. */\n morphs?: Array<{ objectId: string; influences: number[] }>;\n /** Current skeletal pose as bone-local matrices. */\n poses?: Array<{ objectId: string; boneMatrices: Matrix4[] }>;\n /**\n * `InstancedMesh` transforms. Written here rather than baked into the GLB\n * so changing a layout does not re-upload the geometry.\n *\n * `matrices` is flat: `count * 16` numbers, column-major, exactly as three\n * stores `instanceMatrix.array`. Nested arrays would add two bytes of JSON\n * per instance, which for a large scatter is a measurable part of the\n * manifest.\n */\n instances?: Array<{ objectId: string; count: number; matrices: number[] }>;\n /**\n * Opaque application state, echoed back on the render record. Never read\n * by the renderer; it exists so a stored render can say which sofa.\n */\n productState?: Record<string, unknown>;\n};\n\n// ---------------------------------------------------------------------------\n// Environment and lighting\n// ---------------------------------------------------------------------------\n\nexport type EnvironmentSpec = {\n /** An HDRI/EXR the SDK found on `scene.environment`, content-addressed. */\n hdri?: AssetHash;\n /** three's `Scene.environmentIntensity`. */\n intensity?: number;\n /** three's `Scene.environmentRotation`, radians, XYZ euler. */\n rotation?: Vec3;\n /**\n * The scene's `AmbientLight`s as one flat term. It ADDS to the HDRI, as it\n * does in three, and like three's it lights diffuse surfaces only: a\n * mirror reflects the environment and nothing of this.\n */\n ambient?: { color: string; intensity: number };\n /**\n * Background. `transparent` is the default: a still that composites is\n * worth more to a catalog pipeline than one with a baked backdrop.\n */\n background?:\n | { type: 'transparent' }\n | { type: 'color'; color: string }\n | { type: 'environment'; blurriness?: number };\n /** The scene's fog, when it has one the renderer can trace. */\n fog?: FogSpec;\n};\n\n/**\n * three's `FogExp2`, which the renderer traces as a volume filling the scene:\n * air that scatters the light passing through it, so a lamp or an emissive\n * mesh sits in a glow and throws visible beams.\n *\n * `density` is three's own number. three fades a surface by\n * `exp(-(density · d)²)`; a real volume thins light by `exp(-σ · d)`. The\n * two cannot agree at every distance, so the renderer uses σ = `density`,\n * which makes them agree where three's fog has taken all but 1/e of the\n * surface: nearer than that the render is a little foggier than the\n * viewport, further a little clearer.\n *\n * `color` is the fog's TINT (`#rrggbb`, as three holds it): its hue colors\n * the scattered light, its brightness is ignored. How bright traced fog\n * looks is decided by the light in it, which a rasterizer's fog color has to\n * guess. A linear `Fog` has no volume it corresponds to and is not carried;\n * the compatibility report says so.\n */\nexport type FogSpec = {\n color: string;\n density: number;\n};\n\n/**\n * Lights the SDK lifted out of the scene graph.\n *\n * Exported here as well as in the GLB because glTF's punctual-lights\n * extension has no notion of three's intensity-unit drift, no area lights\n * and no IES. The sidecar is where the good version lives and the GLB copy\n * is the fallback.\n */\nexport type LightSpec = {\n objectId: string;\n type: 'directional' | 'point' | 'spot' | 'area' | 'hemisphere';\n color: string;\n /**\n * three's own value, unconverted. The worker owns the unit conversion so\n * the physics is written down in one place.\n */\n intensity: number;\n /**\n * World position. A hemisphere light's is its up axis instead (three\n * normalizes it; absent is `[0, 1, 0]`).\n */\n position?: Vec3;\n /**\n * World point a directional, spot or area light aims at, as three's\n * `light.target` (or `lookAt`) does. Absent aims a directional or spot\n * light at the origin and leaves an area light facing straight down.\n */\n target?: Vec3;\n /**\n * Hemisphere lights only: the color from below (`groundColor`). `color` is\n * the sky. Absent is black, a sky with no ground bounce.\n */\n groundColor?: string;\n distance?: number;\n decay?: number;\n angle?: number;\n penumbra?: number;\n /** Area lights only, in world units. */\n size?: { width: number; height: number };\n /** Angular diameter in degrees: the shadow-softness dial for a sun. */\n angleDeg?: number;\n /** An IES profile, content-addressed. */\n ies?: AssetHash;\n castShadow?: boolean;\n};\n\n// ---------------------------------------------------------------------------\n// Color management\n// ---------------------------------------------------------------------------\n\n/**\n * The renderer's own color settings, copied verbatim.\n *\n * This is the difference between a render that looks like the developer's\n * app and one that is subtly, unfixably wrong. three's defaults changed in\n * r152 and again in r155; reading the live renderer beats assuming any of\n * them.\n */\nexport type ColorSpec = {\n outputColorSpace: 'srgb' | 'srgb-linear' | 'display-p3';\n toneMapping:\n | 'none'\n | 'linear'\n | 'reinhard'\n | 'cineon'\n | 'aces-filmic'\n | 'agx'\n | 'neutral';\n toneMappingExposure: number;\n};\n\n// ---------------------------------------------------------------------------\n// Material fallbacks and compatibility\n// ---------------------------------------------------------------------------\n\n/**\n * What to do with a material the renderer cannot be given honestly.\n *\n * Arbitrary GLSL does not translate, and the answer is to say so rather\n * than quietly render gray. A fallback is the developer's explicit\n * override, from `<Bakery3Material render={...}>` or from\n * `material.userData.bakery3.fallback`.\n */\nexport type MaterialFallback = {\n /** The material's uuid in the exported GLB. */\n materialId: string;\n type: 'physical';\n color?: string;\n metalness?: number;\n roughness?: number;\n clearcoat?: number;\n clearcoatRoughness?: number;\n transmission?: number;\n thickness?: number;\n ior?: number;\n emissive?: string;\n emissiveIntensity?: number;\n opacity?: number;\n sheen?: number;\n sheenColor?: string;\n iridescence?: number;\n anisotropy?: number;\n};\n\nexport type CompatibilitySeverity = 'info' | 'warning' | 'error';\n\n/**\n * One thing the SDK could not promise to reproduce: what it is, where it\n * lives in the tree, why, and the fix, without opening a debugger.\n */\nexport type CompatibilityIssue = {\n code: string;\n severity: CompatibilitySeverity;\n message: string;\n /** `<Car>/<Body>/<Paint>`: the path a developer can actually find. */\n path?: string;\n objectId?: string;\n materialId?: string;\n materialName?: string;\n materialType?: string;\n /** Deep link into the docs. */\n docs?: string;\n};\n\nexport type CompatibilityReport = {\n /** 0 to 1. Objects that will render faithfully, weighted by triangle count. */\n score: number;\n issues: CompatibilityIssue[];\n /** Rolled up for the devtools panel and the render record. */\n counts: { info: number; warning: number; error: number };\n};\n\n// ---------------------------------------------------------------------------\n// Output and quality\n// ---------------------------------------------------------------------------\n\n/** Presets, not raw renderer settings. Most scenes need only these. */\nexport type QualityPreset = 'preview' | 'studio' | 'ultra';\n\nexport type OutputFormat =\n 'png' | 'jpeg' | 'webp' | 'exr' | 'mp4' | 'webm' | 'png-sequence';\n\n/**\n * H.264 in mp4, VP9 in webm: an encoded video, opaque, written by the\n * renderer's own muxer. Both require `manifest.animation`: there is no\n * sensible video of a still, and guessing at one is not the worker's job.\n */\nexport const VIDEO_FORMATS: OutputFormat[] = ['mp4', 'webm'];\n\n/**\n * Every frame of a clip as its own PNG, alpha kept, delivered as one\n * uncompressed tar (`render.tar`) with a `frames.json` index first. Each\n * frame is exactly what a `png` still of that pose would be: the same color\n * pipeline, the background and the shadow catcher in alpha as a still has\n * them, straight (unassociated) alpha. For a compositor that puts the\n * product between layers of its own, which an mp4 cannot feed.\n */\nexport const SEQUENCE_FORMATS: OutputFormat[] = ['png-sequence'];\n\n/** An encoded video container: opaque, one file, no per-frame alpha. */\nexport function isVideoFormat(format: OutputFormat): boolean {\n return VIDEO_FORMATS.includes(format);\n}\n\n/** One file per frame, packed in a tar. */\nexport function isSequenceFormat(format: OutputFormat): boolean {\n return SEQUENCE_FORMATS.includes(format);\n}\n\n/**\n * A format that renders every frame of `manifest.animation` rather than one\n * still: a video or a sequence. It needs an animation, it is priced at the\n * clip rate, and the format is part of what the trace produces (so it is in\n * the cache key, where a still's format is not).\n */\nexport function isClipFormat(format: string | undefined): boolean {\n return (\n format !== undefined &&\n (isVideoFormat(format as OutputFormat) ||\n isSequenceFormat(format as OutputFormat))\n );\n}\n\n/**\n * The result's file name, which is also its name in storage: the worker\n * writes it and the control plane signs a PUT for it before the render runs,\n * so both sides read it from here.\n */\nexport function outputFileName(format: OutputFormat): string {\n if (isSequenceFormat(format)) return 'render.tar';\n return `render.${format === 'jpeg' ? 'jpg' : format}`;\n}\n\n/**\n * Bits per channel of a PNG output, a still's or a sequence's frames, unless\n * `bitDepth` says otherwise. 16, so a sequence's frame is the very PNG a\n * still of that pose is, and a compositor grading it has the headroom a\n * still gives. 8 is for a pipeline that ends in 8 bits anyway: measured\n * 2026-10-03 at 1400 × 1504, it is 0.98 MB a frame against 2.24 MB, and the\n * same time to trace and write.\n */\nexport const PNG_BIT_DEPTH_DEFAULT = 16;\n\n/** The first file in a `png-sequence` tar: what the rest of it is. */\nexport const FRAME_SEQUENCE_INDEX = 'frames.json';\n\n/**\n * `frame_00000.png`, zero-based like `animation.frameCount`'s frames, so file\n * `k` is the pose a channel's `k`-th sample describes.\n */\nexport function frameFileName(frame: number): string {\n return `frame_${String(frame).padStart(5, '0')}.png`;\n}\n\n/** `frames.json`, at the head of a `png-sequence` tar. */\nexport type FrameSequenceIndex = {\n fps: number;\n frameCount: number;\n width: number;\n height: number;\n bitDepth: 8 | 16;\n /** In frame order, one per frame: `frameFileName(0)` onwards. */\n files: string[];\n};\n\nexport type OutputSpec = {\n width: number;\n height: number;\n format: OutputFormat;\n /** JPEG/WebP only, 1 to 100. */\n quality?: number;\n /**\n * PNG and `png-sequence` only: bits per channel, 16 unless 8 is asked\n * for (`PNG_BIT_DEPTH_DEFAULT`).\n */\n bitDepth?: 8 | 16;\n /** Force an opaque background even when the environment is transparent. */\n opaque?: boolean;\n};\n\n/**\n * Escape hatch under the presets. Present so an expert is never blocked,\n * absent from the quickstart so a beginner is never asked to become a\n * rendering expert to get one image.\n */\nexport type AdvancedRenderSettings = {\n samples?: number;\n maxBounces?: number;\n diffuseBounces?: number;\n glossyBounces?: number;\n transmissionBounces?: number;\n /** Adaptive sampling noise floor: the real cost dial once denoising is on. */\n adaptiveThreshold?: number;\n denoise?: boolean;\n denoiser?: 'OPTIX' | 'OPENIMAGEDENOISE';\n /** Pays for itself with many emitters, costs overhead with few. */\n lightTree?: boolean;\n /**\n * Light that reaches a surface through glass: the bright pool under a\n * tumbler, the focus line beneath a lens. Off by default: with no caustic\n * paths a transmissive object casts a solid shadow, which is also what the\n * viewport's shadow maps draw, and tracing them costs samples a product\n * shot rarely needs.\n *\n * `'soft'` lets the path tracer find caustic paths itself, with the glossy\n * filter and the indirect clamp (both of which exist to hide caustics)\n * switched off. Unbiased, and slow to converge: a hard light through\n * curved glass stays grainy at studio samples.\n *\n * `'sharp'` adds a dedicated shadow-caustic solver on top: every scene\n * lamp casts caustics, every transmissive mesh is a caster, and every\n * other mesh (the shadow catcher included) receives them. This is what\n * makes a glass on a table converge at normal sample counts. It handles a\n * single refractive object between a lamp and a surface; light from an\n * HDRI or an emissive mesh still goes the `'soft'` way.\n *\n * The solver takes over lamp light through a caster rather than adding to\n * the traced paths, and it only follows light that goes straight through.\n * A faceted stone, whose light leaves after internal reflections, comes\n * back under `'sharp'` with no caustic at all. Cut gems want `'soft'`.\n *\n * Absent is off. There is no boolean on purpose: `caustics: true` would\n * have to mean one of the two. Changes pixels, so it is in the cache key.\n */\n caustics?: 'soft' | 'sharp';\n /**\n * A ceiling on how bright one indirect sample may be, in scene radiance.\n * Absent is the renderer's own default, which `caustics` switches off: a\n * caustic's focus is a very bright indirect sample, and capping it dims\n * the focus. That is right for a still and wrong for a clip, because the\n * rare uncapped hit lands on different pixels every frame, the denoiser\n * smears each one into a soft patch, and the patches boil. For caustics\n * in motion, start at 30 (the pool under a lens is still its full\n * brightness there) and trace larger than you publish.\n *\n * Set, it wins over what `caustics` would have chosen. Changes pixels, so\n * it is in the cache key, present only when set.\n */\n clampIndirect?: number;\n /**\n * Multiplies the converted energy of every light lifted from the scene\n * graph (directional, point, spot, area and the ambient dome) and leaves\n * the HDRI environment alone. The worker's unit table is physics and stays\n * fixed; this dial is for the residual gap, where a viewport (legacy-lights\n * intensities, usually) reads brighter than the physically converted lamps\n * do. One scalar, so the ratio between the scene's lights is preserved.\n * Default 1. Changes pixels, so it is in the cache key.\n */\n lightScale?: number;\n /**\n * Ground the product with a traced shadow catcher. Defaults on for\n * transparent/solid output and off for a visible environment background.\n */\n shadowCatcher?: boolean;\n /** Catcher size, as a multiple of the model's largest dimension. */\n shadowPad?: number;\n /**\n * The renderer's view transform override. Changes pixels, so it is in the\n * cache key. Pinning one also switches off `toneCurveEmulation`: an\n * explicit name is a statement about what the render should look like.\n */\n viewTransform?: string;\n /**\n * Reproduce three's tone mapping exactly instead of substituting the\n * nearest native view transform. On by default, and it is what makes a\n * traced frame the same color as the viewport it came from.\n *\n * Turn it off to get the substitution: a wider, more forgiving curve for a\n * scene whose viewport was never the reference. Changes pixels, so it is\n * in the cache key.\n */\n toneCurveEmulation?: boolean;\n /** Seconds. The worker stops the render rather than billing an unbounded job. */\n timeoutSeconds?: number;\n};\n\n// ---------------------------------------------------------------------------\n// The manifest\n// ---------------------------------------------------------------------------\n\n/**\n * Everything one render needs, minus the bytes.\n *\n * Typically a few KB. The heavy things (the GLB, textures, the HDRI) are\n * `sha256:` references that the control plane resolves against storage the\n * SDK already filled (see asset.ts).\n */\nexport type SceneManifest = {\n protocolVersion: string;\n sdkVersion: string;\n /** The exported GLB. */\n sceneAsset: AssetHash;\n /**\n * Extra blobs this scene needs that are not inside the GLB: an HDRI, an\n * IES profile, a texture the SDK stripped out to keep the GLB cacheable.\n */\n assets?: AssetHash[];\n camera: CameraSpec;\n runtime?: RuntimeState;\n environment?: EnvironmentSpec;\n lights?: LightSpec[];\n color: ColorSpec;\n fallbacks?: MaterialFallback[];\n /**\n * Node materials, as portable shader graphs (see shader.ts). The GLB still\n * carries the mesh; the material the exporter wrote for it is a stand-in\n * that the worker replaces wholesale with the rebuilt graph.\n */\n shaders?: MaterialShaderSpec[];\n /**\n * Baked per-frame motion (see animation.ts). Present only for a video,\n * and its presence is what makes this a 3.0 manifest.\n *\n * Not inside `runtime` on purpose: runtime is the one state the\n * application was in when Render was pressed, and every field in it is a\n * single value. A sequence is a different kind of thing.\n */\n animation?: AnimationSpec;\n /**\n * A room preset around the product (see room.ts). Its geometry, lights\n * and sky are not in the GLB or in `lights`: the worker rebuilds all of it\n * from the published definition, so a product in a room uploads only the\n * product. Presence makes this a 4.0 manifest.\n */\n room?: RoomPresetSpec;\n compatibility?: CompatibilityReport;\n /**\n * What the scene weighs, measured by the SDK at capture. The control plane\n * prices with it (a dense scene traces slower per pixel and unwraps slower\n * per object), so the quote a job is accepted under is the same one\n * `estimate()` gave with the same numbers. Operational, not visual: it is\n * outside every cache key.\n */\n stats?: {\n triangles: number;\n /** Bytes of texture the manifest's shader graphs sample, when known. */\n textureBytes?: number;\n /**\n * Distinct materials that emit light: a standard material with a\n * non-black emissive color, an unlit material (rendered as emission), or\n * a node material with an emission graph. The worker turns its light\n * tree on from this. Only the SDK can count them, since the GLB's\n * materials are opaque to the control plane.\n */\n emitters?: number;\n /**\n * How much of the sky above the camera the scene's geometry hides, 0 for\n * an open set and 1 inside a closed room (`SceneComplexity`). Walls keep\n * light bouncing, which is most of what makes an interior slow to render,\n * so the quote reads it. A preset room's stand-in counts, though it is not\n * uploaded: it stands for the room the renderer builds.\n */\n enclosure?: number;\n /** Meshes the scene draws, instances counted: how full it is. */\n objects?: number;\n };\n /**\n * Where the scene came from. Diagnostics only, but \"which three version\"\n * is the first question every support conversation starts with.\n */\n source?: {\n three?: string;\n r3f?: string;\n renderer?: string;\n userAgent?: string;\n };\n};\n\n/** A manifest plus what to make from it. This is the render request body. */\nexport type RenderSpec = {\n manifest: SceneManifest;\n quality: QualityPreset;\n output: OutputSpec;\n advanced?: AdvancedRenderSettings;\n /**\n * Hard ceiling in USD. Exceeded at estimate time means the job is refused\n * before it is admitted: `RenderBudgetExceeded`, not a surprise bill.\n */\n maxCost?: number;\n /** Emit a low-sample preview partway through. On by default for `studio`. */\n preview?: boolean;\n /** Echoed on the render record and every webhook. */\n metadata?: Record<string, unknown>;\n /**\n * A resubmit with the same key returns the existing render while it is\n * running or once it has completed, never a second charge. This is what\n * makes the SDK's own retries safe. A key whose render failed, was\n * cancelled or expired is free again: nothing was charged, and the\n * resubmit renders.\n */\n idempotencyKey?: string;\n /**\n * `high` puts this render ahead of the account's other waiting work in\n * the same lane: the hero shot before the rest of the queue. It never\n * jumps a lane; a person waiting still goes first.\n */\n priority?: 'normal' | 'high';\n};\n","/**\n * Quality presets: three words instead of a renderer manual.\n *\n * The three names are the public surface. The numbers below are read by the\n * worker, the estimator and the cache key from this one table, so they\n * cannot drift apart. `version` is here because changing any number changes\n * pixels: it travels in the render record and in the render cache key, so a\n * catalog that re-renders a SKU never silently gets a different image.\n */\n\nimport type { QualityPreset } from './manifest.js';\n\nexport type QualitySettings = {\n /** Bumped whenever any number in this preset changes. */\n version: number;\n /** A ceiling, not a target: adaptive sampling decides when a pixel stops. */\n samples: number;\n /**\n * The real cost dial. With adaptive sampling on, this noise floor is what\n * ends a pixel; the renderer's own default is strict enough that most\n * pixels run to the ceiling anyway.\n */\n adaptiveThreshold: number;\n maxBounces: number;\n diffuseBounces: number;\n glossyBounces: number;\n transmissionBounces: number;\n denoise: boolean;\n /** Long edge, in px, when the caller gives no explicit output size. */\n defaultLongEdge: number;\n /** Emit a low-sample preview partway through. */\n preview: boolean;\n /** Samples for that preview. Small enough to arrive in about a second. */\n previewSamples: number;\n};\n\nexport const QUALITY: Record<QualityPreset, QualitySettings> = {\n /**\n * \"Show me roughly what this will look like.\" Cheap enough to sit inside a\n * click, noisy enough that nobody will ship it.\n *\n * No denoiser, since version 3 (2026-10-03): with it, 32 samples of a\n * product came out close to a studio render, so the cheapest tier was a\n * finished image at half the price. The grain says draft, every choice a\n * preview is for (framing, light, materials, color) still reads through\n * it, and most of a preview's time was the denoiser.\n */\n preview: {\n version: 3,\n samples: 32,\n adaptiveThreshold: 0.08,\n maxBounces: 4,\n diffuseBounces: 2,\n glossyBounces: 4,\n transmissionBounces: 4,\n denoise: false,\n defaultLongEdge: 1024,\n preview: false,\n previewSamples: 16,\n },\n\n /**\n * The default. Deep enough on glossy and transmission to carry glaze,\n * metal and glass, which is where a product shot lives, and shallow on\n * diffuse, which buys almost nothing on a product against a transparent\n * background. The threshold ends most pixels well before the ceiling; the\n * denoiser carries the noisiest ones.\n */\n studio: {\n version: 2,\n samples: 256,\n adaptiveThreshold: 0.02,\n maxBounces: 8,\n diffuseBounces: 3,\n glossyBounces: 8,\n transmissionBounces: 8,\n denoise: true,\n defaultLongEdge: 2048,\n preview: true,\n previewSamples: 24,\n },\n\n /**\n * For the hero image that goes on the homepage. Roughly 8x studio's sample\n * ceiling and a much stricter threshold.\n */\n ultra: {\n version: 1,\n samples: 2048,\n adaptiveThreshold: 0.005,\n maxBounces: 16,\n diffuseBounces: 6,\n glossyBounces: 16,\n transmissionBounces: 16,\n denoise: true,\n defaultLongEdge: 4096,\n preview: true,\n previewSamples: 32,\n },\n};\n\n/** The preset with any `advanced` overrides folded in. */\nexport function resolveQuality(\n preset: QualityPreset,\n advanced?: Partial<QualitySettings> & {\n samples?: number;\n maxBounces?: number;\n },\n): QualitySettings {\n const base = QUALITY[preset];\n if (!advanced) return base;\n return { ...base, ...stripUndefined(advanced) };\n}\n\nfunction stripUndefined<T extends object>(value: T): Partial<T> {\n return Object.fromEntries(\n Object.entries(value).filter(([, v]) => v !== undefined),\n ) as Partial<T>;\n}\n","/** The published version. Must equal the version in package.json. */\nexport const SDK_VERSION = '0.2.0';\n"]}
1
+ {"version":3,"sources":["../src/protocol/manifest.ts","../src/protocol/quality.ts","../src/version.ts"],"names":[],"mappings":";AAwCO,IAAM,gBAAA,GAAmB,KAAA;AAGzB,IAAM,qBAAA,GA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OAAA,EAAS,CAAA;AAAA,IACT,OAAA,EAAS,GAAA;AAAA,IACT,iBAAA,EAAmB,IAAA;AAAA,IACnB,UAAA,EAAY,CAAA;AAAA,IACZ,cAAA,EAAgB,CAAA;AAAA,IAChB,aAAA,EAAe,CAAA;AAAA,IACf,mBAAA,EAAqB,CAAA;AAAA,IACrB,OAAA,EAAS,IAAA;AAAA,IACT,eAAA,EAAiB,IAAA;AAAA,IACjB,OAAA,EAAS,IAAA;AAAA,IACT,cAAA,EAAgB;AAAA,GAClB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,KAAA,EAAO;AAAA,IACL,OAAA,EAAS,CAAA;AAAA,IACT,OAAA,EAAS,IAAA;AAAA,IACT,iBAAA,EAAmB,IAAA;AAAA,IACnB,UAAA,EAAY,EAAA;AAAA,IACZ,cAAA,EAAgB,CAAA;AAAA,IAChB,aAAA,EAAe,EAAA;AAAA,IACf,mBAAA,EAAqB,EAAA;AAAA,IACrB,OAAA,EAAS,IAAA;AAAA,IACT,eAAA,EAAiB,IAAA;AAAA,IACjB,OAAA,EAAS,IAAA;AAAA,IACT,cAAA,EAAgB;AAAA;AAEpB;;;AClGO,IAAM,WAAA,GAAc","file":"chunk-R5IUPOWI.js","sourcesContent":["/**\n * The scene manifest: a GLB plus a versioned sidecar.\n *\n * glTF carries geometry, materials, textures, cameras, lights, skins and\n * morph targets well. What it does not carry is the state the running\n * application was in at the moment somebody pressed Render: which objects\n * were hidden, which of four cameras was live, what the renderer's tone\n * mapping was set to, which materials the SDK could not translate and what\n * the developer wants done about them. So the GLB is an asset and this is\n * the contract. `protocolVersion` is versioned independently of the SDK, of\n * the renderer and of the material translator, which is what makes a render\n * from six months ago reproducible.\n *\n * Everything here is JSON (no class instances, no functions) because it\n * travels from the browser through the control plane to the render worker\n * and is stored verbatim for replay.\n */\n\nimport type { AnimationSpec } from './animation.js';\nimport type { RoomPresetSpec } from './room.js';\nimport type { MaterialShaderSpec } from './shader.js';\n\n/**\n * Bumped only for a change a worker cannot read straight through. A worker\n * refuses a manifest whose major it does not implement rather than guessing;\n * a plausible wrong image is worse than a refusal.\n *\n * 2.0: `shaders`, node-material graphs. Without them a worker would render\n * the exporter's gray stand-in as if it were the material.\n *\n * 3.0: `animation`, baked per-frame channels. Without them a worker would\n * hand back one still of frame zero for a five-second orbit.\n *\n * 4.0: `room`, a room preset the worker rebuilds itself (see room.ts). The\n * room's geometry is deliberately not in the GLB, so a worker that ignored\n * the field would render the product floating in nothing.\n *\n * 5.0: `environment.fog`, the scene's fog traced as a volume. A worker that\n * ignored the field would hand back the scene in clear air.\n */\nexport const PROTOCOL_VERSION = '5.0';\n\n/** What a manifest with a room preset and no fog is stamped with. */\nexport const PROTOCOL_VERSION_ROOM = '4.0';\n\n/** What an animated manifest without a room preset is stamped with. */\nexport const PROTOCOL_VERSION_ANIMATED = '3.0';\n\n/**\n * What a manifest carrying no animation is stamped with. A still is still a\n * 2.0 document (every field in it means what it meant before), so stamping\n * it higher would only strand it at a worker not yet updated. See\n * `protocolVersionFor`.\n */\nexport const PROTOCOL_VERSION_STILL = '2.0';\n\n/** Every major the current worker can render faithfully. */\nexport const SUPPORTED_PROTOCOL_MAJORS = ['1', '2', '3', '4', '5'];\n\n/**\n * The version to stamp on a manifest: the lowest major that reads every\n * field in it faithfully (5.0 with fog, 4.0 with a room preset, 3.0 if\n * animated, 2.0 otherwise), so a manifest never strands itself at an older\n * worker for a field it does not carry.\n */\nexport function protocolVersionFor(manifest: {\n animation?: AnimationSpec;\n room?: RoomPresetSpec;\n environment?: { fog?: FogSpec };\n}): string {\n if (manifest.environment?.fog) return PROTOCOL_VERSION;\n if (manifest.room) return PROTOCOL_VERSION_ROOM;\n return manifest.animation\n ? PROTOCOL_VERSION_ANIMATED\n : PROTOCOL_VERSION_STILL;\n}\n\n/** `sha256:<64 hex>`: how every immutable blob is named. See asset.ts. */\nexport type AssetHash = string;\n\nexport type Vec3 = [number, number, number];\n/** glTF order: x, y, z, w. Any conversion to another order happens in the worker. */\nexport type Quat = [number, number, number, number];\nexport type Matrix4 = number[];\n\n// ---------------------------------------------------------------------------\n// Camera\n// ---------------------------------------------------------------------------\n\n/**\n * The active camera.\n *\n * Written out in full rather than referenced into the GLB by name: a live\n * R3F camera is frequently not in the scene graph the exporter walked (it\n * is held by `useThree`, or by drei's controls), so it travels as data.\n */\nexport type CameraSpec =\n | {\n type: 'perspective';\n /** Vertical FOV in degrees, matching three's `PerspectiveCamera.fov`. */\n fov: number;\n /**\n * The viewport's aspect ratio at capture time.\n *\n * The render matches vertical fov, so a wider output shows more at the\n * sides rather than cropping the top and bottom. Recorded so the\n * control plane can default the output to the viewport's own shape.\n */\n aspect?: number;\n near: number;\n far: number;\n position: Vec3;\n quaternion: Quat;\n /** three's `.zoom`, which scales the projection and is easy to forget. */\n zoom?: number;\n /** Present when the developer named a camera; only ever a label. */\n name?: string;\n /**\n * Depth of field, off unless present. `fStop` is a full-frame f-number\n * at this `fov`; `focalDistance` is in metres along the view axis.\n * `target` is the world point it was measured to: a worker that reads\n * it keeps that point sharp on every frame of a clip, and one that\n * does not still focuses the first frame right.\n */\n focus?: { fStop: number; focalDistance: number; target?: Vec3 };\n }\n | {\n type: 'orthographic';\n left: number;\n right: number;\n top: number;\n bottom: number;\n near: number;\n far: number;\n position: Vec3;\n quaternion: Quat;\n zoom?: number;\n name?: string;\n };\n\n// ---------------------------------------------------------------------------\n// Runtime state: the part glTF cannot express\n// ---------------------------------------------------------------------------\n\n/**\n * What the application had done to the scene by render time.\n *\n * Visibility is an explicit hidden list rather than \"export only what is\n * visible\" on purpose: the GLB is content-addressed and cached, and a\n * configurator that toggles one part between renders would otherwise miss\n * the cache every time. Ship one GLB with every variant in it, then hide\n * per render: the first render uploads the model, the next one uploads a\n * few KB.\n */\nexport type RuntimeState = {\n /** Object ids (see `objectId` in capture) the SDK found with `visible === false`. */\n hiddenObjectIds?: string[];\n /**\n * Transform overrides, for objects the application moved after export or\n * that were exported from a shared cached GLB.\n */\n transforms?: Array<{\n objectId: string;\n position?: Vec3;\n quaternion?: Quat;\n scale?: Vec3;\n }>;\n /** Morph target influences, by object. */\n morphs?: Array<{ objectId: string; influences: number[] }>;\n /** Current skeletal pose as bone-local matrices. */\n poses?: Array<{ objectId: string; boneMatrices: Matrix4[] }>;\n /**\n * `InstancedMesh` transforms. Written here rather than baked into the GLB\n * so changing a layout does not re-upload the geometry.\n *\n * `matrices` is flat: `count * 16` numbers, column-major, exactly as three\n * stores `instanceMatrix.array`. Nested arrays would add two bytes of JSON\n * per instance, which for a large scatter is a measurable part of the\n * manifest.\n */\n instances?: Array<{ objectId: string; count: number; matrices: number[] }>;\n /**\n * Opaque application state, echoed back on the render record. Never read\n * by the renderer; it exists so a stored render can say which sofa.\n */\n productState?: Record<string, unknown>;\n};\n\n// ---------------------------------------------------------------------------\n// Environment and lighting\n// ---------------------------------------------------------------------------\n\nexport type EnvironmentSpec = {\n /** An HDRI/EXR the SDK found on `scene.environment`, content-addressed. */\n hdri?: AssetHash;\n /** three's `Scene.environmentIntensity`. */\n intensity?: number;\n /** three's `Scene.environmentRotation`, radians, XYZ euler. */\n rotation?: Vec3;\n /**\n * The scene's `AmbientLight`s as one flat term. It ADDS to the HDRI, as it\n * does in three, and like three's it lights diffuse surfaces only: a\n * mirror reflects the environment and nothing of this.\n */\n ambient?: { color: string; intensity: number };\n /**\n * Background. `transparent` is the default: a still that composites is\n * worth more to a catalog pipeline than one with a baked backdrop.\n */\n background?:\n | { type: 'transparent' }\n | { type: 'color'; color: string }\n | { type: 'environment'; blurriness?: number };\n /** The scene's fog, when it has one the renderer can trace. */\n fog?: FogSpec;\n};\n\n/**\n * three's `FogExp2`, which the renderer traces as a volume filling the scene:\n * air that scatters the light passing through it, so a lamp or an emissive\n * mesh sits in a glow and throws visible beams.\n *\n * `density` is three's own number. three fades a surface by\n * `exp(-(density · d)²)`; a real volume thins light by `exp(-σ · d)`. The\n * two cannot agree at every distance, so the renderer uses σ = `density`,\n * which makes them agree where three's fog has taken all but 1/e of the\n * surface: nearer than that the render is a little foggier than the\n * viewport, further a little clearer.\n *\n * `color` is the fog's TINT (`#rrggbb`, as three holds it): its hue colors\n * the scattered light, its brightness is ignored. How bright traced fog\n * looks is decided by the light in it, which a rasterizer's fog color has to\n * guess. A linear `Fog` has no volume it corresponds to and is not carried;\n * the compatibility report says so.\n */\nexport type FogSpec = {\n color: string;\n density: number;\n};\n\n/**\n * Lights the SDK lifted out of the scene graph.\n *\n * Exported here as well as in the GLB because glTF's punctual-lights\n * extension has no notion of three's intensity-unit drift, no area lights\n * and no IES. The sidecar is where the good version lives and the GLB copy\n * is the fallback.\n */\nexport type LightSpec = {\n objectId: string;\n type: 'directional' | 'point' | 'spot' | 'area' | 'hemisphere';\n color: string;\n /**\n * three's own value, unconverted. The worker owns the unit conversion so\n * the physics is written down in one place.\n */\n intensity: number;\n /**\n * World position. A hemisphere light's is its up axis instead (three\n * normalizes it; absent is `[0, 1, 0]`).\n */\n position?: Vec3;\n /**\n * World point a directional, spot or area light aims at, as three's\n * `light.target` (or `lookAt`) does. Absent aims a directional or spot\n * light at the origin and leaves an area light facing straight down.\n */\n target?: Vec3;\n /**\n * Hemisphere lights only: the color from below (`groundColor`). `color` is\n * the sky. Absent is black, a sky with no ground bounce.\n */\n groundColor?: string;\n distance?: number;\n decay?: number;\n angle?: number;\n penumbra?: number;\n /** Area lights only, in world units. */\n size?: { width: number; height: number };\n /** Angular diameter in degrees: the shadow-softness dial for a sun. */\n angleDeg?: number;\n /** An IES profile, content-addressed. */\n ies?: AssetHash;\n castShadow?: boolean;\n};\n\n// ---------------------------------------------------------------------------\n// Color management\n// ---------------------------------------------------------------------------\n\n/**\n * The renderer's own color settings, copied verbatim.\n *\n * This is the difference between a render that looks like the developer's\n * app and one that is subtly, unfixably wrong. three's defaults changed in\n * r152 and again in r155; reading the live renderer beats assuming any of\n * them.\n */\nexport type ColorSpec = {\n outputColorSpace: 'srgb' | 'srgb-linear' | 'display-p3';\n toneMapping:\n | 'none'\n | 'linear'\n | 'reinhard'\n | 'cineon'\n | 'aces-filmic'\n | 'agx'\n | 'neutral';\n toneMappingExposure: number;\n};\n\n// ---------------------------------------------------------------------------\n// Material fallbacks and compatibility\n// ---------------------------------------------------------------------------\n\n/**\n * What to do with a material the renderer cannot be given honestly.\n *\n * Arbitrary GLSL does not translate, and the answer is to say so rather\n * than quietly render gray. A fallback is the developer's explicit\n * override, from `<Bakery3Material render={...}>` or from\n * `material.userData.bakery3.fallback`.\n */\nexport type MaterialFallback = {\n /** The material's uuid in the exported GLB. */\n materialId: string;\n type: 'physical';\n color?: string;\n metalness?: number;\n roughness?: number;\n clearcoat?: number;\n clearcoatRoughness?: number;\n transmission?: number;\n thickness?: number;\n ior?: number;\n emissive?: string;\n emissiveIntensity?: number;\n opacity?: number;\n sheen?: number;\n sheenColor?: string;\n iridescence?: number;\n anisotropy?: number;\n};\n\nexport type CompatibilitySeverity = 'info' | 'warning' | 'error';\n\n/**\n * One thing the SDK could not promise to reproduce: what it is, where it\n * lives in the tree, why, and the fix, without opening a debugger.\n */\nexport type CompatibilityIssue = {\n code: string;\n severity: CompatibilitySeverity;\n message: string;\n /** `<Car>/<Body>/<Paint>`: the path a developer can actually find. */\n path?: string;\n objectId?: string;\n materialId?: string;\n materialName?: string;\n materialType?: string;\n /** Deep link into the docs. */\n docs?: string;\n};\n\nexport type CompatibilityReport = {\n /** 0 to 1. Objects that will render faithfully, weighted by triangle count. */\n score: number;\n issues: CompatibilityIssue[];\n /** Rolled up for the devtools panel and the render record. */\n counts: { info: number; warning: number; error: number };\n};\n\n// ---------------------------------------------------------------------------\n// Output and quality\n// ---------------------------------------------------------------------------\n\n/** Presets, not raw renderer settings. Most scenes need only these. */\nexport type QualityPreset = 'preview' | 'studio' | 'ultra';\n\nexport type OutputFormat =\n 'png' | 'jpeg' | 'webp' | 'exr' | 'mp4' | 'webm' | 'png-sequence';\n\n/**\n * H.264 in mp4, VP9 in webm: an encoded video, opaque, written by the\n * renderer's own muxer. Both require `manifest.animation`: there is no\n * sensible video of a still, and guessing at one is not the worker's job.\n */\nexport const VIDEO_FORMATS: OutputFormat[] = ['mp4', 'webm'];\n\n/**\n * Every frame of a clip as its own PNG, alpha kept, delivered as one\n * uncompressed tar (`render.tar`) with a `frames.json` index first. Each\n * frame is exactly what a `png` still of that pose would be: the same color\n * pipeline, the background and the shadow catcher in alpha as a still has\n * them, straight (unassociated) alpha. For a compositor that puts the\n * product between layers of its own, which an mp4 cannot feed.\n */\nexport const SEQUENCE_FORMATS: OutputFormat[] = ['png-sequence'];\n\n/** An encoded video container: opaque, one file, no per-frame alpha. */\nexport function isVideoFormat(format: OutputFormat): boolean {\n return VIDEO_FORMATS.includes(format);\n}\n\n/** One file per frame, packed in a tar. */\nexport function isSequenceFormat(format: OutputFormat): boolean {\n return SEQUENCE_FORMATS.includes(format);\n}\n\n/**\n * A format that renders every frame of `manifest.animation` rather than one\n * still: a video or a sequence. It needs an animation, it is priced at the\n * clip rate, and the format is part of what the trace produces (so it is in\n * the cache key, where a still's format is not).\n */\nexport function isClipFormat(format: string | undefined): boolean {\n return (\n format !== undefined &&\n (isVideoFormat(format as OutputFormat) ||\n isSequenceFormat(format as OutputFormat))\n );\n}\n\n/**\n * The result's file name, which is also its name in storage: the worker\n * writes it and the control plane signs a PUT for it before the render runs,\n * so both sides read it from here.\n */\nexport function outputFileName(format: OutputFormat): string {\n if (isSequenceFormat(format)) return 'render.tar';\n return `render.${format === 'jpeg' ? 'jpg' : format}`;\n}\n\n/**\n * Bits per channel of a PNG output, a still's or a sequence's frames, unless\n * `bitDepth` says otherwise. 16, so a sequence's frame is the very PNG a\n * still of that pose is, and a compositor grading it has the headroom a\n * still gives. 8 is for a pipeline that ends in 8 bits anyway: measured\n * 2026-10-03 at 1400 × 1504, it is 0.98 MB a frame against 2.24 MB, and the\n * same time to trace and write.\n */\nexport const PNG_BIT_DEPTH_DEFAULT = 16;\n\n/** The first file in a `png-sequence` tar: what the rest of it is. */\nexport const FRAME_SEQUENCE_INDEX = 'frames.json';\n\n/**\n * `frame_00000.png`, zero-based like `animation.frameCount`'s frames, so file\n * `k` is the pose a channel's `k`-th sample describes.\n */\nexport function frameFileName(frame: number): string {\n return `frame_${String(frame).padStart(5, '0')}.png`;\n}\n\n/** `frames.json`, at the head of a `png-sequence` tar. */\nexport type FrameSequenceIndex = {\n fps: number;\n frameCount: number;\n width: number;\n height: number;\n bitDepth: 8 | 16;\n /** In frame order, one per frame: `frameFileName(0)` onwards. */\n files: string[];\n};\n\nexport type OutputSpec = {\n width: number;\n height: number;\n format: OutputFormat;\n /** JPEG/WebP only, 1 to 100. */\n quality?: number;\n /**\n * PNG and `png-sequence` only: bits per channel, 16 unless 8 is asked\n * for (`PNG_BIT_DEPTH_DEFAULT`).\n */\n bitDepth?: 8 | 16;\n /** Force an opaque background even when the environment is transparent. */\n opaque?: boolean;\n};\n\n/**\n * Escape hatch under the presets. Present so an expert is never blocked,\n * absent from the quickstart so a beginner is never asked to become a\n * rendering expert to get one image.\n */\nexport type AdvancedRenderSettings = {\n samples?: number;\n maxBounces?: number;\n diffuseBounces?: number;\n glossyBounces?: number;\n transmissionBounces?: number;\n /** Adaptive sampling noise floor: the real cost dial once denoising is on. */\n adaptiveThreshold?: number;\n denoise?: boolean;\n denoiser?: 'OPTIX' | 'OPENIMAGEDENOISE';\n /** Pays for itself with many emitters, costs overhead with few. */\n lightTree?: boolean;\n /**\n * Light that reaches a surface through glass: the bright pool under a\n * tumbler, the focus line beneath a lens. Off by default: with no caustic\n * paths a transmissive object casts a solid shadow, which is also what the\n * viewport's shadow maps draw, and tracing them costs samples a product\n * shot rarely needs.\n *\n * `'soft'` lets the path tracer find caustic paths itself, with the glossy\n * filter and the indirect clamp (both of which exist to hide caustics)\n * switched off. Unbiased, and slow to converge: a hard light through\n * curved glass stays grainy at studio samples.\n *\n * `'sharp'` adds a dedicated shadow-caustic solver on top: every scene\n * lamp casts caustics, every transmissive mesh is a caster, and every\n * other mesh (the shadow catcher included) receives them. This is what\n * makes a glass on a table converge at normal sample counts. It handles a\n * single refractive object between a lamp and a surface; light from an\n * HDRI or an emissive mesh still goes the `'soft'` way.\n *\n * The solver takes over lamp light through a caster rather than adding to\n * the traced paths, and it only follows light that goes straight through.\n * A faceted stone, whose light leaves after internal reflections, comes\n * back under `'sharp'` with no caustic at all. Cut gems want `'soft'`.\n *\n * Absent is off. There is no boolean on purpose: `caustics: true` would\n * have to mean one of the two. Changes pixels, so it is in the cache key.\n */\n caustics?: 'soft' | 'sharp';\n /**\n * A ceiling on how bright one indirect sample may be, in scene radiance.\n * Absent is the renderer's own default, which `caustics` switches off: a\n * caustic's focus is a very bright indirect sample, and capping it dims\n * the focus. That is right for a still and wrong for a clip, because the\n * rare uncapped hit lands on different pixels every frame, the denoiser\n * smears each one into a soft patch, and the patches boil. For caustics\n * in motion, start at 30 (the pool under a lens is still its full\n * brightness there) and trace larger than you publish.\n *\n * Set, it wins over what `caustics` would have chosen. Changes pixels, so\n * it is in the cache key, present only when set.\n */\n clampIndirect?: number;\n /**\n * Multiplies the converted energy of every light lifted from the scene\n * graph (directional, point, spot, area and the ambient dome) and leaves\n * the HDRI environment alone. The worker's unit table is physics and stays\n * fixed; this dial is for the residual gap, where a viewport (legacy-lights\n * intensities, usually) reads brighter than the physically converted lamps\n * do. One scalar, so the ratio between the scene's lights is preserved.\n * Default 1. Changes pixels, so it is in the cache key.\n */\n lightScale?: number;\n /**\n * Ground the product with a traced shadow catcher. Defaults on for\n * transparent/solid output and off for a visible environment background.\n */\n shadowCatcher?: boolean;\n /** Catcher size, as a multiple of the model's largest dimension. */\n shadowPad?: number;\n /**\n * The renderer's view transform override. Changes pixels, so it is in the\n * cache key. Pinning one also switches off `toneCurveEmulation`: an\n * explicit name is a statement about what the render should look like.\n */\n viewTransform?: string;\n /**\n * Reproduce three's tone mapping exactly instead of substituting the\n * nearest native view transform. On by default, and it is what makes a\n * traced frame the same color as the viewport it came from.\n *\n * Turn it off to get the substitution: a wider, more forgiving curve for a\n * scene whose viewport was never the reference. Changes pixels, so it is\n * in the cache key.\n */\n toneCurveEmulation?: boolean;\n /** Seconds. The worker stops the render rather than billing an unbounded job. */\n timeoutSeconds?: number;\n};\n\n// ---------------------------------------------------------------------------\n// The manifest\n// ---------------------------------------------------------------------------\n\n/**\n * Everything one render needs, minus the bytes.\n *\n * Typically a few KB. The heavy things (the GLB, textures, the HDRI) are\n * `sha256:` references that the control plane resolves against storage the\n * SDK already filled (see asset.ts).\n */\nexport type SceneManifest = {\n protocolVersion: string;\n sdkVersion: string;\n /** The exported GLB. */\n sceneAsset: AssetHash;\n /**\n * Extra blobs this scene needs that are not inside the GLB: an HDRI, an\n * IES profile, a texture the SDK stripped out to keep the GLB cacheable.\n */\n assets?: AssetHash[];\n camera: CameraSpec;\n runtime?: RuntimeState;\n environment?: EnvironmentSpec;\n lights?: LightSpec[];\n color: ColorSpec;\n fallbacks?: MaterialFallback[];\n /**\n * Node materials, as portable shader graphs (see shader.ts). The GLB still\n * carries the mesh; the material the exporter wrote for it is a stand-in\n * that the worker replaces wholesale with the rebuilt graph.\n */\n shaders?: MaterialShaderSpec[];\n /**\n * Baked per-frame motion (see animation.ts). Present only for a video,\n * and its presence is what makes this a 3.0 manifest.\n *\n * Not inside `runtime` on purpose: runtime is the one state the\n * application was in when Render was pressed, and every field in it is a\n * single value. A sequence is a different kind of thing.\n */\n animation?: AnimationSpec;\n /**\n * A room preset around the product (see room.ts). Its geometry, lights\n * and sky are not in the GLB or in `lights`: the worker rebuilds all of it\n * from the published definition, so a product in a room uploads only the\n * product. Presence makes this a 4.0 manifest.\n */\n room?: RoomPresetSpec;\n compatibility?: CompatibilityReport;\n /**\n * What the scene weighs, measured by the SDK at capture. The control plane\n * prices with it (a dense scene traces slower per pixel and unwraps slower\n * per object), so the quote a job is accepted under is the same one\n * `estimate()` gave with the same numbers. Operational, not visual: it is\n * outside every cache key.\n */\n stats?: {\n triangles: number;\n /** Bytes of texture the manifest's shader graphs sample, when known. */\n textureBytes?: number;\n /**\n * Distinct materials that emit light: a standard material with a\n * non-black emissive color, an unlit material (rendered as emission), or\n * a node material with an emission graph. The worker turns its light\n * tree on from this. Only the SDK can count them, since the GLB's\n * materials are opaque to the control plane.\n */\n emitters?: number;\n /**\n * How much of the sky above the camera the scene's geometry hides, 0 for\n * an open set and 1 inside a closed room (`SceneComplexity`). Walls keep\n * light bouncing, which is most of what makes an interior slow to render,\n * so the quote reads it. A preset room's stand-in counts, though it is not\n * uploaded: it stands for the room the renderer builds.\n */\n enclosure?: number;\n /** Meshes the scene draws, instances counted: how full it is. */\n objects?: number;\n };\n /**\n * Where the scene came from. Diagnostics only, but \"which three version\"\n * is the first question every support conversation starts with.\n */\n source?: {\n three?: string;\n r3f?: string;\n renderer?: string;\n userAgent?: string;\n };\n};\n\n/** A manifest plus what to make from it. This is the render request body. */\nexport type RenderSpec = {\n manifest: SceneManifest;\n quality: QualityPreset;\n output: OutputSpec;\n advanced?: AdvancedRenderSettings;\n /**\n * Hard ceiling in USD. Exceeded at estimate time means the job is refused\n * before it is admitted: `RenderBudgetExceeded`, not a surprise bill.\n */\n maxCost?: number;\n /** Emit a low-sample preview partway through. On by default for `studio`. */\n preview?: boolean;\n /** Echoed on the render record and every webhook. */\n metadata?: Record<string, unknown>;\n /**\n * A resubmit with the same key returns the existing render while it is\n * running or once it has completed, never a second charge. This is what\n * makes the SDK's own retries safe. A key whose render failed, was\n * cancelled or expired is free again: nothing was charged, and the\n * resubmit renders.\n */\n idempotencyKey?: string;\n /**\n * `high` puts this render ahead of the account's other waiting work in\n * the same lane: the hero shot before the rest of the queue. It never\n * jumps a lane; a person waiting still goes first.\n */\n priority?: 'normal' | 'high';\n};\n","/**\n * Quality presets: three words instead of a renderer manual.\n *\n * The three names are the public surface. The numbers below are read by the\n * worker, the estimator and the cache key from this one table, so they\n * cannot drift apart. `version` is here because changing any number changes\n * pixels: it travels in the render record and in the render cache key, so a\n * catalog that re-renders a SKU never silently gets a different image.\n */\n\nimport type { QualityPreset } from './manifest.js';\n\nexport type QualitySettings = {\n /** Bumped whenever any number in this preset changes. */\n version: number;\n /** A ceiling, not a target: adaptive sampling decides when a pixel stops. */\n samples: number;\n /**\n * The real cost dial. With adaptive sampling on, this noise floor is what\n * ends a pixel; the renderer's own default is strict enough that most\n * pixels run to the ceiling anyway.\n */\n adaptiveThreshold: number;\n maxBounces: number;\n diffuseBounces: number;\n glossyBounces: number;\n transmissionBounces: number;\n denoise: boolean;\n /** Long edge, in px, when the caller gives no explicit output size. */\n defaultLongEdge: number;\n /** Emit a low-sample preview partway through. */\n preview: boolean;\n /** Samples for that preview. Small enough to arrive in about a second. */\n previewSamples: number;\n};\n\nexport const QUALITY: Record<QualityPreset, QualitySettings> = {\n /**\n * \"Show me roughly what this will look like.\" Cheap enough to sit inside a\n * click, noisy enough that nobody will ship it.\n *\n * No denoiser, since version 3 (2026-10-03): with it, 32 samples of a\n * product came out close to a studio render, so the cheapest tier was a\n * finished image at half the price. The grain says draft, every choice a\n * preview is for (framing, light, materials, color) still reads through\n * it, and most of a preview's time was the denoiser.\n */\n preview: {\n version: 3,\n samples: 32,\n adaptiveThreshold: 0.08,\n maxBounces: 4,\n diffuseBounces: 2,\n glossyBounces: 4,\n transmissionBounces: 4,\n denoise: false,\n defaultLongEdge: 1024,\n preview: false,\n previewSamples: 16,\n },\n\n /**\n * The default. Deep enough on glossy and transmission to carry glaze,\n * metal and glass, which is where a product shot lives, and shallow on\n * diffuse, which buys almost nothing on a product against a transparent\n * background. The threshold ends most pixels well before the ceiling; the\n * denoiser carries the noisiest ones.\n */\n studio: {\n version: 2,\n samples: 256,\n adaptiveThreshold: 0.02,\n maxBounces: 8,\n diffuseBounces: 3,\n glossyBounces: 8,\n transmissionBounces: 8,\n denoise: true,\n defaultLongEdge: 2048,\n preview: true,\n previewSamples: 24,\n },\n\n /**\n * For the hero image that goes on the homepage. Roughly 8x studio's sample\n * ceiling and a much stricter threshold.\n */\n ultra: {\n version: 1,\n samples: 2048,\n adaptiveThreshold: 0.005,\n maxBounces: 16,\n diffuseBounces: 6,\n glossyBounces: 16,\n transmissionBounces: 16,\n denoise: true,\n defaultLongEdge: 4096,\n preview: true,\n previewSamples: 32,\n },\n};\n\n/** The preset with any `advanced` overrides folded in. */\nexport function resolveQuality(\n preset: QualityPreset,\n advanced?: Partial<QualitySettings> & {\n samples?: number;\n maxBounces?: number;\n },\n): QualitySettings {\n const base = QUALITY[preset];\n if (!advanced) return base;\n return { ...base, ...stripUndefined(advanced) };\n}\n\nfunction stripUndefined<T extends object>(value: T): Partial<T> {\n return Object.fromEntries(\n Object.entries(value).filter(([, v]) => v !== undefined),\n ) as Partial<T>;\n}\n","/** The published version. Must equal the version in package.json. */\nexport const SDK_VERSION = '0.3.0';\n"]}
@@ -1,6 +1,6 @@
1
1
  import { rememberEnvironmentSource, sha256 } from './chunk-KZLVTSBI.js';
2
2
  import { presetBaseUrl } from './chunk-4E5VV4QY.js';
3
- import { applyRoomPrebake, roomPresetSpecOf } from './chunk-APWUCEEB.js';
3
+ import { applyRoomPrebake, roomPresetSpecOf } from './chunk-EN4ROBYQ.js';
4
4
  import { HDRI_PRESETS, PRESETS_VERSION, MATERIAL_PRESETS, PEDESTAL_PRESETS } from './chunk-6NYR73Y7.js';
5
5
  import { ROOM_PRESETS } from './chunk-LAKXC4WR.js';
6
6
  import { Bakery3Error } from './chunk-3G5QL4F4.js';
@@ -1705,5 +1705,5 @@ function presetRoomBounds(name) {
1705
1705
  }
1706
1706
 
1707
1707
  export { applyPresetRoomCamera, coverFit, createPedestal, createPresetMaterial, createPresetRoom, createRoom, createSkyEnvironment, loadPresetEnvironment, loadPresetMaterial, plainFloatGeometry, presetRoomBounds, presetRoomUrl, roomLensFovDeg, stampRoomIds, stampRoomStandIns };
1708
- //# sourceMappingURL=chunk-HNMSWQU7.js.map
1709
- //# sourceMappingURL=chunk-HNMSWQU7.js.map
1708
+ //# sourceMappingURL=chunk-STRK4SZN.js.map
1709
+ //# sourceMappingURL=chunk-STRK4SZN.js.map