@allyhub/sdk 0.1.0-alpha.7 → 0.2.0-next.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 (370) hide show
  1. package/NOTICE +85 -0
  2. package/client.d.ts +45 -1
  3. package/dist/anim.js +2 -75
  4. package/dist/define.d.ts +10 -4
  5. package/dist/define.js +2 -95
  6. package/dist/dom.d.ts +1 -1
  7. package/dist/dom.js +2 -457
  8. package/dist/fit.js +2 -60
  9. package/dist/free.d.ts +18 -0
  10. package/dist/free.js +2 -0
  11. package/dist/index.d.ts +28 -13
  12. package/dist/index.js +2 -11
  13. package/dist/input.d.ts +306 -0
  14. package/dist/input.js +2 -0
  15. package/dist/media.d.ts +3 -6
  16. package/dist/media.js +2 -27
  17. package/dist/messages.d.ts +3 -2
  18. package/dist/messages.js +2 -2
  19. package/dist/module.d.ts +24 -0
  20. package/dist/module.js +2 -0
  21. package/dist/noise.js +2 -233
  22. package/dist/parts.d.ts +97 -21
  23. package/dist/parts.js +2 -414
  24. package/dist/paths.d.ts +1 -1
  25. package/dist/paths.js +2 -720
  26. package/dist/phone.d.ts +26 -0
  27. package/dist/phone.js +2 -0
  28. package/dist/piece.d.ts +106 -35
  29. package/dist/piece.js +2 -38
  30. package/dist/props.d.ts +1 -1
  31. package/dist/props.js +2 -35
  32. package/dist/scenery.d.ts +2 -0
  33. package/dist/scenery.js +2 -0
  34. package/dist/text.js +2 -38
  35. package/dist/written.d.ts +12 -0
  36. package/dist/written.js +2 -0
  37. package/docs/README.md +18 -0
  38. package/docs/batches.md +148 -0
  39. package/docs/contract.md +51 -0
  40. package/docs/defaults.md +703 -0
  41. package/docs/docs.md +148 -0
  42. package/docs/footage.md +249 -0
  43. package/docs/layers.md +317 -0
  44. package/docs/modeling.md +143 -0
  45. package/docs/project.md +265 -0
  46. package/docs/scenery.md +308 -0
  47. package/docs/sheets.md +119 -0
  48. package/docs/slides.md +111 -0
  49. package/docs/sound.md +170 -0
  50. package/docs/speech.md +289 -0
  51. package/docs/video.md +265 -0
  52. package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
  53. package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
  54. package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
  55. package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
  56. package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
  57. package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
  58. package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
  59. package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
  60. package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
  61. package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
  62. package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
  63. package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
  64. package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
  65. package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
  66. package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
  67. package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
  68. package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
  69. package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
  70. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
  71. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
  72. package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
  73. package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
  74. package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
  75. package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
  76. package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
  77. package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
  78. package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
  79. package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
  80. package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
  81. package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
  82. package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
  83. package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
  84. package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
  85. package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
  86. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
  87. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
  88. package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
  89. package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
  90. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
  91. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
  92. package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
  93. package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
  94. package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
  95. package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
  96. package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
  97. package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
  98. package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
  99. package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
  100. package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
  101. package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
  102. package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
  103. package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
  104. package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
  105. package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
  106. package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
  107. package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
  108. package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
  109. package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
  110. package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
  111. package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
  112. package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
  113. package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
  114. package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
  115. package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
  116. package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
  117. package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
  118. package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
  119. package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
  120. package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
  121. package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
  122. package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
  123. package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
  124. package/node_modules/@allyhub-next/audio/package.json +17 -0
  125. package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
  126. package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
  127. package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
  128. package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
  129. package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
  130. package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
  131. package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
  132. package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
  133. package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
  134. package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
  135. package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
  136. package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
  137. package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
  138. package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
  139. package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
  140. package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
  141. package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
  142. package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
  143. package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
  144. package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
  145. package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
  146. package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
  147. package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
  148. package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
  149. package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
  150. package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
  151. package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
  152. package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
  153. package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
  154. package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
  155. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
  156. package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
  157. package/node_modules/@allyhub-next/formats/package.json +14 -0
  158. package/node_modules/@allyhub-next/formats/schemas/comments.schema.json +152 -0
  159. package/node_modules/@allyhub-next/formats/schemas/config.schema.json +43 -0
  160. package/node_modules/@allyhub-next/formats/schemas/edits.schema.json +112 -0
  161. package/node_modules/@allyhub-next/formats/schemas/elements.schema.json +33 -0
  162. package/node_modules/@allyhub-next/formats/schemas/gen.schema.json +97 -0
  163. package/node_modules/@allyhub-next/formats/schemas/interpretation.schema.json +125 -0
  164. package/node_modules/@allyhub-next/formats/schemas/items.json +75 -0
  165. package/node_modules/@allyhub-next/formats/schemas/messages.schema.json +11 -0
  166. package/node_modules/@allyhub-next/formats/schemas/script.schema.json +162 -0
  167. package/node_modules/@allyhub-next/formats/schemas/sheet.schema.json +395 -0
  168. package/node_modules/@allyhub-next/formats/schemas/words.schema.json +63 -0
  169. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
  170. package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
  171. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
  172. package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
  173. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
  174. package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
  175. package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +272 -0
  176. package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
  177. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
  178. package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
  179. package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
  180. package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
  181. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
  182. package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
  183. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
  184. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
  185. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
  186. package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
  187. package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
  188. package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
  189. package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
  190. package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
  191. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
  192. package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
  193. package/node_modules/@allyhub-next/protocol/package.json +13 -0
  194. package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
  195. package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
  196. package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
  197. package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
  198. package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
  199. package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
  200. package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
  201. package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
  202. package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
  203. package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
  204. package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
  205. package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
  206. package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
  207. package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
  208. package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
  209. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
  210. package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
  211. package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
  212. package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
  213. package/node_modules/@allyhub-next/runtimes/package.json +14 -0
  214. package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
  215. package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
  216. package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
  217. package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
  218. package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
  219. package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
  220. package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
  221. package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
  222. package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
  223. package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
  224. package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
  225. package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
  226. package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
  227. package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
  228. package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
  229. package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
  230. package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
  231. package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
  232. package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
  233. package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
  234. package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
  235. package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
  236. package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
  237. package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
  238. package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
  239. package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
  240. package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
  241. package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
  242. package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
  243. package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
  244. package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
  245. package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
  246. package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
  247. package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
  248. package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
  249. package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
  250. package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
  251. package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
  252. package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
  253. package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
  254. package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
  255. package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
  256. package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
  257. package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
  258. package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
  259. package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
  260. package/node_modules/@allyhub-next/scenery/package.json +13 -0
  261. package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
  262. package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
  263. package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
  264. package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
  265. package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
  266. package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
  267. package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
  268. package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
  269. package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
  270. package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
  271. package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
  272. package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
  273. package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
  274. package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
  275. package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
  276. package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
  277. package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
  278. package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
  279. package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
  280. package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
  281. package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
  282. package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
  283. package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
  284. package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
  285. package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
  286. package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
  287. package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
  288. package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
  289. package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
  290. package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
  291. package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
  292. package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
  293. package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
  294. package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
  295. package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
  296. package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
  297. package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
  298. package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
  299. package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
  300. package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
  301. package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
  302. package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
  303. package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
  304. package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
  305. package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
  306. package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
  307. package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
  308. package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
  309. package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
  310. package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
  311. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
  312. package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
  313. package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
  314. package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
  315. package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
  316. package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
  317. package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
  318. package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
  319. package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
  320. package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
  321. package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
  322. package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
  323. package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
  324. package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
  325. package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
  326. package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
  327. package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
  328. package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
  329. package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
  330. package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
  331. package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
  332. package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
  333. package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
  334. package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
  335. package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
  336. package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
  337. package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
  338. package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
  339. package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
  340. package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
  341. package/node_modules/@allyhub-next/video-core/package.json +14 -0
  342. package/package.json +52 -41
  343. package/README.md +0 -17
  344. package/dist/anim.d.ts.map +0 -1
  345. package/dist/anim.js.map +0 -1
  346. package/dist/define.d.ts.map +0 -1
  347. package/dist/define.js.map +0 -1
  348. package/dist/dom.d.ts.map +0 -1
  349. package/dist/dom.js.map +0 -1
  350. package/dist/fit.d.ts.map +0 -1
  351. package/dist/fit.js.map +0 -1
  352. package/dist/index.d.ts.map +0 -1
  353. package/dist/index.js.map +0 -1
  354. package/dist/media.d.ts.map +0 -1
  355. package/dist/media.js.map +0 -1
  356. package/dist/messages.d.ts.map +0 -1
  357. package/dist/messages.js.map +0 -1
  358. package/dist/noise.d.ts.map +0 -1
  359. package/dist/noise.js.map +0 -1
  360. package/dist/parts.d.ts.map +0 -1
  361. package/dist/parts.js.map +0 -1
  362. package/dist/paths.d.ts.map +0 -1
  363. package/dist/paths.js.map +0 -1
  364. package/dist/piece.d.ts.map +0 -1
  365. package/dist/piece.js.map +0 -1
  366. package/dist/props.d.ts.map +0 -1
  367. package/dist/props.js.map +0 -1
  368. package/dist/text.d.ts.map +0 -1
  369. package/dist/text.js.map +0 -1
  370. /package/{LICENSE → LICENSE.md} +0 -0
