@automovie/render 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 (681) hide show
  1. package/lib/IAutoMovieCaptionEntry.d.ts +1 -28
  2. package/lib/IAutoMovieCaptionSidecar.d.ts +1 -25
  3. package/lib/IAutoMovieCapturedFrame.d.ts +1 -22
  4. package/lib/IAutoMovieGuidePassOutput.d.ts +1 -23
  5. package/lib/IAutoMoviePoseKeypointActor.d.ts +1 -36
  6. package/lib/IAutoMoviePoseKeypointFrame.d.ts +1 -25
  7. package/lib/IAutoMoviePoseKeypointSidecar.d.ts +1 -21
  8. package/lib/IAutoMovieRenderAdapters.d.ts +1 -34
  9. package/lib/IAutoMovieRenderAndSeeRequest.d.ts +1 -32
  10. package/lib/IAutoMovieRenderAndSeeResult.d.ts +1 -20
  11. package/lib/IAutoMovieRenderChunk.d.ts +1 -48
  12. package/lib/IAutoMovieRenderChunkPlan.d.ts +1 -32
  13. package/lib/IAutoMovieRenderPassManifest.d.ts +1 -21
  14. package/lib/IAutoMovieRenderReassembly.d.ts +1 -24
  15. package/lib/IAutoMovieRenderResult.d.ts +1 -39
  16. package/lib/IAutoMovieSequenceRenderAdapters.d.ts +1 -36
  17. package/lib/IAutoMovieSequenceRenderAndSeeRequest.d.ts +1 -36
  18. package/lib/IAutoMovieSequenceRenderAndSeeResult.d.ts +1 -23
  19. package/lib/IAutoMovieSequenceRenderFrame.d.ts +1 -41
  20. package/lib/IAutoMovieSequenceRenderPlan.d.ts +1 -76
  21. package/lib/IAutoMovieSequenceRenderResult.d.ts +1 -44
  22. package/lib/IAutoMovieSequenceRenderShotSpan.d.ts +1 -39
  23. package/lib/IAutoMovieSequenceRenderTransitionSpan.d.ts +1 -39
  24. package/lib/audio/mixAutoMovieAudioPcm.d.ts +2 -39
  25. package/lib/audio/mixAutoMovieAudioPcm.js.map +1 -1
  26. package/lib/audio/mixAutoMovieAudioPcm.mjs.map +1 -1
  27. package/lib/auditAutoMovieRenderObservation.d.ts +2 -14
  28. package/lib/auditAutoMovieRenderObservation.js.map +1 -1
  29. package/lib/auditAutoMovieRenderObservation.mjs.map +1 -1
  30. package/lib/cache/createAutoMovieHttpArtifactStore.d.ts +1 -1
  31. package/lib/cache/createAutoMovieHttpArtifactStore.mjs.map +1 -1
  32. package/lib/caption/IAutoMovieBeatCaption.d.ts +1 -22
  33. package/lib/caption/beatCaptions.d.ts +1 -2
  34. package/lib/caption/beatCaptions.js.map +1 -1
  35. package/lib/caption/beatCaptions.mjs.map +1 -1
  36. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.d.ts +1 -12
  37. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js.map +1 -1
  38. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.mjs.map +1 -1
  39. package/lib/caption/parseAutoMovieCaptionLanguage.d.ts +1 -14
  40. package/lib/caption/parseAutoMovieCaptionLanguage.js.map +1 -1
  41. package/lib/caption/parseAutoMovieCaptionLanguage.mjs.map +1 -1
  42. package/lib/capture/AutoMovieCaptureFolder.d.ts +3 -13
  43. package/lib/capture/AutoMovieCaptureFolder.js.map +1 -1
  44. package/lib/capture/AutoMovieCaptureFolder.mjs.map +1 -1
  45. package/lib/capture/IAutoMovieCaptureBudget.d.ts +1 -24
  46. package/lib/capture/IAutoMovieCaptureCell.d.ts +1 -33
  47. package/lib/capture/IAutoMovieCaptureComparison.d.ts +1 -75
  48. package/lib/capture/IAutoMovieCaptureDrawing.d.ts +1 -56
  49. package/lib/capture/IAutoMovieCaptureLayout.d.ts +1 -47
  50. package/lib/capture/IAutoMovieCapturePlan.d.ts +1 -30
  51. package/lib/capture/IAutoMovieCapturePlanRequest.d.ts +1 -97
  52. package/lib/capture/IAutoMovieCaptureRecord.d.ts +1 -134
  53. package/lib/capture/IAutoMovieCaptureRequestSource.d.ts +1 -36
  54. package/lib/capture/IAutoMovieCaptureResolution.d.ts +1 -20
  55. package/lib/capture/IAutoMovieCaptureSelection.d.ts +1 -23
  56. package/lib/capture/IAutoMovieCaptureStorage.d.ts +1 -76
  57. package/lib/capture/IAutoMovieCaptureSubject.d.ts +1 -81
  58. package/lib/capture/IAutoMovieCaptureTime.d.ts +1 -16
  59. package/lib/capture/IAutoMovieCaptureWindow.d.ts +1 -24
  60. package/lib/capture/compareAutoMovieCaptureRounds.d.ts +2 -23
  61. package/lib/capture/compareAutoMovieCaptureRounds.js.map +1 -1
  62. package/lib/capture/compareAutoMovieCaptureRounds.mjs.map +1 -1
  63. package/lib/capture/formatAutoMovieCapturePlanRequest.d.ts +1 -1
  64. package/lib/capture/formatAutoMovieCapturePlanRequest.js.map +1 -1
  65. package/lib/capture/formatAutoMovieCapturePlanRequest.mjs.map +1 -1
  66. package/lib/capture/markAutoMovieCaptureCell.d.ts +1 -1
  67. package/lib/capture/markAutoMovieCaptureCell.mjs.map +1 -1
  68. package/lib/capture/parseAutoMovieCapturePlanRequest.d.ts +1 -2
  69. package/lib/capture/parseAutoMovieCapturePlanRequest.js.map +1 -1
  70. package/lib/capture/parseAutoMovieCapturePlanRequest.mjs.map +1 -1
  71. package/lib/capture/planAutoMovieCapture.d.ts +2 -11
  72. package/lib/capture/planAutoMovieCapture.js.map +1 -1
  73. package/lib/capture/planAutoMovieCapture.mjs.map +1 -1
  74. package/lib/capture/planAutoMovieCaptureFrames.d.ts +2 -22
  75. package/lib/capture/planAutoMovieCaptureFrames.js.map +1 -1
  76. package/lib/capture/planAutoMovieCaptureFrames.mjs.map +1 -1
  77. package/lib/capture/planAutoMovieCaptureLayout.d.ts +2 -16
  78. package/lib/capture/planAutoMovieCaptureLayout.js.map +1 -1
  79. package/lib/capture/planAutoMovieCaptureLayout.mjs.map +1 -1
  80. package/lib/capture/planAutoMovieVideoFrames.d.ts +2 -8
  81. package/lib/capture/planAutoMovieVideoFrames.js.map +1 -1
  82. package/lib/capture/planAutoMovieVideoFrames.mjs.map +1 -1
  83. package/lib/capture/planAutoMovieVideoSceneCuts.d.ts +2 -8
  84. package/lib/capture/planAutoMovieVideoSceneCuts.js.map +1 -1
  85. package/lib/capture/planAutoMovieVideoSceneCuts.mjs.map +1 -1
  86. package/lib/capture/readAutoMovieVideoSceneCuts.d.ts +2 -6
  87. package/lib/capture/readAutoMovieVideoSceneCuts.js.map +1 -1
  88. package/lib/capture/readAutoMovieVideoSceneCuts.mjs.map +1 -1
  89. package/lib/capture/resolveAutoMovieCapturePatterns.d.ts +2 -10
  90. package/lib/capture/resolveAutoMovieCapturePatterns.js.map +1 -1
  91. package/lib/capture/resolveAutoMovieCapturePatterns.mjs.map +1 -1
  92. package/lib/capture/runAutoMovieCapture.d.ts +2 -21
  93. package/lib/capture/runAutoMovieCapture.js.map +1 -1
  94. package/lib/capture/runAutoMovieCapture.mjs.map +1 -1
  95. package/lib/capture/runAutoMovieVideoCapture.d.ts +2 -20
  96. package/lib/capture/runAutoMovieVideoCapture.js.map +1 -1
  97. package/lib/capture/runAutoMovieVideoCapture.mjs.map +1 -1
  98. package/lib/capture/scaleAutoMovieCaptureLabels.d.ts +2 -5
  99. package/lib/capture/scaleAutoMovieCaptureLabels.js.map +1 -1
  100. package/lib/capture/scaleAutoMovieCaptureLabels.mjs.map +1 -1
  101. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.d.ts +2 -6
  102. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js.map +1 -1
  103. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.mjs.map +1 -1
  104. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.d.ts +2 -14
  105. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js.map +1 -1
  106. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.mjs.map +1 -1
  107. package/lib/delivery/AutoMovieProductionPngRole.d.ts +1 -14
  108. package/lib/delivery/IAutoMovieProductionPngProfile.d.ts +1 -41
  109. package/lib/delivery/IAutoMovieProductionVideoProfile.d.ts +1 -46
  110. package/lib/delivery/assertAutoMovieCaptureClock.d.ts +2 -9
  111. package/lib/delivery/assertAutoMovieCaptureClock.js.map +1 -1
  112. package/lib/delivery/assertAutoMovieCaptureClock.mjs.map +1 -1
  113. package/lib/delivery/assertProductionPngPicture.d.ts +2 -6
  114. package/lib/delivery/assertProductionPngPicture.js.map +1 -1
  115. package/lib/delivery/assertProductionPngPicture.mjs.map +1 -1
  116. package/lib/delivery/assertProductionVideoProfile.d.ts +2 -6
  117. package/lib/delivery/assertProductionVideoProfile.js.map +1 -1
  118. package/lib/delivery/assertProductionVideoProfile.mjs.map +1 -1
  119. package/lib/delivery/auditAutoMovieDecodedFrames.d.ts +2 -35
  120. package/lib/delivery/auditAutoMovieDecodedFrames.js.map +1 -1
  121. package/lib/delivery/auditAutoMovieDecodedFrames.mjs.map +1 -1
  122. package/lib/delivery/auditAutoMovieEncodedPresentation.d.ts +2 -8
  123. package/lib/delivery/auditAutoMovieEncodedPresentation.js.map +1 -1
  124. package/lib/delivery/auditAutoMovieEncodedPresentation.mjs.map +1 -1
  125. package/lib/delivery/planAutoMovieVideoEncoding.d.ts +2 -18
  126. package/lib/delivery/planAutoMovieVideoEncoding.js.map +1 -1
  127. package/lib/delivery/planAutoMovieVideoEncoding.mjs.map +1 -1
  128. package/lib/delivery/productionOpusDescription.d.ts +2 -6
  129. package/lib/delivery/productionOpusDescription.js.map +1 -1
  130. package/lib/delivery/productionOpusDescription.mjs.map +1 -1
  131. package/lib/delivery/resolveProductionPngProfile.d.ts +2 -7
  132. package/lib/delivery/resolveProductionPngProfile.js.map +1 -1
  133. package/lib/delivery/resolveProductionPngProfile.mjs.map +1 -1
  134. package/lib/delivery/resolveProductionVideoProfile.d.ts +2 -7
  135. package/lib/delivery/resolveProductionVideoProfile.js.map +1 -1
  136. package/lib/delivery/resolveProductionVideoProfile.mjs.map +1 -1
  137. package/lib/draw/AutoMovieDrawSession.d.ts +3 -16
  138. package/lib/draw/AutoMovieDrawSession.js.map +1 -1
  139. package/lib/draw/AutoMovieDrawSession.mjs.map +1 -1
  140. package/lib/draw/IAutoMovieDrawCall.d.ts +1 -27
  141. package/lib/draw/IAutoMovieDrawDescription.d.ts +1 -15
  142. package/lib/draw/IAutoMovieDrawFunction.d.ts +1 -3
  143. package/lib/draw/IAutoMovieDrawResult.d.ts +1 -36
  144. package/lib/draw/IAutoMovieDrawScene.d.ts +9 -2
  145. package/lib/draw/decodeAutoMovieDrawPixels.d.ts +2 -6
  146. package/lib/draw/decodeAutoMovieDrawPixels.js.map +1 -1
  147. package/lib/draw/decodeAutoMovieDrawPixels.mjs.map +1 -1
  148. package/lib/draw/describeAutoMovieDrawScene.d.ts +4 -4
  149. package/lib/draw/describeAutoMovieDrawScene.js +10 -4
  150. package/lib/draw/describeAutoMovieDrawScene.js.map +1 -1
  151. package/lib/draw/describeAutoMovieDrawScene.mjs +8 -4
  152. package/lib/draw/describeAutoMovieDrawScene.mjs.map +1 -1
  153. package/lib/draw/index.d.ts +1 -0
  154. package/lib/draw/index.js +1 -0
  155. package/lib/draw/index.js.map +1 -1
  156. package/lib/draw/index.mjs +2 -1
  157. package/lib/draw/installAutoMovieDraw.d.ts +6 -6
  158. package/lib/draw/installAutoMovieDraw.js +18 -23
  159. package/lib/draw/installAutoMovieDraw.js.map +1 -1
  160. package/lib/draw/installAutoMovieDraw.mjs +16 -23
  161. package/lib/draw/installAutoMovieDraw.mjs.map +1 -1
  162. package/lib/draw/planAutoMovieDrawCall.d.ts +1 -3
  163. package/lib/draw/planAutoMovieDrawCall.js.map +1 -1
  164. package/lib/draw/planAutoMovieDrawCall.mjs.map +1 -1
  165. package/lib/draw/renderAutoMovieDrawnVideo.d.ts +2 -12
  166. package/lib/draw/renderAutoMovieDrawnVideo.js.map +1 -1
  167. package/lib/draw/renderAutoMovieDrawnVideo.mjs.map +1 -1
  168. package/lib/draw/replaceAutoMovieDrawInspection.d.ts +24 -0
  169. package/lib/draw/replaceAutoMovieDrawInspection.js +29 -0
  170. package/lib/draw/replaceAutoMovieDrawInspection.js.map +1 -0
  171. package/lib/draw/replaceAutoMovieDrawInspection.mjs +29 -0
  172. package/lib/draw/replaceAutoMovieDrawInspection.mjs.map +1 -0
  173. package/lib/draw/stampAutoMovieDrawLegend.d.ts +2 -4
  174. package/lib/draw/stampAutoMovieDrawLegend.js.map +1 -1
  175. package/lib/draw/stampAutoMovieDrawLegend.mjs.map +1 -1
  176. package/lib/film/AutoMovieOrderedScalar.d.ts +1 -15
  177. package/lib/film/IAutoMovieProductionAudioAssetIdentity.d.ts +1 -28
  178. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.d.ts +1 -29
  179. package/lib/film/IAutoMovieProductionEncoderIdentity.d.ts +1 -36
  180. package/lib/film/IAutoMovieProductionRenderChunk.d.ts +1 -39
  181. package/lib/film/IAutoMovieProductionRenderJobPlan.d.ts +1 -53
  182. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.d.ts +1 -31
  183. package/lib/film/IAutoMovieProductionRenderTier.d.ts +1 -25
  184. package/lib/film/equalOrderedScalars.d.ts +2 -5
  185. package/lib/film/equalOrderedScalars.js.map +1 -1
  186. package/lib/film/equalOrderedScalars.mjs.map +1 -1
  187. package/lib/film/normalizeAudioAssets.d.ts +1 -1
  188. package/lib/film/normalizeAudioAssets.js.map +1 -1
  189. package/lib/film/normalizeAudioAssets.mjs.map +1 -1
  190. package/lib/film/normalizeRenderTier.d.ts +1 -1
  191. package/lib/film/normalizeRenderTier.mjs.map +1 -1
  192. package/lib/film/planProductionRenderJob.d.ts +2 -16
  193. package/lib/film/planProductionRenderJob.js.map +1 -1
  194. package/lib/film/planProductionRenderJob.mjs.map +1 -1
  195. package/lib/film/resolveProductionRenderTierFrameFormat.d.ts +1 -2
  196. package/lib/film/resolveProductionRenderTierFrameFormat.mjs.map +1 -1
  197. package/lib/film/validWaveAudioIdentity.d.ts +1 -1
  198. package/lib/film/validWaveAudioIdentity.mjs.map +1 -1
  199. package/lib/index.mjs +8 -7
  200. package/lib/picture/AutoMovieRasterSheet.d.ts +2 -2
  201. package/lib/picture/AutoMovieRasterSheet.js.map +1 -1
  202. package/lib/picture/AutoMovieRasterSheet.mjs.map +1 -1
  203. package/lib/picture/IAutoMovieRasterComparison.d.ts +1 -33
  204. package/lib/picture/IAutoMovieRasterImage.d.ts +1 -17
  205. package/lib/picture/compareAutoMovieRasters.d.ts +1 -2
  206. package/lib/picture/compareAutoMovieRasters.js.map +1 -1
  207. package/lib/picture/compareAutoMovieRasters.mjs.map +1 -1
  208. package/lib/picture/decodeAutoMovieRasterPng.d.ts +1 -1
  209. package/lib/picture/decodeAutoMovieRasterPng.js.map +1 -1
  210. package/lib/picture/decodeAutoMovieRasterPng.mjs.map +1 -1
  211. package/lib/picture/encodeAutoMovieRasterPng.d.ts +1 -1
  212. package/lib/picture/encodeAutoMovieRasterPng.js.map +1 -1
  213. package/lib/picture/encodeAutoMovieRasterPng.mjs.map +1 -1
  214. package/lib/picture/hashAutoMovieRasterImage.d.ts +1 -1
  215. package/lib/picture/hashAutoMovieRasterImage.mjs.map +1 -1
  216. package/lib/picture/stampAutoMovieRasterLabel.d.ts +2 -5
  217. package/lib/picture/stampAutoMovieRasterLabel.js.map +1 -1
  218. package/lib/picture/stampAutoMovieRasterLabel.mjs.map +1 -1
  219. package/lib/planCaptionSidecar.d.ts +2 -8
  220. package/lib/planCaptionSidecar.js.map +1 -1
  221. package/lib/planCaptionSidecar.mjs.map +1 -1
  222. package/lib/planChunkedSequenceRender.d.ts +2 -9
  223. package/lib/planChunkedSequenceRender.js.map +1 -1
  224. package/lib/planChunkedSequenceRender.mjs.map +1 -1
  225. package/lib/planGuidePassOutputs.d.ts +2 -6
  226. package/lib/planGuidePassOutputs.js.map +1 -1
  227. package/lib/planGuidePassOutputs.mjs.map +1 -1
  228. package/lib/planPoseKeypointSidecar.d.ts +2 -12
  229. package/lib/planPoseKeypointSidecar.js.map +1 -1
  230. package/lib/planPoseKeypointSidecar.mjs.map +1 -1
  231. package/lib/planSequenceRender.d.ts +2 -9
  232. package/lib/planSequenceRender.js.map +1 -1
  233. package/lib/planSequenceRender.mjs.map +1 -1
  234. package/lib/planViewerFrameTimes.d.ts +2 -16
  235. package/lib/planViewerFrameTimes.js.map +1 -1
  236. package/lib/planViewerFrameTimes.mjs.map +1 -1
  237. package/lib/renderAndSee.d.ts +1 -2
  238. package/lib/renderAndSee.js.map +1 -1
  239. package/lib/renderAndSee.mjs.map +1 -1
  240. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.d.ts +1 -41
  241. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.d.ts +1 -53
  242. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.d.ts +1 -27
  243. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.d.ts +2 -13
  244. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js.map +1 -1
  245. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.mjs.map +1 -1
  246. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.d.ts +2 -8
  247. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js.map +1 -1
  248. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.mjs.map +1 -1
  249. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.d.ts +1 -1
  250. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js.map +1 -1
  251. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.mjs.map +1 -1
  252. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.d.ts +1 -2
  253. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js.map +1 -1
  254. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.mjs.map +1 -1
  255. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.d.ts +2 -8
  256. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js.map +1 -1
  257. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.mjs.map +1 -1
  258. package/lib/renderCaptionSidecar.d.ts +1 -1
  259. package/lib/renderCaptionSidecar.mjs.map +1 -1
  260. package/lib/renderPoseKeypointSidecar.d.ts +1 -1
  261. package/lib/renderPoseKeypointSidecar.mjs.map +1 -1
  262. package/lib/renderSequenceAndSee.d.ts +1 -2
  263. package/lib/renderSequenceAndSee.js.map +1 -1
  264. package/lib/renderSequenceAndSee.mjs.map +1 -1
  265. package/lib/renderSequenceVideo.d.ts +1 -3
  266. package/lib/renderSequenceVideo.js.map +1 -1
  267. package/lib/renderSequenceVideo.mjs.map +1 -1
  268. package/lib/renderVideo.d.ts +1 -3
  269. package/lib/renderVideo.js.map +1 -1
  270. package/lib/renderVideo.mjs.map +1 -1
  271. package/lib/scene/AutoMovieFilmBeautyComposition.d.ts +1 -25
  272. package/lib/scene/AutoMoviePlayer.d.ts +1 -2
  273. package/lib/scene/AutoMoviePlayer.js.map +1 -1
  274. package/lib/scene/AutoMoviePlayer.mjs.map +1 -1
  275. package/lib/scene/IApplyAutoMovieSectionPlanesProps.d.ts +1 -1
  276. package/lib/scene/IAutoMovieFilmBeautyLayer.d.ts +1 -12
  277. package/lib/scene/IAutoMovieFormationPoseTake.d.ts +1 -22
  278. package/lib/scene/IAutoMovieFormationViewerObject.d.ts +1 -2
  279. package/lib/scene/IAutoMovieRigLocalTransform.d.ts +1 -15
  280. package/lib/scene/IAutoMovieSpringAxisSettlement.d.ts +2 -2
  281. package/lib/scene/IBakeFormationCycleProps.d.ts +1 -2
  282. package/lib/scene/applyAutoMovieRigLocals.d.ts +1 -2
  283. package/lib/scene/applyAutoMovieRigLocals.js.map +1 -1
  284. package/lib/scene/applyAutoMovieRigLocals.mjs.map +1 -1
  285. package/lib/scene/applyAutoMovieSectionPlanes.mjs.map +1 -1
  286. package/lib/scene/applyFormationCycleCadence.d.ts +1 -1
  287. package/lib/scene/applyFormationCycleCadence.mjs.map +1 -1
  288. package/lib/scene/applyPose.d.ts +1 -2
  289. package/lib/scene/applyPose.js.map +1 -1
  290. package/lib/scene/applyPose.mjs.map +1 -1
  291. package/lib/scene/applyRenderMode.js.map +1 -1
  292. package/lib/scene/applyRenderMode.mjs.map +1 -1
  293. package/lib/scene/applySampledObjectMotion.d.ts +1 -1
  294. package/lib/scene/applySampledObjectMotion.mjs.map +1 -1
  295. package/lib/scene/applySemanticMaskMode.d.ts +1 -1
  296. package/lib/scene/applySemanticMaskMode.js.map +1 -1
  297. package/lib/scene/applySemanticMaskMode.mjs.map +1 -1
  298. package/lib/scene/autoMovieAnalysisRampColor.d.ts +2 -5
  299. package/lib/scene/autoMovieAnalysisRampColor.js.map +1 -1
  300. package/lib/scene/autoMovieAnalysisRampColor.mjs.map +1 -1
  301. package/lib/scene/bakeFormationCycle.d.ts +2 -1
  302. package/lib/scene/bakeFormationCycle.js +3 -2
  303. package/lib/scene/bakeFormationCycle.js.map +1 -1
  304. package/lib/scene/bakeFormationCycle.mjs +3 -2
  305. package/lib/scene/bakeFormationCycle.mjs.map +1 -1
  306. package/lib/scene/buildAutoMovieConstruction.d.ts +2 -5
  307. package/lib/scene/buildAutoMovieConstruction.js.map +1 -1
  308. package/lib/scene/buildAutoMovieConstruction.mjs.map +1 -1
  309. package/lib/scene/buildGeometry.d.ts +1 -1
  310. package/lib/scene/buildGeometry.js.map +1 -1
  311. package/lib/scene/buildGeometry.mjs.map +1 -1
  312. package/lib/scene/buildInstancedEffect.js.map +1 -1
  313. package/lib/scene/buildInstancedEffect.mjs.map +1 -1
  314. package/lib/scene/buildInstancedFormation.js.map +1 -1
  315. package/lib/scene/buildInstancedFormation.mjs.map +1 -1
  316. package/lib/scene/buildSpaceObject.js.map +1 -1
  317. package/lib/scene/buildSpaceObject.mjs.map +1 -1
  318. package/lib/scene/createAutoMoviePhysicalPoseAdapter.d.ts +2 -2
  319. package/lib/scene/createAutoMoviePhysicalPoseAdapter.js.map +1 -1
  320. package/lib/scene/createAutoMoviePhysicalPoseAdapter.mjs.map +1 -1
  321. package/lib/scene/describeFormationTextureSources.d.ts +1 -2
  322. package/lib/scene/describeFormationTextureSources.mjs.map +1 -1
  323. package/lib/scene/formation/index.d.ts +1 -1
  324. package/lib/scene/formationCycleCadence.d.ts +1 -1
  325. package/lib/scene/formationCycleCadence.mjs.map +1 -1
  326. package/lib/scene/human-polygon/AutoMovieHumanPolygon.d.ts +7 -57
  327. package/lib/scene/human-polygon/applyHumanPolygonPose.d.ts +2 -2
  328. package/lib/scene/human-polygon/applyHumanPolygonPose.js.map +1 -1
  329. package/lib/scene/human-polygon/applyHumanPolygonPose.mjs.map +1 -1
  330. package/lib/scene/human-polygon/buildHumanPolygon.d.ts +2 -1
  331. package/lib/scene/human-polygon/buildHumanPolygon.js.map +1 -1
  332. package/lib/scene/human-polygon/buildHumanPolygon.mjs.map +1 -1
  333. package/lib/scene/human-polygon/buildHumanPolygonModule.d.ts +2 -2
  334. package/lib/scene/human-polygon/buildHumanPolygonModule.js.map +1 -1
  335. package/lib/scene/human-polygon/buildHumanPolygonModule.mjs.map +1 -1
  336. package/lib/scene/human-polygon/buildHumanPolygonParts.d.ts +2 -2
  337. package/lib/scene/human-polygon/buildHumanPolygonParts.js.map +1 -1
  338. package/lib/scene/human-polygon/buildHumanPolygonParts.mjs.map +1 -1
  339. package/lib/scene/human-polygon/createAutoMovieHumanPolygonFigure.d.ts +3 -2
  340. package/lib/scene/human-polygon/createAutoMovieHumanPolygonFigure.js.map +1 -1
  341. package/lib/scene/human-polygon/createAutoMovieHumanPolygonFigure.mjs.map +1 -1
  342. package/lib/scene/index.d.ts +1 -1
  343. package/lib/scene/index.js +0 -1
  344. package/lib/scene/index.js.map +1 -1
  345. package/lib/scene/index.mjs +6 -6
  346. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.d.ts +2 -4
  347. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.js.map +1 -1
  348. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.mjs.map +1 -1
  349. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_PALETTE.d.ts +1 -1
  350. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_PALETTE.mjs.map +1 -1
  351. package/lib/scene/inspection/IApplyAutoMovieInspectionProps.d.ts +2 -3
  352. package/lib/scene/inspection/IAutoMovieInspectionCamera.d.ts +1 -29
  353. package/lib/scene/inspection/IAutoMovieInspectionHandle.d.ts +3 -6
  354. package/lib/scene/inspection/IAutoMovieInspectionKind.d.ts +1 -16
  355. package/lib/scene/inspection/IAutoMovieInspectionLabel.d.ts +1 -18
  356. package/lib/scene/inspection/IAutoMovieInspectionLegendEntry.d.ts +1 -22
  357. package/lib/scene/inspection/IAutoMovieInspectionMarkSet.d.ts +1 -1
  358. package/lib/scene/inspection/IAutoMovieInspectionMeasured.d.ts +1 -1
  359. package/lib/scene/inspection/IAutoMovieInspectionRequest.d.ts +1 -99
  360. package/lib/scene/inspection/IAutoMovieInspectionTrail.d.ts +1 -18
  361. package/lib/scene/inspection/IAutoMovieInspectionView.d.ts +1 -80
  362. package/lib/scene/inspection/applyAutoMovieInspection.js.map +1 -1
  363. package/lib/scene/inspection/applyAutoMovieInspection.mjs.map +1 -1
  364. package/lib/scene/inspection/applyAutoMovieInspectionSection.d.ts +1 -1
  365. package/lib/scene/inspection/applyAutoMovieInspectionSection.mjs.map +1 -1
  366. package/lib/scene/inspection/applyAutoMovieInspectionShade.d.ts +2 -2
  367. package/lib/scene/inspection/applyAutoMovieInspectionShade.js.map +1 -1
  368. package/lib/scene/inspection/applyAutoMovieInspectionShade.mjs.map +1 -1
  369. package/lib/scene/inspection/buildAutoMovieInspectionMarks.mjs.map +1 -1
  370. package/lib/scene/inspection/chooseAutoMovieInspectionMarks.d.ts +1 -1
  371. package/lib/scene/inspection/chooseAutoMovieInspectionMarks.mjs.map +1 -1
  372. package/lib/scene/inspection/colorAutoMovieInspectionObjects.d.ts +3 -3
  373. package/lib/scene/inspection/colorAutoMovieInspectionObjects.js.map +1 -1
  374. package/lib/scene/inspection/colorAutoMovieInspectionObjects.mjs.map +1 -1
  375. package/lib/scene/inspection/expandAutoMovieInspectionSweep.d.ts +2 -17
  376. package/lib/scene/inspection/expandAutoMovieInspectionSweep.js.map +1 -1
  377. package/lib/scene/inspection/expandAutoMovieInspectionSweep.mjs.map +1 -1
  378. package/lib/scene/inspection/focusAutoMovieInspection.d.ts +2 -3
  379. package/lib/scene/inspection/focusAutoMovieInspection.js.map +1 -1
  380. package/lib/scene/inspection/focusAutoMovieInspection.mjs.map +1 -1
  381. package/lib/scene/inspection/formatAutoMovieInspectionCameraView.d.ts +1 -1
  382. package/lib/scene/inspection/formatAutoMovieInspectionCameraView.js.map +1 -1
  383. package/lib/scene/inspection/formatAutoMovieInspectionCameraView.mjs.map +1 -1
  384. package/lib/scene/inspection/formatAutoMovieInspectionRequest.d.ts +1 -1
  385. package/lib/scene/inspection/formatAutoMovieInspectionRequest.js.map +1 -1
  386. package/lib/scene/inspection/formatAutoMovieInspectionRequest.mjs.map +1 -1
  387. package/lib/scene/inspection/formatAutoMovieInspectionView.d.ts +1 -1
  388. package/lib/scene/inspection/formatAutoMovieInspectionView.js.map +1 -1
  389. package/lib/scene/inspection/formatAutoMovieInspectionView.mjs.map +1 -1
  390. package/lib/scene/inspection/legendAutoMovieInspectionMarks.d.ts +2 -6
  391. package/lib/scene/inspection/legendAutoMovieInspectionMarks.js.map +1 -1
  392. package/lib/scene/inspection/legendAutoMovieInspectionMarks.mjs.map +1 -1
  393. package/lib/scene/inspection/listAutoMovieInspectionKinds.d.ts +2 -9
  394. package/lib/scene/inspection/listAutoMovieInspectionKinds.js.map +1 -1
  395. package/lib/scene/inspection/listAutoMovieInspectionKinds.mjs.map +1 -1
  396. package/lib/scene/inspection/markAutoMovieInspectionTrails.d.ts +1 -2
  397. package/lib/scene/inspection/markAutoMovieInspectionTrails.js.map +1 -1
  398. package/lib/scene/inspection/markAutoMovieInspectionTrails.mjs.map +1 -1
  399. package/lib/scene/inspection/measureAutoMovieInspectionDefects.d.ts +1 -1
  400. package/lib/scene/inspection/measureAutoMovieInspectionDefects.js.map +1 -1
  401. package/lib/scene/inspection/measureAutoMovieInspectionDefects.mjs.map +1 -1
  402. package/lib/scene/inspection/measureAutoMovieInspectionEdges.mjs.map +1 -1
  403. package/lib/scene/inspection/measureAutoMovieInspectionMeshes.d.ts +1 -1
  404. package/lib/scene/inspection/measureAutoMovieInspectionMeshes.mjs.map +1 -1
  405. package/lib/scene/inspection/measureAutoMovieInspectionPaths.d.ts +2 -7
  406. package/lib/scene/inspection/measureAutoMovieInspectionPaths.js.map +1 -1
  407. package/lib/scene/inspection/measureAutoMovieInspectionPaths.mjs.map +1 -1
  408. package/lib/scene/inspection/mergeAutoMovieInspectionLegends.d.ts +1 -1
  409. package/lib/scene/inspection/mergeAutoMovieInspectionLegends.mjs.map +1 -1
  410. package/lib/scene/inspection/parseAutoMovieInspectionRequest.d.ts +1 -1
  411. package/lib/scene/inspection/parseAutoMovieInspectionRequest.js.map +1 -1
  412. package/lib/scene/inspection/parseAutoMovieInspectionRequest.mjs.map +1 -1
  413. package/lib/scene/inspection/parseAutoMovieInspectionView.d.ts +1 -1
  414. package/lib/scene/inspection/parseAutoMovieInspectionView.js.map +1 -1
  415. package/lib/scene/inspection/parseAutoMovieInspectionView.mjs.map +1 -1
  416. package/lib/scene/inspection/placeAutoMovieInspectionLabels.d.ts +2 -6
  417. package/lib/scene/inspection/placeAutoMovieInspectionLabels.js.map +1 -1
  418. package/lib/scene/inspection/placeAutoMovieInspectionLabels.mjs.map +1 -1
  419. package/lib/scene/inspection/planAutoMovieInspectionTrailTimes.d.ts +2 -9
  420. package/lib/scene/inspection/planAutoMovieInspectionTrailTimes.js.map +1 -1
  421. package/lib/scene/inspection/planAutoMovieInspectionTrailTimes.mjs.map +1 -1
  422. package/lib/scene/inspection/resolveAutoMovieInspectionColors.d.ts +2 -18
  423. package/lib/scene/inspection/resolveAutoMovieInspectionColors.js.map +1 -1
  424. package/lib/scene/inspection/resolveAutoMovieInspectionColors.mjs.map +1 -1
  425. package/lib/scene/inspection/resolveAutoMovieInspectionView.d.ts +1 -2
  426. package/lib/scene/inspection/resolveAutoMovieInspectionView.js.map +1 -1
  427. package/lib/scene/inspection/resolveAutoMovieInspectionView.mjs.map +1 -1
  428. package/lib/scene/inspection/sampleAutoMovieInspectionTrails.d.ts +1 -1
  429. package/lib/scene/inspection/sampleAutoMovieInspectionTrails.js.map +1 -1
  430. package/lib/scene/inspection/sampleAutoMovieInspectionTrails.mjs.map +1 -1
  431. package/lib/scene/matchesAutoMovieShadowTextureProfile.d.ts +1 -1
  432. package/lib/scene/matchesAutoMovieShadowTextureProfile.mjs.map +1 -1
  433. package/lib/scene/observeAutoMovieRendererFrame.d.ts +2 -5
  434. package/lib/scene/observeAutoMovieRendererFrame.js.map +1 -1
  435. package/lib/scene/observeAutoMovieRendererFrame.mjs.map +1 -1
  436. package/lib/scene/planAutoMovieShadowTextureTarget.d.ts +1 -1
  437. package/lib/scene/planAutoMovieShadowTextureTarget.mjs.map +1 -1
  438. package/lib/scene/readAutoMovieFilmDisplayTextureResidency.d.ts +2 -6
  439. package/lib/scene/readAutoMovieFilmDisplayTextureResidency.js.map +1 -1
  440. package/lib/scene/readAutoMovieFilmDisplayTextureResidency.mjs.map +1 -1
  441. package/lib/scene/readAutoMovieMaterialTextureSources.d.ts +3 -5
  442. package/lib/scene/readAutoMovieMaterialTextureSources.js.map +1 -1
  443. package/lib/scene/readAutoMovieMaterialTextureSources.mjs.map +1 -1
  444. package/lib/scene/readAutoMovieRenderTextureTarget.d.ts +1 -1
  445. package/lib/scene/readAutoMovieRenderTextureTarget.mjs.map +1 -1
  446. package/lib/scene/readAutoMovieShadowTextureTargets.d.ts +1 -2
  447. package/lib/scene/readAutoMovieShadowTextureTargets.js.map +1 -1
  448. package/lib/scene/readAutoMovieShadowTextureTargets.mjs.map +1 -1
  449. package/lib/scene/readAutoMovieTextureSource.d.ts +1 -1
  450. package/lib/scene/readAutoMovieTextureSource.js.map +1 -1
  451. package/lib/scene/readAutoMovieTextureSource.mjs.map +1 -1
  452. package/lib/scene/readAutoMovieTransmissionTextureTarget.d.ts +1 -1
  453. package/lib/scene/readAutoMovieTransmissionTextureTarget.mjs.map +1 -1
  454. package/lib/scene/resolveAutoMovieFilmBeautyComposition.d.ts +2 -3
  455. package/lib/scene/resolveAutoMovieFilmBeautyComposition.js.map +1 -1
  456. package/lib/scene/resolveAutoMovieFilmBeautyComposition.mjs.map +1 -1
  457. package/lib/scene/semanticMask/IAutoMovieSemanticMaskBinding.d.ts +1 -19
  458. package/lib/scene/semanticMask/attachAutoMovieSemanticMask.d.ts +1 -1
  459. package/lib/scene/semanticMask/attachAutoMovieSemanticMask.mjs.map +1 -1
  460. package/lib/scene/semanticMask/autoMovieSemanticMaskOf.d.ts +1 -1
  461. package/lib/scene/semanticMask/autoMovieSemanticMaskOf.mjs.map +1 -1
  462. package/lib/sliceCaptionSidecar.d.ts +1 -1
  463. package/lib/sliceCaptionSidecar.mjs.map +1 -1
  464. package/package.json +7 -7
  465. package/src/IAutoMovieCaptionEntry.ts +1 -32
  466. package/src/IAutoMovieCaptionSidecar.ts +1 -29
  467. package/src/IAutoMovieCapturedFrame.ts +1 -24
  468. package/src/IAutoMovieGuidePassOutput.ts +1 -27
  469. package/src/IAutoMoviePoseKeypointActor.ts +1 -39
  470. package/src/IAutoMoviePoseKeypointFrame.ts +1 -28
  471. package/src/IAutoMoviePoseKeypointSidecar.ts +1 -25
  472. package/src/IAutoMovieRenderAdapters.ts +1 -39
  473. package/src/IAutoMovieRenderAndSeeRequest.ts +1 -38
  474. package/src/IAutoMovieRenderAndSeeResult.ts +1 -23
  475. package/src/IAutoMovieRenderChunk.ts +1 -62
  476. package/src/IAutoMovieRenderChunkPlan.ts +1 -40
  477. package/src/IAutoMovieRenderPassManifest.ts +1 -25
  478. package/src/IAutoMovieRenderReassembly.ts +1 -28
  479. package/src/IAutoMovieRenderResult.ts +1 -46
  480. package/src/IAutoMovieSequenceRenderAdapters.ts +1 -41
  481. package/src/IAutoMovieSequenceRenderAndSeeRequest.ts +1 -47
  482. package/src/IAutoMovieSequenceRenderAndSeeResult.ts +1 -23
  483. package/src/IAutoMovieSequenceRenderFrame.ts +1 -48
  484. package/src/IAutoMovieSequenceRenderPlan.ts +1 -88
  485. package/src/IAutoMovieSequenceRenderResult.ts +1 -52
  486. package/src/IAutoMovieSequenceRenderShotSpan.ts +1 -46
  487. package/src/IAutoMovieSequenceRenderTransitionSpan.ts +1 -46
  488. package/src/audio/mixAutoMovieAudioPcm.ts +10 -44
  489. package/src/auditAutoMovieRenderObservation.ts +5 -14
  490. package/src/cache/createAutoMovieHttpArtifactStore.ts +1 -1
  491. package/src/caption/IAutoMovieBeatCaption.ts +1 -23
  492. package/src/caption/beatCaptions.ts +1 -1
  493. package/src/caption/inspectAutoMovieCaptionReadabilityWithRuntime.ts +1 -12
  494. package/src/caption/parseAutoMovieCaptionLanguage.ts +1 -13
  495. package/src/capture/AutoMovieCaptureFolder.ts +10 -16
  496. package/src/capture/IAutoMovieCaptureBudget.ts +1 -26
  497. package/src/capture/IAutoMovieCaptureCell.ts +1 -42
  498. package/src/capture/IAutoMovieCaptureComparison.ts +1 -96
  499. package/src/capture/IAutoMovieCaptureDrawing.ts +1 -64
  500. package/src/capture/IAutoMovieCaptureLayout.ts +1 -51
  501. package/src/capture/IAutoMovieCapturePlan.ts +1 -36
  502. package/src/capture/IAutoMovieCapturePlanRequest.ts +1 -117
  503. package/src/capture/IAutoMovieCaptureRecord.ts +1 -174
  504. package/src/capture/IAutoMovieCaptureRequestSource.ts +1 -37
  505. package/src/capture/IAutoMovieCaptureResolution.ts +1 -23
  506. package/src/capture/IAutoMovieCaptureSelection.ts +1 -28
  507. package/src/capture/IAutoMovieCaptureStorage.ts +1 -76
  508. package/src/capture/IAutoMovieCaptureSubject.ts +1 -94
  509. package/src/capture/IAutoMovieCaptureTime.ts +1 -17
  510. package/src/capture/IAutoMovieCaptureWindow.ts +1 -29
  511. package/src/capture/compareAutoMovieCaptureRounds.ts +33 -48
  512. package/src/capture/formatAutoMovieCapturePlanRequest.ts +7 -3
  513. package/src/capture/markAutoMovieCaptureCell.ts +1 -1
  514. package/src/capture/parseAutoMovieCapturePlanRequest.ts +13 -10
  515. package/src/capture/planAutoMovieCapture.ts +20 -21
  516. package/src/capture/planAutoMovieCaptureFrames.ts +9 -28
  517. package/src/capture/planAutoMovieCaptureLayout.ts +8 -21
  518. package/src/capture/planAutoMovieVideoFrames.ts +5 -10
  519. package/src/capture/planAutoMovieVideoSceneCuts.ts +5 -10
  520. package/src/capture/readAutoMovieVideoSceneCuts.ts +5 -7
  521. package/src/capture/resolveAutoMovieCapturePatterns.ts +11 -14
  522. package/src/capture/runAutoMovieCapture.ts +19 -33
  523. package/src/capture/runAutoMovieVideoCapture.ts +13 -32
  524. package/src/capture/scaleAutoMovieCaptureLabels.ts +5 -2
  525. package/src/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.ts +5 -6
  526. package/src/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.ts +17 -27
  527. package/src/delivery/AutoMovieProductionPngRole.ts +1 -18
  528. package/src/delivery/IAutoMovieProductionPngProfile.ts +1 -52
  529. package/src/delivery/IAutoMovieProductionVideoProfile.ts +1 -48
  530. package/src/delivery/assertAutoMovieCaptureClock.ts +7 -7
  531. package/src/delivery/assertProductionPngPicture.ts +8 -13
  532. package/src/delivery/assertProductionVideoProfile.ts +5 -12
  533. package/src/delivery/auditAutoMovieDecodedFrames.ts +17 -56
  534. package/src/delivery/auditAutoMovieEncodedPresentation.ts +3 -8
  535. package/src/delivery/planAutoMovieVideoEncoding.ts +8 -23
  536. package/src/delivery/productionOpusDescription.ts +9 -15
  537. package/src/delivery/resolveProductionPngProfile.ts +9 -17
  538. package/src/delivery/resolveProductionVideoProfile.ts +9 -16
  539. package/src/draw/AutoMovieDrawSession.ts +19 -18
  540. package/src/draw/IAutoMovieDrawCall.ts +1 -34
  541. package/src/draw/IAutoMovieDrawDescription.ts +1 -17
  542. package/src/draw/IAutoMovieDrawFunction.ts +5 -3
  543. package/src/draw/IAutoMovieDrawResult.ts +1 -45
  544. package/src/draw/IAutoMovieDrawScene.ts +10 -2
  545. package/src/draw/decodeAutoMovieDrawPixels.ts +5 -3
  546. package/src/draw/describeAutoMovieDrawScene.ts +18 -11
  547. package/src/draw/index.ts +1 -0
  548. package/src/draw/installAutoMovieDraw.ts +43 -45
  549. package/src/draw/planAutoMovieDrawCall.ts +8 -5
  550. package/src/draw/renderAutoMovieDrawnVideo.ts +6 -9
  551. package/src/draw/replaceAutoMovieDrawInspection.ts +36 -0
  552. package/src/draw/stampAutoMovieDrawLegend.ts +7 -5
  553. package/src/film/AutoMovieOrderedScalar.ts +1 -15
  554. package/src/film/IAutoMovieProductionAudioAssetIdentity.ts +1 -40
  555. package/src/film/IAutoMovieProductionAudioAssetIdentityBase.ts +1 -34
  556. package/src/film/IAutoMovieProductionEncoderIdentity.ts +1 -42
  557. package/src/film/IAutoMovieProductionRenderChunk.ts +1 -47
  558. package/src/film/IAutoMovieProductionRenderJobPlan.ts +1 -73
  559. package/src/film/IAutoMovieProductionRenderRuntimeIdentity.ts +1 -37
  560. package/src/film/IAutoMovieProductionRenderTier.ts +1 -27
  561. package/src/film/equalOrderedScalars.ts +10 -10
  562. package/src/film/normalizeAudioAssets.ts +4 -2
  563. package/src/film/normalizeRenderTier.ts +1 -1
  564. package/src/film/planProductionRenderJob.ts +11 -48
  565. package/src/film/resolveProductionRenderTierFrameFormat.ts +1 -1
  566. package/src/film/validWaveAudioIdentity.ts +3 -3
  567. package/src/picture/AutoMovieRasterSheet.ts +7 -3
  568. package/src/picture/IAutoMovieRasterComparison.ts +1 -33
  569. package/src/picture/IAutoMovieRasterImage.ts +1 -19
  570. package/src/picture/compareAutoMovieRasters.ts +4 -2
  571. package/src/picture/decodeAutoMovieRasterPng.ts +2 -1
  572. package/src/picture/encodeAutoMovieRasterPng.ts +2 -1
  573. package/src/picture/hashAutoMovieRasterImage.ts +1 -1
  574. package/src/picture/stampAutoMovieRasterLabel.ts +5 -2
  575. package/src/planCaptionSidecar.ts +11 -30
  576. package/src/planChunkedSequenceRender.ts +15 -26
  577. package/src/planGuidePassOutputs.ts +10 -16
  578. package/src/planPoseKeypointSidecar.ts +11 -40
  579. package/src/planSequenceRender.ts +11 -32
  580. package/src/planViewerFrameTimes.ts +5 -22
  581. package/src/renderAndSee.ts +5 -2
  582. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.ts +1 -53
  583. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.ts +1 -61
  584. package/src/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.ts +1 -29
  585. package/src/renderBudgetPreflight/assessAutoMovieRenderBudget.ts +9 -37
  586. package/src/renderBudgetPreflight/autoMovieRenderBudgetEvidence.ts +11 -15
  587. package/src/renderBudgetPreflight/autoMovieRenderBudgetRefusal.ts +2 -3
  588. package/src/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.ts +4 -3
  589. package/src/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.ts +7 -19
  590. package/src/renderCaptionSidecar.ts +1 -1
  591. package/src/renderPoseKeypointSidecar.ts +1 -1
  592. package/src/renderSequenceAndSee.ts +5 -2
  593. package/src/renderSequenceVideo.ts +6 -4
  594. package/src/renderVideo.ts +5 -3
  595. package/src/scene/AutoMovieFilmBeautyComposition.ts +1 -24
  596. package/src/scene/AutoMoviePlayer.ts +12 -12
  597. package/src/scene/IApplyAutoMovieSectionPlanesProps.ts +1 -1
  598. package/src/scene/IAutoMovieFilmBeautyLayer.ts +1 -12
  599. package/src/scene/IAutoMovieFormationPoseTake.ts +1 -26
  600. package/src/scene/IAutoMovieFormationViewerObject.ts +4 -2
  601. package/src/scene/IAutoMovieRigLocalTransform.ts +1 -16
  602. package/src/scene/IAutoMovieSpringAxisSettlement.ts +2 -2
  603. package/src/scene/IBakeFormationCycleProps.ts +4 -2
  604. package/src/scene/applyAutoMovieRigLocals.ts +4 -2
  605. package/src/scene/applyAutoMovieSectionPlanes.ts +1 -1
  606. package/src/scene/applyFormationCycleCadence.ts +1 -1
  607. package/src/scene/applyPose.ts +2 -5
  608. package/src/scene/applyRenderMode.ts +5 -5
  609. package/src/scene/applySampledObjectMotion.ts +1 -1
  610. package/src/scene/applySemanticMaskMode.ts +1 -1
  611. package/src/scene/autoMovieAnalysisRampColor.ts +7 -5
  612. package/src/scene/bakeFormationCycle.ts +4 -3
  613. package/src/scene/buildAutoMovieConstruction.ts +2 -5
  614. package/src/scene/buildGeometry.ts +6 -9
  615. package/src/scene/buildInstancedEffect.ts +6 -6
  616. package/src/scene/buildInstancedFormation.ts +3 -3
  617. package/src/scene/buildSpaceObject.ts +7 -3
  618. package/src/scene/createAutoMoviePhysicalPoseAdapter.ts +4 -4
  619. package/src/scene/describeFormationTextureSources.ts +2 -2
  620. package/src/scene/formation/index.ts +1 -1
  621. package/src/scene/formationCycleCadence.ts +1 -1
  622. package/src/scene/human-polygon/AutoMovieHumanPolygon.ts +7 -67
  623. package/src/scene/human-polygon/applyHumanPolygonPose.ts +12 -7
  624. package/src/scene/human-polygon/buildHumanPolygon.ts +23 -12
  625. package/src/scene/human-polygon/buildHumanPolygonModule.ts +6 -3
  626. package/src/scene/human-polygon/buildHumanPolygonParts.ts +10 -6
  627. package/src/scene/human-polygon/createAutoMovieHumanPolygonFigure.ts +10 -3
  628. package/src/scene/index.ts +1 -1
  629. package/src/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.ts +3 -1
  630. package/src/scene/inspection/AUTO_MOVIE_INSPECTION_PALETTE.ts +1 -1
  631. package/src/scene/inspection/IApplyAutoMovieInspectionProps.ts +5 -3
  632. package/src/scene/inspection/IAutoMovieInspectionCamera.ts +1 -38
  633. package/src/scene/inspection/IAutoMovieInspectionHandle.ts +8 -6
  634. package/src/scene/inspection/IAutoMovieInspectionKind.ts +1 -18
  635. package/src/scene/inspection/IAutoMovieInspectionLabel.ts +1 -21
  636. package/src/scene/inspection/IAutoMovieInspectionLegendEntry.ts +1 -24
  637. package/src/scene/inspection/IAutoMovieInspectionMarkSet.ts +1 -1
  638. package/src/scene/inspection/IAutoMovieInspectionMeasured.ts +1 -1
  639. package/src/scene/inspection/IAutoMovieInspectionRequest.ts +1 -115
  640. package/src/scene/inspection/IAutoMovieInspectionTrail.ts +1 -21
  641. package/src/scene/inspection/IAutoMovieInspectionView.ts +1 -92
  642. package/src/scene/inspection/applyAutoMovieInspection.ts +12 -8
  643. package/src/scene/inspection/applyAutoMovieInspectionSection.ts +1 -1
  644. package/src/scene/inspection/applyAutoMovieInspectionShade.ts +2 -2
  645. package/src/scene/inspection/buildAutoMovieInspectionMarks.ts +1 -1
  646. package/src/scene/inspection/chooseAutoMovieInspectionMarks.ts +1 -1
  647. package/src/scene/inspection/colorAutoMovieInspectionObjects.ts +6 -3
  648. package/src/scene/inspection/expandAutoMovieInspectionSweep.ts +8 -15
  649. package/src/scene/inspection/focusAutoMovieInspection.ts +6 -4
  650. package/src/scene/inspection/formatAutoMovieInspectionCameraView.ts +2 -1
  651. package/src/scene/inspection/formatAutoMovieInspectionRequest.ts +6 -3
  652. package/src/scene/inspection/formatAutoMovieInspectionView.ts +4 -3
  653. package/src/scene/inspection/legendAutoMovieInspectionMarks.ts +6 -3
  654. package/src/scene/inspection/listAutoMovieInspectionKinds.ts +7 -10
  655. package/src/scene/inspection/markAutoMovieInspectionTrails.ts +4 -2
  656. package/src/scene/inspection/measureAutoMovieInspectionDefects.ts +5 -5
  657. package/src/scene/inspection/measureAutoMovieInspectionEdges.ts +1 -1
  658. package/src/scene/inspection/measureAutoMovieInspectionMeshes.ts +1 -1
  659. package/src/scene/inspection/measureAutoMovieInspectionPaths.ts +6 -3
  660. package/src/scene/inspection/mergeAutoMovieInspectionLegends.ts +1 -1
  661. package/src/scene/inspection/parseAutoMovieInspectionRequest.ts +10 -7
  662. package/src/scene/inspection/parseAutoMovieInspectionView.ts +6 -4
  663. package/src/scene/inspection/placeAutoMovieInspectionLabels.ts +6 -7
  664. package/src/scene/inspection/planAutoMovieInspectionTrailTimes.ts +4 -11
  665. package/src/scene/inspection/resolveAutoMovieInspectionColors.ts +7 -11
  666. package/src/scene/inspection/resolveAutoMovieInspectionView.ts +5 -3
  667. package/src/scene/inspection/sampleAutoMovieInspectionTrails.ts +1 -1
  668. package/src/scene/matchesAutoMovieShadowTextureProfile.ts +1 -1
  669. package/src/scene/observeAutoMovieRendererFrame.ts +3 -3
  670. package/src/scene/planAutoMovieShadowTextureTarget.ts +1 -1
  671. package/src/scene/readAutoMovieFilmDisplayTextureResidency.ts +3 -12
  672. package/src/scene/readAutoMovieMaterialTextureSources.ts +5 -3
  673. package/src/scene/readAutoMovieRenderTextureTarget.ts +1 -1
  674. package/src/scene/readAutoMovieShadowTextureTargets.ts +5 -5
  675. package/src/scene/readAutoMovieTextureSource.ts +4 -2
  676. package/src/scene/readAutoMovieTransmissionTextureTarget.ts +1 -1
  677. package/src/scene/resolveAutoMovieFilmBeautyComposition.ts +6 -4
  678. package/src/scene/semanticMask/IAutoMovieSemanticMaskBinding.ts +1 -24
  679. package/src/scene/semanticMask/attachAutoMovieSemanticMask.ts +1 -1
  680. package/src/scene/semanticMask/autoMovieSemanticMaskOf.ts +1 -1
  681. package/src/sliceCaptionSidecar.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMoviePlayer.js","sourceRoot":"","sources":["../../src/scene/AutoMoviePlayer.ts"],"names":[],"mappings":";;;AAAA,8CAQ2B;AAc3B,6DAAuD;AACvD,iDAA2C;AAgB3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAUqB,MAAM;IACN,QAAQ;IACjB,MAAM;IACG,SAAS;IAQT,UAAU;IAEV,MAAM;IAON,UAAU;IA7BrB,UAAU,GAAkC,IAAI,CAAC;IACxC,OAAO,GAA6C,IAAI,GA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,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAC9D,CAAC;IAED,8DAA8D;IAC9D,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,UAAU,EAAE,UAAU,IAAI,IAAI,CAAC;IAC7C,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMoviePlayer.mjs","names":[],"sources":["../../src/scene/AutoMoviePlayer.ts"],"sourcesContent":["import {\n IAutoMovieMotionSample,\n IAutoMovieRestFrame,\n ISpringStep,\n clampPose,\n dampedSpring,\n resolveLookAt,\n sampleMotion,\n} from \"@automovie/engine\";\nimport {\n AutoMovieHumanoidBone,\n IAutoMovieExpression,\n type IAutoMovieJointAxes,\n IAutoMovieJointPose,\n IAutoMovieMotion,\n IAutoMoviePose,\n IAutoMovieSkeleton,\n} from \"@automovie/interface\";\n\nimport type { IAutoMovieModelObject } from \"./IAutoMovieModelObject.js\";\nimport type { IAutoMovieSpringAxisSettlement } from \"./IAutoMovieSpringAxisSettlement.js\";\nimport type { IAutoMovieSpringConfig } from \"./IAutoMovieSpringConfig.js\";\nimport { applyExpression } from \"./applyExpression.js\";\nimport { applyPose } from \"./applyPose.js\";\n\n/**\n * One joint's three solver states, retained in this player's spring map.\n */\ninterface IAxisSprings {\n /** Flexion value and velocity carried between bounded solver updates. */\n flexion: ISpringStep;\n\n /** Abduction value and velocity carried between the same updates. */\n abduction: ISpringStep;\n\n /** Twist value and velocity carried between the same updates. */\n twist: ISpringStep;\n}\n\n/**\n * Drives a motion clip onto a built model: given an elapsed time it samples the\n * clip (via the engine's interpolation) and applies the resulting pose to the\n * model's bones.\n *\n * Call {@link update} with elapsed seconds; the host owns rendering and the\n * animation loop (see {@link mountViewer}). Without springs, the pose depends\n * only on clip time. Springs retain velocity and depend on the update sequence;\n * equal or backward times hold the last spring state.\n *\n * Expression output is sampled on the same frame clock and applied to morph\n * targets or imported-runtime expression sinks when the target provides them;\n * when the target's `lookAt` is `\"bone\"`, its gaze channels turn the eye bones\n * instead (`resolveLookAt`).\n *\n * @evidence contracts/development/design.md#principled-representation Engine sampling supplies pose and expression at elapsed seconds, `resolveLookAt` moves a bone gaze onto the eye joints before clamping, engine clamping and dampedSpring handle optional secondary motion, and applyPose converts semantic joints to bone transforms; spring state is sequence-dependent and non-increasing timestamps hold it.\n * @evidence contracts/development/design.md#minimal-and-owned-surface The player coordinates one clip and built model while the host owns the animation loop; numerical interpolation and kinematics remain in engine and renderer mutation stays in viewer adapters.\n * @evidence contracts/development/design.md#prohibited-design-shortcuts The maximum spring step bounds integration after stalls and ROM is reapplied after intentional spring overshoot; these rules apply to every configured joint rather than to named models or fixtures.\n * @evidence contracts/development/common.md#meaningful-documentation States host rendering ownership, elapsed-second sampling, stateful spring timing, expression synchronization, bone gaze, optional clinical rest frames and post-spring ROM clamping.\n */\nexport class AutoMoviePlayer {\n private lastSample: IAutoMovieMotionSample | null = null;\n private readonly springs: Map<AutoMovieHumanoidBone, IAxisSprings> = new Map<\n AutoMovieHumanoidBone,\n IAxisSprings\n >();\n private lastSeconds: number | null = null;\n private lastUpdateSeconds: number | null = null;\n\n public constructor(\n private readonly target: IAutoMovieModelObject,\n private readonly skeleton: IAutoMovieSkeleton,\n private motion: IAutoMovieMotion,\n private readonly jointAxes?: Partial<\n Record<AutoMovieHumanoidBone, IAutoMovieJointAxes>\n >,\n /**\n * When true, clamp each sampled pose into the skeleton's ROM before it is\n * applied, and again AFTER the secondary-motion springs, which overshoot by\n * design (#1048), so joints can no longer exceed their anatomical limits.\n */\n private readonly clampToRom: boolean = false,\n /** Secondary-motion joints (tail, ears) driven with follow-through. */\n private readonly spring?: IAutoMovieSpringConfig,\n /**\n * Per-bone rest frames: read each sampled joint angle as **clinical** and\n * map it into the rig's rest-relative space before articulating (e.g.\n * abduction 180 raises either arm overhead regardless of side). Omit to\n * treat angles as raw rig-space, the historical behaviour.\n */\n private readonly restFrames?: Partial<\n Record<AutoMovieHumanoidBone, IAutoMovieRestFrame>\n >,\n ) {}\n\n /**\n * Swap the clip being played, preserving active spring follow-through.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Replaces the current motion reference without rewriting its samples; the next update uses the new clip while existing spring velocities remain available for continuous secondary motion.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Clip selection is a single responsibility separate from time advancement and pose application.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Every motion follows the same replacement rule without resetting springs for particular clip identities.\n * @evidence contracts/development/common.md#meaningful-documentation States that selecting a new motion preserves active spring follow-through.\n * @evidenceExclude contracts/development/implementation.md#efficient-algorithms One reference assignment performs no sampling or processing-strategy selection.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Replacing a motion is an effect rather than a cached calculation; spring-state reuse belongs to update.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Releases the player's previous clip reference and retains exactly one replacement clip; latest sampled output is refreshed on the next update.\n */\n public setMotion(motion: IAutoMovieMotion): void {\n this.motion = motion;\n }\n\n /**\n * Sample the clip at elapsed `seconds` and apply pose and expression.\n * Springs hold on equal or backward timestamps and advance at most 1/15 second.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Samples engine motion, optionally clamps before and after three-axis damped follow-through, applies kinematics and expression, then publishes the same applied frame to the target callback; missing configured axes decay toward neutral.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Sampling, spring coordination, viewer application and frame notification form one ordered update; applySpring keeps its three-axis settlement rule local to this player's retained state.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Equal or backward times preserve live spring values rather than reseeding them; post-spring clamping preserves the promised ROM while leaving solver velocity free to converge.\n * @evidence contracts/development/common.md#meaningful-documentation States elapsed-second input, expression application and equal/backward timestamp behavior with the maximum spring integration interval.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits sampled joints and configured spring joints once with Set membership, then delegates skeleton resolution and expression application; temporary pose arrays scale with authored joints.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Bone-keyed axis states retain previous values and velocities; sampled pose and expression are refreshed each update because clip-time output and callback effects are not interchangeable requests.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Replaces lastSample and timestamps and retains one spring state per configured bone encountered; no frame loop is scheduled and target GPU resources remain host-owned.\n */\n public update(seconds: number): void {\n const deltaSeconds: number =\n this.lastUpdateSeconds === null\n ? 0\n : Math.max(0, seconds - this.lastUpdateSeconds);\n this.lastUpdateSeconds = seconds;\n // A bone gaze moves the gaze channels from the expression onto the eye\n // joints before the ROM clamp and springs see the pose.\n const sample: IAutoMovieMotionSample = resolveLookAt(\n sampleMotion(this.motion, seconds),\n this.target.lookAt,\n );\n this.lastSample = sample;\n let pose: IAutoMoviePose = this.clampToRom\n ? clampPose(sample.pose, this.skeleton)\n : sample.pose;\n if (this.spring !== undefined) {\n pose = this.applySpring(pose, seconds);\n // An underdamped spring can overshoot, so the pre-spring clamp\n // alone rendered poses past the promised limits (#1048). Re-clamp the\n // OUTPUT only: the spring state keeps its overshoot and converges\n // naturally; the render just never shows it outside the ROM.\n if (this.clampToRom) pose = clampPose(pose, this.skeleton);\n }\n applyPose(\n this.target,\n pose,\n this.skeleton,\n this.jointAxes,\n this.restFrames,\n );\n applyExpression(this.target, sample.expression);\n this.target.afterAutoMovieFrame?.({\n seconds,\n deltaSeconds,\n pose,\n expression: sample.expression,\n });\n }\n\n /**\n * Replace the spring joints' angles with a damped lag toward the animated\n * target, so a tail/ears trail and overshoot the body's motion instead of\n * snapping. Stateful across frames (velocity per axis); `dt` is clamped so a\n * stall or tab-switch can't explode the integrator.\n */\n private applySpring(pose: IAutoMoviePose, seconds: number): IAutoMoviePose {\n const cfg: IAutoMovieSpringConfig = this.spring!;\n const dt: number =\n this.lastSeconds === null\n ? 0\n : Math.min(Math.max(seconds - this.lastSeconds, 0), 1 / 15);\n this.lastSeconds = seconds;\n const targets: Set<AutoMovieHumanoidBone> = new Set(cfg.joints);\n const params: Parameters<typeof dampedSpring>[3] = {\n stiffness: cfg.stiffness,\n damping: cfg.damping,\n };\n\n const axis: (\n state: ISpringStep | undefined,\n target: number | null,\n ) => IAutoMovieSpringAxisSettlement = (\n state: ISpringStep | undefined,\n target: number | null,\n ): IAutoMovieSpringAxisSettlement => {\n // A vanished axis DECAYS toward neutral instead of hard-resetting\n // (#1048): follow-through settles smoothly when a keyframe segment\n // stops authoring the joint, rather than popping to rest.\n //\n // dt=0 means \"no time elapsed\", NOT \"never sprung\" (#1098): a paused\n // host loop re-calling update(sameT), a backwards scrub (negative\n // delta clamps to 0), or a frozen-frame capture must HOLD the live\n // spring (value and velocity) on both the decay and tracking sides.\n // Conflating the two popped a mid-decay joint to rest (and zeroed its\n // state), and re-seeded a lagging joint AT its target.\n if (target === null) {\n if (state === undefined)\n return { angle: null, next: { value: 0, velocity: 0 } };\n if (dt === 0) return { angle: state.value, next: state };\n const r: ISpringStep = dampedSpring(\n state.value,\n state.velocity,\n 0,\n params,\n dt,\n );\n return { angle: r.value, next: r };\n }\n if (state === undefined)\n return { angle: target, next: { value: target, velocity: 0 } };\n if (dt === 0) return { angle: state.value, next: state };\n const r: ISpringStep = dampedSpring(\n state.value,\n state.velocity,\n target,\n params,\n dt,\n );\n return { angle: r.value, next: r };\n };\n\n const springJoint: (\n bone: AutoMovieHumanoidBone,\n j: IAutoMovieJointPose | null,\n ) => IAutoMovieJointPose = (\n bone: AutoMovieHumanoidBone,\n j: IAutoMovieJointPose | null,\n ): IAutoMovieJointPose => {\n const prev: IAxisSprings | undefined = this.springs.get(bone);\n const f: IAutoMovieSpringAxisSettlement = axis(\n prev?.flexion,\n j?.flexion ?? null,\n );\n const a: IAutoMovieSpringAxisSettlement = axis(\n prev?.abduction,\n j?.abduction ?? null,\n );\n const t: IAutoMovieSpringAxisSettlement = axis(\n prev?.twist,\n j?.twist ?? null,\n );\n this.springs.set(bone, {\n flexion: f.next,\n abduction: a.next,\n twist: t.next,\n });\n return { bone, flexion: f.angle, abduction: a.angle, twist: t.angle };\n };\n\n const joints: IAutoMovieJointPose[] = pose.joints.map(\n (j: IAutoMovieJointPose): IAutoMovieJointPose =>\n targets.has(j.bone) ? springJoint(j.bone, j) : j,\n );\n // A configured joint ABSENT from the pose still decays its follow-through\n // (#1048): the spring keeps integrating toward neutral instead of the\n // joint vanishing mid-swing.\n const present: Set<AutoMovieHumanoidBone> = new Set(\n pose.joints.map(\n (j: IAutoMovieJointPose): AutoMovieHumanoidBone => j.bone,\n ),\n );\n for (const bone of cfg.joints) {\n if (present.has(bone) || !this.springs.has(bone)) continue;\n const decayed: IAutoMovieJointPose = springJoint(bone, null);\n if (\n decayed.flexion !== null ||\n decayed.abduction !== null ||\n decayed.twist !== null\n )\n joints.push(decayed);\n }\n return { skeleton: pose.skeleton, root: pose.root, joints };\n }\n\n /** The most recently sampled facial expression, or `null`. */\n public get lastExpression(): IAutoMovieExpression | null {\n return this.lastSample?.expression ?? null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2DA,IAAa,kBAAb,MAA6B;CAUR;CACA;CACT;CACS;CAQA;CAEA;CAOA;CA7BnB,aAAoD;CACpD,0BAAqE,IAAI,IAGvE;CACF,cAAqC;CACrC,oBAA2C;CAE3C,YACE,QACA,UACA,QACA,WAQA,aAAuC,OAEvC,QAOA,YAGA;EAvBiB,KAAA,SAAA;EACA,KAAA,WAAA;EACT,KAAA,SAAA;EACS,KAAA,YAAA;EAQA,KAAA,aAAA;EAEA,KAAA,SAAA;EAOA,KAAA,aAAA;CAGhB;;;;;;;;;;;;CAaH,UAAiB,QAAgC;EAC/C,KAAK,SAAS;CAChB;;;;;;;;;;;;;CAcA,OAAc,SAAuB;EACnC,MAAM,eACJ,KAAK,sBAAsB,OACvB,IACA,KAAK,IAAI,GAAG,UAAU,KAAK,iBAAiB;EAClD,KAAK,oBAAoB;EAGzB,MAAM,SAAiC,cACrC,aAAa,KAAK,QAAQ,OAAO,GACjC,KAAK,OAAO,MACd;EACA,KAAK,aAAa;EAClB,IAAI,OAAuB,KAAK,aAC5B,UAAU,OAAO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;GAAE;EACnC;EAEA,MAAM,eAIJ,MACA,MACwB;GACxB,MAAM,OAAiC,KAAK,QAAQ,IAAI,IAAI;GAC5D,MAAM,IAAoC,KACxC,MAAM,SACN,GAAG,WAAW,IAChB;GACA,MAAM,IAAoC,KACxC,MAAM,WACN,GAAG,aAAa,IAClB;GACA,MAAM,IAAoC,KACxC,MAAM,OACN,GAAG,SAAS,IACd;GACA,KAAK,QAAQ,IAAI,MAAM;IACrB,SAAS,EAAE;IACX,WAAW,EAAE;IACb,OAAO,EAAE;GACX,CAAC;GACD,OAAO;IAAE;IAAM,SAAS,EAAE;IAAO,WAAW,EAAE;IAAO,OAAO,EAAE;GAAM;EACtE;EAEA,MAAM,SAAgC,KAAK,OAAO,KAC/C,MACC,QAAQ,IAAI,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,CAAC,IAAI,CACnD;EAIA,MAAM,UAAsC,IAAI,IAC9C,KAAK,OAAO,KACT,MAAkD,EAAE,IACvD,CACF;EACA,KAAK,MAAM,QAAQ,IAAI,QAAQ;GAC7B,IAAI,QAAQ,IAAI,IAAI,KAAK,CAAC,KAAK,QAAQ,IAAI,IAAI,GAAG;GAClD,MAAM,UAA+B,YAAY,MAAM,IAAI;GAC3D,IACE,QAAQ,YAAY,QACpB,QAAQ,cAAc,QACtB,QAAQ,UAAU,MAElB,OAAO,KAAK,OAAO;EACvB;EACA,OAAO;GAAE,UAAU,KAAK;GAAU,MAAM,KAAK;GAAM;EAAO;CAC5D;;CAGA,IAAW,iBAA8C;EACvD,OAAO,KAAK,YAAY,cAAc;CACxC;AACF"}
