@automovie/render 0.3.0 → 0.3.2

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 (110) hide show
  1. package/lib/AutoMovieFrameGrid.d.ts +54 -0
  2. package/lib/AutoMovieFrameGrid.js +71 -0
  3. package/lib/AutoMovieFrameGrid.js.map +1 -0
  4. package/lib/AutoMovieFrameGrid.mjs +20 -0
  5. package/lib/AutoMovieFrameGrid.mjs.map +1 -0
  6. package/lib/caption/canonicalProductionWebVtt.d.ts +5 -3
  7. package/lib/caption/canonicalProductionWebVtt.js +19 -4
  8. package/lib/caption/canonicalProductionWebVtt.js.map +1 -1
  9. package/lib/caption/canonicalProductionWebVtt.mjs +15 -4
  10. package/lib/caption/canonicalProductionWebVtt.mjs.map +1 -1
  11. package/lib/draw/bindAutoMovieDrawSceneSoftProps.d.ts +15 -0
  12. package/lib/draw/bindAutoMovieDrawSceneSoftProps.js +41 -0
  13. package/lib/draw/bindAutoMovieDrawSceneSoftProps.js.map +1 -0
  14. package/lib/draw/bindAutoMovieDrawSceneSoftProps.mjs +36 -0
  15. package/lib/draw/bindAutoMovieDrawSceneSoftProps.mjs.map +1 -0
  16. package/lib/draw/index.d.ts +1 -0
  17. package/lib/draw/index.js +1 -0
  18. package/lib/draw/index.js.map +1 -1
  19. package/lib/draw/index.mjs +2 -1
  20. package/lib/index.d.ts +1 -0
  21. package/lib/index.js +1 -0
  22. package/lib/index.js.map +1 -1
  23. package/lib/index.mjs +12 -7
  24. package/lib/planSequenceRender.d.ts +5 -5
  25. package/lib/planSequenceRender.js +12 -6
  26. package/lib/planSequenceRender.js.map +1 -1
  27. package/lib/planSequenceRender.mjs +12 -8
  28. package/lib/planSequenceRender.mjs.map +1 -1
  29. package/lib/scene/IAutoMovieSceneObject.d.ts +4 -1
  30. package/lib/scene/IAutoMovieSceneSoftProps.d.ts +36 -0
  31. package/lib/scene/IAutoMovieSceneSoftProps.js +3 -0
  32. package/lib/scene/IAutoMovieSceneSoftProps.js.map +1 -0
  33. package/lib/scene/IAutoMovieSceneSoftProps.mjs +0 -0
  34. package/lib/scene/IChunkObject.d.ts +7 -3
  35. package/lib/scene/applyPracticalSurfaceMaterials.d.ts +31 -0
  36. package/lib/scene/applyPracticalSurfaceMaterials.js +87 -0
  37. package/lib/scene/applyPracticalSurfaceMaterials.js.map +1 -0
  38. package/lib/scene/applyPracticalSurfaceMaterials.mjs +47 -0
  39. package/lib/scene/applyPracticalSurfaceMaterials.mjs.map +1 -0
  40. package/lib/scene/buildInstancedFormation.d.ts +1 -1
  41. package/lib/scene/buildInstancedFormation.js +44 -19
  42. package/lib/scene/buildInstancedFormation.js.map +1 -1
  43. package/lib/scene/buildInstancedFormation.mjs +30 -13
  44. package/lib/scene/buildInstancedFormation.mjs.map +1 -1
  45. package/lib/scene/buildScene.d.ts +10 -7
  46. package/lib/scene/buildScene.js +21 -7
  47. package/lib/scene/buildScene.js.map +1 -1
  48. package/lib/scene/buildScene.mjs +27 -9
  49. package/lib/scene/buildScene.mjs.map +1 -1
  50. package/lib/scene/buildSceneSoftProps.d.ts +15 -0
  51. package/lib/scene/buildSceneSoftProps.js +71 -0
  52. package/lib/scene/buildSceneSoftProps.js.map +1 -0
  53. package/lib/scene/buildSceneSoftProps.mjs +67 -0
  54. package/lib/scene/buildSceneSoftProps.mjs.map +1 -0
  55. package/lib/scene/human-polygon/AutoMovieHumanPolygon.d.ts +52 -1
  56. package/lib/scene/human-polygon/buildHumanPolygon.d.ts +3 -1
  57. package/lib/scene/human-polygon/buildHumanPolygon.js +14 -2
  58. package/lib/scene/human-polygon/buildHumanPolygon.js.map +1 -1
  59. package/lib/scene/human-polygon/buildHumanPolygon.mjs +11 -2
  60. package/lib/scene/human-polygon/buildHumanPolygon.mjs.map +1 -1
  61. package/lib/scene/human-polygon/buildPolygonShotActor.d.ts +40 -0
  62. package/lib/scene/human-polygon/buildPolygonShotActor.js +69 -0
  63. package/lib/scene/human-polygon/buildPolygonShotActor.js.map +1 -0
  64. package/lib/scene/human-polygon/buildPolygonShotActor.mjs +74 -0
  65. package/lib/scene/human-polygon/buildPolygonShotActor.mjs.map +1 -0
  66. package/lib/scene/human-polygon/index.d.ts +1 -0
  67. package/lib/scene/human-polygon/index.js +3 -1
  68. package/lib/scene/human-polygon/index.js.map +1 -1
  69. package/lib/scene/human-polygon/index.mjs +2 -1
  70. package/lib/scene/human-polygon/prepareHumanPolygonPresentation.d.ts +17 -0
  71. package/lib/scene/human-polygon/prepareHumanPolygonPresentation.js +231 -0
  72. package/lib/scene/human-polygon/prepareHumanPolygonPresentation.js.map +1 -0
  73. package/lib/scene/human-polygon/prepareHumanPolygonPresentation.mjs +189 -0
  74. package/lib/scene/human-polygon/prepareHumanPolygonPresentation.mjs.map +1 -0
  75. package/lib/scene/index.d.ts +3 -0
  76. package/lib/scene/index.js +3 -0
  77. package/lib/scene/index.js.map +1 -1
  78. package/lib/scene/index.mjs +45 -42
  79. package/lib/scene/renderAutoMovieFilmFrame.d.ts +6 -4
  80. package/lib/scene/renderAutoMovieFilmFrame.js +12 -8
  81. package/lib/scene/renderAutoMovieFilmFrame.js.map +1 -1
  82. package/lib/scene/renderAutoMovieFilmFrame.mjs +12 -8
  83. package/lib/scene/renderAutoMovieFilmFrame.mjs.map +1 -1
  84. package/lib/scene/softPropCordSurface.d.ts +14 -0
  85. package/lib/scene/softPropCordSurface.js +128 -0
  86. package/lib/scene/softPropCordSurface.js.map +1 -0
  87. package/lib/scene/softPropCordSurface.mjs +88 -0
  88. package/lib/scene/softPropCordSurface.mjs.map +1 -0
  89. package/package.json +4 -4
  90. package/src/AutoMovieFrameGrid.ts +70 -0
  91. package/src/caption/canonicalProductionWebVtt.ts +20 -4
  92. package/src/draw/bindAutoMovieDrawSceneSoftProps.ts +43 -0
  93. package/src/draw/index.ts +1 -0
  94. package/src/index.ts +1 -0
  95. package/src/planSequenceRender.ts +21 -10
  96. package/src/scene/IAutoMovieSceneObject.ts +6 -1
  97. package/src/scene/IAutoMovieSceneSoftProps.ts +38 -0
  98. package/src/scene/IChunkObject.ts +10 -3
  99. package/src/scene/applyPracticalSurfaceMaterials.ts +79 -0
  100. package/src/scene/buildInstancedFormation.ts +86 -55
  101. package/src/scene/buildScene.ts +22 -6
  102. package/src/scene/buildSceneSoftProps.ts +83 -0
  103. package/src/scene/human-polygon/AutoMovieHumanPolygon.ts +61 -1
  104. package/src/scene/human-polygon/buildHumanPolygon.ts +22 -2
  105. package/src/scene/human-polygon/buildPolygonShotActor.ts +112 -0
  106. package/src/scene/human-polygon/index.ts +1 -0
  107. package/src/scene/human-polygon/prepareHumanPolygonPresentation.ts +328 -0
  108. package/src/scene/index.ts +3 -0
  109. package/src/scene/renderAutoMovieFilmFrame.ts +14 -9
  110. package/src/scene/softPropCordSurface.ts +132 -0
