@codexo/exojs 0.7.11 → 0.7.13

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 (492) hide show
  1. package/CHANGELOG.md +442 -0
  2. package/dist/esm/animation/Tween.d.ts +60 -1
  3. package/dist/esm/animation/Tween.js +60 -1
  4. package/dist/esm/animation/Tween.js.map +1 -1
  5. package/dist/esm/animation/TweenManager.d.ts +10 -0
  6. package/dist/esm/animation/TweenManager.js +10 -0
  7. package/dist/esm/animation/TweenManager.js.map +1 -1
  8. package/dist/esm/animation/types.d.ts +15 -0
  9. package/dist/esm/animation/types.js +6 -0
  10. package/dist/esm/animation/types.js.map +1 -1
  11. package/dist/esm/audio/AbstractMedia.d.ts +11 -0
  12. package/dist/esm/audio/AbstractMedia.js +10 -0
  13. package/dist/esm/audio/AbstractMedia.js.map +1 -1
  14. package/dist/esm/audio/AudioAnalyser.d.ts +21 -0
  15. package/dist/esm/audio/AudioAnalyser.js +16 -0
  16. package/dist/esm/audio/AudioAnalyser.js.map +1 -1
  17. package/dist/esm/audio/AudioBus.d.ts +37 -0
  18. package/dist/esm/audio/AudioBus.js +36 -0
  19. package/dist/esm/audio/AudioBus.js.map +1 -1
  20. package/dist/esm/audio/AudioFilter.d.ts +7 -0
  21. package/dist/esm/audio/AudioFilter.js +6 -0
  22. package/dist/esm/audio/AudioFilter.js.map +1 -1
  23. package/dist/esm/audio/AudioListener.d.ts +19 -0
  24. package/dist/esm/audio/AudioListener.js +11 -0
  25. package/dist/esm/audio/AudioListener.js.map +1 -1
  26. package/dist/esm/audio/AudioManager.d.ts +37 -0
  27. package/dist/esm/audio/AudioManager.js +37 -0
  28. package/dist/esm/audio/AudioManager.js.map +1 -1
  29. package/dist/esm/audio/BeatDetector.d.ts +21 -0
  30. package/dist/esm/audio/BeatDetector.js +21 -0
  31. package/dist/esm/audio/BeatDetector.js.map +1 -1
  32. package/dist/esm/audio/Media.d.ts +11 -0
  33. package/dist/esm/audio/Music.d.ts +12 -0
  34. package/dist/esm/audio/Music.js +12 -0
  35. package/dist/esm/audio/Music.js.map +1 -1
  36. package/dist/esm/audio/Sound.d.ts +25 -0
  37. package/dist/esm/audio/Sound.js +18 -0
  38. package/dist/esm/audio/Sound.js.map +1 -1
  39. package/dist/esm/audio/audio-context.d.ts +48 -0
  40. package/dist/esm/audio/audio-context.js +48 -5
  41. package/dist/esm/audio/audio-context.js.map +1 -1
  42. package/dist/esm/audio/filters/ChorusFilter.d.ts +5 -0
  43. package/dist/esm/audio/filters/ChorusFilter.js +4 -0
  44. package/dist/esm/audio/filters/ChorusFilter.js.map +1 -1
  45. package/dist/esm/audio/filters/CompressorFilter.d.ts +12 -0
  46. package/dist/esm/audio/filters/CompressorFilter.js +11 -0
  47. package/dist/esm/audio/filters/CompressorFilter.js.map +1 -1
  48. package/dist/esm/audio/filters/DelayFilter.d.ts +11 -0
  49. package/dist/esm/audio/filters/DelayFilter.js +10 -0
  50. package/dist/esm/audio/filters/DelayFilter.js.map +1 -1
  51. package/dist/esm/audio/filters/DuckingFilter.d.ts +13 -0
  52. package/dist/esm/audio/filters/DuckingFilter.js +12 -0
  53. package/dist/esm/audio/filters/DuckingFilter.js.map +1 -1
  54. package/dist/esm/audio/filters/EqualizerFilter.d.ts +20 -0
  55. package/dist/esm/audio/filters/EqualizerFilter.js +40 -0
  56. package/dist/esm/audio/filters/EqualizerFilter.js.map +1 -1
  57. package/dist/esm/audio/filters/GranularFilter.d.ts +6 -0
  58. package/dist/esm/audio/filters/GranularFilter.js +6 -0
  59. package/dist/esm/audio/filters/GranularFilter.js.map +1 -1
  60. package/dist/esm/audio/filters/HighpassFilter.d.ts +10 -0
  61. package/dist/esm/audio/filters/HighpassFilter.js +9 -0
  62. package/dist/esm/audio/filters/HighpassFilter.js.map +1 -1
  63. package/dist/esm/audio/filters/LowpassFilter.d.ts +10 -0
  64. package/dist/esm/audio/filters/LowpassFilter.js +9 -0
  65. package/dist/esm/audio/filters/LowpassFilter.js.map +1 -1
  66. package/dist/esm/audio/filters/PitchShiftFilter.d.ts +2 -0
  67. package/dist/esm/audio/filters/PitchShiftFilter.js +2 -0
  68. package/dist/esm/audio/filters/PitchShiftFilter.js.map +1 -1
  69. package/dist/esm/audio/filters/ReverbFilter.d.ts +12 -0
  70. package/dist/esm/audio/filters/ReverbFilter.js +11 -0
  71. package/dist/esm/audio/filters/ReverbFilter.js.map +1 -1
  72. package/dist/esm/audio/filters/VocoderFilter.d.ts +11 -0
  73. package/dist/esm/audio/filters/VocoderFilter.js +11 -0
  74. package/dist/esm/audio/filters/VocoderFilter.js.map +1 -1
  75. package/dist/esm/audio/filters/WorkletFilter.d.ts +6 -1
  76. package/dist/esm/audio/filters/WorkletFilter.js +6 -1
  77. package/dist/esm/audio/filters/WorkletFilter.js.map +1 -1
  78. package/dist/esm/core/Application.d.ts +66 -1
  79. package/dist/esm/core/Application.js +68 -6
  80. package/dist/esm/core/Application.js.map +1 -1
  81. package/dist/esm/core/Bounds.d.ts +23 -0
  82. package/dist/esm/core/Bounds.js +23 -0
  83. package/dist/esm/core/Bounds.js.map +1 -1
  84. package/dist/esm/core/Clock.d.ts +21 -0
  85. package/dist/esm/core/Clock.js +21 -0
  86. package/dist/esm/core/Clock.js.map +1 -1
  87. package/dist/esm/core/Color.d.ts +35 -0
  88. package/dist/esm/core/Color.js +35 -0
  89. package/dist/esm/core/Color.js.map +1 -1
  90. package/dist/esm/core/Scene.d.ts +76 -0
  91. package/dist/esm/core/Scene.js +83 -0
  92. package/dist/esm/core/Scene.js.map +1 -1
  93. package/dist/esm/core/SceneManager.d.ts +62 -0
  94. package/dist/esm/core/SceneManager.js +51 -2
  95. package/dist/esm/core/SceneManager.js.map +1 -1
  96. package/dist/esm/core/SceneNode.d.ts +31 -0
  97. package/dist/esm/core/SceneNode.js +31 -0
  98. package/dist/esm/core/SceneNode.js.map +1 -1
  99. package/dist/esm/core/Signal.d.ts +44 -0
  100. package/dist/esm/core/Signal.js +39 -0
  101. package/dist/esm/core/Signal.js.map +1 -1
  102. package/dist/esm/core/Time.d.ts +21 -0
  103. package/dist/esm/core/Time.js +21 -0
  104. package/dist/esm/core/Time.js.map +1 -1
  105. package/dist/esm/core/Timer.d.ts +7 -0
  106. package/dist/esm/core/Timer.js +7 -0
  107. package/dist/esm/core/Timer.js.map +1 -1
  108. package/dist/esm/core/capabilities.d.ts +12 -0
  109. package/dist/esm/core/capabilities.js +12 -0
  110. package/dist/esm/core/capabilities.js.map +1 -1
  111. package/dist/esm/core/types.d.ts +37 -0
  112. package/dist/esm/core/utils.d.ts +48 -0
  113. package/dist/esm/core/utils.js +48 -0
  114. package/dist/esm/core/utils.js.map +1 -1
  115. package/dist/esm/debug/BoundingBoxesLayer.d.ts +8 -0
  116. package/dist/esm/debug/BoundingBoxesLayer.js +8 -0
  117. package/dist/esm/debug/BoundingBoxesLayer.js.map +1 -1
  118. package/dist/esm/debug/DebugLayer.d.ts +16 -3
  119. package/dist/esm/debug/DebugLayer.js +11 -3
  120. package/dist/esm/debug/DebugLayer.js.map +1 -1
  121. package/dist/esm/debug/DebugOverlay.d.ts +11 -0
  122. package/dist/esm/debug/DebugOverlay.js +8 -2
  123. package/dist/esm/debug/DebugOverlay.js.map +1 -1
  124. package/dist/esm/debug/HitTestLayer.d.ts +9 -0
  125. package/dist/esm/debug/HitTestLayer.js +9 -0
  126. package/dist/esm/debug/HitTestLayer.js.map +1 -1
  127. package/dist/esm/debug/PerformanceLayer.d.ts +17 -1
  128. package/dist/esm/debug/PerformanceLayer.js +18 -0
  129. package/dist/esm/debug/PerformanceLayer.js.map +1 -1
  130. package/dist/esm/debug/PointerStackLayer.d.ts +8 -0
  131. package/dist/esm/debug/PointerStackLayer.js +11 -3
  132. package/dist/esm/debug/PointerStackLayer.js.map +1 -1
  133. package/dist/esm/index.js +6 -5
  134. package/dist/esm/index.js.map +1 -1
  135. package/dist/esm/input/ArcadeStickGamepadMapping.d.ts +7 -0
  136. package/dist/esm/input/ArcadeStickGamepadMapping.js +25 -19
  137. package/dist/esm/input/ArcadeStickGamepadMapping.js.map +1 -1
  138. package/dist/esm/input/GameCubeGamepadMapping.d.ts +9 -0
  139. package/dist/esm/input/GameCubeGamepadMapping.js +9 -0
  140. package/dist/esm/input/GameCubeGamepadMapping.js.map +1 -1
  141. package/dist/esm/input/Gamepad.d.ts +181 -31
  142. package/dist/esm/input/Gamepad.js +307 -108
  143. package/dist/esm/input/Gamepad.js.map +1 -1
  144. package/dist/esm/input/GamepadAxis.d.ts +120 -0
  145. package/dist/esm/input/GamepadAxis.js +106 -0
  146. package/dist/esm/input/GamepadAxis.js.map +1 -0
  147. package/dist/esm/input/GamepadButton.d.ts +110 -0
  148. package/dist/esm/input/GamepadButton.js +99 -0
  149. package/dist/esm/input/GamepadButton.js.map +1 -0
  150. package/dist/esm/input/GamepadDefinitions.d.ts +64 -1
  151. package/dist/esm/input/GamepadDefinitions.js +44 -1
  152. package/dist/esm/input/GamepadDefinitions.js.map +1 -1
  153. package/dist/esm/input/GamepadMapping.d.ts +42 -8
  154. package/dist/esm/input/GamepadMapping.js +46 -5
  155. package/dist/esm/input/GamepadMapping.js.map +1 -1
  156. package/dist/esm/input/GamepadPromptLayouts.d.ts +35 -2
  157. package/dist/esm/input/GamepadPromptLayouts.js +43 -18
  158. package/dist/esm/input/GamepadPromptLayouts.js.map +1 -1
  159. package/dist/esm/input/GenericDualAnalogGamepadMapping.d.ts +13 -0
  160. package/dist/esm/input/GenericDualAnalogGamepadMapping.js +62 -43
  161. package/dist/esm/input/GenericDualAnalogGamepadMapping.js.map +1 -1
  162. package/dist/esm/input/GestureRecognizer.d.ts +11 -2
  163. package/dist/esm/input/GestureRecognizer.js +11 -2
  164. package/dist/esm/input/GestureRecognizer.js.map +1 -1
  165. package/dist/esm/input/InputBinding.d.ts +74 -0
  166. package/dist/esm/input/InputBinding.js +100 -0
  167. package/dist/esm/input/InputBinding.js.map +1 -0
  168. package/dist/esm/input/InputManager.d.ts +100 -21
  169. package/dist/esm/input/InputManager.js +248 -90
  170. package/dist/esm/input/InputManager.js.map +1 -1
  171. package/dist/esm/input/InteractionEvent.d.ts +13 -0
  172. package/dist/esm/input/InteractionEvent.js +8 -0
  173. package/dist/esm/input/InteractionEvent.js.map +1 -1
  174. package/dist/esm/input/InteractionManager.d.ts +34 -5
  175. package/dist/esm/input/InteractionManager.js +46 -17
  176. package/dist/esm/input/InteractionManager.js.map +1 -1
  177. package/dist/esm/input/JoyConLeftGamepadMapping.d.ts +17 -3
  178. package/dist/esm/input/JoyConLeftGamepadMapping.js +42 -3
  179. package/dist/esm/input/JoyConLeftGamepadMapping.js.map +1 -1
  180. package/dist/esm/input/JoyConRightGamepadMapping.d.ts +17 -3
  181. package/dist/esm/input/JoyConRightGamepadMapping.js +38 -3
  182. package/dist/esm/input/JoyConRightGamepadMapping.js.map +1 -1
  183. package/dist/esm/input/PlayStationGamepadMapping.d.ts +8 -0
  184. package/dist/esm/input/PlayStationGamepadMapping.js +8 -0
  185. package/dist/esm/input/PlayStationGamepadMapping.js.map +1 -1
  186. package/dist/esm/input/Pointer.d.ts +106 -71
  187. package/dist/esm/input/Pointer.js +93 -71
  188. package/dist/esm/input/Pointer.js.map +1 -1
  189. package/dist/esm/input/SteamControllerGamepadMapping.d.ts +8 -0
  190. package/dist/esm/input/SteamControllerGamepadMapping.js +8 -0
  191. package/dist/esm/input/SteamControllerGamepadMapping.js.map +1 -1
  192. package/dist/esm/input/SteamDeckGamepadMapping.d.ts +18 -0
  193. package/dist/esm/input/SteamDeckGamepadMapping.js +76 -0
  194. package/dist/esm/input/SteamDeckGamepadMapping.js.map +1 -0
  195. package/dist/esm/input/SwitchProGamepadMapping.d.ts +9 -0
  196. package/dist/esm/input/SwitchProGamepadMapping.js +9 -0
  197. package/dist/esm/input/SwitchProGamepadMapping.js.map +1 -1
  198. package/dist/esm/input/XboxGamepadMapping.d.ts +8 -0
  199. package/dist/esm/input/XboxGamepadMapping.js +8 -0
  200. package/dist/esm/input/XboxGamepadMapping.js.map +1 -1
  201. package/dist/esm/input/index.d.ts +7 -4
  202. package/dist/esm/input/types.d.ts +17 -73
  203. package/dist/esm/input/types.js +18 -77
  204. package/dist/esm/input/types.js.map +1 -1
  205. package/dist/esm/math/AbstractVector.d.ts +83 -0
  206. package/dist/esm/math/AbstractVector.js +83 -0
  207. package/dist/esm/math/AbstractVector.js.map +1 -1
  208. package/dist/esm/math/Circle.d.ts +32 -0
  209. package/dist/esm/math/Circle.js +34 -2
  210. package/dist/esm/math/Circle.js.map +1 -1
  211. package/dist/esm/math/CircleLike.d.ts +1 -0
  212. package/dist/esm/math/Collision.d.ts +39 -0
  213. package/dist/esm/math/Collision.js +5 -0
  214. package/dist/esm/math/Collision.js.map +1 -1
  215. package/dist/esm/math/Ellipse.d.ts +11 -0
  216. package/dist/esm/math/Ellipse.js +18 -2
  217. package/dist/esm/math/Ellipse.js.map +1 -1
  218. package/dist/esm/math/EllipseLike.d.ts +3 -0
  219. package/dist/esm/math/Flags.d.ts +31 -0
  220. package/dist/esm/math/Flags.js +31 -0
  221. package/dist/esm/math/Flags.js.map +1 -1
  222. package/dist/esm/math/Interval.d.ts +15 -0
  223. package/dist/esm/math/Interval.js +15 -0
  224. package/dist/esm/math/Interval.js.map +1 -1
  225. package/dist/esm/math/Line.d.ts +17 -1
  226. package/dist/esm/math/Line.js +17 -1
  227. package/dist/esm/math/Line.js.map +1 -1
  228. package/dist/esm/math/LineLike.d.ts +1 -0
  229. package/dist/esm/math/Matrix.d.ts +44 -3
  230. package/dist/esm/math/Matrix.js +44 -3
  231. package/dist/esm/math/Matrix.js.map +1 -1
  232. package/dist/esm/math/ObservableSize.d.ts +7 -0
  233. package/dist/esm/math/ObservableSize.js +7 -0
  234. package/dist/esm/math/ObservableSize.js.map +1 -1
  235. package/dist/esm/math/ObservableVector.d.ts +9 -0
  236. package/dist/esm/math/ObservableVector.js +9 -0
  237. package/dist/esm/math/ObservableVector.js.map +1 -1
  238. package/dist/esm/math/PointLike.d.ts +1 -0
  239. package/dist/esm/math/PolarVector.d.ts +15 -0
  240. package/dist/esm/math/PolarVector.js +16 -1
  241. package/dist/esm/math/PolarVector.js.map +1 -1
  242. package/dist/esm/math/Polygon.d.ts +20 -0
  243. package/dist/esm/math/Polygon.js +20 -0
  244. package/dist/esm/math/Polygon.js.map +1 -1
  245. package/dist/esm/math/PolygonLike.d.ts +4 -0
  246. package/dist/esm/math/Quadtree.d.ts +40 -3
  247. package/dist/esm/math/Quadtree.js +39 -3
  248. package/dist/esm/math/Quadtree.js.map +1 -1
  249. package/dist/esm/math/Random.d.ts +25 -0
  250. package/dist/esm/math/Random.js +25 -0
  251. package/dist/esm/math/Random.js.map +1 -1
  252. package/dist/esm/math/Rectangle.d.ts +15 -0
  253. package/dist/esm/math/Rectangle.js +17 -2
  254. package/dist/esm/math/Rectangle.js.map +1 -1
  255. package/dist/esm/math/RectangleLike.d.ts +1 -0
  256. package/dist/esm/math/Segment.d.ts +7 -0
  257. package/dist/esm/math/Segment.js +7 -0
  258. package/dist/esm/math/Segment.js.map +1 -1
  259. package/dist/esm/math/ShapeLike.d.ts +6 -0
  260. package/dist/esm/math/Size.d.ts +9 -0
  261. package/dist/esm/math/Size.js +9 -0
  262. package/dist/esm/math/Size.js.map +1 -1
  263. package/dist/esm/math/Vector.d.ts +16 -0
  264. package/dist/esm/math/Vector.js +16 -0
  265. package/dist/esm/math/Vector.js.map +1 -1
  266. package/dist/esm/math/collision-detection.d.ts +47 -1
  267. package/dist/esm/math/collision-detection.js +228 -17
  268. package/dist/esm/math/collision-detection.js.map +1 -1
  269. package/dist/esm/math/collision-primitives.d.ts +23 -0
  270. package/dist/esm/math/collision-primitives.js +23 -0
  271. package/dist/esm/math/collision-primitives.js.map +1 -1
  272. package/dist/esm/math/geometry.d.ts +42 -0
  273. package/dist/esm/math/geometry.js +37 -0
  274. package/dist/esm/math/geometry.js.map +1 -1
  275. package/dist/esm/math/utils.d.ts +41 -0
  276. package/dist/esm/math/utils.js +41 -0
  277. package/dist/esm/math/utils.js.map +1 -1
  278. package/dist/esm/particles/Particle.d.ts +37 -0
  279. package/dist/esm/particles/Particle.js +37 -0
  280. package/dist/esm/particles/Particle.js.map +1 -1
  281. package/dist/esm/particles/ParticleProperties.d.ts +15 -0
  282. package/dist/esm/particles/ParticleSystem.d.ts +69 -0
  283. package/dist/esm/particles/ParticleSystem.js +69 -0
  284. package/dist/esm/particles/ParticleSystem.js.map +1 -1
  285. package/dist/esm/particles/affectors/ColorAffector.d.ts +13 -0
  286. package/dist/esm/particles/affectors/ColorAffector.js +13 -0
  287. package/dist/esm/particles/affectors/ColorAffector.js.map +1 -1
  288. package/dist/esm/particles/affectors/ForceAffector.d.ts +11 -0
  289. package/dist/esm/particles/affectors/ForceAffector.js +11 -0
  290. package/dist/esm/particles/affectors/ForceAffector.js.map +1 -1
  291. package/dist/esm/particles/affectors/ParticleAffector.d.ts +13 -0
  292. package/dist/esm/particles/affectors/ScaleAffector.d.ts +10 -0
  293. package/dist/esm/particles/affectors/ScaleAffector.js +10 -0
  294. package/dist/esm/particles/affectors/ScaleAffector.js.map +1 -1
  295. package/dist/esm/particles/affectors/TorqueAffector.d.ts +11 -0
  296. package/dist/esm/particles/affectors/TorqueAffector.js +11 -0
  297. package/dist/esm/particles/affectors/TorqueAffector.js.map +1 -1
  298. package/dist/esm/particles/emitters/ParticleEmitter.d.ts +13 -0
  299. package/dist/esm/particles/emitters/ParticleOptions.d.ts +16 -0
  300. package/dist/esm/particles/emitters/ParticleOptions.js +16 -0
  301. package/dist/esm/particles/emitters/ParticleOptions.js.map +1 -1
  302. package/dist/esm/particles/emitters/UniversalEmitter.d.ts +23 -0
  303. package/dist/esm/particles/emitters/UniversalEmitter.js +23 -0
  304. package/dist/esm/particles/emitters/UniversalEmitter.js.map +1 -1
  305. package/dist/esm/rendering/CallbackRenderPass.d.ts +12 -0
  306. package/dist/esm/rendering/CallbackRenderPass.js +12 -0
  307. package/dist/esm/rendering/CallbackRenderPass.js.map +1 -1
  308. package/dist/esm/rendering/Container.d.ts +43 -0
  309. package/dist/esm/rendering/Container.js +43 -0
  310. package/dist/esm/rendering/Container.js.map +1 -1
  311. package/dist/esm/rendering/Drawable.d.ts +22 -0
  312. package/dist/esm/rendering/Drawable.js +22 -0
  313. package/dist/esm/rendering/Drawable.js.map +1 -1
  314. package/dist/esm/rendering/RenderBackend.d.ts +13 -0
  315. package/dist/esm/rendering/RenderBackendType.d.ts +4 -0
  316. package/dist/esm/rendering/RenderBackendType.js +4 -0
  317. package/dist/esm/rendering/RenderBackendType.js.map +1 -1
  318. package/dist/esm/rendering/RenderNode.d.ts +18 -0
  319. package/dist/esm/rendering/RenderNode.js +18 -0
  320. package/dist/esm/rendering/RenderNode.js.map +1 -1
  321. package/dist/esm/rendering/RenderPass.d.ts +8 -0
  322. package/dist/esm/rendering/RenderStats.d.ts +19 -0
  323. package/dist/esm/rendering/RenderStats.js +7 -0
  324. package/dist/esm/rendering/RenderStats.js.map +1 -1
  325. package/dist/esm/rendering/RenderTarget.d.ts +17 -0
  326. package/dist/esm/rendering/RenderTarget.js +17 -0
  327. package/dist/esm/rendering/RenderTarget.js.map +1 -1
  328. package/dist/esm/rendering/RenderTargetPass.d.ts +11 -0
  329. package/dist/esm/rendering/RenderTargetPass.js +7 -0
  330. package/dist/esm/rendering/RenderTargetPass.js.map +1 -1
  331. package/dist/esm/rendering/Renderer.d.ts +15 -0
  332. package/dist/esm/rendering/RendererRegistry.d.ts +7 -0
  333. package/dist/esm/rendering/RendererRegistry.js +7 -0
  334. package/dist/esm/rendering/RendererRegistry.js.map +1 -1
  335. package/dist/esm/rendering/View.d.ts +67 -2
  336. package/dist/esm/rendering/View.js +57 -0
  337. package/dist/esm/rendering/View.js.map +1 -1
  338. package/dist/esm/rendering/filters/BlurFilter.d.ts +9 -0
  339. package/dist/esm/rendering/filters/BlurFilter.js +8 -0
  340. package/dist/esm/rendering/filters/BlurFilter.js.map +1 -1
  341. package/dist/esm/rendering/filters/ColorFilter.d.ts +7 -0
  342. package/dist/esm/rendering/filters/ColorFilter.js +7 -0
  343. package/dist/esm/rendering/filters/ColorFilter.js.map +1 -1
  344. package/dist/esm/rendering/filters/Filter.d.ts +23 -0
  345. package/dist/esm/rendering/filters/Filter.js +20 -0
  346. package/dist/esm/rendering/filters/Filter.js.map +1 -1
  347. package/dist/esm/rendering/filters/WebGl2ShaderFilter.d.ts +5 -0
  348. package/dist/esm/rendering/filters/WebGl2ShaderFilter.js +5 -0
  349. package/dist/esm/rendering/filters/WebGl2ShaderFilter.js.map +1 -1
  350. package/dist/esm/rendering/filters/WebGpuShaderFilter.d.ts +5 -0
  351. package/dist/esm/rendering/filters/WebGpuShaderFilter.js +5 -0
  352. package/dist/esm/rendering/filters/WebGpuShaderFilter.js.map +1 -1
  353. package/dist/esm/rendering/mesh/Mesh.d.ts +2 -0
  354. package/dist/esm/rendering/mesh/Mesh.js +2 -0
  355. package/dist/esm/rendering/mesh/Mesh.js.map +1 -1
  356. package/dist/esm/rendering/primitives/Graphics.d.ts +34 -0
  357. package/dist/esm/rendering/primitives/Graphics.js +34 -0
  358. package/dist/esm/rendering/primitives/Graphics.js.map +1 -1
  359. package/dist/esm/rendering/shader/Shader.d.ts +36 -0
  360. package/dist/esm/rendering/shader/Shader.js +26 -0
  361. package/dist/esm/rendering/shader/Shader.js.map +1 -1
  362. package/dist/esm/rendering/shader/ShaderAttribute.d.ts +13 -0
  363. package/dist/esm/rendering/shader/ShaderAttribute.js +13 -0
  364. package/dist/esm/rendering/shader/ShaderAttribute.js.map +1 -1
  365. package/dist/esm/rendering/shader/ShaderUniform.d.ts +27 -0
  366. package/dist/esm/rendering/shader/ShaderUniform.js +28 -1
  367. package/dist/esm/rendering/shader/ShaderUniform.js.map +1 -1
  368. package/dist/esm/rendering/sprite/AnimatedSprite.d.ts +38 -0
  369. package/dist/esm/rendering/sprite/AnimatedSprite.js +36 -0
  370. package/dist/esm/rendering/sprite/AnimatedSprite.js.map +1 -1
  371. package/dist/esm/rendering/sprite/Sprite.d.ts +56 -0
  372. package/dist/esm/rendering/sprite/Sprite.js +56 -0
  373. package/dist/esm/rendering/sprite/Sprite.js.map +1 -1
  374. package/dist/esm/rendering/sprite/Spritesheet.d.ts +25 -0
  375. package/dist/esm/rendering/sprite/Spritesheet.js +20 -0
  376. package/dist/esm/rendering/sprite/Spritesheet.js.map +1 -1
  377. package/dist/esm/rendering/text/Text.d.ts +2 -0
  378. package/dist/esm/rendering/text/Text.js +2 -0
  379. package/dist/esm/rendering/text/Text.js.map +1 -1
  380. package/dist/esm/rendering/text/TextStyle.d.ts +29 -0
  381. package/dist/esm/rendering/text/TextStyle.js +24 -0
  382. package/dist/esm/rendering/text/TextStyle.js.map +1 -1
  383. package/dist/esm/rendering/text/types.d.ts +1 -0
  384. package/dist/esm/rendering/texture/RenderTexture.d.ts +16 -0
  385. package/dist/esm/rendering/texture/RenderTexture.js +16 -0
  386. package/dist/esm/rendering/texture/RenderTexture.js.map +1 -1
  387. package/dist/esm/rendering/texture/Sampler.d.ts +23 -0
  388. package/dist/esm/rendering/texture/Sampler.js +13 -0
  389. package/dist/esm/rendering/texture/Sampler.js.map +1 -1
  390. package/dist/esm/rendering/texture/Texture.d.ts +30 -0
  391. package/dist/esm/rendering/texture/Texture.js +30 -0
  392. package/dist/esm/rendering/texture/Texture.js.map +1 -1
  393. package/dist/esm/rendering/types.d.ts +29 -0
  394. package/dist/esm/rendering/types.js +29 -0
  395. package/dist/esm/rendering/types.js.map +1 -1
  396. package/dist/esm/rendering/utils.d.ts +20 -0
  397. package/dist/esm/rendering/utils.js +10 -0
  398. package/dist/esm/rendering/utils.js.map +1 -1
  399. package/dist/esm/rendering/video/Video.d.ts +35 -1
  400. package/dist/esm/rendering/video/Video.js +36 -2
  401. package/dist/esm/rendering/video/Video.js.map +1 -1
  402. package/dist/esm/rendering/webgl2/AbstractWebGl2BatchedRenderer.d.ts +7 -0
  403. package/dist/esm/rendering/webgl2/AbstractWebGl2BatchedRenderer.js +7 -0
  404. package/dist/esm/rendering/webgl2/AbstractWebGl2BatchedRenderer.js.map +1 -1
  405. package/dist/esm/rendering/webgl2/WebGl2Backend.d.ts +13 -0
  406. package/dist/esm/rendering/webgl2/WebGl2Backend.js +13 -0
  407. package/dist/esm/rendering/webgl2/WebGl2Backend.js.map +1 -1
  408. package/dist/esm/rendering/webgl2/WebGl2RenderBuffer.d.ts +8 -0
  409. package/dist/esm/rendering/webgl2/WebGl2RenderBuffer.js +8 -0
  410. package/dist/esm/rendering/webgl2/WebGl2RenderBuffer.js.map +1 -1
  411. package/dist/esm/rendering/webgpu/WebGpuBackend.d.ts +35 -0
  412. package/dist/esm/rendering/webgpu/WebGpuBackend.js +135 -5
  413. package/dist/esm/rendering/webgpu/WebGpuBackend.js.map +1 -1
  414. package/dist/esm/resources/AbstractAssetFactory.d.ts +20 -0
  415. package/dist/esm/resources/AbstractAssetFactory.js +20 -0
  416. package/dist/esm/resources/AbstractAssetFactory.js.map +1 -1
  417. package/dist/esm/resources/AssetFactory.d.ts +26 -0
  418. package/dist/esm/resources/AssetManifest.d.ts +45 -0
  419. package/dist/esm/resources/AssetManifest.js +25 -0
  420. package/dist/esm/resources/AssetManifest.js.map +1 -1
  421. package/dist/esm/resources/CacheFirstStrategy.d.ts +15 -0
  422. package/dist/esm/resources/CacheFirstStrategy.js +19 -4
  423. package/dist/esm/resources/CacheFirstStrategy.js.map +1 -1
  424. package/dist/esm/resources/CacheStore.d.ts +23 -0
  425. package/dist/esm/resources/CacheStrategy.d.ts +28 -0
  426. package/dist/esm/resources/Database.d.ts +45 -0
  427. package/dist/esm/resources/FactoryRegistry.d.ts +28 -0
  428. package/dist/esm/resources/FactoryRegistry.js +24 -0
  429. package/dist/esm/resources/FactoryRegistry.js.map +1 -1
  430. package/dist/esm/resources/IndexedDbDatabase.d.ts +22 -1
  431. package/dist/esm/resources/IndexedDbDatabase.js +21 -0
  432. package/dist/esm/resources/IndexedDbDatabase.js.map +1 -1
  433. package/dist/esm/resources/IndexedDbStore.d.ts +20 -0
  434. package/dist/esm/resources/IndexedDbStore.js +12 -0
  435. package/dist/esm/resources/IndexedDbStore.js.map +1 -1
  436. package/dist/esm/resources/Loader.d.ts +172 -0
  437. package/dist/esm/resources/Loader.js +129 -37
  438. package/dist/esm/resources/Loader.js.map +1 -1
  439. package/dist/esm/resources/NetworkOnlyStrategy.d.ts +11 -0
  440. package/dist/esm/resources/NetworkOnlyStrategy.js +16 -3
  441. package/dist/esm/resources/NetworkOnlyStrategy.js.map +1 -1
  442. package/dist/esm/resources/factories/BinaryFactory.d.ts +13 -0
  443. package/dist/esm/resources/factories/BinaryFactory.js +13 -0
  444. package/dist/esm/resources/factories/BinaryFactory.js.map +1 -1
  445. package/dist/esm/resources/factories/FontFactory.d.ts +37 -0
  446. package/dist/esm/resources/factories/FontFactory.js +26 -0
  447. package/dist/esm/resources/factories/FontFactory.js.map +1 -1
  448. package/dist/esm/resources/factories/ImageFactory.d.ts +26 -2
  449. package/dist/esm/resources/factories/ImageFactory.js +19 -0
  450. package/dist/esm/resources/factories/ImageFactory.js.map +1 -1
  451. package/dist/esm/resources/factories/JsonFactory.d.ts +13 -0
  452. package/dist/esm/resources/factories/JsonFactory.js +13 -0
  453. package/dist/esm/resources/factories/JsonFactory.js.map +1 -1
  454. package/dist/esm/resources/factories/MusicFactory.d.ts +36 -0
  455. package/dist/esm/resources/factories/MusicFactory.js +44 -4
  456. package/dist/esm/resources/factories/MusicFactory.js.map +1 -1
  457. package/dist/esm/resources/factories/SoundFactory.d.ts +29 -0
  458. package/dist/esm/resources/factories/SoundFactory.js +18 -0
  459. package/dist/esm/resources/factories/SoundFactory.js.map +1 -1
  460. package/dist/esm/resources/factories/SvgFactory.d.ts +19 -0
  461. package/dist/esm/resources/factories/SvgFactory.js +19 -0
  462. package/dist/esm/resources/factories/SvgFactory.js.map +1 -1
  463. package/dist/esm/resources/factories/TextFactory.d.ts +11 -0
  464. package/dist/esm/resources/factories/TextFactory.js +11 -0
  465. package/dist/esm/resources/factories/TextFactory.js.map +1 -1
  466. package/dist/esm/resources/factories/TextureFactory.d.ts +27 -2
  467. package/dist/esm/resources/factories/TextureFactory.js +20 -0
  468. package/dist/esm/resources/factories/TextureFactory.js.map +1 -1
  469. package/dist/esm/resources/factories/VideoFactory.d.ts +37 -0
  470. package/dist/esm/resources/factories/VideoFactory.js +48 -5
  471. package/dist/esm/resources/factories/VideoFactory.js.map +1 -1
  472. package/dist/esm/resources/factories/VttFactory.d.ts +18 -0
  473. package/dist/esm/resources/factories/VttFactory.js +104 -3
  474. package/dist/esm/resources/factories/VttFactory.js.map +1 -1
  475. package/dist/esm/resources/factories/WasmFactory.d.ts +16 -0
  476. package/dist/esm/resources/factories/WasmFactory.js +16 -0
  477. package/dist/esm/resources/factories/WasmFactory.js.map +1 -1
  478. package/dist/esm/resources/utils.d.ts +10 -0
  479. package/dist/esm/resources/utils.js +10 -0
  480. package/dist/esm/resources/utils.js.map +1 -1
  481. package/dist/exo.esm.js +4673 -745
  482. package/dist/exo.esm.js.map +1 -1
  483. package/package.json +8 -8
  484. package/dist/esm/input/GamepadChannels.d.ts +0 -39
  485. package/dist/esm/input/GamepadChannels.js +0 -45
  486. package/dist/esm/input/GamepadChannels.js.map +0 -1
  487. package/dist/esm/input/GamepadControl.d.ts +0 -15
  488. package/dist/esm/input/GamepadControl.js +0 -29
  489. package/dist/esm/input/GamepadControl.js.map +0 -1
  490. package/dist/esm/input/Input.d.ts +0 -28
  491. package/dist/esm/input/Input.js +0 -68
  492. package/dist/esm/input/Input.js.map +0 -1