1
+ {"version":3,"file":"AutoMoviePlayer.mjs","names":[],"sources":["../../src/scene/AutoMoviePlayer.ts"],"sourcesContent":["import {\n clampPose,\n dampedSpring,\n resolveLookAt,\n sampleMotion,\n} from \"@automovie/engine\";\nimport type {\n AutoMovieHumanoidBone,\n IAutoMovieExpression,\n IAutoMovieJointAxes,\n IAutoMovieJointPose,\n IAutoMovieMotion,\n IAutoMovieMotionSample,\n IAutoMoviePose,\n IAutoMovieRestFrame,\n IAutoMovieSkeleton,\n IAutoMovieSpringStep,\n} from \"@automovie/interface\";\n\nimport type { IAutoMovieModelObject } from \"./IAutoMovieModelObject.js\";\nimport type { IAutoMovieSpringAxisSettlement } from \"./IAutoMovieSpringAxisSettlement.js\";\nimport type { IAutoMovieSpringConfig } from \"./IAutoMovieSpringConfig.js\";\nimport { applyExpression } from \"./applyExpression.js\";\nimport { applyPose } from \"./applyPose.js\";\n\n/**\n * One joint's three solver states, retained in this player's spring map.\n */\ninterface IAxisSprings {\n /** Flexion value and velocity carried between bounded solver updates. */\n flexion: IAutoMovieSpringStep;\n\n /** Abduction value and velocity carried between the same updates. */\n abduction: IAutoMovieSpringStep;\n\n /** Twist value and velocity carried between the same updates. */\n twist: IAutoMovieSpringStep;\n}\n\n/**\n * Drives a motion clip onto a built model: given an elapsed time it samples the\n * clip (via the engine's interpolation) and applies the resulting pose to the\n * model's bones.\n *\n * Call {@link update} with elapsed seconds; the host owns rendering and the\n * animation loop (see {@link mountViewer}). Without springs, the pose depends\n * only on clip time. Springs retain velocity and depend on the update sequence;\n * equal or backward times hold the last spring state.\n *\n * Expression output is sampled on the same frame clock and applied to morph\n * targets or imported-runtime expression sinks when the target provides them;\n * when the target's `lookAt` is `\"bone\"`, its gaze channels turn the eye bones\n * instead (`resolveLookAt`).\n *\n * @evidence contracts/development/design.md#principled-representation Engine sampling supplies pose and expression at elapsed seconds, `resolveLookAt` moves a bone gaze onto the eye joints before clamping, engine clamping and dampedSpring handle optional secondary motion, and applyPose converts semantic joints to bone transforms; spring state is sequence-dependent and non-increasing timestamps hold it.\n * @evidence contracts/development/design.md#minimal-and-owned-surface The player coordinates one clip and built model while the host owns the animation loop; numerical interpolation and kinematics remain in engine and renderer mutation stays in viewer adapters.\n * @evidence contracts/development/design.md#prohibited-design-shortcuts The maximum spring step bounds integration after stalls and ROM is reapplied after intentional spring overshoot; these rules apply to every configured joint rather than to named models or fixtures.\n * @evidence contracts/development/common.md#meaningful-documentation States host rendering ownership, elapsed-second sampling, stateful spring timing, expression synchronization, bone gaze, optional clinical rest frames and post-spring ROM clamping.\n */\nexport class AutoMoviePlayer {\n private lastSample: IAutoMovieMotionSample | null = null;\n private readonly springs: Map<AutoMovieHumanoidBone, IAxisSprings> = new Map<\n AutoMovieHumanoidBone,\n IAxisSprings\n >();\n private lastSeconds: number | null = null;\n private lastUpdateSeconds: number | null = null;\n\n public constructor(\n private readonly target: IAutoMovieModelObject,\n private readonly skeleton: IAutoMovieSkeleton,\n private motion: IAutoMovieMotion,\n private readonly jointAxes?: Partial<\n Record<AutoMovieHumanoidBone, IAutoMovieJointAxes>\n >,\n /**\n * When true, clamp each sampled pose into the skeleton's ROM before it is\n * applied, and again AFTER the secondary-motion springs, which overshoot by\n * design (#1048), so joints can no longer exceed their anatomical limits.\n */\n private readonly clampToRom: boolean = false,\n /** Secondary-motion joints (tail, ears) driven with follow-through. */\n private readonly spring?: IAutoMovieSpringConfig,\n /**\n * Per-bone rest frames: read each sampled joint angle as **clinical** and\n * map it into the rig's rest-relative space before articulating (e.g.\n * abduction 180 raises either arm overhead regardless of side). Omit to\n * treat angles as raw rig-space, the historical behaviour.\n */\n private readonly restFrames?: Partial<\n Record<AutoMovieHumanoidBone, IAutoMovieRestFrame>\n >,\n ) {}\n\n /**\n * Swap the clip being played, preserving active spring follow-through.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Replaces the current motion reference without rewriting its samples; the next update uses the new clip while existing spring velocities remain available for continuous secondary motion.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Clip selection is a single responsibility separate from time advancement and pose application.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Every motion follows the same replacement rule without resetting springs for particular clip identities.\n * @evidence contracts/development/common.md#meaningful-documentation States that selecting a new motion preserves active spring follow-through.\n * @evidenceExclude contracts/development/implementation.md#efficient-algorithms One reference assignment performs no sampling or processing-strategy selection.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Replacing a motion is an effect rather than a cached calculation; spring-state reuse belongs to update.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Releases the player's previous clip reference and retains exactly one replacement clip; latest sampled output is refreshed on the next update.\n */\n public setMotion(motion: IAutoMovieMotion): void {\n this.motion = motion;\n }\n\n /**\n * Sample the clip at elapsed `seconds` and apply pose and expression.\n * Springs hold on equal or backward timestamps and advance at most 1/15 second.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Samples engine motion, optionally clamps before and after three-axis damped follow-through, applies kinematics and expression, then publishes the same applied frame to the target callback; missing configured axes decay toward neutral.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Sampling, spring coordination, viewer application and frame notification form one ordered update; applySpring keeps its three-axis settlement rule local to this player's retained state.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Equal or backward times preserve live spring values rather than reseeding them; post-spring clamping preserves the promised ROM while leaving solver velocity free to converge.\n * @evidence contracts/development/common.md#meaningful-documentation States elapsed-second input, expression application and equal/backward timestamp behavior with the maximum spring integration interval.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits sampled joints and configured spring joints once with Set membership, then delegates skeleton resolution and expression application; temporary pose arrays scale with authored joints.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Bone-keyed axis states retain previous values and velocities; sampled pose and expression are refreshed each update because clip-time output and callback effects are not interchangeable requests.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Replaces lastSample and timestamps and retains one spring state per configured bone encountered; no frame loop is scheduled and target GPU resources remain host-owned.\n */\n public update(seconds: number): void {\n const deltaSeconds: number =\n this.lastUpdateSeconds === null\n ? 0\n : Math.max(0, seconds - this.lastUpdateSeconds);\n this.lastUpdateSeconds = seconds;\n // A bone gaze moves the gaze channels from the expression onto the eye\n // joints before the ROM clamp and springs see the pose.\n const sample: IAutoMovieMotionSample = resolveLookAt(\n sampleMotion(this.motion, seconds),\n this.target.lookAt,\n );\n this.lastSample = sample;\n let pose: IAutoMoviePose = this.clampToRom\n ? clampPose(sample.pose, this.skeleton)\n : sample.pose;\n if (this.spring !== undefined) {\n pose = this.applySpring(pose, seconds);\n // An underdamped spring can overshoot, so the pre-spring clamp\n // alone rendered poses past the promised limits (#1048). Re-clamp the\n // OUTPUT only: the spring state keeps its overshoot and converges\n // naturally; the render just never shows it outside the ROM.\n if (this.clampToRom) pose = clampPose(pose, this.skeleton);\n }\n applyPose(\n this.target,\n pose,\n this.skeleton,\n this.jointAxes,\n this.restFrames,\n );\n applyExpression(this.target, sample.expression);\n this.target.afterAutoMovieFrame?.({\n seconds,\n deltaSeconds,\n pose,\n expression: sample.expression,\n });\n }\n\n /**\n * Replace the spring joints' angles with a damped lag toward the animated\n * target, so a tail/ears trail and overshoot the body's motion instead of\n * snapping. Stateful across frames (velocity per axis); `dt` is clamped so a\n * stall or tab-switch can't explode the integrator.\n */\n private applySpring(pose: IAutoMoviePose, seconds: number): IAutoMoviePose {\n const cfg: IAutoMovieSpringConfig = this.spring!;\n const dt: number =\n this.lastSeconds === null\n ? 0\n : Math.min(Math.max(seconds - this.lastSeconds, 0), 1 / 15);\n this.lastSeconds = seconds;\n const targets: Set<AutoMovieHumanoidBone> = new Set(cfg.joints);\n const params: Parameters<typeof dampedSpring>[3] = {\n stiffness: cfg.stiffness,\n damping: cfg.damping,\n };\n\n const axis: (\n state: IAutoMovieSpringStep | undefined,\n target: number | null,\n ) => IAutoMovieSpringAxisSettlement = (\n state: IAutoMovieSpringStep | undefined,\n target: number | null,\n ): IAutoMovieSpringAxisSettlement => {\n // A vanished axis DECAYS toward neutral instead of hard-resetting\n // (#1048): follow-through settles smoothly when a keyframe segment\n // stops authoring the joint, rather than popping to rest.\n //\n // dt=0 means \"no time elapsed\", NOT \"never sprung\" (#1098): a paused\n // host loop re-calling update(sameT), a backwards scrub (negative\n // delta clamps to 0), or a frozen-frame capture must HOLD the live\n // spring (value and velocity) on both the decay and tracking sides.\n // Conflating the two popped a mid-decay joint to rest (and zeroed its\n // state), and re-seeded a lagging joint AT its target.\n if (target === null) {\n if (state === undefined)\n return { angle: null, next: { value: 0, velocity: 0 } };\n if (dt === 0) return { angle: state.value, next: state };\n const r: IAutoMovieSpringStep = dampedSpring(\n state.value,\n state.velocity,\n 0,\n params,\n dt,\n );\n return { angle: r.value, next: r };\n }\n if (state === undefined)\n return { angle: target, next: { value: target, velocity: 0 } };\n if (dt === 0) return { angle: state.value, next: state };\n const r: IAutoMovieSpringStep = dampedSpring(\n state.value,\n state.velocity,\n target,\n params,\n dt,\n );\n return { angle: r.value, next: r };\n };\n\n const springJoint: (\n bone: AutoMovieHumanoidBone,\n j: IAutoMovieJointPose | null,\n ) => IAutoMovieJointPose = (\n bone: AutoMovieHumanoidBone,\n j: IAutoMovieJointPose | null,\n ): IAutoMovieJointPose => {\n const prev: IAxisSprings | undefined = this.springs.get(bone);\n const f: IAutoMovieSpringAxisSettlement = axis(\n prev?.flexion,\n j?.flexion ?? null,\n );\n const a: IAutoMovieSpringAxisSettlement = axis(\n prev?.abduction,\n j?.abduction ?? null,\n );\n const t: IAutoMovieSpringAxisSettlement = axis(\n prev?.twist,\n j?.twist ?? null,\n );\n this.springs.set(bone, {\n flexion: f.next,\n abduction: a.next,\n twist: t.next,\n });\n return { bone, flexion: f.angle, abduction: a.angle, twist: t.angle };\n };\n\n const joints: IAutoMovieJointPose[] = pose.joints.map(\n (j: IAutoMovieJointPose): IAutoMovieJointPose =>\n targets.has(j.bone) ? springJoint(j.bone, j) : j,\n );\n // A configured joint ABSENT from the pose still decays its follow-through\n // (#1048): the spring keeps integrating toward neutral instead of the\n // joint vanishing mid-swing.\n const present: Set<AutoMovieHumanoidBone> = new Set(\n pose.joints.map(\n (j: IAutoMovieJointPose): AutoMovieHumanoidBone => j.bone,\n ),\n );\n for (const bone of cfg.joints) {\n if (present.has(bone) || !this.springs.has(bone)) continue;\n const decayed: IAutoMovieJointPose = springJoint(bone, null);\n if (\n decayed.flexion !== null ||\n decayed.abduction !== null ||\n decayed.twist !== null\n )\n joints.push(decayed);\n }\n return { skeleton: pose.skeleton, root: pose.root, joints };\n }\n\n /** The most recently sampled facial expression, or `null`. */\n public get lastExpression(): IAutoMovieExpression | null {\n return this.lastSample?.expression ?? null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2DA,IAAa,kBAAb,MAA6B;CAUR;CACA;CACT;CACS;CAQA;CAEA;CAOA;CA7BnB,aAAoD;CACpD,0BAAqE,IAAI,IAGvE;CACF,cAAqC;CACrC,oBAA2C;CAE3C,YACE,QACA,UACA,QACA,WAQA,aAAuC,OAEvC,QAOA,YAGA;EAvBiB,KAAA,SAAA;EACA,KAAA,WAAA;EACT,KAAA,SAAA;EACS,KAAA,YAAA;EAQA,KAAA,aAAA;EAEA,KAAA,SAAA;EAOA,KAAA,aAAA;CAGhB;;;;;;;;;;;;CAaH,UAAiB,QAAgC;EAC/C,KAAK,SAAS;CAChB;;;;;;;;;;;;;CAcA,OAAc,SAAuB;EACnC,MAAM,eACJ,KAAK,sBAAsB,OACvB,IACA,KAAK,IAAI,GAAG,UAAU,KAAK,iBAAiB;EAClD,KAAK,oBAAoB;EAGzB,MAAM,SAAiC,cACrC,aAAa,KAAK,QAAQ,OAAO,GACjC,KAAK,OAAO,MACd;EACA,KAAK,aAAa;EAClB,IAAI,OAAuB,KAAK,aAC5B,UAAU,OAAO,MAAM,KAAK,QAAQ,IACpC,OAAO;EACX,IAAI,KAAK,WAAW,KAAA,GAAW;GAC7B,OAAO,KAAK,YAAY,MAAM,OAAO;GAKrC,IAAI,KAAK,YAAY,OAAO,UAAU,MAAM,KAAK,QAAQ;EAC3D;EACA,UACE,KAAK,QACL,MACA,KAAK,UACL,KAAK,WACL,KAAK,UACP;EACA,gBAAgB,KAAK,QAAQ,OAAO,UAAU;EAC9C,KAAK,OAAO,sBAAsB;GAChC;GACA;GACA;GACA,YAAY,OAAO;EACrB,CAAC;CACH;;;;;;;CAQA,YAAoB,MAAsB,SAAiC;EACzE,MAAM,MAA8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E;IAAO,OAAO,EAAE;GAAM;EACtE;EAEA,MAAM,SAAgC,KAAK,OAAO,KAC/C,MACC,QAAQ,IAAI,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,CAAC,IAAI,CACnD;EAIA,MAAM,UAAsC,IAAI,IAC9C,KAAK,OAAO,KACT,MAAkD,EAAE,IACvD,CACF;EACA,KAAK,MAAM,QAAQ,IAAI,QAAQ;GAC7B,IAAI,QAAQ,IAAI,IAAI,KAAK,CAAC,KAAK,QAAQ,IAAI,IAAI,GAAG;GAClD,MAAM,UAA+B,YAAY,MAAM,IAAI;GAC3D,IACE,QAAQ,YAAY,QACpB,QAAQ,cAAc,QACtB,QAAQ,UAAU,MAElB,OAAO,KAAK,OAAO;EACvB;EACA,OAAO;GAAE,UAAU,KAAK;GAAU,MAAM,KAAK;GAAM;EAAO;CAC5D;;CAGA,IAAW,iBAA8C;EACvD,OAAO,KAAK,YAAY,cAAc;CACxC;AACF"}
@@ -1,4 +1,4 @@
1
- import type { IAutoMovieSectionPlane } from "@automovie/engine";
1
+ import type { IAutoMovieSectionPlane } from "@automovie/interface";
2
2
  import type * as THREE from "three";
3
3
  import type { IAutoMovieSectionRenderer } from "./IAutoMovieSectionRenderer.js";
4
4
  /**
@@ -1,12 +1 @@
1
- /**
2
- * The minimum film-layer shape needed to decide beauty composition.
3
- *
4
- * @evidence contracts/development/design.md#principled-representation One scalar contribution lets the generic beauty resolver classify direct, fade and complementary dissolve decisions while preserving richer sampled-layer records.
5
- * @evidence contracts/development/design.md#minimal-and-owned-surface Composition admission depends only on weight, so this minimal interface avoids coupling the resolver to scenes, cameras or shot identifiers.
6
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Weights represent sampled display contributions for arbitrary film layers and carry no fixture-specific transition names.
7
- * @evidence contracts/development/common.md#meaningful-documentation The member documents the unit interval and application to source display bytes rather than linear scene radiance.
8
- */
9
- export interface IAutoMovieFilmBeautyLayer {
10
- /** Sampled contribution in `[0, 1]`, applied to source display bytes. */
11
- weight: number;
12
- }
1
+ export type { IAutoMovieFilmBeautyLayer } from "@automovie/interface";
@@ -1,22 +1 @@
1
- import type { IAutoMoviePose } from "@automovie/interface";
2
- /**
3
- * One cycle of a performed member's poses for the population layer to play:
4
- * the poses at even phases of one period, as a motion law displayed them
5
- * (`HumanPopulation.cycle` in the motions package), so a background member
6
- * plays the march the foreground members march instead of a generic gait.
7
- *
8
- * @evidence contracts/development/design.md#principled-representation A cycle as its even-phase canonical poses, its period and its stride, the three things a take is baked from.
9
- * @evidence contracts/development/design.md#minimal-and-owned-surface Read by `bakeFormationCycle` alone; the render gains no motion vocabulary, only a table of poses.
10
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The poses are given, never synthesised here.
11
- * @evidence contracts/development/common.md#meaningful-documentation States what the poses are, at which phases, and the units.
12
- */
13
- export interface IAutoMovieFormationPoseTake {
14
- /** The take's name, as a gait's: the name a population cue selects. */
15
- gait: string;
16
- /** Seconds of one cycle, positive. */
17
- periodSeconds: number;
18
- /** Metres the body travels in one cycle; measured from the lowest parts' tracks when absent. */
19
- strideMeters?: number;
20
- /** The poses at phases `i / poses.length`, i from 0, of one cycle. */
21
- poses: readonly IAutoMoviePose[];
22
- }
1
+ export type { IAutoMovieFormationPoseTake } from "@automovie/interface";
@@ -1,5 +1,4 @@
1
- import type { IAutoMovieRenderTextureResidency } from "@automovie/engine";
2
- import type { IAutoMovieTransform } from "@automovie/interface";
1
+ import type { IAutoMovieRenderTextureResidency, IAutoMovieTransform } from "@automovie/interface";
3
2
  import type * as THREE from "three";
4
3
  import type { IAutoMovieFormationViewerStats } from "./IAutoMovieFormationViewerStats.js";
5
4
  /**
@@ -1,15 +1 @@
1
- /**
2
- * An absolute rig transform in the parent frame, without scale. It can be
3
- * supplied directly by a deterministic rig evaluator to the Viewer adapter.
4
- *
5
- * @evidence contracts/development/design.md#principled-representation Uses metric translation and an x-y-z-w unit quaternion, the same translation/rotation rig convention as the engine; it carries no semantic joint angles or scaling.
6
- * @evidence contracts/development/design.md#minimal-and-owned-surface One structural value describes both a bone local and a model root, without depending on a particular rig generator.
7
- * @evidence contracts/development/design.md#prohibited-design-shortcuts No model, consumer or anatomical identity selects the representation.
8
- * @evidence contracts/development/common.md#meaningful-documentation States absolute parent-relative coordinates, units, quaternion order and the absence of scale.
9
- */
10
- export interface IAutoMovieRigLocalTransform {
11
- /** Translation in metres, expressed in the parent frame. */
12
- readonly translation: readonly [number, number, number];
13
- /** Unit quaternion in x-y-z-w order, expressed in the parent frame. */
14
- readonly rotation: readonly [number, number, number, number];
15
- }
1
+ export type { IAutoMovieRigLocalTransform } from "@automovie/interface";
@@ -1,4 +1,4 @@
1
- import type { ISpringStep } from "@automovie/engine";
1
+ import type { IAutoMovieSpringStep } from "@automovie/interface";
2
2
  /**
3
3
  * One axis's displayed angle and the solver state carried to the next frame.
4
4
  * Null keeps a never-authored, never-sprung axis absent; an existing spring may
@@ -15,5 +15,5 @@ export interface IAutoMovieSpringAxisSettlement {
15
15
  */
16
16
  angle: number | null;
17
17
  /** Axis value and velocity retained by this player's per-joint spring map. */
18
- next: ISpringStep;
18
+ next: IAutoMovieSpringStep;
19
19
  }