@@ -0,0 +1,189 @@
1
+ import { Quaternion, Vector3 } from "three";
2
+ // src/scene/human-polygon/prepareHumanPolygonPresentation.ts
3
+ /** Admit a finite quaternion with the same squared-norm tolerance as a polygon pose. */
4
+ function unitRotation(x, y, z, w, label) {
5
+ if (![
6
+ x,
7
+ y,
8
+ z,
9
+ w
10
+ ].every(Number.isFinite) || Math.abs(x ** 2 + y ** 2 + z ** 2 + w ** 2 - 1) > 1e-6) throw new Error(`Invalid polygon rotation: ${label}`);
11
+ return new Quaternion(x, y, z, w).normalize();
12
+ }
13
+ /** Admit the metre translation of a rigid frame. */
14
+ function finitePosition(x, y, z, label) {
15
+ if (![
16
+ x,
17
+ y,
18
+ z
19
+ ].every(Number.isFinite)) throw new Error(`Invalid polygon position: ${label}`);
20
+ return new Vector3(x, y, z);
21
+ }
22
+ /** Copy one source joint frame for arithmetic without mutating the evaluated pose. */
23
+ function boneFrame(placement) {
24
+ if (placement.position.length !== 3 || placement.rotation.length !== 4) throw new Error(`Invalid polygon placement: ${placement.bone}`);
25
+ return {
26
+ position: finitePosition(...placement.position, placement.bone),
27
+ rotation: unitRotation(...placement.rotation, placement.bone)
28
+ };
29
+ }
30
+ /** Read the actor parent frame in shot world or use the fixed identity frame. */
31
+ function actorFrame(actorFrameAt, seconds) {
32
+ if (actorFrameAt === void 0) return {
33
+ position: new Vector3(),
34
+ rotation: new Quaternion()
35
+ };
36
+ const { position, rotation } = actorFrameAt(seconds);
37
+ return {
38
+ position: finitePosition(position.x, position.y, position.z, "actor frame"),
39
+ rotation: unitRotation(rotation.x, rotation.y, rotation.z, rotation.w, "actor frame")
40
+ };
41
+ }
42
+ /**
43
+ * Prepare rigid visual cues for one polygon drawing on its source clock.
44
+ *
45
+ * @evidence contracts/development/common.md#meaningful-documentation Takes source poses, a source hierarchy, emitted targets and actor staging. Returns a seekable sampler in Human body coordinates.
46
+ * @evidence contracts/development/implementation.md#principled-implementation Resolves disjoint subtrees through source parents and requires an emitted part in each subtree. Bends use a live joint pivot. A release admits the replaced live placements and maps its world-space snapshot back through live actor staging.
47
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure Preparation owns target admission and reference sampling. Existing pose admission and graphics writes remain at the drawing.
48
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses the actual source pivots and emitted descendants. No simulation, graph creation or changes to the source skeletal pose are performed.
49
+ * @evidence contracts/development/implementation.md#efficient-algorithms Admission builds a child index and visits each selected bone once. A release scans one source pose and retains only its branch placements. Active drawing samples index and visit the live pose once.
50
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work The source hierarchy and captured release frames are reused across samples, including reverse seeks. Bend-only samples need no actor staging.
51
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Retains one reference frame per released bone and no graphics or external handles.
52
+ */
53
+ function prepareHumanPolygonPresentation(presentation, bones, emitted) {
54
+ const { subject, poseAt, actorFrameAt } = presentation;
55
+ const children = /* @__PURE__ */ new Map();
56
+ for (const { bone, parent } of bones.values()) {
57
+ if (parent === null) continue;
58
+ const siblings = children.get(parent);
59
+ if (siblings === void 0) children.set(parent, [bone]);
60
+ else siblings.push(bone);
61
+ }
62
+ const cuesByBone = /* @__PURE__ */ new Map();
63
+ const occupied = /* @__PURE__ */ new Set();
64
+ let firstCue = Infinity;
65
+ for (const cue of presentation.cues) {
66
+ if (cue.subject !== subject) continue;
67
+ if (!bones.has(cue.bone)) throw new Error(`Unsupported polygon cue target: ${cue.bone}`);
68
+ if (!Number.isFinite(cue.at) || cue.at < 0 || !Number.isFinite(cue.duration) || cue.duration < 0 || !Number.isFinite(cue.at + cue.duration)) throw new Error(`Invalid polygon cue timing: ${cue.bone}`);
69
+ firstCue = Math.min(firstCue, cue.at);
70
+ const subtree = [cue.bone];
71
+ let hasEmittedPart = false;
72
+ for (const bone of subtree) {
73
+ if (occupied.has(bone)) throw new Error(`Overlapping polygon cue subtree: ${bone}`);
74
+ occupied.add(bone);
75
+ hasEmittedPart ||= emitted.has(bone);
76
+ for (const child of children.get(bone) ?? []) subtree.push(child);
77
+ }
78
+ if (!hasEmittedPart) throw new Error(`Unsupported polygon cue target: ${cue.bone}`);
79
+ const { x, y, z, w } = cue.rotation;
80
+ const norm = Math.hypot(x, y, z, w);
81
+ if (![
82
+ x,
83
+ y,
84
+ z,
85
+ w
86
+ ].every(Number.isFinite) || Math.abs(norm - 1) > 1e-6) throw new Error(`Invalid polygon rotation: ${cue.bone}`);
87
+ const timing = {
88
+ at: cue.at,
89
+ duration: cue.duration,
90
+ rotation: new Quaternion(x / norm, y / norm, z / norm, w / norm)
91
+ };
92
+ let prepared;
93
+ if (cue.kind === "bend") prepared = {
94
+ ...timing,
95
+ kind: cue.kind,
96
+ bone: cue.bone
97
+ };
98
+ else if (cue.kind === "detach") {
99
+ const translation = finitePosition(cue.translation.x, cue.translation.y, cue.translation.z, cue.bone);
100
+ const released = /* @__PURE__ */ new Map();
101
+ const selected = new Set(subtree);
102
+ const actor = actorFrame(actorFrameAt, cue.at);
103
+ for (const placement of poseAt(cue.at).posed) {
104
+ if (!selected.has(placement.bone)) continue;
105
+ if (released.has(placement.bone)) throw new Error(`Duplicate polygon release placement: ${placement.bone}`);
106
+ const frame = boneFrame(placement);
107
+ frame.position.applyQuaternion(actor.rotation).add(actor.position);
108
+ frame.rotation.premultiply(actor.rotation);
109
+ released.set(placement.bone, frame);
110
+ }
111
+ const origin = released.get(cue.bone);
112
+ if (origin === void 0 || released.size !== subtree.length) throw new Error(`Incomplete polygon release pose: ${cue.bone}`);
113
+ prepared = {
114
+ ...timing,
115
+ kind: cue.kind,
116
+ pivot: origin.position,
117
+ released,
118
+ translation
119
+ };
120
+ } else throw new Error("Unsupported polygon cue kind");
121
+ for (const bone of subtree) cuesByBone.set(bone, prepared);
122
+ }
123
+ return (seconds) => {
124
+ if (!Number.isFinite(seconds)) throw new Error("Invalid polygon drawing time");
125
+ const pose = poseAt(seconds);
126
+ if (seconds < firstCue) return pose;
127
+ const live = new Map(pose.posed.map((placement) => [placement.bone, placement]));
128
+ const deltas = /* @__PURE__ */ new Map();
129
+ let actor;
130
+ let inverseActorRotation;
131
+ return { posed: pose.posed.map((placement) => {
132
+ const cue = cuesByBone.get(placement.bone);
133
+ if (cue === void 0 || seconds < cue.at) return placement;
134
+ const amount = cue.duration === 0 ? 1 : Math.min(1, (seconds - cue.at) / cue.duration);
135
+ if (amount === 0) return placement;
136
+ let delta = deltas.get(cue);
137
+ if (delta === void 0) {
138
+ const rotation = new Quaternion().slerp(cue.rotation, amount);
139
+ if (cue.kind === "bend") {
140
+ const joint = live.get(cue.bone);
141
+ if (joint === void 0) throw new Error(`Missing polygon bend pivot: ${cue.bone}`);
142
+ const frame = boneFrame(joint);
143
+ rotation.premultiply(frame.rotation).multiply(frame.rotation.invert());
144
+ delta = {
145
+ position: frame.position,
146
+ rotation
147
+ };
148
+ } else {
149
+ actor ??= actorFrame(actorFrameAt, seconds);
150
+ inverseActorRotation ??= actor.rotation.clone().invert();
151
+ delta = {
152
+ position: cue.pivot.clone().addScaledVector(cue.translation, amount),
153
+ rotation
154
+ };
155
+ }
156
+ deltas.set(cue, delta);
157
+ }
158
+ let frame = boneFrame(placement);
159
+ if (cue.kind === "bend") {
160
+ frame.position.sub(delta.position).applyQuaternion(delta.rotation).add(delta.position);
161
+ frame.rotation.premultiply(delta.rotation);
162
+ } else {
163
+ const release = cue.released.get(placement.bone);
164
+ if (release === void 0 || actor === void 0 || inverseActorRotation === void 0) throw new Error(`Missing polygon release frame: ${placement.bone}`);
165
+ frame = {
166
+ position: release.position.clone().sub(cue.pivot).applyQuaternion(delta.rotation).add(delta.position).sub(actor.position).applyQuaternion(inverseActorRotation),
167
+ rotation: release.rotation.clone().premultiply(delta.rotation).premultiply(inverseActorRotation)
168
+ };
169
+ }
170
+ return {
171
+ bone: placement.bone,
172
+ position: [
173
+ frame.position.x,
174
+ frame.position.y,
175
+ frame.position.z
176
+ ],
177
+ rotation: [
178
+ frame.rotation.x,
179
+ frame.rotation.y,
180
+ frame.rotation.z,
181
+ frame.rotation.w
182
+ ]
183
+ };
184
+ }) };
185
+ };
186
+ }
187
+ export { prepareHumanPolygonPresentation };
188
+
189
+ //# sourceMappingURL=prepareHumanPolygonPresentation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareHumanPolygonPresentation.mjs","names":[],"sources":["../../../src/scene/human-polygon/prepareHumanPolygonPresentation.ts"],"sourcesContent":["import type {\n IAutoMovieHumanBindBone,\n IAutoMovieHumanBonePlacement,\n IAutoMovieHumanSkeleton,\n IAutoMoviePolygonBodyCue,\n IAutoMovieRigidTransform,\n} from \"@automovie/interface\";\nimport { Quaternion, Vector3 } from \"three\";\n\nimport type { AutoMovieHumanPolygon } from \"./AutoMovieHumanPolygon.js\";\n\n/** A complete evaluated pose in registered Human body coordinates. */\ntype AutoMoviePolygonPose = Pick<IAutoMovieHumanSkeleton.IOutput, \"posed\">;\n\n/** One evaluated frame retained or used for rigid placement arithmetic. */\ninterface IAutoMoviePolygonFrame {\n position: Vector3;\n rotation: Quaternion;\n}\n\n/** Shared timing and authored rotation of a prepared visual cue. */\ninterface IAutoMoviePolygonCueTiming {\n at: number;\n duration: number;\n rotation: Quaternion;\n}\n\n/** A live bend or a frozen shot-world release with its authored displacement. */\ntype AutoMoviePreparedPolygonCue = IAutoMoviePolygonCueTiming &\n (\n | { kind: \"bend\"; bone: string }\n | {\n kind: \"detach\";\n pivot: Vector3;\n released: ReadonlyMap<string, IAutoMoviePolygonFrame>;\n translation: Vector3;\n }\n );\n\n/** Admit a finite quaternion with the same squared-norm tolerance as a polygon pose. */\nfunction unitRotation(\n x: number,\n y: number,\n z: number,\n w: number,\n label: string,\n): Quaternion {\n if (\n ![x, y, z, w].every(Number.isFinite) ||\n Math.abs(x ** 2 + y ** 2 + z ** 2 + w ** 2 - 1) > 1e-6\n )\n throw new Error(`Invalid polygon rotation: ${label}`);\n return new Quaternion(x, y, z, w).normalize();\n}\n\n/** Admit the metre translation of a rigid frame. */\nfunction finitePosition(\n x: number,\n y: number,\n z: number,\n label: string,\n): Vector3 {\n if (![x, y, z].every(Number.isFinite))\n throw new Error(`Invalid polygon position: ${label}`);\n return new Vector3(x, y, z);\n}\n\n/** Copy one source joint frame for arithmetic without mutating the evaluated pose. */\nfunction boneFrame(\n placement: IAutoMovieHumanBonePlacement,\n): IAutoMoviePolygonFrame {\n if (placement.position.length !== 3 || placement.rotation.length !== 4)\n throw new Error(`Invalid polygon placement: ${placement.bone}`);\n return {\n position: finitePosition(...placement.position, placement.bone),\n rotation: unitRotation(...placement.rotation, placement.bone),\n };\n}\n\n/** Read the actor parent frame in shot world or use the fixed identity frame. */\nfunction actorFrame(\n actorFrameAt: AutoMovieHumanPolygon.IPresentation[\"actorFrameAt\"],\n seconds: number,\n): IAutoMoviePolygonFrame {\n if (actorFrameAt === undefined)\n return { position: new Vector3(), rotation: new Quaternion() };\n const { position, rotation }: IAutoMovieRigidTransform =\n actorFrameAt(seconds);\n return {\n position: finitePosition(position.x, position.y, position.z, \"actor frame\"),\n rotation: unitRotation(\n rotation.x,\n rotation.y,\n rotation.z,\n rotation.w,\n \"actor frame\",\n ),\n };\n}\n\n/**\n * Prepare rigid visual cues for one polygon drawing on its source clock.\n *\n * @evidence contracts/development/common.md#meaningful-documentation Takes source poses, a source hierarchy, emitted targets and actor staging. Returns a seekable sampler in Human body coordinates.\n * @evidence contracts/development/implementation.md#principled-implementation Resolves disjoint subtrees through source parents and requires an emitted part in each subtree. Bends use a live joint pivot. A release admits the replaced live placements and maps its world-space snapshot back through live actor staging.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Preparation owns target admission and reference sampling. Existing pose admission and graphics writes remain at the drawing.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses the actual source pivots and emitted descendants. No simulation, graph creation or changes to the source skeletal pose are performed.\n * @evidence contracts/development/implementation.md#efficient-algorithms Admission builds a child index and visits each selected bone once. A release scans one source pose and retains only its branch placements. Active drawing samples index and visit the live pose once.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work The source hierarchy and captured release frames are reused across samples, including reverse seeks. Bend-only samples need no actor staging.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Retains one reference frame per released bone and no graphics or external handles.\n */\nexport function prepareHumanPolygonPresentation(\n presentation: AutoMovieHumanPolygon.IPresentation,\n bones: ReadonlyMap<string, IAutoMovieHumanBindBone>,\n emitted: ReadonlySet<string>,\n): (seconds: number) => AutoMoviePolygonPose {\n const { subject, poseAt, actorFrameAt }: AutoMovieHumanPolygon.IPresentation =\n presentation;\n const children: Map<string, string[]> = new Map();\n for (const { bone, parent } of bones.values()) {\n if (parent === null) continue;\n const siblings: string[] | undefined = children.get(parent);\n if (siblings === undefined) children.set(parent, [bone]);\n else siblings.push(bone);\n }\n\n const cuesByBone: Map<string, AutoMoviePreparedPolygonCue> = new Map();\n const occupied: Set<string> = new Set();\n let firstCue: number = Infinity;\n for (const cue of presentation.cues) {\n if (cue.subject !== subject) continue;\n if (!bones.has(cue.bone))\n throw new Error(`Unsupported polygon cue target: ${cue.bone}`);\n if (\n !Number.isFinite(cue.at) ||\n cue.at < 0 ||\n !Number.isFinite(cue.duration) ||\n cue.duration < 0 ||\n !Number.isFinite(cue.at + cue.duration)\n )\n throw new Error(`Invalid polygon cue timing: ${cue.bone}`);\n firstCue = Math.min(firstCue, cue.at);\n\n const subtree: string[] = [cue.bone];\n let hasEmittedPart: boolean = false;\n for (const bone of subtree) {\n if (occupied.has(bone))\n throw new Error(`Overlapping polygon cue subtree: ${bone}`);\n occupied.add(bone);\n hasEmittedPart ||= emitted.has(bone);\n for (const child of children.get(bone) ?? []) subtree.push(child);\n }\n\n if (!hasEmittedPart)\n throw new Error(`Unsupported polygon cue target: ${cue.bone}`);\n\n // Authored cue admission measures the quaternion norm. Registered\n // skeletal placements use the drawing's separate squared-norm tolerance.\n const { x, y, z, w }: IAutoMoviePolygonBodyCue[\"rotation\"] = cue.rotation;\n const norm: number = Math.hypot(x, y, z, w);\n if (![x, y, z, w].every(Number.isFinite) || Math.abs(norm - 1) > 1e-6)\n throw new Error(`Invalid polygon rotation: ${cue.bone}`);\n const timing: IAutoMoviePolygonCueTiming = {\n at: cue.at,\n duration: cue.duration,\n rotation: new Quaternion(x / norm, y / norm, z / norm, w / norm),\n };\n let prepared: AutoMoviePreparedPolygonCue;\n if (cue.kind === \"bend\") {\n prepared = { ...timing, kind: cue.kind, bone: cue.bone };\n } else if (cue.kind === \"detach\") {\n const translation: Vector3 = finitePosition(\n cue.translation.x,\n cue.translation.y,\n cue.translation.z,\n cue.bone,\n );\n const released: Map<string, IAutoMoviePolygonFrame> = new Map();\n const selected: Set<string> = new Set(subtree);\n const actor: IAutoMoviePolygonFrame = actorFrame(actorFrameAt, cue.at);\n\n // Capture the branch's world placement once so later poses and actor\n // staging cannot drive the released parts.\n for (const placement of poseAt(cue.at).posed) {\n if (!selected.has(placement.bone)) continue;\n if (released.has(placement.bone))\n throw new Error(\n `Duplicate polygon release placement: ${placement.bone}`,\n );\n const frame: IAutoMoviePolygonFrame = boneFrame(placement);\n frame.position.applyQuaternion(actor.rotation).add(actor.position);\n frame.rotation.premultiply(actor.rotation);\n released.set(placement.bone, frame);\n }\n const origin: IAutoMoviePolygonFrame | undefined = released.get(cue.bone);\n if (origin === undefined || released.size !== subtree.length)\n throw new Error(`Incomplete polygon release pose: ${cue.bone}`);\n prepared = {\n ...timing,\n kind: cue.kind,\n pivot: origin.position,\n released,\n translation,\n };\n } else {\n throw new Error(\"Unsupported polygon cue kind\");\n }\n for (const bone of subtree) cuesByBone.set(bone, prepared);\n }\n\n return (seconds: number): AutoMoviePolygonPose => {\n if (!Number.isFinite(seconds))\n throw new Error(\"Invalid polygon drawing time\");\n const pose: AutoMoviePolygonPose = poseAt(seconds);\n if (seconds < firstCue) return pose;\n const live: Map<string, IAutoMovieHumanBonePlacement> = new Map(\n pose.posed.map(\n (\n placement: IAutoMovieHumanBonePlacement,\n ): [string, IAutoMovieHumanBonePlacement] => [\n placement.bone,\n placement,\n ],\n ),\n );\n const deltas: Map<AutoMoviePreparedPolygonCue, IAutoMoviePolygonFrame> =\n new Map();\n let actor: IAutoMoviePolygonFrame | undefined;\n let inverseActorRotation: Quaternion | undefined;\n return {\n posed: pose.posed.map(\n (\n placement: IAutoMovieHumanBonePlacement,\n ): IAutoMovieHumanBonePlacement => {\n const cue: AutoMoviePreparedPolygonCue | undefined = cuesByBone.get(\n placement.bone,\n );\n if (cue === undefined || seconds < cue.at) return placement;\n const amount: number =\n cue.duration === 0\n ? 1\n : Math.min(1, (seconds - cue.at) / cue.duration);\n if (amount === 0) return placement;\n\n let delta: IAutoMoviePolygonFrame | undefined = deltas.get(cue);\n if (delta === undefined) {\n const rotation: Quaternion = new Quaternion().slerp(\n cue.rotation,\n amount,\n );\n if (cue.kind === \"bend\") {\n const joint: IAutoMovieHumanBonePlacement | undefined = live.get(\n cue.bone,\n );\n if (joint === undefined)\n throw new Error(`Missing polygon bend pivot: ${cue.bone}`);\n const frame: IAutoMoviePolygonFrame = boneFrame(joint);\n\n // Conjugating the local rotation gives the same turn in body\n // coordinates, which the flat descendant placements share.\n rotation\n .premultiply(frame.rotation)\n .multiply(frame.rotation.invert());\n delta = { position: frame.position, rotation };\n } else {\n actor ??= actorFrame(actorFrameAt, seconds);\n inverseActorRotation ??= actor.rotation.clone().invert();\n delta = {\n position: cue.pivot\n .clone()\n .addScaledVector(cue.translation, amount),\n rotation,\n };\n }\n deltas.set(cue, delta);\n }\n\n // Admit the raw placement before a release can replace it.\n let frame: IAutoMoviePolygonFrame = boneFrame(placement);\n if (cue.kind === \"bend\") {\n frame.position\n .sub(delta.position)\n .applyQuaternion(delta.rotation)\n .add(delta.position);\n frame.rotation.premultiply(delta.rotation);\n } else {\n const release: IAutoMoviePolygonFrame | undefined =\n cue.released.get(placement.bone);\n if (\n release === undefined ||\n actor === undefined ||\n inverseActorRotation === undefined\n )\n throw new Error(\n `Missing polygon release frame: ${placement.bone}`,\n );\n\n // Existing groups are actor-local. Cancel the live parent frame\n // so the renderer applies it once and reaches the intended world pose.\n frame = {\n position: release.position\n .clone()\n .sub(cue.pivot)\n .applyQuaternion(delta.rotation)\n .add(delta.position)\n .sub(actor.position)\n .applyQuaternion(inverseActorRotation),\n rotation: release.rotation\n .clone()\n .premultiply(delta.rotation)\n .premultiply(inverseActorRotation),\n };\n }\n return {\n bone: placement.bone,\n position: [frame.position.x, frame.position.y, frame.position.z],\n rotation: [\n frame.rotation.x,\n frame.rotation.y,\n frame.rotation.z,\n frame.rotation.w,\n ],\n };\n },\n ),\n };\n };\n}\n"],"mappings":";;;AAwCA,SAAS,aACP,GACA,GACA,GACA,GACA,OACY;CACZ,IACE,CAAC;EAAC;EAAG;EAAG;EAAG;CAAC,CAAC,CAAC,MAAM,OAAO,QAAQ,KACnC,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC,IAAI,MAElD,MAAM,IAAI,MAAM,6BAA6B,OAAO;CACtD,OAAO,IAAI,WAAW,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,UAAU;AAC9C;;AAGA,SAAS,eACP,GACA,GACA,GACA,OACS;CACT,IAAI,CAAC;EAAC;EAAG;EAAG;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AI,IAAI,KAAK,CAAC,CACd,gBAAgB,MAAM,QAAQ,CAAC,CAC/B,IAAI,MAAM,QAAQ,CAAC,CACnB,IAAI,MAAM,QAAQ,CAAC,CACnB,gBAAgB,oBAAoB;KACvC,UAAU,QAAQ,SACf,MAAM,CAAC,CACP,YAAY,MAAM,QAAQ,CAAC,CAC3B,YAAY,oBAAoB;IACrC;GACF;GACA,OAAO;IACL,MAAM,UAAU;IAChB,UAAU;KAAC,MAAM,SAAS;KAAG,MAAM,SAAS;KAAG,MAAM,SAAS;IAAC;IAC/D,UAAU;KACR,MAAM,SAAS;KACf,MAAM,SAAS;KACf,MAAM,SAAS;KACf,MAAM,SAAS;IACjB;GACF;EACF,CACF,EACF;CACF;AACF"}
@@ -44,6 +44,7 @@ export * from "./importedModel/index.js";
44
44
  export * from "./applyObjectMotion.js";
