@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":"applyAutoMovieInspectionShade.js","sourceRoot":"","sources":["../../../src/scene/inspection/applyAutoMovieInspectionShade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAG/B,8DAAwD;AACxD,wGAAkG;AAClG,yFAAmF;AAGnF,qHAAqH;AACrH,MAAM,MAAM,GAAW;;;;;;;;;;;;;;;;CAgBtB,CAAC;AAEF,8FAA8F;AAC9F,MAAM,QAAQ,GAAW;;;;;;;;;;CAUxB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,uCACE,KAAkB,EAClB,KAAwC;IAQxC,MAAM,IAAI,GACR,KAAK,KAAK,MAAM;QACd,CAAC,CAAC,IAAA,8EAAoC,EAClC,KAAK,EACL,QAAQ,EACR,GAAmB,EAAE,CACnB,IAAI,KAAK,CAAC,mBAAmB,CAAC;YAC5B,KAAK,EAAE,gEAA6B,CAAC,IAAI;YACzC,IAAI,EAAE,KAAK,CAAC,UAAU;YACtB,GAAG,EAAE,KAAK;SACX,CAAC,CACL;QACH,CAAC,CAAC,KAAK,KAAK,OAAO;YACjB,CAAC,CAAC,IAAA,8EAAoC,EAClC,KAAK,EACL,QAAQ,EACR,GAAmB,EAAE,CACnB,IAAI,KAAK,CAAC,cAAc,CAAC;gBACvB,QAAQ,EAAE;oBACR,UAAU,EAAE;wBACV,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,gEAA6B,CAAC,KAAK,CAAC;qBAC5D;oBACD,SAAS,EAAE;wBACT,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,gEAA6B,CAAC,IAAI,CAAC;qBAC3D;iBACF;gBACD,YAAY,EAAE,MAAM;gBACpB,cAAc,EAAE,QAAQ;gBACxB,IAAI,EAAE,KAAK,CAAC,UAAU;gBACtB,QAAQ,EAAE,IAAI;aACf,CAAC,CACL;YACH,CAAC,CAAC,IAAA,oCAAe,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO;QACL,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,GAAS,EAAE,GAAE,CAAC,CAAC;QACvC,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"applyAutoMovieInspectionShade.js","sourceRoot":"","sources":["../../../src/scene/inspection/applyAutoMovieInspectionShade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,M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AAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"applyAutoMovieInspectionShade.mjs","names":[],"sources":["../../../src/scene/inspection/applyAutoMovieInspectionShade.ts"],"sourcesContent":["import * as THREE from \"three\";\n\nimport type { IAutoMovieRenderModeHandle } from \"../IAutoMovieRenderModeHandle.js\";\nimport { applyRenderMode } from \"../applyRenderMode.js\";\nimport { overrideAutoMovieRenderModeMaterials } from \"../overrideAutoMovieRenderModeMaterials.js\";\nimport { AUTO_MOVIE_INSPECTION_PALETTE } from \"./AUTO_MOVIE_INSPECTION_PALETTE.js\";\nimport type { IAutoMovieInspectionRequest } from \"./IAutoMovieInspectionRequest.js\";\n\n/** Vertex stage of the faces shade: three.js's own deformation, projection and clipping chunks, with no lighting. */\nconst VERTEX: string = `\n#include <common>\n#include <batching_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <morphinstance_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <clipping_planes_vertex>\n}\n`;\n\n/** Fragment stage of the faces shade: one of two colours by the side of the triangle seen. */\nconst FRAGMENT: string = `\nuniform vec3 frontColor;\nuniform vec3 backColor;\n#include <common>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n gl_FragColor = vec4( gl_FrontFacing ? frontColor : backColor, 1.0 );\n #include <colorspace_fragment>\n}\n`;\n\n/**\n * Colour every surface of a scene by an inspection shade, and return the call that brings the shade to the scene's current pose and the call that puts the scene's own materials back.\n *\n * A guide pass is applied as `applyRenderMode` applies it. `clay` gives every mesh one grey, two-sided and lit by the scene's lights, so form reads without the film's colours. `faces` gives every mesh one unlit colour by the side seen, grey from the front and maroon from the back, so an inverted, open or inside-out surface shows where it is. Both inspection shades keep each mesh's skinning, morphing, instancing and formation cycle, and take section planes.\n *\n * A shade made of swapped materials follows the scene by itself, so its `update` does nothing. The `outline` and `pose` passes hold shells and segments of their own, and their `update` is the pass's.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States what each shade draws and reveals, what deformation the inspection shades keep, and which shades an update moves.\n * @evidence contracts/development/implementation.md#principled-implementation Facing is the GPU rasterizer's own front-face test on the deformed, projected triangle, so the back colour appears exactly where winding and view disagree.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One branch per shade family, each yielding the same handle; the two inspection shades differ only in the material their factory makes.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The shader is assembled from three.js's own chunks, so deformation and clipping are the renderer's, not a second implementation, and no mesh is skipped by name.\n * @evidence contracts/development/implementation.md#efficient-algorithms One material swap per mesh; the faces programs are shared by three.js across meshes with the same deformation.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Material swapping, cycle and skinning inheritance, restoration and disposal are `overrideAutoMovieRenderModeMaterials`'s, and guide passes are `applyRenderMode`'s.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Every override material, shell and segment is owned by the returned `restore`, which puts the originals back and disposes the overrides once; `update` allocates nothing.\n */\nexport function applyAutoMovieInspectionShade(\n scene: THREE.Scene,\n shade: IAutoMovieInspectionRequest.Shade,\n): {\n /** Bring the shade to the scene as it stands now; call it after every change of the scene and before drawing. */\n update: () => void;\n\n /** Put the scene's own materials back and release the shade. */\n restore: () => void;\n} {\n const pass: IAutoMovieRenderModeHandle =\n shade === \"clay\"\n ? overrideAutoMovieRenderModeMaterials(\n scene,\n \"beauty\",\n (): THREE.Material =>\n new THREE.MeshLambertMaterial({\n color: AUTO_MOVIE_INSPECTION_PALETTE.clay,\n side: THREE.DoubleSide,\n fog: false,\n }),\n )\n : shade === \"faces\"\n ? overrideAutoMovieRenderModeMaterials(\n scene,\n \"beauty\",\n (): THREE.Material =>\n new THREE.ShaderMaterial({\n uniforms: {\n frontColor: {\n value: new THREE.Color(AUTO_MOVIE_INSPECTION_PALETTE.front),\n },\n backColor: {\n value: new THREE.Color(AUTO_MOVIE_INSPECTION_PALETTE.back),\n },\n },\n vertexShader: VERTEX,\n fragmentShader: FRAGMENT,\n side: THREE.DoubleSide,\n clipping: true,\n }),\n )\n : applyRenderMode(scene, shade);\n return {\n update: pass.update ?? ((): void => {}),\n restore: pass.restore,\n };\n}\n"],"mappings":";;;;;;AASA,MAAM,SAAiB;;;;;;;;;;;;;;;;;;AAmBvB,MAAM,WAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BzB,SAAgB,8BACd,OACA,OAOA;CACA,MAAM,OACJ,UAAU,SACN,qCACE,OACA,gBAEE,IAAI,MAAM,oBAAoB;EAC5B,OAAO,8BAA8B;EACrC,MAAM,MAAM;EACZ,KAAK;CACP,CAAC,CACL,IACA,UAAU,UACR,qCACE,OACA,gBAEE,IAAI,MAAM,eAAe;EACvB,UAAU;GACR,YAAY,EACV,OAAO,IAAI,MAAM,MAAM,8BAA8B,KAAK,EAC5D;GACA,WAAW,EACT,OAAO,IAAI,MAAM,MAAM,8BAA8B,IAAI,EAC3D;EACF;EACA,cAAc;EACd,gBAAgB;EAChB,MAAM,MAAM;EACZ,UAAU;CACZ,CAAC,CACL,IACA,gBAAgB,OAAO,KAAK;CACpC,OAAO;EACL,QAAQ,KAAK,iBAAuB,CAAC;EACrC,SAAS,KAAK;CAChB;AACF"}
1
+ {"version":3,"file":"applyAutoMovieInspectionShade.mjs","names":[],"sources":["../../../src/scene/inspection/applyAutoMovieInspectionShade.ts"],"sourcesContent":["import type { AutoMovieInspectionShade } from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport type { IAutoMovieRenderModeHandle } from \"../IAutoMovieRenderModeHandle.js\";\nimport { applyRenderMode } from \"../applyRenderMode.js\";\nimport { overrideAutoMovieRenderModeMaterials } from \"../overrideAutoMovieRenderModeMaterials.js\";\nimport { AUTO_MOVIE_INSPECTION_PALETTE } from \"./AUTO_MOVIE_INSPECTION_PALETTE.js\";\n\n/** Vertex stage of the faces shade: three.js's own deformation, projection and clipping chunks, with no lighting. */\nconst VERTEX: string = `\n#include <common>\n#include <batching_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <morphinstance_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <clipping_planes_vertex>\n}\n`;\n\n/** Fragment stage of the faces shade: one of two colours by the side of the triangle seen. */\nconst FRAGMENT: string = `\nuniform vec3 frontColor;\nuniform vec3 backColor;\n#include <common>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n gl_FragColor = vec4( gl_FrontFacing ? frontColor : backColor, 1.0 );\n #include <colorspace_fragment>\n}\n`;\n\n/**\n * Colour every surface of a scene by an inspection shade, and return the call that brings the shade to the scene's current pose and the call that puts the scene's own materials back.\n *\n * A guide pass is applied as `applyRenderMode` applies it. `clay` gives every mesh one grey, two-sided and lit by the scene's lights, so form reads without the film's colours. `faces` gives every mesh one unlit colour by the side seen, grey from the front and maroon from the back, so an inverted, open or inside-out surface shows where it is. Both inspection shades keep each mesh's skinning, morphing, instancing and formation cycle, and take section planes.\n *\n * A shade made of swapped materials follows the scene by itself, so its `update` does nothing. The `outline` and `pose` passes hold shells and segments of their own, and their `update` is the pass's.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States what each shade draws and reveals, what deformation the inspection shades keep, and which shades an update moves.\n * @evidence contracts/development/implementation.md#principled-implementation Facing is the GPU rasterizer's own front-face test on the deformed, projected triangle, so the back colour appears exactly where winding and view disagree.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One branch per shade family, each yielding the same handle; the two inspection shades differ only in the material their factory makes.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The shader is assembled from three.js's own chunks, so deformation and clipping are the renderer's, not a second implementation, and no mesh is skipped by name.\n * @evidence contracts/development/implementation.md#efficient-algorithms One material swap per mesh; the faces programs are shared by three.js across meshes with the same deformation.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Material swapping, cycle and skinning inheritance, restoration and disposal are `overrideAutoMovieRenderModeMaterials`'s, and guide passes are `applyRenderMode`'s.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Every override material, shell and segment is owned by the returned `restore`, which puts the originals back and disposes the overrides once; `update` allocates nothing.\n */\nexport function applyAutoMovieInspectionShade(\n scene: THREE.Scene,\n shade: AutoMovieInspectionShade,\n): {\n /** Bring the shade to the scene as it stands now; call it after every change of the scene and before drawing. */\n update: () => void;\n\n /** Put the scene's own materials back and release the shade. */\n restore: () => void;\n} {\n const pass: IAutoMovieRenderModeHandle =\n shade === \"clay\"\n ? overrideAutoMovieRenderModeMaterials(\n scene,\n \"beauty\",\n (): THREE.Material =>\n new THREE.MeshLambertMaterial({\n color: AUTO_MOVIE_INSPECTION_PALETTE.clay,\n side: THREE.DoubleSide,\n fog: false,\n }),\n )\n : shade === \"faces\"\n ? overrideAutoMovieRenderModeMaterials(\n scene,\n \"beauty\",\n (): THREE.Material =>\n new THREE.ShaderMaterial({\n uniforms: {\n frontColor: {\n value: new THREE.Color(AUTO_MOVIE_INSPECTION_PALETTE.front),\n },\n backColor: {\n value: new THREE.Color(AUTO_MOVIE_INSPECTION_PALETTE.back),\n },\n },\n vertexShader: VERTEX,\n fragmentShader: FRAGMENT,\n side: THREE.DoubleSide,\n clipping: true,\n }),\n )\n : applyRenderMode(scene, shade);\n return {\n update: pass.update ?? ((): void => {}),\n restore: pass.restore,\n };\n}\n"],"mappings":";;;;;;AASA,MAAM,SAAiB;;;;;;;;;;;;;;;;;;AAmBvB,MAAM,WAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BzB,SAAgB,8BACd,OACA,OAOA;CACA,MAAM,OACJ,UAAU,SACN,qCACE,OACA,gBAEE,IAAI,MAAM,oBAAoB;EAC5B,OAAO,8BAA8B;EACrC,MAAM,MAAM;EACZ,KAAK;CACP,CAAC,CACL,IACA,UAAU,UACR,qCACE,OACA,gBAEE,IAAI,MAAM,eAAe;EACvB,UAAU;GACR,YAAY,EACV,OAAO,IAAI,MAAM,MAAM,8BAA8B,KAAK,EAC5D;GACA,WAAW,EACT,OAAO,IAAI,MAAM,MAAM,8BAA8B,IAAI,EAC3D;EACF;EACA,cAAc;EACd,gBAAgB;EAChB,MAAM,MAAM;EACZ,UAAU;CACZ,CAAC,CACL,IACA,gBAAgB,OAAO,KAAK;CACpC,OAAO;EACL,QAAQ,KAAK,iBAAuB,CAAC;EACrC,SAAS,KAAK;CAChB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildAutoMovieInspectionMarks.mjs","names":[],"sources":["../../../src/scene/inspection/buildAutoMovieInspectionMarks.ts"],"sourcesContent":["import type { IAutoMovieMark } from \"@automovie/engine\";\nimport * as THREE from \"three\";\nimport type { LineMaterial } from \"three/examples/jsm/lines/LineMaterial.js\";\nimport type { LineSegments2 } from \"three/examples/jsm/lines/LineSegments2.js\";\n\nimport type { IAutoMovieInspectionMarkSet } from \"./IAutoMovieInspectionMarkSet.js\";\nimport type { IAutoMovieInspectionOverlay } from \"./IAutoMovieInspectionOverlay.js\";\nimport { createAutoMovieInspectionDots } from \"./createAutoMovieInspectionDots.js\";\nimport { createAutoMovieInspectionStrokes } from \"./createAutoMovieInspectionStrokes.js\";\nimport { followAutoMovieInspectionSource } from \"./followAutoMovieInspectionSource.js\";\n\n/**\n * Build marks into drawable lines and points, one line object and one points object per anchor, that follow their anchors.\n *\n * Each shape is drawn as the mark type defines it: a polyline joins its places in order and closes back to its first when closed, segments are taken in pairs, an arrow is a shaft from its origin to its tip with a head of four short lines, and points are dots. Every vertex takes its mark's colour. An anchored set takes its anchor's world matrix, through the first instance when the anchor is an instanced mesh; a set without an anchor stays in world space wherever its object is attached.\n *\n * Vertices are written from the marks' own coordinate arrays on build and on every `update`, so an owner that rewrites a mark's coordinates in place moves its drawing. The number of vertices a mark has may not change after the build.\n *\n * It throws, naming the mark's path, for coordinates that are not whole finite xyz triples, a polyline of fewer than two places, segments that do not pair up, arrows whose origins and vectors differ in number, and a mark without coordinates.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States how each shape is drawn, the colour and placement rules, when coordinates are reread and the one thing that may not change, and every refusal.\n * @evidence contracts/development/implementation.md#principled-implementation Coordinates are in the anchor's local frame, so the drawn object takes the anchor's world matrix and the coordinates themselves are never transformed. An arrow head is drawn as four lines from the tip back a quarter of the arrow's length and out half of that on two perpendicular axes, a drawing convention that reads as a direction from any view.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Admission and counting per set, one fill of colours, one fill of positions shared by build and update, then the overlay record.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A malformed mark is refused instead of drawn short, and no kind or path changes how a mark is drawn.\n * @evidence contracts/development/implementation.md#efficient-algorithms Building and each update are linear in the drawn vertices; every set is at most two draw calls whatever the number of marks and colours.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work The line and point objects come from the shared factories and placement from `followAutoMovieInspectionSource`; the buffers built once are rewritten in place on every update.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The overlay owns its group, geometries and materials and releases them in `dispose`; it borrows the anchors and the marks' coordinate arrays.\n */\nexport function buildAutoMovieInspectionMarks(\n sets: readonly IAutoMovieInspectionMarkSet[],\n options: { stroke: number; xray: boolean },\n): IAutoMovieInspectionOverlay {\n const group: THREE.Group = new THREE.Group();\n const built: IBuilt[] = [];\n const color: THREE.Color = new THREE.Color();\n for (const set of sets) {\n // Admit every mark and count its vertices before allocating.\n let segments: number = 0;\n let points: number = 0;\n for (const { mark } of set.marks) {\n const count: { segments: number; points: number } = admit(mark);\n segments += count.segments;\n points += count.points;\n }\n\n // Colours are fixed for the build; positions are filled by `place`.\n const lines: Float32Array = new Float32Array(segments * 6);\n const lineColors: Float32Array = new Float32Array(segments * 6);\n const dots: Float32Array = new Float32Array(points * 3);\n const dotColors: Float32Array = new Float32Array(points * 3);\n let line: number = 0;\n let dot: number = 0;\n for (const { mark, color: hex } of set.marks) {\n color.setHex(hex);\n const count: { segments: number; points: number } = admit(mark);\n for (let v: number = 0; v < count.segments * 2; v++, line++)\n lineColors.set([color.r, color.g, color.b], line * 3);\n for (let v: number = 0; v < count.points; v++, dot++)\n dotColors.set([color.r, color.g, color.b], dot * 3);\n }\n\n const entry: IBuilt = {\n anchor: set.anchor,\n marks: set.marks.map(\n (pair: { mark: IAutoMovieMark }): IAutoMovieMark => pair.mark,\n ),\n lines,\n dots,\n strokes:\n segments === 0\n ? null\n : createAutoMovieInspectionStrokes(lines, lineColors, options),\n points:\n points === 0\n ? null\n : createAutoMovieInspectionDots(dots, dotColors, options),\n };\n write(entry);\n if (entry.strokes !== null) group.add(entry.strokes);\n if (entry.points !== null) group.add(entry.points);\n built.push(entry);\n }\n\n const instance: THREE.Matrix4 = new THREE.Matrix4();\n return {\n object: group,\n update: (): void => {\n for (const entry of built) {\n write(entry);\n for (const object of [entry.strokes, entry.points])\n if (object !== null) place(object, entry.anchor, instance);\n }\n },\n resize: (width: number, height: number): void => {\n for (const entry of built)\n if (entry.strokes !== null)\n (entry.strokes.material as LineMaterial).resolution.set(\n width,\n height,\n );\n },\n dispose: (): void => {\n group.removeFromParent();\n for (const entry of built)\n for (const object of [entry.strokes, entry.points])\n if (object !== null) {\n object.geometry.dispose();\n (object.material as THREE.Material).dispose();\n }\n },\n };\n}\n\n/** One anchor's built marks: the marks, their vertex buffers and the objects drawing them. */\ninterface IBuilt {\n /** The anchor, or null for world space. */\n anchor: THREE.Object3D | null;\n\n /** The marks, in build order. */\n marks: IAutoMovieMark[];\n\n /** Two xyz vertices per line segment, shared with the line geometry. */\n lines: Float32Array;\n\n /** One xyz vertex per dot, shared with the points geometry. */\n dots: Float32Array;\n\n /** The line object, absent when no mark draws a line. */\n strokes: LineSegments2 | null;\n\n /** The points object, absent when no mark draws a dot. */\n points: THREE.Points | null;\n}\n\n/** The line segments and dots a mark draws, after refusing a malformed mark. */\nfunction admit(mark: IAutoMovieMark): { segments: number; points: number } {\n const refuse: (problem: string) => never = (problem: string): never => {\n throw new Error(`Mark \"${mark.path}\" of kind ${mark.kind} ${problem}`);\n };\n const triples: (values: readonly number[], name: string) => number = (\n values: readonly number[],\n name: string,\n ): number => {\n if (values.length % 3 !== 0)\n refuse(`holds ${values.length} ${name} components, not xyz triples`);\n if (!values.every(Number.isFinite)) refuse(`holds a non-finite ${name}`);\n return values.length / 3;\n };\n const shape: IAutoMovieMark.Shape = mark.shape;\n if (shape.type === \"points\") {\n const n: number = triples(shape.points, \"point\");\n if (n === 0) refuse(\"has no point\");\n return { segments: 0, points: n };\n }\n if (shape.type === \"polyline\") {\n const n: number = triples(shape.points, \"point\");\n if (n < 2) refuse(`is a polyline of ${n} places, not two or more`);\n return { segments: n - 1 + (shape.closed ? 1 : 0), points: 0 };\n }\n if (shape.type === \"segments\") {\n const n: number = triples(shape.points, \"point\");\n if (n === 0 || n % 2 !== 0)\n refuse(`holds ${n} segment ends, not a positive even number`);\n return { segments: n / 2, points: 0 };\n }\n const n: number = triples(shape.origins, \"origin\");\n if (triples(shape.vectors, \"vector\") !== n)\n refuse(\"has a different number of origins and vectors\");\n if (n === 0) refuse(\"has no arrow\");\n return { segments: n * 5, points: 0 };\n}\n\n/** Rewrite one anchor's vertex buffers from its marks' current coordinates. */\nfunction write(entry: IBuilt): void {\n let line: number = 0;\n let dot: number = 0;\n const segment: (values: readonly number[], a: number, b: number) => void = (\n values: readonly number[],\n a: number,\n b: number,\n ): void => {\n entry.lines.set(\n [\n values[a * 3]!,\n values[a * 3 + 1]!,\n values[a * 3 + 2]!,\n values[b * 3]!,\n values[b * 3 + 1]!,\n values[b * 3 + 2]!,\n ],\n line * 6,\n );\n line++;\n };\n for (const mark of entry.marks) {\n const shape: IAutoMovieMark.Shape = mark.shape;\n if (shape.type === \"points\") {\n entry.dots.set(shape.points, dot * 3);\n dot += shape.points.length / 3;\n } else if (shape.type === \"polyline\") {\n const n: number = shape.points.length / 3;\n for (let i: number = 0; i + 1 < n; i++) segment(shape.points, i, i + 1);\n if (shape.closed) segment(shape.points, n - 1, 0);\n } else if (shape.type === \"segments\")\n for (let i: number = 0; i < shape.points.length / 3; i += 2)\n segment(shape.points, i, i + 1);\n else\n for (let i: number = 0; i < shape.origins.length / 3; i++) {\n const arrow: number[] = arrowLines(shape.origins, shape.vectors, i);\n for (let s: number = 0; s < 5; s++) segment(arrow, s * 2, s * 2 + 1);\n }\n }\n\n for (const object of [entry.strokes, entry.points])\n if (object !== null) markChanged(object.geometry);\n}\n\n/** The shaft and four head lines of one arrow, as ten xyz points taken in pairs. */\nfunction arrowLines(\n origins: readonly number[],\n vectors: readonly number[],\n i: number,\n): number[] {\n const origin: THREE.Vector3 = new THREE.Vector3().fromArray(origins, i * 3);\n const vector: THREE.Vector3 = new THREE.Vector3().fromArray(vectors, i * 3);\n const tip: THREE.Vector3 = origin.clone().add(vector);\n const length: number = vector.length();\n const out: number[] = [...origin.toArray(), ...tip.toArray()];\n\n // A zero vector has no direction, so its head collapses onto its tip.\n if (length === 0) {\n for (let s: number = 0; s < 4; s++)\n out.push(...tip.toArray(), ...tip.toArray());\n return out;\n }\n const along: THREE.Vector3 = vector.clone().divideScalar(length);\n const helper: THREE.Vector3 =\n Math.abs(along.y) < 0.9\n ? new THREE.Vector3(0, 1, 0)\n : new THREE.Vector3(1, 0, 0);\n const side: THREE.Vector3 = new THREE.Vector3()\n .crossVectors(along, helper)\n .normalize();\n const other: THREE.Vector3 = new THREE.Vector3().crossVectors(along, side);\n const back: THREE.Vector3 = tip.clone().addScaledVector(along, -length / 4);\n for (const direction of [side, other])\n for (const sign of [1, -1])\n out.push(\n ...tip.toArray(),\n ...back\n .clone()\n .addScaledVector(direction, (sign * length) / 8)\n .toArray(),\n );\n return out;\n}\n\n/** Tell three.js that a geometry's positions were rewritten in place. */\nfunction markChanged(geometry: THREE.BufferGeometry): void {\n const attribute: THREE.BufferAttribute | THREE.InterleavedBufferAttribute =\n geometry.getAttribute(\n geometry.hasAttribute(\"instanceStart\") ? \"instanceStart\" : \"position\",\n );\n if (attribute instanceof THREE.InterleavedBufferAttribute)\n attribute.data.needsUpdate = true;\n else attribute.needsUpdate = true;\n}\n\n/** Give a drawn object its anchor's world placement, or world space when it has none. */\nfunction place(\n object: THREE.Object3D,\n anchor: THREE.Object3D | null,\n instance: THREE.Matrix4,\n): void {\n if (anchor === null) {\n object.matrix.identity();\n if (object.parent !== null)\n object.matrix.copy(object.parent.matrixWorld).invert();\n object.updateMatrixWorld(true);\n } else if (anchor instanceof THREE.InstancedMesh && anchor.count > 0) {\n anchor.getMatrixAt(0, instance);\n followAutoMovieInspectionSource(object, anchor, instance);\n } else followAutoMovieInspectionSource(object, anchor);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,8BACd,MACA,SAC6B;CAC7B,MAAM,QAAqB,IAAI,MAAM,MAAM;CAC3C,MAAM,QAAkB,CAAC;CACzB,MAAM,QAAqB,IAAI,MAAM,MAAM;CAC3C,KAAK,MAAM,OAAO,MAAM;EAEtB,IAAI,WAAmB;EACvB,IAAI,SAAiB;EACrB,KAAK,MAAM,EAAE,UAAU,IAAI,OAAO;GAChC,MAAM,QAA8C,MAAM,IAAI;GAC9D,YAAY,MAAM;GAClB,UAAU,MAAM;EAClB;EAGA,MAAM,QAAsB,IAAI,aAAa,WAAW,CAAC;EACzD,MAAM,aAA2B,IAAI,aAAa,WAAW,CAAC;EAC9D,MAAM,OAAqB,IAAI,aAAa,SAAS,CAAC;EACtD,MAAM,YAA0B,IAAI,aAAa,SAAS,CAAC;EAC3D,IAAI,OAAe;EACnB,IAAI,MAAc;EAClB,KAAK,MAAM,EAAE,MAAM,OAAO,SAAS,IAAI,OAAO;GAC5C,MAAM,OAAO,GAAG;GAChB,MAAM,QAA8C,MAAM,IAAI;GAC9D,KAAK,IAAI,IAAY,GAAG,IAAI,MAAM,WAAW,GAAG,KAAK,QACnD,WAAW,IAAI;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OAAO,kBAAkB,IAAI;CAC/B,OAAO,IAAI,kBAAkB,MAAM,iBAAiB,OAAO,QAAQ,GAAG;EACpE,OAAO,YAAY,GAAG,QAAQ;EAC9B,gCAAgC,QAAQ,QAAQ,QAAQ;CAC1D,OAAO,gCAAgC,QAAQ,MAAM;AACvD"}
1
+ {"version":3,"file":"buildAutoMovieInspectionMarks.mjs","names":[],"sources":["../../../src/scene/inspection/buildAutoMovieInspectionMarks.ts"],"sourcesContent":["import type { IAutoMovieMark } from \"@automovie/interface\";\nimport * as THREE from \"three\";\nimport type { LineMaterial } from \"three/examples/jsm/lines/LineMaterial.js\";\nimport type { LineSegments2 } from \"three/examples/jsm/lines/LineSegments2.js\";\n\nimport type { IAutoMovieInspectionMarkSet } from \"./IAutoMovieInspectionMarkSet.js\";\nimport type { IAutoMovieInspectionOverlay } from \"./IAutoMovieInspectionOverlay.js\";\nimport { createAutoMovieInspectionDots } from \"./createAutoMovieInspectionDots.js\";\nimport { createAutoMovieInspectionStrokes } from \"./createAutoMovieInspectionStrokes.js\";\nimport { followAutoMovieInspectionSource } from \"./followAutoMovieInspectionSource.js\";\n\n/**\n * Build marks into drawable lines and points, one line object and one points object per anchor, that follow their anchors.\n *\n * Each shape is drawn as the mark type defines it: a polyline joins its places in order and closes back to its first when closed, segments are taken in pairs, an arrow is a shaft from its origin to its tip with a head of four short lines, and points are dots. Every vertex takes its mark's colour. An anchored set takes its anchor's world matrix, through the first instance when the anchor is an instanced mesh; a set without an anchor stays in world space wherever its object is attached.\n *\n * Vertices are written from the marks' own coordinate arrays on build and on every `update`, so an owner that rewrites a mark's coordinates in place moves its drawing. The number of vertices a mark has may not change after the build.\n *\n * It throws, naming the mark's path, for coordinates that are not whole finite xyz triples, a polyline of fewer than two places, segments that do not pair up, arrows whose origins and vectors differ in number, and a mark without coordinates.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States how each shape is drawn, the colour and placement rules, when coordinates are reread and the one thing that may not change, and every refusal.\n * @evidence contracts/development/implementation.md#principled-implementation Coordinates are in the anchor's local frame, so the drawn object takes the anchor's world matrix and the coordinates themselves are never transformed. An arrow head is drawn as four lines from the tip back a quarter of the arrow's length and out half of that on two perpendicular axes, a drawing convention that reads as a direction from any view.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Admission and counting per set, one fill of colours, one fill of positions shared by build and update, then the overlay record.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A malformed mark is refused instead of drawn short, and no kind or path changes how a mark is drawn.\n * @evidence contracts/development/implementation.md#efficient-algorithms Building and each update are linear in the drawn vertices; every set is at most two draw calls whatever the number of marks and colours.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work The line and point objects come from the shared factories and placement from `followAutoMovieInspectionSource`; the buffers built once are rewritten in place on every update.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The overlay owns its group, geometries and materials and releases them in `dispose`; it borrows the anchors and the marks' coordinate arrays.\n */\nexport function buildAutoMovieInspectionMarks(\n sets: readonly IAutoMovieInspectionMarkSet[],\n options: { stroke: number; xray: boolean },\n): IAutoMovieInspectionOverlay {\n const group: THREE.Group = new THREE.Group();\n const built: IBuilt[] = [];\n const color: THREE.Color = new THREE.Color();\n for (const set of sets) {\n // Admit every mark and count its vertices before allocating.\n let segments: number = 0;\n let points: number = 0;\n for (const { mark } of set.marks) {\n const count: { segments: number; points: number } = admit(mark);\n segments += count.segments;\n points += count.points;\n }\n\n // Colours are fixed for the build; positions are filled by `place`.\n const lines: Float32Array = new Float32Array(segments * 6);\n const lineColors: Float32Array = new Float32Array(segments * 6);\n const dots: Float32Array = new Float32Array(points * 3);\n const dotColors: Float32Array = new Float32Array(points * 3);\n let line: number = 0;\n let dot: number = 0;\n for (const { mark, color: hex } of set.marks) {\n color.setHex(hex);\n const count: { segments: number; points: number } = admit(mark);\n for (let v: number = 0; v < count.segments * 2; v++, line++)\n lineColors.set([color.r, color.g, color.b], line * 3);\n for (let v: number = 0; v < count.points; v++, dot++)\n dotColors.set([color.r, color.g, color.b], dot * 3);\n }\n\n const entry: IBuilt = {\n anchor: set.anchor,\n marks: set.marks.map(\n (pair: { mark: IAutoMovieMark }): IAutoMovieMark => pair.mark,\n ),\n lines,\n dots,\n strokes:\n segments === 0\n ? null\n : createAutoMovieInspectionStrokes(lines, lineColors, options),\n points:\n points === 0\n ? null\n : createAutoMovieInspectionDots(dots, dotColors, options),\n };\n write(entry);\n if (entry.strokes !== null) group.add(entry.strokes);\n if (entry.points !== null) group.add(entry.points);\n built.push(entry);\n }\n\n const instance: THREE.Matrix4 = new THREE.Matrix4();\n return {\n object: group,\n update: (): void => {\n for (const entry of built) {\n write(entry);\n for (const object of [entry.strokes, entry.points])\n if (object !== null) place(object, entry.anchor, instance);\n }\n },\n resize: (width: number, height: number): void => {\n for (const entry of built)\n if (entry.strokes !== null)\n (entry.strokes.material as LineMaterial).resolution.set(\n width,\n height,\n );\n },\n dispose: (): void => {\n group.removeFromParent();\n for (const entry of built)\n for (const object of [entry.strokes, entry.points])\n if (object !== null) {\n object.geometry.dispose();\n (object.material as THREE.Material).dispose();\n }\n },\n };\n}\n\n/** One anchor's built marks: the marks, their vertex buffers and the objects drawing them. */\ninterface IBuilt {\n /** The anchor, or null for world space. */\n anchor: THREE.Object3D | null;\n\n /** The marks, in build order. */\n marks: IAutoMovieMark[];\n\n /** Two xyz vertices per line segment, shared with the line geometry. */\n lines: Float32Array;\n\n /** One xyz vertex per dot, shared with the points geometry. */\n dots: Float32Array;\n\n /** The line object, absent when no mark draws a line. */\n strokes: LineSegments2 | null;\n\n /** The points object, absent when no mark draws a dot. */\n points: THREE.Points | null;\n}\n\n/** The line segments and dots a mark draws, after refusing a malformed mark. */\nfunction admit(mark: IAutoMovieMark): { segments: number; points: number } {\n const refuse: (problem: string) => never = (problem: string): never => {\n throw new Error(`Mark \"${mark.path}\" of kind ${mark.kind} ${problem}`);\n };\n const triples: (values: readonly number[], name: string) => number = (\n values: readonly number[],\n name: string,\n ): number => {\n if (values.length % 3 !== 0)\n refuse(`holds ${values.length} ${name} components, not xyz triples`);\n if (!values.every(Number.isFinite)) refuse(`holds a non-finite ${name}`);\n return values.length / 3;\n };\n const shape: IAutoMovieMark.Shape = mark.shape;\n if (shape.type === \"points\") {\n const n: number = triples(shape.points, \"point\");\n if (n === 0) refuse(\"has no point\");\n return { segments: 0, points: n };\n }\n if (shape.type === \"polyline\") {\n const n: number = triples(shape.points, \"point\");\n if (n < 2) refuse(`is a polyline of ${n} places, not two or more`);\n return { segments: n - 1 + (shape.closed ? 1 : 0), points: 0 };\n }\n if (shape.type === \"segments\") {\n const n: number = triples(shape.points, \"point\");\n if (n === 0 || n % 2 !== 0)\n refuse(`holds ${n} segment ends, not a positive even number`);\n return { segments: n / 2, points: 0 };\n }\n const n: number = triples(shape.origins, \"origin\");\n if (triples(shape.vectors, \"vector\") !== n)\n refuse(\"has a different number of origins and vectors\");\n if (n === 0) refuse(\"has no arrow\");\n return { segments: n * 5, points: 0 };\n}\n\n/** Rewrite one anchor's vertex buffers from its marks' current coordinates. */\nfunction write(entry: IBuilt): void {\n let line: number = 0;\n let dot: number = 0;\n const segment: (values: readonly number[], a: number, b: number) => void = (\n values: readonly number[],\n a: number,\n b: number,\n ): void => {\n entry.lines.set(\n [\n values[a * 3]!,\n values[a * 3 + 1]!,\n values[a * 3 + 2]!,\n values[b * 3]!,\n values[b * 3 + 1]!,\n values[b * 3 + 2]!,\n ],\n line * 6,\n );\n line++;\n };\n for (const mark of entry.marks) {\n const shape: IAutoMovieMark.Shape = mark.shape;\n if (shape.type === \"points\") {\n entry.dots.set(shape.points, dot * 3);\n dot += shape.points.length / 3;\n } else if (shape.type === \"polyline\") {\n const n: number = shape.points.length / 3;\n for (let i: number = 0; i + 1 < n; i++) segment(shape.points, i, i + 1);\n if (shape.closed) segment(shape.points, n - 1, 0);\n } else if (shape.type === \"segments\")\n for (let i: number = 0; i < shape.points.length / 3; i += 2)\n segment(shape.points, i, i + 1);\n else\n for (let i: number = 0; i < shape.origins.length / 3; i++) {\n const arrow: number[] = arrowLines(shape.origins, shape.vectors, i);\n for (let s: number = 0; s < 5; s++) segment(arrow, s * 2, s * 2 + 1);\n }\n }\n\n for (const object of [entry.strokes, entry.points])\n if (object !== null) markChanged(object.geometry);\n}\n\n/** The shaft and four head lines of one arrow, as ten xyz points taken in pairs. */\nfunction arrowLines(\n origins: readonly number[],\n vectors: readonly number[],\n i: number,\n): number[] {\n const origin: THREE.Vector3 = new THREE.Vector3().fromArray(origins, i * 3);\n const vector: THREE.Vector3 = new THREE.Vector3().fromArray(vectors, i * 3);\n const tip: THREE.Vector3 = origin.clone().add(vector);\n const length: number = vector.length();\n const out: number[] = [...origin.toArray(), ...tip.toArray()];\n\n // A zero vector has no direction, so its head collapses onto its tip.\n if (length === 0) {\n for (let s: number = 0; s < 4; s++)\n out.push(...tip.toArray(), ...tip.toArray());\n return out;\n }\n const along: THREE.Vector3 = vector.clone().divideScalar(length);\n const helper: THREE.Vector3 =\n Math.abs(along.y) < 0.9\n ? new THREE.Vector3(0, 1, 0)\n : new THREE.Vector3(1, 0, 0);\n const side: THREE.Vector3 = new THREE.Vector3()\n .crossVectors(along, helper)\n .normalize();\n const other: THREE.Vector3 = new THREE.Vector3().crossVectors(along, side);\n const back: THREE.Vector3 = tip.clone().addScaledVector(along, -length / 4);\n for (const direction of [side, other])\n for (const sign of [1, -1])\n out.push(\n ...tip.toArray(),\n ...back\n .clone()\n .addScaledVector(direction, (sign * length) / 8)\n .toArray(),\n );\n return out;\n}\n\n/** Tell three.js that a geometry's positions were rewritten in place. */\nfunction markChanged(geometry: THREE.BufferGeometry): void {\n const attribute: THREE.BufferAttribute | THREE.InterleavedBufferAttribute =\n geometry.getAttribute(\n geometry.hasAttribute(\"instanceStart\") ? \"instanceStart\" : \"position\",\n );\n if (attribute instanceof THREE.InterleavedBufferAttribute)\n attribute.data.needsUpdate = true;\n else attribute.needsUpdate = true;\n}\n\n/** Give a drawn object its anchor's world placement, or world space when it has none. */\nfunction place(\n object: THREE.Object3D,\n anchor: THREE.Object3D | null,\n instance: THREE.Matrix4,\n): void {\n if (anchor === null) {\n object.matrix.identity();\n if (object.parent !== null)\n object.matrix.copy(object.parent.matrixWorld).invert();\n object.updateMatrixWorld(true);\n } else if (anchor instanceof THREE.InstancedMesh && anchor.count > 0) {\n anchor.getMatrixAt(0, instance);\n followAutoMovieInspectionSource(object, anchor, instance);\n } else followAutoMovieInspectionSource(object, anchor);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,8BACd,MACA,SAC6B;CAC7B,MAAM,QAAqB,IAAI,MAAM,MAAM;CAC3C,MAAM,QAAkB,CAAC;CACzB,MAAM,QAAqB,IAAI,MAAM,MAAM;CAC3C,KAAK,MAAM,OAAO,MAAM;EAEtB,IAAI,WAAmB;EACvB,IAAI,SAAiB;EACrB,KAAK,MAAM,EAAE,UAAU,IAAI,OAAO;GAChC,MAAM,QAA8C,MAAM,IAAI;GAC9D,YAAY,MAAM;GAClB,UAAU,MAAM;EAClB;EAGA,MAAM,QAAsB,IAAI,aAAa,WAAW,CAAC;EACzD,MAAM,aAA2B,IAAI,aAAa,WAAW,CAAC;EAC9D,MAAM,OAAqB,IAAI,aAAa,SAAS,CAAC;EACtD,MAAM,YAA0B,IAAI,aAAa,SAAS,CAAC;EAC3D,IAAI,OAAe;EACnB,IAAI,MAAc;EAClB,KAAK,MAAM,EAAE,MAAM,OAAO,SAAS,IAAI,OAAO;GAC5C,MAAM,OAAO,GAAG;GAChB,MAAM,QAA8C,MAAM,IAAI;GAC9D,KAAK,IAAI,IAAY,GAAG,IAAI,MAAM,WAAW,GAAG,KAAK,QACnD,WAAW,IAAI;IAAC,MAAM;IAAG,MAAM;IAAG,MAAM;GAAC,GAAG,OAAO,CAAC;GACtD,KAAK,IAAI,IAAY,GAAG,IAAI,MAAM,QAAQ,KAAK,OAC7C,UAAU,IAAI;IAAC,MAAM;IAAG,MAAM;IAAG,MAAM;GAAC,GAAG,MAAM,CAAC;EACtD;EA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+1,4 @@
1
- import type { IAutoMovieMark } from "@automovie/engine";
1
+ import type { IAutoMovieMark } from "@automovie/interface";
2
2
  import type * as THREE from "three";
3
3
  /**
4
4
  * Choose the supplied marks one picture draws, and group them by the scene object their frame belongs to.
@@ -1 +1 @@
1
- {"version":3,"file":"chooseAutoMovieInspectionMarks.mjs","names":[],"sources":["../../../src/scene/inspection/chooseAutoMovieInspectionMarks.ts"],"sourcesContent":["import type { IAutoMovieMark } from \"@automovie/engine\";\nimport type * as THREE from \"three\";\n\n/**\n * Choose the supplied marks one picture draws, and group them by the scene object their frame belongs to.\n *\n * A mark is drawn when its kind is asked, its path is selected, and its anchor, if it has one, is visible with its ancestors and not left out by `hide`. Anchors are found by path among `anchors`, the first scene object at each path, and `null` stands for world space. Marks keep their order within each group.\n *\n * It throws naming the mark and the anchor when a mark follows a path no scene object has.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the three conditions, how anchors are found, the grouping and order, and the refusal.\n * @evidence contracts/development/implementation.md#principled-implementation A mark is drawn in its anchor's frame, so it can be drawn only where the anchor is drawn; the anchor's visibility and `hide` decide that, while `parts` decides by the mark's own path, so one curve can be drawn alone.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One pass over the marks with one map from anchor to group.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A missing anchor is refused instead of drawn in world space, and no kind or path is treated specially.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the marks, with the verdicts memoised by the caller and one walk up each anchor's ancestors.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call chooses among the marks of one state.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returns arrays of the given marks and borrowed anchors; nothing is kept.\n */\nexport function chooseAutoMovieInspectionMarks(props: {\n /** The supplied marks. */\n marks: readonly IAutoMovieMark[];\n\n /** Whether a kind is asked. */\n asks: (kind: string) => boolean;\n\n /** Whether a path is selected. */\n selects: (path: string) => boolean;\n\n /** Whether a path is left out by `hide`. */\n hidden: (path: string) => boolean;\n\n /** The first scene object at each path. */\n anchors: ReadonlyMap<string, THREE.Object3D>;\n}): {\n marks: IAutoMovieMark[];\n sets: Map<THREE.Object3D | null, IAutoMovieMark[]>;\n} {\n const marks: IAutoMovieMark[] = [];\n const sets: Map<THREE.Object3D | null, IAutoMovieMark[]> = new Map<\n THREE.Object3D | null,\n IAutoMovieMark[]\n >();\n for (const mark of props.marks) {\n if (!props.asks(mark.kind) || !props.selects(mark.path)) continue;\n let anchor: THREE.Object3D | null = null;\n if (mark.anchor !== null) {\n anchor = props.anchors.get(mark.anchor) ?? null;\n if (anchor === null)\n throw new Error(\n `Mark \"${mark.path}\" follows \"${mark.anchor}\", which no object of the scene is`,\n );\n if (!shown(anchor) || props.hidden(mark.anchor)) continue;\n }\n marks.push(mark);\n const set: IAutoMovieMark[] = sets.get(anchor) ?? [];\n set.push(mark);\n sets.set(anchor, set);\n }\n return { marks, sets };\n}\n\n/** Whether an object and every ancestor are visible. */\nfunction shown(object: THREE.Object3D): boolean {\n for (\n let current: THREE.Object3D | null = object;\n current !== null;\n current = current.parent\n )\n if (!current.visible) return false;\n return true;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAgB,+BAA+B,OAkB7C;CACA,MAAM,QAA0B,CAAC;CACjC,MAAM,uBAAqD,IAAI,IAG7D;CACF,KAAK,MAAM,QAAQ,MAAM,OAAO;EAC9B,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,KAAK,CAAC,MAAM,QAAQ,KAAK,IAAI,GAAG;EACzD,IAAI,SAAgC;EACpC,IAAI,KAAK,WAAW,MAAM;GACxB,SAAS,MAAM,QAAQ,IAAI,KAAK,MAAM,KAAK;GAC3C,IAAI,WAAW,MACb,MAAM,IAAI,MACR,SAAS,KAAK,KAAK,aAAa,KAAK,OAAO,mCAC9C;GACF,IAAI,CAAC,MAAM,MAAM,KAAK,MAAM,OAAO,KAAK,MAAM,GAAG;EACnD;EACA,MAAM,KAAK,IAAI;EACf,MAAM,MAAwB,KAAK,IAAI,MAAM,KAAK,CAAC;EACnD,IAAI,KAAK,IAAI;EACb,KAAK,IAAI,QAAQ,GAAG;CACtB;CACA,OAAO;EAAE;EAAO;CAAK;AACvB;;AAGA,SAAS,MAAM,QAAiC;CAC9C,KACE,IAAI,UAAiC,QACrC,YAAY,MACZ,UAAU,QAAQ,QAElB,IAAI,CAAC,QAAQ,SAAS,OAAO;CAC/B,OAAO;AACT"}
1
+ {"version":3,"file":"chooseAutoMovieInspectionMarks.mjs","names":[],"sources":["../../../src/scene/inspection/chooseAutoMovieInspectionMarks.ts"],"sourcesContent":["import type { IAutoMovieMark } from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\n/**\n * Choose the supplied marks one picture draws, and group them by the scene object their frame belongs to.\n *\n * A mark is drawn when its kind is asked, its path is selected, and its anchor, if it has one, is visible with its ancestors and not left out by `hide`. Anchors are found by path among `anchors`, the first scene object at each path, and `null` stands for world space. Marks keep their order within each group.\n *\n * It throws naming the mark and the anchor when a mark follows a path no scene object has.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the three conditions, how anchors are found, the grouping and order, and the refusal.\n * @evidence contracts/development/implementation.md#principled-implementation A mark is drawn in its anchor's frame, so it can be drawn only where the anchor is drawn; the anchor's visibility and `hide` decide that, while `parts` decides by the mark's own path, so one curve can be drawn alone.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One pass over the marks with one map from anchor to group.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A missing anchor is refused instead of drawn in world space, and no kind or path is treated specially.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the marks, with the verdicts memoised by the caller and one walk up each anchor's ancestors.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call chooses among the marks of one state.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returns arrays of the given marks and borrowed anchors; nothing is kept.\n */\nexport function chooseAutoMovieInspectionMarks(props: {\n /** The supplied marks. */\n marks: readonly IAutoMovieMark[];\n\n /** Whether a kind is asked. */\n asks: (kind: string) => boolean;\n\n /** Whether a path is selected. */\n selects: (path: string) => boolean;\n\n /** Whether a path is left out by `hide`. */\n hidden: (path: string) => boolean;\n\n /** The first scene object at each path. */\n anchors: ReadonlyMap<string, THREE.Object3D>;\n}): {\n marks: IAutoMovieMark[];\n sets: Map<THREE.Object3D | null, IAutoMovieMark[]>;\n} {\n const marks: IAutoMovieMark[] = [];\n const sets: Map<THREE.Object3D | null, IAutoMovieMark[]> = new Map<\n THREE.Object3D | null,\n IAutoMovieMark[]\n >();\n for (const mark of props.marks) {\n if (!props.asks(mark.kind) || !props.selects(mark.path)) continue;\n let anchor: THREE.Object3D | null = null;\n if (mark.anchor !== null) {\n anchor = props.anchors.get(mark.anchor) ?? null;\n if (anchor === null)\n throw new Error(\n `Mark \"${mark.path}\" follows \"${mark.anchor}\", which no object of the scene is`,\n );\n if (!shown(anchor) || props.hidden(mark.anchor)) continue;\n }\n marks.push(mark);\n const set: IAutoMovieMark[] = sets.get(anchor) ?? [];\n set.push(mark);\n sets.set(anchor, set);\n }\n return { marks, sets };\n}\n\n/** Whether an object and every ancestor are visible. */\nfunction shown(object: THREE.Object3D): boolean {\n for (\n let current: THREE.Object3D | null = object;\n current !== null;\n current = current.parent\n )\n if (!current.visible) return false;\n return true;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAgB,+BAA+B,OAkB7C;CACA,MAAM,QAA0B,CAAC;CACjC,MAAM,uBAAqD,IAAI,IAG7D;CACF,KAAK,MAAM,QAAQ,MAAM,OAAO;EAC9B,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,KAAK,CAAC,MAAM,QAAQ,KAAK,IAAI,GAAG;EACzD,IAAI,SAAgC;EACpC,IAAI,KAAK,WAAW,MAAM;GACxB,SAAS,MAAM,QAAQ,IAAI,KAAK,MAAM,KAAK;GAC3C,IAAI,WAAW,MACb,MAAM,IAAI,MACR,SAAS,KAAK,KAAK,aAAa,KAAK,OAAO,mCAC9C;GACF,IAAI,CAAC,MAAM,MAAM,KAAK,MAAM,OAAO,KAAK,MAAM,GAAG;EACnD;EACA,MAAM,KAAK,IAAI;EACf,MAAM,MAAwB,KAAK,IAAI,MAAM,KAAK,CAAC;EACnD,IAAI,KAAK,IAAI;EACb,KAAK,IAAI,QAAQ,GAAG;CACtB;CACA,OAAO;EAAE;EAAO;CAAK;AACvB;;AAGA,SAAS,MAAM,QAAiC;CAC9C,KACE,IAAI,UAAiC,QACrC,YAAY,MACZ,UAAU,QAAQ,QAElB,IAAI,CAAC,QAAQ,SAAS,OAAO;CAC/B,OAAO;AACT"}
@@ -1,5 +1,5 @@
1
+ import type { AutoMovieInspectionShade, IAutoMovieInspectionColorAssignment } from "@automovie/interface";
1
2
  import * as THREE from "three";
2
- import type { IAutoMovieInspectionRequest } from "./IAutoMovieInspectionRequest.js";
3
3
  /**
4
4
  * Shade each mesh a request's colour patterns match in that colour for one picture, and return the call that gives each its own material back.
5
5
  *
@@ -20,7 +20,7 @@ export declare function colorAutoMovieInspectionObjects(props: {
20
20
  mesh: THREE.Mesh;
21
21
  }[];
22
22
  /** The shade the picture is drawn in. */
23
- shade: IAutoMovieInspectionRequest.Shade;
23
+ shade: AutoMovieInspectionShade;
24
24
  /** The request's colours. */
25
- color: readonly IAutoMovieInspectionRequest.IColor[];
25
+ color: readonly IAutoMovieInspectionColorAssignment[];
26
26
  }): () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"colorAutoMovieInspectionObjects.js","sourceRoot":"","sources":["../../../src/scene/inspection/colorAutoMovieInspectionObjects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAE/B,iEAG4C;AAC5C,yDAGoC;AAEpC,uFAAiF;AAEjF;;;;;;;;;;;;GAYG;AACH,yCAAgD,KAS/C;IACC,MAAM,KAAK,GAGL,EAAE,CAAC;IACT,MAAM,IAAI,GAAqB,EAAE,CAAC;IAClC,MAAM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O,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;QACV,MAAM,KAAK,CAAC;IACd,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"colorAutoMovieInspectionObjects.mjs","names":[],"sources":["../../../src/scene/inspection/colorAutoMovieInspectionObjects.ts"],"sourcesContent":["import * as THREE from \"three\";\n\nimport {\n applyDualQuaternionSkinning,\n dualQuaternionSkinningOf,\n} from \"../dualQuaternionSkinning/index.js\";\nimport {\n applyFormationCycleMaterial,\n formationCycleOf,\n} from \"../formationCycle/index.js\";\nimport type { IAutoMovieInspectionRequest } from \"./IAutoMovieInspectionRequest.js\";\nimport { matchAutoMovieInspectionPath } from \"./matchAutoMovieInspectionPath.js\";\n\n/**\n * Shade each mesh a request's colour patterns match in that colour for one picture, and return the call that gives each its own material back.\n *\n * The last matching entry wins. Under the `beauty` shade a matched mesh is drawn in one unlit colour, so its identity reads at a glance; under `clay` it is drawn in its colour lit as the clay is, so its form still reads. Both keep the mesh's skinning, morphing, formation cycle and dual-quaternion skin. Any other shade is a pass that encodes a quantity in colour, so a match under it throws instead of hiding that quantity.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States which mesh takes which colour, how each shade draws it and why, what deformation is kept, and the refusal under a guide pass.\n * @evidence contracts/development/implementation.md#principled-implementation An identity colour is a material of that colour, lit under clay so form reads and unlit under beauty so the colour is exact; formation cycles and dual-quaternion skins are carried by the same patches the render-mode overrides use.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One pass choosing each mesh's colour, one swap per matched mesh, and one restore.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No mesh is matched by anything but its path, and a pass that would lose its meaning is refused.\n * @evidence contracts/development/implementation.md#efficient-algorithms Meshes times colour entries pattern matches, one material per matched mesh.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work The deformation patches are the formation-cycle and dual-quaternion owners'.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The created materials are owned by the returned call, which puts the meshes' materials back and disposes them; the meshes are borrowed.\n */\nexport function colorAutoMovieInspectionObjects(props: {\n /** The drawn meshes with their paths. */\n meshes: readonly { path: string; mesh: THREE.Mesh }[];\n\n /** The shade the picture is drawn in. */\n shade: IAutoMovieInspectionRequest.Shade;\n\n /** The request's colours. */\n color: readonly IAutoMovieInspectionRequest.IColor[];\n}): () => void {\n const swaps: {\n mesh: THREE.Mesh;\n prior: THREE.Material | THREE.Material[];\n }[] = [];\n const made: THREE.Material[] = [];\n const restore: () => void = (): void => {\n for (const { mesh, prior } of swaps.reverse()) mesh.material = prior;\n for (const material of made) material.dispose();\n };\n try {\n for (const { path, mesh } of props.meshes) {\n let hex: number | null = null;\n for (const entry of props.color)\n if (matchAutoMovieInspectionPath(path, entry.pattern))\n hex = entry.color;\n if (hex === null) continue;\n if (props.shade !== \"beauty\" && props.shade !== \"clay\")\n throw new Error(\n `Inspection colour for \"${path}\" applies under the beauty and clay shades, not ${props.shade}`,\n );\n const material: THREE.Material =\n props.shade === \"clay\"\n ? new THREE.MeshLambertMaterial({\n color: hex,\n side: THREE.DoubleSide,\n fog: false,\n })\n : new THREE.MeshBasicMaterial({\n color: hex,\n side: THREE.DoubleSide,\n fog: false,\n toneMapped: false,\n });\n made.push(material);\n const cycle: ReturnType<typeof formationCycleOf> = formationCycleOf(mesh);\n if (cycle !== null) applyFormationCycleMaterial(material, cycle);\n if (dualQuaternionSkinningOf(mesh)) applyDualQuaternionSkinning(material);\n swaps.push({ mesh, prior: mesh.material });\n mesh.material = material;\n }\n } catch (error) {\n restore();\n throw error;\n }\n return restore;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,gCAAgC,OASjC;CACb,MAAM,QAGA,CAAC;CACP,MAAM,OAAyB,CAAC;CAChC,MAAM,gBAAkC;EACtC,KAAK,MAAM,EAAE,MAAM,WAAW,MAAM,QAAQ,GAAG,KAAK,WAAW;EAC/D,KAAK,MAAM,YAAY,MAAM,SAAS,QAAQ;CAChD;CACA,IAAI;EACF,KAAK,MAAM,EAAE,MAAM,UAAU,MAAM,QAAQ;GACzC,IAAI,MAAqB;GACzB,KAAK,MAAM,SAAS,MAAM,OACxB,IAAI,6BAA6B,MAAM,MAAM,OAAO,GAClD,MAAM,MAAM;GAChB,IAAI,QAAQ,MAAM;GAClB,IAAI,MAAM,UAAU,YAAY,MAAM,UAAU,QAC9C,MAAM,IAAI,MACR,0BAA0B,KAAK,kDAAkD,MAAM,OACzF;GACF,MAAM,WACJ,MAAM,UAAU,SACZ,IAAI,MAAM,oBAAoB;IAC5B,OAAO;IACP,MAAM,MAAM;IACZ,KAAK;GACP,CAAC,IACD,IAAI,MAAM,kBAAkB;IAC1B,OAAO;IACP,MAAM,MAAM;IACZ,KAAK;IACL,YAAY;GACd,CAAC;GACP,KAAK,KAAK,QAAQ;GAClB,MAAM,QAA6C,iBAAiB,IAAI;GACxE,IAAI,UAAU,MAAM,4BAA4B,UAAU,KAAK;GAC/D,IAAI,yBAAyB,IAAI,GAAG,4BAA4B,QAAQ;GACxE,MAAM,KAAK;IAAE;IAAM,OAAO,KAAK;GAAS,CAAC;GACzC,KAAK,WAAW;EAClB;CACF,SAAS,OAAO;EACd,QAAQ;EACR,MAAM;CACR;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"colorAutoMovieInspectionObjects.mjs","names":[],"sources":["../../../src/scene/inspection/colorAutoMovieInspectionObjects.ts"],"sourcesContent":["import type {\n AutoMovieInspectionShade,\n IAutoMovieInspectionColorAssignment,\n} from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport {\n applyDualQuaternionSkinning,\n dualQuaternionSkinningOf,\n} from \"../dualQuaternionSkinning/index.js\";\nimport {\n applyFormationCycleMaterial,\n formationCycleOf,\n} from \"../formationCycle/index.js\";\nimport { matchAutoMovieInspectionPath } from \"./matchAutoMovieInspectionPath.js\";\n\n/**\n * Shade each mesh a request's colour patterns match in that colour for one picture, and return the call that gives each its own material back.\n *\n * The last matching entry wins. Under the `beauty` shade a matched mesh is drawn in one unlit colour, so its identity reads at a glance; under `clay` it is drawn in its colour lit as the clay is, so its form still reads. Both keep the mesh's skinning, morphing, formation cycle and dual-quaternion skin. Any other shade is a pass that encodes a quantity in colour, so a match under it throws instead of hiding that quantity.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States which mesh takes which colour, how each shade draws it and why, what deformation is kept, and the refusal under a guide pass.\n * @evidence contracts/development/implementation.md#principled-implementation An identity colour is a material of that colour, lit under clay so form reads and unlit under beauty so the colour is exact; formation cycles and dual-quaternion skins are carried by the same patches the render-mode overrides use.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One pass choosing each mesh's colour, one swap per matched mesh, and one restore.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No mesh is matched by anything but its path, and a pass that would lose its meaning is refused.\n * @evidence contracts/development/implementation.md#efficient-algorithms Meshes times colour entries pattern matches, one material per matched mesh.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work The deformation patches are the formation-cycle and dual-quaternion owners'.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The created materials are owned by the returned call, which puts the meshes' materials back and disposes them; the meshes are borrowed.\n */\nexport function colorAutoMovieInspectionObjects(props: {\n /** The drawn meshes with their paths. */\n meshes: readonly { path: string; mesh: THREE.Mesh }[];\n\n /** The shade the picture is drawn in. */\n shade: AutoMovieInspectionShade;\n\n /** The request's colours. */\n color: readonly IAutoMovieInspectionColorAssignment[];\n}): () => void {\n const swaps: {\n mesh: THREE.Mesh;\n prior: THREE.Material | THREE.Material[];\n }[] = [];\n const made: THREE.Material[] = [];\n const restore: () => void = (): void => {\n for (const { mesh, prior } of swaps.reverse()) mesh.material = prior;\n for (const material of made) material.dispose();\n };\n try {\n for (const { path, mesh } of props.meshes) {\n let hex: number | null = null;\n for (const entry of props.color)\n if (matchAutoMovieInspectionPath(path, entry.pattern))\n hex = entry.color;\n if (hex === null) continue;\n if (props.shade !== \"beauty\" && props.shade !== \"clay\")\n throw new Error(\n `Inspection colour for \"${path}\" applies under the beauty and clay shades, not ${props.shade}`,\n );\n const material: THREE.Material =\n props.shade === \"clay\"\n ? new THREE.MeshLambertMaterial({\n color: hex,\n side: THREE.DoubleSide,\n fog: false,\n })\n : new THREE.MeshBasicMaterial({\n color: hex,\n side: THREE.DoubleSide,\n fog: false,\n toneMapped: false,\n });\n made.push(material);\n const cycle: ReturnType<typeof formationCycleOf> = formationCycleOf(mesh);\n if (cycle !== null) applyFormationCycleMaterial(material, cycle);\n if (dualQuaternionSkinningOf(mesh)) applyDualQuaternionSkinning(material);\n swaps.push({ mesh, prior: mesh.material });\n mesh.material = material;\n }\n } catch (error) {\n restore();\n throw error;\n }\n return restore;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6BA,SAAgB,gCAAgC,OASjC;CACb,MAAM,QAGA,CAAC;CACP,MAAM,OAAyB,CAAC;CAChC,MAAM,gBAAkC;EACtC,KAAK,MAAM,EAAE,MAAM,WAAW,MAAM,QAAQ,GAAG,KAAK,WAAW;EAC/D,KAAK,MAAM,YAAY,MAAM,SAAS,QAAQ;CAChD;CACA,IAAI;EACF,KAAK,MAAM,EAAE,MAAM,UAAU,MAAM,QAAQ;GACzC,IAAI,MAAqB;GACzB,KAAK,MAAM,SAAS,MAAM,OACxB,IAAI,6BAA6B,MAAM,MAAM,OAAO,GAClD,MAAM,MAAM;GAChB,IAAI,QAAQ,MAAM;GAClB,IAAI,MAAM,UAAU,YAAY,MAAM,UAAU,QAC9C,MAAM,IAAI,MACR,0BAA0B,KAAK,kDAAkD,MAAM,OACzF;GACF,MAAM,WACJ,MAAM,UAAU,SACZ,IAAI,MAAM,oBAAoB;IAC5B,OAAO;IACP,MAAM,MAAM;IACZ,KAAK;GACP,CAAC,IACD,IAAI,MAAM,kBAAkB;IAC1B,OAAO;IACP,MAAM,MAAM;IACZ,KAAK;IACL,YAAY;GACd,CAAC;GACP,KAAK,KAAK,QAAQ;GAClB,MAAM,QAA6C,iBAAiB,IAAI;GACxE,IAAI,UAAU,MAAM,4BAA4B,UAAU,KAAK;GAC/D,IAAI,yBAAyB,IAAI,GAAG,4BAA4B,QAAQ;GACxE,MAAM,KAAK;IAAE;IAAM,OAAO,KAAK;GAAS,CAAC;GACzC,KAAK,WAAW;EAClB;CACF,SAAS,OAAO;EACd,QAAQ;EACR,MAAM;CACR;CACA,OAAO;AACT"}
@@ -1,4 +1,4 @@
1
- import type { IAutoMovieVector3 } from "@automovie/interface";
1
+ import type { IAutoMovieInspectionSweepProps, IAutoMovieInspectionSweepUnit } from "@automovie/interface";
2
2
  /**
3
3
  * Expand a sweep pattern into its units, each with the selection that draws it alone and the selection that draws it with the neighbours it touches, so the whole, each unit alone and each unit with its neighbours are planned in one run.
4
4
  *
@@ -20,19 +20,4 @@ import type { IAutoMovieVector3 } from "@automovie/interface";
20
20
  * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments.
21
21
  * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh records and keeps nothing.
22
22
  */
23
- export declare function expandAutoMovieInspectionSweep(props: {
24
- /** Drawn objects by path, with their world-space boxes in metres. */
25
- objects: readonly {
26
- path: string;
27
- min: IAutoMovieVector3;
28
- max: IAutoMovieVector3;
29
- }[];
30
- /** Path pattern of the units, under the inspection path grammar. */
31
- pattern: string;
32
- /** Distance in metres a neighbour's box may lie from the unit's box. */
33
- margin: number;
34
- }): {
35
- unit: string;
36
- alone: string[];
37
- neighbours: string[];
38
- }[];
23
+ export declare function expandAutoMovieInspectionSweep(props: IAutoMovieInspectionSweepProps): IAutoMovieInspectionSweepUnit[];
@@ -1 +1 @@
1
- {"version":3,"file":"expandAutoMovieInspectionSweep.js","sourceRoot":"","sources":["../../../src/scene/inspection/expandAutoMovieInspectionSweep.ts"],"names":[],"mappings":";;;AAEA,uFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wCAA+C,KAa9C;IACC,IAAI,CAAC,CAA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MAAM,CAChD,CACJ;aACA,GAAG,CAAC,CAAC,MAAsC,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC;AAED,+BAA+B;AAC/B,MAAM,IAAI,GAAiC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE3D,sEAAsE;AACtE,SAAS,MAAM,CACb,KAAoE,EACpE,IAAmB;IAEnB,MAAM,IAAI,GACR,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,CAAC,MAAgB,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;QACnD,CAAC,CAAC,CAAC,MAAgB,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;IACxD,OAAO;QACL,CAAC,EAAE,IAAI,CACL,KAAK,CAAC,GAAG,CACP,CAAC,GAAuD,EAAU,EAAE,CAClE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CACd,CACF;QACD,CAAC,EAAE,IAAI,CACL,KAAK,CAAC,GAAG,CACP,CAAC,GAAuD,EAAU,EAAE,CAClE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CACd,CACF;QACD,CAAC,EAAE,IAAI,CACL,KAAK,CAAC,GAAG,CACP,CAAC,GAAuD,EAAU,EAAE,CAClE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CACd,CACF;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"expandAutoMovieInspectionSweep.js","sourceRoot":"","sources":["../../../src/scene/inspection/expandAutoMovieInspectionSweep.ts"],"names":[],"mappings":";;;AAMA,uFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wCACE,KAAqC;IAErC,IAAI,CAAC,CAAC,MAAM,CAAC,QAA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aACA,GAAG,CAAC,CAAC,MAAsC,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC;AAED,+BAA+B;AAC/B,MAAM,IAAI,GAAiC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE3D,sEAAsE;AACtE,SAAS,MAAM,CACb,KAAoE,EACpE,IAAmB;IAEnB,MAAM,IAAI,GACR,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,CAAC,MAAgB,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;QACnD,CAAC,CAAC,CAAC,MAAgB,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;IACxD,OAAO;QACL,CAAC,EAAE,IAAI,CACL,KAAK,CAAC,GAAG,CACP,CAAC,GAAuD,EAAU,EAAE,CAClE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CACd,CACF;QACD,CAAC,EAAE,IAAI,CACL,KAAK,CAAC,GAAG,CACP,CAAC,GAAuD,EAAU,EAAE,CAClE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CACd,CACF;QACD,CAAC,EAAE,IAAI,CACL,KAAK,CAAC,GAAG,CACP,CAAC,GAAuD,EAAU,EAAE,CAClE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CACd,CACF;KACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"expandAutoMovieInspectionSweep.mjs","names":[],"sources":["../../../src/scene/inspection/expandAutoMovieInspectionSweep.ts"],"sourcesContent":["import type { IAutoMovieVector3 } from \"@automovie/interface\";\n\nimport { matchAutoMovieInspectionPath } from \"./matchAutoMovieInspectionPath.js\";\n\n/**\n * Expand a sweep pattern into its units, each with the selection that draws it alone and the selection that draws it with the neighbours it touches, so the whole, each unit alone and each unit with its neighbours are planned in one run.\n *\n * `objects` are drawn objects by path with their world-space boxes in metres, one entry per path. A unit is a path the pattern matches whose parent paths it does not match, so a pattern that takes a subtree yields the subtree's top as one unit; the unit holds every object at or beneath its path, and its box is the union of theirs. A neighbour is an object outside the unit whose box intersects the unit's box grown by `margin` metres on every side, touching included. Units come in the order their first object appears, and neighbours in the objects' order.\n *\n * `alone` is the unit's path, and `neighbours` the paths of its neighbours; drawing the unit with its neighbours selects both. A unit with no neighbour within the margin has an empty `neighbours`, so its neighbour cell equals its alone cell and a planner need not draw it twice.\n *\n * It throws for a margin that is negative or not finite, a box whose corners are not finite or not ordered, and a pattern that matches no object.\n *\n * ```ts\n * expandAutoMovieInspectionSweep({ objects, pattern: \"hero/*\", margin: 0.02 });\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the input, what a unit and its box are, the neighbour rule with its unit and boundary, the order, what each output member selects, the empty-neighbour case and every refusal.\n * @evidence contracts/development/implementation.md#principled-implementation Two axis-aligned boxes intersect exactly when their intervals overlap on all three axes, so growing the unit's box by the margin and testing overlap finds every object within that distance along each axis; any scene that reports world boxes can answer it, whatever its subject.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Admission, unit discovery by the shallowest matched path, unit boxes, then one overlap test per unit and object.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The margin is the caller's stated value, no path or subject kind is treated specially, and an empty match is refused instead of planning no cell.\n * @evidence contracts/development/implementation.md#efficient-algorithms Units times objects overlap tests, plus one pattern match per object and per parent path; a sweep has tens of units, where a spatial index would cost more than it saves.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh records and keeps nothing.\n */\nexport function expandAutoMovieInspectionSweep(props: {\n /** Drawn objects by path, with their world-space boxes in metres. */\n objects: readonly {\n path: string;\n min: IAutoMovieVector3;\n max: IAutoMovieVector3;\n }[];\n\n /** Path pattern of the units, under the inspection path grammar. */\n pattern: string;\n\n /** Distance in metres a neighbour's box may lie from the unit's box. */\n margin: number;\n}): { unit: string; alone: string[]; neighbours: string[] }[] {\n if (!(Number.isFinite(props.margin) && props.margin >= 0))\n throw new Error(\n `Sweep margin ${props.margin} is not a finite distance of zero or more`,\n );\n for (const object of props.objects)\n for (const axis of AXES)\n if (\n !Number.isFinite(object.min[axis]) ||\n !Number.isFinite(object.max[axis]) ||\n object.min[axis] > object.max[axis]\n )\n throw new Error(\n `Sweep object \"${object.path}\" has no finite ordered box along ${axis}`,\n );\n\n // A unit is a matched path whose parents are not matched.\n const units: string[] = [];\n for (const object of props.objects) {\n if (!matchAutoMovieInspectionPath(object.path, props.pattern)) continue;\n const names: string[] = object.path === \"\" ? [] : object.path.split(\"/\");\n let unit: string = object.path;\n for (let depth: number = 0; depth < names.length; depth++) {\n const parent: string = names.slice(0, depth).join(\"/\");\n if (matchAutoMovieInspectionPath(parent, props.pattern)) {\n unit = parent;\n break;\n }\n }\n if (!units.includes(unit)) units.push(unit);\n }\n if (units.length === 0)\n throw new Error(`Sweep pattern \"${props.pattern}\" matches no object`);\n\n return units.map(\n (unit: string): { unit: string; alone: string[]; neighbours: string[] } => {\n const inside: (path: string) => boolean = (path: string): boolean =>\n unit === \"\" || path === unit || path.startsWith(`${unit}/`);\n const members: typeof props.objects = props.objects.filter(\n (object: (typeof props.objects)[number]): boolean =>\n inside(object.path),\n );\n const low: IAutoMovieVector3 = corner(members, \"min\");\n const high: IAutoMovieVector3 = corner(members, \"max\");\n const neighbours: string[] = props.objects\n .filter(\n (object: (typeof props.objects)[number]): boolean =>\n !inside(object.path) &&\n AXES.every(\n (axis: \"x\" | \"y\" | \"z\"): boolean =>\n object.max[axis] >= low[axis] - props.margin &&\n object.min[axis] <= high[axis] + props.margin,\n ),\n )\n .map((object: (typeof props.objects)[number]): string => object.path);\n return { unit, alone: [unit], neighbours };\n },\n );\n}\n\n/** The three axes of a box. */\nconst AXES: readonly (\"x\" | \"y\" | \"z\")[] = [\"x\", \"y\", \"z\"];\n\n/** The lowest `min` or the highest `max` corner of a set of boxes. */\nfunction corner(\n boxes: readonly { min: IAutoMovieVector3; max: IAutoMovieVector3 }[],\n side: \"min\" | \"max\",\n): IAutoMovieVector3 {\n const pick: (values: number[]) => number =\n side === \"min\"\n ? (values: number[]): number => Math.min(...values)\n : (values: number[]): number => Math.max(...values);\n return {\n x: pick(\n boxes.map(\n (box: { min: IAutoMovieVector3; max: IAutoMovieVector3 }): number =>\n box[side].x,\n ),\n ),\n y: pick(\n boxes.map(\n (box: { min: IAutoMovieVector3; max: IAutoMovieVector3 }): number =>\n box[side].y,\n ),\n ),\n z: pick(\n boxes.map(\n (box: { min: IAutoMovieVector3; max: IAutoMovieVector3 }): number =>\n box[side].z,\n ),\n ),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,+BAA+B,OAae;CAC5D,IAAI,EAAE,OAAO,SAAS,MAAM,MAAM,KAAK,MAAM,UAAU,IACrD,MAAM,IAAI,MACR,gBAAgB,MAAM,OAAO,0CAC/B;CACF,KAAK,MAAM,UAAU,MAAM,SACzB,KAAK,MAAM,QAAQ,MACjB,IACE,CAAC,OAAO,SAAS,OAAO,IAAI,KAAK,KACjC,CAAC,OAAO,SAAS,OAAO,IAAI,KAAK,KACjC,OAAO,IAAI,QAAQ,OAAO,IAAI,OAE9B,MAAM,IAAI,MACR,iBAAiB,OAAO,KAAK,oCAAoC,MACnE;CAGN,MAAM,QAAkB,CAAC;CACzB,KAAK,MAAM,UAAU,MAAM,SAAS;EAClC,IAAI,CAAC,6BAA6B,OAAO,MAAM,MAAM,OAAO,GAAG;EAC/D,MAAM,QAAkB,OAAO,SAAS,KAAK,CAAC,IAAI,OAAO,KAAK,MAAM,GAAG;EACvE,IAAI,OAAe,OAAO;EAC1B,KAAK,IAAI,QAAgB,GAAG,QAAQ,MAAM,QAAQ,SAAS;GAC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.mjs","names":[],"sources":["../../../src/scene/inspection/expandAutoMovieInspectionSweep.ts"],"sourcesContent":["import type {\n IAutoMovieInspectionSweepProps,\n IAutoMovieInspectionSweepUnit,\n IAutoMovieVector3,\n} from \"@automovie/interface\";\n\nimport { matchAutoMovieInspectionPath } from \"./matchAutoMovieInspectionPath.js\";\n\n/**\n * Expand a sweep pattern into its units, each with the selection that draws it alone and the selection that draws it with the neighbours it touches, so the whole, each unit alone and each unit with its neighbours are planned in one run.\n *\n * `objects` are drawn objects by path with their world-space boxes in metres, one entry per path. A unit is a path the pattern matches whose parent paths it does not match, so a pattern that takes a subtree yields the subtree's top as one unit; the unit holds every object at or beneath its path, and its box is the union of theirs. A neighbour is an object outside the unit whose box intersects the unit's box grown by `margin` metres on every side, touching included. Units come in the order their first object appears, and neighbours in the objects' order.\n *\n * `alone` is the unit's path, and `neighbours` the paths of its neighbours; drawing the unit with its neighbours selects both. A unit with no neighbour within the margin has an empty `neighbours`, so its neighbour cell equals its alone cell and a planner need not draw it twice.\n *\n * It throws for a margin that is negative or not finite, a box whose corners are not finite or not ordered, and a pattern that matches no object.\n *\n * ```ts\n * expandAutoMovieInspectionSweep({ objects, pattern: \"hero/*\", margin: 0.02 });\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the input, what a unit and its box are, the neighbour rule with its unit and boundary, the order, what each output member selects, the empty-neighbour case and every refusal.\n * @evidence contracts/development/implementation.md#principled-implementation Two axis-aligned boxes intersect exactly when their intervals overlap on all three axes, so growing the unit's box by the margin and testing overlap finds every object within that distance along each axis; any scene that reports world boxes can answer it, whatever its subject.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Admission, unit discovery by the shallowest matched path, unit boxes, then one overlap test per unit and object.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The margin is the caller's stated value, no path or subject kind is treated specially, and an empty match is refused instead of planning no cell.\n * @evidence contracts/development/implementation.md#efficient-algorithms Units times objects overlap tests, plus one pattern match per object and per parent path; a sweep has tens of units, where a spatial index would cost more than it saves.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh records and keeps nothing.\n */\nexport function expandAutoMovieInspectionSweep(\n props: IAutoMovieInspectionSweepProps,\n): IAutoMovieInspectionSweepUnit[] {\n if (!(Number.isFinite(props.margin) && props.margin >= 0))\n throw new Error(\n `Sweep margin ${props.margin} is not a finite distance of zero or more`,\n );\n for (const object of props.objects)\n for (const axis of AXES)\n if (\n !Number.isFinite(object.min[axis]) ||\n !Number.isFinite(object.max[axis]) ||\n object.min[axis] > object.max[axis]\n )\n throw new Error(\n `Sweep object \"${object.path}\" has no finite ordered box along ${axis}`,\n );\n\n // A unit is a matched path whose parents are not matched.\n const units: string[] = [];\n for (const object of props.objects) {\n if (!matchAutoMovieInspectionPath(object.path, props.pattern)) continue;\n const names: string[] = object.path === \"\" ? [] : object.path.split(\"/\");\n let unit: string = object.path;\n for (let depth: number = 0; depth < names.length; depth++) {\n const parent: string = names.slice(0, depth).join(\"/\");\n if (matchAutoMovieInspectionPath(parent, props.pattern)) {\n unit = parent;\n break;\n }\n }\n if (!units.includes(unit)) units.push(unit);\n }\n if (units.length === 0)\n throw new Error(`Sweep pattern \"${props.pattern}\" matches no object`);\n\n return units.map(\n (unit: string): { unit: string; alone: string[]; neighbours: string[] } => {\n const inside: (path: string) => boolean = (path: string): boolean =>\n unit === \"\" || path === unit || path.startsWith(`${unit}/`);\n const members: typeof props.objects = props.objects.filter(\n (object: (typeof props.objects)[number]): boolean =>\n inside(object.path),\n );\n const low: IAutoMovieVector3 = corner(members, \"min\");\n const high: IAutoMovieVector3 = corner(members, \"max\");\n const neighbours: string[] = props.objects\n .filter(\n (object: (typeof props.objects)[number]): boolean =>\n !inside(object.path) &&\n AXES.every(\n (axis: \"x\" | \"y\" | \"z\"): boolean =>\n object.max[axis] >= low[axis] - props.margin &&\n object.min[axis] <= high[axis] + props.margin,\n ),\n )\n .map((object: (typeof props.objects)[number]): string => object.path);\n return { unit, alone: [unit], neighbours };\n },\n );\n}\n\n/** The three axes of a box. */\nconst AXES: readonly (\"x\" | \"y\" | \"z\")[] = [\"x\", \"y\", \"z\"];\n\n/** The lowest `min` or the highest `max` corner of a set of boxes. */\nfunction corner(\n boxes: readonly { min: IAutoMovieVector3; max: IAutoMovieVector3 }[],\n side: \"min\" | \"max\",\n): IAutoMovieVector3 {\n const pick: (values: number[]) => number =\n side === \"min\"\n ? (values: number[]): number => Math.min(...values)\n : (values: number[]): number => Math.max(...values);\n return {\n x: pick(\n boxes.map(\n (box: { min: IAutoMovieVector3; max: IAutoMovieVector3 }): number =>\n box[side].x,\n ),\n ),\n y: pick(\n boxes.map(\n (box: { min: IAutoMovieVector3; max: IAutoMovieVector3 }): number =>\n box[side].y,\n ),\n ),\n z: pick(\n boxes.map(\n (box: { min: IAutoMovieVector3; max: IAutoMovieVector3 }): number =>\n box[side].z,\n ),\n ),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAgB,+BACd,OACiC;CACjC,IAAI,EAAE,OAAO,SAAS,MAAM,MAAM,KAAK,MAAM,UAAU,IACrD,MAAM,IAAI,MACR,gBAAgB,MAAM,OAAO,0CAC/B;CACF,KAAK,MAAM,UAAU,MAAM,SACzB,KAAK,MAAM,QAAQ,MACjB,IACE,CAAC,OAAO,SAAS,OAAO,IAAI,KAAK,KACjC,CAAC,OAAO,SAAS,OAAO,IAAI,KAAK,KACjC,OAAO,IAAI,QAAQ,OAAO,IAAI,OAE9B,MAAM,IAAI,MACR,iBAAiB,OAAO,KAAK,oCAAoC,MACnE;CAGN,MAAM,QAAkB,CAAC;CACzB,KAAK,MAAM,UAAU,MAAM,SAAS;EAClC,IAAI,CAAC,6BAA6B,OAAO,MAAM,MAAM,OAAO,GAAG;EAC/D,MAAM,QAAkB,OAAO,SAAS,KAAK,CAAC,IAAI,OAAO,KAAK,MAAM,GAAG;EACvE,IAAI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IAAI,KAAK,CAAC,CACd,CACF;CACF;AACF"}
@@ -1,8 +1,7 @@
1
- import type { IAutoMovieMark } from "@automovie/engine";
1
+ import type { IAutoMovieInspectionFocus, IAutoMovieMark } from "@automovie/interface";
2
2
  import type * as THREE from "three";
3
3
  import type { IAutoMovieViewerSubjectBounds } from "../subjectViewpoint/IAutoMovieViewerSubjectBounds.js";
4
4
  import type { IAutoMovieInspectionPath } from "./IAutoMovieInspectionPath.js";
5
- import type { IAutoMovieInspectionView } from "./IAutoMovieInspectionView.js";
6
5
  /**
7
6
  * Measure the world-space box a view's focus frames: the drawn objects and marks a path pattern matches, or every drawn flagged mark, so a close-up on a part or on a defect's region is one request.
8
7
  *
@@ -18,7 +17,7 @@ import type { IAutoMovieInspectionView } from "./IAutoMovieInspectionView.js";
18
17
  */
19
18
  export declare function focusAutoMovieInspection(props: {
20
19
  /** What to frame. */
21
- focus: IAutoMovieInspectionView.IFocus;
20
+ focus: IAutoMovieInspectionFocus;
22
21
  /** The drawn, selected objects. */
23
22
  objects: readonly IAutoMovieInspectionPath[];
24
23
  /** The drawn marks with the objects their frames belong to. */
@@ -1 +1 @@
1
- {"version":3,"file":"focusAutoMovieInspection.js","sourceRoot":"","sources":["../../../src/scene/inspection/focusAutoMovieInspection.ts"],"names":[],"mappings":";;;AAMA,uFAAiF;AACjF,6FAAuF;AAEvF;;;;;;;;;;;;GAYG;AACH,kCAAyC,KASxC;IACC,MAAM,KAAK,GAAoC,KAAK,CAAC,KAAK,CAAC;IAC3D,MAAM,OAAO,GAAY,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC;IAClD,MAAM,KAAK,GAGL,IAAA,oEAA+B,EAAC;QACpC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO;QACrC,KAAK,EAAE,OAAO;YACZ,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAChB,CAAC,KAA+B,EAAW,EAAE,CAAC,KAA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CACjE;YACD,CAAC,EAAE,IAAI,CAAC,GAAG,CACT,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAA2B,EAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CACjE;SACF;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"focusAutoMovieInspection.js","sourceRoot":"","sources":["../../../src/scene/inspection/focusAutoMovieInspection.ts"],"names":[],"mappings":";;;AAQA,uFAAiF;AACjF,6FAAuF;AAEvF;;;;;;;;;;;;GAYG;AACH,kCAAyC,KASxC;IACC,MAAM,KAAK,GAA8B,KAAK,CAAC,KAAK,CAAC;IACrD,MAAM,OAAO,GAAY,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC;IAClD,MAAM,KAAK,GAGL,IAAA,oEAA+B,EAAC;QACpC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO;QACrC,KAAK,EAAE,OAAO;YACZ,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAChB,CAAC,KAA+B,EAAW,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CACjE;YACH,CAAC,CAAC,KAAK,CAAC,KAAK;QACf,MAAM,EACJ,KAAK,CAAC,IAAI,KAAK,SAAS;YACtB,CAAC,CAAC,CAAC,IAAY,EAAW,EAAE,CACxB,IAAA,8DAA4B,EAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;YACrD,CAAC,CAAC,GAAY,EAAE,CAAC,IAAI;KAC1B,CAAC,CAAC;IACH,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,KAAK,CAAC,IAAI,KAAK,SAAS;YACtB,CAAC,CAAC,oEAAoE;YACtE,CAAC,CAAC,qBAAqB,KAAK,CAAC,OAAO,yBAAyB,CAChE,CAAC;IACJ,OAAO;QACL,GAAG,EAAE;YACH,CAAC,EAAE,IAAI,CAAC,GAAG,CACT,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAA2B,EAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CACjE;YACD,CAAC,EAAE,IAAI,CAAC,GAAG,CACT,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAA2B,EAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CACjE;YACD,CAAC,EAAE,IAAI,CAAC,GAAG,CACT,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAA2B,EAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CACjE;SACF;QACD,GAAG,EAAE;YACH,CAAC,EAAE,IAAI,CAAC,GAAG,CACT,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAA2B,EAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CACjE;YACD,CAAC,EAAE,IAAI,CAAC,GAAG,CACT,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAA2B,EAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CACjE;YACD,CAAC,EAAE,IAAI,CAAC,GAAG,CACT,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAA2B,EAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CACjE;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"focusAutoMovieInspection.mjs","names":[],"sources":["../../../src/scene/inspection/focusAutoMovieInspection.ts"],"sourcesContent":["import type { IAutoMovieMark } from \"@automovie/engine\";\nimport type * as THREE from \"three\";\n\nimport type { IAutoMovieViewerSubjectBounds } from \"../subjectViewpoint/IAutoMovieViewerSubjectBounds.js\";\nimport type { IAutoMovieInspectionPath } from \"./IAutoMovieInspectionPath.js\";\nimport type { IAutoMovieInspectionView } from \"./IAutoMovieInspectionView.js\";\nimport { matchAutoMovieInspectionPath } from \"./matchAutoMovieInspectionPath.js\";\nimport { measureAutoMovieInspectionPaths } from \"./measureAutoMovieInspectionPaths.js\";\n\n/**\n * Measure the world-space box a view's focus frames: the drawn objects and marks a path pattern matches, or every drawn flagged mark, so a close-up on a part or on a defect's region is one request.\n *\n * The boxes are those `measureAutoMovieInspectionPaths` measures, joined into one. It throws when a pattern matches nothing drawn, and when the flagged focus finds no flagged mark, saying no mark is flagged.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States what each focus frames, where the boxes come from, and both refusals.\n * @evidence contracts/development/implementation.md#principled-implementation A flagged mark is where a measurement found an anomaly, so its region is the place a close-up frames; a pattern focus uses the same path grammar as every other selection.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Measure the matched paths, then join their boxes.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An empty focus is refused instead of falling back to the whole picture, which would frame a still with no defect in it.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the matched objects' drawn vertices and marks' coordinates.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The pose changes between calls, so no earlier box is reused.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returns plain numbers and keeps nothing.\n */\nexport function focusAutoMovieInspection(props: {\n /** What to frame. */\n focus: IAutoMovieInspectionView.IFocus;\n\n /** The drawn, selected objects. */\n objects: readonly IAutoMovieInspectionPath[];\n\n /** The drawn marks with the objects their frames belong to. */\n marks: readonly { mark: IAutoMovieMark; anchor: THREE.Object3D | null }[];\n}): IAutoMovieViewerSubjectBounds {\n const focus: IAutoMovieInspectionView.IFocus = props.focus;\n const flagged: boolean = focus.type === \"flagged\";\n const boxes: {\n min: { x: number; y: number; z: number };\n max: { x: number; y: number; z: number };\n }[] = measureAutoMovieInspectionPaths({\n objects: flagged ? [] : props.objects,\n marks: flagged\n ? props.marks.filter(\n (entry: { mark: IAutoMovieMark }): boolean => entry.mark.flagged,\n )\n : props.marks,\n choose:\n focus.type === \"pattern\"\n ? (path: string): boolean =>\n matchAutoMovieInspectionPath(path, focus.pattern)\n : (): boolean => true,\n });\n if (boxes.length === 0)\n throw new Error(\n focus.type === \"flagged\"\n ? \"Inspection focus @flagged has nothing to frame: no mark is flagged\"\n : `Inspection focus \"${focus.pattern}\" matches nothing drawn`,\n );\n return {\n min: {\n x: Math.min(\n ...boxes.map((box: { min: { x: number } }): number => box.min.x),\n ),\n y: Math.min(\n ...boxes.map((box: { min: { y: number } }): number => box.min.y),\n ),\n z: Math.min(\n ...boxes.map((box: { min: { z: number } }): number => box.min.z),\n ),\n },\n max: {\n x: Math.max(\n ...boxes.map((box: { max: { x: number } }): number => box.max.x),\n ),\n y: Math.max(\n ...boxes.map((box: { max: { y: number } }): number => box.max.y),\n ),\n z: Math.max(\n ...boxes.map((box: { max: { z: number } }): number => box.max.z),\n ),\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,SAAgB,yBAAyB,OASP;CAChC,MAAM,QAAyC,MAAM;CACrD,MAAM,UAAmB,MAAM,SAAS;CACxC,MAAM,QAGA,gCAAgC;EACpC,SAAS,UAAU,CAAC,IAAI,MAAM;EAC9B,OAAO,UACH,MAAM,MAAM,QACT,UAA6C,MAAM,KAAK,OAC3D,IACA,MAAM;EACV,QACE,MAAM,SAAS,aACV,SACC,6BAA6B,MAAM,MAAM,OAAO,UACnC;CACvB,CAAC;CACD,IAAI,MAAM,WAAW,GACnB,MAAM,IAAI,MACR,MAAM,SAAS,YACX,uEACA,qBAAqB,MAAM,QAAQ,wBACzC;CACF,OAAO;EACL,KAAK;GACH,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;GACA,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;GACA,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;EACF;EACA,KAAK;GACH,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;GACA,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;GACA,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;EACF;CACF;AACF"}
1
+ {"version":3,"file":"focusAutoMovieInspection.mjs","names":[],"sources":["../../../src/scene/inspection/focusAutoMovieInspection.ts"],"sourcesContent":["import type {\n IAutoMovieInspectionFocus,\n IAutoMovieMark,\n} from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\nimport type { IAutoMovieViewerSubjectBounds } from \"../subjectViewpoint/IAutoMovieViewerSubjectBounds.js\";\nimport type { IAutoMovieInspectionPath } from \"./IAutoMovieInspectionPath.js\";\nimport { matchAutoMovieInspectionPath } from \"./matchAutoMovieInspectionPath.js\";\nimport { measureAutoMovieInspectionPaths } from \"./measureAutoMovieInspectionPaths.js\";\n\n/**\n * Measure the world-space box a view's focus frames: the drawn objects and marks a path pattern matches, or every drawn flagged mark, so a close-up on a part or on a defect's region is one request.\n *\n * The boxes are those `measureAutoMovieInspectionPaths` measures, joined into one. It throws when a pattern matches nothing drawn, and when the flagged focus finds no flagged mark, saying no mark is flagged.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States what each focus frames, where the boxes come from, and both refusals.\n * @evidence contracts/development/implementation.md#principled-implementation A flagged mark is where a measurement found an anomaly, so its region is the place a close-up frames; a pattern focus uses the same path grammar as every other selection.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Measure the matched paths, then join their boxes.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An empty focus is refused instead of falling back to the whole picture, which would frame a still with no defect in it.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the matched objects' drawn vertices and marks' coordinates.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The pose changes between calls, so no earlier box is reused.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returns plain numbers and keeps nothing.\n */\nexport function focusAutoMovieInspection(props: {\n /** What to frame. */\n focus: IAutoMovieInspectionFocus;\n\n /** The drawn, selected objects. */\n objects: readonly IAutoMovieInspectionPath[];\n\n /** The drawn marks with the objects their frames belong to. */\n marks: readonly { mark: IAutoMovieMark; anchor: THREE.Object3D | null }[];\n}): IAutoMovieViewerSubjectBounds {\n const focus: IAutoMovieInspectionFocus = props.focus;\n const flagged: boolean = focus.type === \"flagged\";\n const boxes: {\n min: { x: number; y: number; z: number };\n max: { x: number; y: number; z: number };\n }[] = measureAutoMovieInspectionPaths({\n objects: flagged ? [] : props.objects,\n marks: flagged\n ? props.marks.filter(\n (entry: { mark: IAutoMovieMark }): boolean => entry.mark.flagged,\n )\n : props.marks,\n choose:\n focus.type === \"pattern\"\n ? (path: string): boolean =>\n matchAutoMovieInspectionPath(path, focus.pattern)\n : (): boolean => true,\n });\n if (boxes.length === 0)\n throw new Error(\n focus.type === \"flagged\"\n ? \"Inspection focus @flagged has nothing to frame: no mark is flagged\"\n : `Inspection focus \"${focus.pattern}\" matches nothing drawn`,\n );\n return {\n min: {\n x: Math.min(\n ...boxes.map((box: { min: { x: number } }): number => box.min.x),\n ),\n y: Math.min(\n ...boxes.map((box: { min: { y: number } }): number => box.min.y),\n ),\n z: Math.min(\n ...boxes.map((box: { min: { z: number } }): number => box.min.z),\n ),\n },\n max: {\n x: Math.max(\n ...boxes.map((box: { max: { x: number } }): number => box.max.x),\n ),\n y: Math.max(\n ...boxes.map((box: { max: { y: number } }): number => box.max.y),\n ),\n z: Math.max(\n ...boxes.map((box: { max: { z: number } }): number => box.max.z),\n ),\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,SAAgB,yBAAyB,OASP;CAChC,MAAM,QAAmC,MAAM;CAC/C,MAAM,UAAmB,MAAM,SAAS;CACxC,MAAM,QAGA,gCAAgC;EACpC,SAAS,UAAU,CAAC,IAAI,MAAM;EAC9B,OAAO,UACH,MAAM,MAAM,QACT,UAA6C,MAAM,KAAK,OAC3D,IACA,MAAM;EACV,QACE,MAAM,SAAS,aACV,SACC,6BAA6B,MAAM,MAAM,OAAO,UACnC;CACvB,CAAC;CACD,IAAI,MAAM,WAAW,GACnB,MAAM,IAAI,MACR,MAAM,SAAS,YACX,uEACA,qBAAqB,MAAM,QAAQ,wBACzC;CACF,OAAO;EACL,KAAK;GACH,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;GACA,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;GACA,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;EACF;EACA,KAAK;GACH,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;GACA,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;GACA,GAAG,KAAK,IACN,GAAG,MAAM,KAAK,QAAwC,IAAI,IAAI,CAAC,CACjE;EACF;CACF;AACF"}
@@ -1,4 +1,4 @@
1
- import type { IAutoMovieInspectionCamera } from "./IAutoMovieInspectionCamera.js";
1
+ import type { IAutoMovieInspectionCamera } from "@automovie/interface";
2
2
  /**
3
3
  * Write the view text that draws a resolved camera again: a fixed view at its eye looking at its target, with `@ortho=<metres per pixel>` for an orthographic camera and `@up=` when world `+Y` would roll the picture otherwise, written by `formatAutoMovieInspectionView`.
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"formatAutoMovieInspectionCameraView.js","sourceRoot":"","sources":["../../../src/scene/inspection/formatAutoMovieInspectionCameraView.ts"],"names":[],"mappings":";;;AACA,yFAAmF;AAEnF,8GAA8G;AAC9G,MAAM,IAAI,GAAW,IAAI,CAAC;AAE1B;;;;;;;;;;;;GAYG;AACH,6CACE,MAAkC;IAElC,MAAM,KAAK,GAA6B;QACtC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CA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AAC,QAAQ,EAAE;QAChC,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE;QAC5B,cAAc,EACZ,MAAM,CAAC,UAAU,KAAK,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI;QACrE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,EAAE;KACnC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"formatAutoMovieInspectionCameraView.js","sourceRoot":"","sources":["../../../src/scene/inspection/formatAutoMovieInspectionCameraView.ts"],"names":[],"mappings":";;;AAEA,yFAAmF;AAEnF,8GAA8G;AAC9G,MAAM,IAAI,GAAW,IAAI,CAAC;AAE1B;;;;;;;;;;;;GAYG;AACH,6CACE,MAAkC;IAElC,MAAM,KAAK,GAA6B;QACtC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;KACpC,CAAC;IACF,MAAM,MAAM,GAAW,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAa,KAAK,CAAC,GAAG,CACjC,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,GAAG,MAAM,CAC1C,CAAC;IAEF,iEAAiE;IACjE,MAAM,KAAK,GAAW,OAAO,CAAC,CAAC,CAAE,CAAC;IAClC,MAAM,OAAO,GAAa;QACxB,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAE;QACpB,CAAC,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC,CAAE;QACvB,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAE;KACrB,CAAC;IACF,MAAM,IAAI,GAAW,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACnE,MAAM,IAAI,GAAW,IAAI,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC7C,MAAM,IAAI,GACR,IAAI,GAAG,IAAI;QACX,OAAO,CAAC,KAAK,CACX,CAAC,KAAa,EAAE,IAAY,EAAW,EAAE,CACvC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAE,GAAG,IAAI,CAAC,IAAI,IAAI,CAC1D,CAAC;IACJ,OAAO,IAAA,gEAA6B,EAAC;QACnC,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE;QAChC,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE;QAC5B,cAAc,EACZ,MAAM,CAAC,UAAU,KAAK,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI;QACrE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,EAAE;KACnC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formatAutoMovieInspectionCameraView.mjs","names":[],"sources":["../../../src/scene/inspection/formatAutoMovieInspectionCameraView.ts"],"sourcesContent":["import type { IAutoMovieInspectionCamera } from \"./IAutoMovieInspectionCamera.js\";\nimport { formatAutoMovieInspectionView } from \"./formatAutoMovieInspectionView.js\";\n\n/** Tolerance on unit vectors below which two up directions are one, or a line of sight counts as vertical. */\nconst SAME: number = 1e-9;\n\n/**\n * Write the view text that draws a resolved camera again: a fixed view at its eye looking at its target, with `@ortho=<metres per pixel>` for an orthographic camera and `@up=` when world `+Y` would roll the picture otherwise, written by `formatAutoMovieInspectionView`.\n *\n * A record keeps this text beside each cell's camera, so a later round copies it as is and draws through the same camera even when what is drawn changes, as when a surface is hidden and a fitted view would frame a smaller box. The up is written only when needed: when the line of sight is vertical, so `+Y` cannot orient the picture, or when the recorded up differs from the one `+Y` gives. A perspective camera repeats with the subject's own lens and clips; an orthographic one repeats its scale exactly, and its clips by the fixed view's rule of a quarter and three and a half times the eye's distance to the target, which are a fitted orthographic view's own clips.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the text produced, why the record keeps it, when the up is written, and what of the camera a repeat reproduces.\n * @evidence contracts/development/implementation.md#principled-implementation `lookAt` with an up direction keeps the up's component across the line of sight, so the up `+Y` gives is `Y` minus its projection on the line of sight, normalised; when that equals the recorded up the default reproduces the roll, and when the line of sight is vertical it is undefined and the recorded up must be written.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Build the fixed view from the record, then the shared view writer.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The tolerance only decides whether a written default would reproduce the record; it never rounds a written number.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant work.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one record.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh string and keeps nothing.\n */\nexport function formatAutoMovieInspectionCameraView(\n camera: IAutoMovieInspectionCamera,\n): string {\n const sight: [number, number, number] = [\n camera.target.x - camera.position.x,\n camera.target.y - camera.position.y,\n camera.target.z - camera.position.z,\n ];\n const length: number = Math.hypot(...sight);\n const forward: number[] = sight.map(\n (value: number): number => value / length,\n );\n\n // The up `+Y` gives: Y without its part along the line of sight.\n const along: number = forward[1]!;\n const implied: number[] = [\n -along * forward[0]!,\n 1 - along * forward[1]!,\n -along * forward[2]!,\n ];\n const size: number = Math.hypot(...implied);\n const recorded: number[] = [camera.up.x, camera.up.y, camera.up.z];\n const norm: number = Math.hypot(...recorded);\n const same: boolean =\n size > SAME &&\n implied.every(\n (value: number, axis: number): boolean =>\n Math.abs(value / size - recorded[axis]! / norm) <= SAME,\n );\n return formatAutoMovieInspectionView({\n type: \"fixed\",\n position: { ...camera.position },\n target: { ...camera.target },\n metresPerPixel:\n camera.projection === \"orthographic\" ? camera.metresPerPixel : null,\n up: same ? null : { ...camera.up },\n });\n}\n"],"mappings":";;;AAIA,MAAM,OAAe;;;;;;;;;;;;;;AAerB,SAAgB,oCACd,QACQ;CACR,MAAM,QAAkC;EACtC,OAAO,OAAO,IAAI,OAAO,SAAS;EAClC,OAAO,OAAO,IAAI,OAAO,SAAS;EAClC,OAAO,OAAO,IAAI,OAAO,SAAS;CACpC;CACA,MAAM,SAAiB,KAAK,MAAM,GAAG,KAAK;CAC1C,MAAM,UAAoB,MAAM,KAC7B,UAA0B,QAAQ,MACrC;CAGA,MAAM,QAAgB,QAAQ;CAC9B,MAAM,UAAoB;EACxB,CAAC,QAAQ,QAAQ;EACjB,IAAI,QAAQ,QAAQ;EACpB,CAAC,QAAQ,QAAQ;CACnB;CACA,MAAM,OAAe,KAAK,MAAM,GAAG,OAAO;CAC1C,MAAM,WAAqB;EAAC,OAAO,GAAG;EAAG,OAAO,GAAG;EAAG,OAAO,GAAG;CAAC;CACjE,MAAM,OAAe,KAAK,MAAM,GAAG,QAAQ;CAC3C,MAAM,OACJ,OAAO,QACP,QAAQ,OACL,OAAe,SACd,KAAK,IAAI,QAAQ,OAAO,SAAS,QAAS,IAAI,KAAK,IACvD;CACF,OAAO,8BAA8B;EACnC,MAAM;EACN,UAAU,EAAE,GAAG,OAAO,SAAS;EAC/B,QAAQ,EAAE,GAAG,OAAO,OAAO;EAC3B,gBACE,OAAO,eAAe,iBAAiB,OAAO,iBAAiB;EACjE,IAAI,OAAO,OAAO,EAAE,GAAG,OAAO,GAAG;CACnC,CAAC;AACH"}
1
+ {"version":3,"file":"formatAutoMovieInspectionCameraView.mjs","names":[],"sources":["../../../src/scene/inspection/formatAutoMovieInspectionCameraView.ts"],"sourcesContent":["import type { IAutoMovieInspectionCamera } from \"@automovie/interface\";\n\nimport { formatAutoMovieInspectionView } from \"./formatAutoMovieInspectionView.js\";\n\n/** Tolerance on unit vectors below which two up directions are one, or a line of sight counts as vertical. */\nconst SAME: number = 1e-9;\n\n/**\n * Write the view text that draws a resolved camera again: a fixed view at its eye looking at its target, with `@ortho=<metres per pixel>` for an orthographic camera and `@up=` when world `+Y` would roll the picture otherwise, written by `formatAutoMovieInspectionView`.\n *\n * A record keeps this text beside each cell's camera, so a later round copies it as is and draws through the same camera even when what is drawn changes, as when a surface is hidden and a fitted view would frame a smaller box. The up is written only when needed: when the line of sight is vertical, so `+Y` cannot orient the picture, or when the recorded up differs from the one `+Y` gives. A perspective camera repeats with the subject's own lens and clips; an orthographic one repeats its scale exactly, and its clips by the fixed view's rule of a quarter and three and a half times the eye's distance to the target, which are a fitted orthographic view's own clips.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the text produced, why the record keeps it, when the up is written, and what of the camera a repeat reproduces.\n * @evidence contracts/development/implementation.md#principled-implementation `lookAt` with an up direction keeps the up's component across the line of sight, so the up `+Y` gives is `Y` minus its projection on the line of sight, normalised; when that equals the recorded up the default reproduces the roll, and when the line of sight is vertical it is undefined and the recorded up must be written.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Build the fixed view from the record, then the shared view writer.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The tolerance only decides whether a written default would reproduce the record; it never rounds a written number.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant work.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one record.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh string and keeps nothing.\n */\nexport function formatAutoMovieInspectionCameraView(\n camera: IAutoMovieInspectionCamera,\n): string {\n const sight: [number, number, number] = [\n camera.target.x - camera.position.x,\n camera.target.y - camera.position.y,\n camera.target.z - camera.position.z,\n ];\n const length: number = Math.hypot(...sight);\n const forward: number[] = sight.map(\n (value: number): number => value / length,\n );\n\n // The up `+Y` gives: Y without its part along the line of sight.\n const along: number = forward[1]!;\n const implied: number[] = [\n -along * forward[0]!,\n 1 - along * forward[1]!,\n -along * forward[2]!,\n ];\n const size: number = Math.hypot(...implied);\n const recorded: number[] = [camera.up.x, camera.up.y, camera.up.z];\n const norm: number = Math.hypot(...recorded);\n const same: boolean =\n size > SAME &&\n implied.every(\n (value: number, axis: number): boolean =>\n Math.abs(value / size - recorded[axis]! / norm) <= SAME,\n );\n return formatAutoMovieInspectionView({\n type: \"fixed\",\n position: { ...camera.position },\n target: { ...camera.target },\n metresPerPixel:\n camera.projection === \"orthographic\" ? camera.metresPerPixel : null,\n up: same ? null : { ...camera.up },\n });\n}\n"],"mappings":";;;AAKA,MAAM,OAAe;;;;;;;;;;;;;;AAerB,SAAgB,oCACd,QACQ;CACR,MAAM,QAAkC;EACtC,OAAO,OAAO,IAAI,OAAO,SAAS;EAClC,OAAO,OAAO,IAAI,OAAO,SAAS;EAClC,OAAO,OAAO,IAAI,OAAO,SAAS;CACpC;CACA,MAAM,SAAiB,KAAK,MAAM,GAAG,KAAK;CAC1C,MAAM,UAAoB,MAAM,KAC7B,UAA0B,QAAQ,MACrC;CAGA,MAAM,QAAgB,QAAQ;CAC9B,MAAM,UAAoB;EACxB,CAAC,QAAQ,QAAQ;EACjB,IAAI,QAAQ,QAAQ;EACpB,CAAC,QAAQ,QAAQ;CACnB;CACA,MAAM,OAAe,KAAK,MAAM,GAAG,OAAO;CAC1C,MAAM,WAAqB;EAAC,OAAO,GAAG;EAAG,OAAO,GAAG;EAAG,OAAO,GAAG;CAAC;CACjE,MAAM,OAAe,KAAK,MAAM,GAAG,QAAQ;CAC3C,MAAM,OACJ,OAAO,QACP,QAAQ,OACL,OAAe,SACd,KAAK,IAAI,QAAQ,OAAO,SAAS,QAAS,IAAI,KAAK,IACvD;CACF,OAAO,8BAA8B;EACnC,MAAM;EACN,UAAU,EAAE,GAAG,OAAO,SAAS;EAC/B,QAAQ,EAAE,GAAG,OAAO,OAAO;EAC3B,gBACE,OAAO,eAAe,iBAAiB,OAAO,iBAAiB;EACjE,IAAI,OAAO,OAAO,EAAE,GAAG,OAAO,GAAG;CACnC,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import type { IAutoMovieInspectionRequest } from "./IAutoMovieInspectionRequest.js";
1
+ import type { IAutoMovieInspectionRequest } from "@automovie/interface";
2
2
  /**
3
3
  * Write an inspection request as the named text values `parseAutoMovieInspectionRequest` reads, so a request made in one host repeats in another as an address or a command line.
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"formatAutoMovieInspectionRequest.js","sourceRoot":"","sources":["../../../src/scene/inspection/formatAutoMovieInspectionRequest.ts"],"names":[],"mappings":";;;AAGA,6FAAuF;AAEvF;;;;;;;;;;;;;;;;GAgBG;AACH,0CACE,OAAoC;IAEpC,MAAM,MAAM,GAAgC,IAAA,oEAA+B,EACzE,GAAc,EAAE,CAAC,SAAS,CAC3B,CAAC;IACF,MAAM,MAAM,GAAmC,EAAE,CAAC;IAClD,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7E,IAAI,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;QAAE,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1E,IAAI,OAAO,CAAC,OAAO,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OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC;YACV,OAAO;YACP,OAAO,CAAC,KAAK;iBACV,GAAG,CACF,CAAC,KAAyC,EAAU,EAAE,CACpD,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAClE;iBACA,IAAI,CAAC,GAAG,CAAC;SACb,CAAC,CAAC;IACL,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;QAChC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChD,IAAI,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;QAChC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"formatAutoMovieInspectionRequest.js","sourceRoot":"","sources":["../../../src/scene/inspection/formatAutoMovieInspectionRequest.ts"],"names":[],"mappings":";;;AAMA,6FAAuF;AAEvF;;;;;;;;;;;;;;;;GAgBG;AACH,0CACE,OAAoC;IAEpC,MAAM,MAAM,GAAgC,IAAA,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AI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;QAChC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChD,IAAI,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;QAChC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formatAutoMovieInspectionRequest.mjs","names":[],"sources":["../../../src/scene/inspection/formatAutoMovieInspectionRequest.ts"],"sourcesContent":["import type { IAutoMovieSectionPlane } from \"@automovie/engine\";\n\nimport type { IAutoMovieInspectionRequest } from \"./IAutoMovieInspectionRequest.js\";\nimport { parseAutoMovieInspectionRequest } from \"./parseAutoMovieInspectionRequest.js\";\n\n/**\n * Write an inspection request as the named text values `parseAutoMovieInspectionRequest` reads, so a request made in one host repeats in another as an address or a command line.\n *\n * Keys come in the order of `AUTO_MOVIE_INSPECTION_KEYS`, and a key whose value is the parser's absent value is left out, so the request that asks for nothing is the empty list. Lists are joined by commas, colours written `pattern=rrggbb`, switches are written `1` or `0`, numbers in JavaScript's shortest form that reads back to the same number, and a cut always in its general `px,py,pz:nx,ny,nz` form. For every request the parser returns, parsing the written values gives an equal request.\n *\n * ```ts\n * const address = new URLSearchParams(formatAutoMovieInspectionRequest(request));\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the order, which keys are left out, how each value form is written, the one form a cut takes and the round trip it guarantees.\n * @evidence contracts/development/implementation.md#principled-implementation The writer mirrors the parser key by key: the absent values are read from the parser itself, a value equal to one is omitted because omitting it reads back the same, and `String` of a finite number is the shortest text that reads back as that number, so the round trip is exact.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One list built key by key in the parser's order.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No default is restated: the parser's own empty request supplies them. An axis cut is written in the general form, which reads back as the same point and normal, instead of guessing which axis form it came from.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the length of the written text, plus one parse of no keys.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one request.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh pairs and keeps nothing.\n */\nexport function formatAutoMovieInspectionRequest(\n request: IAutoMovieInspectionRequest,\n): [key: string, value: string][] {\n const absent: IAutoMovieInspectionRequest = parseAutoMovieInspectionRequest(\n (): undefined => undefined,\n );\n const values: [key: string, value: string][] = [];\n if (request.parts.length !== 0)\n values.push([\"parts\", request.parts.join(\",\")]);\n if (request.hide.length !== 0) values.push([\"hide\", request.hide.join(\",\")]);\n if (request.shade !== absent.shade) values.push([\"shade\", request.shade]);\n if (request.surface !== absent.surface)\n values.push([\"surface\", request.surface ? \"1\" : \"0\"]);\n if (request.marks.length !== 0)\n values.push([\"marks\", request.marks.join(\",\")]);\n if (request.sliver !== null) values.push([\"sliver\", String(request.sliver)]);\n if (request.section !== null) {\n const cut: IAutoMovieSectionPlane = request.section;\n values.push([\n \"section\",\n `${cut.point.x},${cut.point.y},${cut.point.z}:${cut.normal.x},${cut.normal.y},${cut.normal.z}`,\n ]);\n }\n if (request.xray !== absent.xray)\n values.push([\"xray\", request.xray ? \"1\" : \"0\"]);\n if (request.stroke !== absent.stroke)\n values.push([\"stroke\", String(request.stroke)]);\n if (request.label.length !== 0)\n values.push([\"label\", request.label.join(\",\")]);\n if (request.color.length !== 0)\n values.push([\n \"color\",\n request.color\n .map(\n (entry: IAutoMovieInspectionRequest.IColor): string =>\n `${entry.pattern}=${entry.color.toString(16).padStart(6, \"0\")}`,\n )\n .join(\",\"),\n ]);\n if (request.trail.length !== 0)\n values.push([\"trail\", request.trail.join(\",\")]);\n if (request.reach !== absent.reach)\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GAC3B,OAAO,KAAK,CAAC,SAAS,QAAQ,MAAM,KAAK,GAAG,CAAC,CAAC;CAChD,IAAI,QAAQ,MAAM,WAAW,GAC3B,OAAO,KAAK,CACV,SACA,QAAQ,MACL,KACE,UACC,GAAG,MAAM,QAAQ,GAAG,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,GAChE,CAAC,CACA,KAAK,GAAG,CACb,CAAC;CACH,IAAI,QAAQ,MAAM,WAAW,GAC3B,OAAO,KAAK,CAAC,SAAS,QAAQ,MAAM,KAAK,GAAG,CAAC,CAAC;CAChD,IAAI,QAAQ,UAAU,OAAO,OAC3B,OAAO,KAAK,CAAC,SAAS,OAAO,QAAQ,KAAK,CAAC,CAAC;CAC9C,IAAI,QAAQ,UAAU,OAAO,OAC3B,OAAO,KAAK,CAAC,SAAS,OAAO,QAAQ,KAAK,CAAC,CAAC;CAC9C,OAAO;AACT"}
1
+ {"version":3,"file":"formatAutoMovieInspectionRequest.mjs","names":[],"sources":["../../../src/scene/inspection/formatAutoMovieInspectionRequest.ts"],"sourcesContent":["import type {\n IAutoMovieInspectionColorAssignment,\n IAutoMovieInspectionRequest,\n IAutoMovieSectionPlane,\n} from \"@automovie/interface\";\n\nimport { parseAutoMovieInspectionRequest } from \"./parseAutoMovieInspectionRequest.js\";\n\n/**\n * Write an inspection request as the named text values `parseAutoMovieInspectionRequest` reads, so a request made in one host repeats in another as an address or a command line.\n *\n * Keys come in the order of `AUTO_MOVIE_INSPECTION_KEYS`, and a key whose value is the parser's absent value is left out, so the request that asks for nothing is the empty list. Lists are joined by commas, colours written `pattern=rrggbb`, switches are written `1` or `0`, numbers in JavaScript's shortest form that reads back to the same number, and a cut always in its general `px,py,pz:nx,ny,nz` form. For every request the parser returns, parsing the written values gives an equal request.\n *\n * ```ts\n * const address = new URLSearchParams(formatAutoMovieInspectionRequest(request));\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the order, which keys are left out, how each value form is written, the one form a cut takes and the round trip it guarantees.\n * @evidence contracts/development/implementation.md#principled-implementation The writer mirrors the parser key by key: the absent values are read from the parser itself, a value equal to one is omitted because omitting it reads back the same, and `String` of a finite number is the shortest text that reads back as that number, so the round trip is exact.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One list built key by key in the parser's order.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No default is restated: the parser's own empty request supplies them. An axis cut is written in the general form, which reads back as the same point and normal, instead of guessing which axis form it came from.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the length of the written text, plus one parse of no keys.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one request.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh pairs and keeps nothing.\n */\nexport function formatAutoMovieInspectionRequest(\n request: IAutoMovieInspectionRequest,\n): [key: string, value: string][] {\n const absent: IAutoMovieInspectionRequest = parseAutoMovieInspectionRequest(\n (): undefined => undefined,\n );\n const values: [key: string, value: string][] = [];\n if (request.parts.length !== 0)\n values.push([\"parts\", request.parts.join(\",\")]);\n if (request.hide.length !== 0) values.push([\"hide\", request.hide.join(\",\")]);\n if (request.shade !== absent.shade) values.push([\"shade\", request.shade]);\n if (request.surface !== absent.surface)\n values.push([\"surface\", request.surface ? \"1\" : \"0\"]);\n if (request.marks.length !== 0)\n values.push([\"marks\", request.marks.join(\",\")]);\n if (request.sliver !== null) values.push([\"sliver\", String(request.sliver)]);\n if (request.section !== null) {\n const cut: IAutoMovieSectionPlane = request.section;\n values.push([\n \"section\",\n `${cut.point.x},${cut.point.y},${cut.point.z}:${cut.normal.x},${cut.normal.y},${cut.normal.z}`,\n ]);\n }\n if (request.xray !== absent.xray)\n values.push([\"xray\", request.xray ? \"1\" : \"0\"]);\n if (request.stroke !== absent.stroke)\n values.push([\"stroke\", String(request.stroke)]);\n if (request.label.length !== 0)\n values.push([\"label\", request.label.join(\",\")]);\n if (request.color.length !== 0)\n values.push([\n \"color\",\n request.color\n .map(\n (entry: IAutoMovieInspectionColorAssignment): string =>\n `${entry.pattern}=${entry.color.toString(16).padStart(6, \"0\")}`,\n )\n .join(\",\"),\n ]);\n if (request.trail.length !== 0)\n values.push([\"trail\", request.trail.join(\",\")]);\n if (request.reach !== absent.reach)\n values.push([\"reach\", String(request.reach)]);\n if (request.ticks !== absent.ticks)\n values.push([\"ticks\", String(request.ticks)]);\n return values;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,iCACd,SACgC;CAChC,MAAM,SAAsC,sCACzB,KAAA,CACnB;CACA,MAAM,SAAyC,CAAC;CAChD,IAAI,QAAQ,MAAM,WAAW,GAC3B,OAAO,KAAK,CAAC,SAAS,QAAQ,MAAM,KAAK,GAAG,CAAC,CAAC;CAChD,IAAI,QAAQ,KAAK,WAAW,GAAG,OAAO,KAAK,CAAC,QAAQ,QAAQ,KAAK,KAAK,GAAG,CAAC,CAAC;CAC3E,IAAI,QAAQ,UAAU,OAAO,OAAO,OAAO,KAAK,CAAC,SAAS,QAAQ,KAAK,CAAC;CACxE,IAAI,QAAQ,YAAY,OAAO,SAC7B,OAAO,KAAK,CAAC,WAAW,QAAQ,UAAU,MAAM,GAAG,CAAC;CACtD,IAAI,QAAQ,MAAM,WAAW,GAC3B,OAAO,KAAK,CAAC,SAAS,QAAQ,MAAM,KAAK,GAAG,CAAC,CAAC;CAChD,IAAI,QAAQ,WAAW,MAAM,OAAO,KAAK,CAAC,UAAU,OAAO,QAAQ,MAAM,CAAC,CAAC;CAC3E,IAAI,QAAQ,YAAY,MAAM;EAC5B,MAAM,MAA8B,QAAQ;EAC5C,OAAO,KAAK,CACV,WACA,GAAG,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,IAAI,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,GAAG,IAAI,OAAO,GAC7F,CAAC;CACH;CACA,IAAI,QAAQ,SAAS,OAAO,MAC1B,OAAO,KAAK,CAAC,QAAQ,QAAQ,OAAO,MAAM,GAAG,CAAC;CAChD,IAAI,QAAQ,WAAW,OAAO,QAC5B,OAAO,KAAK,CAAC,UAAU,OAAO,QAAQ,MAAM,CAAC,CAAC;CAChD,IAAI,QAAQ,MAAM,WAAW,GAC3B,OAAO,KAAK,CAAC,SAAS,QAAQ,MAAM,KAAK,GAAG,CAAC,CAAC;CAChD,IAAI,QAAQ,MAAM,WAAW,GAC3B,OAAO,KAAK,CACV,SACA,QAAQ,MACL,KACE,UACC,GAAG,MAAM,QAAQ,GAAG,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,GAChE,CAAC,CACA,KAAK,GAAG,CACb,CAAC;CACH,IAAI,QAAQ,MAAM,WAAW,GAC3B,OAAO,KAAK,CAAC,SAAS,QAAQ,MAAM,KAAK,GAAG,CAAC,CAAC;CAChD,IAAI,QAAQ,UAAU,OAAO,OAC3B,OAAO,KAAK,CAAC,SAAS,OAAO,QAAQ,KAAK,CAAC,CAAC;CAC9C,IAAI,QAAQ,UAAU,OAAO,OAC3B,OAAO,KAAK,CAAC,SAAS,OAAO,QAAQ,KAAK,CAAC,CAAC;CAC9C,OAAO;AACT"}
@@ -1,4 +1,4 @@
1
- import type { IAutoMovieInspectionView } from "./IAutoMovieInspectionView.js";
1
+ import type { IAutoMovieInspectionView } from "@automovie/interface";
2
2
  /**
3
3
  * Write an inspection view as the text `parseAutoMovieInspectionView` reads, so a view chosen in one host repeats in another.
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"formatAutoMovieInspectionView.js","sourceRoot":"","sources":["../../../src/scene/inspection/formatAutoMovieInspectionView.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;GAYG;AACH,uCACE,IAA8B;IAE9B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IACxC,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;QACvB,OAAO,CACL,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACjD,CAAC,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,cAAc,EAAE,CAAC;YACrE,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CACnD,CAAC;IACJ,OAAO,CACL,IAAI,CAAC,IAAI;QACT,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9B,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI;YAClB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;gBAC7B,CAAC,CAAC,UAAU;gBACZ,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CACtC,CAAC;AACJ,CAAC;AAED,2BAA2B;AAC3B,SAAS,MAAM,CAAC,MAAyB;IACvC,OAAO,GAAG,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC;AAC/C,CAAC"}
1
+ {"version":3,"file":"formatAutoMovieInspectionView.js","sourceRoot":"","sources":["../../../src/scene/inspection/formatAutoMovieInspectionView.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;;;;GAYG;AACH,uCACE,IAA8B;IAE9B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IACxC,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;QACvB,OAAO,CACL,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACjD,CAAC,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,cAAc,EAAE,CAAC;YACrE,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CACnD,CAAC;IACJ,OAAO,CACL,IAAI,CAAC,IAAI;QACT,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9B,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI;YAClB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;gBAC7B,CAAC,CAAC,UAAU;gBACZ,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CACtC,CAAC;AACJ,CAAC;AAED,2BAA2B;AAC3B,SAAS,MAAM,CAAC,MAAyB;IACvC,OAAO,GAAG,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC;AAC/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formatAutoMovieInspectionView.mjs","names":[],"sources":["../../../src/scene/inspection/formatAutoMovieInspectionView.ts"],"sourcesContent":["import type { IAutoMovieVector3 } from \"@automovie/interface\";\n\nimport type { IAutoMovieInspectionView } from \"./IAutoMovieInspectionView.js\";\n\n/**\n * Write an inspection view as the text `parseAutoMovieInspectionView` reads, so a view chosen in one host repeats in another.\n *\n * The film camera is `film`. A fixed camera is `x,y,z:tx,ty,tz`, then `@ortho=<metres per pixel>` when orthographic and `@up=ux,uy,uz` when its up is not world `+Y`. A named view is its name followed by `@ortho` when orthographic, `@follow` when fitted per second, and then `@focus=<pattern>` or `@flagged` for its focus. Every number is written in JavaScript's shortest form that reads back to it, and for every view the parser returns, parsing the written text gives an equal view.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the text of each form, the switch order and the round trip it guarantees.\n * @evidence contracts/development/implementation.md#principled-implementation The writer mirrors the parser form by form, and `String` of a finite number is the shortest text that reads back as that number, so the round trip is exact.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One branch per form.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Switches are written in one fixed order, so one view has one text.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the length of the written text.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one view.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh string and keeps nothing.\n */\nexport function formatAutoMovieInspectionView(\n view: IAutoMovieInspectionView,\n): string {\n if (view.type === \"film\") return \"film\";\n if (view.type === \"fixed\")\n return (\n `${triple(view.position)}:${triple(view.target)}` +\n (view.metresPerPixel === null ? \"\" : `@ortho=${view.metresPerPixel}`) +\n (view.up === null ? \"\" : `@up=${triple(view.up)}`)\n );\n return (\n view.name +\n (view.orthographic ? \"@ortho\" : \"\") +\n (view.follow ? \"@follow\" : \"\") +\n (view.focus === null\n ? \"\"\n : view.focus.type === \"flagged\"\n ? \"@flagged\"\n : `@focus=${view.focus.pattern}`)\n );\n}\n\n/** A vector as `x,y,z`. */\nfunction triple(vector: IAutoMovieVector3): string {\n return `${vector.x},${vector.y},${vector.z}`;\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAgB,8BACd,MACQ;CACR,IAAI,KAAK,SAAS,QAAQ,OAAO;CACjC,IAAI,KAAK,SAAS,SAChB,OACE,GAAG,OAAO,KAAK,QAAQ,EAAE,GAAG,OAAO,KAAK,MAAM,OAC7C,KAAK,mBAAmB,OAAO,KAAK,UAAU,KAAK,qBACnD,KAAK,OAAO,OAAO,KAAK,OAAO,OAAO,KAAK,EAAE;CAElD,OACE,KAAK,QACJ,KAAK,eAAe,WAAW,OAC/B,KAAK,SAAS,YAAY,OAC1B,KAAK,UAAU,OACZ,KACA,KAAK,MAAM,SAAS,YAClB,aACA,UAAU,KAAK,MAAM;AAE/B;;AAGA,SAAS,OAAO,QAAmC;CACjD,OAAO,GAAG,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO;AAC3C"}
1
+ {"version":3,"file":"formatAutoMovieInspectionView.mjs","names":[],"sources":["../../../src/scene/inspection/formatAutoMovieInspectionView.ts"],"sourcesContent":["import type {\n IAutoMovieInspectionView,\n IAutoMovieVector3,\n} from \"@automovie/interface\";\n\n/**\n * Write an inspection view as the text `parseAutoMovieInspectionView` reads, so a view chosen in one host repeats in another.\n *\n * The film camera is `film`. A fixed camera is `x,y,z:tx,ty,tz`, then `@ortho=<metres per pixel>` when orthographic and `@up=ux,uy,uz` when its up is not world `+Y`. A named view is its name followed by `@ortho` when orthographic, `@follow` when fitted per second, and then `@focus=<pattern>` or `@flagged` for its focus. Every number is written in JavaScript's shortest form that reads back to it, and for every view the parser returns, parsing the written text gives an equal view.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the text of each form, the switch order and the round trip it guarantees.\n * @evidence contracts/development/implementation.md#principled-implementation The writer mirrors the parser form by form, and `String` of a finite number is the shortest text that reads back as that number, so the round trip is exact.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One branch per form.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Switches are written in one fixed order, so one view has one text.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the length of the written text.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one view.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh string and keeps nothing.\n */\nexport function formatAutoMovieInspectionView(\n view: IAutoMovieInspectionView,\n): string {\n if (view.type === \"film\") return \"film\";\n if (view.type === \"fixed\")\n return (\n `${triple(view.position)}:${triple(view.target)}` +\n (view.metresPerPixel === null ? \"\" : `@ortho=${view.metresPerPixel}`) +\n (view.up === null ? \"\" : `@up=${triple(view.up)}`)\n );\n return (\n view.name +\n (view.orthographic ? \"@ortho\" : \"\") +\n (view.follow ? \"@follow\" : \"\") +\n (view.focus === null\n ? \"\"\n : view.focus.type === \"flagged\"\n ? \"@flagged\"\n : `@focus=${view.focus.pattern}`)\n );\n}\n\n/** A vector as `x,y,z`. */\nfunction triple(vector: IAutoMovieVector3): string {\n return `${vector.x},${vector.y},${vector.z}`;\n}\n"],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgB,8BACd,MACQ;CACR,IAAI,KAAK,SAAS,QAAQ,OAAO;CACjC,IAAI,KAAK,SAAS,SAChB,OACE,GAAG,OAAO,KAAK,QAAQ,EAAE,GAAG,OAAO,KAAK,MAAM,OAC7C,KAAK,mBAAmB,OAAO,KAAK,UAAU,KAAK,qBACnD,KAAK,OAAO,OAAO,KAAK,OAAO,OAAO,KAAK,EAAE;CAElD,OACE,KAAK,QACJ,KAAK,eAAe,WAAW,OAC/B,KAAK,SAAS,YAAY,OAC1B,KAAK,UAAU,OACZ,KACA,KAAK,MAAM,SAAS,YAClB,aACA,UAAU,KAAK,MAAM;AAE/B;;AAGA,SAAS,OAAO,QAAmC;CACjD,OAAO,GAAG,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO;AAC3C"}
@@ -1,5 +1,4 @@
1
- import type { IAutoMovieMark } from "@automovie/engine";
2
- import type { IAutoMovieInspectionLegendEntry } from "./IAutoMovieInspectionLegendEntry.js";
1
+ import type { IAutoMovieInspectionKindStyle, IAutoMovieInspectionLegendEntry, IAutoMovieMark } from "@automovie/interface";
3
2
  /**
4
3
  * List what the colours of a picture's marks mean: each drawn kind once, with the number of its marks drawn in its colour, and for each kind with flagged marks one entry in the flag colour, labelled `<label> (flagged)`, with their number.
5
4
  *
@@ -13,7 +12,4 @@ import type { IAutoMovieInspectionLegendEntry } from "./IAutoMovieInspectionLege
13
12
  * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one picture's marks.
14
13
  * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh entries and keeps nothing.
15
14
  */
16
- export declare function legendAutoMovieInspectionMarks(marks: readonly IAutoMovieMark[], kinds: ReadonlyMap<string, {
17
- label: string;
18
- color: number;
19
- }>): IAutoMovieInspectionLegendEntry[];
15
+ export declare function legendAutoMovieInspectionMarks(marks: readonly IAutoMovieMark[], kinds: ReadonlyMap<string, IAutoMovieInspectionKindStyle>): IAutoMovieInspectionLegendEntry[];
@@ -1 +1 @@
1
- {"version":3,"file":"legendAutoMovieInspectionMarks.js","sourceRoot":"","sources":["../../../src/scene/inspection/legendAutoMovieInspectionMarks.ts"],"names":[],"mappings":";;;AAEA,yFAAmF;AAGnF;;;;;;;;;;;;GAYG;AACH,wCACE,KAAgC,EAChC,KAA4D;IAE5D,MAAM,MAAM,GAAoD,IAAI,GAAG,EAGpE,CAAC;IACJ,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,KAAK,GAAmD,MAAM,CAAC,GAAG,CACpE,IAAI,CAAC,IAAI,CACV,CAAC;QACF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YACjC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,IAAI,CAAC,OAAO;YAAE,KAAK,CAAC,OAAO,EAAE,CAAC;;YAC7B,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED,MAAM,MAAM,GAAsC,EAAE,CAAC;IACrD,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;QACnC,MAAM,KAAK,GAAqC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;QACjE,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB,CAAC,CAAC;QACL,IAAI,KAAK,CAAC,OAAO,KAAK,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,GAAG,KAAK,CAAC,KAAK,YAAY;gBACjC,KAAK,EAAE,gEAA6B,CAAC,OAAO;gBAC5C,KAAK,EAAE,KAAK,CAAC,OAAO;aACrB,CAAC,CAAC;IACP,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"legendAutoMovieInspectionMarks.js","sourceRoot":"","sources":["../../../src/scene/inspection/legendAutoMovieInspectionMarks.ts"],"names":[],"mappings":";;;AAMA,yFAAmF;AAEnF;;;;;;;;;;;;GAYG;AACH,wCACE,KAAgC,EAChC,KAAyD;IAEzD,MAAM,MAAM,GAAoD,IAAI,GAAG,EAGpE,CAAC;IACJ,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,KAAK,GAAmD,MAAM,CAAC,GAAG,CACpE,IAAI,CAAC,IAAI,CACV,CAAC;QACF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YACjC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,IAAI,CAAC,OAAO;YAAE,KAAK,CAAC,OAAO,EAAE,CAAC;;YAC7B,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED,MAAM,MAAM,GAAsC,EAAE,CAAC;IACrD,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;QACnC,MAAM,KAAK,GAAqC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;QACjE,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB,CAAC,CAAC;QACL,IAAI,KAAK,CAAC,OAAO,KAAK,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,GAAG,KAAK,CAAC,KAAK,YAAY;gBACjC,KAAK,EAAE,gEAA6B,CAAC,OAAO;gBAC5C,KAAK,EAAE,KAAK,CAAC,OAAO;aACrB,CAAC,CAAC;IACP,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"legendAutoMovieInspectionMarks.mjs","names":[],"sources":["../../../src/scene/inspection/legendAutoMovieInspectionMarks.ts"],"sourcesContent":["import type { IAutoMovieMark } from \"@automovie/engine\";\n\nimport { AUTO_MOVIE_INSPECTION_PALETTE } from \"./AUTO_MOVIE_INSPECTION_PALETTE.js\";\nimport type { IAutoMovieInspectionLegendEntry } from \"./IAutoMovieInspectionLegendEntry.js\";\n\n/**\n * List what the colours of a picture's marks mean: each drawn kind once, with the number of its marks drawn in its colour, and for each kind with flagged marks one entry in the flag colour, labelled `<label> (flagged)`, with their number.\n *\n * Entries come in the order kinds first appear among the marks, a kind's own entry before its flag entry. A kind whose every mark is flagged has only its flag entry, because its own colour is not in the picture.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States what is listed and counted, the label of a flag entry, the order and the kind that has no own entry.\n * @evidence contracts/development/implementation.md#principled-implementation The legend reports the colours drawn: a flagged mark is drawn in the flag colour, so it is counted there under its kind's name, which keeps one flag colour and still says what was flagged.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One pass counting per kind, then one pass writing entries.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A count of zero gives no entry, so an absent finding never reads as a mark.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the marks.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one picture's marks.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh entries and keeps nothing.\n */\nexport function legendAutoMovieInspectionMarks(\n marks: readonly IAutoMovieMark[],\n kinds: ReadonlyMap<string, { label: string; color: number }>,\n): IAutoMovieInspectionLegendEntry[] {\n const counts: Map<string, { plain: number; flagged: number }> = new Map<\n string,\n { plain: number; flagged: number }\n >();\n for (const mark of marks) {\n let count: { plain: number; flagged: number } | undefined = counts.get(\n mark.kind,\n );\n if (count === undefined) {\n count = { plain: 0, flagged: 0 };\n counts.set(mark.kind, count);\n }\n if (mark.flagged) count.flagged++;\n else count.plain++;\n }\n\n const legend: IAutoMovieInspectionLegendEntry[] = [];\n for (const [kind, count] of counts) {\n const entry: { label: string; color: number } = kinds.get(kind)!;\n if (count.plain !== 0)\n legend.push({\n label: entry.label,\n color: entry.color,\n count: count.plain,\n });\n if (count.flagged !== 0)\n legend.push({\n label: `${entry.label} (flagged)`,\n color: AUTO_MOVIE_INSPECTION_PALETTE.flagged,\n count: count.flagged,\n });\n }\n return legend;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,SAAgB,+BACd,OACA,OACmC;CACnC,MAAM,yBAA0D,IAAI,IAGlE;CACF,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,QAAwD,OAAO,IACjE,KAAK,IACP;EACA,IAAI,UAAU,KAAA,GAAW;GACvB,QAAQ;IAAE,OAAO;IAAG,SAAS;GAAE;GAC/B,OAAO,IAAI,KAAK,MAAM,KAAK;EAC7B;EACA,IAAI,KAAK,SAAS,MAAM;OACnB,MAAM;CACb;CAEA,MAAM,SAA4C,CAAC;CACnD,KAAK,MAAM,CAAC,MAAM,UAAU,QAAQ;EAClC,MAAM,QAA0C,MAAM,IAAI,IAAI;EAC9D,IAAI,MAAM,UAAU,GAClB,OAAO,KAAK;GACV,OAAO,MAAM;GACb,OAAO,MAAM;GACb,OAAO,MAAM;EACf,CAAC;EACH,IAAI,MAAM,YAAY,GACpB,OAAO,KAAK;GACV,OAAO,GAAG,MAAM,MAAM;GACtB,OAAO,8BAA8B;GACrC,OAAO,MAAM;EACf,CAAC;CACL;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"legendAutoMovieInspectionMarks.mjs","names":[],"sources":["../../../src/scene/inspection/legendAutoMovieInspectionMarks.ts"],"sourcesContent":["import type {\n IAutoMovieInspectionKindStyle,\n IAutoMovieInspectionLegendEntry,\n IAutoMovieMark,\n} from \"@automovie/interface\";\n\nimport { AUTO_MOVIE_INSPECTION_PALETTE } from \"./AUTO_MOVIE_INSPECTION_PALETTE.js\";\n\n/**\n * List what the colours of a picture's marks mean: each drawn kind once, with the number of its marks drawn in its colour, and for each kind with flagged marks one entry in the flag colour, labelled `<label> (flagged)`, with their number.\n *\n * Entries come in the order kinds first appear among the marks, a kind's own entry before its flag entry. A kind whose every mark is flagged has only its flag entry, because its own colour is not in the picture.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States what is listed and counted, the label of a flag entry, the order and the kind that has no own entry.\n * @evidence contracts/development/implementation.md#principled-implementation The legend reports the colours drawn: a flagged mark is drawn in the flag colour, so it is counted there under its kind's name, which keeps one flag colour and still says what was flagged.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One pass counting per kind, then one pass writing entries.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A count of zero gives no entry, so an absent finding never reads as a mark.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the marks.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one picture's marks.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh entries and keeps nothing.\n */\nexport function legendAutoMovieInspectionMarks(\n marks: readonly IAutoMovieMark[],\n kinds: ReadonlyMap<string, IAutoMovieInspectionKindStyle>,\n): IAutoMovieInspectionLegendEntry[] {\n const counts: Map<string, { plain: number; flagged: number }> = new Map<\n string,\n { plain: number; flagged: number }\n >();\n for (const mark of marks) {\n let count: { plain: number; flagged: number } | undefined = counts.get(\n mark.kind,\n );\n if (count === undefined) {\n count = { plain: 0, flagged: 0 };\n counts.set(mark.kind, count);\n }\n if (mark.flagged) count.flagged++;\n else count.plain++;\n }\n\n const legend: IAutoMovieInspectionLegendEntry[] = [];\n for (const [kind, count] of counts) {\n const entry: { label: string; color: number } = kinds.get(kind)!;\n if (count.plain !== 0)\n legend.push({\n label: entry.label,\n color: entry.color,\n count: count.plain,\n });\n if (count.flagged !== 0)\n legend.push({\n label: `${entry.label} (flagged)`,\n color: AUTO_MOVIE_INSPECTION_PALETTE.flagged,\n count: count.flagged,\n });\n }\n return legend;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,SAAgB,+BACd,OACA,OACmC;CACnC,MAAM,yBAA0D,IAAI,IAGlE;CACF,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,QAAwD,OAAO,IACjE,KAAK,IACP;EACA,IAAI,UAAU,KAAA,GAAW;GACvB,QAAQ;IAAE,OAAO;IAAG,SAAS;GAAE;GAC/B,OAAO,IAAI,KAAK,MAAM,KAAK;EAC7B;EACA,IAAI,KAAK,SAAS,MAAM;OACnB,MAAM;CACb;CAEA,MAAM,SAA4C,CAAC;CACnD,KAAK,MAAM,CAAC,MAAM,UAAU,QAAQ;EAClC,MAAM,QAA0C,MAAM,IAAI,IAAI;EAC9D,IAAI,MAAM,UAAU,GAClB,OAAO,KAAK;GACV,OAAO,MAAM;GACb,OAAO,MAAM;GACb,OAAO,MAAM;EACf,CAAC;EACH,IAAI,MAAM,YAAY,GACpB,OAAO,KAAK;GACV,OAAO,GAAG,MAAM,MAAM;GACtB,OAAO,8BAA8B;GACrC,OAAO,MAAM;EACf,CAAC;CACL;CACA,OAAO;AACT"}