@@ -1,11 +1,30 @@
1
1
  import { determineMimeType } from '../utils.js';
2
2
  import { AbstractAssetFactory } from '../AbstractAssetFactory.js';
3
3
 
4
+ /**
5
+ * {@link AssetFactory} implementation that loads PNG, JPG, WebP, AVIF, and
6
+ * other browser-supported raster image formats and produces a decoded
7
+ * {@link HTMLImageElement}.
8
+ *
9
+ * MIME type detection is performed automatically from the buffer's magic bytes;
10
+ * pass an explicit `mimeType` in options to override.
11
+ */
4
12
  class ImageFactory extends AbstractAssetFactory {
5
13
  storageName = 'image';
14
+ /**
15
+ * Reads the full response body as an {@link ArrayBuffer} for MIME-type
16
+ * detection and blob construction.
17
+ */
6
18
  async process(response) {
7
19
  return await response.arrayBuffer();
8
20
  }
21
+ /**
22
+ * Decodes image bytes into a fully loaded {@link HTMLImageElement}.
23
+ *
24
+ * Creates a temporary object URL from the buffer, assigns it to an
25
+ * `<img>` element, and revokes the URL once loading completes or fails.
26
+ * Rejects if the browser reports a load error or the load is aborted.
27
+ */
9
28
  async create(source, options = {}) {
10
29
  const blob = new Blob([source], { type: options.mimeType ?? determineMimeType(source) });
11
30
  const objectUrl = this.createObjectUrl(blob);
@@ -1 +1 @@
1
- {"version":3,"file":"ImageFactory.js","sources":["../../../../../src/resources/factories/ImageFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAOM,MAAO,YAAa,SAAQ,oBAAsC,CAAA;IAEpD,WAAW,GAAG,OAAO;IAE9B,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE;IACvC;AAEO,IAAA,MAAM,MAAM,CAAC,MAAmB,EAAE,UAA+B,EAAE,EAAA;QACtE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;QACxF,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QAE5C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACnC,YAAA,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE;YACzB,MAAM,QAAQ,GAAG,MAAW;AACxB,gBAAA,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;AACnC,YAAA,CAAC;AAED,YAAA,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAK;AAChC,gBAAA,QAAQ,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC;AAClB,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClB,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;AACjC,gBAAA,QAAQ,EAAE;AACV,gBAAA,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAChD,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClB,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;AACjC,gBAAA,QAAQ,EAAE;AACV,gBAAA,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAChD,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAElB,YAAA,KAAK,CAAC,GAAG,GAAG,SAAS;AACzB,QAAA,CAAC,CAAC;IACN;AACH;;;;"}
1
+ {"version":3,"file":"ImageFactory.js","sources":["../../../../../src/resources/factories/ImageFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAaA;;;;;;;AAOG;AACG,MAAO,YAAa,SAAQ,oBAAsC,CAAA;IAEpD,WAAW,GAAG,OAAO;AAErC;;;AAGG;IACI,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE;IACvC;AAEA;;;;;;AAMG;AACI,IAAA,MAAM,MAAM,CAAC,MAAmB,EAAE,UAA+B,EAAE,EAAA;QACtE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;QACxF,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QAE5C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACnC,YAAA,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE;YACzB,MAAM,QAAQ,GAAG,MAAW;AACxB,gBAAA,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;AACnC,YAAA,CAAC;AAED,YAAA,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAK;AAChC,gBAAA,QAAQ,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC;AAClB,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClB,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;AACjC,gBAAA,QAAQ,EAAE;AACV,gBAAA,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAChD,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClB,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;AACjC,gBAAA,QAAQ,EAAE;AACV,gBAAA,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAChD,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAElB,YAAA,KAAK,CAAC,GAAG,GAAG,SAAS;AACzB,QAAA,CAAC,CAAC;IACN;AACH;;;;"}
@@ -1,6 +1,19 @@
1
1
  import { AbstractAssetFactory } from '@/resources/AbstractAssetFactory';
2
+ /**
3
+ * {@link AssetFactory} implementation that parses JSON files and exposes them
4
+ * as plain JavaScript values.
5
+ *
6
+ * The parsed value is typed as `unknown`; callers are expected to narrow or
7
+ * cast the result to their specific schema type.
8
+ */
2
9
  export declare class JsonFactory extends AbstractAssetFactory<unknown> {
3
10
  readonly storageName = "json";
11
+ /**
12
+ * Parses the response body as JSON and returns the resulting value.
13
+ */
4
14
  process(response: Response): Promise<unknown>;
15
+ /**
16
+ * Returns the already-parsed value unchanged.
17
+ */
5
18
  create(source: unknown): Promise<unknown>;
6
19
  }
@@ -1,10 +1,23 @@
1
1
  import { AbstractAssetFactory } from '../AbstractAssetFactory.js';
2
2
 
3
+ /**
4
+ * {@link AssetFactory} implementation that parses JSON files and exposes them
5
+ * as plain JavaScript values.
6
+ *
7
+ * The parsed value is typed as `unknown`; callers are expected to narrow or
8
+ * cast the result to their specific schema type.
9
+ */
3
10
  class JsonFactory extends AbstractAssetFactory {
4
11
  storageName = 'json';
12
+ /**
13
+ * Parses the response body as JSON and returns the resulting value.
14
+ */
5
15
  async process(response) {
6
16
  return await response.json();
7
17
  }
18
+ /**
19
+ * Returns the already-parsed value unchanged.
20
+ */
8
21
  async create(source) {
9
22
  return source;
10
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"JsonFactory.js","sources":["../../../../../src/resources/factories/JsonFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEM,MAAO,WAAY,SAAQ,oBAA6B,CAAA;IAE1C,WAAW,GAAG,MAAM;IAE7B,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE;IAChC;IAEO,MAAM,MAAM,CAAC,MAAe,EAAA;AAC/B,QAAA,OAAO,MAAM;IACjB;AACH;;;;"}
1
+ {"version":3,"file":"JsonFactory.js","sources":["../../../../../src/resources/factories/JsonFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;AAMG;AACG,MAAO,WAAY,SAAQ,oBAA6B,CAAA;IAE1C,WAAW,GAAG,MAAM;AAEpC;;AAEG;IACI,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE;IAChC;AAEA;;AAEG;IACI,MAAM,MAAM,CAAC,MAAe,EAAA;AAC/B,QAAA,OAAO,MAAM;IACjB;AACH;;;;"}
@@ -2,15 +2,51 @@ import type { PlaybackOptions, StreamingLoadEvent } from '@/core/types';
2
2
  import { AbstractAssetFactory } from '@/resources/AbstractAssetFactory';
3
3
  import { Music } from '@/audio/Music';
4
4
  interface MusicFactoryOptions {
5
+ /**
6
+ * MIME type for the audio blob. Inferred from magic bytes when omitted.
7
+ */
5
8
  mimeType?: string;
9
+ /**
10
+ * The `HTMLAudioElement` event that signals the asset is ready. Defaults
11
+ * to `'canplaythrough'`. Use `'loadedmetadata'` or `'canplay'` for faster
12
+ * (but potentially less buffered) readiness.
13
+ */
6
14
  loadEvent?: StreamingLoadEvent;
15
+ /** Initial playback settings forwarded to the {@link Music} instance. */
7
16
  playbackOptions?: Partial<PlaybackOptions>;
8
17
  }
18
+ /**
19
+ * {@link AssetFactory} implementation that loads streaming audio assets
20
+ * (MP3, OGG, WAV, AAC, and other browser-supported formats) and produces a
21
+ * {@link Music} instance backed by an `<audio>` element.
22
+ *
23
+ * Unlike {@link SoundFactory}, music assets are decoded lazily via the browser's
24
+ * streaming audio pipeline rather than being fully decoded into an
25
+ * {@link AudioBuffer} up-front, making them appropriate for long-form
26
+ * background tracks. The underlying `<audio>` elements are paused and detached
27
+ * when {@link MusicFactory.destroy} is called.
28
+ */
9
29
  export declare class MusicFactory extends AbstractAssetFactory<Music> {
10
30
  readonly storageName = "music";
11
31
  private readonly _audioElements;
32
+ /**
33
+ * Reads the full response body as an {@link ArrayBuffer} for blob
34
+ * construction.
35
+ */
12
36
  process(response: Response): Promise<ArrayBuffer>;
37
+ /**
38
+ * Wraps audio bytes in an `<audio>` element and resolves with a
39
+ * {@link Music} instance once the configured `loadEvent` fires.
40
+ *
41
+ * Rejects if the element emits an `error` or `abort` event before the
42
+ * load event is received.
43
+ */
13
44
  create(source: ArrayBuffer, options?: MusicFactoryOptions): Promise<Music>;
45
+ /**
46
+ * Pauses and resets all `<audio>` elements created by this factory to
47
+ * release media resources, then delegates to the base
48
+ * {@link AbstractAssetFactory.destroy} to revoke any object URLs.
49
+ */
14
50
  destroy(): void;
15
51
  }
16
52
  export {};
@@ -3,25 +3,65 @@ import { determineMimeType } from '../utils.js';
3
3
  import { Music } from '../../audio/Music.js';
4
4
 
5
5
  const onceListenerOption = { once: true };
6
+ /**
7
+ * {@link AssetFactory} implementation that loads streaming audio assets
8
+ * (MP3, OGG, WAV, AAC, and other browser-supported formats) and produces a
9
+ * {@link Music} instance backed by an `<audio>` element.
10
+ *
11
+ * Unlike {@link SoundFactory}, music assets are decoded lazily via the browser's
12
+ * streaming audio pipeline rather than being fully decoded into an
13
+ * {@link AudioBuffer} up-front, making them appropriate for long-form
14
+ * background tracks. The underlying `<audio>` elements are paused and detached
15
+ * when {@link MusicFactory.destroy} is called.
16
+ */
6
17
  class MusicFactory extends AbstractAssetFactory {
7
18
  storageName = 'music';
8
19
  _audioElements = [];
20
+ /**
21
+ * Reads the full response body as an {@link ArrayBuffer} for blob
22
+ * construction.
23
+ */
9
24
  async process(response) {
10
25
  return await response.arrayBuffer();
11
26
  }
27
+ /**
28
+ * Wraps audio bytes in an `<audio>` element and resolves with a
29
+ * {@link Music} instance once the configured `loadEvent` fires.
30
+ *
31
+ * Rejects if the element emits an `error` or `abort` event before the
32
+ * load event is received.
33
+ */
12
34
  async create(source, options = {}) {
13
35
  const { mimeType, loadEvent, playbackOptions } = options;
14
36
  const blob = new Blob([source], { type: mimeType ?? determineMimeType(source) });
37
+ const objectUrl = this.createObjectUrl(blob);
15
38
  return new Promise((resolve, reject) => {
16
39
  const audio = document.createElement('audio');
17
40
  this._audioElements.push(audio);
18
- audio.addEventListener('error', () => reject(Error('Error loading audio source.')), onceListenerOption);
19
- audio.addEventListener('abort', () => reject(Error('Audio loading was canceled.')), onceListenerOption);
20
- audio.addEventListener(loadEvent ?? 'canplaythrough', () => resolve(new Music(audio, playbackOptions)), onceListenerOption);
41
+ const finalize = () => {
42
+ this.revokeObjectUrl(objectUrl);
43
+ };
44
+ audio.addEventListener('error', () => {
45
+ finalize();
46
+ reject(Error('Error loading audio source.'));
47
+ }, onceListenerOption);
48
+ audio.addEventListener('abort', () => {
49
+ finalize();
50
+ reject(Error('Audio loading was canceled.'));
51
+ }, onceListenerOption);
52
+ audio.addEventListener(loadEvent ?? 'canplaythrough', () => {
53
+ finalize();
54
+ resolve(new Music(audio, playbackOptions));
55
+ }, onceListenerOption);
21
56
  audio.preload = 'auto';
22
- audio.src = this.createObjectUrl(blob);
57
+ audio.src = objectUrl;
23
58
  });
24
59
  }
60
+ /**
61
+ * Pauses and resets all `<audio>` elements created by this factory to
62
+ * release media resources, then delegates to the base
63
+ * {@link AbstractAssetFactory.destroy} to revoke any object URLs.
64
+ */
25
65
  destroy() {
26
66
  for (const audio of this._audioElements) {
27
67
  audio.pause();
@@ -1 +1 @@
1
- {"version":3,"file":"MusicFactory.js","sources":["../../../../../src/resources/factories/MusicFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA,MAAM,kBAAkB,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE;AAQnC,MAAO,YAAa,SAAQ,oBAA2B,CAAA;IAEzC,WAAW,GAAG,OAAO;IAEpB,cAAc,GAA4B,EAAE;IAEtD,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE;IACvC;AAEO,IAAA,MAAM,MAAM,CAAC,MAAmB,EAAE,UAA+B,EAAE,EAAA;QACtE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,OAAO;QACxD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;QAEhF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;YACnC,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,YAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;AAE/B,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,EAAE,kBAAkB,CAAC;AACvG,YA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,KAAK,CAAC,GAAG,GAAG,EAAE;YACd,KAAK,CAAC,IAAI,EAAE;QAChB;AACA,QAAA,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;QAC9B,KAAK,CAAC,OAAO,EAAE;IACnB;AACH;;;;"}
@@ -2,13 +2,42 @@ import type { PlaybackOptions } from '@/core/types';
2
2
  import { AbstractAssetFactory } from '@/resources/AbstractAssetFactory';
3
3
  import { Sound, type AudioSpriteClip } from '@/audio/Sound';
4
4
  interface SoundFactoryOptions {
5
+ /** Initial playback settings forwarded to the {@link Sound} instance. */
5
6
  playbackOptions?: Partial<PlaybackOptions>;
7
+ /**
8
+ * Number of concurrent voices the {@link Sound} instance pre-allocates.
9
+ * Higher values allow more simultaneous plays of the same clip. Default
10
+ * 8 (chosen by {@link Sound} when omitted).
11
+ */
6
12
  poolSize?: number;
13
+ /**
14
+ * Named sub-regions of the decoded {@link AudioBuffer} for use as an audio
15
+ * sprite sheet. Each entry maps a clip name to a {@link AudioSpriteClip}
16
+ * descriptor.
17
+ */
7
18
  sprites?: Readonly<Record<string, AudioSpriteClip>>;
8
19
  }
20
+ /**
21
+ * {@link AssetFactory} implementation that loads short audio assets
22
+ * (MP3, OGG, WAV, AAC, and other Web Audio API-supported formats), fully
23
+ * decodes them into an {@link AudioBuffer}, and produces a {@link Sound}
24
+ * instance ready for low-latency playback.
25
+ *
26
+ * For long-form background music use {@link MusicFactory} instead, which
27
+ * streams audio without up-front decoding. Supports audio sprite sheets via
28
+ * the `sprites` option.
29
+ */
9
30
  export declare class SoundFactory extends AbstractAssetFactory<Sound> {
10
31
  readonly storageName = "sound";
32
+ /**
33
+ * Reads the full response body as an {@link ArrayBuffer} for decoding
34
+ * by the Web Audio API.
35
+ */
11
36
  process(response: Response): Promise<ArrayBuffer>;
37
+ /**
38
+ * Fully decodes the audio buffer via the shared `AudioContext` and
39
+ * constructs a {@link Sound} with the given options.
40
+ */
12
41
  create(source: ArrayBuffer, options?: SoundFactoryOptions): Promise<Sound>;
13
42
  }
14
43
  export {};
@@ -2,11 +2,29 @@ import { AbstractAssetFactory } from '../AbstractAssetFactory.js';
2
2
  import { Sound } from '../../audio/Sound.js';
3
3
  import { decodeAudioData } from '../../audio/audio-context.js';
4
4
 
5
+ /**
6
+ * {@link AssetFactory} implementation that loads short audio assets
7
+ * (MP3, OGG, WAV, AAC, and other Web Audio API-supported formats), fully
8
+ * decodes them into an {@link AudioBuffer}, and produces a {@link Sound}
9
+ * instance ready for low-latency playback.
10
+ *
11
+ * For long-form background music use {@link MusicFactory} instead, which
12
+ * streams audio without up-front decoding. Supports audio sprite sheets via
13
+ * the `sprites` option.
14
+ */
5
15
  class SoundFactory extends AbstractAssetFactory {
6
16
  storageName = 'sound';
17
+ /**
18
+ * Reads the full response body as an {@link ArrayBuffer} for decoding
19
+ * by the Web Audio API.
20
+ */
7
21
  async process(response) {
8
22
  return await response.arrayBuffer();
9
23
  }
24
+ /**
25
+ * Fully decodes the audio buffer via the shared `AudioContext` and
26
+ * constructs a {@link Sound} with the given options.
27
+ */
10
28
  async create(source, options = {}) {
11
29
  const audioBuffer = await decodeAudioData(source);
12
30
  const sound = new Sound(audioBuffer, {
@@ -1 +1 @@
1
- {"version":3,"file":"SoundFactory.js","sources":["../../../../../src/resources/factories/SoundFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAWM,MAAO,YAAa,SAAQ,oBAA2B,CAAA;IAEzC,WAAW,GAAG,OAAO;IAE9B,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE;IACvC;AAEO,IAAA,MAAM,MAAM,CAAC,MAAmB,EAAE,UAA+B,EAAE,EAAA;AACtE,QAAA,MAAM,WAAW,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC;AAEjD,QAAA,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,WAAW,EAAE;YACjC,GAAG,OAAO,CAAC,eAAe;YAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;AAC3B,SAAA,CAAC;AAEF,QAAA,OAAO,KAAK;IAChB;AACH;;;;"}
1
+ {"version":3,"file":"SoundFactory.js","sources":["../../../../../src/resources/factories/SoundFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAsBA;;;;;;;;;AASG;AACG,MAAO,YAAa,SAAQ,oBAA2B,CAAA;IAEzC,WAAW,GAAG,OAAO;AAErC;;;AAGG;IACI,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE;IACvC;AAEA;;;AAGG;AACI,IAAA,MAAM,MAAM,CAAC,MAAmB,EAAE,UAA+B,EAAE,EAAA;AACtE,QAAA,MAAM,WAAW,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC;AAEjD,QAAA,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,WAAW,EAAE;YACjC,GAAG,OAAO,CAAC,eAAe;YAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;AAC3B,SAAA,CAAC;AAEF,QAAA,OAAO,KAAK;IAChB;AACH;;;;"}
@@ -1,6 +1,25 @@
1
1
  import { AbstractAssetFactory } from '@/resources/AbstractAssetFactory';
2
+ /**
3
+ * {@link AssetFactory} implementation that loads SVG markup and produces a
4
+ * rasterised {@link HTMLImageElement}.
5
+ *
6
+ * The SVG source text is wrapped in an `image/svg+xml` blob and decoded by the
7
+ * browser's image pipeline, which means the result is a bitmap snapshot at the
8
+ * element's intrinsic size rather than a live, interactive SVG DOM. Use this
9
+ * when you need an SVG as a static sprite or texture source.
10
+ */
2
11
  export declare class SvgFactory extends AbstractAssetFactory<HTMLImageElement> {
3
12
  readonly storageName = "svg";
13
+ /**
14
+ * Reads the response body as UTF-8 text containing the raw SVG markup.
15
+ */
4
16
  process(response: Response): Promise<string>;
17
+ /**
18
+ * Renders the SVG markup into a fully loaded {@link HTMLImageElement}.
19
+ *
20
+ * Creates a temporary `image/svg+xml` object URL, assigns it to an `<img>`
21
+ * element, and revokes the URL once loading settles. Rejects on load error
22
+ * or abort.
23
+ */
5
24
  create(source: string): Promise<HTMLImageElement>;
6
25
  }
@@ -1,10 +1,29 @@
1
1
  import { AbstractAssetFactory } from '../AbstractAssetFactory.js';
2
2
 
3
+ /**
4
+ * {@link AssetFactory} implementation that loads SVG markup and produces a
5
+ * rasterised {@link HTMLImageElement}.
6
+ *
7
+ * The SVG source text is wrapped in an `image/svg+xml` blob and decoded by the
8
+ * browser's image pipeline, which means the result is a bitmap snapshot at the
9
+ * element's intrinsic size rather than a live, interactive SVG DOM. Use this
10
+ * when you need an SVG as a static sprite or texture source.
11
+ */
3
12
  class SvgFactory extends AbstractAssetFactory {
4
13
  storageName = 'svg';
14
+ /**
15
+ * Reads the response body as UTF-8 text containing the raw SVG markup.
16
+ */
5
17
  async process(response) {
6
18
  return await response.text();
7
19
  }
20
+ /**
21
+ * Renders the SVG markup into a fully loaded {@link HTMLImageElement}.
22
+ *
23
+ * Creates a temporary `image/svg+xml` object URL, assigns it to an `<img>`
24
+ * element, and revokes the URL once loading settles. Rejects on load error
25
+ * or abort.
26
+ */
8
27
  async create(source) {
9
28
  const blob = new Blob([source], { type: 'image/svg+xml' });
10
29
  const objectUrl = this.createObjectUrl(blob);
@@ -1 +1 @@
1
- {"version":3,"file":"SvgFactory.js","sources":["../../../../../src/resources/factories/SvgFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEM,MAAO,UAAW,SAAQ,oBAAsC,CAAA;IAElD,WAAW,GAAG,KAAK;IAE5B,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE;IAChC;IAEO,MAAM,MAAM,CAAC,MAAc,EAAA;AAC9B,QAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,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;;;;;AAMG;IACI,MAAM,MAAM,CAAC,MAAc,EAAA;AAC9B,QAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;QAC1D,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QAE5C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACnC,YAAA,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE;YACzB,MAAM,QAAQ,GAAG,MAAW;AACxB,gBAAA,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;AACnC,YAAA,CAAC;AAED,YAAA,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAK;AAChC,gBAAA,QAAQ,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC;AAClB,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClB,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;AACjC,gBAAA,QAAQ,EAAE;AACV,gBAAA,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAChD,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClB,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;AACjC,gBAAA,QAAQ,EAAE;AACV,gBAAA,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAChD,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAElB,YAAA,KAAK,CAAC,GAAG,GAAG,SAAS;AACzB,QAAA,CAAC,CAAC;IACN;AACH;;;;"}
@@ -1,6 +1,17 @@
1
1
  import { AbstractAssetFactory } from '@/resources/AbstractAssetFactory';
2
+ /**
3
+ * {@link AssetFactory} implementation that loads plain-text files (TXT, CSV,
4
+ * GLSL shaders, HTML fragments, and any other UTF-8 text) and exposes them as
5
+ * JavaScript strings.
6
+ */
2
7
  export declare class TextFactory extends AbstractAssetFactory<string> {
3
8
  readonly storageName = "text";
9
+ /**
10
+ * Reads the response body as a UTF-8 decoded string.
11
+ */
4
12
  process(response: Response): Promise<string>;
13
+ /**
14
+ * Returns the decoded string unchanged.
15
+ */
5
16
  create(source: string): Promise<string>;
6
17
  }
@@ -1,10 +1,21 @@
1
1
  import { AbstractAssetFactory } from '../AbstractAssetFactory.js';
2
2
 
3
+ /**
4
+ * {@link AssetFactory} implementation that loads plain-text files (TXT, CSV,
5
+ * GLSL shaders, HTML fragments, and any other UTF-8 text) and exposes them as
6
+ * JavaScript strings.
7
+ */
3
8
  class TextFactory extends AbstractAssetFactory {
4
9
  storageName = 'text';
10
+ /**
11
+ * Reads the response body as a UTF-8 decoded string.
12
+ */
5
13
  async process(response) {
6
14
  return await response.text();
7
15
  }
16
+ /**
17
+ * Returns the decoded string unchanged.
18
+ */
8
19
  async create(source) {
9
20
  return source;
10
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextFactory.js","sources":["../../../../../src/resources/factories/TextFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEM,MAAO,WAAY,SAAQ,oBAA4B,CAAA;IAEzC,WAAW,GAAG,MAAM;IAE7B,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE;IAChC;IAEO,MAAM,MAAM,CAAC,MAAc,EAAA;AAC9B,QAAA,OAAO,MAAM;IACjB;AACH;;;;"}
1
+ {"version":3,"file":"TextFactory.js","sources":["../../../../../src/resources/factories/TextFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;AAIG;AACG,MAAO,WAAY,SAAQ,oBAA4B,CAAA;IAEzC,WAAW,GAAG,MAAM;AAEpC;;AAEG;IACI,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE;IAChC;AAEA;;AAEG;IACI,MAAM,MAAM,CAAC,MAAc,EAAA;AAC9B,QAAA,OAAO,MAAM;IACjB;AACH;;;;"}
@@ -1,13 +1,38 @@
1
1
  import { Texture } from '@/rendering/texture/Texture';
2
2
  import type { SamplerOptions } from '@/rendering/texture/Sampler';
3
3
  import { AbstractAssetFactory } from '@/resources/AbstractAssetFactory';
4
- interface TextureFactoryOptions {
4
+ /** Construction options for {@link TextureFactory.create}. */
5
+ export interface TextureFactoryOptions {
6
+ /**
7
+ * MIME type for the intermediate blob. Inferred from magic bytes when
8
+ * omitted.
9
+ */
5
10
  mimeType?: string;
11
+ /** Sampler parameters (wrap mode, filter, etc.) forwarded to the {@link Texture} constructor. */
6
12
  samplerOptions?: SamplerOptions;
7
13
  }
14
+ /**
15
+ * {@link AssetFactory} implementation that loads PNG, JPG, WebP, AVIF, and
16
+ * other browser-supported raster image formats and produces a GPU-ready
17
+ * {@link Texture} instance.
18
+ *
19
+ * MIME type detection is performed automatically from the buffer's magic bytes;
20
+ * pass an explicit `mimeType` to override. Sampler state (wrap, filter, etc.)
21
+ * can be configured via `samplerOptions`.
22
+ */
8
23
  export declare class TextureFactory extends AbstractAssetFactory<Texture> {
9
24
  readonly storageName = "texture";
25
+ /**
26
+ * Reads the full response body as an {@link ArrayBuffer} for MIME-type
27
+ * detection and blob construction.
28
+ */
10
29
  process(response: Response): Promise<ArrayBuffer>;
30
+ /**
31
+ * Decodes image bytes into a fully loaded {@link HTMLImageElement} and
32
+ * wraps it in a {@link Texture} with the given sampler options.
33
+ *
34
+ * Creates a temporary object URL, resolves when the image's `load` event
35
+ * fires, and revokes the URL regardless of outcome.
36
+ */
11
37
  create(source: ArrayBuffer, options?: TextureFactoryOptions): Promise<Texture>;
12
38
  }
13
- export {};
@@ -2,11 +2,31 @@ import { Texture } from '../../rendering/texture/Texture.js';
2
2
  import { AbstractAssetFactory } from '../AbstractAssetFactory.js';
3
3
  import { determineMimeType } from '../utils.js';
4
4
 
5
+ /**
6
+ * {@link AssetFactory} implementation that loads PNG, JPG, WebP, AVIF, and
7
+ * other browser-supported raster image formats and produces a GPU-ready
8
+ * {@link Texture} instance.
9
+ *
10
+ * MIME type detection is performed automatically from the buffer's magic bytes;
11
+ * pass an explicit `mimeType` to override. Sampler state (wrap, filter, etc.)
12
+ * can be configured via `samplerOptions`.
13
+ */
5
14
  class TextureFactory extends AbstractAssetFactory {
6
15
  storageName = 'texture';
16
+ /**
17
+ * Reads the full response body as an {@link ArrayBuffer} for MIME-type
18
+ * detection and blob construction.
19
+ */
7
20
  async process(response) {
8
21
  return await response.arrayBuffer();
9
22
  }
23
+ /**
24
+ * Decodes image bytes into a fully loaded {@link HTMLImageElement} and
25
+ * wraps it in a {@link Texture} with the given sampler options.
26
+ *
27
+ * Creates a temporary object URL, resolves when the image's `load` event
28
+ * fires, and revokes the URL regardless of outcome.
29
+ */
10
30
  async create(source, options = {}) {
11
31
  const { mimeType, samplerOptions } = options;
12
32
  const blob = new Blob([source], { type: mimeType ?? determineMimeType(source) });
@@ -1 +1 @@
1
- {"version":3,"file":"TextureFactory.js","sources":["../../../../../src/resources/factories/TextureFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAUM,MAAO,cAAe,SAAQ,oBAA6B,CAAA;IAE7C,WAAW,GAAG,SAAS;IAEhC,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE;IACvC;AAEO,IAAA,MAAM,MAAM,CAAC,MAAmB,EAAE,UAAiC,EAAE,EAAA;AACxE,QAAA,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;QAChF,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QAE5C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACnC,YAAA,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE;YACzB,MAAM,QAAQ,GAAG,MAAW;AACxB,gBAAA,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;AACnC,YAAA,CAAC;AAED,YAAA,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAK;AAChC,gBAAA,QAAQ,EAAE;gBACV,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AAC/C,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClB,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;AACjC,gBAAA,QAAQ,EAAE;AACV,gBAAA,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAChD,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClB,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;AACjC,gBAAA,QAAQ,EAAE;AACV,gBAAA,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAChD,YAAA,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAElB,YAAA,KAAK,CAAC,GAAG,GAAG,SAAS;AACzB,QAAA,CAAC,CAAC;IACN;AACH;;;;"}
1
+ {"version":3,"file":"TextureFactory.js","sources":["../../../../../src/resources/factories/TextureFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAgBA;;;;;;;;AAQG;AACG,MAAO,cAAe,SAAQ,oBAA6B,CAAA;IAE7C,WAAW,GAAG,SAAS;AAEvC;;;AAGG;IACI,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE;IACvC;AAEA;;;;;;AAMG;AACI,IAAA,MAAM,MAAM,CAAC,MAAmB,EAAE,UA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
  import type { PlaybackOptions, StreamingLoadEvent } from '@/core/types';
4
4
  import { Video } from '@/rendering/video/Video';
5
5
  interface VideoFactoryOptions {
6
+ /**
7
+ * MIME type for the video blob. Inferred from magic bytes when omitted.
8
+ */
6
9
  mimeType?: string;
10
+ /**
11
+ * The `HTMLVideoElement` event that signals the asset is ready for
12
+ * playback. Defaults to `'canplaythrough'`. Use `'loadedmetadata'` for
13
+ * faster (dimensions-only) readiness.
14
+ */
7
15
  loadEvent?: StreamingLoadEvent;
16
+ /** Initial playback settings forwarded to the {@link Video} instance. */
8
17
  playbackOptions?: Partial<PlaybackOptions>;
18
+ /** Sampler parameters forwarded to the {@link Video} instance's texture. */
9
19
  samplerOptions?: Partial<SamplerOptions>;
10
20
  }
21
+ /**
22
+ * {@link AssetFactory} implementation that loads video files (MP4, WebM, OGG,
23
+ * and other browser-supported container formats) and produces a {@link Video}
24
+ * instance suitable for use as a dynamic texture source in the rendering
25
+ * pipeline.
26
+ *
27
+ * Video data is buffered via a `<video>` element rather than decoded up-front.
28
+ * The `'stalled'` event is intentionally not treated as an error because it
29
+ * fires transiently during normal buffering on slow connections. All `<video>`
30
+ * elements are paused and detached when {@link VideoFactory.destroy} is called.
31
+ */
11
32
  export declare class VideoFactory extends AbstractAssetFactory<Video> {
12
33
  readonly storageName = "video";
13
34
  private readonly _videoElements;
35
+ /**
36
+ * Reads the full response body as an {@link ArrayBuffer} for blob
37
+ * construction.
38
+ */
14
39
  process(response: Response): Promise<ArrayBuffer>;
40
+ /**
41
+ * Wraps video bytes in a `<video>` element and resolves with a
42
+ * {@link Video} instance once the configured `loadEvent` fires.
43
+ *
44
+ * Rejects if the element emits `error`, `abort`, or `emptied` before the
45
+ * load event is received.
46
+ */
15
47
  create(source: ArrayBuffer, options?: VideoFactoryOptions): Promise<Video>;
48
+ /**
49
+ * Pauses and resets all `<video>` elements created by this factory to
50
+ * release media resources, then delegates to the base
51
+ * {@link AbstractAssetFactory.destroy} to revoke any object URLs.
52
+ */
16
53
  destroy(): void;
17
54
  }
18
55
  export {};
@@ -3,28 +3,71 @@ import { determineMimeType } from '../utils.js';
3
3
  import { Video } from '../../rendering/video/Video.js';
4
4
 
5
5
  const onceListenerOption = { once: true };
6
+ /**
7
+ * {@link AssetFactory} implementation that loads video files (MP4, WebM, OGG,
8
+ * and other browser-supported container formats) and produces a {@link Video}
9
+ * instance suitable for use as a dynamic texture source in the rendering
10
+ * pipeline.
11
+ *
12
+ * Video data is buffered via a `<video>` element rather than decoded up-front.
13
+ * The `'stalled'` event is intentionally not treated as an error because it
14
+ * fires transiently during normal buffering on slow connections. All `<video>`
15
+ * elements are paused and detached when {@link VideoFactory.destroy} is called.
16
+ */
6
17
  class VideoFactory extends AbstractAssetFactory {
7
18
  storageName = 'video';
8
19
  _videoElements = [];
20
+ /**
21
+ * Reads the full response body as an {@link ArrayBuffer} for blob
22
+ * construction.
23
+ */
9
24
  async process(response) {
10
25
  return await response.arrayBuffer();
11
26
  }
27
+ /**
28
+ * Wraps video bytes in a `<video>` element and resolves with a
29
+ * {@link Video} instance once the configured `loadEvent` fires.
30
+ *
31
+ * Rejects if the element emits `error`, `abort`, or `emptied` before the
32
+ * load event is received.
33
+ */
12
34
  async create(source, options = {}) {
13
35
  const { mimeType, loadEvent, playbackOptions, samplerOptions } = options;
14
36
  const blob = new Blob([source], { type: mimeType ?? determineMimeType(source) });
37
+ const objectUrl = this.createObjectUrl(blob);
15
38
  return new Promise((resolve, reject) => {
16
39
  const video = document.createElement('video');
17
40
  this._videoElements.push(video);
18
- video.addEventListener('error', () => reject(Error('Video loading error.')), onceListenerOption);
19
- video.addEventListener('abort', () => reject(Error('Video loading error: cancelled.')), onceListenerOption);
20
- video.addEventListener('emptied', () => reject(Error('Video loading error: emptied.')), onceListenerOption);
41
+ const finalize = () => {
42
+ this.revokeObjectUrl(objectUrl);
43
+ };
44
+ video.addEventListener('error', () => {
45
+ finalize();
46
+ reject(Error('Video loading error.'));
47
+ }, onceListenerOption);
48
+ video.addEventListener('abort', () => {
49
+ finalize();
50
+ reject(Error('Video loading error: cancelled.'));
51
+ }, onceListenerOption);
52
+ video.addEventListener('emptied', () => {
53
+ finalize();
54
+ reject(Error('Video loading error: emptied.'));
55
+ }, onceListenerOption);
21
56
  // 'stalled' is intentionally omitted: it fires transiently during normal buffering
22
57
  // and would cause spurious rejections for large files on slow connections.
23
- video.addEventListener(loadEvent ?? 'canplaythrough', () => resolve(new Video(video, playbackOptions, samplerOptions)), onceListenerOption);
58
+ video.addEventListener(loadEvent ?? 'canplaythrough', () => {
59
+ finalize();
60
+ resolve(new Video(video, playbackOptions, samplerOptions));
61
+ }, onceListenerOption);
24
62
  video.preload = 'auto';
25
- video.src = this.createObjectUrl(blob);
63
+ video.src = objectUrl;
26
64
  });
27
65
  }
66
+ /**
67
+ * Pauses and resets all `<video>` elements created by this factory to
68
+ * release media resources, then delegates to the base
69
+ * {@link AbstractAssetFactory.destroy} to revoke any object URLs.
70
+ */
28
71
  destroy() {
29
72
  for (const video of this._videoElements) {
30
73
  video.pause();
@@ -1 +1 @@
1
- {"version":3,"file":"VideoFactory.js","sources":["../../../../../src/resources/factories/VideoFactory.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAMA,MAAM,kBAAkB,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE;AASnC,MAAO,YAAa,SAAQ,oBAA2B,CAAA;IAEzC,WAAW,GAAG,OAAO;IAEpB,cAAc,GAA4B,EAAE;IAEtD,MAAM,OAAO,CAAC,QAAkB,EAAA;AACnC,QAAA,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE;IACvC;AAEO,IAAA,MAAM,MAAM,CAAC,MAAmB,EAAE,UAA+B,EAAE,EAAA;QACtE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,OAAO;QACxE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,IAAI,iBAAi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