45
45
  export * from "./applyObjectMotions.js";
46
46
  export * from "./applyLightMotion.js";
47
+ export * from "./applyPracticalSurfaceMaterials.js";
47
48
  export * from "./applyLightState.js";
48
49
  export * from "./renderCrossDissolveFrames.js";
49
50
  export * from "./renderCrossDissolve.js";
@@ -52,7 +53,9 @@ export * from "./buildSpace.js";
52
53
  export * from "./deliveryCrop.js";
53
54
  export * from "./cameraDepthPrecision.js";
54
55
  export * from "./buildScene.js";
56
+ export * from "./buildSceneSoftProps.js";
55
57
  export * from "./IAutoMovieSceneObject.js";
58
+ export * from "./IAutoMovieSceneSoftProps.js";
56
59
  export * from "./applyAutoMovieShadowParticipation.js";
57
60
  export * from "./applySceneFog.js";
58
61
  export * from "./buildLight.js";
@@ -63,6 +63,7 @@ __exportStar(require("./importedModel/index.js"), exports);
63
63
  __exportStar(require("./applyObjectMotion.js"), exports);
64
64
  __exportStar(require("./applyObjectMotions.js"), exports);
65
65
  __exportStar(require("./applyLightMotion.js"), exports);
66
+ __exportStar(require("./applyPracticalSurfaceMaterials.js"), exports);
66
67
  __exportStar(require("./applyLightState.js"), exports);