@@ -1,6 +1,5 @@
1
- import type { IAutoMovieModel } from "@automovie/interface";
1
+ import type { IAutoMovieFormationPoseTake, IAutoMovieModel } from "@automovie/interface";
2
2
  import type * as THREE from "three";
3
- import type { IAutoMovieFormationPoseTake } from "./IAutoMovieFormationPoseTake.js";
4
3
  import type { IAutoMovieModelObject } from "./IAutoMovieModelObject.js";
5
4
  /**
6
5
  * One figure's rest model and ordered rigid parts used to bake its repertoire.
@@ -1,6 +1,5 @@
1
- import type { AutoMovieHumanoidBone } from "@automovie/interface";
1
+ import type { AutoMovieHumanoidBone, IAutoMovieRigLocalTransform } from "@automovie/interface";
2
2
  import type { IAutoMovieModelObject } from "./IAutoMovieModelObject.js";
3
- import type { IAutoMovieRigLocalTransform } from "./IAutoMovieRigLocalTransform.js";
4
3
  /**
5
4
  * Display complete evaluator-produced bone locals, including translations
6
5
  * caused by omitted intermediate joints. Values are absolute parent-relative
@@ -1 +1 @@
1
- {"version":3,"file":"applyAutoMovieRigLocals.js","sourceRoot":"","sources":["../../src/scene/applyAutoMovieRigLocals.ts"],"names":[],"mappings":";;;AAKA,2FAAqF;AAErF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iCACE,MAA6B,EAC7B,MAAuE,EACvE,IAAiC;IAEjC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5B,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI;QACnC,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAC;IACJ,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QACvC,MAAM,KAAK,GAA4C,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxE,IAAI,KAAK,KAAK,SAAS;YACrB,MAAM,IAAI,KAAK,CAAC,gCAAgC,IAAI,GAAG,CAAC,CAAC;QAC3D,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,wEAAwE;IACxE,0EAA0E;IAC1E,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM;QAChC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAE,EAAE,KAAK,CAAC,CAAC;IAE7C,sEAAsE;IACtE,4EAA4E;IAC5E,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACrD,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACtC,IAAA,kEAA8B,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED;;;;;;;;;;GAU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C,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1B,MAAM,CAAC,YAAY,EAAE,CAAC;AACxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"applyAutoMovieRigLocals.mjs","names":[],"sources":["../../src/scene/applyAutoMovieRigLocals.ts"],"sourcesContent":["import type { AutoMovieHumanoidBone } from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\nimport type { IAutoMovieModelObject } from \"./IAutoMovieModelObject.js\";\nimport type { IAutoMovieRigLocalTransform } from \"./IAutoMovieRigLocalTransform.js\";\nimport { invalidateAutoMovieSkinnedPose } from \"./invalidateAutoMovieSkinnedPose.js\";\n\n/**\n * Display complete evaluator-produced bone locals, including translations\n * caused by omitted intermediate joints. Values are absolute parent-relative\n * transforms, rather than deltas from the build's rest pose. `root` places the\n * model in its parent's frame. Every written scale becomes one.\n *\n * The map must contain exactly the target's mapped bone slots. Before any\n * mutation, rejects missing or extra slots, nonfinite components, malformed\n * tuples and quaternions whose squared norm differs from one by over 1e-6.\n * An empty map is valid for a nonrigged target. No quaternion is normalized.\n *\n * Refreshes local and world matrices, including changed ancestors, and\n * invalidates skinned bounds and CPU pose caches. The caller owns semantic\n * evaluation, morph weights, imported-runtime flushing and rendering.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Validates the complete slot set and finite metric TR values before writing, preserves evaluator-provided translations and x-y-z-w unit quaternions, enforces unit rig scale, refreshes Three local/world matrices and invalidates the existing skin cache owner. Parent-frame locals must describe the target's actual hierarchy; the adapter does not retarget rigs or infer missing joints.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One adapter copies a generator-independent structural contract into a borrowed built/imported graph; pose mathematics, morph drivers and imported runtime hooks remain with their existing owners.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Every mapped bone takes the same path; missing slots and invalid rotations refuse before mutation instead of retaining stale bones or normalizing malformed data, and culling remains enabled.\n * @evidence contracts/development/common.md#meaningful-documentation Gives absolute local/root frames, units, tuple order, completeness, unit-scale policy, numerical tolerance, atomic validation, matrix/cache effects and caller-owned work.\n * @evidence contracts/development/implementation.md#efficient-algorithms Two O(B) map scans validate and write B mapped bones, followed by O(A+O) ancestor/subtree matrix work and O(O) skin invalidation for A ancestors and O model objects; no per-vertex deformation, per-bone temporary objects or retained arrays are allocated.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses existing Three bones, matrices and skin caches; each call rewrites the supplied pose because map identity does not prove mutable tuple contents unchanged.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows the target/map/root only until return and creates no retained state, GPU allocation, timer or task; skin invalidation releases stale bounds through its owner.\n */\nexport function applyAutoMovieRigLocals(\n target: IAutoMovieModelObject,\n locals: ReadonlyMap<AutoMovieHumanoidBone, IAutoMovieRigLocalTransform>,\n root: IAutoMovieRigLocalTransform,\n): void {\n validateLocal(root, \"root\");\n if (locals.size !== target.bones.size)\n throw new Error(\n \"Rig locals must contain exactly the target's mapped bones\",\n );\n for (const bone of target.bones.keys()) {\n const local: IAutoMovieRigLocalTransform | undefined = locals.get(bone);\n if (local === undefined)\n throw new Error(`Rig locals omit mapped bone \"${bone}\"`);\n validateLocal(local, bone);\n }\n\n // Parent-folded joint motion changes translations as well as rotations.\n // Explicit local updates also support a target with matrixAutoUpdate off.\n writeLocal(target.object, root);\n for (const [bone, local] of locals)\n writeLocal(target.bones.get(bone)!, local);\n\n // SkinnedMesh.updateMatrixWorld also refreshes bindMatrixInverse; the\n // similarly named Object3D.updateWorldMatrix does not invoke that override.\n target.object.parent?.updateWorldMatrix(true, false);\n target.object.updateMatrixWorld(true);\n invalidateAutoMovieSkinnedPose(target.object);\n}\n\n/**\n * Refuse a malformed local before the adapter begins mutating its target.\n *\n * Principled implementation: Checks exact tuple lengths, finite components and squared quaternion norm with a 1e-6 admission tolerance, preserving rather than normalizing admitted evaluator output.\n * Clear and simple design: Shares root and bone validation so one policy guards the complete update.\n * Prohibited implementation shortcuts: The same tolerance and checks apply to every slot, without fixture exceptions.\n * Meaningful documentation: States pre-mutation refusal; the public adapter documents frames and tolerance.\n * Efficient algorithms: Constant work over seven scalar components.\n * Reuse equivalent work: A mutable supplied transform requires fresh validation on each call.\n * Bound retention and release resources: Retains no values and allocates only an error when refusing.\n */\nfunction validateLocal(local: IAutoMovieRigLocalTransform, name: string): void {\n const t: IAutoMovieRigLocalTransform[\"translation\"] = local.translation;\n const q: IAutoMovieRigLocalTransform[\"rotation\"] = local.rotation;\n if (\n t.length !== 3 ||\n q.length !== 4 ||\n !Number.isFinite(t[0]) ||\n !Number.isFinite(t[1]) ||\n !Number.isFinite(t[2]) ||\n !Number.isFinite(q[0]) ||\n !Number.isFinite(q[1]) ||\n !Number.isFinite(q[2]) ||\n !Number.isFinite(q[3]) ||\n Math.abs(q[0] ** 2 + q[1] ** 2 + q[2] ** 2 + q[3] ** 2 - 1) > 1e-6\n )\n throw new Error(\n `Invalid rig local \"${name}\": expected finite metric TR and a unit quaternion`,\n );\n}\n\n/**\n * Copy absolute TR and unit scale, then refresh even a manual local matrix.\n *\n * Principled implementation: Writes tuple components through Three position/quaternion setters and updates its local matrix under the engine's unit rig-scale convention.\n * Clear and simple design: One write path serves roots and bones after complete validation.\n * Prohibited implementation shortcuts: Copies admitted values unchanged; no per-consumer offsets or scale compensations are applied.\n * Meaningful documentation: States the absolute write, scale and manual-matrix behavior.\n * Efficient algorithms: Constant scalar writes and one matrix composition.\n * Reuse equivalent work: Mutates existing Three vectors, quaternion and matrix without temporary allocation.\n * Bound retention and release resources: Retains no target or transform after return.\n */\nfunction writeLocal(\n target: THREE.Object3D,\n local: IAutoMovieRigLocalTransform,\n): void {\n target.position.set(...local.translation);\n target.quaternion.set(...local.rotation);\n target.scale.set(1, 1, 1);\n target.updateMatrix();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,wBACd,QAC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xB,OAAO,aAAa;AACtB"}
1
+ {"version":3,"file":"applyAutoMovieRigLocals.mjs","names":[],"sources":["../../src/scene/applyAutoMovieRigLocals.ts"],"sourcesContent":["import type {\n AutoMovieHumanoidBone,\n IAutoMovieRigLocalTransform,\n} from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\nimport type { IAutoMovieModelObject } from \"./IAutoMovieModelObject.js\";\nimport { invalidateAutoMovieSkinnedPose } from \"./invalidateAutoMovieSkinnedPose.js\";\n\n/**\n * Display complete evaluator-produced bone locals, including translations\n * caused by omitted intermediate joints. Values are absolute parent-relative\n * transforms, rather than deltas from the build's rest pose. `root` places the\n * model in its parent's frame. Every written scale becomes one.\n *\n * The map must contain exactly the target's mapped bone slots. Before any\n * mutation, rejects missing or extra slots, nonfinite components, malformed\n * tuples and quaternions whose squared norm differs from one by over 1e-6.\n * An empty map is valid for a nonrigged target. No quaternion is normalized.\n *\n * Refreshes local and world matrices, including changed ancestors, and\n * invalidates skinned bounds and CPU pose caches. The caller owns semantic\n * evaluation, morph weights, imported-runtime flushing and rendering.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Validates the complete slot set and finite metric TR values before writing, preserves evaluator-provided translations and x-y-z-w unit quaternions, enforces unit rig scale, refreshes Three local/world matrices and invalidates the existing skin cache owner. Parent-frame locals must describe the target's actual hierarchy; the adapter does not retarget rigs or infer missing joints.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One adapter copies a generator-independent structural contract into a borrowed built/imported graph; pose mathematics, morph drivers and imported runtime hooks remain with their existing owners.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Every mapped bone takes the same path; missing slots and invalid rotations refuse before mutation instead of retaining stale bones or normalizing malformed data, and culling remains enabled.\n * @evidence contracts/development/common.md#meaningful-documentation Gives absolute local/root frames, units, tuple order, completeness, unit-scale policy, numerical tolerance, atomic validation, matrix/cache effects and caller-owned work.\n * @evidence contracts/development/implementation.md#efficient-algorithms Two O(B) map scans validate and write B mapped bones, followed by O(A+O) ancestor/subtree matrix work and O(O) skin invalidation for A ancestors and O model objects; no per-vertex deformation, per-bone temporary objects or retained arrays are allocated.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses existing Three bones, matrices and skin caches; each call rewrites the supplied pose because map identity does not prove mutable tuple contents unchanged.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows the target/map/root only until return and creates no retained state, GPU allocation, timer or task; skin invalidation releases stale bounds through its owner.\n */\nexport function applyAutoMovieRigLocals(\n target: IAutoMovieModelObject,\n locals: ReadonlyMap<AutoMovieHumanoidBone, IAutoMovieRigLocalTransform>,\n root: IAutoMovieRigLocalTransform,\n): void {\n validateLocal(root, \"root\");\n if (locals.size !== target.bones.size)\n throw new Error(\n \"Rig locals must contain exactly the target's mapped bones\",\n );\n for (const bone of target.bones.keys()) {\n const local: IAutoMovieRigLocalTransform | undefined = locals.get(bone);\n if (local === undefined)\n throw new Error(`Rig locals omit mapped bone \"${bone}\"`);\n validateLocal(local, bone);\n }\n\n // Parent-folded joint motion changes translations as well as rotations.\n // Explicit local updates also support a target with matrixAutoUpdate off.\n writeLocal(target.object, root);\n for (const [bone, local] of locals)\n writeLocal(target.bones.get(bone)!, local);\n\n // SkinnedMesh.updateMatrixWorld also refreshes bindMatrixInverse; the\n // similarly named Object3D.updateWorldMatrix does not invoke that override.\n target.object.parent?.updateWorldMatrix(true, false);\n target.object.updateMatrixWorld(true);\n invalidateAutoMovieSkinnedPose(target.object);\n}\n\n/**\n * Refuse a malformed local before the adapter begins mutating its target.\n *\n * Principled implementation: Checks exact tuple lengths, finite components and squared quaternion norm with a 1e-6 admission tolerance, preserving rather than normalizing admitted evaluator output.\n * Clear and simple design: Shares root and bone validation so one policy guards the complete update.\n * Prohibited implementation shortcuts: The same tolerance and checks apply to every slot, without fixture exceptions.\n * Meaningful documentation: States pre-mutation refusal; the public adapter documents frames and tolerance.\n * Efficient algorithms: Constant work over seven scalar components.\n * Reuse equivalent work: A mutable supplied transform requires fresh validation on each call.\n * Bound retention and release resources: Retains no values and allocates only an error when refusing.\n */\nfunction validateLocal(local: IAutoMovieRigLocalTransform, name: string): void {\n const t: IAutoMovieRigLocalTransform[\"translation\"] = local.translation;\n const q: IAutoMovieRigLocalTransform[\"rotation\"] = local.rotation;\n if (\n t.length !== 3 ||\n q.length !== 4 ||\n !Number.isFinite(t[0]) ||\n !Number.isFinite(t[1]) ||\n !Number.isFinite(t[2]) ||\n !Number.isFinite(q[0]) ||\n !Number.isFinite(q[1]) ||\n !Number.isFinite(q[2]) ||\n !Number.isFinite(q[3]) ||\n Math.abs(q[0] ** 2 + q[1] ** 2 + q[2] ** 2 + q[3] ** 2 - 1) > 1e-6\n )\n throw new Error(\n `Invalid rig local \"${name}\": expected finite metric TR and a unit quaternion`,\n );\n}\n\n/**\n * Copy absolute TR and unit scale, then refresh even a manual local matrix.\n *\n * Principled implementation: Writes tuple components through Three position/quaternion setters and updates its local matrix under the engine's unit rig-scale convention.\n * Clear and simple design: One write path serves roots and bones after complete validation.\n * Prohibited implementation shortcuts: Copies admitted values unchanged; no per-consumer offsets or scale compensations are applied.\n * Meaningful documentation: States the absolute write, scale and manual-matrix behavior.\n * Efficient algorithms: Constant scalar writes and one matrix composition.\n * Reuse equivalent work: Mutates existing Three vectors, quaternion and matrix without temporary allocation.\n * Bound retention and release resources: Retains no target or transform after return.\n */\nfunction writeLocal(\n target: THREE.Object3D,\n local: IAutoMovieRigLocalTransform,\n): void {\n target.position.set(...local.translation);\n target.quaternion.set(...local.rotation);\n target.scale.set(1, 1, 1);\n target.updateMatrix();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAgB,wBACd,QACA,QACA,MACM;CACN,cAAc,MAAM,MAAM;CAC1B,IAAI,OAAO,SAAS,OAAO,MAAM,MAC/B,MAAM,IAAI,MACR,2DACF;CACF,KAAK,MAAM,QAAQ,OAAO,MAAM,KAAK,GAAG;EACtC,MAAM,QAAiD,OAAO,IAAI,IAAI;EACtE,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MAAM,gCAAgC,KAAK,EAAE;EACzD,cAAc,OAAO,IAAI;CAC3B;CAIA,WAAW,OAAO,QAAQ,IAAI;CAC9B,KAAK,MAAM,CAAC,MAAM,UAAU,QAC1B,WAAW,OAAO,MAAM,IAAI,IAAI,GAAI,KAAK;CAI3C,OAAO,OAAO,QAAQ,kBAAkB,MAAM,KAAK;CACnD,OAAO,OAAO,kBAAkB,IAAI;CACpC,+BAA+B,OAAO,MAAM;AAC9C;;;;;;;;;;;;AAaA,SAAS,cAAc,OAAoC,MAAoB;CAC7E,MAAM,IAAgD,MAAM;CAC5D,MAAM,IAA6C,MAAM;CACzD,IACE,EAAE,WAAW,KACb,EAAE,WAAW,KACb,CAAC,OAAO,SAAS,EAAE,EAAE,KACrB,CAAC,OAAO,SAAS,EAAE,EAAE,KACrB,CAAC,OAAO,SAAS,EAAE,EAAE,KACrB,CAAC,OAAO,SAAS,EAAE,EAAE,KACrB,CAAC,OAAO,SAAS,EAAE,EAAE,KACrB,CAAC,OAAO,SAAS,EAAE,EAAE,KACrB,CAAC,OAAO,SAAS,EAAE,EAAE,KACrB,KAAK,IAAI,EAAE,MAAM,IAAI,EAAE,MAAM,IAAI,EAAE,MAAM,IAAI,EAAE,MAAM,IAAI,CAAC,IAAI,MAE9D,MAAM,IAAI,MACR,sBAAsB,KAAK,mDAC7B;AACJ;;;;;;;;;;;;AAaA,SAAS,WACP,QACA,OACM;CACN,OAAO,SAAS,IAAI,GAAG,MAAM,WAAW;CACxC,OAAO,WAAW,IAAI,GAAG,MAAM,QAAQ;CACvC,OAAO,MAAM,IAAI,GAAG,GAAG,CAAC;CACxB,OAAO,aAAa;AACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"applyAutoMovieSectionPlanes.mjs","names":[],"sources":["../../src/scene/applyAutoMovieSectionPlanes.ts"],"sourcesContent":["import type { IAutoMovieSectionPlane } from \"@automovie/engine\";\nimport * as THREE from \"three\";\n\nimport type { IApplyAutoMovieSectionPlanesProps } from \"./IApplyAutoMovieSectionPlanesProps.js\";\n\n/**\n * Put an inspection-owned section on an already-built scene and return the same world-space planes assigned to its materials.\n *\n * Geometry and hierarchy remain unchanged while existing material clipping fields and the renderer switch are overwritten. Every encountered material slot receives the same plane array; prior arbitrary clipping policy is not saved for restoration.\n *\n * {@link IAutoMovieSectionPlane.normal} points toward the removed half-space. Negating and normalizing it through the same coplanar point expresses Three's retained positive-side convention. Ideal zero signed distance remains on the boundary; actual fragments depend on shader arithmetic and the material's alpha-to-coverage policy, so CPU plane agreement does not certify rendered boundary pixels.\n *\n * `clipIntersection` is written false so any clipping plane can remove a fragment, matching the Engine's intersection of retained half-spaces rather than preserving an incoming union policy.\n *\n * An empty list assigns null material planes and disables local clipping. This clears the applied policy rather than restoring an earlier arbitrary one, and no before-and-after pixel equality is established here.\n *\n * This operation sets needsUpdate only when a material's plane count changes; moving plane values still rebuilds the planes and traverses the subtree. Three owns program selection and compilation, including intersection-count changes, so one version update does not measure a compile count or a cost-free render.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Negates each authored removal-halfspace normal and normalizes it into a Three world-space plane through the same point; admitted normals must be finite/nonzero. clipIntersection=false applies every removal plane, while ideal zero-distance inclusion does not certify shader precision or alpha-to-coverage boundary pixels.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Assigns one shared plane array to existing materials and toggles renderer local clipping without replacing geometry/materials; this inspection owner replaces previous clipping policy rather than editing production assets.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses authored plane geometry uniformly with no object-name exceptions or replacement Three methods; renderer/material fields use supported clipping APIs and no solver geometry is manufactured for the cut.\n * @evidence contracts/development/common.md#meaningful-documentation Describes world-plane orientation, any-plane removal, ideal versus rendered boundaries, empty-list clearing and plane-count needsUpdate requests; prior policy restoration, pixel equality and actual compile counts are not claimed.\n * @evidence contracts/development/implementation.md#efficient-algorithms Builds P planes and traverses O scene objects plus all encountered material slots, assigning one shared array rather than cloning P planes per material; repeated shared materials may receive repeated inexpensive assignments.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work All material slots share the built planes for this call. Value-only movement can reuse a program when plane/intersection counts and other program inputs remain unchanged; Three controls that reuse, while current scene and plane values prevent a retained root-only result cache.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows root/renderer/materials and transfers P plane references to materials and the caller; next assignment/empty release removes those references, with no geometry/GPU allocation, observer or task owned here.\n */\nexport const applyAutoMovieSectionPlanes: (\n props: IApplyAutoMovieSectionPlanesProps,\n) => THREE.Plane[] = (\n props: IApplyAutoMovieSectionPlanesProps,\n): THREE.Plane[] => {\n const built: THREE.Plane[] = props.planes.map(\n (plane: IAutoMovieSectionPlane): THREE.Plane =>\n new THREE.Plane().setFromNormalAndCoplanarPoint(\n new THREE.Vector3(\n -plane.normal.x,\n -plane.normal.y,\n -plane.normal.z,\n ).normalize(),\n new THREE.Vector3(plane.point.x, plane.point.y, plane.point.z),\n ),\n );\n props.renderer.localClippingEnabled = built.length !== 0;\n const assigned: THREE.Plane[] | null = built.length === 0 ? null : built;\n props.root.traverse(\n (object: THREE.Object3D<THREE.Object3DEventMap>): void => {\n const holder: Partial<\n Pick<\n THREE.Mesh<\n THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n >,\n | THREE.Material<THREE.MaterialEventMap>\n | THREE.Material<THREE.MaterialEventMap>[],\n THREE.Object3DEventMap\n >,\n \"material\"\n >\n > = object as Partial<Pick<THREE.Mesh, \"material\">>;\n if (holder.material === undefined) return;\n for (const material of Array.isArray(holder.material)\n ? holder.material\n : [holder.material]) {\n if ((material.clippingPlanes?.length ?? 0) !== built.length)\n material.needsUpdate = true;\n material.clippingPlanes = assigned;\n material.clipIntersection = false;\n }\n },\n );\n return built;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,+BAGX,UACkB;CAClB,MAAM,QAAuB,MAAM,OAAO,KACvC,UACC,IAAI,MAAM,MAAM,CAAC,CAAC,8BAChB,IAAI,MAAM,QACR,CAAC,MAAM,OAAO,GACd,CAAC,MAAM,OAAO,GACd,CAAC,MAAM,OAAO,CAChB,CAAC,CAAC,UAAU,GACZ,IAAI,MAAM,QAAQ,MAAM,MAAM,GAAG,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,CAC/D,CACJ;CACA,MAAM,SAAS,uBAAuB,MAAM,WAAW;CACvD,MAAM,WAAiC,MAAM,WAAW,IAAI,OAAO;CACnE,MAAM,KAAK,UACR,WAAyD;EACxD,MAAM,SAaF;EACJ,IAAI,OAAO,aAAa,KAAA,GAAW;EACnC,KAAK,MAAM,YAAY,MAAM,QAAQ,OAAO,QAAQ,IAChD,OAAO,WACP,CAAC,OAAO,QAAQ,GAAG;GACrB,KAAK,SAAS,gBAAgB,UAAU,OAAO,MAAM,QACnD,SAAS,cAAc;GACzB,SAAS,iBAAiB;GAC1B,SAAS,mBAAmB;EAC9B;CACF,CACF;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"applyAutoMovieSectionPlanes.mjs","names":[],"sources":["../../src/scene/applyAutoMovieSectionPlanes.ts"],"sourcesContent":["import type { IAutoMovieSectionPlane } from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport type { IApplyAutoMovieSectionPlanesProps } from \"./IApplyAutoMovieSectionPlanesProps.js\";\n\n/**\n * Put an inspection-owned section on an already-built scene and return the same world-space planes assigned to its materials.\n *\n * Geometry and hierarchy remain unchanged while existing material clipping fields and the renderer switch are overwritten. Every encountered material slot receives the same plane array; prior arbitrary clipping policy is not saved for restoration.\n *\n * {@link IAutoMovieSectionPlane.normal} points toward the removed half-space. Negating and normalizing it through the same coplanar point expresses Three's retained positive-side convention. Ideal zero signed distance remains on the boundary; actual fragments depend on shader arithmetic and the material's alpha-to-coverage policy, so CPU plane agreement does not certify rendered boundary pixels.\n *\n * `clipIntersection` is written false so any clipping plane can remove a fragment, matching the Engine's intersection of retained half-spaces rather than preserving an incoming union policy.\n *\n * An empty list assigns null material planes and disables local clipping. This clears the applied policy rather than restoring an earlier arbitrary one, and no before-and-after pixel equality is established here.\n *\n * This operation sets needsUpdate only when a material's plane count changes; moving plane values still rebuilds the planes and traverses the subtree. Three owns program selection and compilation, including intersection-count changes, so one version update does not measure a compile count or a cost-free render.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Negates each authored removal-halfspace normal and normalizes it into a Three world-space plane through the same point; admitted normals must be finite/nonzero. clipIntersection=false applies every removal plane, while ideal zero-distance inclusion does not certify shader precision or alpha-to-coverage boundary pixels.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Assigns one shared plane array to existing materials and toggles renderer local clipping without replacing geometry/materials; this inspection owner replaces previous clipping policy rather than editing production assets.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses authored plane geometry uniformly with no object-name exceptions or replacement Three methods; renderer/material fields use supported clipping APIs and no solver geometry is manufactured for the cut.\n * @evidence contracts/development/common.md#meaningful-documentation Describes world-plane orientation, any-plane removal, ideal versus rendered boundaries, empty-list clearing and plane-count needsUpdate requests; prior policy restoration, pixel equality and actual compile counts are not claimed.\n * @evidence contracts/development/implementation.md#efficient-algorithms Builds P planes and traverses O scene objects plus all encountered material slots, assigning one shared array rather than cloning P planes per material; repeated shared materials may receive repeated inexpensive assignments.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work All material slots share the built planes for this call. Value-only movement can reuse a program when plane/intersection counts and other program inputs remain unchanged; Three controls that reuse, while current scene and plane values prevent a retained root-only result cache.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows root/renderer/materials and transfers P plane references to materials and the caller; next assignment/empty release removes those references, with no geometry/GPU allocation, observer or task owned here.\n */\nexport const applyAutoMovieSectionPlanes: (\n props: IApplyAutoMovieSectionPlanesProps,\n) => THREE.Plane[] = (\n props: IApplyAutoMovieSectionPlanesProps,\n): THREE.Plane[] => {\n const built: THREE.Plane[] = props.planes.map(\n (plane: IAutoMovieSectionPlane): THREE.Plane =>\n new THREE.Plane().setFromNormalAndCoplanarPoint(\n new THREE.Vector3(\n -plane.normal.x,\n -plane.normal.y,\n -plane.normal.z,\n ).normalize(),\n new THREE.Vector3(plane.point.x, plane.point.y, plane.point.z),\n ),\n );\n props.renderer.localClippingEnabled = built.length !== 0;\n const assigned: THREE.Plane[] | null = built.length === 0 ? null : built;\n props.root.traverse(\n (object: THREE.Object3D<THREE.Object3DEventMap>): void => {\n const holder: Partial<\n Pick<\n THREE.Mesh<\n THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n >,\n | THREE.Material<THREE.MaterialEventMap>\n | THREE.Material<THREE.MaterialEventMap>[],\n THREE.Object3DEventMap\n >,\n \"material\"\n >\n > = object as Partial<Pick<THREE.Mesh, \"material\">>;\n if (holder.material === undefined) return;\n for (const material of Array.isArray(holder.material)\n ? holder.material\n : [holder.material]) {\n if ((material.clippingPlanes?.length ?? 0) !== built.length)\n material.needsUpdate = true;\n material.clippingPlanes = assigned;\n material.clipIntersection = false;\n }\n },\n );\n return built;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,+BAGX,UACkB;CAClB,MAAM,QAAuB,MAAM,OAAO,KACvC,UACC,IAAI,MAAM,MAAM,CAAC,CAAC,8BAChB,IAAI,MAAM,QACR,CAAC,MAAM,OAAO,GACd,CAAC,MAAM,OAAO,GACd,CAAC,MAAM,OAAO,CAChB,CAAC,CAAC,UAAU,GACZ,IAAI,MAAM,QAAQ,MAAM,MAAM,GAAG,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,CAC/D,CACJ;CACA,MAAM,SAAS,uBAAuB,MAAM,WAAW;CACvD,MAAM,WAAiC,MAAM,WAAW,IAAI,OAAO;CACnE,MAAM,KAAK,UACR,WAAyD;EACxD,MAAM,SAaF;EACJ,IAAI,OAAO,aAAa,KAAA,GAAW;EACnC,KAAK,MAAM,YAAY,MAAM,QAAQ,OAAO,QAAQ,IAChD,OAAO,WACP,CAAC,OAAO,QAAQ,GAAG;GACrB,KAAK,SAAS,gBAAgB,UAAU,OAAO,MAAM,QACnD,SAAS,cAAc;GACzB,SAAS,iBAAiB;GAC1B,SAAS,mBAAmB;EAC9B;CACF,CACF;CACA,OAAO;AACT"}
@@ -1,4 +1,4 @@
1
- import type { IAutoMovieFormationCadenceSegment } from "@automovie/engine";
1
+ import type { IAutoMovieFormationCadenceSegment } from "@automovie/interface";
2
2
  import type { IAutoMovieFormationCadence } from "./IAutoMovieFormationCadence.js";
3
3
  import type { IAutoMovieFormationCycle } from "./IAutoMovieFormationCycle.js";
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"applyFormationCycleCadence.mjs","names":[],"sources":["../../src/scene/applyFormationCycleCadence.ts"],"sourcesContent":["import type { IAutoMovieFormationCadenceSegment } from \"@automovie/engine\";\n\nimport type { IAutoMovieFormationCadence } from \"./IAutoMovieFormationCadence.js\";\nimport type { IAutoMovieFormationCycle } from \"./IAutoMovieFormationCycle.js\";\nimport { formationCycleCadence } from \"./formationCycleCadence.js\";\n\n/**\n * Write one unit's current cadence into the cells its materials read.\n *\n * Cadence integration selects a take and absolute advance/turn, then writes\n * two float cells and one texture cell per tier without per-member mutation.\n * This describes cadence uniforms only; culling, instance transforms and draws\n * remain additional work, and final pixels also depend on host scene state.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Computes absolute cadence from the baked cycle and admitted segment sequence, assigns its active take/texture and advance/turn uniforms; metre travel and turn radius use the existing bake-derived stride heuristic rather than a general exact foot-contact solver.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps cadence integration in formationCycleCadence and only realizes the result into one tier's shared material cells, avoiding per-member mutable animation clocks.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses authored segments and the actual baked take table without fixture timestamps or accumulated-frame compensation; every call overwrites cadence cells from absolute inputs.\n * @evidence contracts/development/common.md#meaningful-documentation States take/absolute uniform writes and distinguishes this tier-local work from the crowd's remaining culling, transform and render costs.\n * @evidence contracts/development/implementation.md#efficient-algorithms Cadence integration visits the supplied segments and takes required by its selection logic, then assigns four fixed fields; no anonymous-member traversal or new instance buffer is performed here.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses the cycle's baked take textures and existing uniform cells across frames; changed segment motion/time requires fresh absolute integration and no prior-frame clock is cached.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows the cycle/segments and switches references among cycle-owned take textures without allocating another GPU texture or task; bake/runtime retirement still owns those textures.\n */\nexport const applyFormationCycleCadence: (\n cycle: IAutoMovieFormationCycle,\n segments: readonly IAutoMovieFormationCadenceSegment[],\n) => IAutoMovieFormationCadence = (\n cycle: IAutoMovieFormationCycle,\n segments: readonly IAutoMovieFormationCadenceSegment[],\n): IAutoMovieFormationCadence => {\n const cadence: IAutoMovieFormationCadence = formationCycleCadence(\n cycle,\n segments,\n );\n cycle.active = cadence.take;\n cycle.uniforms.automovieCycleTexture.value = cadence.take.texture;\n cycle.uniforms.automovieCycleAdvance.value = cadence.advance;\n cycle.uniforms.automovieCycleTurn.value = cadence.turn;\n return cadence;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,MAAa,8BAIX,OACA,aAC+B;CAC/B,MAAM,UAAsC,sBAC1C,OACA,QACF;CACA,MAAM,SAAS,QAAQ;CACvB,MAAM,SAAS,sBAAsB,QAAQ,QAAQ,KAAK;CAC1D,MAAM,SAAS,sBAAsB,QAAQ,QAAQ;CACrD,MAAM,SAAS,mBAAmB,QAAQ,QAAQ;CAClD,OAAO;AACT"}
1
+ {"version":3,"file":"applyFormationCycleCadence.mjs","names":[],"sources":["../../src/scene/applyFormationCycleCadence.ts"],"sourcesContent":["import type { IAutoMovieFormationCadenceSegment } from \"@automovie/interface\";\n\nimport type { IAutoMovieFormationCadence } from \"./IAutoMovieFormationCadence.js\";\nimport type { IAutoMovieFormationCycle } from \"./IAutoMovieFormationCycle.js\";\nimport { formationCycleCadence } from \"./formationCycleCadence.js\";\n\n/**\n * Write one unit's current cadence into the cells its materials read.\n *\n * Cadence integration selects a take and absolute advance/turn, then writes\n * two float cells and one texture cell per tier without per-member mutation.\n * This describes cadence uniforms only; culling, instance transforms and draws\n * remain additional work, and final pixels also depend on host scene state.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Computes absolute cadence from the baked cycle and admitted segment sequence, assigns its active take/texture and advance/turn uniforms; metre travel and turn radius use the existing bake-derived stride heuristic rather than a general exact foot-contact solver.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps cadence integration in formationCycleCadence and only realizes the result into one tier's shared material cells, avoiding per-member mutable animation clocks.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses authored segments and the actual baked take table without fixture timestamps or accumulated-frame compensation; every call overwrites cadence cells from absolute inputs.\n * @evidence contracts/development/common.md#meaningful-documentation States take/absolute uniform writes and distinguishes this tier-local work from the crowd's remaining culling, transform and render costs.\n * @evidence contracts/development/implementation.md#efficient-algorithms Cadence integration visits the supplied segments and takes required by its selection logic, then assigns four fixed fields; no anonymous-member traversal or new instance buffer is performed here.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses the cycle's baked take textures and existing uniform cells across frames; changed segment motion/time requires fresh absolute integration and no prior-frame clock is cached.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows the cycle/segments and switches references among cycle-owned take textures without allocating another GPU texture or task; bake/runtime retirement still owns those textures.\n */\nexport const applyFormationCycleCadence: (\n cycle: IAutoMovieFormationCycle,\n segments: readonly IAutoMovieFormationCadenceSegment[],\n) => IAutoMovieFormationCadence = (\n cycle: IAutoMovieFormationCycle,\n segments: readonly IAutoMovieFormationCadenceSegment[],\n): IAutoMovieFormationCadence => {\n const cadence: IAutoMovieFormationCadence = formationCycleCadence(\n cycle,\n segments,\n );\n cycle.active = cadence.take;\n cycle.uniforms.automovieCycleTexture.value = cadence.take.texture;\n cycle.uniforms.automovieCycleAdvance.value = cadence.advance;\n cycle.uniforms.automovieCycleTurn.value = cadence.turn;\n return cadence;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,MAAa,8BAIX,OACA,aAC+B;CAC/B,MAAM,UAAsC,sBAC1C,OACA,QACF;CACA,MAAM,SAAS,QAAQ;CACvB,MAAM,SAAS,sBAAsB,QAAQ,QAAQ,KAAK;CAC1D,MAAM,SAAS,sBAAsB,QAAQ,QAAQ;CACrD,MAAM,SAAS,mBAAmB,QAAQ,QAAQ;CAClD,OAAO;AACT"}
@@ -1,5 +1,4 @@
1
- import { IAutoMovieRestFrame } from "@automovie/engine";
2
- import { AutoMovieHumanoidBone, type IAutoMovieJointAxes, IAutoMoviePose, IAutoMovieSkeleton } from "@automovie/interface";
1
+ import { AutoMovieHumanoidBone, type IAutoMovieJointAxes, IAutoMoviePose, type IAutoMovieRestFrame, IAutoMovieSkeleton } from "@automovie/interface";
3
2
  import type { IAutoMovieModelObject } from "./IAutoMovieModelObject.js";
4
3
  /**
5
4
  * Apply a {@link IAutoMoviePose} to a built model by running the engine's
@@ -1 +1 @@
1
- {"version":3,"file":"applyPose.js","sourceRoot":"","sources":["../../src/scene/applyPose.ts"],"names":[],"mappings":";;;AAAA,8CAI2B;AAY3B,2DAAqD;AACrD,2FAAqF;AACrF,uEAAiE;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACI,MAAM,SAAS,GAMS,CAC7B,MAA6B,EAC7B,IAAoB,EACpB,QAA4B,EAC5B,SAAuE,EACvE,UAAwE,EAC/C,EAAE;IAC3B,MAAM,OAAO,GAA4B,EAAE,CAAC;IAC5C,KAAK,MAAM,CAAC,IAAI,IAAA,oBAAW,EAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,GAA+B,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAClE,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,C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AE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAC7E,MAAM,aAAa,GAIf;IACF,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IACjC,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IACpC,KAAK,EAAE,UAAU;CAClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"applyPose.mjs","names":[],"sources":["../../src/scene/applyPose.ts"],"sourcesContent":["import {\n IAutoMovieRestFrame,\n resolveMorphTargetWeights,\n resolvePose,\n} from \"@automovie/engine\";\nimport {\n AutoMovieHumanoidBone,\n type IAutoMovieJointAxes,\n IAutoMovieMeshMorphTarget,\n IAutoMoviePose,\n IAutoMovieSkeleton,\n IAutoMovieTransform,\n} from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\nimport type { IAutoMovieModelObject } from \"./IAutoMovieModelObject.js\";\nimport { applyTransform } from \"./applyTransform.js\";\nimport { invalidateAutoMovieSkinnedPose } from \"./invalidateAutoMovieSkinnedPose.js\";\nimport { morphTargetDriversOf } from \"./morphTargetDriversOf.js\";\n\n/**\n * Apply a {@link IAutoMoviePose} to a built model by running the engine's\n * forward kinematics and writing each bone's local rotation onto the\n * corresponding `THREE.Bone`. The pose's root transform (if any) is applied to\n * the model root.\n *\n * The engine owns the math (semantic angles → quaternions), so the viewer only\n * copies results onto `three.js` objects, keeping rendering a thin, swappable\n * layer over the deterministic core.\n *\n * `restFrames` optionally reads each joint angle as **clinical** and maps it\n * into the rig's rest-relative space before articulating (e.g. abduction 180\n * raises either arm overhead regardless of side); omit it to treat the pose's\n * angles as raw rig-space, the historical behaviour.\n *\n * Morph targets that `buildModel` recorded as pose-driven take the weights\n * `resolveMorphTargetWeights` computes from the same pose, so a corrective\n * follows every applied pose; expression-written targets are left alone.\n * Every skinned mesh then starts a new pose revision\n * ({@link invalidateAutoMovieSkinnedPose}), so its bounds and vertex queries\n * follow the pose the shader draws.\n *\n * Returns the skeleton bones the FK resolved but the model's bone map does not\n * carry (#1051). A deliberately partial imported map (a VRM without toes)\n * reports its unmapped bones every call: the host compares against what it\n * MEANT to map, so a typo in the bone map is distinguishable from an\n * intentional gap instead of both silently not articulating.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Delegates admitted semantic/clinical joint angles and skeleton/rest-axis conventions to engine forward kinematics, writes resolved local quaternions by humanoid bone id, writes engine-resolved driven morph weights by exact target name, then applies root translation/rotation with unit scale; unmapped bones are reported and null root resets to identity rather than retaining the last pose.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps pose and driver mathematics in resolvePose and resolveMorphTargetWeights and only copies their outputs into borrowed model bones, morph influences and root; caller-supplied partial bone mapping remains explicit instead of inventing missing joints.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Unit root scale is the engine rig convention, not a visual compensation; all mapped bones follow one FK result and missing bones are returned without fixture-specific tolerances or replaced solvers.\n * @evidence contracts/development/common.md#meaningful-documentation Gives local bone write, driven morph weights, optional clinical rest frames, unmapped-bone report, root reset and intentionally ignored root scale.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits the engine's resolved bone list once with map lookups and fixed quaternion writes, then traverses the model's O objects once to resolve each driven mesh's targets and once more to start the skinned meshes' pose revision in constant time each; dominant work is engine FK over the skeleton, with temporary resolved/skipped records proportional to bones rather than vertex count.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses the model's existing Bone objects and one engine FK implementation; different pose/skeleton/axes/rest frames require fresh resolution and target state is rewritten rather than cached.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows model/skeleton/pose and retains no solver or bone collection after return; skipped ids transfer to the caller and no GPU allocation or task is acquired.\n */\nexport const applyPose: (\n target: IAutoMovieModelObject,\n pose: IAutoMoviePose,\n skeleton: IAutoMovieSkeleton,\n jointAxes?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieJointAxes>>,\n restFrames?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieRestFrame>>,\n) => AutoMovieHumanoidBone[] = (\n target: IAutoMovieModelObject,\n pose: IAutoMoviePose,\n skeleton: IAutoMovieSkeleton,\n jointAxes?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieJointAxes>>,\n restFrames?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieRestFrame>>,\n): AutoMovieHumanoidBone[] => {\n const skipped: AutoMovieHumanoidBone[] = [];\n for (const r of resolvePose(pose, skeleton, jointAxes, restFrames)) {\n const bone: THREE.Object3D | undefined = target.bones.get(r.bone);\n if (bone === undefined) {\n skipped.push(r.bone);\n continue;\n }\n bone.quaternion.set(\n r.localRotation.x,\n r.localRotation.y,\n r.localRotation.z,\n r.localRotation.w,\n );\n }\n // Pose-driven morph targets follow the same pose, written beside the bones.\n target.object.traverse((object: THREE.Object3D): void => {\n const drivers:\n | readonly Pick<IAutoMovieMeshMorphTarget, \"name\" | \"driver\">[]\n | null = morphTargetDriversOf(object);\n const mesh: THREE.Mesh = object as THREE.Mesh;\n if (\n drivers === null ||\n mesh.morphTargetDictionary === undefined ||\n mesh.morphTargetInfluences === undefined\n )\n return;\n for (const [name, weight] of resolveMorphTargetWeights(drivers, pose)) {\n const index: number | undefined = mesh.morphTargetDictionary[name];\n if (index !== undefined) mesh.morphTargetInfluences[index] = weight;\n }\n });\n\n // Bones and correctives moved: skinned bounds and vertex queries take a new\n // pose revision, so culling, shadows and picking read this pose.\n invalidateAutoMovieSkinnedPose(target.object);\n\n // A null root means \"at the node's staged base\", the engine's convention\n // (`resolvePose`/`animatedBaseAt` default it to identity, #1046). Keeping\n // the previous pose's root here would strand the model at the LAST rooted\n // pose (e.g. a walk's destination) when a gesture clip with null roots\n // takes over. Root SCALE is dropped (#1052): the engine's FK ignores it,\n // so a rendered root scale would be invisible to every validator that\n // measured the pose. The rig convention is rotation + translation only.\n const root: IAutoMovieTransform = pose.root ?? IDENTITY_ROOT;\n applyTransform(target.object, { ...root, scale: UNIT_SCALE });\n return skipped;\n};\n\nconst UNIT_SCALE: { x: number; y: number; z: number } = { x: 1, y: 1, z: 1 };\nconst IDENTITY_ROOT: {\n translation: { x: number; y: number; z: number };\n rotation: { x: number; y: number; z: number; w: number };\n scale: { x: number; y: number; z: number };\n} = {\n translation: { x: 0, y: 0, z: 0 },\n rotation: { x: 0, y: 0, z: 0, w: 1 },\n scale: UNIT_SCALE,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,MAAa,aAOX,QACA,MACA,UACA,WACA,eAC4B;CAC5B,MAAM,UAAmC,CAAC;CAC1C,KAAK,MAAM,KAAK,YAAY,MAAM,UAAU,WAAW,UAAU,GAAG;EAClE,MAAM,OAAmC,OAAO,MAAM,IAAI,EAAE,IAAI;EAChE,IAAI,SAAS,KAAA,GAAW;GACtB,QAAQ,KAAK,EAAE,IAAI;GACnB;EACF;EACA,KAAK,WAAW,IACd,EAAE,cAAc,GAChB,EAAE,cAAc,GAChB,EAAE,cAAc,GAChB,EAAE,cAAc,CAClB;CACF;CAEA,OAAO,OAAO,UAAU,WAAiC;EACvD,MAAM,UAEK,qBAAqB,MAAM;EACtC,MAAM,OAAmB;EACzB,IACE,YAAY,QACZ,KAAK,0BAA0B,KAAA,KAC/B,KAAK,0BAA0B,KAAA,GAE/B;EACF,KAAK,MAAM,CAAC,MAAM,WAAW,0BAA0B,SAAS,IAAI,GAAG;GACrE,MAAM,QAA4B,KAAK,sBAAsB;GAC7D,IAAI,UAAU,KAAA,GAAW,KAAK,sBAAsB,SAAS;EAC/D;CACF,CAAC;CAID,+BAA+B,OAAO,MAAM;CAS5C,MAAM,OAA4B,KAAK,QAAQ;CAC/C,eAAe,OAAO,QAAQ;EAAE,GAAG;EAAM,OAAO;CAAW,CAAC;CAC5D,OAAO;AACT;AAEA,MAAM,aAAkD;CAAE,GAAG;CAAG,GAAG;CAAG,GAAG;AAAE;AAC3E,MAAM,gBAIF;CACF,aAAa;EAAE,GAAG;EAAG,GAAG;EAAG,GAAG;CAAE;CAChC,UAAU;EAAE,GAAG;EAAG,GAAG;EAAG,GAAG;EAAG,GAAG;CAAE;CACnC,OAAO;AACT"}
1
+ {"version":3,"file":"applyPose.mjs","names":[],"sources":["../../src/scene/applyPose.ts"],"sourcesContent":["import { resolveMorphTargetWeights, resolvePose } from \"@automovie/engine\";\nimport {\n AutoMovieHumanoidBone,\n type IAutoMovieJointAxes,\n IAutoMovieMeshMorphTarget,\n IAutoMoviePose,\n type IAutoMovieRestFrame,\n IAutoMovieSkeleton,\n IAutoMovieTransform,\n} from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\nimport type { IAutoMovieModelObject } from \"./IAutoMovieModelObject.js\";\nimport { applyTransform } from \"./applyTransform.js\";\nimport { invalidateAutoMovieSkinnedPose } from \"./invalidateAutoMovieSkinnedPose.js\";\nimport { morphTargetDriversOf } from \"./morphTargetDriversOf.js\";\n\n/**\n * Apply a {@link IAutoMoviePose} to a built model by running the engine's\n * forward kinematics and writing each bone's local rotation onto the\n * corresponding `THREE.Bone`. The pose's root transform (if any) is applied to\n * the model root.\n *\n * The engine owns the math (semantic angles → quaternions), so the viewer only\n * copies results onto `three.js` objects, keeping rendering a thin, swappable\n * layer over the deterministic core.\n *\n * `restFrames` optionally reads each joint angle as **clinical** and maps it\n * into the rig's rest-relative space before articulating (e.g. abduction 180\n * raises either arm overhead regardless of side); omit it to treat the pose's\n * angles as raw rig-space, the historical behaviour.\n *\n * Morph targets that `buildModel` recorded as pose-driven take the weights\n * `resolveMorphTargetWeights` computes from the same pose, so a corrective\n * follows every applied pose; expression-written targets are left alone.\n * Every skinned mesh then starts a new pose revision\n * ({@link invalidateAutoMovieSkinnedPose}), so its bounds and vertex queries\n * follow the pose the shader draws.\n *\n * Returns the skeleton bones the FK resolved but the model's bone map does not\n * carry (#1051). A deliberately partial imported map (a VRM without toes)\n * reports its unmapped bones every call: the host compares against what it\n * MEANT to map, so a typo in the bone map is distinguishable from an\n * intentional gap instead of both silently not articulating.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Delegates admitted semantic/clinical joint angles and skeleton/rest-axis conventions to engine forward kinematics, writes resolved local quaternions by humanoid bone id, writes engine-resolved driven morph weights by exact target name, then applies root translation/rotation with unit scale; unmapped bones are reported and null root resets to identity rather than retaining the last pose.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps pose and driver mathematics in resolvePose and resolveMorphTargetWeights and only copies their outputs into borrowed model bones, morph influences and root; caller-supplied partial bone mapping remains explicit instead of inventing missing joints.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Unit root scale is the engine rig convention, not a visual compensation; all mapped bones follow one FK result and missing bones are returned without fixture-specific tolerances or replaced solvers.\n * @evidence contracts/development/common.md#meaningful-documentation Gives local bone write, driven morph weights, optional clinical rest frames, unmapped-bone report, root reset and intentionally ignored root scale.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits the engine's resolved bone list once with map lookups and fixed quaternion writes, then traverses the model's O objects once to resolve each driven mesh's targets and once more to start the skinned meshes' pose revision in constant time each; dominant work is engine FK over the skeleton, with temporary resolved/skipped records proportional to bones rather than vertex count.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses the model's existing Bone objects and one engine FK implementation; different pose/skeleton/axes/rest frames require fresh resolution and target state is rewritten rather than cached.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows model/skeleton/pose and retains no solver or bone collection after return; skipped ids transfer to the caller and no GPU allocation or task is acquired.\n */\nexport const applyPose: (\n target: IAutoMovieModelObject,\n pose: IAutoMoviePose,\n skeleton: IAutoMovieSkeleton,\n jointAxes?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieJointAxes>>,\n restFrames?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieRestFrame>>,\n) => AutoMovieHumanoidBone[] = (\n target: IAutoMovieModelObject,\n pose: IAutoMoviePose,\n skeleton: IAutoMovieSkeleton,\n jointAxes?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieJointAxes>>,\n restFrames?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieRestFrame>>,\n): AutoMovieHumanoidBone[] => {\n const skipped: AutoMovieHumanoidBone[] = [];\n for (const r of resolvePose(pose, skeleton, jointAxes, restFrames)) {\n const bone: THREE.Object3D | undefined = target.bones.get(r.bone);\n if (bone === undefined) {\n skipped.push(r.bone);\n continue;\n }\n bone.quaternion.set(\n r.localRotation.x,\n r.localRotation.y,\n r.localRotation.z,\n r.localRotation.w,\n );\n }\n // Pose-driven morph targets follow the same pose, written beside the bones.\n target.object.traverse((object: THREE.Object3D): void => {\n const drivers:\n | readonly Pick<IAutoMovieMeshMorphTarget, \"name\" | \"driver\">[]\n | null = morphTargetDriversOf(object);\n const mesh: THREE.Mesh = object as THREE.Mesh;\n if (\n drivers === null ||\n mesh.morphTargetDictionary === undefined ||\n mesh.morphTargetInfluences === undefined\n )\n return;\n for (const [name, weight] of resolveMorphTargetWeights(drivers, pose)) {\n const index: number | undefined = mesh.morphTargetDictionary[name];\n if (index !== undefined) mesh.morphTargetInfluences[index] = weight;\n }\n });\n\n // Bones and correctives moved: skinned bounds and vertex queries take a new\n // pose revision, so culling, shadows and picking read this pose.\n invalidateAutoMovieSkinnedPose(target.object);\n\n // A null root means \"at the node's staged base\", the engine's convention\n // (`resolvePose`/`animatedBaseAt` default it to identity, #1046). Keeping\n // the previous pose's root here would strand the model at the LAST rooted\n // pose (e.g. a walk's destination) when a gesture clip with null roots\n // takes over. Root SCALE is dropped (#1052): the engine's FK ignores it,\n // so a rendered root scale would be invisible to every validator that\n // measured the pose. The rig convention is rotation + translation only.\n const root: IAutoMovieTransform = pose.root ?? IDENTITY_ROOT;\n applyTransform(target.object, { ...root, scale: UNIT_SCALE });\n return skipped;\n};\n\nconst UNIT_SCALE: { x: number; y: number; z: number } = { x: 1, y: 1, z: 1 };\nconst IDENTITY_ROOT: {\n translation: { x: number; y: number; z: number };\n rotation: { x: number; y: number; z: number; w: number };\n scale: { x: number; y: number; z: number };\n} = {\n translation: { x: 0, y: 0, z: 0 },\n rotation: { x: 0, y: 0, z: 0, w: 1 },\n scale: UNIT_SCALE,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,MAAa,aAOX,QACA,MACA,UACA,WACA,eAC4B;CAC5B,MAAM,UAAmC,CAAC;CAC1C,KAAK,MAAM,KAAK,YAAY,MAAM,UAAU,WAAW,UAAU,GAAG;EAClE,MAAM,OAAmC,OAAO,MAAM,IAAI,EAAE,IAAI;EAChE,IAAI,SAAS,KAAA,GAAW;GACtB,QAAQ,KAAK,EAAE,IAAI;GACnB;EACF;EACA,KAAK,WAAW,IACd,EAAE,cAAc,GAChB,EAAE,cAAc,GAChB,EAAE,cAAc,GAChB,EAAE,cAAc,CAClB;CACF;CAEA,OAAO,OAAO,UAAU,WAAiC;EACvD,MAAM,UAEK,qBAAqB,MAAM;EACtC,MAAM,OAAmB;EACzB,IACE,YAAY,QACZ,KAAK,0BAA0B,KAAA,KAC/B,KAAK,0BAA0B,KAAA,GAE/B;EACF,KAAK,MAAM,CAAC,MAAM,WAAW,0BAA0B,SAAS,IAAI,GAAG;GACrE,MAAM,QAA4B,KAAK,sBAAsB;GAC7D,IAAI,UAAU,KAAA,GAAW,KAAK,sBAAsB,SAAS;EAC/D;CACF,CAAC;CAID,+BAA+B,OAAO,MAAM;CAS5C,MAAM,OAA4B,KAAK,QAAQ;CAC/C,eAAe,OAAO,QAAQ;EAAE,GAAG;EAAM,OAAO;CAAW,CAAC;CAC5D,OAAO;AACT;AAEA,MAAM,aAAkD;CAAE,GAAG;CAAG,GAAG;CAAG,GAAG;AAAE;AAC3E,MAAM,gBAIF;CACF,aAAa;EAAE,GAAG;EAAG,GAAG;EAAG,GAAG;CAAE;CAChC,UAAU;EAAE,GAAG;EAA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CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;QACjE,OAAO,EAAE,IAAA,kEAA8B,EAAC,GAAS,EAAE;YACjD,IAAA,0EAAkC,EAAC,KAAK,EAAE;gBACxC,GAAG,EAAE,GAAS,EAAE;oBACd,IAAA,oEAA+B,EAAC;wBAC9B,MAAM,CAAC,OAAO;wBACd,kBAAkB;wBAClB,UAAU;wBACV,kBAAkB;qBACnB,CAAC,CAAC;gBACL,CAAC;aACF,CAAC,CAAC;QACL,CAAC,CAAC;KACH,CAAC;AACJ,CAAC,CAAC;AApGW,QAAA,eAAe,GAAf,eAAe,CAoG1B;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,GAAuC,CACrD,KAAkB,EACJ,EAAE;IAChB,MAAM,GAAG,GAAqC,KAAK,CAAC,GAAG,CAAC;IACxD,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC;IACjB,OAAO,GAAS,EAAE;QAChB,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAuC,CAC7D,KAAkB,EACJ,EAAE;IAChB,MAAM,WAAW,GACf,KAAK,CAAC,WAAW,CAAC;IACpB,MAAM,UAAU,GAGL,KAAK,CAAC,UAAU,CAAC;IAC5B,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,UAAU,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7C,OAAO,GAAS,EAAE;QAChB,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;QAChC,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"applyRenderMode.mjs","names":[],"sources":["../../src/scene/applyRenderMode.ts"],"sourcesContent":["import type { AutoMovieGuidePass } from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport { DEPTH_NORMALIZATION_RANGE } from \"./DEPTH_NORMALIZATION_RANGE.js\";\nimport { EDGE_WIDTH } from \"./EDGE_WIDTH.js\";\nimport type { IAutoMovieRenderModeHandle } from \"./IAutoMovieRenderModeHandle.js\";\nimport { applyDepthMode } from \"./applyDepthMode.js\";\nimport { applyEdgeMode } from \"./applyEdgeMode.js\";\nimport { applyMaskMode } from \"./applyMaskMode.js\";\nimport { applyPoseMode } from \"./applyPoseMode.js\";\nimport { applySemanticMaskMode } from \"./applySemanticMaskMode.js\";\nimport { guardAutoMovieRenderModeRetirement } from \"./guardAutoMovieRenderModeRetirement.js\";\nimport { overrideAutoMovieRenderModeMaterials } from \"./overrideAutoMovieRenderModeMaterials.js\";\nimport { restoreAutoMovieRenderModeOnce } from \"./restoreAutoMovieRenderModeOnce.js\";\nimport { restoreAutoMovieRenderModeState } from \"./restoreAutoMovieRenderModeState.js\";\nimport {\n type IAutoMovieSemanticMaskBinding,\n autoMovieSemanticMaskOf,\n} from \"./semanticMask/index.js\";\n\n/** A renderable that is NOT a mesh: a line/grid/helper, points, or a sprite. */\nconst isNonMeshRenderable: (object: THREE.Object3D) => boolean = (\n object: THREE.Object3D,\n): boolean =>\n (object as THREE.Line).isLine === true ||\n (object as THREE.Points).isPoints === true ||\n (object as THREE.Sprite).isSprite === true;\n\n/**\n * Hide every currently-visible non-mesh renderable in the scene (grids and\n * other `LineSegments`/`Line` helpers, `Points`, `Sprite`s) and return a\n * restore that makes them visible again. A structural guide pass segments only\n * the subject MESH geometry, so any non-mesh renderable left visible would draw\n * its live beauty material over the pass's black background: a grid reading as\n * \"very close\" in the depth pass, a non-palette color in the mask, a stray line\n * beside the skeleton in the pose pass (#1226). Hidden BEFORE a pass builds its\n * own overlay (the pose skeleton is itself `LineSegments`), so that overlay,\n * added afterward, stays visible.\n */\nconst hideNonMeshRenderables: (scene: THREE.Scene) => () => void = (\n scene: THREE.Scene,\n): (() => void) => {\n const hidden: THREE.Object3D[] = [];\n scene.traverse((object: THREE.Object3D<THREE.Object3DEventMap>): void => {\n if (isNonMeshRenderable(object) && object.visible) {\n object.visible = false;\n hidden.push(object);\n }\n });\n return (): void => {\n for (const object of hidden) object.visible = true;\n };\n};\n\n/**\n * Apply one diffusion-guide render mode to a built scene, returning the restore\n * handle. A capture applies the override at snapshot time and reverses it right\n * after, so the viewer stays a thin projection of the engine result. A caller\n * that keeps an override across frames calls the handle's `update` before\n * drawing each one, which `outline` and `pose` supply because they hold copies\n * the scene's animation does not move:\n *\n * - `beauty`: no override (the ordinary shaded render).\n * - `depth`: meshes use clamp(1-viewZ/range,0,1) with camera-space depth and a shared {@link DEPTH_NORMALIZATION_RANGE}, independent of near/far normalization. Camera changes can change a world point's viewZ; black is the far-range/background convention.\n * - `mask`: the segmentation pass. A scene handed its palette by\n * {@link attachAutoMovieSemanticMask} is painted by\n * {@link applyAutoMovieSemanticMask}, so every colour is the one that entity's\n * own semantic id earned and survives a rebuild in a different order. A scene\n * handed none keeps the legacy ramp, where each top-level child gets a flat\n * unlit colour by its index: readable as coverage and silhouette, never as\n * identity, because inserting one node repaints everything after it.\n * - `normal`: every mesh swapped to `MeshNormalMaterial`: the unlit\n * surface-normal conditioning pass (#1166).\n * - `outline`: black fills plus inverted-hull back-face shells extruded by {@link EDGE_WIDTH} in model space, leaving white contours on black. Object/instance scaling and camera projection affect world thickness and screen line weight.\n * - `pose`: meshes hidden, and a line-segment overlay of every bone→child bone\n * connection drawn over a black background: the skeleton pose pass.\n *\n * Every pass that swaps a material carries a formation's baked cycle onto the\n * replacement, so a marching crowd marches in `depth`, `normal`, `mask` and\n * `outline` exactly as it does in `beauty`. `pose` is the standing exception:\n * an anonymous member has no bones in the scene for the overlay to draw, which\n * is the same gap it had before the crowd could move at all.\n *\n * An unknown mode is a caller bug and throws.\n * Active or failed scene retirement refuses every mode before setup, including\n * beauty. Failed restoration retains its complete owner callback and cause;\n * nested owned cleanup still runs independently beneath the active boundary.\n *\n * Direct embedders can override depthRange and edgeWidth. The bundled __afPass capture path uses the defaults, keeping the camera-space depth normalization consistent while preserving differences caused by camera pose. Depth beyond the default range clamps to black; changing that range requires a direct call.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Selects the requested supported guide projection, excludes existing nonmesh beauty renderables, suspends fog/image lighting and returns a reversible handle; uses attached semantic masks when present and documented positional fallback otherwise. Depth/edge numeric options remain caller premises and anonymous instanced members have no bone graph for the pose overlay.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure This boundary owns temporary scene atmosphere/helper suspension and mode dispatch; each builder owns its pass resources and the shared restore coordinator attempts independent release without hiding failure.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Resolves an unknown mode before mutation and restores boundary suspensions if its builder throws; default range/width and legacy mask are explicit supported conventions, not fixture branches or substitute foreign methods. Builder-internal partial mutations are not automatically undone by boundary suspension cleanup.\n * @evidence contracts/development/common.md#meaningful-documentation Explains all six modes, semantic/legacy mask distinction, frame-independent depth default, outline extrusion, pose population gap, caller options and the returned restoration obligation.\n * @evidence contracts/development/implementation.md#efficient-algorithms Structural installation traverses scene helpers plus builder mesh/bone populations; the generic override allocates per mesh, legacy masks/shells share by their declared child/cycle keys, and pose/outline overlays scale with the subject graph. Healthy beauty returns a constant no-op handle.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Uses the same mode builders for embedded/capture paths and builder-local equivalent materials; independent installs require separate original-state snapshots, so no scene/mode-only cached restoration is shared.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Three boundary callbacks retain helper visibility, fog and environment/background snapshots; builders nest their own background transitions and own pass resources. Failed returned-handle restoration retains the complete boundary callback and cause under the scene guard. Builder throw still independently restores boundary snapshots with its primary error, while partial acquisition depends on that builder's rollback capability.\n */\nexport const applyRenderMode: (\n scene: THREE.Scene,\n mode: AutoMovieGuidePass,\n options?: { depthRange?: number; edgeWidth?: number },\n) => IAutoMovieRenderModeHandle = (\n scene: THREE.Scene,\n mode: AutoMovieGuidePass,\n options?: {\n /**\n * Metric range (m) the depth pass normalizes onto. Defaults to\n * {@link DEPTH_NORMALIZATION_RANGE} (20). Direct callers only: the capture\n * path keeps the scene-stable default (see above).\n */\n depthRange?: number;\n\n /**\n * Model-space normal extrusion for the outline pass; defaults to {@link EDGE_WIDTH} (0.02). Object/instance scale changes its world thickness; the capture path keeps the default.\n */\n edgeWidth?: number;\n },\n): IAutoMovieRenderModeHandle => {\n guardAutoMovieRenderModeRetirement(scene);\n if (mode === \"beauty\")\n return { mode, semantic: null, restore: (): void => {} };\n // Resolve (and validate) the structural pass builder BEFORE touching the\n // scene, so an unknown mode throws without leaving anything hidden.\n const build: () => IAutoMovieRenderModeHandle =\n ((): (() => IAutoMovieRenderModeHandle) => {\n switch (mode) {\n case \"depth\":\n return (): IAutoMovieRenderModeHandle =>\n applyDepthMode(\n scene,\n options?.depthRange ?? DEPTH_NORMALIZATION_RANGE,\n );\n case \"normal\":\n return (): IAutoMovieRenderModeHandle =>\n overrideAutoMovieRenderModeMaterials(\n scene,\n mode,\n (): THREE.MeshNormalMaterial => new THREE.MeshNormalMaterial(),\n );\n case \"outline\":\n return (): IAutoMovieRenderModeHandle =>\n applyEdgeMode(scene, options?.edgeWidth ?? EDGE_WIDTH);\n case \"mask\": {\n const semantic: IAutoMovieSemanticMaskBinding | null =\n autoMovieSemanticMaskOf(scene);\n return semantic === null\n ? (): IAutoMovieRenderModeHandle => applyMaskMode(scene)\n : (): IAutoMovieRenderModeHandle =>\n applySemanticMaskMode(scene, semantic);\n }\n case \"pose\":\n return (): IAutoMovieRenderModeHandle => applyPoseMode(scene);\n default:\n throw new Error(`unknown render mode \"${String(mode)}\"`);\n }\n })();\n // A structural pass renders only the subject mesh geometry: hide every\n // non-mesh renderable first (#1226), suspend the scene's atmosphere and\n // image lighting, then build the pass (whose own overlay, if any, is added\n // afterward and stays visible). Restore reverses these three suspensions and\n // the pass builder's own resources and background transition.\n const restoreRenderables: () => void = hideNonMeshRenderables(scene);\n const restoreFog: () => void = suspendFog(scene);\n const restoreEnvironment: () => void = suspendEnvironment(scene);\n // A builder that throws returns no handle, so the three suspensions above\n // would have no way back and the scene would keep drawing on black with its\n // atmosphere off for the rest of the session. The semantic mask pass is the\n // first builder that CAN throw (a palette whose design names more staged\n // nodes than the scene holds refuses rather than resolving positionally\n // against the wrong objects), and undoing them here keeps that a refusal\n // instead of a refusal plus a broken scene.\n let handle: IAutoMovieRenderModeHandle;\n try {\n handle = build();\n } catch (error) {\n restoreAutoMovieRenderModeState(\n [restoreEnvironment, restoreFog, restoreRenderables],\n { error },\n );\n }\n return {\n mode,\n semantic: handle.semantic,\n ...(handle.update === undefined ? {} : { update: handle.update }),\n restore: restoreAutoMovieRenderModeOnce((): void => {\n guardAutoMovieRenderModeRetirement(scene, {\n run: (): void => {\n restoreAutoMovieRenderModeState([\n handle.restore,\n restoreEnvironment,\n restoreFog,\n restoreRenderables,\n ]);\n },\n });\n }),\n };\n};\n\n/**\n * Take the scene's fog off for the duration of a structural pass, and put it\n * back exactly as it was.\n *\n * A guide pass states a geometric fact, and fog is not one: `three.js` fogs any\n * material whose shader carries the chunks, which is every `MeshBasicMaterial`\n * the mask and outline passes install. Left on, an atmosphere would mix the\n * mask's flat palette color toward the fog color with distance, so a\n * segmentation consumer would read a far node as a different node than the same\n * node near, and the outline pass's black fill would lighten until the white\n * contour stopped being a contour. The depth and edge passes escape only by\n * accident, their `ShaderMaterial`s never include the fog chunks; relying on\n * that accident is how the next pass written in `MeshBasicMaterial` inherits\n * the bug.\n *\n * The beauty pass is deliberately NOT covered: that one IS the film, and it\n * must carry the atmosphere the scene declares.\n */\nconst suspendFog: (scene: THREE.Scene) => () => void = (\n scene: THREE.Scene,\n): (() => void) => {\n const fog: THREE.Fog | THREE.FogExp2 | null = scene.fog;\n scene.fog = null;\n return (): void => {\n scene.fog = fog;\n };\n};\n\n/**\n * Remove image lighting and its background while a structural pass renders.\n *\n * Normal materials ignore the environment as a light source but would still\n * render its background. The other structural builders currently install a\n * black background themselves; central suspension makes that invariant belong\n * to the pass boundary instead of to each material implementation.\n */\nconst suspendEnvironment: (scene: THREE.Scene) => () => void = (\n scene: THREE.Scene,\n): (() => void) => {\n const environment: THREE.Texture<unknown, THREE.TextureEventMap> | null =\n scene.environment;\n const background:\n | THREE.Color\n | THREE.Texture<unknown, THREE.TextureEventMap>\n | null = scene.background;\n scene.environment = null;\n scene.background = new THREE.Color(0x000000);\n return (): void => {\n scene.environment = environment;\n scene.background = background;\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAM,uBACJ,WAEC,OAAsB,WAAW,QACjC,OAAwB,aAAa,QACrC,OAAwB,aAAa;;;;;;;;;;;;AAaxC,MAAM,0BACJ,UACiB;CACjB,MAAM,SAA2B,CAAC;CAClC,MAAM,UAAU,WAAyD;EACvE,IAAI,oBAAoB,MAAM,KAAK,OAAO,SAAS;GACjD,OAAO,UAAU;GACjB,OAAO,KAAK,MAAM;EACpB;CACF,CAAC;CACD,aAAmB;EACjB,KAAK,MAAM,UAAU,QAAQ,OAAO,UAAU;CAChD;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,mBAKX,OACA,MACA,YAa+B;CAC/B,mCAAmC,KAAK;CACxC,IAAI,SAAS,UACX,OAAO;EAAE;EAAM,UAAU;EAAM,eAAqB,CAAC;CAAE;CAGzD,MAAM,eACuC;EACzC,QAAQ,MAAR;GACE,KAAK,SACH,aACE,eACE,OACA,SAAS,cAAA,EACX;GACJ,KAAK,UACH,aACE,qCACE,OACA,YACgC,IAAI,MAAM,mBAAmB,CAC/D;GACJ,KAAK,WACH,aACE,cAAc,OAAO,SAAS,aAAA,GAAuB;GACzD,KAAK,QAAQ;IACX,MAAM,WACJ,wBAAwB,KAAK;IAC/B,OAAO,aAAa,aACkB,cAAc,KAAK,UAEnD,sBAAsB,OAAO,QAAQ;GAC7C;GACA,KAAK,QACH,aAAyC,cAAc,KAAK;GAC9D,SACE,MAAM,IAAI,MAAM,wBAAwB,OAAO,IAAI,EAAE,EAAE;EAC3D;CACF,EAAA,CAAG;CAML,MAAM,qBAAiC,uBAAuB,KAAK;CACnE,MAAM,aAAyB,WAAW,KAAK;CAC/C,MAAM,qBAAiC,mBAAmB,KAAK;CAQ/D,IAAI;CACJ,IAAI;EACF,SAAS,MAAM;CACjB,SAAS,OAAO;EACd,gCACE;GAAC;GAAoB;GAAY;EAAkB,GACnD,EAAE,MAAM,CACV;CACF;CACA,OAAO;EACL;EACA,UAAU,OAAO;EACjB,GAAI,OAAO,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,QAAQ,OAAO,OAAO;EAC/D,SAAS,qCAA2C;GAClD,mCAAmC,OAAO,EACxC,WAAiB;IACf,gCAAgC;KAC9B,OAAO;KACP;KACA;KACA;IACF,CAAC;GACH,EACF,CAAC;EACH,CAAC;CACH;AACF;;;;;;;;;;;;;;;;;;;AAoBA,MAAM,cACJ,UACiB;CACjB,MAAM,MAAwC,MAAM;CACpD,MAAM,MAAM;CACZ,aAAmB;EACjB,MAAM,MAAM;CACd;AACF;;;;;;;;;AAUA,MAAM,sBACJ,UACiB;CACjB,MAAM,cACJ,MAAM;CACR,MAAM,aAGK,MAAM;CACjB,MAAM,cAAc;CACpB,MAAM,aAAa,IAAI,MAAM,MAAM,CAAQ;CAC3C,aAAmB;EACjB,MAAM,cAAc;EACpB,MAAM,aAAa;CACrB;AACF"}
1
+ {"version":3,"file":"applyRenderMode.mjs","names":[],"sources":["../../src/scene/applyRenderMode.ts"],"sourcesContent":["import type {\n AutoMovieGuidePass,\n IAutoMovieSemanticMaskBinding,\n} from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport { DEPTH_NORMALIZATION_RANGE } from \"./DEPTH_NORMALIZATION_RANGE.js\";\nimport { EDGE_WIDTH } from \"./EDGE_WIDTH.js\";\nimport type { IAutoMovieRenderModeHandle } from \"./IAutoMovieRenderModeHandle.js\";\nimport { applyDepthMode } from \"./applyDepthMode.js\";\nimport { applyEdgeMode } from \"./applyEdgeMode.js\";\nimport { applyMaskMode } from \"./applyMaskMode.js\";\nimport { applyPoseMode } from \"./applyPoseMode.js\";\nimport { applySemanticMaskMode } from \"./applySemanticMaskMode.js\";\nimport { guardAutoMovieRenderModeRetirement } from \"./guardAutoMovieRenderModeRetirement.js\";\nimport { overrideAutoMovieRenderModeMaterials } from \"./overrideAutoMovieRenderModeMaterials.js\";\nimport { restoreAutoMovieRenderModeOnce } from \"./restoreAutoMovieRenderModeOnce.js\";\nimport { restoreAutoMovieRenderModeState } from \"./restoreAutoMovieRenderModeState.js\";\nimport { autoMovieSemanticMaskOf } from \"./semanticMask/index.js\";\n\n/** A renderable that is NOT a mesh: a line/grid/helper, points, or a sprite. */\nconst isNonMeshRenderable: (object: THREE.Object3D) => boolean = (\n object: THREE.Object3D,\n): boolean =>\n (object as THREE.Line).isLine === true ||\n (object as THREE.Points).isPoints === true ||\n (object as THREE.Sprite).isSprite === true;\n\n/**\n * Hide every currently-visible non-mesh renderable in the scene (grids and\n * other `LineSegments`/`Line` helpers, `Points`, `Sprite`s) and return a\n * restore that makes them visible again. A structural guide pass segments only\n * the subject MESH geometry, so any non-mesh renderable left visible would draw\n * its live beauty material over the pass's black background: a grid reading as\n * \"very close\" in the depth pass, a non-palette color in the mask, a stray line\n * beside the skeleton in the pose pass (#1226). Hidden BEFORE a pass builds its\n * own overlay (the pose skeleton is itself `LineSegments`), so that overlay,\n * added afterward, stays visible.\n */\nconst hideNonMeshRenderables: (scene: THREE.Scene) => () => void = (\n scene: THREE.Scene,\n): (() => void) => {\n const hidden: THREE.Object3D[] = [];\n scene.traverse((object: THREE.Object3D<THREE.Object3DEventMap>): void => {\n if (isNonMeshRenderable(object) && object.visible) {\n object.visible = false;\n hidden.push(object);\n }\n });\n return (): void => {\n for (const object of hidden) object.visible = true;\n };\n};\n\n/**\n * Apply one diffusion-guide render mode to a built scene, returning the restore\n * handle. A capture applies the override at snapshot time and reverses it right\n * after, so the viewer stays a thin projection of the engine result. A caller\n * that keeps an override across frames calls the handle's `update` before\n * drawing each one, which `outline` and `pose` supply because they hold copies\n * the scene's animation does not move:\n *\n * - `beauty`: no override (the ordinary shaded render).\n * - `depth`: meshes use clamp(1-viewZ/range,0,1) with camera-space depth and a shared {@link DEPTH_NORMALIZATION_RANGE}, independent of near/far normalization. Camera changes can change a world point's viewZ; black is the far-range/background convention.\n * - `mask`: the segmentation pass. A scene handed its palette by\n * {@link attachAutoMovieSemanticMask} is painted by\n * {@link applyAutoMovieSemanticMask}, so every colour is the one that entity's\n * own semantic id earned and survives a rebuild in a different order. A scene\n * handed none keeps the legacy ramp, where each top-level child gets a flat\n * unlit colour by its index: readable as coverage and silhouette, never as\n * identity, because inserting one node repaints everything after it.\n * - `normal`: every mesh swapped to `MeshNormalMaterial`: the unlit\n * surface-normal conditioning pass (#1166).\n * - `outline`: black fills plus inverted-hull back-face shells extruded by {@link EDGE_WIDTH} in model space, leaving white contours on black. Object/instance scaling and camera projection affect world thickness and screen line weight.\n * - `pose`: meshes hidden, and a line-segment overlay of every bone→child bone\n * connection drawn over a black background: the skeleton pose pass.\n *\n * Every pass that swaps a material carries a formation's baked cycle onto the\n * replacement, so a marching crowd marches in `depth`, `normal`, `mask` and\n * `outline` exactly as it does in `beauty`. `pose` is the standing exception:\n * an anonymous member has no bones in the scene for the overlay to draw, which\n * is the same gap it had before the crowd could move at all.\n *\n * An unknown mode is a caller bug and throws.\n * Active or failed scene retirement refuses every mode before setup, including\n * beauty. Failed restoration retains its complete owner callback and cause;\n * nested owned cleanup still runs independently beneath the active boundary.\n *\n * Direct embedders can override depthRange and edgeWidth. The bundled __afPass capture path uses the defaults, keeping the camera-space depth normalization consistent while preserving differences caused by camera pose. Depth beyond the default range clamps to black; changing that range requires a direct call.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Selects the requested supported guide projection, excludes existing nonmesh beauty renderables, suspends fog/image lighting and returns a reversible handle; uses attached semantic masks when present and documented positional fallback otherwise. Depth/edge numeric options remain caller premises and anonymous instanced members have no bone graph for the pose overlay.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure This boundary owns temporary scene atmosphere/helper suspension and mode dispatch; each builder owns its pass resources and the shared restore coordinator attempts independent release without hiding failure.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Resolves an unknown mode before mutation and restores boundary suspensions if its builder throws; default range/width and legacy mask are explicit supported conventions, not fixture branches or substitute foreign methods. Builder-internal partial mutations are not automatically undone by boundary suspension cleanup.\n * @evidence contracts/development/common.md#meaningful-documentation Explains all six modes, semantic/legacy mask distinction, frame-independent depth default, outline extrusion, pose population gap, caller options and the returned restoration obligation.\n * @evidence contracts/development/implementation.md#efficient-algorithms Structural installation traverses scene helpers plus builder mesh/bone populations; the generic override allocates per mesh, legacy masks/shells share by their declared child/cycle keys, and pose/outline overlays scale with the subject graph. Healthy beauty returns a constant no-op handle.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Uses the same mode builders for embedded/capture paths and builder-local equivalent materials; independent installs require separate original-state snapshots, so no scene/mode-only cached restoration is shared.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Three boundary callbacks retain helper visibility, fog and environment/background snapshots; builders nest their own background transitions and own pass resources. Failed returned-handle restoration retains the complete boundary callback and cause under the scene guard. Builder throw still independently restores boundary snapshots with its primary error, while partial acquisition depends on that builder's rollback capability.\n */\nexport const applyRenderMode: (\n scene: THREE.Scene,\n mode: AutoMovieGuidePass,\n options?: { depthRange?: number; edgeWidth?: number },\n) => IAutoMovieRenderModeHandle = (\n scene: THREE.Scene,\n mode: AutoMovieGuidePass,\n options?: {\n /**\n * Metric range (m) the depth pass normalizes onto. Defaults to\n * {@link DEPTH_NORMALIZATION_RANGE} (20). Direct callers only: the capture\n * path keeps the scene-stable default (see above).\n */\n depthRange?: number;\n\n /**\n * Model-space normal extrusion for the outline pass; defaults to {@link EDGE_WIDTH} (0.02). Object/instance scale changes its world thickness; the capture path keeps the default.\n */\n edgeWidth?: number;\n },\n): IAutoMovieRenderModeHandle => {\n guardAutoMovieRenderModeRetirement(scene);\n if (mode === \"beauty\")\n return { mode, semantic: null, restore: (): void => {} };\n // Resolve (and validate) the structural pass builder BEFORE touching the\n // scene, so an unknown mode throws without leaving anything hidden.\n const build: () => IAutoMovieRenderModeHandle =\n ((): (() => IAutoMovieRenderModeHandle) => {\n switch (mode) {\n case \"depth\":\n return (): IAutoMovieRenderModeHandle =>\n applyDepthMode(\n scene,\n options?.depthRange ?? DEPTH_NORMALIZATION_RANGE,\n );\n case \"normal\":\n return (): IAutoMovieRenderModeHandle =>\n overrideAutoMovieRenderModeMaterials(\n scene,\n mode,\n (): THREE.MeshNormalMaterial => new THREE.MeshNormalMaterial(),\n );\n case \"outline\":\n return (): IAutoMovieRenderModeHandle =>\n applyEdgeMode(scene, options?.edgeWidth ?? EDGE_WIDTH);\n case \"mask\": {\n const semantic: IAutoMovieSemanticMaskBinding | null =\n autoMovieSemanticMaskOf(scene);\n return semantic === null\n ? (): IAutoMovieRenderModeHandle => applyMaskMode(scene)\n : (): IAutoMovieRenderModeHandle =>\n applySemanticMaskMode(scene, semantic);\n }\n case \"pose\":\n return (): IAutoMovieRenderModeHandle => applyPoseMode(scene);\n default:\n throw new Error(`unknown render mode \"${String(mode)}\"`);\n }\n })();\n // A structural pass renders only the subject mesh geometry: hide every\n // non-mesh renderable first (#1226), suspend the scene's atmosphere and\n // image lighting, then build the pass (whose own overlay, if any, is added\n // afterward and stays visible). Restore reverses these three suspensions and\n // the pass builder's own resources and background transition.\n const restoreRenderables: () => void = hideNonMeshRenderables(scene);\n const restoreFog: () => void = suspendFog(scene);\n const restoreEnvironment: () => void = suspendEnvironment(scene);\n // A builder that throws returns no handle, so the three suspensions above\n // would have no way back and the scene would keep drawing on black with its\n // atmosphere off for the rest of the session. The semantic mask pass is the\n // first builder that CAN throw (a palette whose design names more staged\n // nodes than the scene holds refuses rather than resolving positionally\n // against the wrong objects), and undoing them here keeps that a refusal\n // instead of a refusal plus a broken scene.\n let handle: IAutoMovieRenderModeHandle;\n try {\n handle = build();\n } catch (error) {\n restoreAutoMovieRenderModeState(\n [restoreEnvironment, restoreFog, restoreRenderables],\n { error },\n );\n }\n return {\n mode,\n semantic: handle.semantic,\n ...(handle.update === undefined ? {} : { update: handle.update }),\n restore: restoreAutoMovieRenderModeOnce((): void => {\n guardAutoMovieRenderModeRetirement(scene, {\n run: (): void => {\n restoreAutoMovieRenderModeState([\n handle.restore,\n restoreEnvironment,\n restoreFog,\n restoreRenderables,\n ]);\n },\n });\n }),\n };\n};\n\n/**\n * Take the scene's fog off for the duration of a structural pass, and put it\n * back exactly as it was.\n *\n * A guide pass states a geometric fact, and fog is not one: `three.js` fogs any\n * material whose shader carries the chunks, which is every `MeshBasicMaterial`\n * the mask and outline passes install. Left on, an atmosphere would mix the\n * mask's flat palette color toward the fog color with distance, so a\n * segmentation consumer would read a far node as a different node than the same\n * node near, and the outline pass's black fill would lighten until the white\n * contour stopped being a contour. The depth and edge passes escape only by\n * accident, their `ShaderMaterial`s never include the fog chunks; relying on\n * that accident is how the next pass written in `MeshBasicMaterial` inherits\n * the bug.\n *\n * The beauty pass is deliberately NOT covered: that one IS the film, and it\n * must carry the atmosphere the scene declares.\n */\nconst suspendFog: (scene: THREE.Scene) => () => void = (\n scene: THREE.Scene,\n): (() => void) => {\n const fog: THREE.Fog | THREE.FogExp2 | null = scene.fog;\n scene.fog = null;\n return (): void => {\n scene.fog = fog;\n };\n};\n\n/**\n * Remove image lighting and its background while a structural pass renders.\n *\n * Normal materials ignore the environment as a light source but would still\n * render its background. The other structural builders currently install a\n * black background themselves; central suspension makes that invariant belong\n * to the pass boundary instead of to each material implementation.\n */\nconst suspendEnvironment: (scene: THREE.Scene) => () => void = (\n scene: THREE.Scene,\n): (() => void) => {\n const environment: THREE.Texture<unknown, THREE.TextureEventMap> | null =\n scene.environment;\n const background:\n | THREE.Color\n | THREE.Texture<unknown, THREE.TextureEventMap>\n | null = scene.background;\n scene.environment = null;\n scene.background = new THREE.Color(0x000000);\n return (): void => {\n scene.environment = environment;\n scene.background = background;\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAM,uBACJ,WAEC,OAAsB,WAAW,QACjC,OAAwB,aAAa,QACrC,OAAwB,aAAa;;;;;;;;;;;;AAaxC,MAAM,0BACJ,UACiB;CACjB,MAAM,SAA2B,CAAC;CAClC,MAAM,UAAU,WAAyD;EACvE,IAAI,oBAAoB,MAAM,KAAK,OAAO,SAAS;GACjD,OAAO,UAAU;GACjB,OAAO,KAAK,MAAM;EACpB;CACF,CAAC;CACD,aAAmB;EACjB,KAAK,MAAM,UAAU,QAAQ,OAAO,UAAU;CAChD;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,mBAKX,OACA,MACA,YAa+B;CAC/B,mCAAmC,KAAK;CACxC,IAAI,SAAS,UACX,OAAO;EAAE;EAAM,UAAU;EAAM,eAAqB,CAAC;CAAE;CAGzD,MAAM,eACuC;EACzC,QAAQ,MAAR;GACE,KAAK,SACH,aACE,eACE,OACA,SAAS,cAAA,EACX;GACJ,KAAK,UACH,aACE,qCACE,OACA,YACgC,IAAI,MAAM,mBAAmB,CAC/D;GACJ,KAAK,WACH,aACE,cAAc,OAAO,SAAS,aAAA,GAAuB;GACzD,KAAK,QAAQ;IACX,MAAM,WACJ,wBAAwB,KAAK;IAC/B,OAAO,aAAa,aACkB,cAAc,KAAK,UAEnD,sBAAsB,OAAO,QAAQ;GAC7C;GACA,KAAK,QACH,aAAyC,cAAc,KAAK;GAC9D,SACE,MAAM,IAAI,MAAM,wBAAwB,OAAO,IAAI,EAAE,EAAE;EAC3D;CACF,EAAA,CAAG;CAML,MAAM,qBAAiC,uBAAuB,KAAK;CACnE,MAAM,aAAyB,WAAW,KAAK;CAC/C,MAAM,qBAAiC,mBAAmB,KAAK;CAQ/D,IAAI;CACJ,IAAI;EACF,SAAS,MAAM;CACjB,SAAS,OAAO;EACd,gCACE;GAAC;GAAoB;GAAY;EAAkB,GACnD,EAAE,MAAM,CACV;CACF;CACA,OAAO;EACL;EACA,UAAU,OAAO;EACjB,GAAI,OAAO,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,QAAQ,OAAO,OAAO;EAC/D,SAAS,qCAA2C;GAClD,mCAAmC,OAAO,EACxC,WAAiB;IACf,gCAAgC;KAC9B,OAAO;KACP;KACA;KACA;IACF,CAAC;GACH,EACF,CAAC;EACH,CAAC;CACH;AACF;;;;;;;;;;;;;;;;;;;AAoBA,MAAM,cACJ,UACiB;CACjB,MAAM,MAAwC,MAAM;CACpD,MAAM,MAAM;CACZ,aAAmB;EACjB,MAAM,MAAM;CACd;AACF;;;;;;;;;AAUA,MAAM,sBACJ,UACiB;CACjB,MAAM,cACJ,MAAM;CACR,MAAM,aAGK,MAAM;CACjB,MAAM,cAAc;CACpB,MAAM,aAAa,IAAI,MAAM,MAAM,CAAQ;CAC3C,aAAmB;EACjB,MAAM,cAAc;EACpB,MAAM,aAAa;CACrB;AACF"}
@@ -1,4 +1,4 @@
1
- import type { IAutoMovieSampledChannel } from "@automovie/engine";
1
+ import type { IAutoMovieSampledChannel } from "@automovie/interface";
2
2
  import type * as THREE from "three";
3
3
  /**
4
4
  * Write an already-authoritative sample table to borrowed Three scene objects.
@@ -1 +1 @@
1
- {"version":3,"file":"applySampledObjectMotion.mjs","names":[],"sources":["../../src/scene/applySampledObjectMotion.ts"],"sourcesContent":["import type { IAutoMovieSampledChannel } from \"@automovie/engine\";\nimport type * as THREE from \"three\";\n\n/**\n * Write an already-authoritative sample table to borrowed Three scene objects.\n *\n * Transforms use engine vector/quaternion order and write parent-local fields; the caller supplies samples in that frame, with no world-to-local conversion here. Morph weights address each descendant mesh's glTF index order, stop at its influence count and preserve omitted entries. Missing objects and non-node channels are skipped. The current four-path switch does not assert exhaustiveness for future unions.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Writes engine-admitted translation/scale triples and quaternion quadruples directly into parent-local transform fields, and indexed weights to existing mesh influences; input coordinate frame, vector widths and rotation validity are caller/sampler premises, while unresolved nodes and unmatched trailing morph indices are tolerated.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Owns the scene mutation for both clip entry points; a private morph traversal handles the one path whose target is a descendant collection instead of an Object3D transform.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses channel kind/path and the supplied resolver rather than fixture names or patched Three methods; it neither invents absent values nor repairs malformed numeric samples.\n * @evidence contracts/development/common.md#meaningful-documentation Gives coordinate/vector conventions, indexed morph behavior, skipped inputs, partial writes and the lack of a future-path exhaustive assertion.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits S sampled channels once; transform writes are constant cost and each weights channel visits its target subtree plus the influences actually written, with only traversal callback allocation.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Both single and sequence sampling reuse this writer; no scene lookup or morph result is memoized because objects, hierarchy and influences may change between calls.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows the sample map and scene targets, owns no geometries/materials/workers and retains nothing after traversal; scene writes intentionally remain with the host.\n */\nexport const applySampledObjectMotion: (\n sampled: ReadonlyMap<string, IAutoMovieSampledChannel>,\n resolve: (node: string) => THREE.Object3D | undefined,\n) => void = (\n sampled: ReadonlyMap<string, IAutoMovieSampledChannel>,\n resolve: (node: string) => THREE.Object3D | undefined,\n): void => {\n for (const { channel, value } of sampled.values()) {\n if (channel.kind !== \"node\") continue;\n const object: THREE.Object3D | undefined = resolve(channel.node);\n if (object === undefined) continue;\n switch (channel.path) {\n case \"translation\":\n object.position.set(value[0]!, value[1]!, value[2]!);\n break;\n case \"rotation\":\n object.quaternion.set(value[0]!, value[1]!, value[2]!, value[3]!);\n break;\n // scale is a first-class engine channel (sampleClip validates width 3,\n // resolveFrame composes it into node matrices). Dropping it rendered\n // scaling props rigid while every engine consumer saw them grow (#1049)\n case \"scale\":\n object.scale.set(value[0]!, value[1]!, value[2]!);\n break;\n case \"weights\":\n applyMorphWeights(object, value);\n break;\n }\n }\n};\n\n/**\n * Write a sampled `weights` vector onto every morphable mesh under `object`.\n *\n * The fourth node path was the last one this helper dropped in silence (#1357):\n * the artifact gate accepts a `weights` track, `resolveFrame` interpolates it\n * into its `weights` output, and the render left the mesh at whatever it\n * already had, so a committed clip that morphs a prop validated clean and\n * changed nothing on screen. Same class as `scale` before #1049.\n *\n * The vector is INDEXED, not named: entry `i` drives morph target `i`, the glTF\n * order the mesh was built or imported with. That is the only convention\n * available here, because a track addresses a node rather than a channel name,\n * and it is deliberately different from {@link applyExpression}, which drives\n * semantic ARKit/preset channels BY NAME on an expression sink.\n *\n * A mesh with no morph targets is skipped, and a vector longer than a mesh's\n * influence array writes the entries that exist: a clip authored against one\n * model must not throw when a host swaps in another, the same tolerance the\n * unresolved-node case above already has.\n */\nconst applyMorphWeights: (object: THREE.Object3D, value: number[]) => void = (\n object: THREE.Object3D,\n value: number[],\n): void => {\n object.traverse((child: THREE.Object3D): void => {\n const influences: number[] | undefined = (child as THREE.Mesh)\n .morphTargetInfluences;\n if (influences === undefined) return;\n const count: number = Math.min(influences.length, value.length);\n for (let i: number = 0; i < count; ++i) influences[i] = value[i]!;\n });\n};\n"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAa,4BAIX,SACA,YACS;CACT,KAAK,MAAM,EAAE,SAAS,WAAW,QAAQ,OAAO,GAAG;EACjD,IAAI,QAAQ,SAAS,QAAQ;EAC7B,MAAM,SAAqC,QAAQ,QAAQ,IAAI;EAC/D,IAAI,WAAW,KAAA,GAAW;EAC1B,QAAQ,QAAQ,MAAhB;GACE,KAAK;IACH,OAAO,SAAS,IAAI,MAAM,IAAK,MAAM,IAAK,MAAM,EAAG;IACnD;GACF,KAAK;IACH,OAAO,WAAW,IAAI,MAAM,IAAK,MAAM,IAAK,MAAM,IAAK,MAAM,EAAG;IAChE;GAIF,KAAK;IACH,OAAO,MAAM,IAAI,MAAM,IAAK,MAAM,IAAK,MAAM,EAAG;IAChD;GACF,KAAK,WACH,kBAAkB,QAAQ,KAAK;EAEnC;CACF;AACF;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,qBACJ,QACA,UACS;CACT,OAAO,UAAU,UAAgC;EAC/C,MAAM,aAAoC,MACvC;EACH,IAAI,eAAe,KAAA,GAAW;EAC9B,MAAM,QAAgB,KAAK,IAAI,WAAW,QAAQ,MAAM,MAAM;EAC9D,KAAK,IAAI,IAAY,GAAG,IAAI,OAAO,EAAE,GAAG,WAAW,KAAK,MAAM;CAChE,CAAC;AACH"}
1
+ {"version":3,"file":"applySampledObjectMotion.mjs","names":[],"sources":["../../src/scene/applySampledObjectMotion.ts"],"sourcesContent":["import type { IAutoMovieSampledChannel } from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\n/**\n * Write an already-authoritative sample table to borrowed Three scene objects.\n *\n * Transforms use engine vector/quaternion order and write parent-local fields; the caller supplies samples in that frame, with no world-to-local conversion here. Morph weights address each descendant mesh's glTF index order, stop at its influence count and preserve omitted entries. Missing objects and non-node channels are skipped. The current four-path switch does not assert exhaustiveness for future unions.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Writes engine-admitted translation/scale triples and quaternion quadruples directly into parent-local transform fields, and indexed weights to existing mesh influences; input coordinate frame, vector widths and rotation validity are caller/sampler premises, while unresolved nodes and unmatched trailing morph indices are tolerated.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Owns the scene mutation for both clip entry points; a private morph traversal handles the one path whose target is a descendant collection instead of an Object3D transform.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses channel kind/path and the supplied resolver rather than fixture names or patched Three methods; it neither invents absent values nor repairs malformed numeric samples.\n * @evidence contracts/development/common.md#meaningful-documentation Gives coordinate/vector conventions, indexed morph behavior, skipped inputs, partial writes and the lack of a future-path exhaustive assertion.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits S sampled channels once; transform writes are constant cost and each weights channel visits its target subtree plus the influences actually written, with only traversal callback allocation.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Both single and sequence sampling reuse this writer; no scene lookup or morph result is memoized because objects, hierarchy and influences may change between calls.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows the sample map and scene targets, owns no geometries/materials/workers and retains nothing after traversal; scene writes intentionally remain with the host.\n */\nexport const applySampledObjectMotion: (\n sampled: ReadonlyMap<string, IAutoMovieSampledChannel>,\n resolve: (node: string) => THREE.Object3D | undefined,\n) => void = (\n sampled: ReadonlyMap<string, IAutoMovieSampledChannel>,\n resolve: (node: string) => THREE.Object3D | undefined,\n): void => {\n for (const { channel, value } of sampled.values()) {\n if (channel.kind !== \"node\") continue;\n const object: THREE.Object3D | undefined = resolve(channel.node);\n if (object === undefined) continue;\n switch (channel.path) {\n case \"translation\":\n object.position.set(value[0]!, value[1]!, value[2]!);\n break;\n case \"rotation\":\n object.quaternion.set(value[0]!, value[1]!, value[2]!, value[3]!);\n break;\n // scale is a first-class engine channel (sampleClip validates width 3,\n // resolveFrame composes it into node matrices). Dropping it rendered\n // scaling props rigid while every engine consumer saw them grow (#1049)\n case \"scale\":\n object.scale.set(value[0]!, value[1]!, value[2]!);\n break;\n case \"weights\":\n applyMorphWeights(object, value);\n break;\n }\n }\n};\n\n/**\n * Write a sampled `weights` vector onto every morphable mesh under `object`.\n *\n * The fourth node path was the last one this helper dropped in silence (#1357):\n * the artifact gate accepts a `weights` track, `resolveFrame` interpolates it\n * into its `weights` output, and the render left the mesh at whatever it\n * already had, so a committed clip that morphs a prop validated clean and\n * changed nothing on screen. Same class as `scale` before #1049.\n *\n * The vector is INDEXED, not named: entry `i` drives morph target `i`, the glTF\n * order the mesh was built or imported with. That is the only convention\n * available here, because a track addresses a node rather than a channel name,\n * and it is deliberately different from {@link applyExpression}, which drives\n * semantic ARKit/preset channels BY NAME on an expression sink.\n *\n * A mesh with no morph targets is skipped, and a vector longer than a mesh's\n * influence array writes the entries that exist: a clip authored against one\n * model must not throw when a host swaps in another, the same tolerance the\n * unresolved-node case above already has.\n */\nconst applyMorphWeights: (object: THREE.Object3D, value: number[]) => void = (\n object: THREE.Object3D,\n value: number[],\n): void => {\n object.traverse((child: THREE.Object3D): void => {\n const influences: number[] | undefined = (child as THREE.Mesh)\n .morphTargetInfluences;\n if (influences === undefined) return;\n const count: number = Math.min(influences.length, value.length);\n for (let i: number = 0; i < count; ++i) influences[i] = value[i]!;\n });\n};\n"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAa,4BAIX,SACA,YACS;CACT,KAAK,MAAM,EAAE,SAAS,WAAW,QAAQ,OAAO,GAAG;EACjD,IAAI,QAAQ,SAAS,QAAQ;EAC7B,MAAM,SAAqC,QAAQ,QAAQ,IAAI;EAC/D,IAAI,WAAW,KAAA,GAAW;EAC1B,QAAQ,QAAQ,MAAhB;GACE,KAAK;IACH,OAAO,SAAS,IAAI,MAAM,IAAK,MAAM,IAAK,MAAM,EAAG;IACnD;GACF,KAAK;IACH,OAAO,WAAW,IAAI,MAAM,IAAK,MAAM,IAAK,MAAM,IAAK,MAAM,EAAG;IAChE;GAIF,KAAK;IACH,OAAO,MAAM,IAAI,MAAM,IAAK,MAAM,IAAK,MAAM,EAAG;IAChD;GACF,KAAK,WACH,kBAAkB,QAAQ,KAAK;EAEnC;CACF;AACF;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,qBACJ,QACA,UACS;CACT,OAAO,UAAU,UAAgC;EAC/C,MAAM,aAAoC,MACvC;EACH,IAAI,eAAe,KAAA,GAAW;EAC9B,MAAM,QAAgB,KAAK,IAAI,WAAW,QAAQ,MAAM,MAAM;EAC9D,KAAK,IAAI,IAAY,GAAG,IAAI,OAAO,EAAE,GAAG,WAAW,KAAK,MAAM;CAChE,CAAC;AACH"}
@@ -1,6 +1,6 @@
1
+ import type { IAutoMovieSemanticMaskBinding } from "@automovie/interface";
1
2
  import * as THREE from "three";
2
3
  import type { IAutoMovieRenderModeHandle } from "./IAutoMovieRenderModeHandle.js";
3
- import { type IAutoMovieSemanticMaskBinding } from "./semanticMask/index.js";
4
4
  /**
5
5
  * Mask pass over the stable semantic palette the scene was handed.
6
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"applySemanticMaskMode.js","sourceRoot":"","sources":["../../src/scene/applySemanticMaskMode.ts"],"names":[],"mappings":";;;AAGA,2FAAqF;AACrF,sDAIiC;AAEjC;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,qBAAqB,GAGA,CAChC,KAAkB,EAClB,OAAsC,EACV,EAAE;IAC9B,MAAM,MAAM,GAAiC,IAAA,qCAA0B,EAAC;QACtE,KAAK;QACL,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC,CAAC;IACH,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE;YACR,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B;QACD,OAAO,EAAE,IAAA,kEAA8B,EAAC,MAAM,CAAC,OAAO,CAAC;KACxD,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,qBAAqB,GAArB,qBAAqB,CAqBhC"}
1
+ {"version":3,"file":"applySemanticMaskMode.js","sourceRoot":"","sources":["../../src/scene/applySemanticMaskMode.ts"],"names":[],"mappings":";;;AAIA,2FAAqF;AACrF,sDAGiC;AAEjC;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,qBAAqB,GAGA,CAChC,KAAkB,EAClB,OAAsC,EACV,EAAE;IAC9B,MAAM,MAAM,GAAiC,IAAA,qCAA0B,EAAC;QACtE,KAAK;QACL,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC,CAAC;IACH,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE;YACR,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B;QACD,OAAO,EAAE,IAAA,kEAA8B,EAAC,MAAM,CAAC,OAAO,CAAC;KACxD,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,qBAAqB,GAArB,qBAAqB,CAqBhC"}