@@ -0,0 +1,265 @@
1
+ # A project
2
+
3
+ An AllyHub project is a folder, laid out as its people like, and a TypeScript (Node) project. AllyHub finds what it holds by two things only: an item's entry file name, and imports. This file covers the folders, the items, how a piece imports the SDK and other files, the words it reads, `allyhub.config.ts` and fonts.
4
+
5
+ ```
6
+ package.json depends on allyhub and @allyhub/sdk
7
+ tsconfig.json the compiler's settings: the SDK's types
8
+ allyhub.config.ts the project's settings, the look, fonts (optional)
9
+ AGENTS.md, CLAUDE.md the project's standing instructions (CLAUDE.md is @AGENTS.md)
10
+ .gitignore node_modules/ and .allyhub/
11
+ assets/ files used as they are: media/, data/, text/, fonts/
12
+ components/ code several items share
13
+ .allyhub/ this computer's own, never shared
14
+ ```
15
+
16
+ Only the dot folders and Node's own files are fixed places. `assets/` and `components/` are where AllyHub's tools put what they fetch or add (`allyhub add`); the build follows imports, not folders.
17
+
18
+ ## `package.json`
19
+
20
+ - A folder is a project when its `package.json` depends on `allyhub` or `@allyhub/sdk`, or it has an `allyhub.config.*`. A command works on the nearest one at or above where it runs.
21
+ - The SDK and the CLI are one version. A project whose SDK is another version than the CLI that builds it is AK-B008; a `package.json` that declares AllyHub's packages before `npm install` has installed them is AK-B009, and nothing is built.
22
+ - A piece may import any package `package.json` declares and `npm install` installed. An import of an undeclared package, a file outside the project or a URL is AK-B005. `three` (with `three/addons/…`), `@allyhub-next/model` and `@allyhub-next/scenery-host/layer` are lent by the CLI unless the project declares its own.
23
+ - `npm create allyhub@latest <folder>` starts a project with these files.
24
+
25
+ ## `tsconfig.json`
26
+
27
+ ```json
28
+ {
29
+ "compilerOptions": {
30
+ "target": "ES2022",
31
+ "module": "ESNext",
32
+ "moduleResolution": "Bundler",
33
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
34
+ "types": ["@allyhub/sdk/client"],
35
+ "strict": true,
36
+ "noEmit": true,
37
+ "skipLibCheck": true,
38
+ "verbatimModuleSyntax": true,
39
+ "allowImportingTsExtensions": true
40
+ },
41
+ "include": ["**/*.ts", ".allyhub/cache/types"],
42
+ "exclude": ["node_modules"]
43
+ }
44
+ ```
45
+
46
+ - `@allyhub/sdk/client` types the imports the build understands ([Media and data](#media-and-data)).
47
+ - Every build (`allyhub check`, `render`, `dev`…) writes `.allyhub/cache/types/messages.d.ts`, the default language's message keys as types: `s()` then autocompletes keys and a wrong key fails `tsc`. `**/*.ts` does not enter folders that start with a dot, so the folder is listed in `include`. Without it, any string is a key.
48
+ - A `vite.config.ts` of the project's own is read: its `plugins`, `resolve`, `css`, `define`, `json`, `assetsInclude` and `oxc` apply after AllyHub's. Everything else is AllyHub's.
49
+
50
+ ## `.allyhub/`
51
+
52
+ This computer's own: never shared, rebuilt as needed. Nothing a piece imports may live there.
53
+
54
+ | Folder | What is in it |
55
+ | --- | --- |
56
+ | `.allyhub/work/` | The agent's working files, free to throw away: frame sheets, cut sheets, references (`reference/`) |
57
+ | `.allyhub/out/` | Renders and exports, by the item's place |
58
+ | `.allyhub/cache/` | What the tools rebuild: builds, the media index (face tracks, mattes, levels), the part cache, types |
59
+ | `.allyhub/trash/` | What a person deleted in an editor, kept until they empty it |
60
+
61
+ ## Items
62
+
63
+ An item is a folder with its entry file. The entry file's name says what the item is:
64
+
65
+ | Entry file | Item | Its entry file holds |
66
+ | --- | --- | --- |
67
+ | `video.ts` | A video | `export default video({ … })` ([video.md](video.md)) |
68
+ | `slides.ts` | A deck | `export default slides({ … })` ([slides.md](slides.md)) |
69
+ | `scenery.ts` | A 3D scenery | `export default defineScenery({ … })` ([scenery.md](scenery.md)) |
70
+ | `doc.mdx` | A doc | The doc itself, MDX |
71
+ | `sheet.csv` | A sheet | Its rows; `sheet.yaml` beside it says what its columns are |
72
+ | `astro.config.*` | A website | An Astro project |
73
+
74
+ `video`, `slides` and `scenery` may end in `.ts`, `.tsx`, `.mts`, `.js`, `.jsx` or `.mjs`.
75
+
76
+ - Everything in an item's folder is the item's own: its script, its media, its edits files. Folders above it only group items.
77
+ - An item may be anywhere but the project's root, a dot folder and `node_modules`. An item cannot hold another, and a folder cannot have two entry files (AK-M003). A `video(…)` exported from anything but an item's entry file is AK-M002.
78
+ - An item's **place** is its folder's path from the project's root (`launch/film`). A piece's `id` is its place unless it sets `id` (lowercase letters, digits, `.`, `_` and `-`, with `/` between levels). Two pieces with one id are AK-B001. The id names its message keys (`launch/film` reads keys under `launch.film.`) and seeds its randomness.
79
+
80
+ ### The entry file
81
+
82
+ - The default export is `video({ … })` or `slides({ … })` written in the file, or a constant holding one (`const film = video({ … }); export default film`). A re-export, a factory function or a conditional is not followed (AK-M001).
83
+ - The module's top level runs in Node when the build reads the piece: what needs `window` or `document` goes in `parts` (or `pages`) or in a layer's `mount` and `render`. The top level may not use the network (AK-B003) and must finish (AK-B004).
84
+ - Every field of the piece but its functions (`parts`, `pages`, `covers`) is plain data (AK-M001).
85
+
86
+ ## The SDK, bound to its module
87
+
88
+ A project file imports `@allyhub/sdk`; the build gives it the SDK with `video`, `slides`, `part`, `take` and `footage` made for that file (`sdkFor({ file })`). So a path a module writes as a string is relative to that module's own folder: `take("./vo/en.mp3")`, `footage("./broll.mp4")`, a part's `sounds`, `music`, `post.lut`, `.edits("./edits/host.json")`. A field keeps the folder it was written in when another piece spreads it. Nothing is a global.
89
+
90
+ An item uses another by an ordinary relative import. A piece in another format is an item of its own:
91
+
92
+ ```ts file=launch/film/video.ts
93
+ import { part, say, video } from "@allyhub/sdk";
94
+
95
+ export default video({
96
+ format: "16x9",
97
+ music: "./music/bed.mp3",
98
+ parts: ({ s }) => [
99
+ part({ key: "hook", speech: say(s("launch.film.hook.say")) }),
100
+ ],
101
+ });
102
+ ```
103
+
104
+ ```ts file=launch/film-vertical/video.ts
105
+ import { video } from "@allyhub/sdk";
106
+
107
+ import film from "../film/video.ts";
108
+
109
+ // Its music is still launch/film/music/bed.mp3.
110
+ export default video({ ...film, id: "launch/film-vertical", format: "9x16" });
111
+ ```
112
+
113
+ - `video()` and `slides()` return their fields as written, so a piece can spread another. A copy of a piece that sets `id` needs an `id` of its own.
114
+ - A video item can be shown inside another: `take(piece)`, `footage(piece)` and `ctx.video(piece, el)` ([footage.md](footage.md), [speech.md](speech.md)). A chain of videos that reaches itself is AK-M010.
115
+
116
+ ## Words: scripts and shared text
117
+
118
+ All the text people see or hear is read with `s(key)` (the parts function's `ctx.s`). An item's own words are its **script**; words several items share are in `assets/text/<lang>.json`.
119
+
120
+ ### `script.<lang>.yaml`
121
+
122
+ One file per language in the item's folder (`script.en.yaml`, `script.zh-cn.yaml`):
123
+
124
+ ```yaml
125
+ title: Tidyform launch
126
+ text:
127
+ url: tidyform.app
128
+ parts:
129
+ - id: hook
130
+ say: Tidyform makes forms that fill themselves in, so you @{rest}only ask what you don't know.
131
+ screen:
132
+ line: Forms that fill themselves in.
133
+ - id: how
134
+ screen:
135
+ steps:
136
+ - Paste your form link
137
+ - We match the answers you have
138
+ - id: quote
139
+ say: Northwind cut their form from <12|twelve> fields to <3|three>.
140
+ ```
141
+
142
+ The script becomes messages under the piece's prefix (its id with `/` as `.`):
143
+
144
+ | In the script | Its key |
145
+ | --- | --- |
146
+ | `title` | `<prefix>.title`, the piece's title |
147
+ | `text.<name>` | `<prefix>.<name>` |
148
+ | `parts[].say` | `<prefix>.<part>.say` |
149
+ | `parts[].screen.<name>` | `<prefix>.<part>.<name>`; names nest, a list is numbered (`<prefix>.how.steps.0`) |
150
+
151
+ - A row's `id` is a part's `key`; a row has `id`, `say` and `screen`, nothing else. A row for a part the video does not have yet is allowed.
152
+ - A `say` is one line, or a plural: it may hold anchors (`@{name}`) and text shown one way and said another (`<12|twelve>`) ([speech.md](speech.md)). A text on screen is a string, `{ display, speak }`, a plural, a list, or texts by name.
153
+ - A file that is not YAML or not a script, and a key made twice, are AK-M007. A script whose folder has no entry file yet is read and waits for its item.
154
+
155
+ ### `assets/text/<lang>.json`
156
+
157
+ Flat keys, in inlang's message format (`allyhub.config.ts`'s `text` names another folder):
158
+
159
+ ```json
160
+ {
161
+ "brand.tagline": "Forms that fill themselves in.",
162
+ "brand.legal": { "display": "© 2026 Tidyform", "speak": "Tidyform" },
163
+ "pricing.greeting": "Hello, {name}",
164
+ "pricing.count": [
165
+ {
166
+ "declarations": ["input count", "local n = count: plural"],
167
+ "selectors": ["n"],
168
+ "match": {
169
+ "n=0": "No plans yet",
170
+ "n=one": "{count} plan",
171
+ "n=other": "{count} plans"
172
+ }
173
+ }
174
+ ]
175
+ }
176
+ ```
177
+
178
+ A key is segments of letters, digits, `_` and `-` joined by dots. A value is a string, `{ display, speak }`, or a message with variants (one `{ declarations, selectors, match }` in a list); `{name}` is a variable. A file that does not match is AK-M006.
179
+
180
+ ### Reading text
181
+
182
+ | Call | Returns |
183
+ | --- | --- |
184
+ | `s(key, hint?)` | The text in the combo's language; `display` of a `{ display, speak }` pair |
185
+ | `s.list(prefix, hint?)` | `prefix.0`, `prefix.1`, … in order; deeper keys make objects (`plans.0.name`). `s.list<Plan>(prefix)` names the item type |
186
+ | `s.with(key, inputs, hint?)` | The text with its `{name}` variables filled, and a plural's or a selection's variant picked |
187
+
188
+ - `hint` is `{ max?, note? }`: a length budget and a note for whoever writes the text. It changes nothing.
189
+ - A key missing in the combo's language falls back to the default language (AK-S002, a warning); missing there too, it is `""` (AK-S001).
190
+ - The languages are the scripts' and `assets/text/`'s, ordered with `allyhub.config.ts`'s `locales` first, else `en`; a piece's `matrix.dims.lang` narrows them ([batches.md](batches.md)). Each language is a combo of the piece.
191
+ - A line may mark stretches: `**strong**`, `*em*`, `~~struck~~`, `` `code` ``. `s()` returns the line as written; `readMarks`, `markRuns` and `withoutMarks` read it, and `marked()` from `@allyhub/sdk/dom` draws it ([layers.md](layers.md)).
192
+ - Text written in code is drawn as written, in every language.
193
+
194
+ ## Media and data
195
+
196
+ A file is used by importing it, by a string path relative to the module that names it, or by `ctx.asset(path)` and `ctx.data(path)` for a path made at run time (relative to the piece's file).
197
+
198
+ ```ts file=launch/plans/video.ts
199
+ import { custom, part, video } from "@allyhub/sdk";
200
+
201
+ import logo from "../../assets/media/logo.svg";
202
+ import plans from "../../assets/data/plans.csv";
203
+
204
+ export default video({
205
+ parts: () =>
206
+ plans.map((plan, i) =>
207
+ part({
208
+ key: `plan-${String(i)}`,
209
+ layers: [
210
+ custom({
211
+ mount(el) {
212
+ const img = document.createElement("img");
213
+ img.src = String(logo); // a media value as a string is its url
214
+ el.append(img, String(plan.name));
215
+ },
216
+ render() {},
217
+ }),
218
+ ],
219
+ }),
220
+ ),
221
+ });
222
+ ```
223
+
224
+ - **Media** (pictures `png jpg jpeg webp gif svg avif`; sound `mp3 wav m4a ogg aac flac`; video `mp4 webm mov m4v qt`; fonts `woff2 woff ttf otf`; 3D `glb gltf bin ktx2`, environments `hdr exr`) imports as a `MediaInfo`: `path` from the project's root, `sha256`, `kind`, `width` and `height`, `duration`, `audio`, and what the build measured (`words`, `loudness`, `tempo`, `faces`, `matte`…). `url` is where the stage loads it, valid only at run time; a media value turned into a string is its `url` (`img.src = logo`).
225
+ - **Beside a media file**, files of the same name add to it: `<name>.words.json` (its word times: the file is a take, [speech.md](speech.md)), `<name>.elements.json` (a screenshot's named element boxes, `elements`), `<file>.gen.json` (how the file was made: `gen`; move it with its file).
226
+ - **Data**: CSV imports as an array of objects keyed by the header row, a column whose every value is a number as numbers; YAML as its value; JSON as usual.
227
+ - A file that is not there is AK-A001; one of the wrong kind AK-A003; a picture on the stage that does not load AK-A005.
228
+
229
+ ## `allyhub.config.ts`
230
+
231
+ Optional. Its default export is `defineConfig(…)`:
232
+
233
+ ```ts file=allyhub.config.ts
234
+ import { defineConfig } from "@allyhub/sdk";
235
+
236
+ export default defineConfig({
237
+ locales: ["en", "zh-cn"],
238
+ fonts: ["@fontsource/space-grotesk/400.css", "./assets/fonts/brand.css"],
239
+ look: {
240
+ color: { accent: "#0f766e", bg: "#fbf8f3" },
241
+ font: {
242
+ display: '"Space Grotesk", "Inter Variable", "Noto Sans SC", sans-serif',
243
+ },
244
+ sfx: { ding: "assets/media/sfx/ding.wav" },
245
+ },
246
+ defaults: { format: "16x9", part: { lead: 0.15, tail: 0.4 } },
247
+ });
248
+ ```
249
+
250
+ | Field | What it is |
251
+ | --- | --- |
252
+ | `locales` | The project's languages (BCP 47), the first its base; default the languages its words are in, `en` first |
253
+ | `fonts` | Font stylesheets every stage loads, each named as an import from the project's root ([Fonts](#fonts)) |
254
+ | `text` | The folder of the shared words; default `assets/text` |
255
+ | `look` | `{ color?, font?, motion?, sfx? }`, laid over the built-in `clean` look ([video.md](video.md#the-look)) |
256
+ | `defaults` | `{ format?, part?: { dur?, lead?, tail? } }`: what every video starts from; a video's own `defaults.part` is over it |
257
+
258
+ ## Fonts
259
+
260
+ The stage draws offline, so it draws only fonts that are files: its own, and the stylesheets a project brings.
261
+
262
+ - **Built in**: `"Inter Variable"` (Latin, Greek, Cyrillic, Vietnamese), `"Noto Sans SC"` (Chinese, 400 and 700) and `"Noto Color Emoji"` (the look's `font.emoji`). The `clean` look's `mono` is the computer's own monospace font, which differs between computers: bring one for code.
263
+ - **Imported by code**: install a font package and import its stylesheet in a piece or a module its pieces share (`import "@fontsource/space-grotesk/400.css"`), or import a stylesheet of `@font-face` rules beside the font files by a relative path. The package must be declared (AK-B005).
264
+ - **Listed in `allyhub.config.ts`**: `fonts` loads stylesheets on every stage, so the look can name a family no piece imports. An entry that names no file is AK-A001.
265
+ - A declared face costs nothing until text needs it: before the layers mount, the stage loads the faces of the families the look, the stylesheets and the layers' props name that cover a character of the piece's text; after mount, what the text on the stage asks for. A family that is not loaded falls to the next one, and a weight or style its faces lack is faked by the browser: both are AK-L006. A character no loaded font has is AK-L003.
@@ -0,0 +1,308 @@
1
+ # 3D sceneries
2
+
3
+ A scenery is three.js the agent writes, in a module whose default export is `defineScenery(…)`: AllyHub builds it once, poses it from time alone, draws it from cameras and measures it. This file covers that contract, cameras and their moves, and the `scenery()` layer with its screens. The commands are in `allyhub help 3d`.
4
+
5
+ ## A scenery is an item
6
+
7
+ An item is a folder with a `scenery.ts` (or tsx, mts, js, jsx, mjs). A person looks round it in Studio and `allyhub dev`'s page at scenery time 0, selecting a placed object (the outermost named one) and its named `cameras`, never editing it; a note on it names the object, its size, the point clicked and the view as an `allyhub scenery view` command. A scenery module by another name is code, not an item.
8
+
9
+ - A video imports a scenery item by its path, as any module: `import room from "../room/scenery.ts"`.
10
+ - A path a scenery reads that starts with `./` or `../` (`w.texture("./wood.jpg")`, `w.load("./desk.glb")`, a model's image) is from the scenery's own module; any other is from the project's root. An import (`import desk from "./desk.glb"`) is the same. Kept in its folder and named from there, a scenery works wherever the folder goes.
11
+ - `three` (r186, 0.186.1), `three/addons/…`, `three/webgpu` and `three/tsl` are imported by name with no `package.json`: the CLI lends them, unless the project declares its own `three`. So are `@allyhub-next/scenery-host/layer` (everything in this file) and `@allyhub-next/model` ([modeling.md](modeling.md)).
12
+ - glTF and GLB load (`.glb`, `.gltf`, `.bin`, `.ktx2`), environments are `.hdr` or `.exr`; all are media imports. CC0 models, HDRIs and textures: `allyhub add search`, `allyhub add`.
13
+
14
+ **Units and axes.** Right-handed, **Y up**, **metres**, angles in **degrees** everywhere in AllyHub's API (three.js itself takes radians). A camera looks down its own −Z. A glTF model's front is its +Z. Positions and sizes AllyHub prints are world space. three.js's lights are physical: point and spot lights in candela, directional lights in lux, an emissive surface in nits.
15
+
16
+ ## `defineScenery`
17
+
18
+ ```ts file=room/scenery.ts
19
+ import * as THREE from "three";
20
+ import { defineScenery, path } from "@allyhub-next/scenery-host/layer";
21
+ import sofaModel from "./sofa.glb";
22
+
23
+ export default defineScenery({
24
+ async build(w) {
25
+ w.renderer.toneMapping = THREE.ACESFilmicToneMapping;
26
+ const sofa = await w.load(sofaModel);
27
+ sofa.name = "sofa";
28
+ w.scene.add(sofa);
29
+ const mixer = new THREE.AnimationMixer(sofa);
30
+ const clips = sofa.userData["animations"] as THREE.AnimationClip[];
31
+ for (const clip of clips) mixer.clipAction(clip).play();
32
+ return { mixer };
33
+ },
34
+ update(made, t, w) {
35
+ w.seek(made.mixer, t);
36
+ },
37
+ cameras: { door: { position: [0, 1.5, 2.8], target: "sofa", lens: 26 } },
38
+ moves: {
39
+ walk: path(
40
+ [
41
+ [0, 1.5, 3],
42
+ [0.4, 1.2, -0.2],
43
+ ],
44
+ { dur: 6, target: "sofa" },
45
+ ),
46
+ },
47
+ });
48
+ ```
49
+
50
+ `build(w)` runs once, awaited with every load it starts (60 s at most; in a video it counts in the piece's `loadLimit`, AK-P002); what it returns is `made`. `update(made, t, w)` poses it at `t`, seconds of scenery time. `cameras` (checked when defined, AK-W004) and `moves` are by name, for the commands and for layers. `bake` is in [Baked light](#baked-light).
51
+
52
+ **From `t` alone.** The same moment must draw the same pixels in any order (AK-D002). `Date`, `performance.now`, `Math.random`, `crypto.getRandomValues` and `requestAnimationFrame` follow the moment drawn; timers run only while it builds. Pose an `AnimationMixer` with `w.seek(mixer, t)` (every action reset, then `setTime(t)`), not a bare `setTime`. Name what is referred to (`Object3D.name`): cameras, moves, measurements and `projectScenery` take names, and a name no object has, or two have, is AK-W005.
53
+
54
+ `renderer` (all optional; `SCENERY_RENDERER_DEFAULTS`, the fastest drawing):
55
+
56
+ | Option | Default | What it does |
57
+ | --- | --- | --- |
58
+ | `kind` | `"webgl"` | `"webgpu"`: `WebGPURenderer` (node materials, TSL) through its WebGL 2 back end; not baked yet |
59
+ | `antialias` | `false` | Multisampled edges |
60
+ | `transmissionScale` | 0.25 | The extra pass transmissive materials (glass) need, a share of the frame's size, (0, 2] |
61
+ | `outputBufferType` | three's | The buffer effects draw into (`HalfFloatType` for HDR effects) |
62
+ | `logarithmicDepthBuffer`, `reversedDepthBuffer` | `false` | |
63
+ | `focus` | `{ samples: 64, maxRadius: 64 }` | A camera's depth of field: samples per pixel, the widest blur's radius in px as drawn, and `supersample` (1–4; default 2 with `antialias`, else 1) |
64
+
65
+ Alpha, size and pixel ratio are AllyHub's; set the rest on `w.renderer` in `build` (tone mapping, shadows, `setEffects`). A material whose shader does not compile, or needs more texture units than the renderer has (maps, environment, shadow-casting lights, screens lighting it), draws nothing: AK-W006, a warning over 16 units where the renderer has more.
66
+
67
+ `w`, the scenery's host (`SceneryHost`):
68
+
69
+ | Field | What it is |
70
+ | --- | --- |
71
+ | `scene`, `renderer` | The `THREE.Scene`, and the renderer AllyHub made |
72
+ | `load(asset)` | A glTF or GLB as a `Group`, with the lent decoders (Draco, meshopt, KTX2); its animations on `userData.animations`. One that does not load is AK-W003 |
73
+ | `texture(asset, { colorSpace? })` | A picture as a texture: sRGB, or `"linear"` for a data map (normal, roughness, AO, displacement) |
74
+ | `environment(asset, { background? })` | An `.hdr` or `.exr` as the scene's environment, and its background when asked |
75
+ | `seek(mixer, t)` | Poses an animation mixer at `t` |
76
+ | `object(name)` | The object of that name, undefined for none |
77
+ | `positionOf(name)`, `boundsOf(name)` | Its box's centre now; its box, from its vertices |
78
+ | `asset(path)` | A project file's URL |
79
+ | `time(ref)` | In `update`: the scenery time of a word or anchor reference (`"@tap"`, `"@tap+0.2"`) of the part that draws it. Throws in `build` |
80
+ | `screen(name)` | A screen's face now (its first mesh's +Z side): `point(x, y)` from shares of its content, `center`, `normal`, `up`, `width`, `height` |
81
+ | `screenPicture(name)` | In `update`: a screen's picture as a mipmapped texture, for a material of the scenery's own; undefined for a screen drawn over the scenery |
82
+
83
+ An asset is an import or a path. Where there is no part to time a reference by (the `allyhub scenery` commands), its moments come from the video that draws the scenery (the one video of the project that does, or `--piece`'s), its scenery layers finding them as they do when drawing; `--times @tap=2.4` gives them by hand, over the video's.
84
+
85
+ ## Cameras
86
+
87
+ A `CameraState` points one of three ways, or looks down −Z, level:
88
+
89
+ ```ts fragment
90
+ { position: [0, 1.5, 2.8], target: "sofa", lens: 26 } // at an object's box centre, followed as it moves
91
+ { position: [0, 1.5, 2.8], target: [0, 0.6, -1.4], fov: 40 } // at a point; a vertical fov in degrees
92
+ { position: [0, 1.5, 2.8], yaw: 30, pitch: -10 } // 30° left of −Z, 10° down
93
+ { position: [0, 1.5, 2.8], direction: [0, -0.2, -1], roll: 5 }
94
+ ```
95
+
96
+ | Field | Default | What it is |
97
+ | --- | --- | --- |
98
+ | `position` | required | Metres |
99
+ | `target`, `direction`, or `yaw`/`pitch` | down −Z | `yaw` about +Y (90 looks down −X); `pitch` above the horizon |
100
+ | `up` | `[0, 1, 0]` | A view straight along `up` cannot be drawn (AK-W004) |
101
+ | `roll` | 0 | Degrees about the view, counterclockwise |
102
+ | `lens` | 26 | 35 mm-equivalent focal length, mm |
103
+ | `lensFrame` | `"diagonal"` | What the lens is measured on: the frame's diagonal (CIPA), `"long"`, `"short"`, `"phone"` (`{ aspect: 4/3, keep: "long" }`, a phone's "26 mm"), or `{ aspect, keep }` |
104
+ | `fov` | | Vertical degrees, instead of a lens |
105
+ | `near`, `far` | 0.05, 500 | Metres |
106
+ | `aperture` | none (a pinhole) | An f-number in the same 35 mm-equivalent terms as `lens` (a phone's f/1.8 is about f/8). Needs `focus` |
107
+ | `focus` | | A distance along the view (m), a point, or an object's name |
108
+ | `ev` | none | Exposure, EV at ISO 100: the light is scaled by `exposureOf(ev)`, 1 / (1.2 · 2^ev), before the tone curve, in place of `toneMappingExposure` |
109
+
110
+ `CAMERA_DEFAULTS` holds them. The aspect is always the frame's. `fieldOfView`, `diagonalLens` and `lensForVertical` convert (three.js's `setFocalLength` measures on another frame). `allyhub scenery solve` finds the camera that put points of the scenery at pixels of a picture.
111
+
112
+ ## Moves
113
+
114
+ A move (`Move`) is `(t, view?) => CameraState`, a function of scenery time alone; `view` (`SceneryView`) gives `pointOf(name)`, `time(ref)`, the frame's `aspect` and `screen(name)`. Every moment a move takes (`MoveTime`) is seconds or a word or anchor reference of the part that draws the scenery.
115
+
116
+ | Function | What it makes |
117
+ | --- | --- |
118
+ | `keys([{ t, position?, target?, yaw?, pitch?, lens?, fov?, roll?, aperture?, focus?, ev?, ease? }], { lensSpace? })` | Each key at its time: position along a curve, speed continuous, a repeated position holds; `ease` runs the stretch into its key; lens in log focal length (or `lensSpace: "fov"`); `aperture` and `ev` in every key or none |
119
+ | `path(points, { dur \| speed, start?, ease?, target?, ahead?, frame?, alpha? })` | Through the points at constant speed; `target` a point, a name or `"ahead"` (default); `frame: "rmf"` carries `up` untwisted (`PATH_DEFAULTS`) |
120
+ | `orbit({ around, radius, height?, from, to, dur, start?, ease?, target? })` | Round a point or a name; 0° on its +Z side, 90° on +X, not wrapped |
121
+ | `shots([{ from, camera }, …])` | Shots joined by cuts, each a camera or a move; measurements of motion stop at its cuts (`cutsOf`) |
122
+ | `blend(a, b, { from, to, ease? })` | `a` before `from`, `b` after `to`, mixed between (lens at a steady zoom ratio, `ev` in stops); `ease` default `"smooth"` |
123
+ | `focusScreen(name, [x, y, w, h], { fill?, lens?, fov?, yaw?, pitch?, ev?, lensFrame? })` | A move framing a rectangle of a screen's content (shares from its top left), square on or `yaw`/`pitch` off it |
124
+ | `fitCamera({ points \| boxes \| sphere, aspect, direction \| yaw/pitch, lens \| fov, fill?, margins?, adjust?, … })` | A `CameraState` framing them exactly; `adjust: "lens"` keeps `position` and solves the lens (`FIT_DEFAULTS`) |
125
+ | `mixCameras(a, b, x, view, what)` | The camera `x` of the way from `a` to `b`, as `blend` mixes them |
126
+ | `withCuts(camera, move)` | `move` with `camera`'s cuts, so a move of the agent's own wrapped round `shots()` keeps them |
127
+
128
+ `Ease` is `"linear"`, `"in"`, `"out"`, `"in-out"`, `"smooth"` or a function on 0–1 (`easeValue`). `aimed({ overshoot?, peak?, primary?, vary?, seed?, index? })`, an aimed movement's progress (past 1 and back), is an `ease` too; `aimAt(shape, x)` and `rise(s, peak)` are its parts (`AIM_DEFAULTS`).
129
+
130
+ ```ts fragment
131
+ camera: shots([
132
+ { from: 0, camera: "door" },
133
+ { from: "@demo", camera: blend(wide, focusScreen("monitor-screen", [0.62, 0.05, 0.1, 0.06]), { from: "@demo", to: "@click" }) },
134
+ ]),
135
+ ```
136
+
137
+ ### `handheld`
138
+
139
+ `handheld(camera, opts)` is a camera or a move held in a hand: a `Move` of t alone, the same for a `seed`, another hand in each shot of `shots()` (whose cuts it keeps), its lens and focus kept. Amounts are standard deviations. Defaults: `HANDHELD_DEFAULTS`, `STABILIZER_DEFAULTS`, `AUTOFOCUS_DEFAULTS`, `AUTO_EXPOSURE_DEFAULTS` ([defaults.md](defaults.md)).
140
+
141
+ | Option | What it is |
142
+ | --- | --- |
143
+ | `angle`, `roll`, `shift`, `sway` | The sway: yaw and pitch degrees, roll as a share of them, metres on each axis; its spectrum round `sway` Hz, falling as 1/f² |
144
+ | `tremor` | `{ angle, frequency, spread, vary, swell, period }`: a band round `frequency` Hz that swells |
145
+ | `drift` | `{ angle, shift, period }`: the framing's slow drift |
146
+ | `stabilizer` | `{ strength, cutoff }`: takes `strength` of the turning out above `cutoff` Hz. Absent: none |
147
+ | `reframes` | `[{ at, to?, turn?, shift?, duration?, overshoot? }]`: an aimed move to a camera, or by a `Turn` `[yaw, pitch, roll?]` and `Shift` `[right, up, forward?]`; `reframe` sets defaults |
148
+ | `jolts` | `[{ at, turn? }]`: the hand knocked, ringing out; `jolt` sets their defaults |
149
+ | `autofocus` | With an `aperture` and `focus`: rests `miss` off and hunts after cuts, reframes and jolts. Absent: none; `{}` the defaults |
150
+ | `exposure` | With an `ev`: follows a reframe's `ev` late, is off at a cut and settles, breathes. Absent: none |
151
+ | `seed` | Another seed is another hand |
152
+
153
+ ### A phone
154
+
155
+ `PHONE_CAMERA` (`@allyhub/sdk/scenery`) names a phone's main camera as the options of each mechanism; `phoneCamera(over)` changes any value and keeps the rest. `lens` goes into a camera state, `sensor` into `scenery({ sensor })`, `hand` into `handheld()`, and the marks it leaves on its picture (grain, softness, sharpening, motion blur) into `video()`'s `capture` and `motionBlur` ([video.md](video.md)). Each is a starting point, not a look.
156
+
157
+ ```ts file=phone/video.ts
158
+ import { part, video } from "@allyhub/sdk";
159
+ import { phoneCamera } from "@allyhub/sdk/scenery";
160
+ import { handheld, scenery, shots } from "@allyhub-next/scenery-host/layer";
161
+ import room from "../room/scenery.ts";
162
+
163
+ const phone = phoneCamera({ hand: { tremor: { angle: 0.15 } } });
164
+ const camera = handheld(
165
+ shots([
166
+ {
167
+ from: 0,
168
+ camera: {
169
+ ...phone.lens,
170
+ position: [0, 1.4, 1.2],
171
+ target: "sofa",
172
+ focus: "sofa",
173
+ ev: 7.4,
174
+ },
175
+ },
176
+ ]),
177
+ { ...phone.hand, reframes: [{ at: 2, turn: [-2.5, 1] }] },
178
+ );
179
+
180
+ export default video({
181
+ format: "9x16",
182
+ capture: phone.capture,
183
+ motionBlur: phone.motionBlur,
184
+ parts: () => [
185
+ part({
186
+ key: "look",
187
+ dur: 5,
188
+ layers: [scenery(room, { camera, sensor: phone.sensor })],
189
+ }),
190
+ ],
191
+ });
192
+ ```
193
+
194
+ ## The `scenery()` layer
195
+
196
+ `scenery(scenery, opts)` is a graphic layer. The scenery is built once when the output loads and posed at each frame's scenery time.
197
+
198
+ ```ts file=tour/video.ts
199
+ import { custom, part, video } from "@allyhub/sdk";
200
+ import {
201
+ projectScenery,
202
+ scenery,
203
+ screen,
204
+ } from "@allyhub-next/scenery-host/layer";
205
+ import room from "../room/scenery.ts";
206
+ import demo from "../demo/video.ts";
207
+
208
+ export default video({
209
+ format: "16x9",
210
+ parts: () => [
211
+ part({
212
+ key: "walk",
213
+ dur: 6,
214
+ layers: [
215
+ scenery(room, {
216
+ camera: "walk",
217
+ name: "room",
218
+ screens: { "tv-screen": screen(demo, { start: 1 }) },
219
+ }),
220
+ custom({
221
+ render(el, t) {
222
+ const sofa = projectScenery("room", "sofa", t, el);
223
+ if (sofa)
224
+ el.style.transform = `translate(${String(sofa.x)}px, ${String(sofa.y)}px)`;
225
+ },
226
+ }),
227
+ ],
228
+ }),
229
+ ],
230
+ });
231
+ ```
232
+
233
+ | Option | Default | What it does |
234
+ | --- | --- | --- |
235
+ | `camera` | required | A `CameraState`, the name of one of the scenery's cameras or moves, or a move |
236
+ | `box` | the frame | `[x, y, w, h]` as fractions of the frame; the camera's aspect is the box's |
237
+ | `background` | the scenery's own | A colour, or `"transparent"`; without it what `build` set as the scene's background, else transparent |
238
+ | `time` | `{ from: 0 }` | The scenery's time from the film's: `{ from }` at the film's start, or `(filmT) => number`. It runs on across parts and cuts |
239
+ | `quality` | `{ scale: 0.5, focusLevels: 8 }` | `scale`: the share of the layer's size each way it is drawn at (above 1 supersamples). `focusLevels`: Gaussian levels a screen's depth of field is mixed from. `SCENERY_LAYER_DEFAULTS` |
240
+ | `sensor` | none | A phone's sensor filming it: the moiré its Bayer grid makes of the screens' pixels. `{ photosites, lens, moire, chroma, distortion }`, `SENSOR_DEFAULTS` |
241
+ | `screens` | none | `{ <object name>: screen(…) }` (below) |
242
+ | `props` | none | `SceneryProp`s this layer brings in (below) |
243
+ | `name` | `"scenery"` | What `projectScenery` and the facts call it |
244
+ | `at`, `until`, `dur`, `z` | | As every layer ([video.md](video.md)) |
245
+
246
+ `projectScenery(layer, target, t, el)`, called in a layer's `render` with its own element, gives where a point or a named object of the scenery layer called `layer` in the same part is at part time `t`: `{ x, y }` in frame px, `inView`, `depth` (m); undefined when no such layer shows then.
247
+
248
+ **Props** (`SceneryProp`: `{ name, build(w), update?(object, t, w) }`) are things a layer brings in (a stand-in, a pointer): built after the scenery and its bake (never in it), posed from t after the scenery's update, shown only in the layers that add them.
249
+
250
+ **A scenery inside another video.** A video item whose picture is a scenery can be shown in a film: `take(scene).range(from, to)` plays a stretch of it and `footage({ camera })` draws its scenery layers from a camera of the film's (`cameras` by layer name for several, `quality: { scale }` for this film only), on the item's clock. See [footage.md](footage.md) and [speech.md](speech.md).
251
+
252
+ ## Screens
253
+
254
+ `screen(content, opts)` puts content on a named object of the scenery (its first mesh's +Z face, the content's top left at the geometry's −x, +y). The content is a video item of the project (its piece, imported: its parts, timing, anchors and components its own; pictures only, not its sound, and not footage yet) or graphic layers drawn on `size` px, whose windows and time props are seconds of the screen's time or references of the part.
255
+
256
+ | Option | Default | What it does |
257
+ | --- | --- | --- |
258
+ | `start` | 0 | When the screen's time is 0: scenery seconds, or a reference of the part (`"@demo"`) |
259
+ | `cue` | 0 | The screen's own moment that plays at `start`: seconds, or (a video) its own reference (`"@click"`, a part's key) |
260
+ | `cues` | | Instead: `{ <its moment>: <film reference or scenery seconds> }`; between two cues it plays at the speed that joins them |
261
+ | `time` | the scenery's | Instead: `{ from }` or `(t) => number` from scenery time |
262
+ | `size` | `[1920, 1080]` | Layers only: the content's pixels (a video uses its format's) |
263
+ | `dur` | to the layer's end | Layers only |
264
+ | `background` | `"#000000"` | Behind the content, or `"transparent"` |
265
+ | `pixels` | `{ density: 2, rows: 0.15 }` | Its physical pixels, for a sensor's moiré (`PANEL_DEFAULTS`) |
266
+ | `glass` | none | `{ reflectance?, roughness?, scale? }`: what its glass reflects of the scenery over its picture, by Fresnel; `{}` the defaults (`GLASS_DEFAULTS`) |
267
+ | `inScenery` | `true` | Drawn in the scenery: `{ brightness?, light? }` (below); `false`: laid over the scenery |
268
+
269
+ ```ts file=demo/video.ts
270
+ import { custom, part, video } from "@allyhub/sdk";
271
+
272
+ // Made only to be shown on a screen.
273
+ export default video({
274
+ format: "16x9",
275
+ deliverable: false,
276
+ parts: () => [
277
+ part({
278
+ key: "open",
279
+ dur: 4,
280
+ layers: [
281
+ custom({
282
+ render: (el, t) => (el.textContent = `${String(Math.round(t))} new`),
283
+ }),
284
+ ],
285
+ }),
286
+ ],
287
+ });
288
+ ```
289
+
290
+ Before `start` a video holds its first frame, after its end its last. A video that shows itself through any chain is AK-M010; one made only for a screen is `video({ deliverable: false })`.
291
+
292
+ **In the scenery** (where the browser has Chrome's HTML-in-Canvas, as AllyHub's has) the content is the mesh's texture, drawn with the exposure, depth of field, glass and moiré, and it lights the scenery's standard and physical materials (at most 2 screens). `brightness` (default 1) is its white, scene-linear: nits in a scenery lit in physical units with an `ev`. `light: false` lights nothing; `light: { cells, specular, base }` sets the cells of its diffuse light (`[8, 5]`), leaves out its reflection (`specular: false`), and with `base: { brightness?, color? }` adds only what differs from steady light the scenery already has from it (`SCREEN_LIGHT_DEFAULTS`). `material.userData.screenLight = false` (or `{ specular: false }`) keeps a material out. Without HTML-in-Canvas (or with `ALLYHUB_HTML_IN_CANVAS=0`) the mesh is a hole with the content laid over it at its own colours: AK-W007, unless asked with `inScenery: false`. An element it cannot show (in the browser's top layer, `preserve-3d` planes it cannot order, over the largest texture) is AK-W008.
293
+
294
+ Text on a screen is left out of the frame's text facts; `scenery-screen` reports its smallest text instead.
295
+
296
+ ## Baked light
297
+
298
+ `allyhub scenery bake <item>` bakes the scenery's light (direct, shadows, bounces, emissive surfaces, the environment) into a lightmap once, kept in `.allyhub/cache/bake/` by the scene's digest and the renderer that made it, and laid on the scenery each time it is built. A bake made on a GPU is laid only by that GPU; one made on the CPU by every renderer. A scene that changed is drawn unbaked until baked again. How it bakes is `defineScenery({ bake })` (`BakeOptions`: `density`, `samples`, `bounces`, `weight`, `skip`, `ignore`, `posedAt`, `probe`, …; `BAKE_DEFAULTS`).
299
+
300
+ ## Measuring
301
+
302
+ `allyhub scenery <item>` (objects, sizes, costs, lights, cameras, moves, bake), `scenery view`, `map`, `see`, `measure`, `motion`, `solve` and `bake` draw or measure the scenery module alone, without its screens (`allyhub frames` on a video shows them); `inspect fidelity` compares each screen drawn in the scenery with its own element.
303
+
304
+ The check reports each scenery layer's facts, printed by `allyhub inspect`: `scenery-contact`, `scenery-support`, `mesh-health`, `camera-clearance`, `camera-motion`, `scenery-screen` (each screen's share, scale, angle, hidden share, smallest text, moiré, cue speeds), `scenery-screen-fidelity` and `scenery-bake`. `frames cuts` sheets a scenery camera's cuts.
305
+
306
+ Rules a problem is reported under: AK-W001 (it does not build, or `update` throws), AK-W002 (WebGL cannot be made, or is not SwiftShader where the CPU was asked for), AK-W003 (a file does not load), AK-W004 (a camera cannot be drawn), AK-W005 (a name names no object, or two), AK-W006 (a shader does not compile, or needs too many texture units), AK-W007 (a screen drawn over the scenery, a warning), AK-W008 (a screen in the scenery cannot show its element).
307
+
308
+ Frames are drawn on the GPU on a Mac and on the CPU (SwiftShader, the same pixels on every computer) elsewhere; `ALLYHUB_GPU=0` or `1` chooses.