67
68
  __exportStar(require("./renderCrossDissolveFrames.js"), exports);
68
69
  __exportStar(require("./renderCrossDissolve.js"), exports);
@@ -71,7 +72,9 @@ __exportStar(require("./buildSpace.js"), exports);
71
72
  __exportStar(require("./deliveryCrop.js"), exports);
72
73
  __exportStar(require("./cameraDepthPrecision.js"), exports);
73
74
  __exportStar(require("./buildScene.js"), exports);
75
+ __exportStar(require("./buildSceneSoftProps.js"), exports);
74
76
  __exportStar(require("./IAutoMovieSceneObject.js"), exports);
77
+ __exportStar(require("./IAutoMovieSceneSoftProps.js"), exports);
75
78
  __exportStar(require("./applyAutoMovieShadowParticipation.js"), exports);
76
79
  __exportStar(require("./applySceneFog.js"), exports);
77
80
  __exportStar(require("./buildLight.js"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scene/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,kEAAgD;AAChD,+EAA6D;AAC7D,mEAAiD;AACjD,6DAA2C;AAC3C,sEAAoD;AACpD,yEAAuD;AACvD,yEAAuD;AACvD,iGAA6F;AAApF,2JAAA,kCAAkC,OAAA;AAC3C,mGAA+F;AAAtF,6JAAA,mCAAmC,OAAA;AAC5C,kEAAgD;AAChD,+DAA6C;AAC7C,iEAA+C;AAC/C,qDAAmC;AACnC,2EAAyD;AACzD,qDAAmC;AACnC,uDAAqC;AACrC,+DAA6C;AAC7C,2DAAyC;AACzC,yEAAuD;AACvD,+DAA6C;AAC7C,iEAA+C;AAC/C,oEAAkD;AAClD,oEAAkD;AAClD,iEAA+C;AAC/C,8DAA4C;AAC5C,4DAA0C;AAC1C,kEAAgD;AAChD,iEAA+C;AAC/C,2EAAyD;AACzD,qEAAmD;AACnD,kEAAgD;AAChD,6DAA2C;AAC3C,6DAA2C;AAC3C,sDAAoC;AACpC,kDAAgC;AAChC,4DAA0C;AAC1C,sEAAoD;AACpD,iDAA+B;AAC/B,mEAAiD;AACjD,+DAA6C;AAC7C,uDAAqC;AACrC,2DAAyC;AACz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jD,yEAAuD;AACvD,oEAAkD;AAClD,sEAAoD;AACpD,0EAAwD;AACxD,2EAAyD;AACzD,uDAAqC;AACrC,8DAA4C;AAC5C,sEAAoD;AACpD,6DAA2C;AAC3C,kEAAgD;AAChD,uDAAqC;AACrC,iDAA+B;AAC/B,iEAA+C;AAC/C,kDAAgC;AAChC,uDAAqC;AACrC,yDAAuC;AACvC,uEAAqD;AACrD,0DAAwC;AACxC,qEAAmD;AACnD,wEAAsD;AACtD,uEAAqD;AACrD,gEAA8C;AAC9C,6DAA2C;AAC3C,uDAAqC;AACrC,4DAA0C;AAC1C,yDAAuC;AACvC,8CAA4B;AAC5B,oDAAkC;AAClC,gEAA8C;AAC9C,2DAAyC;AACzC,gEAA8C;AAC9C,2DAAyC;AACzC,8DAA4C;AAC5C,wDAAsC;AACtC,iEAA+C;AAE/C,6EAA2D;AAC3D,8DAA4C;AAC5C,0DAAwC;AACxC,gEAA8C;AAC9C,gFAA8D;AAC9D,wEAAsD;AACtD,8EAA4D;AAC5D,+EAA6D;AAC7D,uEAAqD;AACrD,6FAAyF;AAAhF,uJAAA,gCAAgC,OAAA;AACzC,iGAA6F;AAApF,2JAAA,kCAAkC,OAAA;AAC3C,2DAAyC;AACzC,wEAAsD;AACtD,wEAAsD;AACtD,sEAAoD"}
@@ -6,6 +6,14 @@ import { matchAutoMovieInspectionPath } from "./inspection/matchAutoMovieInspect
6
6
  import { expandAutoMovieInspectionSweep } from "./inspection/expandAutoMovieInspectionSweep.mjs";
7
7
  import { formatAutoMovieInspectionView } from "./inspection/formatAutoMovieInspectionView.mjs";
8
8
  import { formatAutoMovieInspectionCameraView } from "./inspection/formatAutoMovieInspectionCameraView.mjs";
9
+ import { SPACE_GROUP_NAME } from "./SPACE_GROUP_NAME.mjs";
10
+ import { buildSpaceObject } from "./buildSpaceObject.mjs";
11
+ import "./analysisOverlay.mjs";
12
+ import { buildAutoMovieConstruction } from "./buildAutoMovieConstruction.mjs";
13
+ import { createAutoMovieMetricOrthographicCamera } from "./createAutoMovieMetricOrthographicCamera.mjs";
14
+ import { captureAutoMovieMetricFrame } from "./captureAutoMovieMetricFrame.mjs";
15
+ import { AutoMovieTextureCache } from "./AutoMovieTextureCache.mjs";
16
+ import { collectAutoMovieOwnedResources } from "./collectAutoMovieOwnedResources.mjs";
9
17
  import { AUTO_MOVIE_INSPECTION_PALETTE } from "./inspection/AUTO_MOVIE_INSPECTION_PALETTE.mjs";
10
18
  import { autoMovieInspectionPathOf } from "./inspection/autoMovieInspectionPathOf.mjs";
11
19
  import { listAutoMovieInspectionPaths } from "./inspection/listAutoMovieInspectionPaths.mjs";
@@ -16,15 +24,13 @@ import { planAutoMovieInspectionTrailTimes } from "./inspection/planAutoMovieIns
16
24
  import { frameAutoMovieViewerSubject } from "./subjectViewpoint/frameAutoMovieViewerSubject.mjs";
17
25
  import { resolveAutoMovieInspectionView } from "./inspection/resolveAutoMovieInspectionView.mjs";
18
26
  import { sampleAutoMovieInspectionTrails } from "./inspection/sampleAutoMovieInspectionTrails.mjs";
19
- import "./analysisOverlay.mjs";
20
- import { buildAutoMovieConstruction } from "./buildAutoMovieConstruction.mjs";
21
- import { createAutoMovieMetricOrthographicCamera } from "./createAutoMovieMetricOrthographicCamera.mjs";
22
- import { applyAutoMovieInspectionSection } from "./inspection/applyAutoMovieInspectionSection.mjs";
23
- import { captureAutoMovieMetricFrame } from "./captureAutoMovieMetricFrame.mjs";
24
- import { AutoMovieTextureCache } from "./AutoMovieTextureCache.mjs";
25
- import { collectAutoMovieOwnedResources } from "./collectAutoMovieOwnedResources.mjs";
26
27
  import { createAutoMovieResourceRetirement } from "./createAutoMovieResourceRetirement.mjs";
28
+ import { applyAutoMovieInspectionSection } from "./inspection/applyAutoMovieInspectionSection.mjs";
27
29
  import { reportAutoMovieResourceRetirement } from "./reportAutoMovieResourceRetirement.mjs";
30
+ import { guardAutoMovieRenderModeRetirement } from "./guardAutoMovieRenderModeRetirement.mjs";
31
+ import { guardAutoMovieSceneShadowRetirement } from "./guardAutoMovieSceneShadowRetirement.mjs";
32
+ import { readAutoMovieTextureSource } from "./readAutoMovieTextureSource.mjs";
33
+ import { buildGeometry } from "./buildGeometry.mjs";
28
34
  import { dualQuaternionSkinningVertex } from "./dualQuaternionSkinning/dualQuaternionSkinningVertex.mjs";
29
35
  import { createDualQuaternionSkinningShaderPatch } from "./dualQuaternionSkinning/createDualQuaternionSkinningShaderPatch.mjs";
30
36
  import { applyDualQuaternionSkinning } from "./dualQuaternionSkinning/applyDualQuaternionSkinning.mjs";
@@ -32,11 +38,11 @@ import { dualQuaternionSkinningOf } from "./dualQuaternionSkinning/dualQuaternio
32
38
  import { AUTOMOVIE_FORMATION_CYCLE_SAMPLES } from "./AUTOMOVIE_FORMATION_CYCLE_SAMPLES.mjs";
33
39
  import { instancedModelParts } from "./instancedModelParts.mjs";
34
40
  import { formationCycleGait } from "./formationCycleGait.mjs";
35
- import { guardAutoMovieRenderModeRetirement } from "./guardAutoMovieRenderModeRetirement.mjs";
36
- import { guardAutoMovieSceneShadowRetirement } from "./guardAutoMovieSceneShadowRetirement.mjs";
37
- import { readAutoMovieTextureSource } from "./readAutoMovieTextureSource.mjs";
38
- import { buildGeometry } from "./buildGeometry.mjs";
39
41
  import { createAutoMovieClosedSphereGeometry } from "./createAutoMovieClosedSphereGeometry.mjs";
42
+ import { buildMaterial } from "./buildMaterial.mjs";
43
+ import { defaultMaterial } from "./defaultMaterial.mjs";
44
+ import { materialTextureBindings } from "./materialTextureBindings.mjs";
45
+ import { textureBindingAsset } from "./textureBindingAsset.mjs";
40
46
  import { formationCycleStride } from "./formationCycleStride.mjs";
41
47
  import { bakeFormationCycle } from "./bakeFormationCycle.mjs";
42
48
  import { formationCycleCadence } from "./formationCycleCadence.mjs";
@@ -45,16 +51,16 @@ import { formationCyclePosition } from "./formationCyclePosition.mjs";
45
51
  import { sampleFormationCycleMatrix } from "./sampleFormationCycleMatrix.mjs";
46
52
  import { formationCycleOf } from "./formationCycleOf.mjs";
47
53
  import { applyFormationCycleMaterial } from "./applyFormationCycleMaterial.mjs";
48
- import { buildMaterial } from "./buildMaterial.mjs";
49
- import { defaultMaterial } from "./defaultMaterial.mjs";
50
- import { materialTextureBindings } from "./materialTextureBindings.mjs";
51
- import { textureBindingAsset } from "./textureBindingAsset.mjs";
54
+ import { AutoMovieGeometryPhysicalVertices } from "./AutoMovieGeometryPhysicalVertices.mjs";
55
+ import "./subsurfaceShading/index.mjs";
56
+ import "./detailNormalShading/index.mjs";
57
+ import "./materialOverlayShading/index.mjs";
52
58
  import { attachAutoMovieSemanticMask } from "./semanticMask/attachAutoMovieSemanticMask.mjs";
53
59
  import { autoMovieSemanticMaskOf } from "./semanticMask/autoMovieSemanticMaskOf.mjs";
54
60
  import { auditAutoMovieSemanticMaskScene } from "./semanticMask/auditAutoMovieSemanticMaskScene.mjs";
55
61
  import { applyAutoMovieSemanticMask } from "./semanticMask/applyAutoMovieSemanticMask.mjs";
56
- import { AutoMovieGeometryPhysicalVertices } from "./AutoMovieGeometryPhysicalVertices.mjs";
57
- import "./subsurfaceShading/index.mjs";
62
+ import "./reliefWeightShading/index.mjs";
63
+ import { addMaterialShaderPatch } from "./addMaterialShaderPatch.mjs";
58
64
  import { applyAutoMovieInspectionShade } from "./inspection/applyAutoMovieInspectionShade.mjs";
59
65
  import { AUTO_MOVIE_INSPECTION_DEPTH_LEAD } from "./inspection/AUTO_MOVIE_INSPECTION_DEPTH_LEAD.mjs";
60
66
  import { createAutoMovieInspectionDots } from "./inspection/createAutoMovieInspectionDots.mjs";
@@ -76,10 +82,6 @@ import { resolveAutoMovieInspectionColors } from "./inspection/resolveAutoMovieI
76
82
  import { applyAutoMovieInspection } from "./inspection/applyAutoMovieInspection.mjs";
77
83
  import { autoMovieAnalysisRampColor } from "./autoMovieAnalysisRampColor.mjs";
78
84
  import { buildAnalysisOverlayObject } from "./buildAnalysisOverlayObject.mjs";
79
- import "./detailNormalShading/index.mjs";
80
- import "./materialOverlayShading/index.mjs";
81
- import "./reliefWeightShading/index.mjs";
82
- import { addMaterialShaderPatch } from "./addMaterialShaderPatch.mjs";
83
85
  import { applyMaterialShaderPatches } from "./applyMaterialShaderPatches.mjs";
84
86
  import { buildAutoMovieMaterialLibrary } from "./buildAutoMovieMaterialLibrary.mjs";
85
87
  import { applyTransform } from "./applyTransform.mjs";
@@ -91,40 +93,42 @@ import { applyAutoMovieRigLocals } from "./applyAutoMovieRigLocals.mjs";
91
93
  import { applyExpression } from "./applyExpression.mjs";
92
94
  import "./importedModel/index.mjs";
93
95
  import { applyObjectMotion } from "./applyObjectMotion.mjs";
96
+ import { applyObjectMotions } from "./applyObjectMotions.mjs";
97
+ import { applyLightMotion } from "./applyLightMotion.mjs";
98
+ import { applyPracticalSurfaceMaterials } from "./applyPracticalSurfaceMaterials.mjs";
99
+ import { applyLightState } from "./applyLightState.mjs";
94
100
  import { DETAIL_NORMAL_TARGET } from "./detailNormalShading/DETAIL_NORMAL_TARGET.mjs";
95
101
  import { spliceTangentNormal } from "./detailNormalShading/spliceTangentNormal.mjs";
96
102
  import { detailNormalFragment } from "./detailNormalShading/detailNormalFragment.mjs";
97
103
  import { detailNormalVertex } from "./detailNormalShading/detailNormalVertex.mjs";
98
104
  import { createDetailNormalShaderPatch } from "./detailNormalShading/createDetailNormalShaderPatch.mjs";
99
105
  import { applyDetailNormal } from "./detailNormalShading/applyDetailNormal.mjs";
100
- import { applyObjectMotions } from "./applyObjectMotions.mjs";
106
+ import { renderCrossDissolveFrames } from "./renderCrossDissolveFrames.mjs";
101
107
  import { materialOverlayFragment } from "./materialOverlayShading/materialOverlayFragment.mjs";
102
108
  import { materialOverlayVertex } from "./materialOverlayShading/materialOverlayVertex.mjs";
103
109
  import { applyMaterialOverlays } from "./materialOverlayShading/applyMaterialOverlays.mjs";
104
- import { applyLightMotion } from "./applyLightMotion.mjs";
110
+ import { renderCrossDissolve } from "./renderCrossDissolve.mjs";
105
111
  import { SUBSURFACE_TARGET } from "./subsurfaceShading/SUBSURFACE_TARGET.mjs";
106
112
  import { subsurfaceTable } from "./subsurfaceShading/subsurfaceTable.mjs";
107
113
  import { subsurfacePhysicalChunk } from "./subsurfaceShading/subsurfacePhysicalChunk.mjs";
108
114
  import { subsurfaceFragment } from "./subsurfaceShading/subsurfaceFragment.mjs";
109
115
  import { applySubsurfaceShading } from "./subsurfaceShading/applySubsurfaceShading.mjs";
110
- import { applyLightState } from "./applyLightState.mjs";
111
- import { renderCrossDissolveFrames } from "./renderCrossDissolveFrames.mjs";
112
- import { renderCrossDissolve } from "./renderCrossDissolve.mjs";
113
116
  import { disposeCrossDissolve } from "./disposeCrossDissolve.mjs";
117
+ import "./buildSpace.mjs";
118
+ import "./deliveryCrop.mjs";
119
+ import { buildScene } from "./buildScene.mjs";
114
120
  import { RELIEF_WEIGHT_TARGET } from "./reliefWeightShading/RELIEF_WEIGHT_TARGET.mjs";
115
121
  import { reliefWeightFragment } from "./reliefWeightShading/reliefWeightFragment.mjs";
116
122
  import { reliefWeightVertex } from "./reliefWeightShading/reliefWeightVertex.mjs";
117
123
  import { createReliefWeightShaderPatch } from "./reliefWeightShading/createReliefWeightShaderPatch.mjs";
118
124
  import { applyReliefWeights } from "./reliefWeightShading/applyReliefWeights.mjs";
119
- import "./buildSpace.mjs";
120
- import "./deliveryCrop.mjs";
121
- import { buildScene } from "./buildScene.mjs";
125
+ import { buildSceneSoftProps } from "./buildSceneSoftProps.mjs";
122
126
  import { applyAutoMovieShadowParticipation } from "./applyAutoMovieShadowParticipation.mjs";
123
127
  import { applySceneFog } from "./applySceneFog.mjs";
124
- import { createImportedModelObject } from "./createImportedModelObject.mjs";
125
- import { mapImportedHumanoidBones } from "./mapImportedHumanoidBones.mjs";
126
128
  import { buildLight } from "./buildLight.mjs";
127
129
  import { applyAutoMovieSectionPlanes } from "./applyAutoMovieSectionPlanes.mjs";
130
+ import { createImportedModelObject } from "./createImportedModelObject.mjs";
131
+ import { mapImportedHumanoidBones } from "./mapImportedHumanoidBones.mjs";
128
132
  import "./propArticulation/index.mjs";
129
133
  import { applySceneEnvironment } from "./applySceneEnvironment.mjs";
130
134
  import { applyRendererEnvironment } from "./applyRendererEnvironment.mjs";
@@ -132,21 +136,19 @@ import { renderAutoMovieScenePass } from "./renderAutoMovieScenePass.mjs";
132
136
  import { invalidateAutoMovieSceneShadowPrograms } from "./invalidateAutoMovieSceneShadowPrograms.mjs";
133
137
  import { resetAutoMovieSceneShadowTargets } from "./resetAutoMovieSceneShadowTargets.mjs";
134
138
  import { assertAutoMovieSceneShadowProfile } from "./assertAutoMovieSceneShadowProfile.mjs";
135
- import { SPACE_GROUP_NAME } from "./SPACE_GROUP_NAME.mjs";
136
- import { buildSpaceObject } from "./buildSpaceObject.mjs";
137
139
  import { readAutoMovieShadowLightSource } from "./readAutoMovieShadowLightSource.mjs";
140
+ import { readAutoMovieShadowTextureTargets } from "./readAutoMovieShadowTextureTargets.mjs";
141
+ import { readAutoMovieCubeShadowDepth } from "./readAutoMovieCubeShadowDepth.mjs";
138
142
  import { applyAutoMovieDeliveryCrop } from "./applyAutoMovieDeliveryCrop.mjs";
139
143
  import { readAutoMovieDeliveryCrop } from "./readAutoMovieDeliveryCrop.mjs";
140
- import { readAutoMovieShadowTextureTargets } from "./readAutoMovieShadowTextureTargets.mjs";
144
+ import { retireAutoMovieCubeShadowDepth } from "./retireAutoMovieCubeShadowDepth.mjs";
141
145
  import { evaluateAutoMovieViewerCameraDepthPrecision } from "./evaluateAutoMovieViewerCameraDepthPrecision.mjs";
142
146
  import { assertAutoMovieViewerCameraDepthPrecision } from "./assertAutoMovieViewerCameraDepthPrecision.mjs";
143
- import { readAutoMovieCubeShadowDepth } from "./readAutoMovieCubeShadowDepth.mjs";
144
- import { retireAutoMovieCubeShadowDepth } from "./retireAutoMovieCubeShadowDepth.mjs";
145
147
  import { captureAutoMovieFramebufferRestore } from "./captureAutoMovieFramebufferRestore.mjs";
146
148
  import { readAutoMovieMaterialTextureSources } from "./readAutoMovieMaterialTextureSources.mjs";
147
149
  import { AutoMoviePlayer } from "./AutoMoviePlayer.mjs";
148
- import { buildPropArticulation } from "./buildPropArticulation.mjs";
149
150
  import { releaseViewerRenderer } from "./releaseViewerRenderer.mjs";
151
+ import { buildPropArticulation } from "./buildPropArticulation.mjs";
150
152
  import { applyRenderMode } from "./applyRenderMode.mjs";
151
153
  import { maskColor } from "./maskColor.mjs";
152
154
  import { DEPTH_NORMALIZATION_RANGE } from "./DEPTH_NORMALIZATION_RANGE.mjs";
@@ -163,19 +165,19 @@ import "./instanceSet/index.mjs";
163
165
  import { sampleCompiledEffect } from "./effect.mjs";
164
166
  import "./fluidSurface.mjs";
165
167
  import { buildSoftBodyObject } from "./buildSoftBodyObject.mjs";
168
+ import { buildPlantingObject } from "./buildPlantingObject.mjs";
166
169
  import { flattenInstancedModel } from "./flattenInstancedModel.mjs";
167
170
  import { regenerateFormationSlot } from "./regenerateFormationSlot.mjs";
168
171
  import { buildInstancedFormation } from "./buildInstancedFormation.mjs";
169
172
  import { flattenInstancedObject } from "./flattenInstancedObject.mjs";
170
- import { buildPlantingObject } from "./buildPlantingObject.mjs";
173
+ import "./subjectViewpoint/index.mjs";
171
174
  import { regenerateInstanceSlot } from "./regenerateInstanceSlot.mjs";
172
175
  import { buildInstancedInstanceSet } from "./buildInstancedInstanceSet.mjs";
173
- import "./subjectViewpoint/index.mjs";
174
- import { buildInstancedEffect } from "./buildInstancedEffect.mjs";
175
176
  import "./inspection/index.mjs";
177
+ import { buildInstancedEffect } from "./buildInstancedEffect.mjs";
178
+ import { resolveAutoMovieFilmBeautyComposition } from "./resolveAutoMovieFilmBeautyComposition.mjs";
176
179
  import { buildFluidSurfaceObject } from "./buildFluidSurfaceObject.mjs";
177
180
  import { buildFluidSprayObject } from "./buildFluidSprayObject.mjs";
178
- import { resolveAutoMovieFilmBeautyComposition } from "./resolveAutoMovieFilmBeautyComposition.mjs";
179
181
  import { renderFadeToBlackFrame } from "./renderFadeToBlackFrame.mjs";
180
182
  import { disposeFadeToBlack } from "./disposeFadeToBlack.mjs";
181
183
  import { autoMovieViewerSubjectKey } from "./subjectViewpoint/autoMovieViewerSubjectKey.mjs";
@@ -196,7 +198,8 @@ import "./human-polygon/index.mjs";
196
198
  import { AutoMovieResourceRetirementScope } from "./AutoMovieResourceRetirementScope.mjs";
197
199
  import { buildHumanPolygon } from "./human-polygon/buildHumanPolygon.mjs";
198
200
  import { buildHumanCartoonFace } from "./human-polygon/buildHumanCartoonFace.mjs";
201
+ import { buildPolygonShotActor } from "./human-polygon/buildPolygonShotActor.mjs";
199
202
  import { createAutoMovieHumanPolygonFigure } from "./human-polygon/createAutoMovieHumanPolygonFigure.mjs";
200
203
  import { constructAutoMovieOwnedResources } from "./constructAutoMovieOwnedResources.mjs";
201
204
  import { restoreAutoMovieRenderModeOnce } from "./restoreAutoMovieRenderModeOnce.mjs";
202
- export { AUTOMOVIE_FORMATION_CYCLE_SAMPLES, AUTO_MOVIE_INSPECTION_DEPTH_LEAD, AUTO_MOVIE_INSPECTION_KEYS, AUTO_MOVIE_INSPECTION_KINDS, AUTO_MOVIE_INSPECTION_PALETTE, AutoMovieGeometryPhysicalVertices, AutoMoviePlayer, AutoMovieResourceRetirementScope, AutoMovieSkinnedMesh, AutoMovieTextureCache, DEPTH_NORMALIZATION_RANGE, DETAIL_NORMAL_TARGET, EDGE_SHELL_NAME, EDGE_WIDTH, POSE_OVERLAY_NAME, RELIEF_WEIGHT_TARGET, SPACE_GROUP_NAME, SUBSURFACE_TARGET, addMaterialShaderPatch, applyAutoMovieDeliveryCrop, applyAutoMovieInspection, applyAutoMovieInspectionSection, applyAutoMovieInspectionShade, applyAutoMovieRigLocals, applyAutoMovieSectionPlanes, applyAutoMovieSemanticMask, applyAutoMovieShadowParticipation, applyAutoMovieViewerSubjectPose, applyDetailNormal, applyDualQuaternionSkinning, applyExpression, applyFormationCycleCadence, applyFormationCycleMaterial, applyLightMotion, applyLightState, applyMaterialOverlays, applyMaterialShaderPatches, applyObjectMotion, applyObjectMotions, applyPose, applyReliefWeights, applyRenderMode, applyRendererEnvironment, applySceneEnvironment, applySceneFog, applySubsurfaceShading, applyTransform, assertAutoMovieSceneShadowProfile, assertAutoMovieViewerCameraDepthPrecision, attachAutoMovieSemanticMask, auditAutoMovieSemanticMaskScene, autoMovieAnalysisRampColor, autoMovieInspectionPathOf, autoMovieSemanticMaskOf, autoMovieViewerNamedViewpoints, autoMovieViewerPoseFromHeading, autoMovieViewerSubjectKey, autoMovieViewerTurntableViewpoints, bakeFormationCycle, buildAnalysisOverlayObject, buildAutoMovieConstruction, buildAutoMovieInspectionMarks, buildAutoMovieMaterialLibrary, buildFluidSprayObject, buildFluidSurfaceObject, buildGeometry, buildHumanCartoonFace, buildHumanPolygon, buildInstancedEffect, buildInstancedFormation, buildInstancedInstanceSet, buildLight, buildMaterial, buildModel, buildPlantingObject, buildPropArticulation, buildScene, buildSoftBodyObject, buildSpaceObject, captureAutoMovieFramebufferRestore, captureAutoMovieMetricFrame, captureAutoMovieViewerSubjectView, captureViewerSnapshot, chooseAutoMovieInspectionMarks, collectAutoMovieOwnedResources, colorAutoMovieInspectionObjects, constructAutoMovieOwnedResources, createAutoMovieClosedSphereGeometry, createAutoMovieHumanPolygonFigure, createAutoMovieInspectionDots, createAutoMovieInspectionStrokes, createAutoMovieMetricOrthographicCamera, createAutoMoviePhysicalPoseAdapter, createAutoMovieResourceRetirement, createAutoMovieSurfaceAppearance, createDetailNormalShaderPatch, createDualQuaternionSkinningShaderPatch, createImportedModelObject, createReliefWeightShaderPatch, defaultMaterial, detailNormalFragment, detailNormalVertex, disposeCrossDissolve, disposeFadeToBlack, dualQuaternionSkinningOf, dualQuaternionSkinningVertex, evaluateAutoMovieViewerCameraDepthPrecision, expandAutoMovieInspectionSweep, flattenInstancedModel, flattenInstancedObject, focusAutoMovieInspection, formatAutoMovieInspectionCameraView, formatAutoMovieInspectionRequest, formatAutoMovieInspectionView, formationCycleCadence, formationCycleGait, formationCycleOf, formationCyclePosition, formationCycleStride, frameAutoMovieViewerSubject, guardAutoMovieRenderModeRetirement, guardAutoMovieSceneShadowRetirement, instancedModelParts, invalidateAutoMovieSceneShadowPrograms, invalidateAutoMovieSkinnedPose, legendAutoMovieInspectionMarks, listAutoMovieInspectionKinds, listAutoMovieInspectionPaths, mapImportedHumanoidBones, markAutoMovieInspectionTrails, maskColor, matchAutoMovieInspectionPath, materialOverlayFragment, materialOverlayVertex, materialTextureBindings, measureAutoMovieInspectionBounds, measureAutoMovieInspectionDefects, measureAutoMovieInspectionEdges, measureAutoMovieInspectionMeshes, measureAutoMovieInspectionPaths, mergeAutoMovieInspectionLegends, observeAutoMovieRendererFrame, parseAutoMovieInspectionRequest, parseAutoMovieInspectionView, parseAutoMovieViewerSubjectKey, placeAutoMovieInspectionLabels, planAutoMovieInspectionTrailTimes, readAutoMovieCubeShadowDepth, readAutoMovieDeliveryCrop, readAutoMovieDisplayDestinationEncoding, readAutoMovieFilmDisplayTextureResidency, readAutoMovieMaterialTextureSources, readAutoMovieRenderTextureTarget, readAutoMovieShadowLightSource, readAutoMovieShadowTextureTargets, readAutoMovieTextureSource, readAutoMovieTransmissionTextureTarget, regenerateFormationSlot, regenerateInstanceSlot, releaseViewerRenderer, reliefWeightFragment, reliefWeightVertex, renderAutoMovieFilmFrame, renderAutoMovieScenePass, renderCrossDissolve, renderCrossDissolveFrames, renderFadeToBlackFrame, reportAutoMovieResourceRetirement, resetAutoMovieSceneShadowTargets, resolveAutoMovieFilmBeautyComposition, resolveAutoMovieInspectionColors, resolveAutoMovieInspectionView, restoreAutoMovieRenderModeOnce, restoreAutoMovieRenderModeState, retireAutoMovieCubeShadowDepth, sampleAutoMovieInspectionTrails, sampleCompiledEffect, sampleFormationCycleMatrix, sampleFormationMotion, sampleFormationSlotMotion, selectFormationLod, spliceTangentNormal, subsurfaceFragment, subsurfacePhysicalChunk, subsurfaceTable, textureBindingAsset, updateAutoMovieComparisonCamera };
205
+ export { AUTOMOVIE_FORMATION_CYCLE_SAMPLES, AUTO_MOVIE_INSPECTION_DEPTH_LEAD, AUTO_MOVIE_INSPECTION_KEYS, AUTO_MOVIE_INSPECTION_KINDS, AUTO_MOVIE_INSPECTION_PALETTE, AutoMovieGeometryPhysicalVertices, AutoMoviePlayer, AutoMovieResourceRetirementScope, AutoMovieSkinnedMesh, AutoMovieTextureCache, DEPTH_NORMALIZATION_RANGE, DETAIL_NORMAL_TARGET, EDGE_SHELL_NAME, EDGE_WIDTH, POSE_OVERLAY_NAME, RELIEF_WEIGHT_TARGET, SPACE_GROUP_NAME, SUBSURFACE_TARGET, addMaterialShaderPatch, applyAutoMovieDeliveryCrop, applyAutoMovieInspection, applyAutoMovieInspectionSection, applyAutoMovieInspectionShade, applyAutoMovieRigLocals, applyAutoMovieSectionPlanes, applyAutoMovieSemanticMask, applyAutoMovieShadowParticipation, applyAutoMovieViewerSubjectPose, applyDetailNormal, applyDualQuaternionSkinning, applyExpression, applyFormationCycleCadence, applyFormationCycleMaterial, applyLightMotion, applyLightState, applyMaterialOverlays, applyMaterialShaderPatches, applyObjectMotion, applyObjectMotions, applyPose, applyPracticalSurfaceMaterials, applyReliefWeights, applyRenderMode, applyRendererEnvironment, applySceneEnvironment, applySceneFog, applySubsurfaceShading, applyTransform, assertAutoMovieSceneShadowProfile, assertAutoMovieViewerCameraDepthPrecision, attachAutoMovieSemanticMask, auditAutoMovieSemanticMaskScene, autoMovieAnalysisRampColor, autoMovieInspectionPathOf, autoMovieSemanticMaskOf, autoMovieViewerNamedViewpoints, autoMovieViewerPoseFromHeading, autoMovieViewerSubjectKey, autoMovieViewerTurntableViewpoints, bakeFormationCycle, buildAnalysisOverlayObject, buildAutoMovieConstruction, buildAutoMovieInspectionMarks, buildAutoMovieMaterialLibrary, buildFluidSprayObject, buildFluidSurfaceObject, buildGeometry, buildHumanCartoonFace, buildHumanPolygon, buildInstancedEffect, buildInstancedFormation, buildInstancedInstanceSet, buildLight, buildMaterial, buildModel, buildPlantingObject, buildPolygonShotActor, buildPropArticulation, buildScene, buildSceneSoftProps, buildSoftBodyObject, buildSpaceObject, captureAutoMovieFramebufferRestore, captureAutoMovieMetricFrame, captureAutoMovieViewerSubjectView, captureViewerSnapshot, chooseAutoMovieInspectionMarks, collectAutoMovieOwnedResources, colorAutoMovieInspectionObjects, constructAutoMovieOwnedResources, createAutoMovieClosedSphereGeometry, createAutoMovieHumanPolygonFigure, createAutoMovieInspectionDots, createAutoMovieInspectionStrokes, createAutoMovieMetricOrthographicCamera, createAutoMoviePhysicalPoseAdapter, createAutoMovieResourceRetirement, createAutoMovieSurfaceAppearance, createDetailNormalShaderPatch, createDualQuaternionSkinningShaderPatch, createImportedModelObject, createReliefWeightShaderPatch, defaultMaterial, detailNormalFragment, detailNormalVertex, disposeCrossDissolve, disposeFadeToBlack, dualQuaternionSkinningOf, dualQuaternionSkinningVertex, evaluateAutoMovieViewerCameraDepthPrecision, expandAutoMovieInspectionSweep, flattenInstancedModel, flattenInstancedObject, focusAutoMovieInspection, formatAutoMovieInspectionCameraView, formatAutoMovieInspectionRequest, formatAutoMovieInspectionView, formationCycleCadence, formationCycleGait, formationCycleOf, formationCyclePosition, formationCycleStride, frameAutoMovieViewerSubject, guardAutoMovieRenderModeRetirement, guardAutoMovieSceneShadowRetirement, instancedModelParts, invalidateAutoMovieSceneShadowPrograms, invalidateAutoMovieSkinnedPose, legendAutoMovieInspectionMarks, listAutoMovieInspectionKinds, listAutoMovieInspectionPaths, mapImportedHumanoidBones, markAutoMovieInspectionTrails, maskColor, matchAutoMovieInspectionPath, materialOverlayFragment, materialOverlayVertex, materialTextureBindings, measureAutoMovieInspectionBounds, measureAutoMovieInspectionDefects, measureAutoMovieInspectionEdges, measureAutoMovieInspectionMeshes, measureAutoMovieInspectionPaths, mergeAutoMovieInspectionLegends, observeAutoMovieRendererFrame, parseAutoMovieInspectionRequest, parseAutoMovieInspectionView, parseAutoMovieViewerSubjectKey, placeAutoMovieInspectionLabels, planAutoMovieInspectionTrailTimes, readAutoMovieCubeShadowDepth, readAutoMovieDeliveryCrop, readAutoMovieDisplayDestinationEncoding, readAutoMovieFilmDisplayTextureResidency, readAutoMovieMaterialTextureSources, readAutoMovieRenderTextureTarget, readAutoMovieShadowLightSource, readAutoMovieShadowTextureTargets, readAutoMovieTextureSource, readAutoMovieTransmissionTextureTarget, regenerateFormationSlot, regenerateInstanceSlot, releaseViewerRenderer, reliefWeightFragment, reliefWeightVertex, renderAutoMovieFilmFrame, renderAutoMovieScenePass, renderCrossDissolve, renderCrossDissolveFrames, renderFadeToBlackFrame, reportAutoMovieResourceRetirement, resetAutoMovieSceneShadowTargets, resolveAutoMovieFilmBeautyComposition, resolveAutoMovieInspectionColors, resolveAutoMovieInspectionView, restoreAutoMovieRenderModeOnce, restoreAutoMovieRenderModeState, retireAutoMovieCubeShadowDepth, sampleAutoMovieInspectionTrails, sampleCompiledEffect, sampleFormationCycleMatrix, sampleFormationMotion, sampleFormationSlotMotion, selectFormationLod, spliceTangentNormal, subsurfaceFragment, subsurfacePhysicalChunk, subsurfaceTable, textureBindingAsset, updateAutoMovieComparisonCamera };
@@ -3,14 +3,14 @@ import type * as THREE from "three";
3
3
  /**
4
4
  * Render already sampled film layers through one beauty/guide boundary.
5
5
  *
6
- * Layer sample fields are opaque to this owner. The callback resolves that source's exact state and owns its reversible pass configuration. Beauty preserves direct, fade and dissolve weights; structural passes consume the Engine's single full-weight dominant layer with incoming winning a tie. Input admission happens before any callback can alter the display.
6
+ * Layer sample fields are opaque to this owner. An optional preparation callback samples the selected source before its draw, including each source of a dissolve. The render callback owns its reversible pass configuration. Beauty preserves direct, fade and dissolve weights; structural passes consume the Engine's single full-weight dominant layer with incoming winning a tie. Input admission happens before either callback can alter the display.
7
7
  *
8
8
  * The sampled film inputs are explicit. Interactive display-clock updates and inspection CLI timestamp filenames remain host observations rather than deterministic delivered-frame identity.
9
9
  *
10
10
  * @evidence contracts/development/implementation.md#principled-implementation Admits sampled one/two-layer beauty composition before callbacks, dispatches direct/fade/dissolve beauty and uses the Engine full-weight dominant layer with incoming tie winner for structural passes.
11
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Layer sampling/state resolution stays with caller callbacks while canonical pass selection and beauty compositor owners retain their separate responsibilities.
11
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure The optional preparation callback applies each selected source's state immediately before the separate render callback. Canonical pass selection and beauty composition stay with their existing owners.
12
12
  * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Invalid weight/cardinality/complement sum refuse rather than clamp or blend structural classifications; host clock/filename observations do not become deterministic delivered-frame identity.
13
- * @evidence contracts/development/common.md#meaningful-documentation Documents opaque sampled fields, reversible source callback ownership, beauty weights, structural tie rule and pre-effect admission.
13
+ * @evidence contracts/development/common.md#meaningful-documentation Documents opaque sampled fields, per-source preparation order, reversible pass ownership, beauty weights, structural tie rule and pre-effect admission.
14
14
  * @evidence contracts/development/implementation.md#efficient-algorithms One/two admitted layers give fixed dispatch work; structural selection clones the selected layer payload and compositor draws/readbacks retain their actual pixel/native costs.
15
15
  * @evidence contracts/development/implementation.md#reuse-equivalent-work Canonical selection is reused by guide consumers and renderer-scoped beauty owners reuse their allocated copies; sampled source callbacks still execute for each actual requested frame.
16
16
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The adapter acquires no scene or renderer; callbacks own reversible state and compositor owners retain/release their native display copies, including terminal failure uncertainty.
@@ -19,4 +19,6 @@ export declare const renderAutoMovieFilmFrame: <Layer extends {
19
19
  weight: number;
20
20
  }>(renderer: THREE.WebGLRenderer, layers: readonly Layer[], pass: AutoMovieGuidePass, renderLayer: (layer: Omit<Layer, "weight"> & {
21
21
  weight: number;
22
- }, pass: AutoMovieGuidePass) => void) => void;
22
+ }, pass: AutoMovieGuidePass) => void, prepareLayer?: (layer: Omit<Layer, "weight"> & {
23
+ weight: number;
24
+ }) => void) => void;
@@ -8,30 +8,34 @@ const resolveAutoMovieFilmBeautyComposition_js_1 = require("./resolveAutoMovieFi
8
8
  /**
9
9
  * Render already sampled film layers through one beauty/guide boundary.
10
10
  *
11
- * Layer sample fields are opaque to this owner. The callback resolves that source's exact state and owns its reversible pass configuration. Beauty preserves direct, fade and dissolve weights; structural passes consume the Engine's single full-weight dominant layer with incoming winning a tie. Input admission happens before any callback can alter the display.
11
+ * Layer sample fields are opaque to this owner. An optional preparation callback samples the selected source before its draw, including each source of a dissolve. The render callback owns its reversible pass configuration. Beauty preserves direct, fade and dissolve weights; structural passes consume the Engine's single full-weight dominant layer with incoming winning a tie. Input admission happens before either callback can alter the display.
12
12
  *
13
13
  * The sampled film inputs are explicit. Interactive display-clock updates and inspection CLI timestamp filenames remain host observations rather than deterministic delivered-frame identity.
14
14
  *
15
15
  * @evidence contracts/development/implementation.md#principled-implementation Admits sampled one/two-layer beauty composition before callbacks, dispatches direct/fade/dissolve beauty and uses the Engine full-weight dominant layer with incoming tie winner for structural passes.
16
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Layer sampling/state resolution stays with caller callbacks while canonical pass selection and beauty compositor owners retain their separate responsibilities.
16
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure The optional preparation callback applies each selected source's state immediately before the separate render callback. Canonical pass selection and beauty composition stay with their existing owners.
17
17
  * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Invalid weight/cardinality/complement sum refuse rather than clamp or blend structural classifications; host clock/filename observations do not become deterministic delivered-frame identity.
18
- * @evidence contracts/development/common.md#meaningful-documentation Documents opaque sampled fields, reversible source callback ownership, beauty weights, structural tie rule and pre-effect admission.
18
+ * @evidence contracts/development/common.md#meaningful-documentation Documents opaque sampled fields, per-source preparation order, reversible pass ownership, beauty weights, structural tie rule and pre-effect admission.
19
19
  * @evidence contracts/development/implementation.md#efficient-algorithms One/two admitted layers give fixed dispatch work; structural selection clones the selected layer payload and compositor draws/readbacks retain their actual pixel/native costs.
20
20
  * @evidence contracts/development/implementation.md#reuse-equivalent-work Canonical selection is reused by guide consumers and renderer-scoped beauty owners reuse their allocated copies; sampled source callbacks still execute for each actual requested frame.
21
21
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The adapter acquires no scene or renderer; callbacks own reversible state and compositor owners retain/release their native display copies, including terminal failure uncertainty.
22
22
  */
23
- const renderAutoMovieFilmFrame = (renderer, layers, pass, renderLayer) => {
23
+ const renderAutoMovieFilmFrame = (renderer, layers, pass, renderLayer, prepareLayer) => {
24
24
  const composition = (0, resolveAutoMovieFilmBeautyComposition_js_1.resolveAutoMovieFilmBeautyComposition)(layers);
25
+ const draw = (layer) => {
26
+ prepareLayer?.(layer);
27
+ renderLayer(layer, pass);
28
+ };
25
29
  if (pass !== "beauty") {
26
30
  const selected = (0, engine_1.productionRenderLayersForPass)({ layers }, pass);
27
- renderLayer(selected[0], pass);
31
+ draw(selected[0]);
28
32
  }
29
33
  else if (composition.kind === "direct")
30
- renderLayer(composition.layer, pass);
34
+ draw(composition.layer);
31
35
  else if (composition.kind === "fade")
32
- (0, renderFadeToBlackFrame_js_1.renderFadeToBlackFrame)(renderer, () => renderLayer(composition.layer, pass), composition.weight);
36
+ (0, renderFadeToBlackFrame_js_1.renderFadeToBlackFrame)(renderer, () => draw(composition.layer), composition.weight);
33
37
  else
34
- (0, renderCrossDissolveFrames_js_1.renderCrossDissolveFrames)(renderer, () => renderLayer(composition.outgoing, pass), () => renderLayer(composition.incoming, pass), composition.alpha);
38
+ (0, renderCrossDissolveFrames_js_1.renderCrossDissolveFrames)(renderer, () => draw(composition.outgoing), () => draw(composition.incoming), composition.alpha);
35
39
  };
36
40
  exports.renderAutoMovieFilmFrame = renderAutoMovieFilmFrame;
37
41
  //# sourceMappingURL=renderAutoMovieFilmFrame.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderAutoMovieFilmFrame.js","sourceRoot":"","sources":["../../src/scene/renderAutoMovieFilmFrame.ts"],"names":[],"mappings":";;;AAAA,8CAAkE;AAIlE,iFAA2E;AAC3E,2EAAqE;AACrE,yGAAmG;AAEnG;;;;;;;;;;;;;;GAcG;AACI,MAAM,wBAAwB,GAQzB,CACV,QAA6B,EAC7B,MAA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