@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":"buildInstancedFormation.mjs","names":[],"sources":["../../src/scene/buildInstancedFormation.ts"],"sourcesContent":["import {\n IAutoMovieFormationCadenceSegment,\n IAutoMovieFormationReform,\n IAutoMovieSampledFormationMotion,\n composeFormationHeroTransform,\n formationCadenceSegments,\n formationSlotPosition,\n intersectsPerspectiveFrustumSphere,\n rotateFormationLocalOffset,\n sampleFormationMotion,\n sampleFormationSlotMotion,\n selectFormationLod,\n} from \"@automovie/engine\";\nimport {\n IAutoMovieCompiledFormationHero,\n IAutoMovieCompiledFormationLod,\n IAutoMovieDeliveryCrop,\n IAutoMovieFormationChunk,\n IAutoMovieFormationSlot,\n IAutoMovieFormationSlotMotion,\n IAutoMovieFormationSlotState,\n IAutoMovieTransform,\n IAutoMovieVector3,\n} from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport type { IAutoMovieFormationCycle } from \"./IAutoMovieFormationCycle.js\";\nimport type { IAutoMovieFormationViewerObject } from \"./IAutoMovieFormationViewerObject.js\";\nimport type { IAutoMovieFormationViewerStats } from \"./IAutoMovieFormationViewerStats.js\";\nimport type { IBuildInstancedFormationProps } from \"./IBuildInstancedFormationProps.js\";\nimport type { IChunkObject } from \"./IChunkObject.js\";\nimport type { IFormationTierRepresentation } from \"./IFormationTierRepresentation.js\";\nimport type { ISlotException } from \"./ISlotException.js\";\nimport { bindFormationTierCycle } from \"./bindFormationTierCycle.js\";\nimport { constructAutoMovieOwnedResources } from \"./constructAutoMovieOwnedResources.js\";\nimport { createFormationRepresentations } from \"./createFormationRepresentations.js\";\nimport { readAutoMovieDeliveryCrop } from \"./deliveryCrop.js\";\nimport { describeFormationTextureSources } from \"./describeFormationTextureSources.js\";\nimport { disposeFormationRepresentations } from \"./disposeFormationRepresentations.js\";\nimport { applyFormationCycleCadence } from \"./formationCycle/index.js\";\nimport { formationSpacingOffset } from \"./formationSpacingOffset.js\";\nimport { objectTransform } from \"./objectTransform.js\";\nimport { regenerateFormationSlot } from \"./regenerateFormationSlot.js\";\nimport { reportAutoMovieResourceRetirement } from \"./reportAutoMovieResourceRetirement.js\";\nimport { slotMatrix } from \"./slotMatrix.js\";\nimport { vector } from \"./vector.js\";\n\n/**\n * Build one compact formation as chunked instance batches.\n *\n * Heroes are deliberately absent: the builder promoted them to explicit scene\n * nodes. Each LOD tier's model is flattened into one mesh, keeping exactly one\n * 64-byte instance matrix and one 4-byte phase scalar per anonymous slot and\n * tier.\n *\n * Declared gaits are baked into part-matrix tables and each member reads the selected table at its seeded phase. Positive-stride takes advance by cue travel/turn and the stride heuristic; zero-stride takes instead advance by elapsed time and their declared period. Two scalar uniforms and one texture reference carry a tier's cadence, while culling, spacing/reform and sparse cues require additional update work.\n *\n * No production scene/film caller is connected in the current tree; direct users and owning tests exercise this producer, so this API alone does not establish that compiled shot populations reach the capture application.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Uses engine compact slot regeneration, cue sampling, cadence integration and hysteretic LOD, projecting metre placements into chunk InstancedMeshes and baked Float32 part tables; admitted models/anchors/tiers are premises, stride is heuristic and cadence matrix interpolation is approximate, while anonymous and caller-supplied hero ownership stay distinct.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Builds shared tier resources once and per-chunk matrix/phase buffers separately, with sparse slot exception lookup and hero rest snapshots for updates; no in-tree production shot host consumes this producer, and that unresolved wiring is not repaired by another runtime layer.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Regenerates authored seeded slots and actual cues without fixture frames or per-member surrogate nodes. The 0.01 chunk-radius and 0.001 distance/depth floors are numerical conventions; culling uses original chunk bounds and supplied projection radius, without recomputing bounds for reform or sparse offsets. Containment of the current deformed arrangement is therefore a remaining premise, not an independently established visibility guarantee.\n * @evidence contracts/development/common.md#meaningful-documentation States anonymous versus promoted members, metre/phase buffer roles, shared gait repertoire and cadence approximation, update work beyond uniform writes and the currently absent production consumer.\n * @evidence contracts/development/implementation.md#efficient-algorithms Construction regenerates N anonymous slots and fills each resident tier, bakes each tier once and locates E exceptions by scanning C chunks then the matching chunk's slots. Updates visit chunks/tiers and heroes, sample cue lists for each exception, and rewrite N matrices when spacing/reform changes. Cue sampling and native graph updates add their actual costs; retained buffers scale with N times resident tiers rather than one Object3D per member.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Shares tier geometry/material/cycle textures across chunk meshes, retains tier hysteresis and only rewrites arrangement when spacing/reform inputs change; absolute cue/cadence inputs drive updates, and failed/successful disposal completion is reused without physical retries.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Construction scope immediately owns tier retirement and each chunk geometry/mesh, rolling them back independently on later refusal; returned runtime owns all anonymous resources until disposal and borrows hero objects. Disposal stops updates, attempts every unique resource, retains operation closures on failed release and preserves its original completion until the runtime is released.\n */\nexport const buildInstancedFormation: (\n input: IBuildInstancedFormationProps,\n) => IAutoMovieFormationViewerObject = (\n input: IBuildInstancedFormationProps,\n): IAutoMovieFormationViewerObject => {\n return constructAutoMovieOwnedResources(\n (\n own: <Resource extends { dispose(): void }>(\n resource: Resource,\n ) => Resource,\n ): IAutoMovieFormationViewerObject => {\n const root: THREE.Group<THREE.Object3DEventMap> = new THREE.Group();\n root.name = `formation:${input.formation.id}`;\n root.position.copy(vector(input.formation.anchor));\n const heroes: Set<number> = new Set(\n input.formation.heroes.map(\n (hero: IAutoMovieCompiledFormationHero): number => hero.slot,\n ),\n );\n const representations: Map<\n \"hero\" | \"near\" | \"far\",\n IFormationTierRepresentation\n > = createFormationRepresentations(input);\n own({\n dispose: (): void =>\n disposeFormationRepresentations(representations.values()),\n });\n const cycles: IAutoMovieFormationCycle[] = [\n ...representations.values(),\n ].flatMap(\n (\n representation: IFormationTierRepresentation,\n ): IAutoMovieFormationCycle[] => {\n const cycle: IAutoMovieFormationCycle | null = representation.cycle;\n return cycle === null ? [] : [cycle];\n },\n );\n const selectionRadius: number = input.formation.projectionRadius;\n const chunks: IChunkObject[] = input.formation.chunks.map(\n (chunk: IAutoMovieFormationChunk): IChunkObject => {\n const slots: IAutoMovieFormationSlot[] = [];\n for (\n let slot: number = chunk.start;\n slot < chunk.start + chunk.count;\n ++slot\n )\n if (heroes.has(slot) === false)\n slots.push(regenerateFormationSlot(input.formation, slot));\n const tiers: Map<\n \"hero\" | \"near\" | \"far\",\n THREE.InstancedMesh<\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 > = new Map<\n IAutoMovieCompiledFormationLod[\"tier\"],\n THREE.InstancedMesh\n >();\n for (const lod of slots.length === 0 ? [] : input.formation.lod) {\n const representation: IFormationTierRepresentation =\n representations.get(lod.tier)!;\n const geometry: THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n > = own(representation.geometry.clone());\n geometry.setAttribute(\n \"automoviePhase\",\n new THREE.InstancedBufferAttribute(\n new Float32Array(\n slots.map(\n (slot: IAutoMovieFormationSlot): number => slot.motionPhase,\n ),\n ),\n 1,\n ),\n );\n const mesh: THREE.InstancedMesh<\n THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n >,\n THREE.Material<THREE.MaterialEventMap>[],\n THREE.Object3DEventMap\n > = own(\n new THREE.InstancedMesh(\n geometry,\n representation.materials,\n slots.length,\n ),\n );\n mesh.name = `${input.formation.id}:${chunk.index}:${lod.tier}`;\n bindFormationTierCycle(mesh, representation);\n slots.forEach(\n (slot: IAutoMovieFormationSlot, index: number): void => {\n mesh.setMatrixAt(\n index,\n slotMatrix(slot, input.formation.anchor),\n );\n },\n );\n mesh.instanceMatrix.needsUpdate = true;\n mesh.computeBoundingBox();\n mesh.computeBoundingSphere();\n mesh.frustumCulled = false;\n mesh.visible = false;\n root.add(mesh);\n tiers.set(lod.tier, mesh);\n }\n return {\n runtime: chunk,\n radius: Math.max(\n 0.01,\n ...[chunk.bounds.min.x, chunk.bounds.max.x].flatMap(\n (x: number): number[] =>\n [chunk.bounds.min.y, chunk.bounds.max.y].flatMap(\n (y: number): number[] =>\n [chunk.bounds.min.z, chunk.bounds.max.z].map(\n (z: number): number =>\n Math.hypot(\n x - chunk.centroid.x,\n y - chunk.centroid.y,\n z - chunk.centroid.z,\n ),\n ),\n ),\n ),\n ),\n slots,\n tiers,\n selected: null,\n removed: 0,\n };\n },\n );\n const drawableTiers: Set<\"hero\" | \"near\" | \"far\"> = new Set(\n chunks.flatMap((chunk: IChunkObject): (\"hero\" | \"near\" | \"far\")[] => [\n ...chunk.tiers.keys(),\n ]),\n );\n // The cues a unit was built with are the cues it performs, resolved once.\n // Which members are singled out is settled here and never revisited, so a\n // frame that re-read the caller's list would sample cues against a set of\n // exceptions that no longer answers to them: a member named after the build\n // has no instance to write, and one named before it would keep performing\n // whatever the new list happened to say. Reading it twice also left the second\n // `?? []` an arm no input could take, since a unit whose cues are absent has\n // no exception to sample for.\n const slotMotions: readonly IAutoMovieFormationSlotMotion[] =\n input.slotMotions ?? [];\n // Every member a cue singles out, located once. Nothing is stored for the\n // members no cue names, which is what keeps a crowd of a hundred thousand\n // paying for the three exceptions it has and not for its own size.\n const exceptions: ISlotException[] = [];\n for (const slot of new Set(\n slotMotions.flatMap((cue: IAutoMovieFormationSlotMotion): number[] =>\n cue.formation === input.formation.id ? cue.slots : [],\n ),\n )) {\n const chunk: IChunkObject | undefined = chunks.find(\n (candidate: IChunkObject): boolean =>\n slot >= candidate.runtime.start &&\n slot < candidate.runtime.start + candidate.runtime.count,\n );\n const index: number =\n chunk?.slots.findIndex(\n (member: IAutoMovieFormationSlot): boolean => member.slot === slot,\n ) ?? -1;\n if (chunk === undefined || index < 0) continue;\n exceptions.push({ slot, chunk, index, designed: chunk.slots[index]! });\n }\n let spacing: { lateral: number; depth: number } = {\n lateral: 1,\n depth: 1,\n };\n // The arrangement currently written into the instance matrices, so a\n // frame that changes neither spacing nor arrangement writes nothing.\n let reform: IAutoMovieFormationReform | null = null;\n const initialHeroSources: Map<string, IAutoMovieTransform> = new Map(\n [...(input.heroObjects ?? [])].map(\n ([actor, object]: [\n string,\n THREE.Object3D<THREE.Object3DEventMap>,\n ]): readonly [string, IAutoMovieTransform] =>\n [actor, objectTransform(object)] as const,\n ),\n );\n const stats: IAutoMovieFormationViewerStats = {\n visible: { hero: 0, near: 0, far: 0 },\n culled: 0,\n removed: 0,\n heroes: input.formation.heroes.length,\n };\n let disposed: boolean = false;\n let disposalFailure: { error: unknown } | undefined;\n let retirements: (() => void)[] | undefined;\n return {\n object: root,\n stats,\n describeTextureSources: (): ReturnType<\n typeof describeFormationTextureSources\n > =>\n describeFormationTextureSources(\n input.formation.id,\n representations,\n drawableTiers,\n ),\n dispose(): void {\n if (disposed) {\n if (disposalFailure !== undefined) throw disposalFailure.error;\n return;\n }\n disposed = true;\n const ownedTiers: IFormationTierRepresentation[] = [\n ...representations.values(),\n ];\n retirements = [\n (): void => {\n root.removeFromParent();\n },\n ...chunks.flatMap((chunk: IChunkObject): (() => void)[] =>\n [...chunk.tiers.values()].flatMap(\n (mesh: THREE.InstancedMesh): (() => void)[] => [\n (): void => mesh.geometry.dispose(),\n (): void => mesh.dispose(),\n ],\n ),\n ),\n (): void => disposeFormationRepresentations(ownedTiers),\n (): void => {\n root.clear();\n },\n ];\n try {\n reportAutoMovieResourceRetirement(retirements);\n for (const chunk of chunks) {\n chunk.tiers.clear();\n chunk.slots.length = 0;\n }\n representations.clear();\n drawableTiers.clear();\n cycles.length = 0;\n chunks.length = 0;\n exceptions.length = 0;\n initialHeroSources.clear();\n retirements = undefined;\n } catch (error) {\n disposalFailure = { error };\n throw error;\n }\n },\n update(\n camera: THREE.PerspectiveCamera,\n viewportHeight: number,\n time: number | undefined,\n heroSources: ReadonlyMap<string, IAutoMovieTransform> | undefined,\n ): void {\n if (disposed)\n throw new Error(`Formation \"${input.formation.id}\" is disposed.`);\n stats.visible = { hero: 0, near: 0, far: 0 };\n stats.culled = 0;\n stats.removed = 0;\n const sampled: IAutoMovieSampledFormationMotion =\n sampleFormationMotion(\n input.motions ?? [],\n input.formation.id,\n time ?? 0,\n );\n // What the unit has done up to this instant, cut into the intervals its\n // cadence is made of. Every member lands somewhere else in the resulting\n // cycle, because the phase it adds is its own; every tier folds the same\n // intervals against its own figure's strides, because a near stickman and\n // a far one cover ground with the same feet.\n const cadence: IAutoMovieFormationCadenceSegment[] =\n formationCadenceSegments(\n input.motions ?? [],\n input.formation.id,\n time ?? 0,\n );\n for (const cycle of cycles)\n applyFormationCycleCadence(cycle, cadence);\n root.position.set(\n input.formation.anchor.x + sampled.translation.x,\n input.formation.anchor.y + sampled.translation.y,\n input.formation.anchor.z + sampled.translation.z,\n );\n root.quaternion.setFromAxisAngle(\n new THREE.Vector3(0, 1, 0),\n THREE.MathUtils.degToRad(sampled.facingOffsetDeg),\n );\n // Spacing opens and closes an arrangement; a re-form changes which\n // arrangement it is. Both move a member relative to its neighbours, so\n // neither can ride on the group transform above and both rewrite the\n // same instance matrices -- together, so a frame that changes both pays\n // for one pass and cannot apply one against the other's stale reading.\n if (\n sampled.spacingScale.lateral !== spacing.lateral ||\n sampled.spacingScale.depth !== spacing.depth ||\n sampled.reform?.layout !== reform?.layout ||\n sampled.reform?.progress !== reform?.progress\n ) {\n spacing = { ...sampled.spacingScale };\n reform = sampled.reform;\n for (const chunk of chunks)\n for (const mesh of chunk.tiers.values()) {\n chunk.slots.forEach(\n (slot: IAutoMovieFormationSlot, index: number): void => {\n mesh.setMatrixAt(\n index,\n slotMatrix(\n reform === null\n ? slot\n : {\n ...slot,\n position: formationSlotPosition(\n input.formation,\n slot.slot,\n reform,\n ),\n },\n input.formation.anchor,\n spacing,\n input.formation.facingDeg,\n ),\n );\n },\n );\n mesh.instanceMatrix.needsUpdate = true;\n }\n }\n // The members singled out, written after the unit-wide pass so a spacing\n // rewrite cannot undo them. Only the exceptions are touched, so this costs\n // what the author authored rather than what the crowd holds.\n //\n // The offset is authored in the unit's own frame and is turned by the\n // unit's designed heading alone, because the scene graph above already\n // carries the cue's own turn and its travel. That is the same composition\n // the engine's placement performs in one step for a gate that has no\n // scene graph to carry half of it.\n for (const exception of exceptions) exception.chunk.removed = 0;\n for (const exception of exceptions) {\n const state: IAutoMovieFormationSlotState =\n sampleFormationSlotMotion(\n slotMotions,\n input.formation.id,\n exception.slot,\n time ?? 0,\n );\n const offset: IAutoMovieVector3 = rotateFormationLocalOffset(\n state.offset,\n input.formation.facingDeg,\n );\n const position: THREE.Vector3 = formationSpacingOffset(\n exception.designed.position,\n input.formation.anchor,\n spacing,\n input.formation.facingDeg,\n );\n position.x += offset.x;\n position.y += offset.y;\n position.z += offset.z;\n // A member out of the shot is written at zero scale rather than dropped\n // from the buffer. Restacking an instance buffer would renumber every\n // member after it and cost the crowd's own size every time one member\n // left; a degenerate matrix rasterizes nothing and costs one write.\n const matrix: THREE.Matrix4 = new THREE.Matrix4().compose(\n position,\n new THREE.Quaternion().setFromAxisAngle(\n new THREE.Vector3(0, 1, 0),\n THREE.MathUtils.degToRad(\n exception.designed.facingDeg + state.facingOffsetDeg,\n ),\n ),\n state.present\n ? new THREE.Vector3(1, 1, 1)\n : new THREE.Vector3(0, 0, 0),\n );\n for (const mesh of exception.chunk.tiers.values()) {\n mesh.setMatrixAt(exception.index, matrix);\n mesh.instanceMatrix.needsUpdate = true;\n }\n if (state.present === false) {\n ++exception.chunk.removed;\n ++stats.removed;\n }\n }\n root.updateMatrixWorld(true);\n camera.updateMatrixWorld(true);\n camera.updateProjectionMatrix();\n const projection: THREE.Matrix4 =\n new THREE.Matrix4().multiplyMatrices(\n camera.projectionMatrix,\n camera.matrixWorldInverse,\n );\n const frustum: THREE.Frustum =\n new THREE.Frustum().setFromProjectionMatrix(projection);\n const cameraPosition: THREE.Vector3 = new THREE.Vector3();\n const cameraRotation: THREE.Quaternion = new THREE.Quaternion();\n camera.getWorldPosition(cameraPosition);\n camera.getWorldQuaternion(cameraRotation);\n const halfY: number = Math.tan(\n THREE.MathUtils.degToRad(camera.fov) / 2,\n );\n const deliveryCrop: IAutoMovieDeliveryCrop | undefined =\n readAutoMovieDeliveryCrop(camera);\n const effectiveHalfY: number =\n halfY *\n (deliveryCrop === undefined\n ? 1\n : deliveryCrop.bottom - deliveryCrop.top);\n for (const hero of input.formation.heroes) {\n const object: THREE.Object3D<THREE.Object3DEventMap> | undefined =\n input.heroObjects?.get(hero.actor);\n if (object === undefined) continue;\n const source: IAutoMovieTransform = (heroSources?.get(hero.actor) ??\n initialHeroSources.get(hero.actor))!;\n const transformed: IAutoMovieTransform =\n composeFormationHeroTransform(\n hero.transform,\n source,\n input.formation.anchor,\n sampled,\n input.formation.facingDeg,\n );\n object.position.copy(vector(transformed.translation));\n object.quaternion.set(\n transformed.rotation.x,\n transformed.rotation.y,\n transformed.rotation.z,\n transformed.rotation.w,\n );\n object.scale.set(\n transformed.scale.x,\n transformed.scale.y,\n transformed.scale.z,\n );\n object.updateMatrixWorld(true);\n const visualObject: THREE.Object3D<THREE.Object3DEventMap> =\n input.heroVisualObjects?.get(hero.actor) ?? object;\n const worldPosition: THREE.Vector3 = new THREE.Vector3();\n visualObject.getWorldPosition(worldPosition);\n const worldRadius: number =\n selectionRadius *\n Math.max(\n Math.abs(transformed.scale.x),\n Math.abs(transformed.scale.y),\n Math.abs(transformed.scale.z),\n );\n object.visible = intersectsPerspectiveFrustumSphere({\n camera: {\n position: {\n x: cameraPosition.x,\n y: cameraPosition.y,\n z: cameraPosition.z,\n },\n rotation: {\n x: cameraRotation.x,\n y: cameraRotation.y,\n z: cameraRotation.z,\n w: cameraRotation.w,\n },\n },\n center: {\n x: worldPosition.x,\n y: worldPosition.y,\n z: worldPosition.z,\n },\n radius: worldRadius,\n near: camera.near,\n far: camera.far,\n halfY,\n aspect: camera.aspect,\n crop: deliveryCrop,\n });\n if (object.visible) ++stats.visible.hero;\n }\n for (const chunk of chunks) {\n const localCenter: THREE.Vector3 = formationSpacingOffset(\n chunk.runtime.centroid,\n input.formation.anchor,\n spacing,\n input.formation.facingDeg,\n );\n const center: THREE.Vector3 = root.localToWorld(localCenter);\n const sphere: THREE.Sphere = new THREE.Sphere(\n center,\n chunk.radius *\n Math.max(\n sampled.spacingScale.lateral,\n sampled.spacingScale.depth,\n ) +\n selectionRadius,\n );\n if (frustum.intersectsSphere(sphere) === false) {\n for (const mesh of chunk.tiers.values()) mesh.visible = false;\n stats.culled += chunk.runtime.anonymousCount - chunk.removed;\n continue;\n }\n const distance: number = Math.max(\n 0.001,\n cameraPosition.distanceTo(center),\n );\n const cameraDepth: number = Math.max(\n 0.001,\n -center.clone().applyMatrix4(camera.matrixWorldInverse).z,\n );\n const projectedPixels: number =\n (selectionRadius * viewportHeight) /\n (effectiveHalfY * cameraDepth);\n const selected: IAutoMovieCompiledFormationLod = selectFormationLod(\n {\n lod: input.formation.lod,\n distance,\n projectedPixels,\n previous: chunk.selected,\n },\n ).lod;\n chunk.selected = selected.tier;\n for (const [tier, mesh] of chunk.tiers)\n mesh.visible = tier === selected.tier;\n stats.visible[selected.tier] +=\n chunk.runtime.anonymousCount - chunk.removed;\n }\n },\n };\n },\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAa,2BAGX,UACoC;CACpC,OAAO,kCAEH,QAGoC;EACpC,MAAM,OAA4C,IAAI,MAAM,MAAM;EAClE,KAAK,OAAO,aAAa,MAAM,UAAU;EACzC,KAAK,SAAS,KAAK,OAAO,MAAM,UAAU,MAAM,CAAC;EACjD,MAAM,SAAsB,IAAI,IAC9B,MAAM,UAAU,OAAO,KACpB,SAAkD,KAAK,IAC1D,CACF;EACA,MAAM,kBAGF,+BAA+B,KAAK;EACxC,IAAI,EACF,eACE,gCAAgC,gBAAgB,OAAO,CAAC,EAC5D,CAAC;EACD,MAAM,SAAqC,CACzC,GAAG,gBAAgB,OAAO,CAC5B,CAAC,CAAC,SAEE,mBAC+B;GAC/B,MAAM,QAAyC,eAAe;GAC9D,OAAO,UAAU,OAAO,CAAC,IAAI,CAAC,KAAK;EACrC,CACF;EACA,MAAM,kBAA0B,MAAM,UAAU;EAChD,MAAM,SAAyB,MAAM,UAAU,OAAO,KACnD,UAAkD;GACjD,MAAM,QAAmC,CAAC;GAC1C,KACE,IAAI,OAAe,MAAM,OACzB,OAAO,MAAM,QAAQ,MAAM,OAC3B,EAAE,MAEF,IAAI,OAAO,IAAI,IAAI,MAAM,OACvB,MAAM,KAAK,wBAAwB,MAAM,WAAW,IAAI,CAAC;GAC7D,MAAM,wBAWF,IAAI,IAGN;GACF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MAAM,WAAW,SAAS;KAC1B,KAAK,MAAM,CAAC,MAAM,SAAS,MAAM,OAC/B,KAAK,UAAU,SAAS,SAAS;KACnC,MAAM,QAAQ,SAAS,SACrB,MAAM,QAAQ,iBAAiB,MAAM;IACzC;GACF;EACF;CACF,CACF;AACF"}
1
+ {"version":3,"file":"buildInstancedFormation.mjs","names":[],"sources":["../../src/scene/buildInstancedFormation.ts"],"sourcesContent":["import {\n composeFormationHeroTransform,\n formationCadenceSegments,\n formationSlotPosition,\n intersectsPerspectiveFrustumSphere,\n rotateFormationLocalOffset,\n sampleFormationMotion,\n sampleFormationSlotMotion,\n selectFormationLod,\n} from \"@automovie/engine\";\nimport {\n IAutoMovieCompiledFormationHero,\n IAutoMovieCompiledFormationLod,\n IAutoMovieDeliveryCrop,\n type IAutoMovieFormationCadenceSegment,\n IAutoMovieFormationChunk,\n type IAutoMovieFormationReform,\n IAutoMovieFormationSlot,\n IAutoMovieFormationSlotMotion,\n IAutoMovieFormationSlotState,\n type IAutoMovieSampledFormationMotion,\n IAutoMovieTransform,\n IAutoMovieVector3,\n} from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport type { IAutoMovieFormationCycle } from \"./IAutoMovieFormationCycle.js\";\nimport type { IAutoMovieFormationViewerObject } from \"./IAutoMovieFormationViewerObject.js\";\nimport type { IAutoMovieFormationViewerStats } from \"./IAutoMovieFormationViewerStats.js\";\nimport type { IBuildInstancedFormationProps } from \"./IBuildInstancedFormationProps.js\";\nimport type { IChunkObject } from \"./IChunkObject.js\";\nimport type { IFormationTierRepresentation } from \"./IFormationTierRepresentation.js\";\nimport type { ISlotException } from \"./ISlotException.js\";\nimport { bindFormationTierCycle } from \"./bindFormationTierCycle.js\";\nimport { constructAutoMovieOwnedResources } from \"./constructAutoMovieOwnedResources.js\";\nimport { createFormationRepresentations } from \"./createFormationRepresentations.js\";\nimport { readAutoMovieDeliveryCrop } from \"./deliveryCrop.js\";\nimport { describeFormationTextureSources } from \"./describeFormationTextureSources.js\";\nimport { disposeFormationRepresentations } from \"./disposeFormationRepresentations.js\";\nimport { applyFormationCycleCadence } from \"./formationCycle/index.js\";\nimport { formationSpacingOffset } from \"./formationSpacingOffset.js\";\nimport { objectTransform } from \"./objectTransform.js\";\nimport { regenerateFormationSlot } from \"./regenerateFormationSlot.js\";\nimport { reportAutoMovieResourceRetirement } from \"./reportAutoMovieResourceRetirement.js\";\nimport { slotMatrix } from \"./slotMatrix.js\";\nimport { vector } from \"./vector.js\";\n\n/**\n * Build one compact formation as chunked instance batches.\n *\n * Heroes are deliberately absent: the builder promoted them to explicit scene\n * nodes. Each LOD tier's model is flattened into one mesh, keeping exactly one\n * 64-byte instance matrix and one 4-byte phase scalar per anonymous slot and\n * tier.\n *\n * Declared gaits are baked into part-matrix tables and each member reads the selected table at its seeded phase. Positive-stride takes advance by cue travel/turn and the stride heuristic; zero-stride takes instead advance by elapsed time and their declared period. Two scalar uniforms and one texture reference carry a tier's cadence, while culling, spacing/reform and sparse cues require additional update work.\n *\n * No production scene/film caller is connected in the current tree; direct users and owning tests exercise this producer, so this API alone does not establish that compiled shot populations reach the capture application.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Uses engine compact slot regeneration, cue sampling, cadence integration and hysteretic LOD, projecting metre placements into chunk InstancedMeshes and baked Float32 part tables; admitted models/anchors/tiers are premises, stride is heuristic and cadence matrix interpolation is approximate, while anonymous and caller-supplied hero ownership stay distinct.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Builds shared tier resources once and per-chunk matrix/phase buffers separately, with sparse slot exception lookup and hero rest snapshots for updates; no in-tree production shot host consumes this producer, and that unresolved wiring is not repaired by another runtime layer.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Regenerates authored seeded slots and actual cues without fixture frames or per-member surrogate nodes. The 0.01 chunk-radius and 0.001 distance/depth floors are numerical conventions; culling uses original chunk bounds and supplied projection radius, without recomputing bounds for reform or sparse offsets. Containment of the current deformed arrangement is therefore a remaining premise, not an independently established visibility guarantee.\n * @evidence contracts/development/common.md#meaningful-documentation States anonymous versus promoted members, metre/phase buffer roles, shared gait repertoire and cadence approximation, update work beyond uniform writes and the currently absent production consumer.\n * @evidence contracts/development/implementation.md#efficient-algorithms Construction regenerates N anonymous slots and fills each resident tier, bakes each tier once and locates E exceptions by scanning C chunks then the matching chunk's slots. Updates visit chunks/tiers and heroes, sample cue lists for each exception, and rewrite N matrices when spacing/reform changes. Cue sampling and native graph updates add their actual costs; retained buffers scale with N times resident tiers rather than one Object3D per member.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Shares tier geometry/material/cycle textures across chunk meshes, retains tier hysteresis and only rewrites arrangement when spacing/reform inputs change; absolute cue/cadence inputs drive updates, and failed/successful disposal completion is reused without physical retries.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Construction scope immediately owns tier retirement and each chunk geometry/mesh, rolling them back independently on later refusal; returned runtime owns all anonymous resources until disposal and borrows hero objects. Disposal stops updates, attempts every unique resource, retains operation closures on failed release and preserves its original completion until the runtime is released.\n */\nexport const buildInstancedFormation: (\n input: IBuildInstancedFormationProps,\n) => IAutoMovieFormationViewerObject = (\n input: IBuildInstancedFormationProps,\n): IAutoMovieFormationViewerObject => {\n return constructAutoMovieOwnedResources(\n (\n own: <Resource extends { dispose(): void }>(\n resource: Resource,\n ) => Resource,\n ): IAutoMovieFormationViewerObject => {\n const root: THREE.Group<THREE.Object3DEventMap> = new THREE.Group();\n root.name = `formation:${input.formation.id}`;\n root.position.copy(vector(input.formation.anchor));\n const heroes: Set<number> = new Set(\n input.formation.heroes.map(\n (hero: IAutoMovieCompiledFormationHero): number => hero.slot,\n ),\n );\n const representations: Map<\n \"hero\" | \"near\" | \"far\",\n IFormationTierRepresentation\n > = createFormationRepresentations(input);\n own({\n dispose: (): void =>\n disposeFormationRepresentations(representations.values()),\n });\n const cycles: IAutoMovieFormationCycle[] = [\n ...representations.values(),\n ].flatMap(\n (\n representation: IFormationTierRepresentation,\n ): IAutoMovieFormationCycle[] => {\n const cycle: IAutoMovieFormationCycle | null = representation.cycle;\n return cycle === null ? [] : [cycle];\n },\n );\n const selectionRadius: number = input.formation.projectionRadius;\n const chunks: IChunkObject[] = input.formation.chunks.map(\n (chunk: IAutoMovieFormationChunk): IChunkObject => {\n const slots: IAutoMovieFormationSlot[] = [];\n for (\n let slot: number = chunk.start;\n slot < chunk.start + chunk.count;\n ++slot\n )\n if (heroes.has(slot) === false)\n slots.push(regenerateFormationSlot(input.formation, slot));\n const tiers: Map<\n \"hero\" | \"near\" | \"far\",\n THREE.InstancedMesh<\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 > = new Map<\n IAutoMovieCompiledFormationLod[\"tier\"],\n THREE.InstancedMesh\n >();\n for (const lod of slots.length === 0 ? [] : input.formation.lod) {\n const representation: IFormationTierRepresentation =\n representations.get(lod.tier)!;\n const geometry: THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n > = own(representation.geometry.clone());\n geometry.setAttribute(\n \"automoviePhase\",\n new THREE.InstancedBufferAttribute(\n new Float32Array(\n slots.map(\n (slot: IAutoMovieFormationSlot): number => slot.motionPhase,\n ),\n ),\n 1,\n ),\n );\n const mesh: THREE.InstancedMesh<\n THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n >,\n THREE.Material<THREE.MaterialEventMap>[],\n THREE.Object3DEventMap\n > = own(\n new THREE.InstancedMesh(\n geometry,\n representation.materials,\n slots.length,\n ),\n );\n mesh.name = `${input.formation.id}:${chunk.index}:${lod.tier}`;\n bindFormationTierCycle(mesh, representation);\n slots.forEach(\n (slot: IAutoMovieFormationSlot, index: number): void => {\n mesh.setMatrixAt(\n index,\n slotMatrix(slot, input.formation.anchor),\n );\n },\n );\n mesh.instanceMatrix.needsUpdate = true;\n mesh.computeBoundingBox();\n mesh.computeBoundingSphere();\n mesh.frustumCulled = false;\n mesh.visible = false;\n root.add(mesh);\n tiers.set(lod.tier, mesh);\n }\n return {\n runtime: chunk,\n radius: Math.max(\n 0.01,\n ...[chunk.bounds.min.x, chunk.bounds.max.x].flatMap(\n (x: number): number[] =>\n [chunk.bounds.min.y, chunk.bounds.max.y].flatMap(\n (y: number): number[] =>\n [chunk.bounds.min.z, chunk.bounds.max.z].map(\n (z: number): number =>\n Math.hypot(\n x - chunk.centroid.x,\n y - chunk.centroid.y,\n z - chunk.centroid.z,\n ),\n ),\n ),\n ),\n ),\n slots,\n tiers,\n selected: null,\n removed: 0,\n };\n },\n );\n const drawableTiers: Set<\"hero\" | \"near\" | \"far\"> = new Set(\n chunks.flatMap((chunk: IChunkObject): (\"hero\" | \"near\" | \"far\")[] => [\n ...chunk.tiers.keys(),\n ]),\n );\n // The cues a unit was built with are the cues it performs, resolved once.\n // Which members are singled out is settled here and never revisited, so a\n // frame that re-read the caller's list would sample cues against a set of\n // exceptions that no longer answers to them: a member named after the build\n // has no instance to write, and one named before it would keep performing\n // whatever the new list happened to say. Reading it twice also left the second\n // `?? []` an arm no input could take, since a unit whose cues are absent has\n // no exception to sample for.\n const slotMotions: readonly IAutoMovieFormationSlotMotion[] =\n input.slotMotions ?? [];\n // Every member a cue singles out, located once. Nothing is stored for the\n // members no cue names, which is what keeps a crowd of a hundred thousand\n // paying for the three exceptions it has and not for its own size.\n const exceptions: ISlotException[] = [];\n for (const slot of new Set(\n slotMotions.flatMap((cue: IAutoMovieFormationSlotMotion): number[] =>\n cue.formation === input.formation.id ? cue.slots : [],\n ),\n )) {\n const chunk: IChunkObject | undefined = chunks.find(\n (candidate: IChunkObject): boolean =>\n slot >= candidate.runtime.start &&\n slot < candidate.runtime.start + candidate.runtime.count,\n );\n const index: number =\n chunk?.slots.findIndex(\n (member: IAutoMovieFormationSlot): boolean => member.slot === slot,\n ) ?? -1;\n if (chunk === undefined || index < 0) continue;\n exceptions.push({ slot, chunk, index, designed: chunk.slots[index]! });\n }\n let spacing: { lateral: number; depth: number } = {\n lateral: 1,\n depth: 1,\n };\n // The arrangement currently written into the instance matrices, so a\n // frame that changes neither spacing nor arrangement writes nothing.\n let reform: IAutoMovieFormationReform | null = null;\n const initialHeroSources: Map<string, IAutoMovieTransform> = new Map(\n [...(input.heroObjects ?? [])].map(\n ([actor, object]: [\n string,\n THREE.Object3D<THREE.Object3DEventMap>,\n ]): readonly [string, IAutoMovieTransform] =>\n [actor, objectTransform(object)] as const,\n ),\n );\n const stats: IAutoMovieFormationViewerStats = {\n visible: { hero: 0, near: 0, far: 0 },\n culled: 0,\n removed: 0,\n heroes: input.formation.heroes.length,\n };\n let disposed: boolean = false;\n let disposalFailure: { error: unknown } | undefined;\n let retirements: (() => void)[] | undefined;\n return {\n object: root,\n stats,\n describeTextureSources: (): ReturnType<\n typeof describeFormationTextureSources\n > =>\n describeFormationTextureSources(\n input.formation.id,\n representations,\n drawableTiers,\n ),\n dispose(): void {\n if (disposed) {\n if (disposalFailure !== undefined) throw disposalFailure.error;\n return;\n }\n disposed = true;\n const ownedTiers: IFormationTierRepresentation[] = [\n ...representations.values(),\n ];\n retirements = [\n (): void => {\n root.removeFromParent();\n },\n ...chunks.flatMap((chunk: IChunkObject): (() => void)[] =>\n [...chunk.tiers.values()].flatMap(\n (mesh: THREE.InstancedMesh): (() => void)[] => [\n (): void => mesh.geometry.dispose(),\n (): void => mesh.dispose(),\n ],\n ),\n ),\n (): void => disposeFormationRepresentations(ownedTiers),\n (): void => {\n root.clear();\n },\n ];\n try {\n reportAutoMovieResourceRetirement(retirements);\n for (const chunk of chunks) {\n chunk.tiers.clear();\n chunk.slots.length = 0;\n }\n representations.clear();\n drawableTiers.clear();\n cycles.length = 0;\n chunks.length = 0;\n exceptions.length = 0;\n initialHeroSources.clear();\n retirements = undefined;\n } catch (error) {\n disposalFailure = { error };\n throw error;\n }\n },\n update(\n camera: THREE.PerspectiveCamera,\n viewportHeight: number,\n time: number | undefined,\n heroSources: ReadonlyMap<string, IAutoMovieTransform> | undefined,\n ): void {\n if (disposed)\n throw new Error(`Formation \"${input.formation.id}\" is disposed.`);\n stats.visible = { hero: 0, near: 0, far: 0 };\n stats.culled = 0;\n stats.removed = 0;\n const sampled: IAutoMovieSampledFormationMotion =\n sampleFormationMotion(\n input.motions ?? [],\n input.formation.id,\n time ?? 0,\n );\n // What the unit has done up to this instant, cut into the intervals its\n // cadence is made of. Every member lands somewhere else in the resulting\n // cycle, because the phase it adds is its own; every tier folds the same\n // intervals against its own figure's strides, because a near stickman and\n // a far one cover ground with the same feet.\n const cadence: IAutoMovieFormationCadenceSegment[] =\n formationCadenceSegments(\n input.motions ?? [],\n input.formation.id,\n time ?? 0,\n );\n for (const cycle of cycles)\n applyFormationCycleCadence(cycle, cadence);\n root.position.set(\n input.formation.anchor.x + sampled.translation.x,\n input.formation.anchor.y + sampled.translation.y,\n input.formation.anchor.z + sampled.translation.z,\n );\n root.quaternion.setFromAxisAngle(\n new THREE.Vector3(0, 1, 0),\n THREE.MathUtils.degToRad(sampled.facingOffsetDeg),\n );\n // Spacing opens and closes an arrangement; a re-form changes which\n // arrangement it is. Both move a member relative to its neighbours, so\n // neither can ride on the group transform above and both rewrite the\n // same instance matrices -- together, so a frame that changes both pays\n // for one pass and cannot apply one against the other's stale reading.\n if (\n sampled.spacingScale.lateral !== spacing.lateral ||\n sampled.spacingScale.depth !== spacing.depth ||\n sampled.reform?.layout !== reform?.layout ||\n sampled.reform?.progress !== reform?.progress\n ) {\n spacing = { ...sampled.spacingScale };\n reform = sampled.reform;\n for (const chunk of chunks)\n for (const mesh of chunk.tiers.values()) {\n chunk.slots.forEach(\n (slot: IAutoMovieFormationSlot, index: number): void => {\n mesh.setMatrixAt(\n index,\n slotMatrix(\n reform === null\n ? slot\n : {\n ...slot,\n position: formationSlotPosition(\n input.formation,\n slot.slot,\n reform,\n ),\n },\n input.formation.anchor,\n spacing,\n input.formation.facingDeg,\n ),\n );\n },\n );\n mesh.instanceMatrix.needsUpdate = true;\n }\n }\n // The members singled out, written after the unit-wide pass so a spacing\n // rewrite cannot undo them. Only the exceptions are touched, so this costs\n // what the author authored rather than what the crowd holds.\n //\n // The offset is authored in the unit's own frame and is turned by the\n // unit's designed heading alone, because the scene graph above already\n // carries the cue's own turn and its travel. That is the same composition\n // the engine's placement performs in one step for a gate that has no\n // scene graph to carry half of it.\n for (const exception of exceptions) exception.chunk.removed = 0;\n for (const exception of exceptions) {\n const state: IAutoMovieFormationSlotState =\n sampleFormationSlotMotion(\n slotMotions,\n input.formation.id,\n exception.slot,\n time ?? 0,\n );\n const offset: IAutoMovieVector3 = rotateFormationLocalOffset(\n state.offset,\n input.formation.facingDeg,\n );\n const position: THREE.Vector3 = formationSpacingOffset(\n exception.designed.position,\n input.formation.anchor,\n spacing,\n input.formation.facingDeg,\n );\n position.x += offset.x;\n position.y += offset.y;\n position.z += offset.z;\n // A member out of the shot is written at zero scale rather than dropped\n // from the buffer. Restacking an instance buffer would renumber every\n // member after it and cost the crowd's own size every time one member\n // left; a degenerate matrix rasterizes nothing and costs one write.\n const matrix: THREE.Matrix4 = new THREE.Matrix4().compose(\n position,\n new THREE.Quaternion().setFromAxisAngle(\n new THREE.Vector3(0, 1, 0),\n THREE.MathUtils.degToRad(\n exception.designed.facingDeg + state.facingOffsetDeg,\n ),\n ),\n state.present\n ? new THREE.Vector3(1, 1, 1)\n : new THREE.Vector3(0, 0, 0),\n );\n for (const mesh of exception.chunk.tiers.values()) {\n mesh.setMatrixAt(exception.index, matrix);\n mesh.instanceMatrix.needsUpdate = true;\n }\n if (state.present === false) {\n ++exception.chunk.removed;\n ++stats.removed;\n }\n }\n root.updateMatrixWorld(true);\n camera.updateMatrixWorld(true);\n camera.updateProjectionMatrix();\n const projection: THREE.Matrix4 =\n new THREE.Matrix4().multiplyMatrices(\n camera.projectionMatrix,\n camera.matrixWorldInverse,\n );\n const frustum: THREE.Frustum =\n new THREE.Frustum().setFromProjectionMatrix(projection);\n const cameraPosition: THREE.Vector3 = new THREE.Vector3();\n const cameraRotation: THREE.Quaternion = new THREE.Quaternion();\n camera.getWorldPosition(cameraPosition);\n camera.getWorldQuaternion(cameraRotation);\n const halfY: number = Math.tan(\n THREE.MathUtils.degToRad(camera.fov) / 2,\n );\n const deliveryCrop: IAutoMovieDeliveryCrop | undefined =\n readAutoMovieDeliveryCrop(camera);\n const effectiveHalfY: number =\n halfY *\n (deliveryCrop === undefined\n ? 1\n : deliveryCrop.bottom - deliveryCrop.top);\n for (const hero of input.formation.heroes) {\n const object: THREE.Object3D<THREE.Object3DEventMap> | undefined =\n input.heroObjects?.get(hero.actor);\n if (object === undefined) continue;\n const source: IAutoMovieTransform = (heroSources?.get(hero.actor) ??\n initialHeroSources.get(hero.actor))!;\n const transformed: IAutoMovieTransform =\n composeFormationHeroTransform(\n hero.transform,\n source,\n input.formation.anchor,\n sampled,\n input.formation.facingDeg,\n );\n object.position.copy(vector(transformed.translation));\n object.quaternion.set(\n transformed.rotation.x,\n transformed.rotation.y,\n transformed.rotation.z,\n transformed.rotation.w,\n );\n object.scale.set(\n transformed.scale.x,\n transformed.scale.y,\n transformed.scale.z,\n );\n object.updateMatrixWorld(true);\n const visualObject: THREE.Object3D<THREE.Object3DEventMap> =\n input.heroVisualObjects?.get(hero.actor) ?? object;\n const worldPosition: THREE.Vector3 = new THREE.Vector3();\n visualObject.getWorldPosition(worldPosition);\n const worldRadius: number =\n selectionRadius *\n Math.max(\n Math.abs(transformed.scale.x),\n Math.abs(transformed.scale.y),\n Math.abs(transformed.scale.z),\n );\n object.visible = intersectsPerspectiveFrustumSphere({\n camera: {\n position: {\n x: cameraPosition.x,\n y: cameraPosition.y,\n z: cameraPosition.z,\n },\n rotation: {\n x: cameraRotation.x,\n y: cameraRotation.y,\n z: cameraRotation.z,\n w: cameraRotation.w,\n },\n },\n center: {\n x: worldPosition.x,\n y: worldPosition.y,\n z: worldPosition.z,\n },\n radius: worldRadius,\n near: camera.near,\n far: camera.far,\n halfY,\n aspect: camera.aspect,\n crop: deliveryCrop,\n });\n if (object.visible) ++stats.visible.hero;\n }\n for (const chunk of chunks) {\n const localCenter: THREE.Vector3 = formationSpacingOffset(\n chunk.runtime.centroid,\n input.formation.anchor,\n spacing,\n input.formation.facingDeg,\n );\n const center: THREE.Vector3 = root.localToWorld(localCenter);\n const sphere: THREE.Sphere = new THREE.Sphere(\n center,\n chunk.radius *\n Math.max(\n sampled.spacingScale.lateral,\n sampled.spacingScale.depth,\n ) +\n selectionRadius,\n );\n if (frustum.intersectsSphere(sphere) === false) {\n for (const mesh of chunk.tiers.values()) mesh.visible = false;\n stats.culled += chunk.runtime.anonymousCount - chunk.removed;\n continue;\n }\n const distance: number = Math.max(\n 0.001,\n cameraPosition.distanceTo(center),\n );\n const cameraDepth: number = Math.max(\n 0.001,\n -center.clone().applyMatrix4(camera.matrixWorldInverse).z,\n );\n const projectedPixels: number =\n (selectionRadius * viewportHeight) /\n (effectiveHalfY * cameraDepth);\n const selected: IAutoMovieCompiledFormationLod = selectFormationLod(\n {\n lod: input.formation.lod,\n distance,\n projectedPixels,\n previous: chunk.selected,\n },\n ).lod;\n chunk.selected = selected.tier;\n for (const [tier, mesh] of chunk.tiers)\n mesh.visible = tier === selected.tier;\n stats.visible[selected.tier] +=\n chunk.runtime.anonymousCount - chunk.removed;\n }\n },\n };\n },\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAa,2BAGX,UACoC;CACpC,OAAO,kCAEH,QAGoC;EACpC,MAAM,OAA4C,IAAI,MAAM,MAAM;EAClE,KAAK,OAAO,aAAa,MAAM,UAAU;EACzC,KAAK,SAAS,KAAK,OAAO,MAAM,UAAU,MAAM,CAAC;EACjD,MAAM,SAAsB,IAAI,IAC9B,MAAM,UAAU,OAAO,KACpB,SAAkD,KAAK,IAC1D,CACF;EACA,MAAM,kBAGF,+BAA+B,KAAK;EACxC,IAAI,EACF,eACE,g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C,OAAO,CAAC,CAAC;IAChC,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildSpaceObject.mjs","names":[],"sources":["../../src/scene/buildSpaceObject.ts"],"sourcesContent":["import { type ITessellation, tessellateSurface } from \"@automovie/engine\";\nimport type { IAutoMovieSpace, IAutoMovieSurface } from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport { SPACE_GROUP_NAME } from \"./SPACE_GROUP_NAME.js\";\n\n/**\n * Build the structural ground of an {@link IAutoMovieSpace}: one `Mesh` per\n * standable surface, grouped under {@link SPACE_GROUP_NAME}.\n *\n * This is what closes the gap between the space the feet obey and the world the\n * guide passes draw (#1173). The surfaces were already the engine's semantic\n * ground (`heightAt`, support contacts, walkability) but nothing ever drew\n * them, so a depth or mask pass of a staged scene showed actors floating in a\n * void. Building them as real meshes is enough: every structural pass collects\n * geometry by traversing the scene and checking isMesh, then replaces its material, so the\n * ground joins depth, mask, normal, and outline with no pass-side special case,\n * unlike a `GridHelper`, which is a `LineSegments` and must be hidden before\n * every structural pass.\n *\n * The ordinary material writes neither colour nor depth. A support patch is a\n * semantic declaration used by grounding and locomotion, not proof that an\n * authored slab, terrain mesh, or platform exists. Drawing the declaration in\n * beauty would let a missing physical floor look complete, and writing only\n * depth would still let it occlude authored geometry. Guide passes replace the\n * material and therefore keep the structural geometry #1173 introduced.\n *\n * The engine decomposes each footprint into its actual convex pieces, including\n * notches and holes. Floors and ramps fan those pieces; heightfields clip them\n * to authored lattice cells. Vertex heights use the grounding height query and\n * triangles face +Y. Inside a twisted bilinear cell the drawn planar triangles\n * approximate the height rule; identical vertex heights do not prove identical\n * interpolated interior heights.\n *\n * A degenerate footprint (fewer than three non-collinear points, rejected by\n * `validateSpace`, but a hand-built space may still carry one) encloses no area\n * and contributes no mesh rather than an invalid geometry.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Uses the engine's actual footprint decomposition, height-rule tessellation, +Y winding and shared smooth normals, then realizes Float32 indexed geometry; admitted metre/Y-up surfaces satisfy engine premises, and bilinear cell interiors remain planar approximations rather than exact grounding geometry.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Owns only the Three group/geometry realization of semantic support surfaces; the engine owns tessellation and guide passes own material replacement, while beauty/depth writes of the ordinary material are disabled.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Draws every nondegenerate declared surface through the same tessellator without fixture paths or replacement height rules; invisible beauty material reflects semantic-support versus authored physical floor responsibilities.\n * @evidence contracts/development/common.md#meaningful-documentation Gives structural-pass purpose, hidden beauty behavior, actual region handling, metres/Y-up winding, degenerate omission and the heightfield interior approximation.\n * @evidence contracts/development/implementation.md#efficient-algorithms Builds one mesh per nondegenerate surface and copies each emitted position/normal/index once; engine cost depends on convex pieces and touched heightfield cells, and output memory grows with tessellated vertices/triangles rather than scene raster size.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses the engine tessellation implementation but creates fresh scene-owned Three resources per build; mutable support surfaces have no immutable revision key here, so no cross-scene geometry cache is assumed.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Transfers new geometries/materials to the returned group and retains no separate registry; population is bounded by this space's nondegenerate surfaces and tessellation output. No disposer or partial-build rollback is exposed here, so scene-host retirement and construction-failure cleanup remain a gap rather than guaranteed release.\n */\nexport const buildSpaceObject: (space: IAutoMovieSpace) => THREE.Group = (\n space: IAutoMovieSpace,\n): THREE.Group => {\n const group: THREE.Group<THREE.Object3DEventMap> = new THREE.Group();\n group.name = SPACE_GROUP_NAME;\n for (const surface of space.surfaces) {\n const geometry: THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n > | null = buildSurfaceGeometry(surface);\n if (geometry === null) continue;\n const mesh: THREE.Mesh<\n THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n >,\n THREE.MeshBasicMaterial,\n THREE.Object3DEventMap\n > = new THREE.Mesh(\n geometry,\n new THREE.MeshBasicMaterial({ colorWrite: false, depthWrite: false }),\n );\n mesh.name = surface.id;\n group.add(mesh);\n }\n return group;\n};\n\n/**\n * One surface footprint as a triangulated planar patch, or `null` when the\n * footprint encloses no area.\n */\nconst buildSurfaceGeometry: (\n surface: IAutoMovieSurface,\n) => THREE.BufferGeometry | null = (\n surface: IAutoMovieSurface,\n): THREE.BufferGeometry | null => {\n const mesh: ITessellation | null = tessellateSurface(surface);\n if (mesh === null) return null;\n const geometry: THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n > = new THREE.BufferGeometry();\n geometry.setAttribute(\n \"position\",\n new THREE.Float32BufferAttribute(mesh.positions, 3),\n );\n geometry.setAttribute(\n \"normal\",\n new THREE.Float32BufferAttribute(mesh.normals, 3),\n );\n geometry.setIndex(mesh.indices);\n return geometry;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,oBACX,UACgB;CAChB,MAAM,QAA6C,IAAI,MAAM,MAAM;CACnE,MAAM,OAAO;CACb,KAAK,MAAM,WAAW,MAAM,UAAU;EACpC,MAAM,WAGK,qBAAqB,OAAO;EACvC,IAAI,aAAa,MAAM;EACvB,MAAM,OAOF,IAAI,MAAM,KACZ,UACA,IAAI,MAAM,kBAAkB;GAAE,YAAY;GAAO,YAAY;EAAM,CAAC,CACtE;EACA,KAAK,OAAO,QAAQ;EACpB,MAAM,IAAI,IAAI;CAChB;CACA,OAAO;AACT;;;;;AAMA,MAAM,wBAGJ,YACgC;CAChC,MAAM,OAA6B,kBAAkB,OAAO;CAC5D,IAAI,SAAS,MAAM,OAAO;CAC1B,MAAM,WAGF,IAAI,MAAM,eAAe;CAC7B,SAAS,aACP,YACA,IAAI,MAAM,uBAAuB,KAAK,WAAW,CAAC,CACpD;CACA,SAAS,aACP,UACA,IAAI,MAAM,uBAAuB,KAAK,SAAS,CAAC,CAClD;CACA,SAAS,SAAS,KAAK,OAAO;CAC9B,OAAO;AACT"}
1
+ {"version":3,"file":"buildSpaceObject.mjs","names":[],"sources":["../../src/scene/buildSpaceObject.ts"],"sourcesContent":["import { tessellateSurface } from \"@automovie/engine\";\nimport type {\n IAutoMovieSpace,\n IAutoMovieSurface,\n IAutoMovieTessellation,\n} from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport { SPACE_GROUP_NAME } from \"./SPACE_GROUP_NAME.js\";\n\n/**\n * Build the structural ground of an {@link IAutoMovieSpace}: one `Mesh` per\n * standable surface, grouped under {@link SPACE_GROUP_NAME}.\n *\n * This is what closes the gap between the space the feet obey and the world the\n * guide passes draw (#1173). The surfaces were already the engine's semantic\n * ground (`heightAt`, support contacts, walkability) but nothing ever drew\n * them, so a depth or mask pass of a staged scene showed actors floating in a\n * void. Building them as real meshes is enough: every structural pass collects\n * geometry by traversing the scene and checking isMesh, then replaces its material, so the\n * ground joins depth, mask, normal, and outline with no pass-side special case,\n * unlike a `GridHelper`, which is a `LineSegments` and must be hidden before\n * every structural pass.\n *\n * The ordinary material writes neither colour nor depth. A support patch is a\n * semantic declaration used by grounding and locomotion, not proof that an\n * authored slab, terrain mesh, or platform exists. Drawing the declaration in\n * beauty would let a missing physical floor look complete, and writing only\n * depth would still let it occlude authored geometry. Guide passes replace the\n * material and therefore keep the structural geometry #1173 introduced.\n *\n * The engine decomposes each footprint into its actual convex pieces, including\n * notches and holes. Floors and ramps fan those pieces; heightfields clip them\n * to authored lattice cells. Vertex heights use the grounding height query and\n * triangles face +Y. Inside a twisted bilinear cell the drawn planar triangles\n * approximate the height rule; identical vertex heights do not prove identical\n * interpolated interior heights.\n *\n * A degenerate footprint (fewer than three non-collinear points, rejected by\n * `validateSpace`, but a hand-built space may still carry one) encloses no area\n * and contributes no mesh rather than an invalid geometry.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Uses the engine's actual footprint decomposition, height-rule tessellation, +Y winding and shared smooth normals, then realizes Float32 indexed geometry; admitted metre/Y-up surfaces satisfy engine premises, and bilinear cell interiors remain planar approximations rather than exact grounding geometry.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Owns only the Three group/geometry realization of semantic support surfaces; the engine owns tessellation and guide passes own material replacement, while beauty/depth writes of the ordinary material are disabled.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Draws every nondegenerate declared surface through the same tessellator without fixture paths or replacement height rules; invisible beauty material reflects semantic-support versus authored physical floor responsibilities.\n * @evidence contracts/development/common.md#meaningful-documentation Gives structural-pass purpose, hidden beauty behavior, actual region handling, metres/Y-up winding, degenerate omission and the heightfield interior approximation.\n * @evidence contracts/development/implementation.md#efficient-algorithms Builds one mesh per nondegenerate surface and copies each emitted position/normal/index once; engine cost depends on convex pieces and touched heightfield cells, and output memory grows with tessellated vertices/triangles rather than scene raster size.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses the engine tessellation implementation but creates fresh scene-owned Three resources per build; mutable support surfaces have no immutable revision key here, so no cross-scene geometry cache is assumed.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Transfers new geometries/materials to the returned group and retains no separate registry; population is bounded by this space's nondegenerate surfaces and tessellation output. No disposer or partial-build rollback is exposed here, so scene-host retirement and construction-failure cleanup remain a gap rather than guaranteed release.\n */\nexport const buildSpaceObject: (space: IAutoMovieSpace) => THREE.Group = (\n space: IAutoMovieSpace,\n): THREE.Group => {\n const group: THREE.Group<THREE.Object3DEventMap> = new THREE.Group();\n group.name = SPACE_GROUP_NAME;\n for (const surface of space.surfaces) {\n const geometry: THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n > | null = buildSurfaceGeometry(surface);\n if (geometry === null) continue;\n const mesh: THREE.Mesh<\n THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n >,\n THREE.MeshBasicMaterial,\n THREE.Object3DEventMap\n > = new THREE.Mesh(\n geometry,\n new THREE.MeshBasicMaterial({ colorWrite: false, depthWrite: false }),\n );\n mesh.name = surface.id;\n group.add(mesh);\n }\n return group;\n};\n\n/**\n * One surface footprint as a triangulated planar patch, or `null` when the\n * footprint encloses no area.\n */\nconst buildSurfaceGeometry: (\n surface: IAutoMovieSurface,\n) => THREE.BufferGeometry | null = (\n surface: IAutoMovieSurface,\n): THREE.BufferGeometry | null => {\n const mesh: IAutoMovieTessellation | null = tessellateSurface(surface);\n if (mesh === null) return null;\n const geometry: THREE.BufferGeometry<\n THREE.NormalBufferAttributes,\n THREE.BufferGeometryEventMap\n > = new THREE.BufferGeometry();\n geometry.setAttribute(\n \"position\",\n new THREE.Float32BufferAttribute(mesh.positions, 3),\n );\n geometry.setAttribute(\n \"normal\",\n new THREE.Float32BufferAttribute(mesh.normals, 3),\n );\n geometry.setIndex(mesh.indices);\n return geometry;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,MAAa,oBACX,UACgB;CAChB,MAAM,QAA6C,IAAI,MAAM,MAAM;CACnE,MAAM,OAAO;CACb,KAAK,MAAM,WAAW,MAAM,UAAU;EACpC,MAAM,WAGK,qBAAqB,OAAO;EACvC,IAAI,aAAa,MAAM;EACvB,MAAM,OAOF,IAAI,MAAM,KACZ,UACA,IAAI,MAAM,kBAAkB;GAAE,YAAY;GAAO,YAAY;EAAM,CAAC,CACtE;EACA,KAAK,OAAO,QAAQ;EACpB,MAAM,IAAI,IAAI;CAChB;CACA,OAAO;AACT;;;;;AAMA,MAAM,wBAGJ,YACgC;CAChC,MAAM,OAAsC,kBAAkB,OAAO;CACrE,IAAI,SAAS,MAAM,OAAO;CAC1B,MAAM,WAGF,IAAI,MAAM,eAAe;CAC7B,SAAS,aACP,YACA,IAAI,MAAM,uBAAuB,KAAK,WAAW,CAAC,CACpD;CACA,SAAS,aACP,UACA,IAAI,MAAM,uBAAuB,KAAK,SAAS,CAAC,CAClD;CACA,SAAS,SAAS,KAAK,OAAO;CAC9B,OAAO;AACT"}
@@ -1,4 +1,4 @@
1
- import type { IAutoMoviePhysicalProfile as P } from "@automovie/interface";
1
+ import type { IAutoMovieRigidTransform } from "@automovie/interface";
2
2
  import type { IAutoMovieModelObject } from "./IAutoMovieModelObject.js";
3
3
  /**
4
4
  * Apply solved world bone frames to an existing complete skin rig, retaining unlisted bones' authored local transforms.
@@ -11,4 +11,4 @@ import type { IAutoMovieModelObject } from "./IAutoMovieModelObject.js";
11
11
  * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
12
12
  * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 17 allocation sites become the returned value or die with the call, so nothing grows.
13
13
  */
14
- export declare function createAutoMoviePhysicalPoseAdapter(model: IAutoMovieModelObject): (poses: Readonly<Record<string, P.ITransform>>) => void;
14
+ export declare function createAutoMoviePhysicalPoseAdapter(model: IAutoMovieModelObject): (poses: Readonly<Record<string, IAutoMovieRigidTransform>>) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"createAutoMoviePhysicalPoseAdapter.js","sourceRoot":"","sources":["../../src/scene/createAutoMoviePhysicalPoseAdapter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAY,KAAK,kCAAc;AAE/B,uEAAiE;AAGjE;;;;;;;;;;GAUG;AACH,4CACE,KAA4B;IAE5B,MAAM,KAAK,GAAgC,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,KAAK,GAAgC,IAAI,GAAG,CAChD,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CACZ,CAAC,CAAC,IAAI,EAAE,MAAM,CAAmD,EAG/D,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CACpB,CACF,CAAC;IACF,MAAM,OAAO,GAA+C,EAAE,CAAC;IAC/D,MAAM,KAAK,GAAwB,EAAE,CAAC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,CAAC,CAAC;QACzC,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC3C,KAAK,MAAM,QAAQ,IAAI,SAAS;YAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,IAAI,YAAY,8CAAoB;gBAAE,IAAI,CAAC,cAAc,EAAE,CAAC;;gBAC3D,8CAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createAutoMoviePhysicalPoseAdapter.mjs","names":[],"sources":["../../src/scene/createAutoMoviePhysicalPoseAdapter.ts"],"sourcesContent":["import type { IAutoMoviePhysicalProfile as P } from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport { AutoMovieSkinnedMesh } from \"./AutoMovieSkinnedMesh.js\";\nimport type { IAutoMovieModelObject } from \"./IAutoMovieModelObject.js\";\n\n/**\n * Apply solved world bone frames to an existing complete skin rig, retaining unlisted bones' authored local transforms.\n *\n * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Apply solved world bone frames to an existing complete skin rig, retaining unlisted bones' authored local transforms) as stated in this comment.\n * @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Apply solved world bone frames to an existing complete skin rig, retaining unlisted bones' authored local transforms) directly over its typed inputs (`model`) as nested iteration of depth 3 (map over [...bones]; for-of over Object.entries(poses); every over [ pose.position.x, p), delegating to `owned.has`, `ordered.push`, `owned.get`, `skins.push`, `skeletons.add`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (3 throw sites). Beyond structural 0, 1 and 2 the body uses the literal 0.00001, whose basis this answer does not independently establish and a reviewer must confirm.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 106 lines and 11 top-level statements that reuses `owned.has`, `ordered.push`, `owned.get`, `skins.push`, `skeletons.add` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The body contains 0 `any`, 0 type assertion(s), 2 non-null assertion(s); these are the remaining shortcuts and are not justified here.\n * @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `model`; the dominant cost is nested iteration of depth 3 (map over [...bones]; for-of over Object.entries(poses); every over [ pose.position.x, p), performed once per call with 17 allocation sites (literals and constructed values). No speedup is claimed and none is measured.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 17 allocation sites become the returned value or die with the call, so nothing grows.\n */\nexport function createAutoMoviePhysicalPoseAdapter(\n model: IAutoMovieModelObject,\n): (poses: Readonly<Record<string, P.ITransform>>) => void {\n const bones: Map<string, THREE.Object3D> = new Map(model.bones);\n const owned: Map<THREE.Object3D, string> = new Map(\n [...bones].map(\n ([name, object]: [string, THREE.Object3D<THREE.Object3DEventMap>]): [\n THREE.Object3D,\n string,\n ] => [object, name],\n ),\n );\n const ordered: { name: string; object: THREE.Object3D }[] = [];\n const skins: THREE.SkinnedMesh[] = [];\n const skeletons: Set<THREE.Skeleton> = new Set();\n model.object.traverse((object: THREE.Object3D): void => {\n if (owned.has(object)) ordered.push({ name: owned.get(object)!, object });\n if (object instanceof THREE.SkinnedMesh) {\n skins.push(object);\n skeletons.add(object.skeleton);\n }\n });\n const inverse: THREE.Matrix4 = new THREE.Matrix4();\n const position: THREE.Vector3 = new THREE.Vector3();\n const rotation: THREE.Quaternion = new THREE.Quaternion();\n const scale: THREE.Vector3 = new THREE.Vector3();\n return (poses: Readonly<Record<string, P.ITransform>>): void => {\n for (const [bone, pose] of Object.entries(poses))\n if (\n !bones.has(bone) ||\n !pose ||\n ![\n pose.position.x,\n pose.position.y,\n pose.position.z,\n pose.rotation.x,\n pose.rotation.y,\n pose.rotation.z,\n pose.rotation.w,\n ].every(Number.isFinite) ||\n Math.abs(\n Math.hypot(\n pose.rotation.x,\n pose.rotation.y,\n pose.rotation.z,\n pose.rotation.w,\n ) - 1,\n ) > 1e-5\n )\n throw new Error(`Invalid physical display bone frame: ${bone}`);\n model.object.updateWorldMatrix(true, true);\n for (const { name, object } of ordered)\n if (Object.hasOwn(poses, name)) {\n for (\n let ancestor: THREE.Object3D | null = object;\n ancestor;\n ancestor = ancestor.parent\n )\n if (\n Math.max(\n Math.abs(ancestor.scale.x - 1),\n Math.abs(ancestor.scale.y - 1),\n Math.abs(ancestor.scale.z - 1),\n ) > 1e-5 ||\n ![ancestor.scale.x, ancestor.scale.y, ancestor.scale.z].every(\n Number.isFinite,\n )\n )\n throw new Error(\n \"Physical bone display requires metre-scale rig ancestors\",\n );\n object.getWorldScale(scale);\n if (\n Math.max(\n Math.abs(scale.x - 1),\n Math.abs(scale.y - 1),\n Math.abs(scale.z - 1),\n ) > 1e-5\n )\n throw new Error(\n \"Physical bone display requires metre-scale rig ancestors\",\n );\n }\n for (const { name, object } of ordered) {\n if (!Object.hasOwn(poses, name)) continue;\n const pose: P.ITransform = poses[name]!;\n const parent: THREE.Object3D | null = object.parent;\n position.set(pose.position.x, pose.position.y, pose.position.z);\n if (parent) {\n parent.updateWorldMatrix(true, false);\n position.applyMatrix4(inverse.copy(parent.matrixWorld).invert());\n parent.getWorldQuaternion(rotation).invert();\n } else rotation.identity();\n object.position.copy(position);\n object.quaternion\n .set(pose.rotation.x, pose.rotation.y, pose.rotation.z, pose.rotation.w)\n .premultiply(rotation);\n object.updateMatrix();\n object.updateWorldMatrix(false, false);\n }\n model.object.updateWorldMatrix(true, true);\n for (const skeleton of skeletons) skeleton.update();\n for (const skin of skins) {\n if (skin instanceof AutoMovieSkinnedMesh) skin.invalidatePose();\n else AutoMovieSkinnedMesh.clearBounds(skin);\n }\n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AW,SAAS,OAAO;EAClD,KAAK,MAAM,QAAQ,OACjB,IAAI,gBAAgB,sBAAsB,KAAK,eAAe;OACzD,qBAAqB,YAAY,IAAI;CAE9C;AACF"}
1
+ {"version":3,"file":"createAutoMoviePhysicalPoseAdapter.mjs","names":[],"sources":["../../src/scene/createAutoMoviePhysicalPoseAdapter.ts"],"sourcesContent":["import type { IAutoMovieRigidTransform } from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport { AutoMovieSkinnedMesh } from \"./AutoMovieSkinnedMesh.js\";\nimport type { IAutoMovieModelObject } from \"./IAutoMovieModelObject.js\";\n\n/**\n * Apply solved world bone frames to an existing complete skin rig, retaining unlisted bones' authored local transforms.\n *\n * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Apply solved world bone frames to an existing complete skin rig, retaining unlisted bones' authored local transforms) as stated in this comment.\n * @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Apply solved world bone frames to an existing complete skin rig, retaining unlisted bones' authored local transforms) directly over its typed inputs (`model`) as nested iteration of depth 3 (map over [...bones]; for-of over Object.entries(poses); every over [ pose.position.x, p), delegating to `owned.has`, `ordered.push`, `owned.get`, `skins.push`, `skeletons.add`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (3 throw sites). Beyond structural 0, 1 and 2 the body uses the literal 0.00001, whose basis this answer does not independently establish and a reviewer must confirm.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 106 lines and 11 top-level statements that reuses `owned.has`, `ordered.push`, `owned.get`, `skins.push`, `skeletons.add` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The body contains 0 `any`, 0 type assertion(s), 2 non-null assertion(s); these are the remaining shortcuts and are not justified here.\n * @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `model`; the dominant cost is nested iteration of depth 3 (map over [...bones]; for-of over Object.entries(poses); every over [ pose.position.x, p), performed once per call with 17 allocation sites (literals and constructed values). No speedup is claimed and none is measured.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 17 allocation sites become the returned value or die with the call, so nothing grows.\n */\nexport function createAutoMoviePhysicalPoseAdapter(\n model: IAutoMovieModelObject,\n): (poses: Readonly<Record<string, IAutoMovieRigidTransform>>) => void {\n const bones: Map<string, THREE.Object3D> = new Map(model.bones);\n const owned: Map<THREE.Object3D, string> = new Map(\n [...bones].map(\n ([name, object]: [string, THREE.Object3D<THREE.Object3DEventMap>]): [\n THREE.Object3D,\n string,\n ] => [object, name],\n ),\n );\n const ordered: { name: string; object: THREE.Object3D }[] = [];\n const skins: THREE.SkinnedMesh[] = [];\n const skeletons: Set<THREE.Skeleton> = new Set();\n model.object.traverse((object: THREE.Object3D): void => {\n if (owned.has(object)) ordered.push({ name: owned.get(object)!, object });\n if (object instanceof THREE.SkinnedMesh) {\n skins.push(object);\n skeletons.add(object.skeleton);\n }\n });\n const inverse: THREE.Matrix4 = new THREE.Matrix4();\n const position: THREE.Vector3 = new THREE.Vector3();\n const rotation: THREE.Quaternion = new THREE.Quaternion();\n const scale: THREE.Vector3 = new THREE.Vector3();\n return (poses: Readonly<Record<string, IAutoMovieRigidTransform>>): void => {\n for (const [bone, pose] of Object.entries(poses))\n if (\n !bones.has(bone) ||\n !pose ||\n ![\n pose.position.x,\n pose.position.y,\n pose.position.z,\n pose.rotation.x,\n pose.rotation.y,\n pose.rotation.z,\n pose.rotation.w,\n ].every(Number.isFinite) ||\n Math.abs(\n Math.hypot(\n pose.rotation.x,\n pose.rotation.y,\n pose.rotation.z,\n pose.rotation.w,\n ) - 1,\n ) > 1e-5\n )\n throw new Error(`Invalid physical display bone frame: ${bone}`);\n model.object.updateWorldMatrix(true, true);\n for (const { name, object } of ordered)\n if (Object.hasOwn(poses, name)) {\n for (\n let ancestor: THREE.Object3D | null = object;\n ancestor;\n ancestor = ancestor.parent\n )\n if (\n Math.max(\n Math.abs(ancestor.scale.x - 1),\n Math.abs(ancestor.scale.y - 1),\n Math.abs(ancestor.scale.z - 1),\n ) > 1e-5 ||\n ![ancestor.scale.x, ancestor.scale.y, ancestor.scale.z].every(\n Number.isFinite,\n )\n )\n throw new Error(\n \"Physical bone display requires metre-scale rig ancestors\",\n );\n object.getWorldScale(scale);\n if (\n Math.max(\n Math.abs(scale.x - 1),\n Math.abs(scale.y - 1),\n Math.abs(scale.z - 1),\n ) > 1e-5\n )\n throw new Error(\n \"Physical bone display requires metre-scale rig ancestors\",\n );\n }\n for (const { name, object } of ordered) {\n if (!Object.hasOwn(poses, name)) continue;\n const pose: IAutoMovieRigidTransform = poses[name]!;\n const parent: THREE.Object3D | null = object.parent;\n position.set(pose.position.x, pose.position.y, pose.position.z);\n if (parent) {\n parent.updateWorldMatrix(true, false);\n position.applyMatrix4(inverse.copy(parent.matrixWorld).invert());\n parent.getWorldQuaternion(rotation).invert();\n } else rotation.identity();\n object.position.copy(position);\n object.quaternion\n .set(pose.rotation.x, pose.rotation.y, pose.rotation.z, pose.rotation.w)\n .premultiply(rotation);\n object.updateMatrix();\n object.updateWorldMatrix(false, false);\n }\n model.object.updateWorldMatrix(true, true);\n for (const skeleton of skeletons) skeleton.update();\n for (const skin of skins) {\n if (skin instanceof AutoMovieSkinnedMesh) skin.invalidatePose();\n else AutoMovieSkinnedMesh.clearBounds(skin);\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAgB,mCACd,OACqE;CACrE,MAAM,QAAqC,IAAI,IAAI,MAAM,KAAK;CAC9D,MAAM,QAAqC,IAAI,IAC7C,CAAC,GAAG,KAAK,CAAC,CAAC,KACR,CAAC,MAAM,YAGH,CAAC,QAAQ,IAAI,CACpB,CACF;CACA,MAAM,UAAsD,CAAC;CAC7D,MAAM,QAA6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,SAAS,MAAM;IAAG,SAAS,MAAM;GAAC,CAAC,CAAC,MACtD,OAAO,QACT,GAEA,MAAM,IAAI,MACR,0DACF;GACJ,OAAO,cAAc,KAAK;GAC1B,IACE,KAAK,IACH,KAAK,IAAI,MAAM,IAAI,CAAC,GACpB,KAAK,IAAI,MAAM,IAAI,CAAC,GACpB,KAAK,IAAI,MAAM,IAAI,CAAC,CACtB,IAAI,MAEJ,MAAM,IAAI,MACR,0DACF;EACJ;EACF,KAAK,MAAM,EAAE,MAAM,YAAY,SAAS;GACtC,IAAI,CAAC,OAAO,OAAO,OAAO,IAAI,GAAG;GACjC,MAAM,OAAiC,MAAM;GAC7C,MAAM,SAAgC,OAAO;GAC7C,SAAS,IAAI,KAAK,SAAS,GAAG,KAAK,SAAS,GAAG,KAAK,SAAS,CAAC;GAC9D,IAAI,QAAQ;IACV,OAAO,kBAAkB,MAAM,KAAK;IACpC,SAAS,aAAa,QAAQ,KAAK,OAAO,WAAW,CAAC,CAAC,OAAO,CAAC;IAC/D,OAAO,mBAAmB,QAAQ,CAAC,CAAC,OAAO;GAC7C,OAAO,SAAS,SAAS;GACzB,OAAO,SAAS,KAAK,QAAQ;GAC7B,OAAO,WACJ,IAAI,KAAK,SAAS,GAAG,KAAK,SAAS,GAAG,KAAK,SAAS,GAAG,KAAK,SAAS,CAAC,CAAC,CACvE,YAAY,QAAQ;GACvB,OAAO,aAAa;GACpB,OAAO,kBAAkB,OAAO,KAAK;EACvC;EACA,MAAM,OAAO,kBAAkB,MAAM,IAAI;EACzC,KAAK,MAAM,YAAY,WAAW,SAAS,OAAO;EAClD,KAAK,MAAM,QAAQ,OACjB,IAAI,gBAAgB,sBAAsB,KAAK,eAAe;OACzD,qBAAqB,YAAY,IAAI;CAE9C;AACF"}
@@ -1,5 +1,4 @@
1
- import type { IAutoMovieRenderTextureResidency } from "@automovie/engine";
2
- import type { IAutoMovieCompiledFormationLod } from "@automovie/interface";
1
+ import type { IAutoMovieCompiledFormationLod, IAutoMovieRenderTextureResidency } from "@automovie/interface";
3
2
  import type { IFormationTierRepresentation } from "./IFormationTierRepresentation.js";
4
3
  /**
5
4
  * Describe every retained, reachable gait table from its actual owned texture.
@@ -1 +1 @@
1
- {"version":3,"file":"describeFormationTextureSources.mjs","names":[],"sources":["../../src/scene/describeFormationTextureSources.ts"],"sourcesContent":["import type {\n IAutoMovieRenderTextureResidency,\n IAutoMovieRenderTextureSource,\n} from \"@automovie/engine\";\nimport type { IAutoMovieCompiledFormationLod } from \"@automovie/interface\";\n\nimport type { IFormationTierRepresentation } from \"./IFormationTierRepresentation.js\";\nimport { readAutoMovieTextureSource } from \"./readAutoMovieTextureSource.js\";\n\n/**\n * Describe every retained, reachable gait table from its actual owned texture.\n * The bound includes declared takes that have not yet been uploaded, because a\n * later seek can retain them in this context. It is not an observed GLuint count.\n * Owner tuples preserve arbitrary formation and gait names without collisions.\n * Successful formation release clears the owning tier map, making observations\n * empty. Failed release retains that map as conservative potential ownership.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Enumerates each drawable tier's actual retained take textures and derives portable source metadata through readAutoMovieTextureSource; declared not-yet-uploaded takes count potential residency, not observed native GLuints, and JSON tuple owner identity preserves arbitrary formation/tier/gait names.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Projects the existing owner map into the render inventory format rather than tracking a second texture cache or allocating diagnostic GPU resources.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Reads real texture dimensions/type/source state and actual drawable-tier membership without fixture resident counts; asset omission is appropriate for generated runtime tables rather than inventing an authored file identity.\n * @evidence contracts/development/common.md#meaningful-documentation Gives reachable/potential versus uploaded-native distinction, collision-free owner tuples and successful owning-map release observation; the formation retains its maps after failed release so uncertainty is not reported as an empty population.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits T tier entries and K retained takes of drawable animated tiers, O(T+K) work and O(K) portable result storage; no image pixel decoding or population-slot traversal occurs.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses owned DataTextures and canonical metadata extraction; mutable tier membership/source/upload state requires current reads, so no formation-name-only inventory cache is retained.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows representation/texture objects and returns scalar source descriptions with generated owner strings; retains no native handle or task. The formation lifetime owner controls disposal and retains the existing map and resource closures after failure until that owner ends.\n */\nexport const describeFormationTextureSources: (\n formation: string,\n representations: ReadonlyMap<\n IAutoMovieCompiledFormationLod[\"tier\"],\n IFormationTierRepresentation\n >,\n drawableTiers: ReadonlySet<IAutoMovieCompiledFormationLod[\"tier\"]>,\n) => NonNullable<IAutoMovieRenderTextureResidency[\"runtimeTextures\"]> = (\n formation: string,\n representations: ReadonlyMap<\n IAutoMovieCompiledFormationLod[\"tier\"],\n IFormationTierRepresentation\n >,\n drawableTiers: ReadonlySet<IAutoMovieCompiledFormationLod[\"tier\"]>,\n): NonNullable<IAutoMovieRenderTextureResidency[\"runtimeTextures\"]> => {\n const sources: NonNullable<\n IAutoMovieRenderTextureResidency[\"runtimeTextures\"]\n >[number][] = [];\n for (const [tier, representation] of representations) {\n if (!drawableTiers.has(tier) || representation.cycle === null) continue;\n for (const take of representation.cycle.takes.values()) {\n const owner: string = `formation-cycle:${JSON.stringify([formation, tier, take.gait])}`;\n const { asset: _asset, ...texture }: IAutoMovieRenderTextureSource =\n readAutoMovieTextureSource(owner, take.texture);\n sources.push({ owner, texture });\n }\n }\n return sources;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,MAAa,mCAQX,WACA,iBAIA,kBACqE;CACrE,MAAM,UAEQ,CAAC;CACf,KAAK,MAAM,CAAC,MAAM,mBAAmB,iBAAiB;EACpD,IAAI,CAAC,cAAc,IAAI,IAAI,KAAK,eAAe,UAAU,MAAM;EAC/D,KAAK,MAAM,QAAQ,eAAe,MAAM,MAAM,OAAO,GAAG;GACtD,MAAM,QAAgB,mBAAmB,KAAK,UAAU;IAAC;IAAW;IAAM,KAAK;GAAI,CAAC;GACpF,MAAM,EAAE,OAAO,QAAQ,GAAG,YACxB,2BAA2B,OAAO,KAAK,OAAO;GAChD,QAAQ,KAAK;IAAE;IAAO;GAAQ,CAAC;EACjC;CACF;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"describeFormationTextureSources.mjs","names":[],"sources":["../../src/scene/describeFormationTextureSources.ts"],"sourcesContent":["import type {\n IAutoMovieCompiledFormationLod,\n IAutoMovieRenderTextureResidency,\n IAutoMovieRenderTextureSource,\n} from \"@automovie/interface\";\n\nimport type { IFormationTierRepresentation } from \"./IFormationTierRepresentation.js\";\nimport { readAutoMovieTextureSource } from \"./readAutoMovieTextureSource.js\";\n\n/**\n * Describe every retained, reachable gait table from its actual owned texture.\n * The bound includes declared takes that have not yet been uploaded, because a\n * later seek can retain them in this context. It is not an observed GLuint count.\n * Owner tuples preserve arbitrary formation and gait names without collisions.\n * Successful formation release clears the owning tier map, making observations\n * empty. Failed release retains that map as conservative potential ownership.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Enumerates each drawable tier's actual retained take textures and derives portable source metadata through readAutoMovieTextureSource; declared not-yet-uploaded takes count potential residency, not observed native GLuints, and JSON tuple owner identity preserves arbitrary formation/tier/gait names.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Projects the existing owner map into the render inventory format rather than tracking a second texture cache or allocating diagnostic GPU resources.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Reads real texture dimensions/type/source state and actual drawable-tier membership without fixture resident counts; asset omission is appropriate for generated runtime tables rather than inventing an authored file identity.\n * @evidence contracts/development/common.md#meaningful-documentation Gives reachable/potential versus uploaded-native distinction, collision-free owner tuples and successful owning-map release observation; the formation retains its maps after failed release so uncertainty is not reported as an empty population.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits T tier entries and K retained takes of drawable animated tiers, O(T+K) work and O(K) portable result storage; no image pixel decoding or population-slot traversal occurs.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses owned DataTextures and canonical metadata extraction; mutable tier membership/source/upload state requires current reads, so no formation-name-only inventory cache is retained.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows representation/texture objects and returns scalar source descriptions with generated owner strings; retains no native handle or task. The formation lifetime owner controls disposal and retains the existing map and resource closures after failure until that owner ends.\n */\nexport const describeFormationTextureSources: (\n formation: string,\n representations: ReadonlyMap<\n IAutoMovieCompiledFormationLod[\"tier\"],\n IFormationTierRepresentation\n >,\n drawableTiers: ReadonlySet<IAutoMovieCompiledFormationLod[\"tier\"]>,\n) => NonNullable<IAutoMovieRenderTextureResidency[\"runtimeTextures\"]> = (\n formation: string,\n representations: ReadonlyMap<\n IAutoMovieCompiledFormationLod[\"tier\"],\n IFormationTierRepresentation\n >,\n drawableTiers: ReadonlySet<IAutoMovieCompiledFormationLod[\"tier\"]>,\n): NonNullable<IAutoMovieRenderTextureResidency[\"runtimeTextures\"]> => {\n const sources: NonNullable<\n IAutoMovieRenderTextureResidency[\"runtimeTextures\"]\n >[number][] = [];\n for (const [tier, representation] of representations) {\n if (!drawableTiers.has(tier) || representation.cycle === null) continue;\n for (const take of representation.cycle.takes.values()) {\n const owner: string = `formation-cycle:${JSON.stringify([formation, tier, take.gait])}`;\n const { asset: _asset, ...texture }: IAutoMovieRenderTextureSource =\n readAutoMovieTextureSource(owner, take.texture);\n sources.push({ owner, texture });\n }\n }\n return sources;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,MAAa,mCAQX,WACA,iBAIA,kBACqE;CACrE,MAAM,UAEQ,CAAC;CACf,KAAK,MAAM,CAAC,MAAM,mBAAmB,iBAAiB;EACpD,IAAI,CAAC,cAAc,IAAI,IAAI,KAAK,eAAe,UAAU,MAAM;EAC/D,KAAK,MAAM,QAAQ,eAAe,MAAM,MAAM,OAAO,GAAG;GACtD,MAAM,QAAgB,mBAAmB,KAAK,UAAU;IAAC;IAAW;IAAM,KAAK;GAAI,CAAC;GACpF,MAAM,EAAE,OAAO,QAAQ,GAAG,YACxB,2BAA2B,OAAO,KAAK,OAAO;GAChD,QAAQ,KAAK;IAAE;IAAO;GAAQ,CAAC;EACjC;CACF;CACA,OAAO;AACT"}
@@ -4,7 +4,7 @@
4
4
  * callers without introducing another implementation or a forwarding function.
5
5
  */
6
6
  export { sampleFormationMotion, sampleFormationSlotMotion, selectFormationLod, } from "@automovie/engine";
7
- export type { IAutoMovieFormationLodInput, IAutoMovieFormationLodSelection, } from "@automovie/engine";
7
+ export type { IAutoMovieFormationLodInput, IAutoMovieFormationLodSelection, } from "@automovie/interface";
8
8
  export type { IAutoMovieFormationViewerStats } from "../IAutoMovieFormationViewerStats.js";
9
9
  export type { IAutoMovieFormationViewerObject } from "../IAutoMovieFormationViewerObject.js";
10
10
  export { buildInstancedFormation } from "../buildInstancedFormation.js";
@@ -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":"formationCycleCadence.mjs","names":[],"sources":["../../src/scene/formationCycleCadence.ts"],"sourcesContent":["import type { IAutoMovieFormationCadenceSegment } from \"@automovie/engine\";\n\nimport type { IAutoMovieFormationCadence } from \"./IAutoMovieFormationCadence.js\";\nimport type { IAutoMovieFormationCycle } from \"./IAutoMovieFormationCycle.js\";\nimport type { IAutoMovieFormationCycleTake } from \"./IAutoMovieFormationCycleTake.js\";\n\n/**\n * Fold one unit's cue segments into the cycles its members have turned over.\n *\n * The two accumulators are what a member needs and all it needs: everyone in a\n * unit covers the unit's travel, while a turn carries a member over ground\n * proportional to its own distance from the pivot, so the outer file of a\n * wheeling unit steps as many times as the ground under it requires and the\n * inner file steps fewer. A member composes them from its own radius.\n *\n * Segments are folded rather than sampled because stride belongs to the take:\n * where a unit walks one cue and runs the next, the second cue's ground is\n * counted in the second cue's strides. That is also what keeps a change of\n * action from jumping the cycle, since everything already turned over stays\n * turned over.\n *\n * A take that carries a body nowhere is played on its own period instead, which\n * is the difference between a crowd standing at ease and a crowd frozen.\n * This integration uses the bake's stride estimate; it does not prove exact\n * foot contact or no-slip motion for arbitrary gait paths.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Folds engine cue segments in order using each selected take's distance/turn per estimated stride, or elapsed seconds per period for zero-stride takes; finite admitted segment quantities and positive take periods are premises, with absent/unknown gait using this tier's declared fallback and stride remaining a contact heuristic.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps two absolute accumulators and final selected take together so cue changes preserve prior integrated phase without per-member animation clocks or a duplicated gait table selector.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Zero-stride period playback and fallback take are explicit movement/repertoire policies, not asset-name exceptions; no external clock, frame-history compensation or fixture travel distance is read.\n * @evidence contracts/development/common.md#meaningful-documentation Explains distance versus period integration, turn-radius composition, cross-cue continuity and the stride approximation rather than claiming arbitrary exact contact.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits S segments once with constant-time take Map lookups and two scalar accumulators, O(S) CPU and constant adapter storage independent of anonymous member count.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Uses the cycle's existing take records/textures and folds once per tier update for all members; changed absolute segment input requires reintegration, with no previous-frame accumulation cache.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returns a small record borrowing one cycle-owned take and retains no segment/cycle after return; this arithmetic acquires no texture, native task or animation timer.\n */\nexport const formationCycleCadence: (\n cycle: IAutoMovieFormationCycle,\n segments: readonly IAutoMovieFormationCadenceSegment[],\n) => IAutoMovieFormationCadence = (\n cycle: IAutoMovieFormationCycle,\n segments: readonly IAutoMovieFormationCadenceSegment[],\n): IAutoMovieFormationCadence => {\n let take: IAutoMovieFormationCycleTake = cycle.fallback;\n let advance: number = 0;\n let turn: number = 0;\n for (const segment of segments) {\n take =\n (segment.gait === null ? undefined : cycle.takes.get(segment.gait)) ??\n cycle.fallback;\n if (take.strideMeters > 0) {\n advance += segment.distance / take.strideMeters;\n turn += segment.turn / take.strideMeters;\n } else advance += segment.seconds / take.periodSeconds;\n }\n return { take, advance, turn };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,yBAIX,OACA,aAC+B;CAC/B,IAAI,OAAqC,MAAM;CAC/C,IAAI,UAAkB;CACtB,IAAI,OAAe;CACnB,KAAK,MAAM,WAAW,UAAU;EAC9B,QACG,QAAQ,SAAS,OAAO,KAAA,IAAY,MAAM,MAAM,IAAI,QAAQ,IAAI,MACjE,MAAM;EACR,IAAI,KAAK,eAAe,GAAG;GACzB,WAAW,QAAQ,WAAW,KAAK;GACnC,QAAQ,QAAQ,OAAO,KAAK;EAC9B,OAAO,WAAW,QAAQ,UAAU,KAAK;CAC3C;CACA,OAAO;EAAE;EAAM;EAAS;CAAK;AAC/B"}
1
+ {"version":3,"file":"formationCycleCadence.mjs","names":[],"sources":["../../src/scene/formationCycleCadence.ts"],"sourcesContent":["import type { IAutoMovieFormationCadenceSegment } from \"@automovie/interface\";\n\nimport type { IAutoMovieFormationCadence } from \"./IAutoMovieFormationCadence.js\";\nimport type { IAutoMovieFormationCycle } from \"./IAutoMovieFormationCycle.js\";\nimport type { IAutoMovieFormationCycleTake } from \"./IAutoMovieFormationCycleTake.js\";\n\n/**\n * Fold one unit's cue segments into the cycles its members have turned over.\n *\n * The two accumulators are what a member needs and all it needs: everyone in a\n * unit covers the unit's travel, while a turn carries a member over ground\n * proportional to its own distance from the pivot, so the outer file of a\n * wheeling unit steps as many times as the ground under it requires and the\n * inner file steps fewer. A member composes them from its own radius.\n *\n * Segments are folded rather than sampled because stride belongs to the take:\n * where a unit walks one cue and runs the next, the second cue's ground is\n * counted in the second cue's strides. That is also what keeps a change of\n * action from jumping the cycle, since everything already turned over stays\n * turned over.\n *\n * A take that carries a body nowhere is played on its own period instead, which\n * is the difference between a crowd standing at ease and a crowd frozen.\n * This integration uses the bake's stride estimate; it does not prove exact\n * foot contact or no-slip motion for arbitrary gait paths.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Folds engine cue segments in order using each selected take's distance/turn per estimated stride, or elapsed seconds per period for zero-stride takes; finite admitted segment quantities and positive take periods are premises, with absent/unknown gait using this tier's declared fallback and stride remaining a contact heuristic.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps two absolute accumulators and final selected take together so cue changes preserve prior integrated phase without per-member animation clocks or a duplicated gait table selector.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Zero-stride period playback and fallback take are explicit movement/repertoire policies, not asset-name exceptions; no external clock, frame-history compensation or fixture travel distance is read.\n * @evidence contracts/development/common.md#meaningful-documentation Explains distance versus period integration, turn-radius composition, cross-cue continuity and the stride approximation rather than claiming arbitrary exact contact.\n * @evidence contracts/development/implementation.md#efficient-algorithms Visits S segments once with constant-time take Map lookups and two scalar accumulators, O(S) CPU and constant adapter storage independent of anonymous member count.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Uses the cycle's existing take records/textures and folds once per tier update for all members; changed absolute segment input requires reintegration, with no previous-frame accumulation cache.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returns a small record borrowing one cycle-owned take and retains no segment/cycle after return; this arithmetic acquires no texture, native task or animation timer.\n */\nexport const formationCycleCadence: (\n cycle: IAutoMovieFormationCycle,\n segments: readonly IAutoMovieFormationCadenceSegment[],\n) => IAutoMovieFormationCadence = (\n cycle: IAutoMovieFormationCycle,\n segments: readonly IAutoMovieFormationCadenceSegment[],\n): IAutoMovieFormationCadence => {\n let take: IAutoMovieFormationCycleTake = cycle.fallback;\n let advance: number = 0;\n let turn: number = 0;\n for (const segment of segments) {\n take =\n (segment.gait === null ? undefined : cycle.takes.get(segment.gait)) ??\n cycle.fallback;\n if (take.strideMeters > 0) {\n advance += segment.distance / take.strideMeters;\n turn += segment.turn / take.strideMeters;\n } else advance += segment.seconds / take.periodSeconds;\n }\n return { take, advance, turn };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,yBAIX,OACA,aAC+B;CAC/B,IAAI,OAAqC,MAAM;CAC/C,IAAI,UAAkB;CACtB,IAAI,OAAe;CACnB,KAAK,MAAM,WAAW,UAAU;EAC9B,QACG,QAAQ,SAAS,OAAO,KAAA,IAAY,MAAM,MAAM,IAAI,QAAQ,IAAI,MACjE,MAAM;EACR,IAAI,KAAK,eAAe,GAAG;GACzB,WAAW,QAAQ,WAAW,KAAK;GACnC,QAAQ,QAAQ,OAAO,KAAK;EAC9B,OAAO,WAAW,QAAQ,UAAU,KAAK;CAC3C;CACA,OAAO;EAAE;EAAM;EAAS;CAAK;AAC/B"}
@@ -1,8 +1,8 @@
1
+ import type { IAutoMovieHumanSkeleton } from "@automovie/interface";
1
2
  import type * as THREE from "three";
2
3
  /**
3
- * Structural inputs and actual drawing handles for the original polygon
4
- * mannequin. Human's public skeleton output is structurally assignable; no
5
- * generator or example motion is imported by this optional Viewer entry.
4
+ * Actual Three drawing handles for the original polygon mannequin.
5
+ * Inputs use the canonical Human skeleton bone and placement contracts directly.
6
6
  *
7
7
  * The mannequin stays deliberately simple: a fix corrects a wrong value within
8
8
  * the same primitives and segment count, never adds geometry, detail or
@@ -10,61 +10,11 @@ import type * as THREE from "three";
10
10
  * checks and diffusion hints.
11
11
  *
12
12
  * @evidence contracts/development/common.md#meaningful-documentation Documents frames, units, source exterior requirements, actual mesh registries and rigid-joint limitations.
13
- * @evidence contracts/development/design.md#principled-representation Represents Structural inputs and actual drawing handles for the original polygon mannequin: companion namespace of 4 members (`IInput`, `IBone`, `IPlacement`, `IDrawing`); units and frames named in its text: frame, metres, metre, quaternion, local. It has no optional member, so no absent-value state combines with another.
14
- * @evidence contracts/development/design.md#minimal-and-owned-surface Owned by the module that declares `AutoMovieHumanPolygon` in packages/render/src/scene/human-polygon/AutoMovieHumanPolygon.ts; its surface is the 4 members listed and the text shows 21 other files naming it, mostly movies (10), packages/render (8), test (3), so no member is declared for a presumed future need.
15
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Scanning the declaration finds no `any`, no `unknown`, no index signature and no cast; it duplicates no type that another owner declares as far as a name search shows.
13
+ * @evidence contracts/development/design.md#principled-representation Represents Structural inputs and actual drawing handles for the original polygon mannequin: one renderer-owned drawing handle; Human owns registered skeletal data and the renderer owns concrete native objects.
14
+ * @evidence contracts/development/design.md#minimal-and-owned-surface Owned by the module that declares `AutoMovieHumanPolygon` in packages/render/src/scene/human-polygon/AutoMovieHumanPolygon.ts; its retained IDrawing serves native display consumers; skeletal inputs are shared through IAutoMovieHumanSkeleton.
15
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts Scanning the declaration finds no `any`, no `unknown`, no index signature and no cast; the native drawing handle borrows canonical Human placements rather than restating their shape.
16
16
  */
17
17
  export declare namespace AutoMovieHumanPolygon {
18
- /**
19
- * A fixed body's rest joints and its evaluated placement in the body frame.
20
- *
21
- * @evidence contracts/development/design.md#principled-representation Supplies rest joints, posed transforms and source neck/head exterior independently rather than deriving one from a display approximation.
22
- * @evidence contracts/development/design.md#minimal-and-owned-surface Contains only fields read by the renderer; generator outputs may carry additional provenance and clinical diagnostics.
23
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The descriptor contains no person selector, authored motion or fitted replacement surface.
24
- * @evidence contracts/development/common.md#meaningful-documentation States fixed-rest, pose and optional exterior meanings; the builder requires the exterior for its original neck/head geometry.
25
- */
26
- interface IInput {
27
- /** Rest joints in registered body metres, parent before child. */
28
- bones: IBone[];
29
- /** Evaluated placements in the body frame, including custom joints. */
30
- posed: IPlacement[];
31
- }
32
- /**
33
- * One original rest joint and the segment leaving it.
34
- *
35
- * @evidence contracts/development/design.md#principled-representation Uses registered joint/tip positions and supplied girth radius, preserving the original polygon construction inputs.
36
- * @evidence contracts/development/design.md#minimal-and-owned-surface One bone record serves rest topology and shape selection.
37
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Custom bone identifiers remain ordinary strings and no absent endpoint is synthesized by this contract.
38
- * @evidence contracts/development/common.md#meaningful-documentation Gives metre dimensions, parent identity and null endpoint meaning.
39
- */
40
- interface IBone {
41
- /** Stable evaluator bone identity. */
42
- bone: string;
43
- /** Parent identity, or null at a root. */
44
- parent: string | null;
45
- /** Registered rest joint centre in metres. */
46
- position: [number, number, number];
47
- /** Leaf segment endpoint in metres; null delegates its end to a child. */
48
- tip: [number, number, number] | null;
49
- /** Positive girth radius of the segment, metres. */
50
- radius: number;
51
- }
52
- /**
53
- * A bone's rigid placement relative to its fixed rest joint.
54
- *
55
- * @evidence contracts/development/design.md#principled-representation Position is the evaluated joint in body metres and rotation is a unit bind-relative quaternion; flat display groups consume both once.
56
- * @evidence contracts/development/design.md#minimal-and-owned-surface One transform drives the matching surface and diagnostic groups.
57
- * @evidence contracts/development/design.md#prohibited-design-shortcuts No parent rotation is composed again and no quaternion normalization conceals invalid evaluator data.
58
- * @evidence contracts/development/common.md#meaningful-documentation Gives stable identity, body frame, bind-relative meaning and quaternion component order.
59
- */
60
- interface IPlacement {
61
- /** Stable bone identity, including joints outside the humanoid vocabulary. */
62
- bone: string;
63
- /** Evaluated joint centre in body-frame metres. */
64
- position: [number, number, number];
65
- /** Unit bind-relative quaternion `[x,y,z,w]` in the body frame. */
66
- rotation: [number, number, number, number];
67
- }
68
18
  /**
69
19
  * Actual rigid polygon drawing and its owned resource lifetime.
70
20
  *
@@ -108,7 +58,7 @@ export declare namespace AutoMovieHumanPolygon {
108
58
  * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses stable groups, geometry and matrices; mutable input placements are admitted on every call rather than cached by identity.
109
59
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Temporary placement references expire after the call; drawing resources retain their existing owner and no clock or task is acquired.
110
60
  */
111
- setPose: (output: Pick<IInput, "posed">) => void;
61
+ setPose: (output: Pick<IAutoMovieHumanSkeleton.IOutput, "posed">) => void;
112
62
  /**
113
63
  * Replace emitted-part RGB overrides; undefined restores the borrowed clay material.
114
64
  *
@@ -1,5 +1,5 @@
1
+ import type { IAutoMovieHumanSkeleton } from "@automovie/interface";
1
2
  import type * as THREE from "three";
2
- import type { AutoMovieHumanPolygon } from "./AutoMovieHumanPolygon.js";
3
3
  /**
4
4
  * Apply one complete evaluated body-frame pose to the actual flat polygon
5
5
  * groups and their diagnostics. Each local probe is a registered rest point
@@ -13,4 +13,4 @@ import type { AutoMovieHumanPolygon } from "./AutoMovieHumanPolygon.js";
13
13
  * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses actual groups, geometry and matrices; mutable pose records are revalidated rather than cached by identity.
14
14
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Placement references live only in the call-local map; no GPU object, clock, task or retained cache is acquired.
15
15
  */
16
- export declare function applyHumanPolygonPose(object: THREE.Group, bindings: ReadonlyMap<string, readonly THREE.Object3D[]>, required: readonly string[], output: Pick<AutoMovieHumanPolygon.IInput, "posed">): void;
16
+ export declare function applyHumanPolygonPose(object: THREE.Group, bindings: ReadonlyMap<string, readonly THREE.Object3D[]>, required: readonly string[], output: Pick<Pick<IAutoMovieHumanSkeleton.IOutput, "bones" | "posed">, "posed">): void;
@@ -1 +1 @@
1
- {"version":3,"file":"applyHumanPolygonPose.js","sourceRoot":"","sources":["../../../src/scene/human-polygon/applyHumanPolygonPose.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;GAYG;AACH,+BACE,MAAmB,EACnB,QAAwD,EACxD,QAA2B,EAC3B,MAAmD;IAEnD,MAAM,UAAU,GAAkD,IAAI,GAAG,EAAE,CAAC;IAC5E,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACrC,MAAM,CAAC,GAAiD,SAAS,CAAC,QAAQ,CAAC;QAC3E,MAAM,CAAC,GAAiD,SAAS,CAAC,QAAQ,CAAC;QAC3E,IACE,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC;YAC9B,CAAC,CAAC,MAAM,KAAK,CAAC;YACd,CAAC,CAAC,MAAM,K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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI;YAElE,MAAM,IAAI,KAAK,CACb,2CAA2C,SAAS,CAAC,IAAI,EAAE,CAC5D,CAAC;QACJ,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC5C,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,QAAQ;QACzB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAAC;IAE1D,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,QAAQ,EAAE,CAAC;QACvC,MAAM,SAAS,GAAiC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;QACtE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC3C,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC7C,MAAM,CAAC,YAAY,EAAE,CAAC;QACxB,CAAC;IACH,CAAC;IACD,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"applyHumanPolygonPose.mjs","names":[],"sources":["../../../src/scene/human-polygon/applyHumanPolygonPose.ts"],"sourcesContent":["import type * as THREE from \"three\";\n\nimport type { AutoMovieHumanPolygon } from \"./AutoMovieHumanPolygon.js\";\n\n/**\n * Apply one complete evaluated body-frame pose to the actual flat polygon\n * groups and their diagnostics. Each local probe is a registered rest point\n * minus its bone's rest joint; the actor parent transform composes once.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Builds an admitted bone placement map before any write, rejects missing/duplicate slots, malformed/nonfinite tuples and squared quaternion norm error above 1e-6, then copies each bind-relative body transform to both existing groups and refreshes ancestor/subtree matrices. Required identities come from the fixed rest descriptor, including custom bones; normalization and parent-FK recomposition are deliberately absent.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One adapter owns complete-pose admission and actual group writes; fixed shape generation, clinical evaluation and actor-root placement stay with their respective owners.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses actual authored bone ids and mesh frames, without humanoid casts, hidden scale or contact-proxy substitutions.\n * @evidence contracts/development/common.md#meaningful-documentation Gives atomic admission, numerical tolerance, flat-group frame, local probe convention and actor-root ownership.\n * @evidence contracts/development/implementation.md#efficient-algorithms O(B+G+A+O) work for B supplied/required bones, G bound groups, A ancestors and O subtree nodes; one O(B) temporary map avoids repeated placement scans and no geometry is rebuilt.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses actual groups, geometry and matrices; mutable pose records are revalidated rather than cached by identity.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Placement references live only in the call-local map; no GPU object, clock, task or retained cache is acquired.\n */\nexport function applyHumanPolygonPose(\n object: THREE.Group,\n bindings: ReadonlyMap<string, readonly THREE.Object3D[]>,\n required: readonly string[],\n output: Pick<AutoMovieHumanPolygon.IInput, \"posed\">,\n): void {\n const placements: Map<string, AutoMovieHumanPolygon.IPlacement> = new Map();\n for (const placement of output.posed) {\n const p: AutoMovieHumanPolygon.IPlacement[\"position\"] = placement.position;\n const q: AutoMovieHumanPolygon.IPlacement[\"rotation\"] = placement.rotation;\n if (\n placements.has(placement.bone) ||\n p.length !== 3 ||\n q.length !== 4 ||\n !Number.isFinite(p[0]) ||\n !Number.isFinite(p[1]) ||\n !Number.isFinite(p[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 or duplicate polygon placement: ${placement.bone}`,\n );\n placements.set(placement.bone, placement);\n }\n for (const bone of required)\n if (!placements.has(bone))\n throw new Error(`Missing polygon placement: ${bone}`);\n\n for (const [bone, targets] of bindings) {\n const placement: AutoMovieHumanPolygon.IPlacement = placements.get(bone)!;\n for (const target of targets) {\n target.position.set(...placement.position);\n target.quaternion.set(...placement.rotation);\n target.updateMatrix();\n }\n }\n object.updateWorldMatrix(true, true);\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAgB,sBACd,QACA,UACA,UACA,QACM;CACN,MAAM,6BAA4D,IAAI,IAAI;CAC1E,KAAK,MAAM,aAAa,OAAO,OAAO;EACpC,MAAM,IAAkD,UAAU;EAClE,MAAM,IAAkD,UAAU;EAClE,IACE,WAAW,IAAI,UAAU,IAAI,KAC7B,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,2CAA2C,UAAU,MACvD;EACF,WAAW,IAAI,UAAU,MAAM,SAAS;CAC1C;CACA,KAAK,MAAM,QAAQ,UACjB,IAAI,CAAC,WAAW,IAAI,IAAI,GACtB,MAAM,IAAI,MAAM,8BAA8B,MAAM;CAExD,KAAK,MAAM,CAAC,MAAM,YAAY,UAAU;EACtC,MAAM,YAA8C,WAAW,IAAI,IAAI;EACvE,KAAK,MAAM,UAAU,SAAS;GAC5B,OAAO,SAAS,IAAI,GAAG,UAAU,QAAQ;GACzC,OAAO,WAAW,IAAI,GAAG,UAAU,QAAQ;GAC3C,OAAO,aAAa;EACtB;CACF;CACA,OAAO,kBAAkB,MAAM,IAAI;AACrC"}
1
+ {"version":3,"file":"applyHumanPolygonPose.mjs","names":[],"sources":["../../../src/scene/human-polygon/applyHumanPolygonPose.ts"],"sourcesContent":["import type {\n IAutoMovieHumanBonePlacement,\n IAutoMovieHumanSkeleton,\n} from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\n/**\n * Apply one complete evaluated body-frame pose to the actual flat polygon\n * groups and their diagnostics. Each local probe is a registered rest point\n * minus its bone's rest joint; the actor parent transform composes once.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Builds an admitted bone placement map before any write, rejects missing/duplicate slots, malformed/nonfinite tuples and squared quaternion norm error above 1e-6, then copies each bind-relative body transform to both existing groups and refreshes ancestor/subtree matrices. Required identities come from the fixed rest descriptor, including custom bones; normalization and parent-FK recomposition are deliberately absent.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One adapter owns complete-pose admission and actual group writes; fixed shape generation, clinical evaluation and actor-root placement stay with their respective owners.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses actual authored bone ids and mesh frames, without humanoid casts, hidden scale or contact-proxy substitutions.\n * @evidence contracts/development/common.md#meaningful-documentation Gives atomic admission, numerical tolerance, flat-group frame, local probe convention and actor-root ownership.\n * @evidence contracts/development/implementation.md#efficient-algorithms O(B+G+A+O) work for B supplied/required bones, G bound groups, A ancestors and O subtree nodes; one O(B) temporary map avoids repeated placement scans and no geometry is rebuilt.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses actual groups, geometry and matrices; mutable pose records are revalidated rather than cached by identity.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Placement references live only in the call-local map; no GPU object, clock, task or retained cache is acquired.\n */\nexport function applyHumanPolygonPose(\n object: THREE.Group,\n bindings: ReadonlyMap<string, readonly THREE.Object3D[]>,\n required: readonly string[],\n output: Pick<\n Pick<IAutoMovieHumanSkeleton.IOutput, \"bones\" | \"posed\">,\n \"posed\"\n >,\n): void {\n const placements: Map<string, IAutoMovieHumanBonePlacement> = new Map();\n for (const placement of output.posed) {\n const p: IAutoMovieHumanBonePlacement[\"position\"] = placement.position;\n const q: IAutoMovieHumanBonePlacement[\"rotation\"] = placement.rotation;\n if (\n placements.has(placement.bone) ||\n p.length !== 3 ||\n q.length !== 4 ||\n !Number.isFinite(p[0]) ||\n !Number.isFinite(p[1]) ||\n !Number.isFinite(p[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 or duplicate polygon placement: ${placement.bone}`,\n );\n placements.set(placement.bone, placement);\n }\n for (const bone of required)\n if (!placements.has(bone))\n throw new Error(`Missing polygon placement: ${bone}`);\n\n for (const [bone, targets] of bindings) {\n const placement: IAutoMovieHumanBonePlacement = placements.get(bone)!;\n for (const target of targets) {\n target.position.set(...placement.position);\n target.quaternion.set(...placement.rotation);\n target.updateMatrix();\n }\n }\n object.updateWorldMatrix(true, true);\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,SAAgB,sBACd,QACA,UACA,UACA,QAIM;CACN,MAAM,6BAAwD,IAAI,IAAI;CACtE,KAAK,MAAM,aAAa,OAAO,OAAO;EACpC,MAAM,IAA8C,UAAU;EAC9D,MAAM,IAA8C,UAAU;EAC9D,IACE,WAAW,IAAI,UAAU,IAAI,KAC7B,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,2CAA2C,UAAU,MACvD;EACF,WAAW,IAAI,UAAU,MAAM,SAAS;CAC1C;CACA,KAAK,MAAM,QAAQ,UACjB,IAAI,CAAC,WAAW,IAAI,IAAI,GACtB,MAAM,IAAI,MAAM,8BAA8B,MAAM;CAExD,KAAK,MAAM,CAAC,MAAM,YAAY,UAAU;EACtC,MAAM,YAA0C,WAAW,IAAI,IAAI;EACnE,KAAK,MAAM,UAAU,SAAS;GAC5B,OAAO,SAAS,IAAI,GAAG,UAAU,QAAQ;GACzC,OAAO,WAAW,IAAI,GAAG,UAAU,QAAQ;GAC3C,OAAO,aAAa;EACtB;CACF;CACA,OAAO,kBAAkB,MAAM,IAAI;AACrC"}
@@ -1,3 +1,4 @@
1
+ import type { IAutoMovieHumanSkeleton } from "@automovie/interface";
1
2
  import type { AutoMovieHumanPolygon } from "./AutoMovieHumanPolygon.js";
2
3
  /**
3
4
  * Draw a rigid polygon blockout from the generated skeleton, in metres.
@@ -34,7 +35,7 @@ import type { AutoMovieHumanPolygon } from "./AutoMovieHumanPolygon.js";
34
35
  * @evidence contracts/development/implementation.md#reuse-equivalent-work Parts share the default clay and diagnostic materials; matching RGB overrides share one current material, and sections reuse emitted ring positions.
35
36
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources A completed palette becomes owned before the previous pool retires. Independent cleanup attempts every remaining resource and detach operation once; retirement failures remain sticky, reject further colour changes and retain bounded uncertain owners without retry.
36
37
  */
37
- export declare function buildHumanPolygon(output: AutoMovieHumanPolygon.IInput, options?: {
38
+ export declare function buildHumanPolygon(output: Pick<IAutoMovieHumanSkeleton.IOutput, "bones" | "posed">, options?: {
38
39
  /** RGB hex overrides for matching emitted parts; omitted parts retain clay. */
39
40
  partColors?: Readonly<Record<string, number>>;
40
41
  }): AutoMovieHumanPolygon.IDrawing;
@@ -1 +1 @@
1
- {"version":3,"file":"buildHumanPolygon.js","sourceRoot":"","sources":["../../../src/scene/human-polygon/buildHumanPolygon.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAE/B,kGAA4F;AAE5F,yEAAmE;AACnE,6EAAuE;AACvE,2EAAqE;AACrE,iFAA2E;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,2BACE,MAAoC,EACpC,OAAO,GAGH,EAAE;IAEN,wDAAyB,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACvD,MAAM,KAAK,GAA6C,IAAI,GAAG,EAAE,CAAC;IAClE,MAAM,UAAU,GAAkD,IAAI,GAAG,EAAE,CAAC;IAC5E,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QAChC,IACE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YACpB,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;YAClB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;YAC7B,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;YACrC,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAEvD,MAAM,IAAI,KAAK,CAAC,kCAAkC,I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