@aura3d/engine 3.0.0 → 4.0.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 (4692) hide show
  1. package/README.md +153 -25
  2. package/dist/animation/AnimationController.d.ts +8 -0
  3. package/dist/animation/AnimationController.d.ts.map +1 -1
  4. package/dist/animation/AnimationController.js +93 -0
  5. package/dist/animation/AnimationController.js.map +1 -1
  6. package/dist/animation/AnimationMixer.d.ts +4 -1
  7. package/dist/animation/AnimationMixer.d.ts.map +1 -1
  8. package/dist/animation/AnimationMixer.js +47 -29
  9. package/dist/animation/AnimationMixer.js.map +1 -1
  10. package/dist/animation/FootIk.d.ts +50 -0
  11. package/dist/animation/FootIk.d.ts.map +1 -1
  12. package/dist/animation/FootIk.js +224 -8
  13. package/dist/animation/FootIk.js.map +1 -1
  14. package/dist/animation/HumanoidRetargeting.d.ts +6 -2
  15. package/dist/animation/HumanoidRetargeting.d.ts.map +1 -1
  16. package/dist/animation/HumanoidRetargeting.js +18 -8
  17. package/dist/animation/HumanoidRetargeting.js.map +1 -1
  18. package/dist/animation/IK.d.ts +26 -0
  19. package/dist/animation/IK.d.ts.map +1 -1
  20. package/dist/animation/IK.js +515 -0
  21. package/dist/animation/IK.js.map +1 -1
  22. package/dist/animation/Keyframe.d.ts.map +1 -1
  23. package/dist/animation/Keyframe.js +13 -12
  24. package/dist/animation/Keyframe.js.map +1 -1
  25. package/dist/animation/LocomotionEvidence.d.ts +34 -0
  26. package/dist/animation/LocomotionEvidence.d.ts.map +1 -0
  27. package/dist/animation/LocomotionEvidence.js +48 -0
  28. package/dist/animation/LocomotionEvidence.js.map +1 -0
  29. package/dist/animation/RootMotion.d.ts +13 -4
  30. package/dist/animation/RootMotion.d.ts.map +1 -1
  31. package/dist/animation/RootMotion.js +21 -1
  32. package/dist/animation/RootMotion.js.map +1 -1
  33. package/dist/animation/SpringBones.d.ts +80 -0
  34. package/dist/animation/SpringBones.d.ts.map +1 -1
  35. package/dist/animation/SpringBones.js +593 -49
  36. package/dist/animation/SpringBones.js.map +1 -1
  37. package/dist/animation/browser-index.d.ts +1 -1
  38. package/dist/animation/browser-index.d.ts.map +1 -1
  39. package/dist/animation/browser-index.js +1 -1
  40. package/dist/animation/browser-index.js.map +1 -1
  41. package/dist/animation/contracts/index.d.ts +2 -0
  42. package/dist/animation/contracts/index.d.ts.map +1 -0
  43. package/dist/animation/contracts/index.js +7 -0
  44. package/dist/animation/contracts/index.js.map +1 -0
  45. package/dist/animation/contracts/pose.d.ts +25 -0
  46. package/dist/animation/contracts/pose.d.ts.map +1 -0
  47. package/dist/animation/contracts/pose.js +41 -0
  48. package/dist/animation/contracts/pose.js.map +1 -0
  49. package/dist/animation/experimental/CrowdAnimation.d.ts +13 -0
  50. package/dist/animation/experimental/CrowdAnimation.d.ts.map +1 -0
  51. package/dist/animation/experimental/CrowdAnimation.js +14 -0
  52. package/dist/animation/experimental/CrowdAnimation.js.map +1 -0
  53. package/dist/animation/index.d.ts +2 -1
  54. package/dist/animation/index.d.ts.map +1 -1
  55. package/dist/animation/index.js +2 -1
  56. package/dist/animation/index.js.map +1 -1
  57. package/dist/animation/lanes/index.d.ts +17 -0
  58. package/dist/animation/lanes/index.d.ts.map +1 -0
  59. package/dist/animation/lanes/index.js +17 -0
  60. package/dist/animation/lanes/index.js.map +1 -0
  61. package/dist/animation/lanes/prd01.d.ts +6 -0
  62. package/dist/animation/lanes/prd01.d.ts.map +1 -0
  63. package/dist/animation/lanes/prd01.js +6 -0
  64. package/dist/animation/lanes/prd01.js.map +1 -0
  65. package/dist/animation/lanes/prd02.d.ts +6 -0
  66. package/dist/animation/lanes/prd02.d.ts.map +1 -0
  67. package/dist/animation/lanes/prd02.js +6 -0
  68. package/dist/animation/lanes/prd02.js.map +1 -0
  69. package/dist/animation/lanes/prd03.d.ts +6 -0
  70. package/dist/animation/lanes/prd03.d.ts.map +1 -0
  71. package/dist/animation/lanes/prd03.js +6 -0
  72. package/dist/animation/lanes/prd03.js.map +1 -0
  73. package/dist/animation/lanes/prd04.d.ts +6 -0
  74. package/dist/animation/lanes/prd04.d.ts.map +1 -0
  75. package/dist/animation/lanes/prd04.js +6 -0
  76. package/dist/animation/lanes/prd04.js.map +1 -0
  77. package/dist/animation/lanes/prd05.d.ts +6 -0
  78. package/dist/animation/lanes/prd05.d.ts.map +1 -0
  79. package/dist/animation/lanes/prd05.js +6 -0
  80. package/dist/animation/lanes/prd05.js.map +1 -0
  81. package/dist/animation/lanes/prd06.d.ts +37 -0
  82. package/dist/animation/lanes/prd06.d.ts.map +1 -0
  83. package/dist/animation/lanes/prd06.js +26 -0
  84. package/dist/animation/lanes/prd06.js.map +1 -0
  85. package/dist/animation/lanes/prd07.d.ts +6 -0
  86. package/dist/animation/lanes/prd07.d.ts.map +1 -0
  87. package/dist/animation/lanes/prd07.js +6 -0
  88. package/dist/animation/lanes/prd07.js.map +1 -0
  89. package/dist/animation/lanes/prd08.d.ts +6 -0
  90. package/dist/animation/lanes/prd08.d.ts.map +1 -0
  91. package/dist/animation/lanes/prd08.js +6 -0
  92. package/dist/animation/lanes/prd08.js.map +1 -0
  93. package/dist/animation/lanes/prd09.d.ts +6 -0
  94. package/dist/animation/lanes/prd09.d.ts.map +1 -0
  95. package/dist/animation/lanes/prd09.js +6 -0
  96. package/dist/animation/lanes/prd09.js.map +1 -0
  97. package/dist/animation/lanes/prd10.d.ts +6 -0
  98. package/dist/animation/lanes/prd10.d.ts.map +1 -0
  99. package/dist/animation/lanes/prd10.js +6 -0
  100. package/dist/animation/lanes/prd10.js.map +1 -0
  101. package/dist/animation/lanes/prd11.d.ts +6 -0
  102. package/dist/animation/lanes/prd11.d.ts.map +1 -0
  103. package/dist/animation/lanes/prd11.js +6 -0
  104. package/dist/animation/lanes/prd11.js.map +1 -0
  105. package/dist/animation/lanes/prd12.d.ts +6 -0
  106. package/dist/animation/lanes/prd12.d.ts.map +1 -0
  107. package/dist/animation/lanes/prd12.js +6 -0
  108. package/dist/animation/lanes/prd12.js.map +1 -0
  109. package/dist/animation/lanes/prd13.d.ts +6 -0
  110. package/dist/animation/lanes/prd13.d.ts.map +1 -0
  111. package/dist/animation/lanes/prd13.js +6 -0
  112. package/dist/animation/lanes/prd13.js.map +1 -0
  113. package/dist/animation/lanes/prd14.d.ts +6 -0
  114. package/dist/animation/lanes/prd14.d.ts.map +1 -0
  115. package/dist/animation/lanes/prd14.js +6 -0
  116. package/dist/animation/lanes/prd14.js.map +1 -0
  117. package/dist/animation/lanes/prd15.d.ts +6 -0
  118. package/dist/animation/lanes/prd15.d.ts.map +1 -0
  119. package/dist/animation/lanes/prd15.js +6 -0
  120. package/dist/animation/lanes/prd15.js.map +1 -0
  121. package/dist/animation/pose/BoneMask.d.ts +39 -0
  122. package/dist/animation/pose/BoneMask.d.ts.map +1 -0
  123. package/dist/animation/pose/BoneMask.js +160 -0
  124. package/dist/animation/pose/BoneMask.js.map +1 -0
  125. package/dist/animation/pose/CcdIkConstraint.d.ts +38 -0
  126. package/dist/animation/pose/CcdIkConstraint.d.ts.map +1 -0
  127. package/dist/animation/pose/CcdIkConstraint.js +198 -0
  128. package/dist/animation/pose/CcdIkConstraint.js.map +1 -0
  129. package/dist/animation/pose/CompiledClip.d.ts +48 -0
  130. package/dist/animation/pose/CompiledClip.d.ts.map +1 -0
  131. package/dist/animation/pose/CompiledClip.js +209 -0
  132. package/dist/animation/pose/CompiledClip.js.map +1 -0
  133. package/dist/animation/pose/LookAtConstraint.d.ts +48 -0
  134. package/dist/animation/pose/LookAtConstraint.d.ts.map +1 -0
  135. package/dist/animation/pose/LookAtConstraint.js +251 -0
  136. package/dist/animation/pose/LookAtConstraint.js.map +1 -0
  137. package/dist/animation/pose/MotionMetrics.d.ts +136 -0
  138. package/dist/animation/pose/MotionMetrics.d.ts.map +1 -0
  139. package/dist/animation/pose/MotionMetrics.js +253 -0
  140. package/dist/animation/pose/MotionMetrics.js.map +1 -0
  141. package/dist/animation/pose/PoseBuffer.d.ts +23 -0
  142. package/dist/animation/pose/PoseBuffer.d.ts.map +1 -0
  143. package/dist/animation/pose/PoseBuffer.js +48 -0
  144. package/dist/animation/pose/PoseBuffer.js.map +1 -0
  145. package/dist/animation/pose/PoseInertializer.d.ts +38 -0
  146. package/dist/animation/pose/PoseInertializer.d.ts.map +1 -0
  147. package/dist/animation/pose/PoseInertializer.js +208 -0
  148. package/dist/animation/pose/PoseInertializer.js.map +1 -0
  149. package/dist/animation/pose/PoseMixer.d.ts +256 -0
  150. package/dist/animation/pose/PoseMixer.d.ts.map +1 -0
  151. package/dist/animation/pose/PoseMixer.js +848 -0
  152. package/dist/animation/pose/PoseMixer.js.map +1 -0
  153. package/dist/animation/pose/Retarget.d.ts +77 -0
  154. package/dist/animation/pose/Retarget.d.ts.map +1 -0
  155. package/dist/animation/pose/Retarget.js +378 -0
  156. package/dist/animation/pose/Retarget.js.map +1 -0
  157. package/dist/animation/pose/RetargetCache.d.ts +21 -0
  158. package/dist/animation/pose/RetargetCache.d.ts.map +1 -0
  159. package/dist/animation/pose/RetargetCache.js +102 -0
  160. package/dist/animation/pose/RetargetCache.js.map +1 -0
  161. package/dist/animation/pose/RetargetWorker.d.ts +21 -0
  162. package/dist/animation/pose/RetargetWorker.d.ts.map +1 -0
  163. package/dist/animation/pose/RetargetWorker.js +56 -0
  164. package/dist/animation/pose/RetargetWorker.js.map +1 -0
  165. package/dist/animation/pose/SkeletonBinding.d.ts +55 -0
  166. package/dist/animation/pose/SkeletonBinding.d.ts.map +1 -0
  167. package/dist/animation/pose/SkeletonBinding.js +62 -0
  168. package/dist/animation/pose/SkeletonBinding.js.map +1 -0
  169. package/dist/animation/pose/blendKernels.d.ts +32 -0
  170. package/dist/animation/pose/blendKernels.d.ts.map +1 -0
  171. package/dist/animation/pose/blendKernels.js +101 -0
  172. package/dist/animation/pose/blendKernels.js.map +1 -0
  173. package/dist/animation/pose/makeClipAdditive.d.ts +22 -0
  174. package/dist/animation/pose/makeClipAdditive.d.ts.map +1 -0
  175. package/dist/animation/pose/makeClipAdditive.js +101 -0
  176. package/dist/animation/pose/makeClipAdditive.js.map +1 -0
  177. package/dist/animation/pose/poseMixerFlags.d.ts +18 -0
  178. package/dist/animation/pose/poseMixerFlags.d.ts.map +1 -0
  179. package/dist/animation/pose/poseMixerFlags.js +30 -0
  180. package/dist/animation/pose/poseMixerFlags.js.map +1 -0
  181. package/dist/animation/pose/quatFlat.d.ts +16 -0
  182. package/dist/animation/pose/quatFlat.d.ts.map +1 -0
  183. package/dist/animation/pose/quatFlat.js +88 -0
  184. package/dist/animation/pose/quatFlat.js.map +1 -0
  185. package/dist/animation/pose/retarget.worker.d.ts +25 -0
  186. package/dist/animation/pose/retarget.worker.d.ts.map +1 -0
  187. package/dist/animation/pose/retarget.worker.js +22 -0
  188. package/dist/animation/pose/retarget.worker.js.map +1 -0
  189. package/dist/assets/AdvancedAssetCorpus.d.ts.map +1 -1
  190. package/dist/assets/AdvancedAssetCorpus.js +7 -12
  191. package/dist/assets/AdvancedAssetCorpus.js.map +1 -1
  192. package/dist/assets/AssetDecoderRegistry.d.ts +56 -0
  193. package/dist/assets/AssetDecoderRegistry.d.ts.map +1 -0
  194. package/dist/assets/AssetDecoderRegistry.js +225 -0
  195. package/dist/assets/AssetDecoderRegistry.js.map +1 -0
  196. package/dist/assets/GLTFAnimationRuntime.d.ts +300 -6
  197. package/dist/assets/GLTFAnimationRuntime.d.ts.map +1 -1
  198. package/dist/assets/GLTFAnimationRuntime.js +981 -60
  199. package/dist/assets/GLTFAnimationRuntime.js.map +1 -1
  200. package/dist/assets/GLTFAssetParseCache.d.ts +24 -0
  201. package/dist/assets/GLTFAssetParseCache.d.ts.map +1 -0
  202. package/dist/assets/GLTFAssetParseCache.js +100 -0
  203. package/dist/assets/GLTFAssetParseCache.js.map +1 -0
  204. package/dist/assets/GLTFCompressionDecoders.d.ts +1 -0
  205. package/dist/assets/GLTFCompressionDecoders.d.ts.map +1 -1
  206. package/dist/assets/GLTFCompressionDecoders.js +20 -5
  207. package/dist/assets/GLTFCompressionDecoders.js.map +1 -1
  208. package/dist/assets/GLTFExtensionSupport.js +3 -3
  209. package/dist/assets/GLTFExtensionSupport.js.map +1 -1
  210. package/dist/assets/GLTFLoader.d.ts +28 -1
  211. package/dist/assets/GLTFLoader.d.ts.map +1 -1
  212. package/dist/assets/GLTFLoader.js +197 -30
  213. package/dist/assets/GLTFLoader.js.map +1 -1
  214. package/dist/assets/GLTFRenderResources.d.ts +77 -2
  215. package/dist/assets/GLTFRenderResources.d.ts.map +1 -1
  216. package/dist/assets/GLTFRenderResources.js +310 -153
  217. package/dist/assets/GLTFRenderResources.js.map +1 -1
  218. package/dist/assets/KTX2BasisTextureTranscoder.d.ts +70 -12
  219. package/dist/assets/KTX2BasisTextureTranscoder.d.ts.map +1 -1
  220. package/dist/assets/KTX2BasisTextureTranscoder.js +225 -184
  221. package/dist/assets/KTX2BasisTextureTranscoder.js.map +1 -1
  222. package/dist/assets/KTX2TargetSelection.d.ts +25 -0
  223. package/dist/assets/KTX2TargetSelection.d.ts.map +1 -0
  224. package/dist/assets/KTX2TargetSelection.js +36 -0
  225. package/dist/assets/KTX2TargetSelection.js.map +1 -0
  226. package/dist/assets/KTX2TranscodeDriver.d.ts +70 -0
  227. package/dist/assets/KTX2TranscodeDriver.d.ts.map +1 -0
  228. package/dist/assets/KTX2TranscodeDriver.js +104 -0
  229. package/dist/assets/KTX2TranscodeDriver.js.map +1 -0
  230. package/dist/assets/KTX2TranscodeWorker.d.ts +30 -0
  231. package/dist/assets/KTX2TranscodeWorker.d.ts.map +1 -0
  232. package/dist/assets/KTX2TranscodeWorker.js +230 -0
  233. package/dist/assets/KTX2TranscodeWorker.js.map +1 -0
  234. package/dist/assets/MikkTSpaceTangents.d.ts +43 -0
  235. package/dist/assets/MikkTSpaceTangents.d.ts.map +1 -0
  236. package/dist/assets/MikkTSpaceTangents.js +149 -0
  237. package/dist/assets/MikkTSpaceTangents.js.map +1 -0
  238. package/dist/assets/asset-corpus/ProductionAssetCorpus.d.ts.map +1 -1
  239. package/dist/assets/asset-corpus/ProductionAssetCorpus.js +7 -13
  240. package/dist/assets/asset-corpus/ProductionAssetCorpus.js.map +1 -1
  241. package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.d.ts +43 -0
  242. package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.d.ts.map +1 -1
  243. package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.js +146 -22
  244. package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.js.map +1 -1
  245. package/dist/assets/assetPhaseMarks.d.ts +14 -0
  246. package/dist/assets/assetPhaseMarks.d.ts.map +1 -0
  247. package/dist/assets/assetPhaseMarks.js +23 -0
  248. package/dist/assets/assetPhaseMarks.js.map +1 -0
  249. package/dist/assets/browser-index.d.ts +5 -1
  250. package/dist/assets/browser-index.d.ts.map +1 -1
  251. package/dist/assets/browser-index.js +3 -1
  252. package/dist/assets/browser-index.js.map +1 -1
  253. package/dist/assets/contracts/decoders.d.ts +15 -0
  254. package/dist/assets/contracts/decoders.d.ts.map +1 -0
  255. package/dist/assets/contracts/decoders.js +8 -0
  256. package/dist/assets/contracts/decoders.js.map +1 -0
  257. package/dist/assets/decoderLoad.d.ts +28 -0
  258. package/dist/assets/decoderLoad.d.ts.map +1 -0
  259. package/dist/assets/decoderLoad.js +49 -0
  260. package/dist/assets/decoderLoad.js.map +1 -0
  261. package/dist/assets/gltf/ImageDecode.d.ts +18 -0
  262. package/dist/assets/gltf/ImageDecode.d.ts.map +1 -0
  263. package/dist/assets/gltf/ImageDecode.js +140 -0
  264. package/dist/assets/gltf/ImageDecode.js.map +1 -0
  265. package/dist/assets/gltf-runtime.d.ts +1 -1
  266. package/dist/assets/gltf-runtime.d.ts.map +1 -1
  267. package/dist/assets/gltf-runtime.js.map +1 -1
  268. package/dist/assets/index.d.ts +5 -1
  269. package/dist/assets/index.d.ts.map +1 -1
  270. package/dist/assets/index.js +3 -1
  271. package/dist/assets/index.js.map +1 -1
  272. package/dist/assets/lanes/index.d.ts +17 -0
  273. package/dist/assets/lanes/index.d.ts.map +1 -0
  274. package/dist/assets/lanes/index.js +17 -0
  275. package/dist/assets/lanes/index.js.map +1 -0
  276. package/dist/assets/lanes/prd01.d.ts +6 -0
  277. package/dist/assets/lanes/prd01.d.ts.map +1 -0
  278. package/dist/assets/lanes/prd01.js +6 -0
  279. package/dist/assets/lanes/prd01.js.map +1 -0
  280. package/dist/assets/lanes/prd02.d.ts +6 -0
  281. package/dist/assets/lanes/prd02.d.ts.map +1 -0
  282. package/dist/assets/lanes/prd02.js +6 -0
  283. package/dist/assets/lanes/prd02.js.map +1 -0
  284. package/dist/assets/lanes/prd03.d.ts +6 -0
  285. package/dist/assets/lanes/prd03.d.ts.map +1 -0
  286. package/dist/assets/lanes/prd03.js +6 -0
  287. package/dist/assets/lanes/prd03.js.map +1 -0
  288. package/dist/assets/lanes/prd04.d.ts +6 -0
  289. package/dist/assets/lanes/prd04.d.ts.map +1 -0
  290. package/dist/assets/lanes/prd04.js +6 -0
  291. package/dist/assets/lanes/prd04.js.map +1 -0
  292. package/dist/assets/lanes/prd05.d.ts +14 -0
  293. package/dist/assets/lanes/prd05.d.ts.map +1 -0
  294. package/dist/assets/lanes/prd05.js +14 -0
  295. package/dist/assets/lanes/prd05.js.map +1 -0
  296. package/dist/assets/lanes/prd06.d.ts +6 -0
  297. package/dist/assets/lanes/prd06.d.ts.map +1 -0
  298. package/dist/assets/lanes/prd06.js +6 -0
  299. package/dist/assets/lanes/prd06.js.map +1 -0
  300. package/dist/assets/lanes/prd07.d.ts +6 -0
  301. package/dist/assets/lanes/prd07.d.ts.map +1 -0
  302. package/dist/assets/lanes/prd07.js +6 -0
  303. package/dist/assets/lanes/prd07.js.map +1 -0
  304. package/dist/assets/lanes/prd08.d.ts +6 -0
  305. package/dist/assets/lanes/prd08.d.ts.map +1 -0
  306. package/dist/assets/lanes/prd08.js +6 -0
  307. package/dist/assets/lanes/prd08.js.map +1 -0
  308. package/dist/assets/lanes/prd09.d.ts +6 -0
  309. package/dist/assets/lanes/prd09.d.ts.map +1 -0
  310. package/dist/assets/lanes/prd09.js +6 -0
  311. package/dist/assets/lanes/prd09.js.map +1 -0
  312. package/dist/assets/lanes/prd10.d.ts +6 -0
  313. package/dist/assets/lanes/prd10.d.ts.map +1 -0
  314. package/dist/assets/lanes/prd10.js +6 -0
  315. package/dist/assets/lanes/prd10.js.map +1 -0
  316. package/dist/assets/lanes/prd11.d.ts +6 -0
  317. package/dist/assets/lanes/prd11.d.ts.map +1 -0
  318. package/dist/assets/lanes/prd11.js +6 -0
  319. package/dist/assets/lanes/prd11.js.map +1 -0
  320. package/dist/assets/lanes/prd12.d.ts +6 -0
  321. package/dist/assets/lanes/prd12.d.ts.map +1 -0
  322. package/dist/assets/lanes/prd12.js +6 -0
  323. package/dist/assets/lanes/prd12.js.map +1 -0
  324. package/dist/assets/lanes/prd13.d.ts +6 -0
  325. package/dist/assets/lanes/prd13.d.ts.map +1 -0
  326. package/dist/assets/lanes/prd13.js +6 -0
  327. package/dist/assets/lanes/prd13.js.map +1 -0
  328. package/dist/assets/lanes/prd14.d.ts +6 -0
  329. package/dist/assets/lanes/prd14.d.ts.map +1 -0
  330. package/dist/assets/lanes/prd14.js +6 -0
  331. package/dist/assets/lanes/prd14.js.map +1 -0
  332. package/dist/assets/lanes/prd15.d.ts +6 -0
  333. package/dist/assets/lanes/prd15.d.ts.map +1 -0
  334. package/dist/assets/lanes/prd15.js +6 -0
  335. package/dist/assets/lanes/prd15.js.map +1 -0
  336. package/dist/assets/vite/auraDecoders.d.ts +31 -0
  337. package/dist/assets/vite/auraDecoders.d.ts.map +1 -0
  338. package/dist/assets/vite/auraDecoders.js +89 -0
  339. package/dist/assets/vite/auraDecoders.js.map +1 -0
  340. package/dist/audio/AudioSource.d.ts +7 -0
  341. package/dist/audio/AudioSource.d.ts.map +1 -1
  342. package/dist/audio/AudioSource.js +21 -0
  343. package/dist/audio/AudioSource.js.map +1 -1
  344. package/dist/audio/PositionalEmitter.js +1 -1
  345. package/dist/audio/PositionalEmitter.js.map +1 -1
  346. package/dist/audio/contracts/gameSound.d.ts +94 -0
  347. package/dist/audio/contracts/gameSound.d.ts.map +1 -0
  348. package/dist/audio/contracts/gameSound.js +63 -0
  349. package/dist/audio/contracts/gameSound.js.map +1 -0
  350. package/dist/audio/game-sound/EngineLoop.d.ts +44 -0
  351. package/dist/audio/game-sound/EngineLoop.d.ts.map +1 -0
  352. package/dist/audio/game-sound/EngineLoop.js +114 -0
  353. package/dist/audio/game-sound/EngineLoop.js.map +1 -0
  354. package/dist/audio/game-sound/GameSoundEngine.d.ts +129 -0
  355. package/dist/audio/game-sound/GameSoundEngine.d.ts.map +1 -0
  356. package/dist/audio/game-sound/GameSoundEngine.js +563 -0
  357. package/dist/audio/game-sound/GameSoundEngine.js.map +1 -0
  358. package/dist/audio/game-sound/LoopHandle.d.ts +30 -0
  359. package/dist/audio/game-sound/LoopHandle.d.ts.map +1 -0
  360. package/dist/audio/game-sound/LoopHandle.js +78 -0
  361. package/dist/audio/game-sound/LoopHandle.js.map +1 -0
  362. package/dist/audio/game-sound/MasterChain.d.ts +57 -0
  363. package/dist/audio/game-sound/MasterChain.d.ts.map +1 -0
  364. package/dist/audio/game-sound/MasterChain.js +144 -0
  365. package/dist/audio/game-sound/MasterChain.js.map +1 -0
  366. package/dist/audio/game-sound/MusicController.d.ts +59 -0
  367. package/dist/audio/game-sound/MusicController.d.ts.map +1 -0
  368. package/dist/audio/game-sound/MusicController.js +210 -0
  369. package/dist/audio/game-sound/MusicController.js.map +1 -0
  370. package/dist/audio/game-sound/ReverbSend.d.ts +30 -0
  371. package/dist/audio/game-sound/ReverbSend.d.ts.map +1 -0
  372. package/dist/audio/game-sound/ReverbSend.js +69 -0
  373. package/dist/audio/game-sound/ReverbSend.js.map +1 -0
  374. package/dist/audio/game-sound/SpatialVoice.d.ts +30 -0
  375. package/dist/audio/game-sound/SpatialVoice.d.ts.map +1 -0
  376. package/dist/audio/game-sound/SpatialVoice.js +115 -0
  377. package/dist/audio/game-sound/SpatialVoice.js.map +1 -0
  378. package/dist/audio/game-sound/Voice.d.ts +139 -0
  379. package/dist/audio/game-sound/Voice.d.ts.map +1 -0
  380. package/dist/audio/game-sound/Voice.js +319 -0
  381. package/dist/audio/game-sound/Voice.js.map +1 -0
  382. package/dist/audio/game-sound/formatProbe.d.ts +19 -0
  383. package/dist/audio/game-sound/formatProbe.d.ts.map +1 -0
  384. package/dist/audio/game-sound/formatProbe.js +36 -0
  385. package/dist/audio/game-sound/formatProbe.js.map +1 -0
  386. package/dist/audio/game-sound/listenerSync.d.ts +55 -0
  387. package/dist/audio/game-sound/listenerSync.d.ts.map +1 -0
  388. package/dist/audio/game-sound/listenerSync.js +37 -0
  389. package/dist/audio/game-sound/listenerSync.js.map +1 -0
  390. package/dist/audio/game-sound/loudness.d.ts +35 -0
  391. package/dist/audio/game-sound/loudness.d.ts.map +1 -0
  392. package/dist/audio/game-sound/loudness.js +135 -0
  393. package/dist/audio/game-sound/loudness.js.map +1 -0
  394. package/dist/audio/game-sound/rng.d.ts +26 -0
  395. package/dist/audio/game-sound/rng.d.ts.map +1 -0
  396. package/dist/audio/game-sound/rng.js +57 -0
  397. package/dist/audio/game-sound/rng.js.map +1 -0
  398. package/dist/audio/game-sound/types.d.ts +96 -0
  399. package/dist/audio/game-sound/types.d.ts.map +1 -0
  400. package/dist/audio/game-sound/types.js +19 -0
  401. package/dist/audio/game-sound/types.js.map +1 -0
  402. package/dist/audio/index.d.ts +16 -0
  403. package/dist/audio/index.d.ts.map +1 -1
  404. package/dist/audio/index.js +13 -0
  405. package/dist/audio/index.js.map +1 -1
  406. package/dist/aura3d-cli/admission/artDirection.d.ts +28 -0
  407. package/dist/aura3d-cli/admission/artDirection.d.ts.map +1 -0
  408. package/dist/aura3d-cli/admission/artDirection.js +47 -0
  409. package/dist/aura3d-cli/admission/artDirection.js.map +1 -0
  410. package/dist/aura3d-cli/admission/audio.d.ts +19 -0
  411. package/dist/aura3d-cli/admission/audio.d.ts.map +1 -0
  412. package/dist/aura3d-cli/admission/audio.js +31 -0
  413. package/dist/aura3d-cli/admission/audio.js.map +1 -0
  414. package/dist/aura3d-cli/admission/builder-patterns.d.ts +25 -0
  415. package/dist/aura3d-cli/admission/builder-patterns.d.ts.map +1 -0
  416. package/dist/aura3d-cli/admission/builder-patterns.js +40 -0
  417. package/dist/aura3d-cli/admission/builder-patterns.js.map +1 -0
  418. package/dist/aura3d-cli/admission/gates.d.ts +136 -0
  419. package/dist/aura3d-cli/admission/gates.d.ts.map +1 -0
  420. package/dist/aura3d-cli/admission/gates.js +335 -0
  421. package/dist/aura3d-cli/admission/gates.js.map +1 -0
  422. package/dist/aura3d-cli/admission/glb.d.ts +64 -0
  423. package/dist/aura3d-cli/admission/glb.d.ts.map +1 -0
  424. package/dist/aura3d-cli/admission/glb.js +128 -0
  425. package/dist/aura3d-cli/admission/glb.js.map +1 -0
  426. package/dist/aura3d-cli/admission/index.d.ts +8 -0
  427. package/dist/aura3d-cli/admission/index.d.ts.map +1 -0
  428. package/dist/aura3d-cli/admission/index.js +8 -0
  429. package/dist/aura3d-cli/admission/index.js.map +1 -0
  430. package/dist/aura3d-cli/admission/profiles.d.ts +52 -0
  431. package/dist/aura3d-cli/admission/profiles.d.ts.map +1 -0
  432. package/dist/aura3d-cli/admission/profiles.js +91 -0
  433. package/dist/aura3d-cli/admission/profiles.js.map +1 -0
  434. package/dist/aura3d-cli/admission/qrFlags.d.ts +12 -0
  435. package/dist/aura3d-cli/admission/qrFlags.d.ts.map +1 -0
  436. package/dist/aura3d-cli/admission/qrFlags.js +48 -0
  437. package/dist/aura3d-cli/admission/qrFlags.js.map +1 -0
  438. package/dist/aura3d-cli/admission/routeGates.d.ts +36 -0
  439. package/dist/aura3d-cli/admission/routeGates.d.ts.map +1 -0
  440. package/dist/aura3d-cli/admission/routeGates.js +144 -0
  441. package/dist/aura3d-cli/admission/routeGates.js.map +1 -0
  442. package/dist/aura3d-cli/admission/texel.d.ts +50 -0
  443. package/dist/aura3d-cli/admission/texel.d.ts.map +1 -0
  444. package/dist/aura3d-cli/admission/texel.js +177 -0
  445. package/dist/aura3d-cli/admission/texel.js.map +1 -0
  446. package/dist/aura3d-cli/admission/textureStats.d.ts +45 -0
  447. package/dist/aura3d-cli/admission/textureStats.d.ts.map +1 -0
  448. package/dist/aura3d-cli/admission/textureStats.js +201 -0
  449. package/dist/aura3d-cli/admission/textureStats.js.map +1 -0
  450. package/dist/aura3d-cli/animation-asset-validator.d.ts +44 -0
  451. package/dist/aura3d-cli/animation-asset-validator.d.ts.map +1 -1
  452. package/dist/aura3d-cli/animation-asset-validator.js +80 -1
  453. package/dist/aura3d-cli/animation-asset-validator.js.map +1 -1
  454. package/dist/aura3d-cli/asset-core-types.d.ts +99 -4
  455. package/dist/aura3d-cli/asset-core-types.d.ts.map +1 -1
  456. package/dist/aura3d-cli/asset-inspection-types.d.ts +8 -0
  457. package/dist/aura3d-cli/asset-inspection-types.d.ts.map +1 -1
  458. package/dist/aura3d-cli/asset-manifest.d.ts +1 -0
  459. package/dist/aura3d-cli/asset-manifest.d.ts.map +1 -1
  460. package/dist/aura3d-cli/asset-manifest.js +13 -4
  461. package/dist/aura3d-cli/asset-manifest.js.map +1 -1
  462. package/dist/aura3d-cli/asset-route-typegen.d.ts +37 -0
  463. package/dist/aura3d-cli/asset-route-typegen.d.ts.map +1 -0
  464. package/dist/aura3d-cli/asset-route-typegen.js +179 -0
  465. package/dist/aura3d-cli/asset-route-typegen.js.map +1 -0
  466. package/dist/aura3d-cli/cli-help.d.ts +1 -1
  467. package/dist/aura3d-cli/cli-help.d.ts.map +1 -1
  468. package/dist/aura3d-cli/cli-help.js +9 -4
  469. package/dist/aura3d-cli/cli-help.js.map +1 -1
  470. package/dist/aura3d-cli/cli-options.d.ts +7 -0
  471. package/dist/aura3d-cli/cli-options.d.ts.map +1 -1
  472. package/dist/aura3d-cli/cli-options.js +33 -2
  473. package/dist/aura3d-cli/cli-options.js.map +1 -1
  474. package/dist/aura3d-cli/cli.d.ts +1 -1
  475. package/dist/aura3d-cli/cli.d.ts.map +1 -1
  476. package/dist/aura3d-cli/cli.js +126 -11
  477. package/dist/aura3d-cli/cli.js.map +1 -1
  478. package/dist/aura3d-cli/codemods/engine-entry-imports.d.ts +22 -0
  479. package/dist/aura3d-cli/codemods/engine-entry-imports.d.ts.map +1 -0
  480. package/dist/aura3d-cli/codemods/engine-entry-imports.js +159 -0
  481. package/dist/aura3d-cli/codemods/engine-entry-imports.js.map +1 -0
  482. package/dist/aura3d-cli/codemods/lean-imports.d.ts +40 -0
  483. package/dist/aura3d-cli/codemods/lean-imports.d.ts.map +1 -0
  484. package/dist/aura3d-cli/codemods/lean-imports.js +175 -0
  485. package/dist/aura3d-cli/codemods/lean-imports.js.map +1 -0
  486. package/dist/aura3d-cli/codemods/renderer-imports.d.ts +36 -0
  487. package/dist/aura3d-cli/codemods/renderer-imports.d.ts.map +1 -0
  488. package/dist/aura3d-cli/codemods/renderer-imports.js +364 -0
  489. package/dist/aura3d-cli/codemods/renderer-imports.js.map +1 -0
  490. package/dist/aura3d-cli/codemods/renderer-mode.d.ts +38 -0
  491. package/dist/aura3d-cli/codemods/renderer-mode.d.ts.map +1 -0
  492. package/dist/aura3d-cli/codemods/renderer-mode.js +130 -0
  493. package/dist/aura3d-cli/codemods/renderer-mode.js.map +1 -0
  494. package/dist/aura3d-cli/commands/prd01/index.d.ts +8 -0
  495. package/dist/aura3d-cli/commands/prd01/index.d.ts.map +1 -0
  496. package/dist/aura3d-cli/commands/prd01/index.js +39 -0
  497. package/dist/aura3d-cli/commands/prd01/index.js.map +1 -0
  498. package/dist/aura3d-cli/commands/prd02/environmentsBake.d.ts +6 -0
  499. package/dist/aura3d-cli/commands/prd02/environmentsBake.d.ts.map +1 -0
  500. package/dist/aura3d-cli/commands/prd02/environmentsBake.js +174 -0
  501. package/dist/aura3d-cli/commands/prd02/environmentsBake.js.map +1 -0
  502. package/dist/aura3d-cli/commands/prd02/index.d.ts +2 -0
  503. package/dist/aura3d-cli/commands/prd02/index.d.ts.map +1 -0
  504. package/dist/aura3d-cli/commands/prd02/index.js +26 -0
  505. package/dist/aura3d-cli/commands/prd02/index.js.map +1 -0
  506. package/dist/aura3d-cli/commands/prd02/migrateLighting.d.ts +17 -0
  507. package/dist/aura3d-cli/commands/prd02/migrateLighting.d.ts.map +1 -0
  508. package/dist/aura3d-cli/commands/prd02/migrateLighting.js +86 -0
  509. package/dist/aura3d-cli/commands/prd02/migrateLighting.js.map +1 -0
  510. package/dist/aura3d-cli/commands/prd02/migrateLightingSweep.d.ts +20 -0
  511. package/dist/aura3d-cli/commands/prd02/migrateLightingSweep.d.ts.map +1 -0
  512. package/dist/aura3d-cli/commands/prd02/migrateLightingSweep.js +105 -0
  513. package/dist/aura3d-cli/commands/prd02/migrateLightingSweep.js.map +1 -0
  514. package/dist/aura3d-cli/commands/prd03/index.d.ts +7 -0
  515. package/dist/aura3d-cli/commands/prd03/index.d.ts.map +1 -0
  516. package/dist/aura3d-cli/commands/prd03/index.js +9 -0
  517. package/dist/aura3d-cli/commands/prd03/index.js.map +1 -0
  518. package/dist/aura3d-cli/commands/prd04/index.d.ts +10 -0
  519. package/dist/aura3d-cli/commands/prd04/index.d.ts.map +1 -0
  520. package/dist/aura3d-cli/commands/prd04/index.js +10 -0
  521. package/dist/aura3d-cli/commands/prd04/index.js.map +1 -0
  522. package/dist/aura3d-cli/commands/prd04/modelTintReport.d.ts +16 -0
  523. package/dist/aura3d-cli/commands/prd04/modelTintReport.d.ts.map +1 -0
  524. package/dist/aura3d-cli/commands/prd04/modelTintReport.js +114 -0
  525. package/dist/aura3d-cli/commands/prd04/modelTintReport.js.map +1 -0
  526. package/dist/aura3d-cli/commands/prd04/pinEmissiveDefaults.d.ts +3 -0
  527. package/dist/aura3d-cli/commands/prd04/pinEmissiveDefaults.d.ts.map +1 -0
  528. package/dist/aura3d-cli/commands/prd04/pinEmissiveDefaults.js +36 -0
  529. package/dist/aura3d-cli/commands/prd04/pinEmissiveDefaults.js.map +1 -0
  530. package/dist/aura3d-cli/commands/prd05/admit.d.ts +54 -0
  531. package/dist/aura3d-cli/commands/prd05/admit.d.ts.map +1 -0
  532. package/dist/aura3d-cli/commands/prd05/admit.js +153 -0
  533. package/dist/aura3d-cli/commands/prd05/admit.js.map +1 -0
  534. package/dist/aura3d-cli/commands/prd05/codemods/assetsRouteModules.d.ts +3 -0
  535. package/dist/aura3d-cli/commands/prd05/codemods/assetsRouteModules.d.ts.map +1 -0
  536. package/dist/aura3d-cli/commands/prd05/codemods/assetsRouteModules.js +92 -0
  537. package/dist/aura3d-cli/commands/prd05/codemods/assetsRouteModules.js.map +1 -0
  538. package/dist/aura3d-cli/commands/prd05/index.d.ts +9 -0
  539. package/dist/aura3d-cli/commands/prd05/index.d.ts.map +1 -0
  540. package/dist/aura3d-cli/commands/prd05/index.js +171 -0
  541. package/dist/aura3d-cli/commands/prd05/index.js.map +1 -0
  542. package/dist/aura3d-cli/commands/prd05/library.d.ts +23 -0
  543. package/dist/aura3d-cli/commands/prd05/library.d.ts.map +1 -0
  544. package/dist/aura3d-cli/commands/prd05/library.js +245 -0
  545. package/dist/aura3d-cli/commands/prd05/library.js.map +1 -0
  546. package/dist/aura3d-cli/commands/prd05/lookdev.d.ts +14 -0
  547. package/dist/aura3d-cli/commands/prd05/lookdev.d.ts.map +1 -0
  548. package/dist/aura3d-cli/commands/prd05/lookdev.js +68 -0
  549. package/dist/aura3d-cli/commands/prd05/lookdev.js.map +1 -0
  550. package/dist/aura3d-cli/commands/prd05/optimize.d.ts +16 -0
  551. package/dist/aura3d-cli/commands/prd05/optimize.d.ts.map +1 -0
  552. package/dist/aura3d-cli/commands/prd05/optimize.js +55 -0
  553. package/dist/aura3d-cli/commands/prd05/optimize.js.map +1 -0
  554. package/dist/aura3d-cli/commands/prd05/prune.d.ts +26 -0
  555. package/dist/aura3d-cli/commands/prd05/prune.d.ts.map +1 -0
  556. package/dist/aura3d-cli/commands/prd05/prune.js +104 -0
  557. package/dist/aura3d-cli/commands/prd05/prune.js.map +1 -0
  558. package/dist/aura3d-cli/commands/prd05/review.d.ts +24 -0
  559. package/dist/aura3d-cli/commands/prd05/review.d.ts.map +1 -0
  560. package/dist/aura3d-cli/commands/prd05/review.js +40 -0
  561. package/dist/aura3d-cli/commands/prd05/review.js.map +1 -0
  562. package/dist/aura3d-cli/commands/prd06/index.d.ts +6 -0
  563. package/dist/aura3d-cli/commands/prd06/index.d.ts.map +1 -0
  564. package/dist/aura3d-cli/commands/prd06/index.js +86 -0
  565. package/dist/aura3d-cli/commands/prd06/index.js.map +1 -0
  566. package/dist/aura3d-cli/commands/prd06/inspectAnimationClips.d.ts +86 -0
  567. package/dist/aura3d-cli/commands/prd06/inspectAnimationClips.d.ts.map +1 -0
  568. package/dist/aura3d-cli/commands/prd06/inspectAnimationClips.js +168 -0
  569. package/dist/aura3d-cli/commands/prd06/inspectAnimationClips.js.map +1 -0
  570. package/dist/aura3d-cli/commands/prd06/validateHero.d.ts +18 -0
  571. package/dist/aura3d-cli/commands/prd06/validateHero.d.ts.map +1 -0
  572. package/dist/aura3d-cli/commands/prd06/validateHero.js +91 -0
  573. package/dist/aura3d-cli/commands/prd06/validateHero.js.map +1 -0
  574. package/dist/aura3d-cli/commands/prd07/codemods.d.ts +28 -0
  575. package/dist/aura3d-cli/commands/prd07/codemods.d.ts.map +1 -0
  576. package/dist/aura3d-cli/commands/prd07/codemods.js +155 -0
  577. package/dist/aura3d-cli/commands/prd07/codemods.js.map +1 -0
  578. package/dist/aura3d-cli/commands/prd07/index.d.ts +2 -0
  579. package/dist/aura3d-cli/commands/prd07/index.d.ts.map +1 -0
  580. package/dist/aura3d-cli/commands/prd07/index.js +151 -0
  581. package/dist/aura3d-cli/commands/prd07/index.js.map +1 -0
  582. package/dist/aura3d-cli/commands/prd08/feelLint.d.ts +13 -0
  583. package/dist/aura3d-cli/commands/prd08/feelLint.d.ts.map +1 -0
  584. package/dist/aura3d-cli/commands/prd08/feelLint.js +32 -0
  585. package/dist/aura3d-cli/commands/prd08/feelLint.js.map +1 -0
  586. package/dist/aura3d-cli/commands/prd08/index.d.ts +2 -0
  587. package/dist/aura3d-cli/commands/prd08/index.d.ts.map +1 -0
  588. package/dist/aura3d-cli/commands/prd08/index.js +16 -0
  589. package/dist/aura3d-cli/commands/prd08/index.js.map +1 -0
  590. package/dist/aura3d-cli/commands/prd08/motionReport.d.ts +94 -0
  591. package/dist/aura3d-cli/commands/prd08/motionReport.d.ts.map +1 -0
  592. package/dist/aura3d-cli/commands/prd08/motionReport.js +197 -0
  593. package/dist/aura3d-cli/commands/prd08/motionReport.js.map +1 -0
  594. package/dist/aura3d-cli/commands/prd09/codemods/audio-wrapper.d.ts +9 -0
  595. package/dist/aura3d-cli/commands/prd09/codemods/audio-wrapper.d.ts.map +1 -0
  596. package/dist/aura3d-cli/commands/prd09/codemods/audio-wrapper.js +30 -0
  597. package/dist/aura3d-cli/commands/prd09/codemods/audio-wrapper.js.map +1 -0
  598. package/dist/aura3d-cli/commands/prd09/codemods/capture-branches.d.ts +10 -0
  599. package/dist/aura3d-cli/commands/prd09/codemods/capture-branches.d.ts.map +1 -0
  600. package/dist/aura3d-cli/commands/prd09/codemods/capture-branches.js +54 -0
  601. package/dist/aura3d-cli/commands/prd09/codemods/capture-branches.js.map +1 -0
  602. package/dist/aura3d-cli/commands/prd09/codemods/evidence-globals.d.ts +8 -0
  603. package/dist/aura3d-cli/commands/prd09/codemods/evidence-globals.d.ts.map +1 -0
  604. package/dist/aura3d-cli/commands/prd09/codemods/evidence-globals.js +19 -0
  605. package/dist/aura3d-cli/commands/prd09/codemods/evidence-globals.js.map +1 -0
  606. package/dist/aura3d-cli/commands/prd09/codemods/perf-script.d.ts +8 -0
  607. package/dist/aura3d-cli/commands/prd09/codemods/perf-script.d.ts.map +1 -0
  608. package/dist/aura3d-cli/commands/prd09/codemods/perf-script.js +24 -0
  609. package/dist/aura3d-cli/commands/prd09/codemods/perf-script.js.map +1 -0
  610. package/dist/aura3d-cli/commands/prd09/index.d.ts +8 -0
  611. package/dist/aura3d-cli/commands/prd09/index.d.ts.map +1 -0
  612. package/dist/aura3d-cli/commands/prd09/index.js +19 -0
  613. package/dist/aura3d-cli/commands/prd09/index.js.map +1 -0
  614. package/dist/aura3d-cli/commands/prd09/perf-report.d.ts +56 -0
  615. package/dist/aura3d-cli/commands/prd09/perf-report.d.ts.map +1 -0
  616. package/dist/aura3d-cli/commands/prd09/perf-report.js +118 -0
  617. package/dist/aura3d-cli/commands/prd09/perf-report.js.map +1 -0
  618. package/dist/aura3d-cli/commands/prd09/sfx-admit.d.ts +18 -0
  619. package/dist/aura3d-cli/commands/prd09/sfx-admit.d.ts.map +1 -0
  620. package/dist/aura3d-cli/commands/prd09/sfx-admit.js +120 -0
  621. package/dist/aura3d-cli/commands/prd09/sfx-admit.js.map +1 -0
  622. package/dist/aura3d-cli/commands/prd10/index.d.ts +2 -0
  623. package/dist/aura3d-cli/commands/prd10/index.d.ts.map +1 -0
  624. package/dist/aura3d-cli/commands/prd10/index.js +109 -0
  625. package/dist/aura3d-cli/commands/prd10/index.js.map +1 -0
  626. package/dist/aura3d-cli/commands/prd11/batchOptout.d.ts +35 -0
  627. package/dist/aura3d-cli/commands/prd11/batchOptout.d.ts.map +1 -0
  628. package/dist/aura3d-cli/commands/prd11/batchOptout.js +155 -0
  629. package/dist/aura3d-cli/commands/prd11/batchOptout.js.map +1 -0
  630. package/dist/aura3d-cli/commands/prd11/index.d.ts +2 -0
  631. package/dist/aura3d-cli/commands/prd11/index.d.ts.map +1 -0
  632. package/dist/aura3d-cli/commands/prd11/index.js +13 -0
  633. package/dist/aura3d-cli/commands/prd11/index.js.map +1 -0
  634. package/dist/aura3d-cli/commands/prd11/perfGate.d.ts +15 -0
  635. package/dist/aura3d-cli/commands/prd11/perfGate.d.ts.map +1 -0
  636. package/dist/aura3d-cli/commands/prd11/perfGate.js +98 -0
  637. package/dist/aura3d-cli/commands/prd11/perfGate.js.map +1 -0
  638. package/dist/aura3d-cli/commands/prd13/index.d.ts +15 -0
  639. package/dist/aura3d-cli/commands/prd13/index.d.ts.map +1 -0
  640. package/dist/aura3d-cli/commands/prd13/index.js +26 -0
  641. package/dist/aura3d-cli/commands/prd13/index.js.map +1 -0
  642. package/dist/aura3d-cli/commands/prd13/run.d.ts +10 -0
  643. package/dist/aura3d-cli/commands/prd13/run.d.ts.map +1 -0
  644. package/dist/aura3d-cli/commands/prd13/run.js +29 -0
  645. package/dist/aura3d-cli/commands/prd13/run.js.map +1 -0
  646. package/dist/aura3d-cli/commands/prd14/index.d.ts +6 -0
  647. package/dist/aura3d-cli/commands/prd14/index.d.ts.map +1 -0
  648. package/dist/aura3d-cli/commands/prd14/index.js +6 -0
  649. package/dist/aura3d-cli/commands/prd14/index.js.map +1 -0
  650. package/dist/aura3d-cli/commands/prd15/index.d.ts +8 -0
  651. package/dist/aura3d-cli/commands/prd15/index.d.ts.map +1 -0
  652. package/dist/aura3d-cli/commands/prd15/index.js +152 -0
  653. package/dist/aura3d-cli/commands/prd15/index.js.map +1 -0
  654. package/dist/aura3d-cli/commands/registry.d.ts +19 -0
  655. package/dist/aura3d-cli/commands/registry.d.ts.map +1 -0
  656. package/dist/aura3d-cli/commands/registry.js +19 -0
  657. package/dist/aura3d-cli/commands/registry.js.map +1 -0
  658. package/dist/aura3d-cli/contracts/assetManifest.d.ts +80 -0
  659. package/dist/aura3d-cli/contracts/assetManifest.d.ts.map +1 -0
  660. package/dist/aura3d-cli/contracts/assetManifest.js +9 -0
  661. package/dist/aura3d-cli/contracts/assetManifest.js.map +1 -0
  662. package/dist/aura3d-cli/contracts/commands.d.ts +53 -0
  663. package/dist/aura3d-cli/contracts/commands.d.ts.map +1 -0
  664. package/dist/aura3d-cli/contracts/commands.js +37 -0
  665. package/dist/aura3d-cli/contracts/commands.js.map +1 -0
  666. package/dist/aura3d-cli/index.d.ts +17 -1
  667. package/dist/aura3d-cli/index.d.ts.map +1 -1
  668. package/dist/aura3d-cli/index.js +271 -71
  669. package/dist/aura3d-cli/index.js.map +1 -1
  670. package/dist/aura3d-cli/library-manifest.d.ts +86 -0
  671. package/dist/aura3d-cli/library-manifest.d.ts.map +1 -0
  672. package/dist/aura3d-cli/library-manifest.js +95 -0
  673. package/dist/aura3d-cli/library-manifest.js.map +1 -0
  674. package/dist/aura3d-cli/look/capture.d.ts +51 -0
  675. package/dist/aura3d-cli/look/capture.d.ts.map +1 -0
  676. package/dist/aura3d-cli/look/capture.js +229 -0
  677. package/dist/aura3d-cli/look/capture.js.map +1 -0
  678. package/dist/aura3d-cli/look/judge.d.ts +24 -0
  679. package/dist/aura3d-cli/look/judge.d.ts.map +1 -0
  680. package/dist/aura3d-cli/look/judge.js +151 -0
  681. package/dist/aura3d-cli/look/judge.js.map +1 -0
  682. package/dist/aura3d-cli/look/lint-static.d.ts +45 -0
  683. package/dist/aura3d-cli/look/lint-static.d.ts.map +1 -0
  684. package/dist/aura3d-cli/look/lint-static.js +241 -0
  685. package/dist/aura3d-cli/look/lint-static.js.map +1 -0
  686. package/dist/aura3d-cli/look/rubric.d.ts +70 -0
  687. package/dist/aura3d-cli/look/rubric.d.ts.map +1 -0
  688. package/dist/aura3d-cli/look/rubric.js +169 -0
  689. package/dist/aura3d-cli/look/rubric.js.map +1 -0
  690. package/dist/aura3d-cli/meshy/import.d.ts +7 -1
  691. package/dist/aura3d-cli/meshy/import.d.ts.map +1 -1
  692. package/dist/aura3d-cli/meshy/import.js +80 -6
  693. package/dist/aura3d-cli/meshy/import.js.map +1 -1
  694. package/dist/aura3d-cli/migrate-three/CompatibilityWarnings.d.ts +6 -0
  695. package/dist/aura3d-cli/migrate-three/CompatibilityWarnings.d.ts.map +1 -0
  696. package/dist/aura3d-cli/migrate-three/CompatibilityWarnings.js +24 -0
  697. package/dist/aura3d-cli/migrate-three/CompatibilityWarnings.js.map +1 -0
  698. package/dist/aura3d-cli/migrate-three/ImportMap.d.ts +19 -0
  699. package/dist/aura3d-cli/migrate-three/ImportMap.d.ts.map +1 -0
  700. package/dist/aura3d-cli/migrate-three/ImportMap.js +35 -0
  701. package/dist/aura3d-cli/migrate-three/ImportMap.js.map +1 -0
  702. package/dist/aura3d-cli/migrate-three/R3fMigration.d.ts +32 -0
  703. package/dist/aura3d-cli/migrate-three/R3fMigration.d.ts.map +1 -0
  704. package/dist/aura3d-cli/migrate-three/R3fMigration.js +70 -0
  705. package/dist/aura3d-cli/migrate-three/R3fMigration.js.map +1 -0
  706. package/dist/aura3d-cli/migrate-three/ThreeToA3DAdapter.d.ts +8 -0
  707. package/dist/aura3d-cli/migrate-three/ThreeToA3DAdapter.d.ts.map +1 -0
  708. package/dist/aura3d-cli/migrate-three/ThreeToA3DAdapter.js +20 -0
  709. package/dist/aura3d-cli/migrate-three/ThreeToA3DAdapter.js.map +1 -0
  710. package/dist/aura3d-cli/migrate-three/emit.d.ts +21 -0
  711. package/dist/aura3d-cli/migrate-three/emit.d.ts.map +1 -0
  712. package/dist/aura3d-cli/migrate-three/emit.js +117 -0
  713. package/dist/aura3d-cli/migrate-three/emit.js.map +1 -0
  714. package/dist/aura3d-cli/migrate-three/mappings.d.ts +21 -0
  715. package/dist/aura3d-cli/migrate-three/mappings.d.ts.map +1 -0
  716. package/dist/aura3d-cli/migrate-three/mappings.js +42 -0
  717. package/dist/aura3d-cli/migrate-three/mappings.js.map +1 -0
  718. package/dist/aura3d-cli/migrate-three/parse.d.ts +20 -0
  719. package/dist/aura3d-cli/migrate-three/parse.d.ts.map +1 -0
  720. package/dist/aura3d-cli/migrate-three/parse.js +56 -0
  721. package/dist/aura3d-cli/migrate-three/parse.js.map +1 -0
  722. package/dist/aura3d-cli/migrate-three/report.d.ts +18 -0
  723. package/dist/aura3d-cli/migrate-three/report.d.ts.map +1 -0
  724. package/dist/aura3d-cli/migrate-three/report.js +16 -0
  725. package/dist/aura3d-cli/migrate-three/report.js.map +1 -0
  726. package/dist/aura3d-cli/pull-bridge/adapters.d.ts +1 -1
  727. package/dist/aura3d-cli/pull-bridge/adapters.d.ts.map +1 -1
  728. package/dist/aura3d-cli/pull-bridge/adapters.js +17 -4
  729. package/dist/aura3d-cli/pull-bridge/adapters.js.map +1 -1
  730. package/dist/aura3d-cli/pull-bridge/provenance.d.ts.map +1 -1
  731. package/dist/aura3d-cli/pull-bridge/provenance.js +3 -2
  732. package/dist/aura3d-cli/pull-bridge/provenance.js.map +1 -1
  733. package/dist/aura3d-cli/pull-bridge/pullable.d.ts.map +1 -1
  734. package/dist/aura3d-cli/pull-bridge/pullable.js +14 -3
  735. package/dist/aura3d-cli/pull-bridge/pullable.js.map +1 -1
  736. package/dist/aura3d-cli/pull-bridge/scoring.d.ts +36 -8
  737. package/dist/aura3d-cli/pull-bridge/scoring.d.ts.map +1 -1
  738. package/dist/aura3d-cli/pull-bridge/scoring.js +143 -47
  739. package/dist/aura3d-cli/pull-bridge/scoring.js.map +1 -1
  740. package/dist/aura3d-cli/pull-bridge/search.d.ts +2 -0
  741. package/dist/aura3d-cli/pull-bridge/search.d.ts.map +1 -1
  742. package/dist/aura3d-cli/pull-bridge/search.js +17 -10
  743. package/dist/aura3d-cli/pull-bridge/search.js.map +1 -1
  744. package/dist/aura3d-cli/pull-bridge.d.ts +2 -2
  745. package/dist/aura3d-cli/pull-bridge.d.ts.map +1 -1
  746. package/dist/aura3d-cli/pull-bridge.js +24 -8
  747. package/dist/aura3d-cli/pull-bridge.js.map +1 -1
  748. package/dist/controls/FirstPersonControls.d.ts +1 -1
  749. package/dist/controls/FirstPersonControls.d.ts.map +1 -1
  750. package/dist/controls/FirstPersonControls.js +1 -1
  751. package/dist/controls/FirstPersonControls.js.map +1 -1
  752. package/dist/controls/FlyControls.d.ts +2 -1
  753. package/dist/controls/FlyControls.d.ts.map +1 -1
  754. package/dist/controls/FlyControls.js +2 -1
  755. package/dist/controls/FlyControls.js.map +1 -1
  756. package/dist/controls/MapControls.d.ts +1 -1
  757. package/dist/controls/MapControls.d.ts.map +1 -1
  758. package/dist/controls/MapControls.js +3 -3
  759. package/dist/controls/MapControls.js.map +1 -1
  760. package/dist/controls/OrbitControls.d.ts +19 -4
  761. package/dist/controls/OrbitControls.d.ts.map +1 -1
  762. package/dist/controls/OrbitControls.js +26 -8
  763. package/dist/controls/OrbitControls.js.map +1 -1
  764. package/dist/controls/PointerLockControls.d.ts +1 -1
  765. package/dist/controls/PointerLockControls.d.ts.map +1 -1
  766. package/dist/controls/PointerLockControls.js +1 -1
  767. package/dist/controls/PointerLockControls.js.map +1 -1
  768. package/dist/controls/TrackballControls.d.ts.map +1 -1
  769. package/dist/controls/TrackballControls.js +2 -0
  770. package/dist/controls/TrackballControls.js.map +1 -1
  771. package/dist/controls/engine/CameraRig.d.ts +12 -0
  772. package/dist/controls/engine/CameraRig.d.ts.map +1 -0
  773. package/dist/controls/engine/CameraRig.js +32 -0
  774. package/dist/controls/engine/CameraRig.js.map +1 -0
  775. package/dist/controls/engine/ControlTypes.d.ts +17 -0
  776. package/dist/controls/engine/ControlTypes.d.ts.map +1 -0
  777. package/dist/controls/engine/ControlTypes.js +4 -0
  778. package/dist/controls/engine/ControlTypes.js.map +1 -0
  779. package/dist/controls/engine/EditorFlyControls.d.ts +20 -0
  780. package/dist/controls/engine/EditorFlyControls.d.ts.map +1 -0
  781. package/dist/controls/engine/EditorFlyControls.js +44 -0
  782. package/dist/controls/engine/EditorFlyControls.js.map +1 -0
  783. package/dist/controls/engine/FirstPersonControls.d.ts +22 -0
  784. package/dist/controls/engine/FirstPersonControls.d.ts.map +1 -0
  785. package/dist/controls/engine/FirstPersonControls.js +44 -0
  786. package/dist/controls/engine/FirstPersonControls.js.map +1 -0
  787. package/dist/controls/engine/OrbitControls.d.ts +92 -0
  788. package/dist/controls/engine/OrbitControls.d.ts.map +1 -0
  789. package/dist/controls/engine/OrbitControls.js +270 -0
  790. package/dist/controls/engine/OrbitControls.js.map +1 -0
  791. package/dist/controls/engine/PointerLockControls.d.ts +11 -0
  792. package/dist/controls/engine/PointerLockControls.d.ts.map +1 -0
  793. package/dist/controls/engine/PointerLockControls.js +31 -0
  794. package/dist/controls/engine/PointerLockControls.js.map +1 -0
  795. package/dist/controls/engine/SceneCameraAdapter.d.ts +10 -0
  796. package/dist/controls/engine/SceneCameraAdapter.d.ts.map +1 -0
  797. package/dist/controls/engine/SceneCameraAdapter.js +90 -0
  798. package/dist/controls/engine/SceneCameraAdapter.js.map +1 -0
  799. package/dist/controls/engine/ThirdPersonFollowControls.d.ts +20 -0
  800. package/dist/controls/engine/ThirdPersonFollowControls.d.ts.map +1 -0
  801. package/dist/controls/engine/ThirdPersonFollowControls.js +33 -0
  802. package/dist/controls/engine/ThirdPersonFollowControls.js.map +1 -0
  803. package/dist/controls/index.d.ts +15 -0
  804. package/dist/controls/index.d.ts.map +1 -1
  805. package/dist/controls/index.js +12 -0
  806. package/dist/controls/index.js.map +1 -1
  807. package/dist/create-aura3d/agent-skills.d.ts +38 -0
  808. package/dist/create-aura3d/agent-skills.d.ts.map +1 -0
  809. package/dist/create-aura3d/agent-skills.js +103 -0
  810. package/dist/create-aura3d/agent-skills.js.map +1 -0
  811. package/dist/create-aura3d/cli.js +32 -5
  812. package/dist/create-aura3d/cli.js.map +1 -1
  813. package/dist/create-aura3d/index.d.ts +32 -1
  814. package/dist/create-aura3d/index.d.ts.map +1 -1
  815. package/dist/create-aura3d/index.js +52 -10
  816. package/dist/create-aura3d/index.js.map +1 -1
  817. package/dist/create-aura3d/showcase-spec-artifacts.d.ts +1 -1
  818. package/dist/create-aura3d/showcase-spec-game-geometry-extractor.js +8 -11
  819. package/dist/create-aura3d/showcase-spec-game-geometry-extractor.js.map +1 -1
  820. package/dist/create-aura3d/template-hdri.d.ts +12 -0
  821. package/dist/create-aura3d/template-hdri.d.ts.map +1 -0
  822. package/dist/create-aura3d/template-hdri.js +49 -0
  823. package/dist/create-aura3d/template-hdri.js.map +1 -0
  824. package/dist/engine/advanced-runtime/A3DRenderer.d.ts +3 -43
  825. package/dist/engine/advanced-runtime/A3DRenderer.d.ts.map +1 -1
  826. package/dist/engine/advanced-runtime/A3DRenderer.js +12 -145
  827. package/dist/engine/advanced-runtime/A3DRenderer.js.map +1 -1
  828. package/dist/engine/advanced-runtime/a3dCompat.d.ts +24 -0
  829. package/dist/engine/advanced-runtime/a3dCompat.d.ts.map +1 -0
  830. package/dist/engine/advanced-runtime/a3dCompat.js +48 -0
  831. package/dist/engine/advanced-runtime/a3dCompat.js.map +1 -0
  832. package/dist/engine/agent-api/AnimationController.d.ts +29 -1
  833. package/dist/engine/agent-api/AnimationController.d.ts.map +1 -1
  834. package/dist/engine/agent-api/AnimationController.js +212 -10
  835. package/dist/engine/agent-api/AnimationController.js.map +1 -1
  836. package/dist/engine/agent-api/AnimationDirector.d.ts +1 -1
  837. package/dist/engine/agent-api/AnimationDirector.d.ts.map +1 -1
  838. package/dist/engine/agent-api/AnimationDirector.js +2 -0
  839. package/dist/engine/agent-api/AnimationDirector.js.map +1 -1
  840. package/dist/engine/agent-api/AnimationPerformance.d.ts +1 -1
  841. package/dist/engine/agent-api/AnimationPerformance.d.ts.map +1 -1
  842. package/dist/engine/agent-api/AnimationPerformance.js +1 -0
  843. package/dist/engine/agent-api/AnimationPerformance.js.map +1 -1
  844. package/dist/engine/agent-api/AnimationRenderQueue.d.ts.map +1 -1
  845. package/dist/engine/agent-api/AnimationRenderQueue.js +2 -0
  846. package/dist/engine/agent-api/AnimationRenderQueue.js.map +1 -1
  847. package/dist/engine/agent-api/AnimationRouteProof.d.ts.map +1 -1
  848. package/dist/engine/agent-api/AnimationRouteProof.js +1 -0
  849. package/dist/engine/agent-api/AnimationRouteProof.js.map +1 -1
  850. package/dist/engine/agent-api/ApplicationKits.d.ts +1 -1
  851. package/dist/engine/agent-api/ApplicationKits.d.ts.map +1 -1
  852. package/dist/engine/agent-api/ApplicationKits.js +2 -0
  853. package/dist/engine/agent-api/ApplicationKits.js.map +1 -1
  854. package/dist/engine/agent-api/AssetDecoders.d.ts +72 -9
  855. package/dist/engine/agent-api/AssetDecoders.d.ts.map +1 -1
  856. package/dist/engine/agent-api/AssetDecoders.js +147 -9
  857. package/dist/engine/agent-api/AssetDecoders.js.map +1 -1
  858. package/dist/engine/agent-api/AssetEvidence.d.ts +1 -1
  859. package/dist/engine/agent-api/AssetEvidence.d.ts.map +1 -1
  860. package/dist/engine/agent-api/AudioMuxer.d.ts.map +1 -1
  861. package/dist/engine/agent-api/AudioMuxer.js +1 -0
  862. package/dist/engine/agent-api/AudioMuxer.js.map +1 -1
  863. package/dist/engine/agent-api/AudioVisemeAnalyzer.d.ts.map +1 -1
  864. package/dist/engine/agent-api/AudioVisemeAnalyzer.js +1 -0
  865. package/dist/engine/agent-api/AudioVisemeAnalyzer.js.map +1 -1
  866. package/dist/engine/agent-api/AuraAppHandle.d.ts +6 -0
  867. package/dist/engine/agent-api/AuraAppHandle.d.ts.map +1 -1
  868. package/dist/engine/agent-api/AuraAppHandle.js +1 -0
  869. package/dist/engine/agent-api/AuraAppHandle.js.map +1 -1
  870. package/dist/engine/agent-api/AuraVoiceBridge.d.ts.map +1 -1
  871. package/dist/engine/agent-api/AuraVoiceBridge.js +3 -0
  872. package/dist/engine/agent-api/AuraVoiceBridge.js.map +1 -1
  873. package/dist/engine/agent-api/CameraChoreographer.d.ts.map +1 -1
  874. package/dist/engine/agent-api/CameraChoreographer.js +21 -2
  875. package/dist/engine/agent-api/CameraChoreographer.js.map +1 -1
  876. package/dist/engine/agent-api/CameraPathEditor.d.ts +1 -1
  877. package/dist/engine/agent-api/CameraPathEditor.d.ts.map +1 -1
  878. package/dist/engine/agent-api/CameraPresetLibrary.d.ts +1 -1
  879. package/dist/engine/agent-api/CameraPresetLibrary.d.ts.map +1 -1
  880. package/dist/engine/agent-api/CameraPresetLibrary.js +4 -2
  881. package/dist/engine/agent-api/CameraPresetLibrary.js.map +1 -1
  882. package/dist/engine/agent-api/CameraProjection.d.ts +2 -0
  883. package/dist/engine/agent-api/CameraProjection.d.ts.map +1 -0
  884. package/dist/engine/agent-api/CameraProjection.js +2 -0
  885. package/dist/engine/agent-api/CameraProjection.js.map +1 -0
  886. package/dist/engine/agent-api/CaptionExporter.d.ts.map +1 -1
  887. package/dist/engine/agent-api/CaptionExporter.js +1 -0
  888. package/dist/engine/agent-api/CaptionExporter.js.map +1 -1
  889. package/dist/engine/agent-api/CharacterAssembly.d.ts +1 -1
  890. package/dist/engine/agent-api/CharacterAssembly.d.ts.map +1 -1
  891. package/dist/engine/agent-api/CharacterAssembly.js +1 -0
  892. package/dist/engine/agent-api/CharacterAssembly.js.map +1 -1
  893. package/dist/engine/agent-api/Decals.d.ts +2 -2
  894. package/dist/engine/agent-api/Decals.d.ts.map +1 -1
  895. package/dist/engine/agent-api/Decals.js +21 -5
  896. package/dist/engine/agent-api/Decals.js.map +1 -1
  897. package/dist/engine/agent-api/DeferredFrameResources.d.ts +2 -0
  898. package/dist/engine/agent-api/DeferredFrameResources.d.ts.map +1 -0
  899. package/dist/engine/agent-api/DeferredFrameResources.js +2 -0
  900. package/dist/engine/agent-api/DeferredFrameResources.js.map +1 -0
  901. package/dist/engine/agent-api/FfmpegFrameEncoder.d.ts.map +1 -1
  902. package/dist/engine/agent-api/FfmpegFrameEncoder.js +1 -0
  903. package/dist/engine/agent-api/FfmpegFrameEncoder.js.map +1 -1
  904. package/dist/engine/agent-api/FocusSelection.d.ts +1 -1
  905. package/dist/engine/agent-api/FocusSelection.d.ts.map +1 -1
  906. package/dist/engine/agent-api/FocusSelection.js +1 -0
  907. package/dist/engine/agent-api/FocusSelection.js.map +1 -1
  908. package/dist/engine/agent-api/FootPlanting.d.ts +6 -0
  909. package/dist/engine/agent-api/FootPlanting.d.ts.map +1 -1
  910. package/dist/engine/agent-api/FootPlanting.js +2 -1
  911. package/dist/engine/agent-api/FootPlanting.js.map +1 -1
  912. package/dist/engine/agent-api/FrameEncoder.d.ts.map +1 -1
  913. package/dist/engine/agent-api/FrameEncoder.js +1 -0
  914. package/dist/engine/agent-api/FrameEncoder.js.map +1 -1
  915. package/dist/engine/agent-api/FrameLoop.d.ts +61 -1
  916. package/dist/engine/agent-api/FrameLoop.d.ts.map +1 -1
  917. package/dist/engine/agent-api/FrameLoop.js +122 -9
  918. package/dist/engine/agent-api/FrameLoop.js.map +1 -1
  919. package/dist/engine/agent-api/GameAppRuntime.d.ts +20 -0
  920. package/dist/engine/agent-api/GameAppRuntime.d.ts.map +1 -1
  921. package/dist/engine/agent-api/GameAppRuntime.js +83 -5
  922. package/dist/engine/agent-api/GameAppRuntime.js.map +1 -1
  923. package/dist/engine/agent-api/GameAssetValidation.d.ts +1 -1
  924. package/dist/engine/agent-api/GameAssetValidation.d.ts.map +1 -1
  925. package/dist/engine/agent-api/GameAssetValidation.js +3 -0
  926. package/dist/engine/agent-api/GameAssetValidation.js.map +1 -1
  927. package/dist/engine/agent-api/GameCameraRigs.d.ts +4 -15
  928. package/dist/engine/agent-api/GameCameraRigs.d.ts.map +1 -1
  929. package/dist/engine/agent-api/GameCameraRigs.js +10 -80
  930. package/dist/engine/agent-api/GameCameraRigs.js.map +1 -1
  931. package/dist/engine/agent-api/GameCharacterAnimation.d.ts +202 -0
  932. package/dist/engine/agent-api/GameCharacterAnimation.d.ts.map +1 -0
  933. package/dist/engine/agent-api/GameCharacterAnimation.js +430 -0
  934. package/dist/engine/agent-api/GameCharacterAnimation.js.map +1 -0
  935. package/dist/engine/agent-api/GameEvidence.d.ts +11 -1
  936. package/dist/engine/agent-api/GameEvidence.d.ts.map +1 -1
  937. package/dist/engine/agent-api/GameEvidence.js +7 -1
  938. package/dist/engine/agent-api/GameEvidence.js.map +1 -1
  939. package/dist/engine/agent-api/GameFeel.d.ts +18 -0
  940. package/dist/engine/agent-api/GameFeel.d.ts.map +1 -1
  941. package/dist/engine/agent-api/GameFeel.js +37 -1
  942. package/dist/engine/agent-api/GameFeel.js.map +1 -1
  943. package/dist/engine/agent-api/GameGenreKits.d.ts +76 -1
  944. package/dist/engine/agent-api/GameGenreKits.d.ts.map +1 -1
  945. package/dist/engine/agent-api/GameGenreKits.js +132 -6
  946. package/dist/engine/agent-api/GameGenreKits.js.map +1 -1
  947. package/dist/engine/agent-api/GameInspector.d.ts.map +1 -1
  948. package/dist/engine/agent-api/GameInspector.js +3 -0
  949. package/dist/engine/agent-api/GameInspector.js.map +1 -1
  950. package/dist/engine/agent-api/GameRuntime.d.ts +84 -12
  951. package/dist/engine/agent-api/GameRuntime.d.ts.map +1 -1
  952. package/dist/engine/agent-api/GameRuntime.js +241 -216
  953. package/dist/engine/agent-api/GameRuntime.js.map +1 -1
  954. package/dist/engine/agent-api/GameSceneBridge.d.ts.map +1 -1
  955. package/dist/engine/agent-api/GameSceneBridge.js +1 -0
  956. package/dist/engine/agent-api/GameSceneBridge.js.map +1 -1
  957. package/dist/engine/agent-api/GameSceneGeometryBindings.d.ts +29 -5
  958. package/dist/engine/agent-api/GameSceneGeometryBindings.d.ts.map +1 -1
  959. package/dist/engine/agent-api/GameSceneGeometryBindings.js +72 -0
  960. package/dist/engine/agent-api/GameSceneGeometryBindings.js.map +1 -1
  961. package/dist/engine/agent-api/GameSceneGeometryMath.d.ts.map +1 -1
  962. package/dist/engine/agent-api/GameSceneGeometryMath.js +1 -0
  963. package/dist/engine/agent-api/GameSceneGeometryMath.js.map +1 -1
  964. package/dist/engine/agent-api/LabelTelemetry.d.ts +9 -3
  965. package/dist/engine/agent-api/LabelTelemetry.d.ts.map +1 -1
  966. package/dist/engine/agent-api/LabelTelemetry.js +18 -4
  967. package/dist/engine/agent-api/LabelTelemetry.js.map +1 -1
  968. package/dist/engine/agent-api/MediaRecorderFrameEncoder.d.ts.map +1 -1
  969. package/dist/engine/agent-api/MediaRecorderFrameEncoder.js +1 -0
  970. package/dist/engine/agent-api/MediaRecorderFrameEncoder.js.map +1 -1
  971. package/dist/engine/agent-api/ModelInstanceMatrices.d.ts +2 -0
  972. package/dist/engine/agent-api/ModelInstanceMatrices.d.ts.map +1 -0
  973. package/dist/engine/agent-api/ModelInstanceMatrices.js +2 -0
  974. package/dist/engine/agent-api/ModelInstanceMatrices.js.map +1 -0
  975. package/dist/engine/agent-api/NavigationCrowds.d.ts +28 -0
  976. package/dist/engine/agent-api/NavigationCrowds.d.ts.map +1 -1
  977. package/dist/engine/agent-api/NavigationCrowds.js +83 -1
  978. package/dist/engine/agent-api/NavigationCrowds.js.map +1 -1
  979. package/dist/engine/agent-api/PerformanceBlender.d.ts.map +1 -1
  980. package/dist/engine/agent-api/PerformanceBlender.js +1 -0
  981. package/dist/engine/agent-api/PerformanceBlender.js.map +1 -1
  982. package/dist/engine/agent-api/PngSequenceEncoder.d.ts.map +1 -1
  983. package/dist/engine/agent-api/PngSequenceEncoder.js +1 -0
  984. package/dist/engine/agent-api/PngSequenceEncoder.js.map +1 -1
  985. package/dist/engine/agent-api/PngTexturePixels.d.ts +9 -0
  986. package/dist/engine/agent-api/PngTexturePixels.d.ts.map +1 -0
  987. package/dist/engine/agent-api/PngTexturePixels.js +53 -0
  988. package/dist/engine/agent-api/PngTexturePixels.js.map +1 -0
  989. package/dist/engine/agent-api/PromptAnimationContract.d.ts +1 -1
  990. package/dist/engine/agent-api/PromptAnimationContract.d.ts.map +1 -1
  991. package/dist/engine/agent-api/PromptAnimationContract.js +2 -0
  992. package/dist/engine/agent-api/PromptAnimationContract.js.map +1 -1
  993. package/dist/engine/agent-api/PromptAnimationEvidence.d.ts +1 -1
  994. package/dist/engine/agent-api/PromptAnimationEvidence.d.ts.map +1 -1
  995. package/dist/engine/agent-api/PromptAnimationEvidence.js +3 -0
  996. package/dist/engine/agent-api/PromptAnimationEvidence.js.map +1 -1
  997. package/dist/engine/agent-api/RootDiagnosticSnapshot.d.ts +2 -0
  998. package/dist/engine/agent-api/RootDiagnosticSnapshot.d.ts.map +1 -0
  999. package/dist/engine/agent-api/RootDiagnosticSnapshot.js +2 -0
  1000. package/dist/engine/agent-api/RootDiagnosticSnapshot.js.map +1 -0
  1001. package/dist/engine/agent-api/RootFrameClock.d.ts +2 -0
  1002. package/dist/engine/agent-api/RootFrameClock.d.ts.map +1 -0
  1003. package/dist/engine/agent-api/RootFrameClock.js +2 -0
  1004. package/dist/engine/agent-api/RootFrameClock.js.map +1 -0
  1005. package/dist/engine/agent-api/RootGeometry.d.ts +2 -0
  1006. package/dist/engine/agent-api/RootGeometry.d.ts.map +1 -1
  1007. package/dist/engine/agent-api/RootGeometry.js +4 -0
  1008. package/dist/engine/agent-api/RootGeometry.js.map +1 -1
  1009. package/dist/engine/agent-api/RootPerformanceQuality.d.ts +2 -0
  1010. package/dist/engine/agent-api/RootPerformanceQuality.d.ts.map +1 -0
  1011. package/dist/engine/agent-api/RootPerformanceQuality.js +2 -0
  1012. package/dist/engine/agent-api/RootPerformanceQuality.js.map +1 -0
  1013. package/dist/engine/agent-api/RootRuntimeSupport.d.ts +63 -0
  1014. package/dist/engine/agent-api/RootRuntimeSupport.d.ts.map +1 -0
  1015. package/dist/engine/agent-api/RootRuntimeSupport.js +173 -0
  1016. package/dist/engine/agent-api/RootRuntimeSupport.js.map +1 -0
  1017. package/dist/engine/agent-api/RuntimeNodeHandle.d.ts +22 -0
  1018. package/dist/engine/agent-api/RuntimeNodeHandle.d.ts.map +1 -1
  1019. package/dist/engine/agent-api/RuntimeNodeHandle.js +2 -0
  1020. package/dist/engine/agent-api/RuntimeNodeHandle.js.map +1 -1
  1021. package/dist/engine/agent-api/SceneGroundingUtils.d.ts +2 -1
  1022. package/dist/engine/agent-api/SceneGroundingUtils.d.ts.map +1 -1
  1023. package/dist/engine/agent-api/SceneGroundingUtils.js.map +1 -1
  1024. package/dist/engine/agent-api/SceneQueries.d.ts +1 -1
  1025. package/dist/engine/agent-api/SceneQueries.d.ts.map +1 -1
  1026. package/dist/engine/agent-api/SceneSequencer.d.ts.map +1 -1
  1027. package/dist/engine/agent-api/SceneSequencer.js +2 -0
  1028. package/dist/engine/agent-api/SceneSequencer.js.map +1 -1
  1029. package/dist/engine/agent-api/ShotTimeline.d.ts +1 -1
  1030. package/dist/engine/agent-api/ShotTimeline.d.ts.map +1 -1
  1031. package/dist/engine/agent-api/ShotTimeline.js +3 -0
  1032. package/dist/engine/agent-api/ShotTimeline.js.map +1 -1
  1033. package/dist/engine/agent-api/ShotTransitionEngine.d.ts.map +1 -1
  1034. package/dist/engine/agent-api/ShotTransitionEngine.js +1 -0
  1035. package/dist/engine/agent-api/ShotTransitionEngine.js.map +1 -1
  1036. package/dist/engine/agent-api/SpatialAnchoring.d.ts +1 -0
  1037. package/dist/engine/agent-api/SpatialAnchoring.d.ts.map +1 -1
  1038. package/dist/engine/agent-api/SpatialAnchoring.js +1 -1
  1039. package/dist/engine/agent-api/SpatialAnchoring.js.map +1 -1
  1040. package/dist/engine/agent-api/ThumbnailGenerator.d.ts.map +1 -1
  1041. package/dist/engine/agent-api/ThumbnailGenerator.js +1 -0
  1042. package/dist/engine/agent-api/ThumbnailGenerator.js.map +1 -1
  1043. package/dist/engine/agent-api/VisemeController.d.ts +9 -0
  1044. package/dist/engine/agent-api/VisemeController.d.ts.map +1 -1
  1045. package/dist/engine/agent-api/VisemeController.js +8 -0
  1046. package/dist/engine/agent-api/VisemeController.js.map +1 -1
  1047. package/dist/engine/agent-api/WebCodecsFrameEncoder.d.ts.map +1 -1
  1048. package/dist/engine/agent-api/WebCodecsFrameEncoder.js +1 -0
  1049. package/dist/engine/agent-api/WebCodecsFrameEncoder.js.map +1 -1
  1050. package/dist/engine/agent-api/WorldLabelRenderer.d.ts +13 -2
  1051. package/dist/engine/agent-api/WorldLabelRenderer.d.ts.map +1 -1
  1052. package/dist/engine/agent-api/WorldLabelRenderer.js +58 -26
  1053. package/dist/engine/agent-api/WorldLabelRenderer.js.map +1 -1
  1054. package/dist/engine/agent-api/app/actorAnimationHandle.d.ts +106 -0
  1055. package/dist/engine/agent-api/app/actorAnimationHandle.d.ts.map +1 -0
  1056. package/dist/engine/agent-api/app/actorAnimationHandle.js +522 -0
  1057. package/dist/engine/agent-api/app/actorAnimationHandle.js.map +1 -0
  1058. package/dist/engine/agent-api/app/canvas.d.ts +7 -0
  1059. package/dist/engine/agent-api/app/canvas.d.ts.map +1 -0
  1060. package/dist/engine/agent-api/app/canvas.js +88 -0
  1061. package/dist/engine/agent-api/app/canvas.js.map +1 -0
  1062. package/dist/engine/agent-api/app/colorManagement.d.ts +4 -0
  1063. package/dist/engine/agent-api/app/colorManagement.d.ts.map +1 -0
  1064. package/dist/engine/agent-api/app/colorManagement.js +24 -0
  1065. package/dist/engine/agent-api/app/colorManagement.js.map +1 -0
  1066. package/dist/engine/agent-api/app/createAuraApp.d.ts +3 -0
  1067. package/dist/engine/agent-api/app/createAuraApp.d.ts.map +1 -0
  1068. package/dist/engine/agent-api/app/createAuraApp.js +775 -0
  1069. package/dist/engine/agent-api/app/createAuraApp.js.map +1 -0
  1070. package/dist/engine/agent-api/app/createGameApp.d.ts +4 -0
  1071. package/dist/engine/agent-api/app/createGameApp.d.ts.map +1 -0
  1072. package/dist/engine/agent-api/app/createGameApp.js +15 -0
  1073. package/dist/engine/agent-api/app/createGameApp.js.map +1 -0
  1074. package/dist/engine/agent-api/app/degradation.d.ts +3 -0
  1075. package/dist/engine/agent-api/app/degradation.d.ts.map +1 -0
  1076. package/dist/engine/agent-api/app/degradation.js +6 -0
  1077. package/dist/engine/agent-api/app/degradation.js.map +1 -0
  1078. package/dist/engine/agent-api/app/errorOverlay.d.ts +9 -0
  1079. package/dist/engine/agent-api/app/errorOverlay.d.ts.map +1 -0
  1080. package/dist/engine/agent-api/app/errorOverlay.js +94 -0
  1081. package/dist/engine/agent-api/app/errorOverlay.js.map +1 -0
  1082. package/dist/engine/agent-api/app/errors.d.ts +5 -0
  1083. package/dist/engine/agent-api/app/errors.d.ts.map +1 -0
  1084. package/dist/engine/agent-api/app/errors.js +9 -0
  1085. package/dist/engine/agent-api/app/errors.js.map +1 -0
  1086. package/dist/engine/agent-api/app/frameAlpha.d.ts +18 -0
  1087. package/dist/engine/agent-api/app/frameAlpha.d.ts.map +1 -0
  1088. package/dist/engine/agent-api/app/frameAlpha.js +32 -0
  1089. package/dist/engine/agent-api/app/frameAlpha.js.map +1 -0
  1090. package/dist/engine/agent-api/app/frameLoop.d.ts +23 -0
  1091. package/dist/engine/agent-api/app/frameLoop.d.ts.map +1 -0
  1092. package/dist/engine/agent-api/app/frameLoop.js +360 -0
  1093. package/dist/engine/agent-api/app/frameLoop.js.map +1 -0
  1094. package/dist/engine/agent-api/app/liveApps.d.ts +5 -0
  1095. package/dist/engine/agent-api/app/liveApps.d.ts.map +1 -0
  1096. package/dist/engine/agent-api/app/liveApps.js +67 -0
  1097. package/dist/engine/agent-api/app/liveApps.js.map +1 -0
  1098. package/dist/engine/agent-api/app/mountRenderer.d.ts +10 -0
  1099. package/dist/engine/agent-api/app/mountRenderer.d.ts.map +1 -0
  1100. package/dist/engine/agent-api/app/mountRenderer.js +31 -0
  1101. package/dist/engine/agent-api/app/mountRenderer.js.map +1 -0
  1102. package/dist/engine/agent-api/app/pixelRatio.d.ts +37 -0
  1103. package/dist/engine/agent-api/app/pixelRatio.d.ts.map +1 -0
  1104. package/dist/engine/agent-api/app/pixelRatio.js +36 -0
  1105. package/dist/engine/agent-api/app/pixelRatio.js.map +1 -0
  1106. package/dist/engine/agent-api/app/rendererOptions.d.ts +45 -0
  1107. package/dist/engine/agent-api/app/rendererOptions.d.ts.map +1 -0
  1108. package/dist/engine/agent-api/app/rendererOptions.js +208 -0
  1109. package/dist/engine/agent-api/app/rendererOptions.js.map +1 -0
  1110. package/dist/engine/agent-api/app/routeState.d.ts +5 -0
  1111. package/dist/engine/agent-api/app/routeState.d.ts.map +1 -0
  1112. package/dist/engine/agent-api/app/routeState.js +26 -0
  1113. package/dist/engine/agent-api/app/routeState.js.map +1 -0
  1114. package/dist/engine/agent-api/app/runtimeNodes.d.ts +45 -0
  1115. package/dist/engine/agent-api/app/runtimeNodes.d.ts.map +1 -0
  1116. package/dist/engine/agent-api/app/runtimeNodes.js +376 -0
  1117. package/dist/engine/agent-api/app/runtimeNodes.js.map +1 -0
  1118. package/dist/engine/agent-api/app/screenshot.d.ts +11 -0
  1119. package/dist/engine/agent-api/app/screenshot.d.ts.map +1 -0
  1120. package/dist/engine/agent-api/app/screenshot.js +32 -0
  1121. package/dist/engine/agent-api/app/screenshot.js.map +1 -0
  1122. package/dist/engine/agent-api/camera/CameraController.d.ts +61 -0
  1123. package/dist/engine/agent-api/camera/CameraController.d.ts.map +1 -0
  1124. package/dist/engine/agent-api/camera/CameraController.js +394 -0
  1125. package/dist/engine/agent-api/camera/CameraController.js.map +1 -0
  1126. package/dist/engine/agent-api/camera/OccluderFade.d.ts +52 -0
  1127. package/dist/engine/agent-api/camera/OccluderFade.d.ts.map +1 -0
  1128. package/dist/engine/agent-api/camera/OccluderFade.js +70 -0
  1129. package/dist/engine/agent-api/camera/OccluderFade.js.map +1 -0
  1130. package/dist/engine/agent-api/camera/Probe.d.ts +66 -0
  1131. package/dist/engine/agent-api/camera/Probe.d.ts.map +1 -0
  1132. package/dist/engine/agent-api/camera/Probe.js +155 -0
  1133. package/dist/engine/agent-api/camera/Probe.js.map +1 -0
  1134. package/dist/engine/agent-api/camera/Spline.d.ts +60 -0
  1135. package/dist/engine/agent-api/camera/Spline.d.ts.map +1 -0
  1136. package/dist/engine/agent-api/camera/Spline.js +191 -0
  1137. package/dist/engine/agent-api/camera/Spline.js.map +1 -0
  1138. package/dist/engine/agent-api/camera/Spring.d.ts +40 -0
  1139. package/dist/engine/agent-api/camera/Spring.d.ts.map +1 -0
  1140. package/dist/engine/agent-api/camera/Spring.js +63 -0
  1141. package/dist/engine/agent-api/camera/Spring.js.map +1 -0
  1142. package/dist/engine/agent-api/camera/collision.d.ts +27 -0
  1143. package/dist/engine/agent-api/camera/collision.d.ts.map +1 -0
  1144. package/dist/engine/agent-api/camera/collision.js +43 -0
  1145. package/dist/engine/agent-api/camera/collision.js.map +1 -0
  1146. package/dist/engine/agent-api/camera/ease.d.ts +7 -0
  1147. package/dist/engine/agent-api/camera/ease.d.ts.map +1 -0
  1148. package/dist/engine/agent-api/camera/ease.js +17 -0
  1149. package/dist/engine/agent-api/camera/ease.js.map +1 -0
  1150. package/dist/engine/agent-api/camera/extension.d.ts +54 -0
  1151. package/dist/engine/agent-api/camera/extension.d.ts.map +1 -0
  1152. package/dist/engine/agent-api/camera/extension.js +439 -0
  1153. package/dist/engine/agent-api/camera/extension.js.map +1 -0
  1154. package/dist/engine/agent-api/camera/framing.d.ts +31 -0
  1155. package/dist/engine/agent-api/camera/framing.d.ts.map +1 -0
  1156. package/dist/engine/agent-api/camera/framing.js +50 -0
  1157. package/dist/engine/agent-api/camera/framing.js.map +1 -0
  1158. package/dist/engine/agent-api/camera/gameDirector.d.ts +74 -0
  1159. package/dist/engine/agent-api/camera/gameDirector.d.ts.map +1 -0
  1160. package/dist/engine/agent-api/camera/gameDirector.js +138 -0
  1161. package/dist/engine/agent-api/camera/gameDirector.js.map +1 -0
  1162. package/dist/engine/agent-api/camera/layers/cinematicBars.d.ts +50 -0
  1163. package/dist/engine/agent-api/camera/layers/cinematicBars.d.ts.map +1 -0
  1164. package/dist/engine/agent-api/camera/layers/cinematicBars.js +96 -0
  1165. package/dist/engine/agent-api/camera/layers/cinematicBars.js.map +1 -0
  1166. package/dist/engine/agent-api/camera/layers/fovKick.d.ts +8 -0
  1167. package/dist/engine/agent-api/camera/layers/fovKick.d.ts.map +1 -0
  1168. package/dist/engine/agent-api/camera/layers/fovKick.js +30 -0
  1169. package/dist/engine/agent-api/camera/layers/fovKick.js.map +1 -0
  1170. package/dist/engine/agent-api/camera/layers/index.d.ts +12 -0
  1171. package/dist/engine/agent-api/camera/layers/index.d.ts.map +1 -0
  1172. package/dist/engine/agent-api/camera/layers/index.js +12 -0
  1173. package/dist/engine/agent-api/camera/layers/index.js.map +1 -0
  1174. package/dist/engine/agent-api/camera/layers/lookAt.d.ts +13 -0
  1175. package/dist/engine/agent-api/camera/layers/lookAt.d.ts.map +1 -0
  1176. package/dist/engine/agent-api/camera/layers/lookAt.js +27 -0
  1177. package/dist/engine/agent-api/camera/layers/lookAt.js.map +1 -0
  1178. package/dist/engine/agent-api/camera/layers/punch.d.ts +9 -0
  1179. package/dist/engine/agent-api/camera/layers/punch.d.ts.map +1 -0
  1180. package/dist/engine/agent-api/camera/layers/punch.js +47 -0
  1181. package/dist/engine/agent-api/camera/layers/punch.js.map +1 -0
  1182. package/dist/engine/agent-api/camera/layers/shared.d.ts +16 -0
  1183. package/dist/engine/agent-api/camera/layers/shared.d.ts.map +1 -0
  1184. package/dist/engine/agent-api/camera/layers/shared.js +38 -0
  1185. package/dist/engine/agent-api/camera/layers/shared.js.map +1 -0
  1186. package/dist/engine/agent-api/camera/layers/trauma.d.ts +14 -0
  1187. package/dist/engine/agent-api/camera/layers/trauma.d.ts.map +1 -0
  1188. package/dist/engine/agent-api/camera/layers/trauma.js +86 -0
  1189. package/dist/engine/agent-api/camera/layers/trauma.js.map +1 -0
  1190. package/dist/engine/agent-api/camera/layers.d.ts +26 -0
  1191. package/dist/engine/agent-api/camera/layers.d.ts.map +1 -0
  1192. package/dist/engine/agent-api/camera/layers.js +220 -0
  1193. package/dist/engine/agent-api/camera/layers.js.map +1 -0
  1194. package/dist/engine/agent-api/camera/leanAdapters.d.ts +33 -0
  1195. package/dist/engine/agent-api/camera/leanAdapters.d.ts.map +1 -0
  1196. package/dist/engine/agent-api/camera/leanAdapters.js +79 -0
  1197. package/dist/engine/agent-api/camera/leanAdapters.js.map +1 -0
  1198. package/dist/engine/agent-api/camera/quat.d.ts +24 -0
  1199. package/dist/engine/agent-api/camera/quat.d.ts.map +1 -0
  1200. package/dist/engine/agent-api/camera/quat.js +117 -0
  1201. package/dist/engine/agent-api/camera/quat.js.map +1 -0
  1202. package/dist/engine/agent-api/camera/rigDamping.d.ts +10 -0
  1203. package/dist/engine/agent-api/camera/rigDamping.d.ts.map +1 -0
  1204. package/dist/engine/agent-api/camera/rigDamping.js +21 -0
  1205. package/dist/engine/agent-api/camera/rigDamping.js.map +1 -0
  1206. package/dist/engine/agent-api/camera/rigs/altitude.d.ts +25 -0
  1207. package/dist/engine/agent-api/camera/rigs/altitude.d.ts.map +1 -0
  1208. package/dist/engine/agent-api/camera/rigs/altitude.js +91 -0
  1209. package/dist/engine/agent-api/camera/rigs/altitude.js.map +1 -0
  1210. package/dist/engine/agent-api/camera/rigs/chase.d.ts +40 -0
  1211. package/dist/engine/agent-api/camera/rigs/chase.d.ts.map +1 -0
  1212. package/dist/engine/agent-api/camera/rigs/chase.js +104 -0
  1213. package/dist/engine/agent-api/camera/rigs/chase.js.map +1 -0
  1214. package/dist/engine/agent-api/camera/rigs/fighting.d.ts +17 -0
  1215. package/dist/engine/agent-api/camera/rigs/fighting.d.ts.map +1 -0
  1216. package/dist/engine/agent-api/camera/rigs/fighting.js +60 -0
  1217. package/dist/engine/agent-api/camera/rigs/fighting.js.map +1 -0
  1218. package/dist/engine/agent-api/camera/rigs/flight.d.ts +39 -0
  1219. package/dist/engine/agent-api/camera/rigs/flight.d.ts.map +1 -0
  1220. package/dist/engine/agent-api/camera/rigs/flight.js +102 -0
  1221. package/dist/engine/agent-api/camera/rigs/flight.js.map +1 -0
  1222. package/dist/engine/agent-api/camera/rigs/follow2d.d.ts +21 -0
  1223. package/dist/engine/agent-api/camera/rigs/follow2d.d.ts.map +1 -0
  1224. package/dist/engine/agent-api/camera/rigs/follow2d.js +83 -0
  1225. package/dist/engine/agent-api/camera/rigs/follow2d.js.map +1 -0
  1226. package/dist/engine/agent-api/camera/rigs/fromSpec.d.ts +76 -0
  1227. package/dist/engine/agent-api/camera/rigs/fromSpec.d.ts.map +1 -0
  1228. package/dist/engine/agent-api/camera/rigs/fromSpec.js +170 -0
  1229. package/dist/engine/agent-api/camera/rigs/fromSpec.js.map +1 -0
  1230. package/dist/engine/agent-api/camera/rigs/orbit.d.ts +44 -0
  1231. package/dist/engine/agent-api/camera/rigs/orbit.d.ts.map +1 -0
  1232. package/dist/engine/agent-api/camera/rigs/orbit.js +118 -0
  1233. package/dist/engine/agent-api/camera/rigs/orbit.js.map +1 -0
  1234. package/dist/engine/agent-api/camera/rigs/rail.d.ts +3 -0
  1235. package/dist/engine/agent-api/camera/rigs/rail.d.ts.map +1 -0
  1236. package/dist/engine/agent-api/camera/rigs/rail.js +79 -0
  1237. package/dist/engine/agent-api/camera/rigs/rail.js.map +1 -0
  1238. package/dist/engine/agent-api/camera/rigs/registry.d.ts +14 -0
  1239. package/dist/engine/agent-api/camera/rigs/registry.d.ts.map +1 -0
  1240. package/dist/engine/agent-api/camera/rigs/registry.js +8 -0
  1241. package/dist/engine/agent-api/camera/rigs/registry.js.map +1 -0
  1242. package/dist/engine/agent-api/camera/rigs/rigUtils.d.ts +32 -0
  1243. package/dist/engine/agent-api/camera/rigs/rigUtils.d.ts.map +1 -0
  1244. package/dist/engine/agent-api/camera/rigs/rigUtils.js +49 -0
  1245. package/dist/engine/agent-api/camera/rigs/rigUtils.js.map +1 -0
  1246. package/dist/engine/agent-api/camera/rigs/shoulder.d.ts +16 -0
  1247. package/dist/engine/agent-api/camera/rigs/shoulder.d.ts.map +1 -0
  1248. package/dist/engine/agent-api/camera/rigs/shoulder.js +54 -0
  1249. package/dist/engine/agent-api/camera/rigs/shoulder.js.map +1 -0
  1250. package/dist/engine/agent-api/camera/rigs/shoulderCamera.d.ts +25 -0
  1251. package/dist/engine/agent-api/camera/rigs/shoulderCamera.d.ts.map +1 -0
  1252. package/dist/engine/agent-api/camera/rigs/shoulderCamera.js +62 -0
  1253. package/dist/engine/agent-api/camera/rigs/shoulderCamera.js.map +1 -0
  1254. package/dist/engine/agent-api/camera/rigs/static.d.ts +10 -0
  1255. package/dist/engine/agent-api/camera/rigs/static.d.ts.map +1 -0
  1256. package/dist/engine/agent-api/camera/rigs/static.js +23 -0
  1257. package/dist/engine/agent-api/camera/rigs/static.js.map +1 -0
  1258. package/dist/engine/agent-api/camera/rigs/topDown.d.ts +31 -0
  1259. package/dist/engine/agent-api/camera/rigs/topDown.d.ts.map +1 -0
  1260. package/dist/engine/agent-api/camera/rigs/topDown.js +87 -0
  1261. package/dist/engine/agent-api/camera/rigs/topDown.js.map +1 -0
  1262. package/dist/engine/agent-api/camera/sceneNodes.d.ts +3 -0
  1263. package/dist/engine/agent-api/camera/sceneNodes.d.ts.map +1 -0
  1264. package/dist/engine/agent-api/camera/sceneNodes.js +51 -0
  1265. package/dist/engine/agent-api/camera/sceneNodes.js.map +1 -0
  1266. package/dist/engine/agent-api/camera/staticBounds.d.ts +33 -0
  1267. package/dist/engine/agent-api/camera/staticBounds.d.ts.map +1 -0
  1268. package/dist/engine/agent-api/camera/staticBounds.js +76 -0
  1269. package/dist/engine/agent-api/camera/staticBounds.js.map +1 -0
  1270. package/dist/engine/agent-api/camera/subject.d.ts +58 -0
  1271. package/dist/engine/agent-api/camera/subject.d.ts.map +1 -0
  1272. package/dist/engine/agent-api/camera/subject.js +57 -0
  1273. package/dist/engine/agent-api/camera/subject.js.map +1 -0
  1274. package/dist/engine/agent-api/color.d.ts +21 -0
  1275. package/dist/engine/agent-api/color.d.ts.map +1 -0
  1276. package/dist/engine/agent-api/color.js +201 -0
  1277. package/dist/engine/agent-api/color.js.map +1 -0
  1278. package/dist/engine/agent-api/colorUtils.d.ts +9 -0
  1279. package/dist/engine/agent-api/colorUtils.d.ts.map +1 -0
  1280. package/dist/engine/agent-api/colorUtils.js +83 -0
  1281. package/dist/engine/agent-api/colorUtils.js.map +1 -0
  1282. package/dist/engine/agent-api/compiler/actors.d.ts +74 -0
  1283. package/dist/engine/agent-api/compiler/actors.d.ts.map +1 -0
  1284. package/dist/engine/agent-api/compiler/actors.js +288 -0
  1285. package/dist/engine/agent-api/compiler/actors.js.map +1 -0
  1286. package/dist/engine/agent-api/compiler/animation.d.ts +70 -0
  1287. package/dist/engine/agent-api/compiler/animation.d.ts.map +1 -0
  1288. package/dist/engine/agent-api/compiler/animation.js +492 -0
  1289. package/dist/engine/agent-api/compiler/animation.js.map +1 -0
  1290. package/dist/engine/agent-api/compiler/camera.d.ts +10 -0
  1291. package/dist/engine/agent-api/compiler/camera.d.ts.map +1 -0
  1292. package/dist/engine/agent-api/compiler/camera.js +137 -0
  1293. package/dist/engine/agent-api/compiler/camera.js.map +1 -0
  1294. package/dist/engine/agent-api/compiler/color.d.ts +51 -0
  1295. package/dist/engine/agent-api/compiler/color.d.ts.map +1 -0
  1296. package/dist/engine/agent-api/compiler/color.js +87 -0
  1297. package/dist/engine/agent-api/compiler/color.js.map +1 -0
  1298. package/dist/engine/agent-api/compiler/compileScene.d.ts +93 -0
  1299. package/dist/engine/agent-api/compiler/compileScene.d.ts.map +1 -0
  1300. package/dist/engine/agent-api/compiler/compileScene.js +518 -0
  1301. package/dist/engine/agent-api/compiler/compileScene.js.map +1 -0
  1302. package/dist/engine/agent-api/compiler/degradation.d.ts +12 -0
  1303. package/dist/engine/agent-api/compiler/degradation.d.ts.map +1 -0
  1304. package/dist/engine/agent-api/compiler/degradation.js +27 -0
  1305. package/dist/engine/agent-api/compiler/degradation.js.map +1 -0
  1306. package/dist/engine/agent-api/compiler/diagnosticOnly.prd01.d.ts +17 -0
  1307. package/dist/engine/agent-api/compiler/diagnosticOnly.prd01.d.ts.map +1 -0
  1308. package/dist/engine/agent-api/compiler/diagnosticOnly.prd01.js +55 -0
  1309. package/dist/engine/agent-api/compiler/diagnosticOnly.prd01.js.map +1 -0
  1310. package/dist/engine/agent-api/compiler/diagnosticOnly.prd02.d.ts +5 -0
  1311. package/dist/engine/agent-api/compiler/diagnosticOnly.prd02.d.ts.map +1 -0
  1312. package/dist/engine/agent-api/compiler/diagnosticOnly.prd02.js +12 -0
  1313. package/dist/engine/agent-api/compiler/diagnosticOnly.prd02.js.map +1 -0
  1314. package/dist/engine/agent-api/compiler/diagnosticOnly.prd03.d.ts +20 -0
  1315. package/dist/engine/agent-api/compiler/diagnosticOnly.prd03.d.ts.map +1 -0
  1316. package/dist/engine/agent-api/compiler/diagnosticOnly.prd03.js +41 -0
  1317. package/dist/engine/agent-api/compiler/diagnosticOnly.prd03.js.map +1 -0
  1318. package/dist/engine/agent-api/compiler/diagnosticOnly.prd04.d.ts +8 -0
  1319. package/dist/engine/agent-api/compiler/diagnosticOnly.prd04.d.ts.map +1 -0
  1320. package/dist/engine/agent-api/compiler/diagnosticOnly.prd04.js +29 -0
  1321. package/dist/engine/agent-api/compiler/diagnosticOnly.prd04.js.map +1 -0
  1322. package/dist/engine/agent-api/compiler/diagnosticOnly.prd05.d.ts +5 -0
  1323. package/dist/engine/agent-api/compiler/diagnosticOnly.prd05.d.ts.map +1 -0
  1324. package/dist/engine/agent-api/compiler/diagnosticOnly.prd05.js +32 -0
  1325. package/dist/engine/agent-api/compiler/diagnosticOnly.prd05.js.map +1 -0
  1326. package/dist/engine/agent-api/compiler/diagnosticOnly.prd06.d.ts +23 -0
  1327. package/dist/engine/agent-api/compiler/diagnosticOnly.prd06.d.ts.map +1 -0
  1328. package/dist/engine/agent-api/compiler/diagnosticOnly.prd06.js +26 -0
  1329. package/dist/engine/agent-api/compiler/diagnosticOnly.prd06.js.map +1 -0
  1330. package/dist/engine/agent-api/compiler/diagnosticOnly.prd07.d.ts +19 -0
  1331. package/dist/engine/agent-api/compiler/diagnosticOnly.prd07.d.ts.map +1 -0
  1332. package/dist/engine/agent-api/compiler/diagnosticOnly.prd07.js +10 -0
  1333. package/dist/engine/agent-api/compiler/diagnosticOnly.prd07.js.map +1 -0
  1334. package/dist/engine/agent-api/compiler/diagnosticOnly.prd09.d.ts +9 -0
  1335. package/dist/engine/agent-api/compiler/diagnosticOnly.prd09.d.ts.map +1 -0
  1336. package/dist/engine/agent-api/compiler/diagnosticOnly.prd09.js +8 -0
  1337. package/dist/engine/agent-api/compiler/diagnosticOnly.prd09.js.map +1 -0
  1338. package/dist/engine/agent-api/compiler/diagnosticOnly.prd10.d.ts +5 -0
  1339. package/dist/engine/agent-api/compiler/diagnosticOnly.prd10.d.ts.map +1 -0
  1340. package/dist/engine/agent-api/compiler/diagnosticOnly.prd10.js +73 -0
  1341. package/dist/engine/agent-api/compiler/diagnosticOnly.prd10.js.map +1 -0
  1342. package/dist/engine/agent-api/compiler/diagnosticOnly.prd15.d.ts +5 -0
  1343. package/dist/engine/agent-api/compiler/diagnosticOnly.prd15.d.ts.map +1 -0
  1344. package/dist/engine/agent-api/compiler/diagnosticOnly.prd15.js +19 -0
  1345. package/dist/engine/agent-api/compiler/diagnosticOnly.prd15.js.map +1 -0
  1346. package/dist/engine/agent-api/compiler/effects.d.ts +7 -0
  1347. package/dist/engine/agent-api/compiler/effects.d.ts.map +1 -0
  1348. package/dist/engine/agent-api/compiler/effects.js +118 -0
  1349. package/dist/engine/agent-api/compiler/effects.js.map +1 -0
  1350. package/dist/engine/agent-api/compiler/environment.d.ts +95 -0
  1351. package/dist/engine/agent-api/compiler/environment.d.ts.map +1 -0
  1352. package/dist/engine/agent-api/compiler/environment.js +396 -0
  1353. package/dist/engine/agent-api/compiler/environment.js.map +1 -0
  1354. package/dist/engine/agent-api/compiler/errors.d.ts +22 -0
  1355. package/dist/engine/agent-api/compiler/errors.d.ts.map +1 -0
  1356. package/dist/engine/agent-api/compiler/errors.js +30 -0
  1357. package/dist/engine/agent-api/compiler/errors.js.map +1 -0
  1358. package/dist/engine/agent-api/compiler/fog.d.ts +15 -0
  1359. package/dist/engine/agent-api/compiler/fog.d.ts.map +1 -0
  1360. package/dist/engine/agent-api/compiler/fog.js +110 -0
  1361. package/dist/engine/agent-api/compiler/fog.js.map +1 -0
  1362. package/dist/engine/agent-api/compiler/geometry.d.ts +76 -0
  1363. package/dist/engine/agent-api/compiler/geometry.d.ts.map +1 -0
  1364. package/dist/engine/agent-api/compiler/geometry.js +343 -0
  1365. package/dist/engine/agent-api/compiler/geometry.js.map +1 -0
  1366. package/dist/engine/agent-api/compiler/handlers.d.ts +17 -0
  1367. package/dist/engine/agent-api/compiler/handlers.d.ts.map +1 -0
  1368. package/dist/engine/agent-api/compiler/handlers.js +55 -0
  1369. package/dist/engine/agent-api/compiler/handlers.js.map +1 -0
  1370. package/dist/engine/agent-api/compiler/labels.d.ts +44 -0
  1371. package/dist/engine/agent-api/compiler/labels.d.ts.map +1 -0
  1372. package/dist/engine/agent-api/compiler/labels.js +190 -0
  1373. package/dist/engine/agent-api/compiler/labels.js.map +1 -0
  1374. package/dist/engine/agent-api/compiler/lights.d.ts +117 -0
  1375. package/dist/engine/agent-api/compiler/lights.d.ts.map +1 -0
  1376. package/dist/engine/agent-api/compiler/lights.js +486 -0
  1377. package/dist/engine/agent-api/compiler/lights.js.map +1 -0
  1378. package/dist/engine/agent-api/compiler/modelMaterials.d.ts +3 -0
  1379. package/dist/engine/agent-api/compiler/modelMaterials.d.ts.map +1 -0
  1380. package/dist/engine/agent-api/compiler/modelMaterials.js +11 -0
  1381. package/dist/engine/agent-api/compiler/modelMaterials.js.map +1 -0
  1382. package/dist/engine/agent-api/compiler/observations.d.ts +84 -0
  1383. package/dist/engine/agent-api/compiler/observations.d.ts.map +1 -0
  1384. package/dist/engine/agent-api/compiler/observations.js +383 -0
  1385. package/dist/engine/agent-api/compiler/observations.js.map +1 -0
  1386. package/dist/engine/agent-api/compiler/optionCoverage.d.ts +3 -0
  1387. package/dist/engine/agent-api/compiler/optionCoverage.d.ts.map +1 -0
  1388. package/dist/engine/agent-api/compiler/optionCoverage.js +290 -0
  1389. package/dist/engine/agent-api/compiler/optionCoverage.js.map +1 -0
  1390. package/dist/engine/agent-api/compiler/postprocess.d.ts +7 -0
  1391. package/dist/engine/agent-api/compiler/postprocess.d.ts.map +1 -0
  1392. package/dist/engine/agent-api/compiler/postprocess.js +324 -0
  1393. package/dist/engine/agent-api/compiler/postprocess.js.map +1 -0
  1394. package/dist/engine/agent-api/compiler/primitives.d.ts +156 -0
  1395. package/dist/engine/agent-api/compiler/primitives.d.ts.map +1 -0
  1396. package/dist/engine/agent-api/compiler/primitives.js +439 -0
  1397. package/dist/engine/agent-api/compiler/primitives.js.map +1 -0
  1398. package/dist/engine/agent-api/compiler/renderInput.d.ts +9 -0
  1399. package/dist/engine/agent-api/compiler/renderInput.d.ts.map +1 -0
  1400. package/dist/engine/agent-api/compiler/renderInput.js +337 -0
  1401. package/dist/engine/agent-api/compiler/renderInput.js.map +1 -0
  1402. package/dist/engine/agent-api/compiler/renderer.d.ts +19 -0
  1403. package/dist/engine/agent-api/compiler/renderer.d.ts.map +1 -0
  1404. package/dist/engine/agent-api/compiler/renderer.js +411 -0
  1405. package/dist/engine/agent-api/compiler/renderer.js.map +1 -0
  1406. package/dist/engine/agent-api/compiler/sceneGraph.d.ts +81 -0
  1407. package/dist/engine/agent-api/compiler/sceneGraph.d.ts.map +1 -0
  1408. package/dist/engine/agent-api/compiler/sceneGraph.js +348 -0
  1409. package/dist/engine/agent-api/compiler/sceneGraph.js.map +1 -0
  1410. package/dist/engine/agent-api/compiler/shadows.d.ts +100 -0
  1411. package/dist/engine/agent-api/compiler/shadows.d.ts.map +1 -0
  1412. package/dist/engine/agent-api/compiler/shadows.js +175 -0
  1413. package/dist/engine/agent-api/compiler/shadows.js.map +1 -0
  1414. package/dist/engine/agent-api/compiler/sky.d.ts +5 -0
  1415. package/dist/engine/agent-api/compiler/sky.d.ts.map +1 -0
  1416. package/dist/engine/agent-api/compiler/sky.js +31 -0
  1417. package/dist/engine/agent-api/compiler/sky.js.map +1 -0
  1418. package/dist/engine/agent-api/compiler/text.d.ts +8 -0
  1419. package/dist/engine/agent-api/compiler/text.d.ts.map +1 -0
  1420. package/dist/engine/agent-api/compiler/text.js +37 -0
  1421. package/dist/engine/agent-api/compiler/text.js.map +1 -0
  1422. package/dist/engine/agent-api/compiler/textures.d.ts +54 -0
  1423. package/dist/engine/agent-api/compiler/textures.d.ts.map +1 -0
  1424. package/dist/engine/agent-api/compiler/textures.js +552 -0
  1425. package/dist/engine/agent-api/compiler/textures.js.map +1 -0
  1426. package/dist/engine/agent-api/compiler/world.d.ts +31 -0
  1427. package/dist/engine/agent-api/compiler/world.d.ts.map +1 -0
  1428. package/dist/engine/agent-api/compiler/world.js +391 -0
  1429. package/dist/engine/agent-api/compiler/world.js.map +1 -0
  1430. package/dist/engine/agent-api/controls/TouchControls.d.ts +53 -0
  1431. package/dist/engine/agent-api/controls/TouchControls.d.ts.map +1 -0
  1432. package/dist/engine/agent-api/controls/TouchControls.js +169 -0
  1433. package/dist/engine/agent-api/controls/TouchControls.js.map +1 -0
  1434. package/dist/engine/agent-api/devtools/diagnosticPreview.d.ts +27 -0
  1435. package/dist/engine/agent-api/devtools/diagnosticPreview.d.ts.map +1 -0
  1436. package/dist/engine/agent-api/devtools/diagnosticPreview.js +433 -0
  1437. package/dist/engine/agent-api/devtools/diagnosticPreview.js.map +1 -0
  1438. package/dist/engine/agent-api/devtools/lazySystems.d.ts +7 -0
  1439. package/dist/engine/agent-api/devtools/lazySystems.d.ts.map +1 -0
  1440. package/dist/engine/agent-api/devtools/lazySystems.js +8 -0
  1441. package/dist/engine/agent-api/devtools/lazySystems.js.map +1 -0
  1442. package/dist/engine/agent-api/devtools/rendererReports.d.ts +2 -0
  1443. package/dist/engine/agent-api/devtools/rendererReports.d.ts.map +1 -0
  1444. package/dist/engine/agent-api/devtools/rendererReports.js +5 -0
  1445. package/dist/engine/agent-api/devtools/rendererReports.js.map +1 -0
  1446. package/dist/engine/agent-api/devtools/routeHealth.d.ts +7 -0
  1447. package/dist/engine/agent-api/devtools/routeHealth.d.ts.map +1 -0
  1448. package/dist/engine/agent-api/devtools/routeHealth.js +11 -0
  1449. package/dist/engine/agent-api/devtools/routeHealth.js.map +1 -0
  1450. package/dist/engine/agent-api/devtools/sceneKitBudgets.d.ts +12 -0
  1451. package/dist/engine/agent-api/devtools/sceneKitBudgets.d.ts.map +1 -0
  1452. package/dist/engine/agent-api/devtools/sceneKitBudgets.js +27 -0
  1453. package/dist/engine/agent-api/devtools/sceneKitBudgets.js.map +1 -0
  1454. package/dist/engine/agent-api/diagnostics.d.ts +29 -0
  1455. package/dist/engine/agent-api/diagnostics.d.ts.map +1 -0
  1456. package/dist/engine/agent-api/diagnostics.js +103 -0
  1457. package/dist/engine/agent-api/diagnostics.js.map +1 -0
  1458. package/dist/engine/agent-api/engineSurface.d.ts +95 -0
  1459. package/dist/engine/agent-api/engineSurface.d.ts.map +1 -0
  1460. package/dist/engine/agent-api/engineSurface.js +141 -0
  1461. package/dist/engine/agent-api/engineSurface.js.map +1 -0
  1462. package/dist/engine/agent-api/feel/FeelBus.d.ts +94 -0
  1463. package/dist/engine/agent-api/feel/FeelBus.d.ts.map +1 -0
  1464. package/dist/engine/agent-api/feel/FeelBus.js +134 -0
  1465. package/dist/engine/agent-api/feel/FeelBus.js.map +1 -0
  1466. package/dist/engine/agent-api/feel/Noise.d.ts +20 -0
  1467. package/dist/engine/agent-api/feel/Noise.d.ts.map +1 -0
  1468. package/dist/engine/agent-api/feel/Noise.js +44 -0
  1469. package/dist/engine/agent-api/feel/Noise.js.map +1 -0
  1470. package/dist/engine/agent-api/feel/ScreenOverlay.d.ts +27 -0
  1471. package/dist/engine/agent-api/feel/ScreenOverlay.d.ts.map +1 -0
  1472. package/dist/engine/agent-api/feel/ScreenOverlay.js +46 -0
  1473. package/dist/engine/agent-api/feel/ScreenOverlay.js.map +1 -0
  1474. package/dist/engine/agent-api/feel/bindFeelSound.d.ts +37 -0
  1475. package/dist/engine/agent-api/feel/bindFeelSound.d.ts.map +1 -0
  1476. package/dist/engine/agent-api/feel/bindFeelSound.js +31 -0
  1477. package/dist/engine/agent-api/feel/bindFeelSound.js.map +1 -0
  1478. package/dist/engine/agent-api/feel/combatFeel.d.ts +23 -0
  1479. package/dist/engine/agent-api/feel/combatFeel.d.ts.map +1 -0
  1480. package/dist/engine/agent-api/feel/combatFeel.js +15 -0
  1481. package/dist/engine/agent-api/feel/combatFeel.js.map +1 -0
  1482. package/dist/engine/agent-api/feel/extension.d.ts +41 -0
  1483. package/dist/engine/agent-api/feel/extension.d.ts.map +1 -0
  1484. package/dist/engine/agent-api/feel/extension.js +208 -0
  1485. package/dist/engine/agent-api/feel/extension.js.map +1 -0
  1486. package/dist/engine/agent-api/feel/lint/evidenceOnlyFeel.d.ts +22 -0
  1487. package/dist/engine/agent-api/feel/lint/evidenceOnlyFeel.d.ts.map +1 -0
  1488. package/dist/engine/agent-api/feel/lint/evidenceOnlyFeel.js +33 -0
  1489. package/dist/engine/agent-api/feel/lint/evidenceOnlyFeel.js.map +1 -0
  1490. package/dist/engine/agent-api/feel/lint/feelSourceScan.d.ts +20 -0
  1491. package/dist/engine/agent-api/feel/lint/feelSourceScan.d.ts.map +1 -0
  1492. package/dist/engine/agent-api/feel/lint/feelSourceScan.js +91 -0
  1493. package/dist/engine/agent-api/feel/lint/feelSourceScan.js.map +1 -0
  1494. package/dist/engine/agent-api/feel/presets.d.ts +34 -0
  1495. package/dist/engine/agent-api/feel/presets.d.ts.map +1 -0
  1496. package/dist/engine/agent-api/feel/presets.js +97 -0
  1497. package/dist/engine/agent-api/feel/presets.js.map +1 -0
  1498. package/dist/engine/agent-api/gameRules.d.ts +7 -0
  1499. package/dist/engine/agent-api/gameRules.d.ts.map +1 -0
  1500. package/dist/engine/agent-api/gameRules.js +20 -0
  1501. package/dist/engine/agent-api/gameRules.js.map +1 -0
  1502. package/dist/engine/agent-api/humanoid-walk-runtime.d.ts +7 -6
  1503. package/dist/engine/agent-api/humanoid-walk-runtime.d.ts.map +1 -1
  1504. package/dist/engine/agent-api/humanoid-walk-runtime.js +5 -3
  1505. package/dist/engine/agent-api/humanoid-walk-runtime.js.map +1 -1
  1506. package/dist/engine/agent-api/index.d.ts +282 -3485
  1507. package/dist/engine/agent-api/index.d.ts.map +1 -1
  1508. package/dist/engine/agent-api/index.js +214 -13333
  1509. package/dist/engine/agent-api/index.js.map +1 -1
  1510. package/dist/engine/agent-api/lazyNamespace.d.ts +4 -0
  1511. package/dist/engine/agent-api/lazyNamespace.d.ts.map +1 -0
  1512. package/dist/engine/agent-api/lazyNamespace.js +59 -0
  1513. package/dist/engine/agent-api/lazyNamespace.js.map +1 -0
  1514. package/dist/engine/agent-api/lazySystemEvidence.d.ts +15 -0
  1515. package/dist/engine/agent-api/lazySystemEvidence.d.ts.map +1 -0
  1516. package/dist/engine/agent-api/lazySystemEvidence.js +44 -0
  1517. package/dist/engine/agent-api/lazySystemEvidence.js.map +1 -0
  1518. package/dist/engine/agent-api/lean-game.d.ts +1 -1
  1519. package/dist/engine/agent-api/lean-game.js +1 -1
  1520. package/dist/engine/agent-api/lean-product.d.ts +1 -1
  1521. package/dist/engine/agent-api/lean-product.js +1 -1
  1522. package/dist/engine/agent-api/lean.d.ts +1 -1
  1523. package/dist/engine/agent-api/lean.js +1 -1
  1524. package/dist/engine/agent-api/looks/contractAvailability.d.ts +6 -0
  1525. package/dist/engine/agent-api/looks/contractAvailability.d.ts.map +1 -0
  1526. package/dist/engine/agent-api/looks/contractAvailability.js +20 -0
  1527. package/dist/engine/agent-api/looks/contractAvailability.js.map +1 -0
  1528. package/dist/engine/agent-api/looks/fakeEffectNames.d.ts +14 -0
  1529. package/dist/engine/agent-api/looks/fakeEffectNames.d.ts.map +1 -0
  1530. package/dist/engine/agent-api/looks/fakeEffectNames.js +93 -0
  1531. package/dist/engine/agent-api/looks/fakeEffectNames.js.map +1 -0
  1532. package/dist/engine/agent-api/looks/generatedCodeWarnings.d.ts +14 -0
  1533. package/dist/engine/agent-api/looks/generatedCodeWarnings.d.ts.map +1 -0
  1534. package/dist/engine/agent-api/looks/generatedCodeWarnings.js +63 -0
  1535. package/dist/engine/agent-api/looks/generatedCodeWarnings.js.map +1 -0
  1536. package/dist/engine/agent-api/looks/lookDiagnostics.d.ts +4 -0
  1537. package/dist/engine/agent-api/looks/lookDiagnostics.d.ts.map +1 -0
  1538. package/dist/engine/agent-api/looks/lookDiagnostics.js +52 -0
  1539. package/dist/engine/agent-api/looks/lookDiagnostics.js.map +1 -0
  1540. package/dist/engine/agent-api/looks/lookLint.d.ts +8 -0
  1541. package/dist/engine/agent-api/looks/lookLint.d.ts.map +1 -0
  1542. package/dist/engine/agent-api/looks/lookLint.js +275 -0
  1543. package/dist/engine/agent-api/looks/lookLint.js.map +1 -0
  1544. package/dist/engine/agent-api/looks/lookNodeHandler.d.ts +8 -0
  1545. package/dist/engine/agent-api/looks/lookNodeHandler.d.ts.map +1 -0
  1546. package/dist/engine/agent-api/looks/lookNodeHandler.js +50 -0
  1547. package/dist/engine/agent-api/looks/lookNodeHandler.js.map +1 -0
  1548. package/dist/engine/agent-api/looks/lookPresets.d.ts +84 -0
  1549. package/dist/engine/agent-api/looks/lookPresets.d.ts.map +1 -0
  1550. package/dist/engine/agent-api/looks/lookPresets.js +306 -0
  1551. package/dist/engine/agent-api/looks/lookPresets.js.map +1 -0
  1552. package/dist/engine/agent-api/looks/looks.d.ts +60 -0
  1553. package/dist/engine/agent-api/looks/looks.d.ts.map +1 -0
  1554. package/dist/engine/agent-api/looks/looks.js +339 -0
  1555. package/dist/engine/agent-api/looks/looks.js.map +1 -0
  1556. package/dist/engine/agent-api/looks/structuralQA.d.ts +35 -0
  1557. package/dist/engine/agent-api/looks/structuralQA.d.ts.map +1 -0
  1558. package/dist/engine/agent-api/looks/structuralQA.js +556 -0
  1559. package/dist/engine/agent-api/looks/structuralQA.js.map +1 -0
  1560. package/dist/engine/agent-api/nodes/animation.d.ts +77 -0
  1561. package/dist/engine/agent-api/nodes/animation.d.ts.map +1 -0
  1562. package/dist/engine/agent-api/nodes/animation.js +51 -0
  1563. package/dist/engine/agent-api/nodes/animation.js.map +1 -0
  1564. package/dist/engine/agent-api/nodes/assets.d.ts +4 -0
  1565. package/dist/engine/agent-api/nodes/assets.d.ts.map +1 -0
  1566. package/dist/engine/agent-api/nodes/assets.js +19 -0
  1567. package/dist/engine/agent-api/nodes/assets.js.map +1 -0
  1568. package/dist/engine/agent-api/nodes/builder.d.ts +40 -0
  1569. package/dist/engine/agent-api/nodes/builder.d.ts.map +1 -0
  1570. package/dist/engine/agent-api/nodes/builder.js +48 -0
  1571. package/dist/engine/agent-api/nodes/builder.js.map +1 -0
  1572. package/dist/engine/agent-api/nodes/camera.d.ts +75 -0
  1573. package/dist/engine/agent-api/nodes/camera.d.ts.map +1 -0
  1574. package/dist/engine/agent-api/nodes/camera.js +241 -0
  1575. package/dist/engine/agent-api/nodes/camera.js.map +1 -0
  1576. package/dist/engine/agent-api/nodes/character.d.ts +23 -0
  1577. package/dist/engine/agent-api/nodes/character.d.ts.map +1 -0
  1578. package/dist/engine/agent-api/nodes/character.js +421 -0
  1579. package/dist/engine/agent-api/nodes/character.js.map +1 -0
  1580. package/dist/engine/agent-api/nodes/charts.d.ts +17 -0
  1581. package/dist/engine/agent-api/nodes/charts.d.ts.map +1 -0
  1582. package/dist/engine/agent-api/nodes/charts.js +41 -0
  1583. package/dist/engine/agent-api/nodes/charts.js.map +1 -0
  1584. package/dist/engine/agent-api/nodes/city.d.ts +30 -0
  1585. package/dist/engine/agent-api/nodes/city.d.ts.map +1 -0
  1586. package/dist/engine/agent-api/nodes/city.js +366 -0
  1587. package/dist/engine/agent-api/nodes/city.js.map +1 -0
  1588. package/dist/engine/agent-api/nodes/editor.d.ts +12 -0
  1589. package/dist/engine/agent-api/nodes/editor.d.ts.map +1 -0
  1590. package/dist/engine/agent-api/nodes/editor.js +12 -0
  1591. package/dist/engine/agent-api/nodes/editor.js.map +1 -0
  1592. package/dist/engine/agent-api/nodes/effects.composite.d.ts +38 -0
  1593. package/dist/engine/agent-api/nodes/effects.composite.d.ts.map +1 -0
  1594. package/dist/engine/agent-api/nodes/effects.composite.js +11 -0
  1595. package/dist/engine/agent-api/nodes/effects.composite.js.map +1 -0
  1596. package/dist/engine/agent-api/nodes/effects.d.ts +111 -0
  1597. package/dist/engine/agent-api/nodes/effects.d.ts.map +1 -0
  1598. package/dist/engine/agent-api/nodes/effects.js +323 -0
  1599. package/dist/engine/agent-api/nodes/effects.js.map +1 -0
  1600. package/dist/engine/agent-api/nodes/effects.lighting.d.ts +17 -0
  1601. package/dist/engine/agent-api/nodes/effects.lighting.d.ts.map +1 -0
  1602. package/dist/engine/agent-api/nodes/effects.lighting.js +18 -0
  1603. package/dist/engine/agent-api/nodes/effects.lighting.js.map +1 -0
  1604. package/dist/engine/agent-api/nodes/effects.post.d.ts +44 -0
  1605. package/dist/engine/agent-api/nodes/effects.post.d.ts.map +1 -0
  1606. package/dist/engine/agent-api/nodes/effects.post.js +139 -0
  1607. package/dist/engine/agent-api/nodes/effects.post.js.map +1 -0
  1608. package/dist/engine/agent-api/nodes/environments.composite.d.ts +38 -0
  1609. package/dist/engine/agent-api/nodes/environments.composite.d.ts.map +1 -0
  1610. package/dist/engine/agent-api/nodes/environments.composite.js +17 -0
  1611. package/dist/engine/agent-api/nodes/environments.composite.js.map +1 -0
  1612. package/dist/engine/agent-api/nodes/environments.d.ts +101 -0
  1613. package/dist/engine/agent-api/nodes/environments.d.ts.map +1 -0
  1614. package/dist/engine/agent-api/nodes/environments.js +109 -0
  1615. package/dist/engine/agent-api/nodes/environments.js.map +1 -0
  1616. package/dist/engine/agent-api/nodes/environments.world.d.ts +31 -0
  1617. package/dist/engine/agent-api/nodes/environments.world.d.ts.map +1 -0
  1618. package/dist/engine/agent-api/nodes/environments.world.js +32 -0
  1619. package/dist/engine/agent-api/nodes/environments.world.js.map +1 -0
  1620. package/dist/engine/agent-api/nodes/game/frameLoopDefaults.d.ts +34 -0
  1621. package/dist/engine/agent-api/nodes/game/frameLoopDefaults.d.ts.map +1 -0
  1622. package/dist/engine/agent-api/nodes/game/frameLoopDefaults.js +32 -0
  1623. package/dist/engine/agent-api/nodes/game/frameLoopDefaults.js.map +1 -0
  1624. package/dist/engine/agent-api/nodes/game/index.d.ts +153 -0
  1625. package/dist/engine/agent-api/nodes/game/index.d.ts.map +1 -0
  1626. package/dist/engine/agent-api/nodes/game/index.js +130 -0
  1627. package/dist/engine/agent-api/nodes/game/index.js.map +1 -0
  1628. package/dist/engine/agent-api/nodes/game/instanceTransforms.d.ts +34 -0
  1629. package/dist/engine/agent-api/nodes/game/instanceTransforms.d.ts.map +1 -0
  1630. package/dist/engine/agent-api/nodes/game/instanceTransforms.js +145 -0
  1631. package/dist/engine/agent-api/nodes/game/instanceTransforms.js.map +1 -0
  1632. package/dist/engine/agent-api/nodes/game/lookSignature.d.ts +28 -0
  1633. package/dist/engine/agent-api/nodes/game/lookSignature.d.ts.map +1 -0
  1634. package/dist/engine/agent-api/nodes/game/lookSignature.js +45 -0
  1635. package/dist/engine/agent-api/nodes/game/lookSignature.js.map +1 -0
  1636. package/dist/engine/agent-api/nodes/game/racingCamera.d.ts +3 -0
  1637. package/dist/engine/agent-api/nodes/game/racingCamera.d.ts.map +1 -0
  1638. package/dist/engine/agent-api/nodes/game/racingCamera.js +51 -0
  1639. package/dist/engine/agent-api/nodes/game/racingCamera.js.map +1 -0
  1640. package/dist/engine/agent-api/nodes/game/runtime.d.ts +3 -0
  1641. package/dist/engine/agent-api/nodes/game/runtime.d.ts.map +1 -0
  1642. package/dist/engine/agent-api/nodes/game/runtime.js +30 -0
  1643. package/dist/engine/agent-api/nodes/game/runtime.js.map +1 -0
  1644. package/dist/engine/agent-api/nodes/gameFeel.d.ts +10 -0
  1645. package/dist/engine/agent-api/nodes/gameFeel.d.ts.map +1 -0
  1646. package/dist/engine/agent-api/nodes/gameFeel.js +4 -0
  1647. package/dist/engine/agent-api/nodes/gameFeel.js.map +1 -0
  1648. package/dist/engine/agent-api/nodes/games.d.ts +27 -0
  1649. package/dist/engine/agent-api/nodes/games.d.ts.map +1 -0
  1650. package/dist/engine/agent-api/nodes/games.js +191 -0
  1651. package/dist/engine/agent-api/nodes/games.js.map +1 -0
  1652. package/dist/engine/agent-api/nodes/geometry.d.ts +8 -0
  1653. package/dist/engine/agent-api/nodes/geometry.d.ts.map +1 -0
  1654. package/dist/engine/agent-api/nodes/geometry.js +9 -0
  1655. package/dist/engine/agent-api/nodes/geometry.js.map +1 -0
  1656. package/dist/engine/agent-api/nodes/groups.d.ts +16 -0
  1657. package/dist/engine/agent-api/nodes/groups.d.ts.map +1 -0
  1658. package/dist/engine/agent-api/nodes/groups.js +56 -0
  1659. package/dist/engine/agent-api/nodes/groups.js.map +1 -0
  1660. package/dist/engine/agent-api/nodes/instances.d.ts +71 -0
  1661. package/dist/engine/agent-api/nodes/instances.d.ts.map +1 -0
  1662. package/dist/engine/agent-api/nodes/instances.js +126 -0
  1663. package/dist/engine/agent-api/nodes/instances.js.map +1 -0
  1664. package/dist/engine/agent-api/nodes/interactions.d.ts +35 -0
  1665. package/dist/engine/agent-api/nodes/interactions.d.ts.map +1 -0
  1666. package/dist/engine/agent-api/nodes/interactions.js +41 -0
  1667. package/dist/engine/agent-api/nodes/interactions.js.map +1 -0
  1668. package/dist/engine/agent-api/nodes/labels.d.ts +13 -0
  1669. package/dist/engine/agent-api/nodes/labels.d.ts.map +1 -0
  1670. package/dist/engine/agent-api/nodes/labels.js +61 -0
  1671. package/dist/engine/agent-api/nodes/labels.js.map +1 -0
  1672. package/dist/engine/agent-api/nodes/lights.d.ts +78 -0
  1673. package/dist/engine/agent-api/nodes/lights.d.ts.map +1 -0
  1674. package/dist/engine/agent-api/nodes/lights.js +111 -0
  1675. package/dist/engine/agent-api/nodes/lights.js.map +1 -0
  1676. package/dist/engine/agent-api/nodes/material.d.ts +84 -0
  1677. package/dist/engine/agent-api/nodes/material.d.ts.map +1 -0
  1678. package/dist/engine/agent-api/nodes/material.js +405 -0
  1679. package/dist/engine/agent-api/nodes/material.js.map +1 -0
  1680. package/dist/engine/agent-api/nodes/materialTools.d.ts +7 -0
  1681. package/dist/engine/agent-api/nodes/materialTools.d.ts.map +1 -0
  1682. package/dist/engine/agent-api/nodes/materialTools.js +311 -0
  1683. package/dist/engine/agent-api/nodes/materialTools.js.map +1 -0
  1684. package/dist/engine/agent-api/nodes/model.d.ts +20 -0
  1685. package/dist/engine/agent-api/nodes/model.d.ts.map +1 -0
  1686. package/dist/engine/agent-api/nodes/model.js +61 -0
  1687. package/dist/engine/agent-api/nodes/model.js.map +1 -0
  1688. package/dist/engine/agent-api/nodes/neon.d.ts +15 -0
  1689. package/dist/engine/agent-api/nodes/neon.d.ts.map +1 -0
  1690. package/dist/engine/agent-api/nodes/neon.js +22 -0
  1691. package/dist/engine/agent-api/nodes/neon.js.map +1 -0
  1692. package/dist/engine/agent-api/nodes/particles.d.ts +25 -0
  1693. package/dist/engine/agent-api/nodes/particles.d.ts.map +1 -0
  1694. package/dist/engine/agent-api/nodes/particles.js +46 -0
  1695. package/dist/engine/agent-api/nodes/particles.js.map +1 -0
  1696. package/dist/engine/agent-api/nodes/physics.d.ts +49 -0
  1697. package/dist/engine/agent-api/nodes/physics.d.ts.map +1 -0
  1698. package/dist/engine/agent-api/nodes/physics.js +508 -0
  1699. package/dist/engine/agent-api/nodes/physics.js.map +1 -0
  1700. package/dist/engine/agent-api/nodes/prefabs/cityBlock.d.ts +3 -0
  1701. package/dist/engine/agent-api/nodes/prefabs/cityBlock.d.ts.map +1 -0
  1702. package/dist/engine/agent-api/nodes/prefabs/cityBlock.js +114 -0
  1703. package/dist/engine/agent-api/nodes/prefabs/cityBlock.js.map +1 -0
  1704. package/dist/engine/agent-api/nodes/prefabs/gamePresentation.d.ts +22 -0
  1705. package/dist/engine/agent-api/nodes/prefabs/gamePresentation.d.ts.map +1 -0
  1706. package/dist/engine/agent-api/nodes/prefabs/gamePresentation.js +871 -0
  1707. package/dist/engine/agent-api/nodes/prefabs/gamePresentation.js.map +1 -0
  1708. package/dist/engine/agent-api/nodes/prefabs/index.d.ts +43 -0
  1709. package/dist/engine/agent-api/nodes/prefabs/index.d.ts.map +1 -0
  1710. package/dist/engine/agent-api/nodes/prefabs/index.js +632 -0
  1711. package/dist/engine/agent-api/nodes/prefabs/index.js.map +1 -0
  1712. package/dist/engine/agent-api/nodes/primitives.d.ts +12 -0
  1713. package/dist/engine/agent-api/nodes/primitives.d.ts.map +1 -0
  1714. package/dist/engine/agent-api/nodes/primitives.js +37 -0
  1715. package/dist/engine/agent-api/nodes/primitives.js.map +1 -0
  1716. package/dist/engine/agent-api/nodes/probes.d.ts +48 -0
  1717. package/dist/engine/agent-api/nodes/probes.d.ts.map +1 -0
  1718. package/dist/engine/agent-api/nodes/probes.js +34 -0
  1719. package/dist/engine/agent-api/nodes/probes.js.map +1 -0
  1720. package/dist/engine/agent-api/nodes/product.d.ts +18 -0
  1721. package/dist/engine/agent-api/nodes/product.d.ts.map +1 -0
  1722. package/dist/engine/agent-api/nodes/product.js +68 -0
  1723. package/dist/engine/agent-api/nodes/product.js.map +1 -0
  1724. package/dist/engine/agent-api/nodes/prompt/promptPlan.d.ts +17 -0
  1725. package/dist/engine/agent-api/nodes/prompt/promptPlan.d.ts.map +1 -0
  1726. package/dist/engine/agent-api/nodes/prompt/promptPlan.js +168 -0
  1727. package/dist/engine/agent-api/nodes/prompt/promptPlan.js.map +1 -0
  1728. package/dist/engine/agent-api/nodes/prompt/promptPlanMappings.d.ts +59 -0
  1729. package/dist/engine/agent-api/nodes/prompt/promptPlanMappings.d.ts.map +1 -0
  1730. package/dist/engine/agent-api/nodes/prompt/promptPlanMappings.js +71 -0
  1731. package/dist/engine/agent-api/nodes/prompt/promptPlanMappings.js.map +1 -0
  1732. package/dist/engine/agent-api/nodes/prompt/promptPlanV2.d.ts +58 -0
  1733. package/dist/engine/agent-api/nodes/prompt/promptPlanV2.d.ts.map +1 -0
  1734. package/dist/engine/agent-api/nodes/prompt/promptPlanV2.js +285 -0
  1735. package/dist/engine/agent-api/nodes/prompt/promptPlanV2.js.map +1 -0
  1736. package/dist/engine/agent-api/nodes/prompt/promptRecipes.d.ts +19 -0
  1737. package/dist/engine/agent-api/nodes/prompt/promptRecipes.d.ts.map +1 -0
  1738. package/dist/engine/agent-api/nodes/prompt/promptRecipes.js +214 -0
  1739. package/dist/engine/agent-api/nodes/prompt/promptRecipes.js.map +1 -0
  1740. package/dist/engine/agent-api/nodes/promptPlans.d.ts +4 -0
  1741. package/dist/engine/agent-api/nodes/promptPlans.d.ts.map +1 -0
  1742. package/dist/engine/agent-api/nodes/promptPlans.js +24 -0
  1743. package/dist/engine/agent-api/nodes/promptPlans.js.map +1 -0
  1744. package/dist/engine/agent-api/nodes/scene.d.ts +28 -0
  1745. package/dist/engine/agent-api/nodes/scene.d.ts.map +1 -0
  1746. package/dist/engine/agent-api/nodes/scene.js +113 -0
  1747. package/dist/engine/agent-api/nodes/scene.js.map +1 -0
  1748. package/dist/engine/agent-api/nodes/sceneKits.d.ts +21 -0
  1749. package/dist/engine/agent-api/nodes/sceneKits.d.ts.map +1 -0
  1750. package/dist/engine/agent-api/nodes/sceneKits.js +91 -0
  1751. package/dist/engine/agent-api/nodes/sceneKits.js.map +1 -0
  1752. package/dist/engine/agent-api/nodes/shadows.d.ts +21 -0
  1753. package/dist/engine/agent-api/nodes/shadows.d.ts.map +1 -0
  1754. package/dist/engine/agent-api/nodes/shadows.js +35 -0
  1755. package/dist/engine/agent-api/nodes/shadows.js.map +1 -0
  1756. package/dist/engine/agent-api/nodes/sky.d.ts +46 -0
  1757. package/dist/engine/agent-api/nodes/sky.d.ts.map +1 -0
  1758. package/dist/engine/agent-api/nodes/sky.js +121 -0
  1759. package/dist/engine/agent-api/nodes/sky.js.map +1 -0
  1760. package/dist/engine/agent-api/nodes/solar.d.ts +17 -0
  1761. package/dist/engine/agent-api/nodes/solar.d.ts.map +1 -0
  1762. package/dist/engine/agent-api/nodes/solar.js +64 -0
  1763. package/dist/engine/agent-api/nodes/solar.js.map +1 -0
  1764. package/dist/engine/agent-api/nodes/text3d.d.ts +11 -0
  1765. package/dist/engine/agent-api/nodes/text3d.d.ts.map +1 -0
  1766. package/dist/engine/agent-api/nodes/text3d.js +42 -0
  1767. package/dist/engine/agent-api/nodes/text3d.js.map +1 -0
  1768. package/dist/engine/agent-api/nodes/timeline.d.ts +6 -0
  1769. package/dist/engine/agent-api/nodes/timeline.d.ts.map +1 -0
  1770. package/dist/engine/agent-api/nodes/timeline.js +22 -0
  1771. package/dist/engine/agent-api/nodes/timeline.js.map +1 -0
  1772. package/dist/engine/agent-api/nodes/types/runtime.d.ts +656 -0
  1773. package/dist/engine/agent-api/nodes/types/runtime.d.ts.map +1 -0
  1774. package/dist/engine/agent-api/nodes/types/runtime.js +4 -0
  1775. package/dist/engine/agent-api/nodes/types/runtime.js.map +1 -0
  1776. package/dist/engine/agent-api/nodes/types.d.ts +2043 -0
  1777. package/dist/engine/agent-api/nodes/types.d.ts.map +1 -0
  1778. package/dist/engine/agent-api/nodes/types.js +3 -0
  1779. package/dist/engine/agent-api/nodes/types.js.map +1 -0
  1780. package/dist/engine/agent-api/nodes/ui.d.ts +40 -0
  1781. package/dist/engine/agent-api/nodes/ui.d.ts.map +1 -0
  1782. package/dist/engine/agent-api/nodes/ui.js +104 -0
  1783. package/dist/engine/agent-api/nodes/ui.js.map +1 -0
  1784. package/dist/engine/agent-api/nodes/visualScripting.d.ts +7 -0
  1785. package/dist/engine/agent-api/nodes/visualScripting.d.ts.map +1 -0
  1786. package/dist/engine/agent-api/nodes/visualScripting.js +8 -0
  1787. package/dist/engine/agent-api/nodes/visualScripting.js.map +1 -0
  1788. package/dist/engine/agent-api/nodes/water.d.ts +23 -0
  1789. package/dist/engine/agent-api/nodes/water.d.ts.map +1 -0
  1790. package/dist/engine/agent-api/nodes/water.js +57 -0
  1791. package/dist/engine/agent-api/nodes/water.js.map +1 -0
  1792. package/dist/engine/agent-api/nodes/weather.d.ts +39 -0
  1793. package/dist/engine/agent-api/nodes/weather.d.ts.map +1 -0
  1794. package/dist/engine/agent-api/nodes/weather.js +88 -0
  1795. package/dist/engine/agent-api/nodes/weather.js.map +1 -0
  1796. package/dist/engine/agent-api/particle-fountain-runtime.d.ts +4 -2
  1797. package/dist/engine/agent-api/particle-fountain-runtime.d.ts.map +1 -1
  1798. package/dist/engine/agent-api/particle-fountain-runtime.js +3 -2
  1799. package/dist/engine/agent-api/particle-fountain-runtime.js.map +1 -1
  1800. package/dist/engine/agent-api/performanceEvidence.d.ts +11 -0
  1801. package/dist/engine/agent-api/performanceEvidence.d.ts.map +1 -0
  1802. package/dist/engine/agent-api/performanceEvidence.js +93 -0
  1803. package/dist/engine/agent-api/performanceEvidence.js.map +1 -0
  1804. package/dist/engine/agent-api/platform.d.ts +10 -0
  1805. package/dist/engine/agent-api/platform.d.ts.map +1 -0
  1806. package/dist/engine/agent-api/platform.js +18 -0
  1807. package/dist/engine/agent-api/platform.js.map +1 -0
  1808. package/dist/engine/agent-api/postBridge.d.ts +233 -0
  1809. package/dist/engine/agent-api/postBridge.d.ts.map +1 -0
  1810. package/dist/engine/agent-api/postBridge.js +711 -0
  1811. package/dist/engine/agent-api/postBridge.js.map +1 -0
  1812. package/dist/engine/agent-api/postPresets.d.ts +46 -0
  1813. package/dist/engine/agent-api/postPresets.d.ts.map +1 -0
  1814. package/dist/engine/agent-api/postPresets.js +179 -0
  1815. package/dist/engine/agent-api/postPresets.js.map +1 -0
  1816. package/dist/engine/agent-api/product-viewer-runtime.d.ts +6 -4
  1817. package/dist/engine/agent-api/product-viewer-runtime.d.ts.map +1 -1
  1818. package/dist/engine/agent-api/product-viewer-runtime.js +6 -3
  1819. package/dist/engine/agent-api/product-viewer-runtime.js.map +1 -1
  1820. package/dist/engine/agent-api/public/devtools.d.ts +5 -0
  1821. package/dist/engine/agent-api/public/devtools.d.ts.map +1 -0
  1822. package/dist/engine/agent-api/public/devtools.js +8 -0
  1823. package/dist/engine/agent-api/public/devtools.js.map +1 -0
  1824. package/dist/engine/agent-api/publishedUnion.d.ts +156 -0
  1825. package/dist/engine/agent-api/publishedUnion.d.ts.map +1 -0
  1826. package/dist/engine/agent-api/publishedUnion.js +92 -0
  1827. package/dist/engine/agent-api/publishedUnion.js.map +1 -0
  1828. package/dist/engine/agent-api/rendererDiagnostics.d.ts +15 -0
  1829. package/dist/engine/agent-api/rendererDiagnostics.d.ts.map +1 -0
  1830. package/dist/engine/agent-api/rendererDiagnostics.js +322 -0
  1831. package/dist/engine/agent-api/rendererDiagnostics.js.map +1 -0
  1832. package/dist/engine/agent-api/rendererReports.d.ts +45 -0
  1833. package/dist/engine/agent-api/rendererReports.d.ts.map +1 -0
  1834. package/dist/engine/agent-api/rendererReports.js +17 -0
  1835. package/dist/engine/agent-api/rendererReports.js.map +1 -0
  1836. package/dist/engine/agent-api/runtimeEvidence.d.ts +7 -0
  1837. package/dist/engine/agent-api/runtimeEvidence.d.ts.map +1 -0
  1838. package/dist/engine/agent-api/runtimeEvidence.js +112 -0
  1839. package/dist/engine/agent-api/runtimeEvidence.js.map +1 -0
  1840. package/dist/engine/agent-api/sceneEvidence.d.ts +4 -0
  1841. package/dist/engine/agent-api/sceneEvidence.d.ts.map +1 -0
  1842. package/dist/engine/agent-api/sceneEvidence.js +94 -0
  1843. package/dist/engine/agent-api/sceneEvidence.js.map +1 -0
  1844. package/dist/engine/agent-api/sceneGraph.d.ts +111 -0
  1845. package/dist/engine/agent-api/sceneGraph.d.ts.map +1 -0
  1846. package/dist/engine/agent-api/sceneGraph.js +502 -0
  1847. package/dist/engine/agent-api/sceneGraph.js.map +1 -0
  1848. package/dist/engine/agent-api/sceneKitDiagnostics.d.ts +14 -0
  1849. package/dist/engine/agent-api/sceneKitDiagnostics.d.ts.map +1 -0
  1850. package/dist/engine/agent-api/sceneKitDiagnostics.js +278 -0
  1851. package/dist/engine/agent-api/sceneKitDiagnostics.js.map +1 -0
  1852. package/dist/engine/agent-api/sceneMath.d.ts +50 -0
  1853. package/dist/engine/agent-api/sceneMath.d.ts.map +1 -0
  1854. package/dist/engine/agent-api/sceneMath.js +354 -0
  1855. package/dist/engine/agent-api/sceneMath.js.map +1 -0
  1856. package/dist/engine/agent-api/time/FixedStepDriver.d.ts +108 -0
  1857. package/dist/engine/agent-api/time/FixedStepDriver.d.ts.map +1 -0
  1858. package/dist/engine/agent-api/time/FixedStepDriver.js +169 -0
  1859. package/dist/engine/agent-api/time/FixedStepDriver.js.map +1 -0
  1860. package/dist/engine/agent-api/time/Interpolation.d.ts +55 -0
  1861. package/dist/engine/agent-api/time/Interpolation.d.ts.map +1 -0
  1862. package/dist/engine/agent-api/time/Interpolation.js +181 -0
  1863. package/dist/engine/agent-api/time/Interpolation.js.map +1 -0
  1864. package/dist/engine/agent-api/time/TimeController.d.ts +63 -0
  1865. package/dist/engine/agent-api/time/TimeController.d.ts.map +1 -0
  1866. package/dist/engine/agent-api/time/TimeController.js +139 -0
  1867. package/dist/engine/agent-api/time/TimeController.js.map +1 -0
  1868. package/dist/engine/agent-api/vehicle/BicycleModel.d.ts +107 -0
  1869. package/dist/engine/agent-api/vehicle/BicycleModel.d.ts.map +1 -0
  1870. package/dist/engine/agent-api/vehicle/BicycleModel.js +207 -0
  1871. package/dist/engine/agent-api/vehicle/BicycleModel.js.map +1 -0
  1872. package/dist/engine/agent-api/vfx/atlas.d.ts +30 -0
  1873. package/dist/engine/agent-api/vfx/atlas.d.ts.map +1 -0
  1874. package/dist/engine/agent-api/vfx/atlas.js +45 -0
  1875. package/dist/engine/agent-api/vfx/atlas.js.map +1 -0
  1876. package/dist/engine/agent-api/vfx/atmosphere-api.d.ts +6 -0
  1877. package/dist/engine/agent-api/vfx/atmosphere-api.d.ts.map +1 -0
  1878. package/dist/engine/agent-api/vfx/atmosphere-api.js +34 -0
  1879. package/dist/engine/agent-api/vfx/atmosphere-api.js.map +1 -0
  1880. package/dist/engine/agent-api/vfx/bridge.d.ts +15 -0
  1881. package/dist/engine/agent-api/vfx/bridge.d.ts.map +1 -0
  1882. package/dist/engine/agent-api/vfx/bridge.js +59 -0
  1883. package/dist/engine/agent-api/vfx/bridge.js.map +1 -0
  1884. package/dist/engine/agent-api/vfx/diagnostics.d.ts +4 -0
  1885. package/dist/engine/agent-api/vfx/diagnostics.d.ts.map +1 -0
  1886. package/dist/engine/agent-api/vfx/diagnostics.js +57 -0
  1887. package/dist/engine/agent-api/vfx/diagnostics.js.map +1 -0
  1888. package/dist/engine/agent-api/vfx/effects-api.d.ts +33 -0
  1889. package/dist/engine/agent-api/vfx/effects-api.d.ts.map +1 -0
  1890. package/dist/engine/agent-api/vfx/effects-api.js +355 -0
  1891. package/dist/engine/agent-api/vfx/effects-api.js.map +1 -0
  1892. package/dist/engine/agent-api/vfx/gameEffects.d.ts +32 -0
  1893. package/dist/engine/agent-api/vfx/gameEffects.d.ts.map +1 -0
  1894. package/dist/engine/agent-api/vfx/gameEffects.js +244 -0
  1895. package/dist/engine/agent-api/vfx/gameEffects.js.map +1 -0
  1896. package/dist/engine/agent-api/vfx/index.d.ts +7 -0
  1897. package/dist/engine/agent-api/vfx/index.d.ts.map +1 -0
  1898. package/dist/engine/agent-api/vfx/index.js +8 -0
  1899. package/dist/engine/agent-api/vfx/index.js.map +1 -0
  1900. package/dist/engine/agent-api/vfx/lookLint.d.ts +2 -0
  1901. package/dist/engine/agent-api/vfx/lookLint.d.ts.map +1 -0
  1902. package/dist/engine/agent-api/vfx/lookLint.js +66 -0
  1903. package/dist/engine/agent-api/vfx/lookLint.js.map +1 -0
  1904. package/dist/engine/agent-api/world/biomes.d.ts +130 -0
  1905. package/dist/engine/agent-api/world/biomes.d.ts.map +1 -0
  1906. package/dist/engine/agent-api/world/biomes.js +274 -0
  1907. package/dist/engine/agent-api/world/biomes.js.map +1 -0
  1908. package/dist/engine/agent-api/world/flags.d.ts +13 -0
  1909. package/dist/engine/agent-api/world/flags.d.ts.map +1 -0
  1910. package/dist/engine/agent-api/world/flags.js +32 -0
  1911. package/dist/engine/agent-api/world/flags.js.map +1 -0
  1912. package/dist/engine/agent-api/world/index.d.ts +53 -0
  1913. package/dist/engine/agent-api/world/index.d.ts.map +1 -0
  1914. package/dist/engine/agent-api/world/index.js +46 -0
  1915. package/dist/engine/agent-api/world/index.js.map +1 -0
  1916. package/dist/engine/agent-api/world/kits.d.ts +108 -0
  1917. package/dist/engine/agent-api/world/kits.d.ts.map +1 -0
  1918. package/dist/engine/agent-api/world/kits.js +330 -0
  1919. package/dist/engine/agent-api/world/kits.js.map +1 -0
  1920. package/dist/engine/agent-api/world/placement.d.ts +65 -0
  1921. package/dist/engine/agent-api/world/placement.d.ts.map +1 -0
  1922. package/dist/engine/agent-api/world/placement.js +267 -0
  1923. package/dist/engine/agent-api/world/placement.js.map +1 -0
  1924. package/dist/engine/agent-api/world/queries.d.ts +81 -0
  1925. package/dist/engine/agent-api/world/queries.d.ts.map +1 -0
  1926. package/dist/engine/agent-api/world/queries.js +175 -0
  1927. package/dist/engine/agent-api/world/queries.js.map +1 -0
  1928. package/dist/engine/agent-api/world/register.d.ts +2 -0
  1929. package/dist/engine/agent-api/world/register.d.ts.map +1 -0
  1930. package/dist/engine/agent-api/world/register.js +96 -0
  1931. package/dist/engine/agent-api/world/register.js.map +1 -0
  1932. package/dist/engine/agent-api/world/room.d.ts +45 -0
  1933. package/dist/engine/agent-api/world/room.d.ts.map +1 -0
  1934. package/dist/engine/agent-api/world/room.js +154 -0
  1935. package/dist/engine/agent-api/world/room.js.map +1 -0
  1936. package/dist/engine/agent-api/world/runtime.d.ts +85 -0
  1937. package/dist/engine/agent-api/world/runtime.d.ts.map +1 -0
  1938. package/dist/engine/agent-api/world/runtime.js +108 -0
  1939. package/dist/engine/agent-api/world/runtime.js.map +1 -0
  1940. package/dist/engine/agent-api/world/scatter.d.ts +160 -0
  1941. package/dist/engine/agent-api/world/scatter.d.ts.map +1 -0
  1942. package/dist/engine/agent-api/world/scatter.js +396 -0
  1943. package/dist/engine/agent-api/world/scatter.js.map +1 -0
  1944. package/dist/engine/agent-api/world/spline.d.ts +67 -0
  1945. package/dist/engine/agent-api/world/spline.d.ts.map +1 -0
  1946. package/dist/engine/agent-api/world/spline.js +337 -0
  1947. package/dist/engine/agent-api/world/spline.js.map +1 -0
  1948. package/dist/engine/agent-api/world/street.d.ts +49 -0
  1949. package/dist/engine/agent-api/world/street.d.ts.map +1 -0
  1950. package/dist/engine/agent-api/world/street.js +147 -0
  1951. package/dist/engine/agent-api/world/street.js.map +1 -0
  1952. package/dist/engine/agent-api/world/terrain.d.ts +205 -0
  1953. package/dist/engine/agent-api/world/terrain.d.ts.map +1 -0
  1954. package/dist/engine/agent-api/world/terrain.js +404 -0
  1955. package/dist/engine/agent-api/world/terrain.js.map +1 -0
  1956. package/dist/engine/agent-api/world/timeOfDay.d.ts +70 -0
  1957. package/dist/engine/agent-api/world/timeOfDay.d.ts.map +1 -0
  1958. package/dist/engine/agent-api/world/timeOfDay.js +283 -0
  1959. package/dist/engine/agent-api/world/timeOfDay.js.map +1 -0
  1960. package/dist/engine/agent-api/world/types.d.ts +20 -0
  1961. package/dist/engine/agent-api/world/types.d.ts.map +1 -0
  1962. package/dist/engine/agent-api/world/types.js +2 -0
  1963. package/dist/engine/agent-api/world/types.js.map +1 -0
  1964. package/dist/engine/agent-api/world/water.d.ts +77 -0
  1965. package/dist/engine/agent-api/world/water.d.ts.map +1 -0
  1966. package/dist/engine/agent-api/world/water.js +60 -0
  1967. package/dist/engine/agent-api/world/water.js.map +1 -0
  1968. package/dist/engine/agent-api/world/wind.d.ts +20 -0
  1969. package/dist/engine/agent-api/world/wind.d.ts.map +1 -0
  1970. package/dist/engine/agent-api/world/wind.js +17 -0
  1971. package/dist/engine/agent-api/world/wind.js.map +1 -0
  1972. package/dist/engine/contracts/animation.d.ts +134 -0
  1973. package/dist/engine/contracts/animation.d.ts.map +1 -0
  1974. package/dist/engine/contracts/animation.js +45 -0
  1975. package/dist/engine/contracts/animation.js.map +1 -0
  1976. package/dist/engine/contracts/app.d.ts +41 -0
  1977. package/dist/engine/contracts/app.d.ts.map +1 -0
  1978. package/dist/engine/contracts/app.js +21 -0
  1979. package/dist/engine/contracts/app.js.map +1 -0
  1980. package/dist/engine/contracts/art.d.ts +57 -0
  1981. package/dist/engine/contracts/art.d.ts.map +1 -0
  1982. package/dist/engine/contracts/art.js +10 -0
  1983. package/dist/engine/contracts/art.js.map +1 -0
  1984. package/dist/engine/contracts/assets.d.ts +38 -0
  1985. package/dist/engine/contracts/assets.d.ts.map +1 -0
  1986. package/dist/engine/contracts/assets.js +7 -0
  1987. package/dist/engine/contracts/assets.js.map +1 -0
  1988. package/dist/engine/contracts/atmosphere.d.ts +130 -0
  1989. package/dist/engine/contracts/atmosphere.d.ts.map +1 -0
  1990. package/dist/engine/contracts/atmosphere.js +33 -0
  1991. package/dist/engine/contracts/atmosphere.js.map +1 -0
  1992. package/dist/engine/contracts/camera.d.ts +195 -0
  1993. package/dist/engine/contracts/camera.d.ts.map +1 -0
  1994. package/dist/engine/contracts/camera.js +42 -0
  1995. package/dist/engine/contracts/camera.js.map +1 -0
  1996. package/dist/engine/contracts/compiler.d.ts +147 -0
  1997. package/dist/engine/contracts/compiler.d.ts.map +1 -0
  1998. package/dist/engine/contracts/compiler.js +110 -0
  1999. package/dist/engine/contracts/compiler.js.map +1 -0
  2000. package/dist/engine/contracts/diagnostics.d.ts +37 -0
  2001. package/dist/engine/contracts/diagnostics.d.ts.map +1 -0
  2002. package/dist/engine/contracts/diagnostics.js +30 -0
  2003. package/dist/engine/contracts/diagnostics.js.map +1 -0
  2004. package/dist/engine/contracts/effects.d.ts +258 -0
  2005. package/dist/engine/contracts/effects.d.ts.map +1 -0
  2006. package/dist/engine/contracts/effects.js +77 -0
  2007. package/dist/engine/contracts/effects.js.map +1 -0
  2008. package/dist/engine/contracts/environment.d.ts +55 -0
  2009. package/dist/engine/contracts/environment.d.ts.map +1 -0
  2010. package/dist/engine/contracts/environment.js +40 -0
  2011. package/dist/engine/contracts/environment.js.map +1 -0
  2012. package/dist/engine/contracts/flags.d.ts +25 -0
  2013. package/dist/engine/contracts/flags.d.ts.map +1 -0
  2014. package/dist/engine/contracts/flags.js +205 -0
  2015. package/dist/engine/contracts/flags.js.map +1 -0
  2016. package/dist/engine/contracts/game.d.ts +178 -0
  2017. package/dist/engine/contracts/game.d.ts.map +1 -0
  2018. package/dist/engine/contracts/game.js +34 -0
  2019. package/dist/engine/contracts/game.js.map +1 -0
  2020. package/dist/engine/contracts/gameSound.d.ts +3 -0
  2021. package/dist/engine/contracts/gameSound.d.ts.map +1 -0
  2022. package/dist/engine/contracts/gameSound.js +12 -0
  2023. package/dist/engine/contracts/gameSound.js.map +1 -0
  2024. package/dist/engine/contracts/index.d.ts +25 -0
  2025. package/dist/engine/contracts/index.d.ts.map +1 -0
  2026. package/dist/engine/contracts/index.js +25 -0
  2027. package/dist/engine/contracts/index.js.map +1 -0
  2028. package/dist/engine/contracts/lighting.d.ts +89 -0
  2029. package/dist/engine/contracts/lighting.d.ts.map +1 -0
  2030. package/dist/engine/contracts/lighting.js +32 -0
  2031. package/dist/engine/contracts/lighting.js.map +1 -0
  2032. package/dist/engine/contracts/looks.d.ts +62 -0
  2033. package/dist/engine/contracts/looks.d.ts.map +1 -0
  2034. package/dist/engine/contracts/looks.js +50 -0
  2035. package/dist/engine/contracts/looks.js.map +1 -0
  2036. package/dist/engine/contracts/materials.d.ts +81 -0
  2037. package/dist/engine/contracts/materials.d.ts.map +1 -0
  2038. package/dist/engine/contracts/materials.js +35 -0
  2039. package/dist/engine/contracts/materials.js.map +1 -0
  2040. package/dist/engine/contracts/output.d.ts +47 -0
  2041. package/dist/engine/contracts/output.d.ts.map +1 -0
  2042. package/dist/engine/contracts/output.js +6 -0
  2043. package/dist/engine/contracts/output.js.map +1 -0
  2044. package/dist/engine/contracts/post.d.ts +64 -0
  2045. package/dist/engine/contracts/post.d.ts.map +1 -0
  2046. package/dist/engine/contracts/post.js +20 -0
  2047. package/dist/engine/contracts/post.js.map +1 -0
  2048. package/dist/engine/contracts/runtimeNodes.d.ts +40 -0
  2049. package/dist/engine/contracts/runtimeNodes.d.ts.map +1 -0
  2050. package/dist/engine/contracts/runtimeNodes.js +19 -0
  2051. package/dist/engine/contracts/runtimeNodes.js.map +1 -0
  2052. package/dist/engine/contracts/sceneGraph.d.ts +33 -0
  2053. package/dist/engine/contracts/sceneGraph.d.ts.map +1 -0
  2054. package/dist/engine/contracts/sceneGraph.js +154 -0
  2055. package/dist/engine/contracts/sceneGraph.js.map +1 -0
  2056. package/dist/engine/contracts/stubs/game.d.ts +15 -0
  2057. package/dist/engine/contracts/stubs/game.d.ts.map +1 -0
  2058. package/dist/engine/contracts/stubs/game.js +175 -0
  2059. package/dist/engine/contracts/stubs/game.js.map +1 -0
  2060. package/dist/engine/contracts/time.d.ts +119 -0
  2061. package/dist/engine/contracts/time.d.ts.map +1 -0
  2062. package/dist/engine/contracts/time.js +87 -0
  2063. package/dist/engine/contracts/time.js.map +1 -0
  2064. package/dist/engine/contracts/world.d.ts +54 -0
  2065. package/dist/engine/contracts/world.d.ts.map +1 -0
  2066. package/dist/engine/contracts/world.js +64 -0
  2067. package/dist/engine/contracts/world.js.map +1 -0
  2068. package/dist/engine/deprecated/advanced-runtime.d.ts +2 -0
  2069. package/dist/engine/deprecated/advanced-runtime.d.ts.map +1 -0
  2070. package/dist/engine/deprecated/advanced-runtime.js +11 -0
  2071. package/dist/engine/deprecated/advanced-runtime.js.map +1 -0
  2072. package/dist/engine/deprecated/apps.d.ts +2 -0
  2073. package/dist/engine/deprecated/apps.d.ts.map +1 -0
  2074. package/dist/engine/deprecated/apps.js +11 -0
  2075. package/dist/engine/deprecated/apps.js.map +1 -0
  2076. package/dist/engine/deprecated/assets-browser.d.ts +2 -0
  2077. package/dist/engine/deprecated/assets-browser.d.ts.map +1 -0
  2078. package/dist/engine/deprecated/assets-browser.js +11 -0
  2079. package/dist/engine/deprecated/assets-browser.js.map +1 -0
  2080. package/dist/engine/deprecated/contracts.d.ts +2 -0
  2081. package/dist/engine/deprecated/contracts.d.ts.map +1 -0
  2082. package/dist/engine/deprecated/contracts.js +11 -0
  2083. package/dist/engine/deprecated/contracts.js.map +1 -0
  2084. package/dist/engine/deprecated/media-node.d.ts +2 -0
  2085. package/dist/engine/deprecated/media-node.d.ts.map +1 -0
  2086. package/dist/engine/deprecated/media-node.js +11 -0
  2087. package/dist/engine/deprecated/media-node.js.map +1 -0
  2088. package/dist/engine/deprecated/production-runtime.d.ts +2 -0
  2089. package/dist/engine/deprecated/production-runtime.d.ts.map +1 -0
  2090. package/dist/engine/deprecated/production-runtime.js +11 -0
  2091. package/dist/engine/deprecated/production-runtime.js.map +1 -0
  2092. package/dist/engine/deprecated/rendering-production-runtime.d.ts +2 -0
  2093. package/dist/engine/deprecated/rendering-production-runtime.d.ts.map +1 -0
  2094. package/dist/engine/deprecated/rendering-production-runtime.js +11 -0
  2095. package/dist/engine/deprecated/rendering-production-runtime.js.map +1 -0
  2096. package/dist/engine/deprecated/rendering-webgpu.d.ts +2 -0
  2097. package/dist/engine/deprecated/rendering-webgpu.d.ts.map +1 -0
  2098. package/dist/engine/deprecated/rendering-webgpu.js +11 -0
  2099. package/dist/engine/deprecated/rendering-webgpu.js.map +1 -0
  2100. package/dist/engine/deprecated/rendering.d.ts +2 -0
  2101. package/dist/engine/deprecated/rendering.d.ts.map +1 -0
  2102. package/dist/engine/deprecated/rendering.js +11 -0
  2103. package/dist/engine/deprecated/rendering.js.map +1 -0
  2104. package/dist/engine/deprecated/workflows-production.d.ts +2 -0
  2105. package/dist/engine/deprecated/workflows-production.d.ts.map +1 -0
  2106. package/dist/engine/deprecated/workflows-production.js +11 -0
  2107. package/dist/engine/deprecated/workflows-production.js.map +1 -0
  2108. package/dist/engine/devtools/environmentDiagnostics.d.ts +2 -0
  2109. package/dist/engine/devtools/environmentDiagnostics.d.ts.map +1 -0
  2110. package/dist/engine/devtools/environmentDiagnostics.js +5 -0
  2111. package/dist/engine/devtools/environmentDiagnostics.js.map +1 -0
  2112. package/dist/engine/devtools/environments/BiomeEnvironmentRegistry.d.ts +34 -0
  2113. package/dist/engine/devtools/environments/BiomeEnvironmentRegistry.d.ts.map +1 -0
  2114. package/dist/engine/devtools/environments/BiomeEnvironmentRegistry.js +100 -0
  2115. package/dist/engine/devtools/environments/BiomeEnvironmentRegistry.js.map +1 -0
  2116. package/dist/engine/devtools/environments/EnvironmentPreview.d.ts +13 -0
  2117. package/dist/engine/devtools/environments/EnvironmentPreview.d.ts.map +1 -0
  2118. package/dist/engine/devtools/environments/EnvironmentPreview.js +16 -0
  2119. package/dist/engine/devtools/environments/EnvironmentPreview.js.map +1 -0
  2120. package/dist/engine/devtools/environments/EnvironmentRegistry.d.ts +63 -0
  2121. package/dist/engine/devtools/environments/EnvironmentRegistry.d.ts.map +1 -0
  2122. package/dist/engine/devtools/environments/EnvironmentRegistry.js +155 -0
  2123. package/dist/engine/devtools/environments/EnvironmentRegistry.js.map +1 -0
  2124. package/dist/engine/devtools/environments/HDRIEnvironment.d.ts +38 -0
  2125. package/dist/engine/devtools/environments/HDRIEnvironment.d.ts.map +1 -0
  2126. package/dist/engine/devtools/environments/HDRIEnvironment.js +34 -0
  2127. package/dist/engine/devtools/environments/HDRIEnvironment.js.map +1 -0
  2128. package/dist/engine/devtools/environments/PMREMPreset.d.ts +14 -0
  2129. package/dist/engine/devtools/environments/PMREMPreset.d.ts.map +1 -0
  2130. package/dist/engine/devtools/environments/PMREMPreset.js +16 -0
  2131. package/dist/engine/devtools/environments/PMREMPreset.js.map +1 -0
  2132. package/dist/engine/devtools/environments/index.d.ts +6 -0
  2133. package/dist/engine/devtools/environments/index.d.ts.map +1 -0
  2134. package/dist/engine/devtools/environments/index.js +3 -0
  2135. package/dist/engine/devtools/environments/index.js.map +1 -0
  2136. package/dist/engine/devtools/environments/node.d.ts +7 -0
  2137. package/dist/engine/devtools/environments/node.d.ts.map +1 -0
  2138. package/dist/engine/devtools/environments/node.js +5 -0
  2139. package/dist/engine/devtools/environments/node.js.map +1 -0
  2140. package/dist/engine/devtools/environments/production-runtime/ProductionEnvironmentCorpus.d.ts +78 -0
  2141. package/dist/engine/devtools/environments/production-runtime/ProductionEnvironmentCorpus.d.ts.map +1 -0
  2142. package/dist/engine/devtools/environments/production-runtime/ProductionEnvironmentCorpus.js +67 -0
  2143. package/dist/engine/devtools/environments/production-runtime/ProductionEnvironmentCorpus.js.map +1 -0
  2144. package/dist/engine/devtools/environments/production-runtime/index.d.ts +3 -0
  2145. package/dist/engine/devtools/environments/production-runtime/index.d.ts.map +1 -0
  2146. package/dist/engine/devtools/environments/production-runtime/index.js +2 -0
  2147. package/dist/engine/devtools/environments/production-runtime/index.js.map +1 -0
  2148. package/dist/engine/devtools/materialDiagnostics.d.ts +2 -0
  2149. package/dist/engine/devtools/materialDiagnostics.d.ts.map +1 -0
  2150. package/dist/engine/devtools/materialDiagnostics.js +5 -0
  2151. package/dist/engine/devtools/materialDiagnostics.js.map +1 -0
  2152. package/dist/engine/devtools/materials/GameReadyMaterialLibrary.d.ts.map +1 -0
  2153. package/dist/engine/devtools/materials/GameReadyMaterialLibrary.js +253 -0
  2154. package/dist/engine/devtools/materials/GameReadyMaterialLibrary.js.map +1 -0
  2155. package/dist/engine/devtools/materials/MaterialPreset.d.ts.map +1 -0
  2156. package/dist/engine/devtools/materials/MaterialPreset.js.map +1 -0
  2157. package/dist/engine/devtools/materials/MaterialPresets.d.ts.map +1 -0
  2158. package/dist/engine/devtools/materials/MaterialPresets.js.map +1 -0
  2159. package/dist/engine/devtools/materials/MaterialPreviewScene.d.ts.map +1 -0
  2160. package/dist/engine/devtools/materials/MaterialPreviewScene.js.map +1 -0
  2161. package/dist/engine/devtools/materials/MaterialValidation.d.ts.map +1 -0
  2162. package/dist/engine/devtools/materials/MaterialValidation.js.map +1 -0
  2163. package/dist/engine/devtools/materials/NodeMaterial.d.ts +3 -0
  2164. package/dist/engine/devtools/materials/NodeMaterial.d.ts.map +1 -0
  2165. package/dist/engine/devtools/materials/NodeMaterial.js +3 -0
  2166. package/dist/engine/devtools/materials/NodeMaterial.js.map +1 -0
  2167. package/dist/engine/devtools/materials/PBRMaterialLibrary.d.ts.map +1 -0
  2168. package/dist/engine/devtools/materials/PBRMaterialLibrary.js.map +1 -0
  2169. package/dist/engine/devtools/materials/TextureSet.d.ts.map +1 -0
  2170. package/dist/engine/devtools/materials/TextureSet.js +38 -0
  2171. package/dist/engine/devtools/materials/TextureSet.js.map +1 -0
  2172. package/dist/engine/devtools/materials/browser-index.d.ts.map +1 -0
  2173. package/dist/engine/devtools/materials/browser-index.js.map +1 -0
  2174. package/dist/engine/devtools/materials/index.d.ts.map +1 -0
  2175. package/dist/engine/devtools/materials/index.js.map +1 -0
  2176. package/dist/engine/devtools/materials/node.d.ts.map +1 -0
  2177. package/dist/engine/devtools/materials/node.js.map +1 -0
  2178. package/dist/engine/game/GameAudio.d.ts +53 -0
  2179. package/dist/engine/game/GameAudio.d.ts.map +1 -1
  2180. package/dist/engine/game/GameAudio.js +232 -71
  2181. package/dist/engine/game/GameAudio.js.map +1 -1
  2182. package/dist/engine/game/index.d.ts +1 -1
  2183. package/dist/engine/game/index.d.ts.map +1 -1
  2184. package/dist/engine/index.d.ts +3 -76
  2185. package/dist/engine/index.d.ts.map +1 -1
  2186. package/dist/engine/index.js +10 -123
  2187. package/dist/engine/index.js.map +1 -1
  2188. package/dist/engine/lanes/index.d.ts +17 -0
  2189. package/dist/engine/lanes/index.d.ts.map +1 -0
  2190. package/dist/engine/lanes/index.js +17 -0
  2191. package/dist/engine/lanes/index.js.map +1 -0
  2192. package/dist/engine/lanes/prd01/diagnostics.d.ts +31 -0
  2193. package/dist/engine/lanes/prd01/diagnostics.d.ts.map +1 -0
  2194. package/dist/engine/lanes/prd01/diagnostics.js +146 -0
  2195. package/dist/engine/lanes/prd01/diagnostics.js.map +1 -0
  2196. package/dist/engine/lanes/prd01/outputSurface.d.ts +35 -0
  2197. package/dist/engine/lanes/prd01/outputSurface.d.ts.map +1 -0
  2198. package/dist/engine/lanes/prd01/outputSurface.js +273 -0
  2199. package/dist/engine/lanes/prd01/outputSurface.js.map +1 -0
  2200. package/dist/engine/lanes/prd01.d.ts +10 -0
  2201. package/dist/engine/lanes/prd01.d.ts.map +1 -0
  2202. package/dist/engine/lanes/prd01.js +49 -0
  2203. package/dist/engine/lanes/prd01.js.map +1 -0
  2204. package/dist/engine/lanes/prd02.d.ts +55 -0
  2205. package/dist/engine/lanes/prd02.d.ts.map +1 -0
  2206. package/dist/engine/lanes/prd02.js +257 -0
  2207. package/dist/engine/lanes/prd02.js.map +1 -0
  2208. package/dist/engine/lanes/prd03.d.ts +13 -0
  2209. package/dist/engine/lanes/prd03.d.ts.map +1 -0
  2210. package/dist/engine/lanes/prd03.js +32 -0
  2211. package/dist/engine/lanes/prd03.js.map +1 -0
  2212. package/dist/engine/lanes/prd04.d.ts +8 -0
  2213. package/dist/engine/lanes/prd04.d.ts.map +1 -0
  2214. package/dist/engine/lanes/prd04.js +29 -0
  2215. package/dist/engine/lanes/prd04.js.map +1 -0
  2216. package/dist/engine/lanes/prd05.d.ts +47 -0
  2217. package/dist/engine/lanes/prd05.d.ts.map +1 -0
  2218. package/dist/engine/lanes/prd05.js +55 -0
  2219. package/dist/engine/lanes/prd05.js.map +1 -0
  2220. package/dist/engine/lanes/prd06.d.ts +36 -0
  2221. package/dist/engine/lanes/prd06.d.ts.map +1 -0
  2222. package/dist/engine/lanes/prd06.js +222 -0
  2223. package/dist/engine/lanes/prd06.js.map +1 -0
  2224. package/dist/engine/lanes/prd07.d.ts +4 -0
  2225. package/dist/engine/lanes/prd07.d.ts.map +1 -0
  2226. package/dist/engine/lanes/prd07.js +104 -0
  2227. package/dist/engine/lanes/prd07.js.map +1 -0
  2228. package/dist/engine/lanes/prd08.d.ts +54 -0
  2229. package/dist/engine/lanes/prd08.d.ts.map +1 -0
  2230. package/dist/engine/lanes/prd08.js +110 -0
  2231. package/dist/engine/lanes/prd08.js.map +1 -0
  2232. package/dist/engine/lanes/prd09.d.ts +2 -0
  2233. package/dist/engine/lanes/prd09.d.ts.map +1 -0
  2234. package/dist/engine/lanes/prd09.js +16 -0
  2235. package/dist/engine/lanes/prd09.js.map +1 -0
  2236. package/dist/engine/lanes/prd10.d.ts +2 -0
  2237. package/dist/engine/lanes/prd10.d.ts.map +1 -0
  2238. package/dist/engine/lanes/prd10.js +50 -0
  2239. package/dist/engine/lanes/prd10.js.map +1 -0
  2240. package/dist/engine/lanes/prd11.d.ts +67 -0
  2241. package/dist/engine/lanes/prd11.d.ts.map +1 -0
  2242. package/dist/engine/lanes/prd11.js +175 -0
  2243. package/dist/engine/lanes/prd11.js.map +1 -0
  2244. package/dist/engine/lanes/prd12.d.ts +14 -0
  2245. package/dist/engine/lanes/prd12.d.ts.map +1 -0
  2246. package/dist/engine/lanes/prd12.js +158 -0
  2247. package/dist/engine/lanes/prd12.js.map +1 -0
  2248. package/dist/engine/lanes/prd13.d.ts +35 -0
  2249. package/dist/engine/lanes/prd13.d.ts.map +1 -0
  2250. package/dist/engine/lanes/prd13.js +55 -0
  2251. package/dist/engine/lanes/prd13.js.map +1 -0
  2252. package/dist/engine/lanes/prd14.d.ts +6 -0
  2253. package/dist/engine/lanes/prd14.d.ts.map +1 -0
  2254. package/dist/engine/lanes/prd14.js +6 -0
  2255. package/dist/engine/lanes/prd14.js.map +1 -0
  2256. package/dist/engine/lanes/prd15.d.ts +2 -0
  2257. package/dist/engine/lanes/prd15.d.ts.map +1 -0
  2258. package/dist/engine/lanes/prd15.js +13 -0
  2259. package/dist/engine/lanes/prd15.js.map +1 -0
  2260. package/dist/engine/production-runtime/GameRenderPreset.d.ts +16 -1
  2261. package/dist/engine/production-runtime/GameRenderPreset.d.ts.map +1 -1
  2262. package/dist/engine/production-runtime/GameRenderPreset.js +93 -4
  2263. package/dist/engine/production-runtime/GameRenderPreset.js.map +1 -1
  2264. package/dist/engine/production-runtime/LodSelector.d.ts +52 -0
  2265. package/dist/engine/production-runtime/LodSelector.d.ts.map +1 -0
  2266. package/dist/engine/production-runtime/LodSelector.js +109 -0
  2267. package/dist/engine/production-runtime/LodSelector.js.map +1 -0
  2268. package/dist/engine/production-runtime/ModelMaterialOverrides.d.ts +39 -0
  2269. package/dist/engine/production-runtime/ModelMaterialOverrides.d.ts.map +1 -0
  2270. package/dist/engine/production-runtime/ModelMaterialOverrides.js +209 -0
  2271. package/dist/engine/production-runtime/ModelMaterialOverrides.js.map +1 -0
  2272. package/dist/engine/production-runtime/RootGpuParticleWorkload.d.ts +34 -0
  2273. package/dist/engine/production-runtime/RootGpuParticleWorkload.d.ts.map +1 -0
  2274. package/dist/engine/production-runtime/RootGpuParticleWorkload.js +117 -0
  2275. package/dist/engine/production-runtime/RootGpuParticleWorkload.js.map +1 -0
  2276. package/dist/engine/production-runtime/RootRenderSourceBridge.d.ts +2 -0
  2277. package/dist/engine/production-runtime/RootRenderSourceBridge.d.ts.map +1 -0
  2278. package/dist/engine/production-runtime/RootRenderSourceBridge.js +2 -0
  2279. package/dist/engine/production-runtime/RootRenderSourceBridge.js.map +1 -0
  2280. package/dist/engine/production-runtime/TypedGLBActor.d.ts +71 -11
  2281. package/dist/engine/production-runtime/TypedGLBActor.d.ts.map +1 -1
  2282. package/dist/engine/production-runtime/TypedGLBActor.js +166 -149
  2283. package/dist/engine/production-runtime/TypedGLBActor.js.map +1 -1
  2284. package/dist/engine/production-runtime/actor/TypedGLBActorAnimation.d.ts +176 -0
  2285. package/dist/engine/production-runtime/actor/TypedGLBActorAnimation.d.ts.map +1 -0
  2286. package/dist/engine/production-runtime/actor/TypedGLBActorAnimation.js +522 -0
  2287. package/dist/engine/production-runtime/actor/TypedGLBActorAnimation.js.map +1 -0
  2288. package/dist/engine/production-runtime/actor/TypedGLBActorLod.d.ts +18 -0
  2289. package/dist/engine/production-runtime/actor/TypedGLBActorLod.d.ts.map +1 -0
  2290. package/dist/engine/production-runtime/actor/TypedGLBActorLod.js +269 -0
  2291. package/dist/engine/production-runtime/actor/TypedGLBActorLod.js.map +1 -0
  2292. package/dist/engine/production-runtime/actor/TypedGLBActorMaterials.d.ts +18 -0
  2293. package/dist/engine/production-runtime/actor/TypedGLBActorMaterials.d.ts.map +1 -0
  2294. package/dist/engine/production-runtime/actor/TypedGLBActorMaterials.js +96 -0
  2295. package/dist/engine/production-runtime/actor/TypedGLBActorMaterials.js.map +1 -0
  2296. package/dist/engine/production-runtime/actor/extensions.d.ts +24 -0
  2297. package/dist/engine/production-runtime/actor/extensions.d.ts.map +1 -0
  2298. package/dist/engine/production-runtime/actor/extensions.js +35 -0
  2299. package/dist/engine/production-runtime/actor/extensions.js.map +1 -0
  2300. package/dist/engine/production-runtime/actor/materialDiagnostics.d.ts +5 -0
  2301. package/dist/engine/production-runtime/actor/materialDiagnostics.d.ts.map +1 -0
  2302. package/dist/engine/production-runtime/actor/materialDiagnostics.js +90 -0
  2303. package/dist/engine/production-runtime/actor/materialDiagnostics.js.map +1 -0
  2304. package/dist/engine/production-runtime/effects/CpuEmitter.d.ts +67 -0
  2305. package/dist/engine/production-runtime/effects/CpuEmitter.d.ts.map +1 -0
  2306. package/dist/engine/production-runtime/effects/CpuEmitter.js +153 -0
  2307. package/dist/engine/production-runtime/effects/CpuEmitter.js.map +1 -0
  2308. package/dist/engine/production-runtime/effects/EffectDiagnostics.d.ts +70 -0
  2309. package/dist/engine/production-runtime/effects/EffectDiagnostics.d.ts.map +1 -0
  2310. package/dist/engine/production-runtime/effects/EffectDiagnostics.js +128 -0
  2311. package/dist/engine/production-runtime/effects/EffectDiagnostics.js.map +1 -0
  2312. package/dist/engine/production-runtime/effects/EffectNodeLowering.d.ts +140 -0
  2313. package/dist/engine/production-runtime/effects/EffectNodeLowering.d.ts.map +1 -0
  2314. package/dist/engine/production-runtime/effects/EffectNodeLowering.js +285 -0
  2315. package/dist/engine/production-runtime/effects/EffectNodeLowering.js.map +1 -0
  2316. package/dist/engine/production-runtime/effects/FlipbookAtlas.d.ts +10 -0
  2317. package/dist/engine/production-runtime/effects/FlipbookAtlas.d.ts.map +1 -0
  2318. package/dist/engine/production-runtime/effects/FlipbookAtlas.js +82 -0
  2319. package/dist/engine/production-runtime/effects/FlipbookAtlas.js.map +1 -0
  2320. package/dist/engine/production-runtime/effects/LiveAtmosphere.d.ts +106 -0
  2321. package/dist/engine/production-runtime/effects/LiveAtmosphere.d.ts.map +1 -0
  2322. package/dist/engine/production-runtime/effects/LiveAtmosphere.js +258 -0
  2323. package/dist/engine/production-runtime/effects/LiveAtmosphere.js.map +1 -0
  2324. package/dist/engine/production-runtime/effects/ProductionEffectSystem.d.ts +188 -0
  2325. package/dist/engine/production-runtime/effects/ProductionEffectSystem.d.ts.map +1 -0
  2326. package/dist/engine/production-runtime/effects/ProductionEffectSystem.js +827 -0
  2327. package/dist/engine/production-runtime/effects/ProductionEffectSystem.js.map +1 -0
  2328. package/dist/engine/production-runtime/effects/TransientLightPool.d.ts +25 -0
  2329. package/dist/engine/production-runtime/effects/TransientLightPool.d.ts.map +1 -0
  2330. package/dist/engine/production-runtime/effects/TransientLightPool.js +71 -0
  2331. package/dist/engine/production-runtime/effects/TransientLightPool.js.map +1 -0
  2332. package/dist/engine/production-runtime/effects/WeatherVolume.d.ts +50 -0
  2333. package/dist/engine/production-runtime/effects/WeatherVolume.d.ts.map +1 -0
  2334. package/dist/engine/production-runtime/effects/WeatherVolume.js +126 -0
  2335. package/dist/engine/production-runtime/effects/WeatherVolume.js.map +1 -0
  2336. package/dist/engine/production-runtime/index.d.ts +20 -27
  2337. package/dist/engine/production-runtime/index.d.ts.map +1 -1
  2338. package/dist/engine/production-runtime/index.js +65 -152
  2339. package/dist/engine/production-runtime/index.js.map +1 -1
  2340. package/dist/engine/production-runtime/world/BiomeResolver.d.ts +49 -0
  2341. package/dist/engine/production-runtime/world/BiomeResolver.d.ts.map +1 -0
  2342. package/dist/engine/production-runtime/world/BiomeResolver.js +152 -0
  2343. package/dist/engine/production-runtime/world/BiomeResolver.js.map +1 -0
  2344. package/dist/engine/production-runtime/world/GrassRuntime.d.ts +22 -0
  2345. package/dist/engine/production-runtime/world/GrassRuntime.d.ts.map +1 -0
  2346. package/dist/engine/production-runtime/world/GrassRuntime.js +282 -0
  2347. package/dist/engine/production-runtime/world/GrassRuntime.js.map +1 -0
  2348. package/dist/engine/production-runtime/world/TerrainRuntime.d.ts +109 -0
  2349. package/dist/engine/production-runtime/world/TerrainRuntime.d.ts.map +1 -0
  2350. package/dist/engine/production-runtime/world/TerrainRuntime.js +446 -0
  2351. package/dist/engine/production-runtime/world/TerrainRuntime.js.map +1 -0
  2352. package/dist/engine/production-runtime/world/TimeOfDayRuntime.d.ts +80 -0
  2353. package/dist/engine/production-runtime/world/TimeOfDayRuntime.d.ts.map +1 -0
  2354. package/dist/engine/production-runtime/world/TimeOfDayRuntime.js +144 -0
  2355. package/dist/engine/production-runtime/world/TimeOfDayRuntime.js.map +1 -0
  2356. package/dist/engine/production-runtime/world/WaterRuntime.d.ts +46 -0
  2357. package/dist/engine/production-runtime/world/WaterRuntime.d.ts.map +1 -0
  2358. package/dist/engine/production-runtime/world/WaterRuntime.js +382 -0
  2359. package/dist/engine/production-runtime/world/WaterRuntime.js.map +1 -0
  2360. package/dist/engine/production-runtime/world/WorldDiagnostics.d.ts +5 -0
  2361. package/dist/engine/production-runtime/world/WorldDiagnostics.d.ts.map +1 -0
  2362. package/dist/engine/production-runtime/world/WorldDiagnostics.js +50 -0
  2363. package/dist/engine/production-runtime/world/WorldDiagnostics.js.map +1 -0
  2364. package/dist/engine/production-runtime/world/WorldFeatureState.d.ts +28 -0
  2365. package/dist/engine/production-runtime/world/WorldFeatureState.d.ts.map +1 -0
  2366. package/dist/engine/production-runtime/world/WorldFeatureState.js +57 -0
  2367. package/dist/engine/production-runtime/world/WorldFeatureState.js.map +1 -0
  2368. package/dist/engine/production-runtime/world/WorldFramePasses.d.ts +16 -0
  2369. package/dist/engine/production-runtime/world/WorldFramePasses.d.ts.map +1 -0
  2370. package/dist/engine/production-runtime/world/WorldFramePasses.js +99 -0
  2371. package/dist/engine/production-runtime/world/WorldFramePasses.js.map +1 -0
  2372. package/dist/engine/public/devtools.d.ts +15 -0
  2373. package/dist/engine/public/devtools.d.ts.map +1 -0
  2374. package/dist/engine/public/devtools.js +12 -0
  2375. package/dist/engine/public/devtools.js.map +1 -0
  2376. package/dist/engine/public/index.d.ts +146 -0
  2377. package/dist/engine/public/index.d.ts.map +1 -0
  2378. package/dist/engine/public/index.js +125 -0
  2379. package/dist/engine/public/index.js.map +1 -0
  2380. package/dist/engine/public/renderer.d.ts +25 -0
  2381. package/dist/engine/public/renderer.d.ts.map +1 -0
  2382. package/dist/engine/public/renderer.js +20 -0
  2383. package/dist/engine/public/renderer.js.map +1 -0
  2384. package/dist/engine/threejs-example-parity/FlagshipFoundation.d.ts +8 -8
  2385. package/dist/engine/threejs-example-parity/FlagshipFoundation.js +7 -7
  2386. package/dist/engine/threejs-example-parity/index.d.ts +234 -7
  2387. package/dist/engine/threejs-example-parity/index.d.ts.map +1 -1
  2388. package/dist/engine/threejs-example-parity/index.js +532 -16
  2389. package/dist/engine/threejs-example-parity/index.js.map +1 -1
  2390. package/dist/game/art/acceptance/canvasBlankCheck.d.ts +30 -0
  2391. package/dist/game/art/acceptance/canvasBlankCheck.d.ts.map +1 -0
  2392. package/dist/game/art/acceptance/canvasBlankCheck.js +55 -0
  2393. package/dist/game/art/acceptance/canvasBlankCheck.js.map +1 -0
  2394. package/dist/game/art/acceptance/requiredConditions.d.ts +17 -0
  2395. package/dist/game/art/acceptance/requiredConditions.d.ts.map +1 -0
  2396. package/dist/game/art/acceptance/requiredConditions.js +262 -0
  2397. package/dist/game/art/acceptance/requiredConditions.js.map +1 -0
  2398. package/dist/game/art/audit.d.ts +26 -0
  2399. package/dist/game/art/audit.d.ts.map +1 -0
  2400. package/dist/game/art/audit.js +75 -0
  2401. package/dist/game/art/audit.js.map +1 -0
  2402. package/dist/game/art/define.d.ts +117 -0
  2403. package/dist/game/art/define.d.ts.map +1 -0
  2404. package/dist/game/art/define.js +299 -0
  2405. package/dist/game/art/define.js.map +1 -0
  2406. package/dist/game/art/index.d.ts +19 -0
  2407. package/dist/game/art/index.d.ts.map +1 -0
  2408. package/dist/game/art/index.js +14 -0
  2409. package/dist/game/art/index.js.map +1 -0
  2410. package/dist/game/art/snapshot.d.ts +63 -0
  2411. package/dist/game/art/snapshot.d.ts.map +1 -0
  2412. package/dist/game/art/snapshot.js +115 -0
  2413. package/dist/game/art/snapshot.js.map +1 -0
  2414. package/dist/game/capture/captureFromUrl.d.ts +13 -0
  2415. package/dist/game/capture/captureFromUrl.d.ts.map +1 -0
  2416. package/dist/game/capture/captureFromUrl.js +30 -0
  2417. package/dist/game/capture/captureFromUrl.js.map +1 -0
  2418. package/dist/game/capture/index.d.ts +7 -0
  2419. package/dist/game/capture/index.d.ts.map +1 -0
  2420. package/dist/game/capture/index.js +6 -0
  2421. package/dist/game/capture/index.js.map +1 -0
  2422. package/dist/game/capture/lookSignature.d.ts +37 -0
  2423. package/dist/game/capture/lookSignature.d.ts.map +1 -0
  2424. package/dist/game/capture/lookSignature.js +100 -0
  2425. package/dist/game/capture/lookSignature.js.map +1 -0
  2426. package/dist/game/components.d.ts +73 -0
  2427. package/dist/game/components.d.ts.map +1 -0
  2428. package/dist/game/components.js +86 -0
  2429. package/dist/game/components.js.map +1 -0
  2430. package/dist/game/createGame.d.ts +50 -0
  2431. package/dist/game/createGame.d.ts.map +1 -0
  2432. package/dist/game/createGame.js +384 -0
  2433. package/dist/game/createGame.js.map +1 -0
  2434. package/dist/game/evidence/beacon.d.ts +25 -0
  2435. package/dist/game/evidence/beacon.d.ts.map +1 -0
  2436. package/dist/game/evidence/beacon.js +58 -0
  2437. package/dist/game/evidence/beacon.js.map +1 -0
  2438. package/dist/game/evidence/channel.d.ts +48 -0
  2439. package/dist/game/evidence/channel.d.ts.map +1 -0
  2440. package/dist/game/evidence/channel.js +142 -0
  2441. package/dist/game/evidence/channel.js.map +1 -0
  2442. package/dist/game/fonts/register.d.ts +18 -0
  2443. package/dist/game/fonts/register.d.ts.map +1 -0
  2444. package/dist/game/fonts/register.js +28 -0
  2445. package/dist/game/fonts/register.js.map +1 -0
  2446. package/dist/game/hud/HudKit.d.ts +90 -0
  2447. package/dist/game/hud/HudKit.d.ts.map +1 -0
  2448. package/dist/game/hud/HudKit.js +305 -0
  2449. package/dist/game/hud/HudKit.js.map +1 -0
  2450. package/dist/game/hud/dom.d.ts +51 -0
  2451. package/dist/game/hud/dom.d.ts.map +1 -0
  2452. package/dist/game/hud/dom.js +7 -0
  2453. package/dist/game/hud/dom.js.map +1 -0
  2454. package/dist/game/hud/screenFraction.d.ts +10 -0
  2455. package/dist/game/hud/screenFraction.d.ts.map +1 -0
  2456. package/dist/game/hud/screenFraction.js +30 -0
  2457. package/dist/game/hud/screenFraction.js.map +1 -0
  2458. package/dist/game/hud/themes.d.ts +16 -0
  2459. package/dist/game/hud/themes.d.ts.map +1 -0
  2460. package/dist/game/hud/themes.js +109 -0
  2461. package/dist/game/hud/themes.js.map +1 -0
  2462. package/dist/game/hud/widgets/index.d.ts +56 -0
  2463. package/dist/game/hud/widgets/index.d.ts.map +1 -0
  2464. package/dist/game/hud/widgets/index.js +272 -0
  2465. package/dist/game/hud/widgets/index.js.map +1 -0
  2466. package/dist/game/index.d.ts +67 -0
  2467. package/dist/game/index.d.ts.map +1 -0
  2468. package/dist/game/index.js +73 -0
  2469. package/dist/game/index.js.map +1 -0
  2470. package/dist/game/juice/Juice.d.ts +175 -0
  2471. package/dist/game/juice/Juice.d.ts.map +1 -0
  2472. package/dist/game/juice/Juice.js +133 -0
  2473. package/dist/game/juice/Juice.js.map +1 -0
  2474. package/dist/game/juice/fx.d.ts +62 -0
  2475. package/dist/game/juice/fx.d.ts.map +1 -0
  2476. package/dist/game/juice/fx.js +206 -0
  2477. package/dist/game/juice/fx.js.map +1 -0
  2478. package/dist/game/juice/fxParticlePass.d.ts +41 -0
  2479. package/dist/game/juice/fxParticlePass.d.ts.map +1 -0
  2480. package/dist/game/juice/fxParticlePass.js +16 -0
  2481. package/dist/game/juice/fxParticlePass.js.map +1 -0
  2482. package/dist/game/juice/fxPoolLayer.d.ts +60 -0
  2483. package/dist/game/juice/fxPoolLayer.d.ts.map +1 -0
  2484. package/dist/game/juice/fxPoolLayer.js +122 -0
  2485. package/dist/game/juice/fxPoolLayer.js.map +1 -0
  2486. package/dist/game/juice/overlay.d.ts +34 -0
  2487. package/dist/game/juice/overlay.d.ts.map +1 -0
  2488. package/dist/game/juice/overlay.js +138 -0
  2489. package/dist/game/juice/overlay.js.map +1 -0
  2490. package/dist/game/juice/rumble.d.ts +26 -0
  2491. package/dist/game/juice/rumble.d.ts.map +1 -0
  2492. package/dist/game/juice/rumble.js +34 -0
  2493. package/dist/game/juice/rumble.js.map +1 -0
  2494. package/dist/game/juice/tween.d.ts +37 -0
  2495. package/dist/game/juice/tween.d.ts.map +1 -0
  2496. package/dist/game/juice/tween.js +191 -0
  2497. package/dist/game/juice/tween.js.map +1 -0
  2498. package/dist/game/session/GameSession.d.ts +79 -0
  2499. package/dist/game/session/GameSession.d.ts.map +1 -0
  2500. package/dist/game/session/GameSession.js +177 -0
  2501. package/dist/game/session/GameSession.js.map +1 -0
  2502. package/dist/game/session/accessibility.d.ts +45 -0
  2503. package/dist/game/session/accessibility.d.ts.map +1 -0
  2504. package/dist/game/session/accessibility.js +90 -0
  2505. package/dist/game/session/accessibility.js.map +1 -0
  2506. package/dist/game/session/lifecycle.d.ts +31 -0
  2507. package/dist/game/session/lifecycle.d.ts.map +1 -0
  2508. package/dist/game/session/lifecycle.js +108 -0
  2509. package/dist/game/session/lifecycle.js.map +1 -0
  2510. package/dist/game/session/presented.d.ts +28 -0
  2511. package/dist/game/session/presented.d.ts.map +1 -0
  2512. package/dist/game/session/presented.js +35 -0
  2513. package/dist/game/session/presented.js.map +1 -0
  2514. package/dist/game/sfx.d.ts +247 -0
  2515. package/dist/game/sfx.d.ts.map +1 -0
  2516. package/dist/game/sfx.js +522 -0
  2517. package/dist/game/sfx.js.map +1 -0
  2518. package/dist/game/shell/GameShell.d.ts +92 -0
  2519. package/dist/game/shell/GameShell.d.ts.map +1 -0
  2520. package/dist/game/shell/GameShell.js +236 -0
  2521. package/dist/game/shell/GameShell.js.map +1 -0
  2522. package/dist/game/shell/contextLoss.d.ts +32 -0
  2523. package/dist/game/shell/contextLoss.d.ts.map +1 -0
  2524. package/dist/game/shell/contextLoss.js +32 -0
  2525. package/dist/game/shell/contextLoss.js.map +1 -0
  2526. package/dist/game/shell/screens/About.d.ts +8 -0
  2527. package/dist/game/shell/screens/About.d.ts.map +1 -0
  2528. package/dist/game/shell/screens/About.js +25 -0
  2529. package/dist/game/shell/screens/About.js.map +1 -0
  2530. package/dist/game/shell/screens/ContextLost.d.ts +18 -0
  2531. package/dist/game/shell/screens/ContextLost.d.ts.map +1 -0
  2532. package/dist/game/shell/screens/ContextLost.js +58 -0
  2533. package/dist/game/shell/screens/ContextLost.js.map +1 -0
  2534. package/dist/game/shell/screens/Loading.d.ts +18 -0
  2535. package/dist/game/shell/screens/Loading.d.ts.map +1 -0
  2536. package/dist/game/shell/screens/Loading.js +34 -0
  2537. package/dist/game/shell/screens/Loading.js.map +1 -0
  2538. package/dist/game/shell/screens/Pause.d.ts +11 -0
  2539. package/dist/game/shell/screens/Pause.d.ts.map +1 -0
  2540. package/dist/game/shell/screens/Pause.js +20 -0
  2541. package/dist/game/shell/screens/Pause.js.map +1 -0
  2542. package/dist/game/shell/screens/Results.d.ts +32 -0
  2543. package/dist/game/shell/screens/Results.d.ts.map +1 -0
  2544. package/dist/game/shell/screens/Results.js +76 -0
  2545. package/dist/game/shell/screens/Results.js.map +1 -0
  2546. package/dist/game/shell/screens/Settings.d.ts +46 -0
  2547. package/dist/game/shell/screens/Settings.d.ts.map +1 -0
  2548. package/dist/game/shell/screens/Settings.js +130 -0
  2549. package/dist/game/shell/screens/Settings.js.map +1 -0
  2550. package/dist/game/shell/screens/Title.d.ts +21 -0
  2551. package/dist/game/shell/screens/Title.d.ts.map +1 -0
  2552. package/dist/game/shell/screens/Title.js +45 -0
  2553. package/dist/game/shell/screens/Title.js.map +1 -0
  2554. package/dist/game/shell/screens/menu.d.ts +50 -0
  2555. package/dist/game/shell/screens/menu.d.ts.map +1 -0
  2556. package/dist/game/shell/screens/menu.js +144 -0
  2557. package/dist/game/shell/screens/menu.js.map +1 -0
  2558. package/dist/game/shell/transition.d.ts +27 -0
  2559. package/dist/game/shell/transition.d.ts.map +1 -0
  2560. package/dist/game/shell/transition.js +50 -0
  2561. package/dist/game/shell/transition.js.map +1 -0
  2562. package/dist/game/styles/hud-base.css +52 -0
  2563. package/dist/game/styles/themes/arcade-neon.css +14 -0
  2564. package/dist/game/styles/themes/fighting.css +14 -0
  2565. package/dist/game/styles/themes/motorsport.css +14 -0
  2566. package/dist/game/styles/themes/plain.css +14 -0
  2567. package/dist/game/styles/themes/sci-fi-telemetry.css +14 -0
  2568. package/dist/game/styles/themes/sports-broadcast.css +14 -0
  2569. package/dist/game/styles/themes/tabletop.css +14 -0
  2570. package/dist/game/styles.css +45 -0
  2571. package/dist/game/testHook.d.ts +45 -0
  2572. package/dist/game/testHook.d.ts.map +1 -0
  2573. package/dist/game/testHook.js +52 -0
  2574. package/dist/game/testHook.js.map +1 -0
  2575. package/dist/game/touch/TouchControls.d.ts +74 -0
  2576. package/dist/game/touch/TouchControls.d.ts.map +1 -0
  2577. package/dist/game/touch/TouchControls.js +210 -0
  2578. package/dist/game/touch/TouchControls.js.map +1 -0
  2579. package/dist/game/util/ease.d.ts +9 -0
  2580. package/dist/game/util/ease.d.ts.map +1 -0
  2581. package/dist/game/util/ease.js +40 -0
  2582. package/dist/game/util/ease.js.map +1 -0
  2583. package/dist/game/util/index.d.ts +9 -0
  2584. package/dist/game/util/index.d.ts.map +1 -0
  2585. package/dist/game/util/index.js +19 -0
  2586. package/dist/game/util/index.js.map +1 -0
  2587. package/dist/input/Haptics.d.ts +1 -1
  2588. package/dist/input/Haptics.js +1 -1
  2589. package/dist/input/InputSystem.d.ts.map +1 -1
  2590. package/dist/input/InputSystem.js +1 -0
  2591. package/dist/input/InputSystem.js.map +1 -1
  2592. package/dist/input/PointerDevice.d.ts +1 -0
  2593. package/dist/input/PointerDevice.d.ts.map +1 -1
  2594. package/dist/input/PointerDevice.js +1 -1
  2595. package/dist/input/PointerDevice.js.map +1 -1
  2596. package/dist/input/TouchLayouts.d.ts +14 -1
  2597. package/dist/input/TouchLayouts.d.ts.map +1 -1
  2598. package/dist/input/TouchLayouts.js +150 -4
  2599. package/dist/input/TouchLayouts.js.map +1 -1
  2600. package/dist/input/controls/CameraRig.d.ts +2 -11
  2601. package/dist/input/controls/CameraRig.d.ts.map +1 -1
  2602. package/dist/input/controls/CameraRig.js +2 -31
  2603. package/dist/input/controls/CameraRig.js.map +1 -1
  2604. package/dist/input/controls/ControlTypes.d.ts +2 -16
  2605. package/dist/input/controls/ControlTypes.d.ts.map +1 -1
  2606. package/dist/input/controls/ControlTypes.js +2 -3
  2607. package/dist/input/controls/ControlTypes.js.map +1 -1
  2608. package/dist/input/controls/EditorFlyControls.d.ts +2 -19
  2609. package/dist/input/controls/EditorFlyControls.d.ts.map +1 -1
  2610. package/dist/input/controls/EditorFlyControls.js +2 -43
  2611. package/dist/input/controls/EditorFlyControls.js.map +1 -1
  2612. package/dist/input/controls/FirstPersonControls.d.ts +2 -21
  2613. package/dist/input/controls/FirstPersonControls.d.ts.map +1 -1
  2614. package/dist/input/controls/FirstPersonControls.js +2 -43
  2615. package/dist/input/controls/FirstPersonControls.js.map +1 -1
  2616. package/dist/input/controls/OrbitControls.d.ts +2 -48
  2617. package/dist/input/controls/OrbitControls.d.ts.map +1 -1
  2618. package/dist/input/controls/OrbitControls.js +2 -130
  2619. package/dist/input/controls/OrbitControls.js.map +1 -1
  2620. package/dist/input/controls/PointerLockControls.d.ts +1 -10
  2621. package/dist/input/controls/PointerLockControls.d.ts.map +1 -1
  2622. package/dist/input/controls/PointerLockControls.js +2 -30
  2623. package/dist/input/controls/PointerLockControls.js.map +1 -1
  2624. package/dist/input/controls/SceneCameraAdapter.d.ts +2 -9
  2625. package/dist/input/controls/SceneCameraAdapter.d.ts.map +1 -1
  2626. package/dist/input/controls/SceneCameraAdapter.js +2 -89
  2627. package/dist/input/controls/SceneCameraAdapter.js.map +1 -1
  2628. package/dist/input/controls/ThirdPersonFollowControls.d.ts +2 -19
  2629. package/dist/input/controls/ThirdPersonFollowControls.d.ts.map +1 -1
  2630. package/dist/input/controls/ThirdPersonFollowControls.js +2 -32
  2631. package/dist/input/controls/ThirdPersonFollowControls.js.map +1 -1
  2632. package/dist/input/index.d.ts +1 -1
  2633. package/dist/input/index.d.ts.map +1 -1
  2634. package/dist/math/Easing.d.ts +44 -0
  2635. package/dist/math/Easing.d.ts.map +1 -1
  2636. package/dist/math/Easing.js +92 -0
  2637. package/dist/math/Easing.js.map +1 -1
  2638. package/dist/math/Random.d.ts +13 -0
  2639. package/dist/math/Random.d.ts.map +1 -1
  2640. package/dist/math/Random.js +38 -0
  2641. package/dist/math/Random.js.map +1 -1
  2642. package/dist/navigation-recast/index.d.ts +116 -0
  2643. package/dist/navigation-recast/index.d.ts.map +1 -0
  2644. package/dist/navigation-recast/index.js +247 -0
  2645. package/dist/navigation-recast/index.js.map +1 -0
  2646. package/dist/physics/PhysicalCharacterController.d.ts +93 -0
  2647. package/dist/physics/PhysicalCharacterController.d.ts.map +1 -0
  2648. package/dist/physics/PhysicalCharacterController.js +2 -0
  2649. package/dist/physics/PhysicalCharacterController.js.map +1 -0
  2650. package/dist/physics/PhysicalVehicleController.d.ts +140 -0
  2651. package/dist/physics/PhysicalVehicleController.d.ts.map +1 -0
  2652. package/dist/physics/PhysicalVehicleController.js +2 -0
  2653. package/dist/physics/PhysicalVehicleController.js.map +1 -0
  2654. package/dist/physics/PhysicsWorld.d.ts +20 -0
  2655. package/dist/physics/PhysicsWorld.d.ts.map +1 -1
  2656. package/dist/physics/PhysicsWorld.js +217 -3
  2657. package/dist/physics/PhysicsWorld.js.map +1 -1
  2658. package/dist/physics/RigidBody.d.ts +19 -0
  2659. package/dist/physics/RigidBody.d.ts.map +1 -1
  2660. package/dist/physics/RigidBody.js +46 -1
  2661. package/dist/physics/RigidBody.js.map +1 -1
  2662. package/dist/physics/Shape.d.ts +6 -6
  2663. package/dist/physics/Shape.d.ts.map +1 -1
  2664. package/dist/physics/Shape.js +18 -12
  2665. package/dist/physics/Shape.js.map +1 -1
  2666. package/dist/physics/index.d.ts +2 -0
  2667. package/dist/physics/index.d.ts.map +1 -1
  2668. package/dist/physics/index.js +2 -0
  2669. package/dist/physics/index.js.map +1 -1
  2670. package/dist/physics-rapier/HeightfieldLayout.d.ts +12 -0
  2671. package/dist/physics-rapier/HeightfieldLayout.d.ts.map +1 -0
  2672. package/dist/physics-rapier/HeightfieldLayout.js +19 -0
  2673. package/dist/physics-rapier/HeightfieldLayout.js.map +1 -0
  2674. package/dist/physics-rapier/index.d.ts +164 -1
  2675. package/dist/physics-rapier/index.d.ts.map +1 -1
  2676. package/dist/physics-rapier/index.js +404 -9
  2677. package/dist/physics-rapier/index.js.map +1 -1
  2678. package/dist/product-studio/ProductAssetLoader.js +1 -1
  2679. package/dist/product-studio/ProductAssetLoader.js.map +1 -1
  2680. package/dist/product-studio/ProductRenderScene.js +1 -1
  2681. package/dist/product-studio/ProductRenderScene.js.map +1 -1
  2682. package/dist/product-studio/ProductTypes.d.ts +1 -1
  2683. package/dist/product-studio/ProductTypes.d.ts.map +1 -1
  2684. package/dist/react/index.d.ts +30 -3
  2685. package/dist/react/index.d.ts.map +1 -1
  2686. package/dist/react/index.js +11 -1
  2687. package/dist/react/index.js.map +1 -1
  2688. package/dist/rendering/BlendModes.d.ts +34 -0
  2689. package/dist/rendering/BlendModes.d.ts.map +1 -0
  2690. package/dist/rendering/BlendModes.js +42 -0
  2691. package/dist/rendering/BlendModes.js.map +1 -0
  2692. package/dist/rendering/CascadedShadowMaps.d.ts.map +1 -1
  2693. package/dist/rendering/CascadedShadowMaps.js +3 -1
  2694. package/dist/rendering/CascadedShadowMaps.js.map +1 -1
  2695. package/dist/rendering/DepthPass.d.ts +18 -0
  2696. package/dist/rendering/DepthPass.d.ts.map +1 -1
  2697. package/dist/rendering/DepthPass.js +103 -20
  2698. package/dist/rendering/DepthPass.js.map +1 -1
  2699. package/dist/rendering/EnvironmentBackgroundPass.d.ts +7 -0
  2700. package/dist/rendering/EnvironmentBackgroundPass.d.ts.map +1 -1
  2701. package/dist/rendering/EnvironmentBackgroundPass.js +39 -14
  2702. package/dist/rendering/EnvironmentBackgroundPass.js.map +1 -1
  2703. package/dist/rendering/EnvironmentMapResources.d.ts +1 -1
  2704. package/dist/rendering/EnvironmentMapResources.d.ts.map +1 -1
  2705. package/dist/rendering/EnvironmentMapResources.js +19 -8
  2706. package/dist/rendering/EnvironmentMapResources.js.map +1 -1
  2707. package/dist/rendering/EnvironmentPlatform.d.ts +6 -0
  2708. package/dist/rendering/EnvironmentPlatform.d.ts.map +1 -1
  2709. package/dist/rendering/EnvironmentPlatform.js +3 -1
  2710. package/dist/rendering/EnvironmentPlatform.js.map +1 -1
  2711. package/dist/rendering/EnvironmentPreset.d.ts +7 -0
  2712. package/dist/rendering/EnvironmentPreset.d.ts.map +1 -1
  2713. package/dist/rendering/EnvironmentPreset.js +11 -11
  2714. package/dist/rendering/EnvironmentPreset.js.map +1 -1
  2715. package/dist/rendering/EnvironmentPresetPack.d.ts +16 -0
  2716. package/dist/rendering/EnvironmentPresetPack.d.ts.map +1 -1
  2717. package/dist/rendering/EnvironmentPresetPack.js +28 -0
  2718. package/dist/rendering/EnvironmentPresetPack.js.map +1 -1
  2719. package/dist/rendering/ExtensionScalarAtlas.d.ts +18 -0
  2720. package/dist/rendering/ExtensionScalarAtlas.d.ts.map +1 -0
  2721. package/dist/rendering/ExtensionScalarAtlas.js +107 -0
  2722. package/dist/rendering/ExtensionScalarAtlas.js.map +1 -0
  2723. package/dist/rendering/ExternalParityRenderPreset.d.ts +15 -1
  2724. package/dist/rendering/ExternalParityRenderPreset.d.ts.map +1 -1
  2725. package/dist/rendering/ExternalParityRenderPreset.js +52 -7
  2726. package/dist/rendering/ExternalParityRenderPreset.js.map +1 -1
  2727. package/dist/rendering/ForwardPass.d.ts +240 -50
  2728. package/dist/rendering/ForwardPass.d.ts.map +1 -1
  2729. package/dist/rendering/ForwardPass.js +845 -866
  2730. package/dist/rendering/ForwardPass.js.map +1 -1
  2731. package/dist/rendering/Geometry.d.ts +44 -1
  2732. package/dist/rendering/Geometry.d.ts.map +1 -1
  2733. package/dist/rendering/Geometry.js +174 -24
  2734. package/dist/rendering/Geometry.js.map +1 -1
  2735. package/dist/rendering/InstancedPBRMaterial.d.ts +5 -0
  2736. package/dist/rendering/InstancedPBRMaterial.d.ts.map +1 -1
  2737. package/dist/rendering/InstancedPBRMaterial.js +7 -0
  2738. package/dist/rendering/InstancedPBRMaterial.js.map +1 -1
  2739. package/dist/rendering/LeanWebGL2Device.d.ts +265 -0
  2740. package/dist/rendering/LeanWebGL2Device.d.ts.map +1 -0
  2741. package/dist/rendering/LeanWebGL2Device.js +4001 -0
  2742. package/dist/rendering/LeanWebGL2Device.js.map +1 -0
  2743. package/dist/rendering/LightCollector.d.ts +8 -0
  2744. package/dist/rendering/LightCollector.d.ts.map +1 -1
  2745. package/dist/rendering/LightCollector.js +1 -1
  2746. package/dist/rendering/LightCollector.js.map +1 -1
  2747. package/dist/rendering/LightUniforms.d.ts +78 -0
  2748. package/dist/rendering/LightUniforms.d.ts.map +1 -1
  2749. package/dist/rendering/LightUniforms.js +100 -0
  2750. package/dist/rendering/LightUniforms.js.map +1 -1
  2751. package/dist/rendering/Material.d.ts +15 -0
  2752. package/dist/rendering/Material.d.ts.map +1 -1
  2753. package/dist/rendering/Material.js +19 -2
  2754. package/dist/rendering/Material.js.map +1 -1
  2755. package/dist/rendering/MaterialBinding.d.ts +10 -0
  2756. package/dist/rendering/MaterialBinding.d.ts.map +1 -1
  2757. package/dist/rendering/MaterialBinding.js +92 -2
  2758. package/dist/rendering/MaterialBinding.js.map +1 -1
  2759. package/dist/rendering/MaterialPresets.d.ts +60 -0
  2760. package/dist/rendering/MaterialPresets.d.ts.map +1 -1
  2761. package/dist/rendering/MaterialPresets.js +212 -0
  2762. package/dist/rendering/MaterialPresets.js.map +1 -1
  2763. package/dist/rendering/NormalMappedPBRMaterial.d.ts +5 -0
  2764. package/dist/rendering/NormalMappedPBRMaterial.d.ts.map +1 -1
  2765. package/dist/rendering/NormalMappedPBRMaterial.js +7 -0
  2766. package/dist/rendering/NormalMappedPBRMaterial.js.map +1 -1
  2767. package/dist/rendering/OceanSurface.d.ts +8 -0
  2768. package/dist/rendering/OceanSurface.d.ts.map +1 -1
  2769. package/dist/rendering/OceanSurface.js +10 -79
  2770. package/dist/rendering/OceanSurface.js.map +1 -1
  2771. package/dist/rendering/PBRLightingDefaults.d.ts +8 -0
  2772. package/dist/rendering/PBRLightingDefaults.d.ts.map +1 -1
  2773. package/dist/rendering/PBRLightingDefaults.js +8 -0
  2774. package/dist/rendering/PBRLightingDefaults.js.map +1 -1
  2775. package/dist/rendering/PBRMaterial.d.ts +5 -0
  2776. package/dist/rendering/PBRMaterial.d.ts.map +1 -1
  2777. package/dist/rendering/PBRMaterial.js +7 -0
  2778. package/dist/rendering/PBRMaterial.js.map +1 -1
  2779. package/dist/rendering/PlanarReflection.d.ts +2 -2
  2780. package/dist/rendering/PlanarReflection.js +3 -3
  2781. package/dist/rendering/PlanarReflection.js.map +1 -1
  2782. package/dist/rendering/PostProcessPass.d.ts +8 -473
  2783. package/dist/rendering/PostProcessPass.d.ts.map +1 -1
  2784. package/dist/rendering/PostProcessPass.js +6 -1984
  2785. package/dist/rendering/PostProcessPass.js.map +1 -1
  2786. package/dist/rendering/ProceduralMaterialTextures.d.ts +28 -0
  2787. package/dist/rendering/ProceduralMaterialTextures.d.ts.map +1 -0
  2788. package/dist/rendering/ProceduralMaterialTextures.js +217 -0
  2789. package/dist/rendering/ProceduralMaterialTextures.js.map +1 -0
  2790. package/dist/rendering/ProjectionMath.d.ts +3 -0
  2791. package/dist/rendering/ProjectionMath.d.ts.map +1 -0
  2792. package/dist/rendering/ProjectionMath.js +26 -0
  2793. package/dist/rendering/ProjectionMath.js.map +1 -0
  2794. package/dist/rendering/ReflectionProbe.d.ts.map +1 -1
  2795. package/dist/rendering/ReflectionProbe.js +4 -1
  2796. package/dist/rendering/ReflectionProbe.js.map +1 -1
  2797. package/dist/rendering/ReflectionSurfaces.d.ts +4 -1
  2798. package/dist/rendering/ReflectionSurfaces.d.ts.map +1 -1
  2799. package/dist/rendering/ReflectionSurfaces.js +10 -1
  2800. package/dist/rendering/ReflectionSurfaces.js.map +1 -1
  2801. package/dist/rendering/RenderBackend.d.ts +2 -0
  2802. package/dist/rendering/RenderBackend.d.ts.map +1 -1
  2803. package/dist/rendering/RenderBackend.js +3 -0
  2804. package/dist/rendering/RenderBackend.js.map +1 -1
  2805. package/dist/rendering/RenderDevice.d.ts +97 -5
  2806. package/dist/rendering/RenderDevice.d.ts.map +1 -1
  2807. package/dist/rendering/RenderDevice.js +166 -9
  2808. package/dist/rendering/RenderDevice.js.map +1 -1
  2809. package/dist/rendering/RenderGraph.d.ts.map +1 -1
  2810. package/dist/rendering/RenderGraph.js +17 -0
  2811. package/dist/rendering/RenderGraph.js.map +1 -1
  2812. package/dist/rendering/RenderPass.d.ts +7 -0
  2813. package/dist/rendering/RenderPass.d.ts.map +1 -1
  2814. package/dist/rendering/RenderPass.js.map +1 -1
  2815. package/dist/rendering/RenderPipeline.d.ts +5 -0
  2816. package/dist/rendering/RenderPipeline.d.ts.map +1 -1
  2817. package/dist/rendering/RenderPipeline.js +6 -0
  2818. package/dist/rendering/RenderPipeline.js.map +1 -1
  2819. package/dist/rendering/Renderer.d.ts +270 -66
  2820. package/dist/rendering/Renderer.d.ts.map +1 -1
  2821. package/dist/rendering/Renderer.js +970 -1249
  2822. package/dist/rendering/Renderer.js.map +1 -1
  2823. package/dist/rendering/RendererPostprocessPlan.d.ts +20 -3
  2824. package/dist/rendering/RendererPostprocessPlan.d.ts.map +1 -1
  2825. package/dist/rendering/RendererPostprocessPlan.js +32 -4
  2826. package/dist/rendering/RendererPostprocessPlan.js.map +1 -1
  2827. package/dist/rendering/RendererTiming.d.ts +27 -0
  2828. package/dist/rendering/RendererTiming.d.ts.map +1 -1
  2829. package/dist/rendering/RendererTiming.js +179 -12
  2830. package/dist/rendering/RendererTiming.js.map +1 -1
  2831. package/dist/rendering/ResolutionGovernor.d.ts +56 -0
  2832. package/dist/rendering/ResolutionGovernor.d.ts.map +1 -0
  2833. package/dist/rendering/ResolutionGovernor.js +87 -0
  2834. package/dist/rendering/ResolutionGovernor.js.map +1 -0
  2835. package/dist/rendering/Sampler.d.ts +34 -1
  2836. package/dist/rendering/Sampler.d.ts.map +1 -1
  2837. package/dist/rendering/Sampler.js +55 -2
  2838. package/dist/rendering/Sampler.js.map +1 -1
  2839. package/dist/rendering/ScreenSpaceReflectionPass.d.ts +43 -0
  2840. package/dist/rendering/ScreenSpaceReflectionPass.d.ts.map +1 -0
  2841. package/dist/rendering/ScreenSpaceReflectionPass.js +58 -0
  2842. package/dist/rendering/ScreenSpaceReflectionPass.js.map +1 -0
  2843. package/dist/rendering/ShaderLibrary.d.ts.map +1 -1
  2844. package/dist/rendering/ShaderLibrary.js +183 -207
  2845. package/dist/rendering/ShaderLibrary.js.map +1 -1
  2846. package/dist/rendering/ShaderLibraryCore.d.ts +3 -0
  2847. package/dist/rendering/ShaderLibraryCore.d.ts.map +1 -1
  2848. package/dist/rendering/ShaderLibraryCore.js +6 -2
  2849. package/dist/rendering/ShaderLibraryCore.js.map +1 -1
  2850. package/dist/rendering/ShaderModule.d.ts +7 -1
  2851. package/dist/rendering/ShaderModule.d.ts.map +1 -1
  2852. package/dist/rendering/ShaderModule.js +20 -5
  2853. package/dist/rendering/ShaderModule.js.map +1 -1
  2854. package/dist/rendering/ShadowPass.d.ts.map +1 -1
  2855. package/dist/rendering/ShadowPass.js +14 -7
  2856. package/dist/rendering/ShadowPass.js.map +1 -1
  2857. package/dist/rendering/SkinnedLitMaterial.d.ts +5 -0
  2858. package/dist/rendering/SkinnedLitMaterial.d.ts.map +1 -1
  2859. package/dist/rendering/SkinnedLitMaterial.js +13 -0
  2860. package/dist/rendering/SkinnedLitMaterial.js.map +1 -1
  2861. package/dist/rendering/SkinningBounds.d.ts +18 -0
  2862. package/dist/rendering/SkinningBounds.d.ts.map +1 -1
  2863. package/dist/rendering/SkinningBounds.js +78 -0
  2864. package/dist/rendering/SkinningBounds.js.map +1 -1
  2865. package/dist/rendering/SkinningPaletteTextureCache.d.ts +117 -0
  2866. package/dist/rendering/SkinningPaletteTextureCache.d.ts.map +1 -0
  2867. package/dist/rendering/SkinningPaletteTextureCache.js +205 -0
  2868. package/dist/rendering/SkinningPaletteTextureCache.js.map +1 -0
  2869. package/dist/rendering/SkinningUniforms.d.ts +56 -0
  2870. package/dist/rendering/SkinningUniforms.d.ts.map +1 -0
  2871. package/dist/rendering/SkinningUniforms.js +262 -0
  2872. package/dist/rendering/SkinningUniforms.js.map +1 -0
  2873. package/dist/rendering/TemporalHistory.d.ts +70 -0
  2874. package/dist/rendering/TemporalHistory.d.ts.map +1 -0
  2875. package/dist/rendering/TemporalHistory.js +218 -0
  2876. package/dist/rendering/TemporalHistory.js.map +1 -0
  2877. package/dist/rendering/TemporalMath.d.ts +3 -0
  2878. package/dist/rendering/TemporalMath.d.ts.map +1 -0
  2879. package/dist/rendering/TemporalMath.js +9 -0
  2880. package/dist/rendering/TemporalMath.js.map +1 -0
  2881. package/dist/rendering/TerrainHeightfield.d.ts +12 -0
  2882. package/dist/rendering/TerrainHeightfield.d.ts.map +1 -1
  2883. package/dist/rendering/TerrainHeightfield.js +29 -6
  2884. package/dist/rendering/TerrainHeightfield.js.map +1 -1
  2885. package/dist/rendering/TerrainTiles.d.ts +40 -10
  2886. package/dist/rendering/TerrainTiles.d.ts.map +1 -1
  2887. package/dist/rendering/TerrainTiles.js +18 -57
  2888. package/dist/rendering/TerrainTiles.js.map +1 -1
  2889. package/dist/rendering/Texture.d.ts +47 -2
  2890. package/dist/rendering/Texture.d.ts.map +1 -1
  2891. package/dist/rendering/Texture.js +119 -3
  2892. package/dist/rendering/Texture.js.map +1 -1
  2893. package/dist/rendering/TexturedPBRMaterial.d.ts +27 -0
  2894. package/dist/rendering/TexturedPBRMaterial.d.ts.map +1 -1
  2895. package/dist/rendering/TexturedPBRMaterial.js +137 -23
  2896. package/dist/rendering/TexturedPBRMaterial.js.map +1 -1
  2897. package/dist/rendering/TransmissionRenderTarget.d.ts +33 -0
  2898. package/dist/rendering/TransmissionRenderTarget.d.ts.map +1 -0
  2899. package/dist/rendering/TransmissionRenderTarget.js +61 -0
  2900. package/dist/rendering/TransmissionRenderTarget.js.map +1 -0
  2901. package/dist/rendering/VegetationScatter.js +1 -1
  2902. package/dist/rendering/VegetationScatter.js.map +1 -1
  2903. package/dist/rendering/VolumetricFog.d.ts +42 -0
  2904. package/dist/rendering/VolumetricFog.d.ts.map +1 -1
  2905. package/dist/rendering/VolumetricFog.js +52 -1
  2906. package/dist/rendering/VolumetricFog.js.map +1 -1
  2907. package/dist/rendering/WaterSurface.d.ts +5 -0
  2908. package/dist/rendering/WaterSurface.d.ts.map +1 -1
  2909. package/dist/rendering/WaterSurface.js +5 -0
  2910. package/dist/rendering/WaterSurface.js.map +1 -1
  2911. package/dist/rendering/WebGL2Device.d.ts +159 -198
  2912. package/dist/rendering/WebGL2Device.d.ts.map +1 -1
  2913. package/dist/rendering/WebGL2Device.js +797 -3443
  2914. package/dist/rendering/WebGL2Device.js.map +1 -1
  2915. package/dist/rendering/WebGL2StateCache.d.ts +15 -1
  2916. package/dist/rendering/WebGL2StateCache.d.ts.map +1 -1
  2917. package/dist/rendering/WebGL2StateCache.js +31 -2
  2918. package/dist/rendering/WebGL2StateCache.js.map +1 -1
  2919. package/dist/rendering/WebGPUDevice.d.ts +16 -9
  2920. package/dist/rendering/WebGPUDevice.d.ts.map +1 -1
  2921. package/dist/rendering/WebGPUDevice.js +343 -618
  2922. package/dist/rendering/WebGPUDevice.js.map +1 -1
  2923. package/dist/rendering/WebGPUExtensionAtlas.d.ts +6 -0
  2924. package/dist/rendering/WebGPUExtensionAtlas.d.ts.map +1 -0
  2925. package/dist/rendering/WebGPUExtensionAtlas.js +225 -0
  2926. package/dist/rendering/WebGPUExtensionAtlas.js.map +1 -0
  2927. package/dist/rendering/WebGPUSkinningLimits.d.ts +10 -1
  2928. package/dist/rendering/WebGPUSkinningLimits.d.ts.map +1 -1
  2929. package/dist/rendering/WebGPUSkinningLimits.js +15 -1
  2930. package/dist/rendering/WebGPUSkinningLimits.js.map +1 -1
  2931. package/dist/rendering/advanced-runtime/index.d.ts +6 -2
  2932. package/dist/rendering/advanced-runtime/index.d.ts.map +1 -1
  2933. package/dist/rendering/advanced-runtime/index.js +0 -1
  2934. package/dist/rendering/advanced-runtime/index.js.map +1 -1
  2935. package/dist/rendering/animation/AnimationRenderPreset.d.ts +1 -1
  2936. package/dist/rendering/animation/AnimationRenderPreset.d.ts.map +1 -1
  2937. package/dist/rendering/animation/AnimationRenderPreset.js +1 -1
  2938. package/dist/rendering/animation/AnimationRenderPreset.js.map +1 -1
  2939. package/dist/rendering/animation/applyAnimationRenderPreset.d.ts +1 -1
  2940. package/dist/rendering/animation/applyAnimationRenderPreset.d.ts.map +1 -1
  2941. package/dist/rendering/animation/index.d.ts +2 -1
  2942. package/dist/rendering/animation/index.d.ts.map +1 -1
  2943. package/dist/rendering/animation/index.js +1 -1
  2944. package/dist/rendering/animation/index.js.map +1 -1
  2945. package/dist/rendering/atmosphere/CloudLayer.d.ts +24 -0
  2946. package/dist/rendering/atmosphere/CloudLayer.d.ts.map +1 -0
  2947. package/dist/rendering/atmosphere/CloudLayer.js +30 -0
  2948. package/dist/rendering/atmosphere/CloudLayer.js.map +1 -0
  2949. package/dist/rendering/atmosphere/FogVolumes.d.ts +30 -0
  2950. package/dist/rendering/atmosphere/FogVolumes.d.ts.map +1 -0
  2951. package/dist/rendering/atmosphere/FogVolumes.js +96 -0
  2952. package/dist/rendering/atmosphere/FogVolumes.js.map +1 -0
  2953. package/dist/rendering/atmosphere/GradientSky.d.ts +40 -0
  2954. package/dist/rendering/atmosphere/GradientSky.d.ts.map +1 -0
  2955. package/dist/rendering/atmosphere/GradientSky.js +75 -0
  2956. package/dist/rendering/atmosphere/GradientSky.js.map +1 -0
  2957. package/dist/rendering/atmosphere/HeightFog.d.ts +154 -0
  2958. package/dist/rendering/atmosphere/HeightFog.d.ts.map +1 -0
  2959. package/dist/rendering/atmosphere/HeightFog.js +379 -0
  2960. package/dist/rendering/atmosphere/HeightFog.js.map +1 -0
  2961. package/dist/rendering/atmosphere/PreethamSky.d.ts +38 -0
  2962. package/dist/rendering/atmosphere/PreethamSky.d.ts.map +1 -0
  2963. package/dist/rendering/atmosphere/PreethamSky.js +150 -0
  2964. package/dist/rendering/atmosphere/PreethamSky.js.map +1 -0
  2965. package/dist/rendering/atmosphere/SkyBackgroundPass.d.ts +63 -0
  2966. package/dist/rendering/atmosphere/SkyBackgroundPass.d.ts.map +1 -0
  2967. package/dist/rendering/atmosphere/SkyBackgroundPass.js +233 -0
  2968. package/dist/rendering/atmosphere/SkyBackgroundPass.js.map +1 -0
  2969. package/dist/rendering/atmosphere/SkyCaptureAdapter.d.ts +45 -0
  2970. package/dist/rendering/atmosphere/SkyCaptureAdapter.d.ts.map +1 -0
  2971. package/dist/rendering/atmosphere/SkyCaptureAdapter.js +65 -0
  2972. package/dist/rendering/atmosphere/SkyCaptureAdapter.js.map +1 -0
  2973. package/dist/rendering/atmosphere/SkyEval.d.ts +56 -0
  2974. package/dist/rendering/atmosphere/SkyEval.d.ts.map +1 -0
  2975. package/dist/rendering/atmosphere/SkyEval.js +99 -0
  2976. package/dist/rendering/atmosphere/SkyEval.js.map +1 -0
  2977. package/dist/rendering/atmosphere/StarField.d.ts +26 -0
  2978. package/dist/rendering/atmosphere/StarField.d.ts.map +1 -0
  2979. package/dist/rendering/atmosphere/StarField.js +31 -0
  2980. package/dist/rendering/atmosphere/StarField.js.map +1 -0
  2981. package/dist/rendering/atmosphere/VolumetricFogPass.d.ts +69 -0
  2982. package/dist/rendering/atmosphere/VolumetricFogPass.d.ts.map +1 -0
  2983. package/dist/rendering/atmosphere/VolumetricFogPass.js +265 -0
  2984. package/dist/rendering/atmosphere/VolumetricFogPass.js.map +1 -0
  2985. package/dist/rendering/atmosphere/fogChunks.d.ts +8 -0
  2986. package/dist/rendering/atmosphere/fogChunks.d.ts.map +1 -0
  2987. package/dist/rendering/atmosphere/fogChunks.js +39 -0
  2988. package/dist/rendering/atmosphere/fogChunks.js.map +1 -0
  2989. package/dist/rendering/atmosphere/fogUniformStore.d.ts +20 -0
  2990. package/dist/rendering/atmosphere/fogUniformStore.d.ts.map +1 -0
  2991. package/dist/rendering/atmosphere/fogUniformStore.js +45 -0
  2992. package/dist/rendering/atmosphere/fogUniformStore.js.map +1 -0
  2993. package/dist/rendering/atmosphere/shaders/fog.glsl.d.ts +10 -0
  2994. package/dist/rendering/atmosphere/shaders/fog.glsl.d.ts.map +1 -0
  2995. package/dist/rendering/atmosphere/shaders/fog.glsl.js +161 -0
  2996. package/dist/rendering/atmosphere/shaders/fog.glsl.js.map +1 -0
  2997. package/dist/rendering/atmosphere/shaders/volumetric-apply.glsl.d.ts +3 -0
  2998. package/dist/rendering/atmosphere/shaders/volumetric-apply.glsl.d.ts.map +1 -0
  2999. package/dist/rendering/atmosphere/shaders/volumetric-apply.glsl.js +61 -0
  3000. package/dist/rendering/atmosphere/shaders/volumetric-apply.glsl.js.map +1 -0
  3001. package/dist/rendering/atmosphere/shaders/volumetric-inject.glsl.d.ts +4 -0
  3002. package/dist/rendering/atmosphere/shaders/volumetric-inject.glsl.d.ts.map +1 -0
  3003. package/dist/rendering/atmosphere/shaders/volumetric-inject.glsl.js +129 -0
  3004. package/dist/rendering/atmosphere/shaders/volumetric-inject.glsl.js.map +1 -0
  3005. package/dist/rendering/atmosphere/shaders/volumetric-integrate.glsl.d.ts +3 -0
  3006. package/dist/rendering/atmosphere/shaders/volumetric-integrate.glsl.d.ts.map +1 -0
  3007. package/dist/rendering/atmosphere/shaders/volumetric-integrate.glsl.js +55 -0
  3008. package/dist/rendering/atmosphere/shaders/volumetric-integrate.glsl.js.map +1 -0
  3009. package/dist/rendering/atmosphere/shaders/wetness.glsl.d.ts +34 -0
  3010. package/dist/rendering/atmosphere/shaders/wetness.glsl.d.ts.map +1 -0
  3011. package/dist/rendering/atmosphere/shaders/wetness.glsl.js +101 -0
  3012. package/dist/rendering/atmosphere/shaders/wetness.glsl.js.map +1 -0
  3013. package/dist/rendering/atmosphere/sky.glsl.d.ts +8 -0
  3014. package/dist/rendering/atmosphere/sky.glsl.d.ts.map +1 -0
  3015. package/dist/rendering/atmosphere/sky.glsl.js +249 -0
  3016. package/dist/rendering/atmosphere/sky.glsl.js.map +1 -0
  3017. package/dist/rendering/batching/BatchedGeometryPool.d.ts +72 -0
  3018. package/dist/rendering/batching/BatchedGeometryPool.d.ts.map +1 -0
  3019. package/dist/rendering/batching/BatchedGeometryPool.js +138 -0
  3020. package/dist/rendering/batching/BatchedGeometryPool.js.map +1 -0
  3021. package/dist/rendering/batching/ContentKeys.d.ts +29 -0
  3022. package/dist/rendering/batching/ContentKeys.d.ts.map +1 -0
  3023. package/dist/rendering/batching/ContentKeys.js +220 -0
  3024. package/dist/rendering/batching/ContentKeys.js.map +1 -0
  3025. package/dist/rendering/batching/DrawDataTexture.d.ts +51 -0
  3026. package/dist/rendering/batching/DrawDataTexture.d.ts.map +1 -0
  3027. package/dist/rendering/batching/DrawDataTexture.js +99 -0
  3028. package/dist/rendering/batching/DrawDataTexture.js.map +1 -0
  3029. package/dist/rendering/batching/MultiDrawBatch.d.ts +64 -0
  3030. package/dist/rendering/batching/MultiDrawBatch.d.ts.map +1 -0
  3031. package/dist/rendering/batching/MultiDrawBatch.js +103 -0
  3032. package/dist/rendering/batching/MultiDrawBatch.js.map +1 -0
  3033. package/dist/rendering/batching/StaticMergePlanner.d.ts +80 -0
  3034. package/dist/rendering/batching/StaticMergePlanner.d.ts.map +1 -0
  3035. package/dist/rendering/batching/StaticMergePlanner.js +323 -0
  3036. package/dist/rendering/batching/StaticMergePlanner.js.map +1 -0
  3037. package/dist/rendering/batching/index.d.ts +8 -0
  3038. package/dist/rendering/batching/index.d.ts.map +1 -0
  3039. package/dist/rendering/batching/index.js +8 -0
  3040. package/dist/rendering/batching/index.js.map +1 -0
  3041. package/dist/rendering/batching/shaders/drawId.glsl.d.ts +29 -0
  3042. package/dist/rendering/batching/shaders/drawId.glsl.d.ts.map +1 -0
  3043. package/dist/rendering/batching/shaders/drawId.glsl.js +93 -0
  3044. package/dist/rendering/batching/shaders/drawId.glsl.js.map +1 -0
  3045. package/dist/rendering/batching/shaders/instanceEmissive.glsl.d.ts +16 -0
  3046. package/dist/rendering/batching/shaders/instanceEmissive.glsl.d.ts.map +1 -0
  3047. package/dist/rendering/batching/shaders/instanceEmissive.glsl.js +63 -0
  3048. package/dist/rendering/batching/shaders/instanceEmissive.glsl.js.map +1 -0
  3049. package/dist/rendering/cinematic/BloomPass.d.ts +5 -9
  3050. package/dist/rendering/cinematic/BloomPass.d.ts.map +1 -1
  3051. package/dist/rendering/cinematic/BloomPass.js +5 -17
  3052. package/dist/rendering/cinematic/BloomPass.js.map +1 -1
  3053. package/dist/rendering/cinematic/DepthHazePass.d.ts +5 -11
  3054. package/dist/rendering/cinematic/DepthHazePass.d.ts.map +1 -1
  3055. package/dist/rendering/cinematic/DepthHazePass.js +5 -19
  3056. package/dist/rendering/cinematic/DepthHazePass.js.map +1 -1
  3057. package/dist/rendering/cinematic/FilmGrainPass.d.ts +5 -8
  3058. package/dist/rendering/cinematic/FilmGrainPass.d.ts.map +1 -1
  3059. package/dist/rendering/cinematic/FilmGrainPass.js +5 -16
  3060. package/dist/rendering/cinematic/FilmGrainPass.js.map +1 -1
  3061. package/dist/rendering/cinematic/VignettePass.d.ts +5 -9
  3062. package/dist/rendering/cinematic/VignettePass.d.ts.map +1 -1
  3063. package/dist/rendering/cinematic/VignettePass.js +5 -16
  3064. package/dist/rendering/cinematic/VignettePass.js.map +1 -1
  3065. package/dist/rendering/cinematic/index.d.ts +2 -1
  3066. package/dist/rendering/cinematic/index.d.ts.map +1 -1
  3067. package/dist/rendering/cinematic/index.js +1 -1
  3068. package/dist/rendering/cinematic/index.js.map +1 -1
  3069. package/dist/rendering/contracts/atmosphere.d.ts +30 -0
  3070. package/dist/rendering/contracts/atmosphere.d.ts.map +1 -0
  3071. package/dist/rendering/contracts/atmosphere.js +42 -0
  3072. package/dist/rendering/contracts/atmosphere.js.map +1 -0
  3073. package/dist/rendering/contracts/blend.d.ts +28 -0
  3074. package/dist/rendering/contracts/blend.d.ts.map +1 -0
  3075. package/dist/rendering/contracts/blend.js +73 -0
  3076. package/dist/rendering/contracts/blend.js.map +1 -0
  3077. package/dist/rendering/contracts/core.d.ts +47 -0
  3078. package/dist/rendering/contracts/core.d.ts.map +1 -0
  3079. package/dist/rendering/contracts/core.js +70 -0
  3080. package/dist/rendering/contracts/core.js.map +1 -0
  3081. package/dist/rendering/contracts/deform.d.ts +38 -0
  3082. package/dist/rendering/contracts/deform.d.ts.map +1 -0
  3083. package/dist/rendering/contracts/deform.js +14 -0
  3084. package/dist/rendering/contracts/deform.js.map +1 -0
  3085. package/dist/rendering/contracts/device.d.ts +71 -0
  3086. package/dist/rendering/contracts/device.d.ts.map +1 -0
  3087. package/dist/rendering/contracts/device.js +97 -0
  3088. package/dist/rendering/contracts/device.js.map +1 -0
  3089. package/dist/rendering/contracts/environment.d.ts +55 -0
  3090. package/dist/rendering/contracts/environment.d.ts.map +1 -0
  3091. package/dist/rendering/contracts/environment.js +115 -0
  3092. package/dist/rendering/contracts/environment.js.map +1 -0
  3093. package/dist/rendering/contracts/flags.state.d.ts +15 -0
  3094. package/dist/rendering/contracts/flags.state.d.ts.map +1 -0
  3095. package/dist/rendering/contracts/flags.state.js +45 -0
  3096. package/dist/rendering/contracts/flags.state.js.map +1 -0
  3097. package/dist/rendering/contracts/frameGraph.d.ts +78 -0
  3098. package/dist/rendering/contracts/frameGraph.d.ts.map +1 -0
  3099. package/dist/rendering/contracts/frameGraph.js +32 -0
  3100. package/dist/rendering/contracts/frameGraph.js.map +1 -0
  3101. package/dist/rendering/contracts/frameUniforms.d.ts +43 -0
  3102. package/dist/rendering/contracts/frameUniforms.d.ts.map +1 -0
  3103. package/dist/rendering/contracts/frameUniforms.js +35 -0
  3104. package/dist/rendering/contracts/frameUniforms.js.map +1 -0
  3105. package/dist/rendering/contracts/geometry.d.ts +33 -0
  3106. package/dist/rendering/contracts/geometry.d.ts.map +1 -0
  3107. package/dist/rendering/contracts/geometry.js +59 -0
  3108. package/dist/rendering/contracts/geometry.js.map +1 -0
  3109. package/dist/rendering/contracts/index.d.ts +27 -0
  3110. package/dist/rendering/contracts/index.d.ts.map +1 -0
  3111. package/dist/rendering/contracts/index.js +27 -0
  3112. package/dist/rendering/contracts/index.js.map +1 -0
  3113. package/dist/rendering/contracts/materialLobes.d.ts +41 -0
  3114. package/dist/rendering/contracts/materialLobes.d.ts.map +1 -0
  3115. package/dist/rendering/contracts/materialLobes.js +14 -0
  3116. package/dist/rendering/contracts/materialLobes.js.map +1 -0
  3117. package/dist/rendering/contracts/output.d.ts +35 -0
  3118. package/dist/rendering/contracts/output.d.ts.map +1 -0
  3119. package/dist/rendering/contracts/output.js +18 -0
  3120. package/dist/rendering/contracts/output.js.map +1 -0
  3121. package/dist/rendering/contracts/particles.d.ts +41 -0
  3122. package/dist/rendering/contracts/particles.d.ts.map +1 -0
  3123. package/dist/rendering/contracts/particles.js +15 -0
  3124. package/dist/rendering/contracts/particles.js.map +1 -0
  3125. package/dist/rendering/contracts/post.d.ts +71 -0
  3126. package/dist/rendering/contracts/post.d.ts.map +1 -0
  3127. package/dist/rendering/contracts/post.js +28 -0
  3128. package/dist/rendering/contracts/post.js.map +1 -0
  3129. package/dist/rendering/contracts/program.d.ts +158 -0
  3130. package/dist/rendering/contracts/program.d.ts.map +1 -0
  3131. package/dist/rendering/contracts/program.js +128 -0
  3132. package/dist/rendering/contracts/program.js.map +1 -0
  3133. package/dist/rendering/contracts/quality.d.ts +93 -0
  3134. package/dist/rendering/contracts/quality.d.ts.map +1 -0
  3135. package/dist/rendering/contracts/quality.js +149 -0
  3136. package/dist/rendering/contracts/quality.js.map +1 -0
  3137. package/dist/rendering/contracts/renderItem.d.ts +58 -0
  3138. package/dist/rendering/contracts/renderItem.d.ts.map +1 -0
  3139. package/dist/rendering/contracts/renderItem.js +8 -0
  3140. package/dist/rendering/contracts/renderItem.js.map +1 -0
  3141. package/dist/rendering/contracts/renderSource.d.ts +63 -0
  3142. package/dist/rendering/contracts/renderSource.d.ts.map +1 -0
  3143. package/dist/rendering/contracts/renderSource.js +7 -0
  3144. package/dist/rendering/contracts/renderSource.js.map +1 -0
  3145. package/dist/rendering/contracts/rendererFactory.d.ts +42 -0
  3146. package/dist/rendering/contracts/rendererFactory.d.ts.map +1 -0
  3147. package/dist/rendering/contracts/rendererFactory.js +32 -0
  3148. package/dist/rendering/contracts/rendererFactory.js.map +1 -0
  3149. package/dist/rendering/contracts/sampling.d.ts +23 -0
  3150. package/dist/rendering/contracts/sampling.d.ts.map +1 -0
  3151. package/dist/rendering/contracts/sampling.js +17 -0
  3152. package/dist/rendering/contracts/sampling.js.map +1 -0
  3153. package/dist/rendering/contracts/shadows.d.ts +53 -0
  3154. package/dist/rendering/contracts/shadows.d.ts.map +1 -0
  3155. package/dist/rendering/contracts/shadows.js +66 -0
  3156. package/dist/rendering/contracts/shadows.js.map +1 -0
  3157. package/dist/rendering/contracts/testing/ChunkHarness.d.ts +18 -0
  3158. package/dist/rendering/contracts/testing/ChunkHarness.d.ts.map +1 -0
  3159. package/dist/rendering/contracts/testing/ChunkHarness.js +68 -0
  3160. package/dist/rendering/contracts/testing/ChunkHarness.js.map +1 -0
  3161. package/dist/rendering/contracts/textureFormats.d.ts +18 -0
  3162. package/dist/rendering/contracts/textureFormats.d.ts.map +1 -0
  3163. package/dist/rendering/contracts/textureFormats.js +13 -0
  3164. package/dist/rendering/contracts/textureFormats.js.map +1 -0
  3165. package/dist/rendering/contracts/velocity.d.ts +37 -0
  3166. package/dist/rendering/contracts/velocity.d.ts.map +1 -0
  3167. package/dist/rendering/contracts/velocity.js +22 -0
  3168. package/dist/rendering/contracts/velocity.js.map +1 -0
  3169. package/dist/rendering/effects/GPUParticleBackend.d.ts +4 -2
  3170. package/dist/rendering/effects/GPUParticleBackend.d.ts.map +1 -1
  3171. package/dist/rendering/effects/GPUParticleBackend.js +20 -2
  3172. package/dist/rendering/effects/GPUParticleBackend.js.map +1 -1
  3173. package/dist/rendering/effects/ResidentGPUParticleRenderer.d.ts +158 -0
  3174. package/dist/rendering/effects/ResidentGPUParticleRenderer.d.ts.map +1 -0
  3175. package/dist/rendering/effects/ResidentGPUParticleRenderer.js +576 -0
  3176. package/dist/rendering/effects/ResidentGPUParticleRenderer.js.map +1 -0
  3177. package/dist/rendering/environment/EnvUniforms.d.ts +42 -0
  3178. package/dist/rendering/environment/EnvUniforms.d.ts.map +1 -0
  3179. package/dist/rendering/environment/EnvUniforms.js +54 -0
  3180. package/dist/rendering/environment/EnvUniforms.js.map +1 -0
  3181. package/dist/rendering/environment/EnvironmentCache.d.ts +83 -0
  3182. package/dist/rendering/environment/EnvironmentCache.d.ts.map +1 -0
  3183. package/dist/rendering/environment/EnvironmentCache.js +205 -0
  3184. package/dist/rendering/environment/EnvironmentCache.js.map +1 -0
  3185. package/dist/rendering/environment/EnvironmentProbeFactory.d.ts +41 -0
  3186. package/dist/rendering/environment/EnvironmentProbeFactory.d.ts.map +1 -0
  3187. package/dist/rendering/environment/EnvironmentProbeFactory.js +52 -0
  3188. package/dist/rendering/environment/EnvironmentProbeFactory.js.map +1 -0
  3189. package/dist/rendering/environment/GPUPMREMGenerator.d.ts +44 -0
  3190. package/dist/rendering/environment/GPUPMREMGenerator.d.ts.map +1 -0
  3191. package/dist/rendering/environment/GPUPMREMGenerator.js +98 -0
  3192. package/dist/rendering/environment/GPUPMREMGenerator.js.map +1 -0
  3193. package/dist/rendering/environment/HdrEquirect.d.ts +28 -0
  3194. package/dist/rendering/environment/HdrEquirect.d.ts.map +1 -0
  3195. package/dist/rendering/environment/HdrEquirect.js +205 -0
  3196. package/dist/rendering/environment/HdrEquirect.js.map +1 -0
  3197. package/dist/rendering/environment/LightingSamplerBudget.d.ts +20 -0
  3198. package/dist/rendering/environment/LightingSamplerBudget.d.ts.map +1 -0
  3199. package/dist/rendering/environment/LightingSamplerBudget.js +94 -0
  3200. package/dist/rendering/environment/LightingSamplerBudget.js.map +1 -0
  3201. package/dist/rendering/environment/Prd02BackgroundShaderLibrary.d.ts +10 -0
  3202. package/dist/rendering/environment/Prd02BackgroundShaderLibrary.d.ts.map +1 -0
  3203. package/dist/rendering/environment/Prd02BackgroundShaderLibrary.js +100 -0
  3204. package/dist/rendering/environment/Prd02BackgroundShaderLibrary.js.map +1 -0
  3205. package/dist/rendering/environment/Rgb9e5Cube.d.ts +25 -0
  3206. package/dist/rendering/environment/Rgb9e5Cube.d.ts.map +1 -0
  3207. package/dist/rendering/environment/Rgb9e5Cube.js +103 -0
  3208. package/dist/rendering/environment/Rgb9e5Cube.js.map +1 -0
  3209. package/dist/rendering/environment/RoomEnvironmentScene.d.ts +57 -0
  3210. package/dist/rendering/environment/RoomEnvironmentScene.d.ts.map +1 -0
  3211. package/dist/rendering/environment/RoomEnvironmentScene.js +165 -0
  3212. package/dist/rendering/environment/RoomEnvironmentScene.js.map +1 -0
  3213. package/dist/rendering/environment/SphericalHarmonics.d.ts +32 -0
  3214. package/dist/rendering/environment/SphericalHarmonics.d.ts.map +1 -0
  3215. package/dist/rendering/environment/SphericalHarmonics.js +155 -0
  3216. package/dist/rendering/environment/SphericalHarmonics.js.map +1 -0
  3217. package/dist/rendering/environment/probeBuild.d.ts +97 -0
  3218. package/dist/rendering/environment/probeBuild.d.ts.map +1 -0
  3219. package/dist/rendering/environment/probeBuild.js +406 -0
  3220. package/dist/rendering/environment/probeBuild.js.map +1 -0
  3221. package/dist/rendering/environment/workers/cpuPrefilter.d.ts +58 -0
  3222. package/dist/rendering/environment/workers/cpuPrefilter.d.ts.map +1 -0
  3223. package/dist/rendering/environment/workers/cpuPrefilter.js +288 -0
  3224. package/dist/rendering/environment/workers/cpuPrefilter.js.map +1 -0
  3225. package/dist/rendering/extension-scalar-atlas.d.ts +3 -0
  3226. package/dist/rendering/extension-scalar-atlas.d.ts.map +1 -0
  3227. package/dist/rendering/extension-scalar-atlas.js +2 -0
  3228. package/dist/rendering/extension-scalar-atlas.js.map +1 -0
  3229. package/dist/rendering/forward/Deform.d.ts +56 -0
  3230. package/dist/rendering/forward/Deform.d.ts.map +1 -0
  3231. package/dist/rendering/forward/Deform.js +517 -0
  3232. package/dist/rendering/forward/Deform.js.map +1 -0
  3233. package/dist/rendering/forward/DrawSubmit.d.ts +32 -0
  3234. package/dist/rendering/forward/DrawSubmit.d.ts.map +1 -0
  3235. package/dist/rendering/forward/DrawSubmit.js +75 -0
  3236. package/dist/rendering/forward/DrawSubmit.js.map +1 -0
  3237. package/dist/rendering/forward/Lighting.d.ts +35 -0
  3238. package/dist/rendering/forward/Lighting.d.ts.map +1 -0
  3239. package/dist/rendering/forward/Lighting.js +477 -0
  3240. package/dist/rendering/forward/Lighting.js.map +1 -0
  3241. package/dist/rendering/forward/Transmission.d.ts +62 -0
  3242. package/dist/rendering/forward/Transmission.d.ts.map +1 -0
  3243. package/dist/rendering/forward/Transmission.js +299 -0
  3244. package/dist/rendering/forward/Transmission.js.map +1 -0
  3245. package/dist/rendering/forward/Velocity.d.ts +47 -0
  3246. package/dist/rendering/forward/Velocity.d.ts.map +1 -0
  3247. package/dist/rendering/forward/Velocity.js +153 -0
  3248. package/dist/rendering/forward/Velocity.js.map +1 -0
  3249. package/dist/rendering/forward/transmissionTargetStore.d.ts +21 -0
  3250. package/dist/rendering/forward/transmissionTargetStore.d.ts.map +1 -0
  3251. package/dist/rendering/forward/transmissionTargetStore.js +8 -0
  3252. package/dist/rendering/forward/transmissionTargetStore.js.map +1 -0
  3253. package/dist/rendering/geometry/Primitives.d.ts +28 -0
  3254. package/dist/rendering/geometry/Primitives.d.ts.map +1 -0
  3255. package/dist/rendering/geometry/Primitives.js +110 -0
  3256. package/dist/rendering/geometry/Primitives.js.map +1 -0
  3257. package/dist/rendering/index.d.ts +140 -57
  3258. package/dist/rendering/index.d.ts.map +1 -1
  3259. package/dist/rendering/index.js +102 -51
  3260. package/dist/rendering/index.js.map +1 -1
  3261. package/dist/rendering/lanes/index.d.ts +17 -0
  3262. package/dist/rendering/lanes/index.d.ts.map +1 -0
  3263. package/dist/rendering/lanes/index.js +17 -0
  3264. package/dist/rendering/lanes/index.js.map +1 -0
  3265. package/dist/rendering/lanes/prd01.d.ts +6 -0
  3266. package/dist/rendering/lanes/prd01.d.ts.map +1 -0
  3267. package/dist/rendering/lanes/prd01.js +19 -0
  3268. package/dist/rendering/lanes/prd01.js.map +1 -0
  3269. package/dist/rendering/lanes/prd02.d.ts +62 -0
  3270. package/dist/rendering/lanes/prd02.d.ts.map +1 -0
  3271. package/dist/rendering/lanes/prd02.js +117 -0
  3272. package/dist/rendering/lanes/prd02.js.map +1 -0
  3273. package/dist/rendering/lanes/prd03.d.ts +19 -0
  3274. package/dist/rendering/lanes/prd03.d.ts.map +1 -0
  3275. package/dist/rendering/lanes/prd03.js +55 -0
  3276. package/dist/rendering/lanes/prd03.js.map +1 -0
  3277. package/dist/rendering/lanes/prd04.d.ts +22 -0
  3278. package/dist/rendering/lanes/prd04.d.ts.map +1 -0
  3279. package/dist/rendering/lanes/prd04.js +35 -0
  3280. package/dist/rendering/lanes/prd04.js.map +1 -0
  3281. package/dist/rendering/lanes/prd05.d.ts +4 -0
  3282. package/dist/rendering/lanes/prd05.d.ts.map +1 -0
  3283. package/dist/rendering/lanes/prd05.js +31 -0
  3284. package/dist/rendering/lanes/prd05.js.map +1 -0
  3285. package/dist/rendering/lanes/prd06.d.ts +33 -0
  3286. package/dist/rendering/lanes/prd06.d.ts.map +1 -0
  3287. package/dist/rendering/lanes/prd06.js +217 -0
  3288. package/dist/rendering/lanes/prd06.js.map +1 -0
  3289. package/dist/rendering/lanes/prd07.d.ts +49 -0
  3290. package/dist/rendering/lanes/prd07.d.ts.map +1 -0
  3291. package/dist/rendering/lanes/prd07.js +112 -0
  3292. package/dist/rendering/lanes/prd07.js.map +1 -0
  3293. package/dist/rendering/lanes/prd08.d.ts +2 -0
  3294. package/dist/rendering/lanes/prd08.d.ts.map +1 -0
  3295. package/dist/rendering/lanes/prd08.js +17 -0
  3296. package/dist/rendering/lanes/prd08.js.map +1 -0
  3297. package/dist/rendering/lanes/prd09.d.ts +6 -0
  3298. package/dist/rendering/lanes/prd09.d.ts.map +1 -0
  3299. package/dist/rendering/lanes/prd09.js +6 -0
  3300. package/dist/rendering/lanes/prd09.js.map +1 -0
  3301. package/dist/rendering/lanes/prd10.d.ts +2 -0
  3302. package/dist/rendering/lanes/prd10.d.ts.map +1 -0
  3303. package/dist/rendering/lanes/prd10.js +10 -0
  3304. package/dist/rendering/lanes/prd10.js.map +1 -0
  3305. package/dist/rendering/lanes/prd11.d.ts +61 -0
  3306. package/dist/rendering/lanes/prd11.d.ts.map +1 -0
  3307. package/dist/rendering/lanes/prd11.js +244 -0
  3308. package/dist/rendering/lanes/prd11.js.map +1 -0
  3309. package/dist/rendering/lanes/prd12.d.ts +6 -0
  3310. package/dist/rendering/lanes/prd12.d.ts.map +1 -0
  3311. package/dist/rendering/lanes/prd12.js +6 -0
  3312. package/dist/rendering/lanes/prd12.js.map +1 -0
  3313. package/dist/rendering/lanes/prd13.d.ts +6 -0
  3314. package/dist/rendering/lanes/prd13.d.ts.map +1 -0
  3315. package/dist/rendering/lanes/prd13.js +6 -0
  3316. package/dist/rendering/lanes/prd13.js.map +1 -0
  3317. package/dist/rendering/lanes/prd14.d.ts +6 -0
  3318. package/dist/rendering/lanes/prd14.d.ts.map +1 -0
  3319. package/dist/rendering/lanes/prd14.js +6 -0
  3320. package/dist/rendering/lanes/prd14.js.map +1 -0
  3321. package/dist/rendering/lanes/prd15.d.ts +6 -0
  3322. package/dist/rendering/lanes/prd15.d.ts.map +1 -0
  3323. package/dist/rendering/lanes/prd15.js +6 -0
  3324. package/dist/rendering/lanes/prd15.js.map +1 -0
  3325. package/dist/rendering/lean/LeanProductionRenderer.d.ts.map +1 -1
  3326. package/dist/rendering/lean/LeanProductionRenderer.js +2 -2
  3327. package/dist/rendering/lean/LeanProductionRenderer.js.map +1 -1
  3328. package/dist/rendering/lean-core-runtime.d.ts +13 -0
  3329. package/dist/rendering/lean-core-runtime.d.ts.map +1 -0
  3330. package/dist/rendering/lean-core-runtime.js +10 -0
  3331. package/dist/rendering/lean-core-runtime.js.map +1 -0
  3332. package/dist/rendering/materials/PhysicalFeatures.d.ts +71 -0
  3333. package/dist/rendering/materials/PhysicalFeatures.d.ts.map +1 -0
  3334. package/dist/rendering/materials/PhysicalFeatures.js +255 -0
  3335. package/dist/rendering/materials/PhysicalFeatures.js.map +1 -0
  3336. package/dist/rendering/materials/PhysicalMaterial.d.ts +85 -0
  3337. package/dist/rendering/materials/PhysicalMaterial.d.ts.map +1 -1
  3338. package/dist/rendering/materials/PhysicalMaterial.js +21 -0
  3339. package/dist/rendering/materials/PhysicalMaterial.js.map +1 -1
  3340. package/dist/rendering/materials/features.d.ts +47 -0
  3341. package/dist/rendering/materials/features.d.ts.map +1 -0
  3342. package/dist/rendering/materials/features.js +282 -0
  3343. package/dist/rendering/materials/features.js.map +1 -0
  3344. package/dist/rendering/materials/lobes.d.ts +3 -0
  3345. package/dist/rendering/materials/lobes.d.ts.map +1 -0
  3346. package/dist/rendering/materials/lobes.js +225 -0
  3347. package/dist/rendering/materials/lobes.js.map +1 -0
  3348. package/dist/rendering/output/HdrTarget.d.ts +27 -0
  3349. package/dist/rendering/output/HdrTarget.d.ts.map +1 -0
  3350. package/dist/rendering/output/HdrTarget.js +48 -0
  3351. package/dist/rendering/output/HdrTarget.js.map +1 -0
  3352. package/dist/rendering/output/OutputPass.d.ts +28 -0
  3353. package/dist/rendering/output/OutputPass.d.ts.map +1 -0
  3354. package/dist/rendering/output/OutputPass.js +142 -0
  3355. package/dist/rendering/output/OutputPass.js.map +1 -0
  3356. package/dist/rendering/output/ToneMappingOperators.glsl.d.ts +22 -0
  3357. package/dist/rendering/output/ToneMappingOperators.glsl.d.ts.map +1 -0
  3358. package/dist/rendering/output/ToneMappingOperators.glsl.js +217 -0
  3359. package/dist/rendering/output/ToneMappingOperators.glsl.js.map +1 -0
  3360. package/dist/rendering/passes/ContactShadowPass.d.ts +57 -0
  3361. package/dist/rendering/passes/ContactShadowPass.d.ts.map +1 -0
  3362. package/dist/rendering/passes/ContactShadowPass.js +151 -0
  3363. package/dist/rendering/passes/ContactShadowPass.js.map +1 -0
  3364. package/dist/rendering/passes/Prd02ContactShadowsContributor.d.ts +16 -0
  3365. package/dist/rendering/passes/Prd02ContactShadowsContributor.d.ts.map +1 -0
  3366. package/dist/rendering/passes/Prd02ContactShadowsContributor.js +133 -0
  3367. package/dist/rendering/passes/Prd02ContactShadowsContributor.js.map +1 -0
  3368. package/dist/rendering/passes/Prd02SubFlags.d.ts +22 -0
  3369. package/dist/rendering/passes/Prd02SubFlags.d.ts.map +1 -0
  3370. package/dist/rendering/passes/Prd02SubFlags.js +32 -0
  3371. package/dist/rendering/passes/Prd02SubFlags.js.map +1 -0
  3372. package/dist/rendering/performance/BVH.d.ts +46 -0
  3373. package/dist/rendering/performance/BVH.d.ts.map +1 -1
  3374. package/dist/rendering/performance/BVH.js +212 -0
  3375. package/dist/rendering/performance/BVH.js.map +1 -1
  3376. package/dist/rendering/performance/Batcher.d.ts +11 -0
  3377. package/dist/rendering/performance/Batcher.d.ts.map +1 -1
  3378. package/dist/rendering/performance/Batcher.js +10 -0
  3379. package/dist/rendering/performance/Batcher.js.map +1 -1
  3380. package/dist/rendering/performance/FrustumCuller.d.ts +29 -0
  3381. package/dist/rendering/performance/FrustumCuller.d.ts.map +1 -1
  3382. package/dist/rendering/performance/FrustumCuller.js +78 -1
  3383. package/dist/rendering/performance/FrustumCuller.js.map +1 -1
  3384. package/dist/rendering/performance/LOD.d.ts +6 -0
  3385. package/dist/rendering/performance/LOD.d.ts.map +1 -1
  3386. package/dist/rendering/performance/LOD.js +12 -0
  3387. package/dist/rendering/performance/LOD.js.map +1 -1
  3388. package/dist/rendering/performance/RenderItemSorting.d.ts +2 -0
  3389. package/dist/rendering/performance/RenderItemSorting.d.ts.map +1 -1
  3390. package/dist/rendering/performance/RenderItemSorting.js +5 -1
  3391. package/dist/rendering/performance/RenderItemSorting.js.map +1 -1
  3392. package/dist/rendering/post/CubeLut.d.ts +15 -0
  3393. package/dist/rendering/post/CubeLut.d.ts.map +1 -0
  3394. package/dist/rendering/post/CubeLut.js +86 -0
  3395. package/dist/rendering/post/CubeLut.js.map +1 -0
  3396. package/dist/rendering/post/DisplayLutCache.d.ts +31 -0
  3397. package/dist/rendering/post/DisplayLutCache.d.ts.map +1 -0
  3398. package/dist/rendering/post/DisplayLutCache.js +44 -0
  3399. package/dist/rendering/post/DisplayLutCache.js.map +1 -0
  3400. package/dist/rendering/post/PostAntiAlias.d.ts +49 -0
  3401. package/dist/rendering/post/PostAntiAlias.d.ts.map +1 -0
  3402. package/dist/rendering/post/PostAntiAlias.js +75 -0
  3403. package/dist/rendering/post/PostAntiAlias.js.map +1 -0
  3404. package/dist/rendering/post/PostGraph.d.ts +206 -0
  3405. package/dist/rendering/post/PostGraph.d.ts.map +1 -0
  3406. package/dist/rendering/post/PostGraph.js +234 -0
  3407. package/dist/rendering/post/PostGraph.js.map +1 -0
  3408. package/dist/rendering/post/PostQualityTiers.d.ts +95 -0
  3409. package/dist/rendering/post/PostQualityTiers.d.ts.map +1 -0
  3410. package/dist/rendering/post/PostQualityTiers.js +62 -0
  3411. package/dist/rendering/post/PostQualityTiers.js.map +1 -0
  3412. package/dist/rendering/post/PostResources.d.ts +49 -0
  3413. package/dist/rendering/post/PostResources.d.ts.map +1 -0
  3414. package/dist/rendering/post/PostResources.js +119 -0
  3415. package/dist/rendering/post/PostResources.js.map +1 -0
  3416. package/dist/rendering/post/PostTimer.d.ts +37 -0
  3417. package/dist/rendering/post/PostTimer.d.ts.map +1 -0
  3418. package/dist/rendering/post/PostTimer.js +88 -0
  3419. package/dist/rendering/post/PostTimer.js.map +1 -0
  3420. package/dist/rendering/post/ScreenFeelPass.d.ts +83 -0
  3421. package/dist/rendering/post/ScreenFeelPass.d.ts.map +1 -0
  3422. package/dist/rendering/post/ScreenFeelPass.js +197 -0
  3423. package/dist/rendering/post/ScreenFeelPass.js.map +1 -0
  3424. package/dist/rendering/post/ToneOperators.d.ts +42 -0
  3425. package/dist/rendering/post/ToneOperators.d.ts.map +1 -0
  3426. package/dist/rendering/post/ToneOperators.js +179 -0
  3427. package/dist/rendering/post/ToneOperators.js.map +1 -0
  3428. package/dist/rendering/post/chunks/indirectFraction.glsl.d.ts +50 -0
  3429. package/dist/rendering/post/chunks/indirectFraction.glsl.d.ts.map +1 -0
  3430. package/dist/rendering/post/chunks/indirectFraction.glsl.js +82 -0
  3431. package/dist/rendering/post/chunks/indirectFraction.glsl.js.map +1 -0
  3432. package/dist/rendering/post/chunks/velocity.glsl.d.ts +35 -0
  3433. package/dist/rendering/post/chunks/velocity.glsl.d.ts.map +1 -0
  3434. package/dist/rendering/post/chunks/velocity.glsl.js +86 -0
  3435. package/dist/rendering/post/chunks/velocity.glsl.js.map +1 -0
  3436. package/dist/rendering/post/shaders/bloom.glsl.d.ts +21 -0
  3437. package/dist/rendering/post/shaders/bloom.glsl.d.ts.map +1 -0
  3438. package/dist/rendering/post/shaders/bloom.glsl.js +120 -0
  3439. package/dist/rendering/post/shaders/bloom.glsl.js.map +1 -0
  3440. package/dist/rendering/post/shaders/bloom.wgsl.d.ts +10 -0
  3441. package/dist/rendering/post/shaders/bloom.wgsl.d.ts.map +1 -0
  3442. package/dist/rendering/post/shaders/bloom.wgsl.js +121 -0
  3443. package/dist/rendering/post/shaders/bloom.wgsl.js.map +1 -0
  3444. package/dist/rendering/post/shaders/common.glsl.d.ts +11 -0
  3445. package/dist/rendering/post/shaders/common.glsl.d.ts.map +1 -0
  3446. package/dist/rendering/post/shaders/common.glsl.js +34 -0
  3447. package/dist/rendering/post/shaders/common.glsl.js.map +1 -0
  3448. package/dist/rendering/post/shaders/common.wgsl.d.ts +25 -0
  3449. package/dist/rendering/post/shaders/common.wgsl.d.ts.map +1 -0
  3450. package/dist/rendering/post/shaders/common.wgsl.js +48 -0
  3451. package/dist/rendering/post/shaders/common.wgsl.js.map +1 -0
  3452. package/dist/rendering/post/shaders/composite.glsl.d.ts +25 -0
  3453. package/dist/rendering/post/shaders/composite.glsl.d.ts.map +1 -0
  3454. package/dist/rendering/post/shaders/composite.glsl.js +96 -0
  3455. package/dist/rendering/post/shaders/composite.glsl.js.map +1 -0
  3456. package/dist/rendering/post/shaders/composite.wgsl.d.ts +10 -0
  3457. package/dist/rendering/post/shaders/composite.wgsl.d.ts.map +1 -0
  3458. package/dist/rendering/post/shaders/composite.wgsl.js +92 -0
  3459. package/dist/rendering/post/shaders/composite.wgsl.js.map +1 -0
  3460. package/dist/rendering/post/shaders/depthDownsample.glsl.d.ts +20 -0
  3461. package/dist/rendering/post/shaders/depthDownsample.glsl.d.ts.map +1 -0
  3462. package/dist/rendering/post/shaders/depthDownsample.glsl.js +78 -0
  3463. package/dist/rendering/post/shaders/depthDownsample.glsl.js.map +1 -0
  3464. package/dist/rendering/post/shaders/depthDownsample.wgsl.d.ts +17 -0
  3465. package/dist/rendering/post/shaders/depthDownsample.wgsl.d.ts.map +1 -0
  3466. package/dist/rendering/post/shaders/depthDownsample.wgsl.js +87 -0
  3467. package/dist/rendering/post/shaders/depthDownsample.wgsl.js.map +1 -0
  3468. package/dist/rendering/post/shaders/displayGrade.glsl.d.ts +18 -0
  3469. package/dist/rendering/post/shaders/displayGrade.glsl.d.ts.map +1 -0
  3470. package/dist/rendering/post/shaders/displayGrade.glsl.js +80 -0
  3471. package/dist/rendering/post/shaders/displayGrade.glsl.js.map +1 -0
  3472. package/dist/rendering/post/shaders/displayGrade.wgsl.d.ts +9 -0
  3473. package/dist/rendering/post/shaders/displayGrade.wgsl.d.ts.map +1 -0
  3474. package/dist/rendering/post/shaders/displayGrade.wgsl.js +75 -0
  3475. package/dist/rendering/post/shaders/displayGrade.wgsl.js.map +1 -0
  3476. package/dist/rendering/post/shaders/dof.glsl.d.ts +25 -0
  3477. package/dist/rendering/post/shaders/dof.glsl.d.ts.map +1 -0
  3478. package/dist/rendering/post/shaders/dof.glsl.js +129 -0
  3479. package/dist/rendering/post/shaders/dof.glsl.js.map +1 -0
  3480. package/dist/rendering/post/shaders/dof.wgsl.d.ts +11 -0
  3481. package/dist/rendering/post/shaders/dof.wgsl.d.ts.map +1 -0
  3482. package/dist/rendering/post/shaders/dof.wgsl.js +119 -0
  3483. package/dist/rendering/post/shaders/dof.wgsl.js.map +1 -0
  3484. package/dist/rendering/post/shaders/exposure.glsl.d.ts +43 -0
  3485. package/dist/rendering/post/shaders/exposure.glsl.d.ts.map +1 -0
  3486. package/dist/rendering/post/shaders/exposure.glsl.js +115 -0
  3487. package/dist/rendering/post/shaders/exposure.glsl.js.map +1 -0
  3488. package/dist/rendering/post/shaders/exposure.wgsl.d.ts +16 -0
  3489. package/dist/rendering/post/shaders/exposure.wgsl.d.ts.map +1 -0
  3490. package/dist/rendering/post/shaders/exposure.wgsl.js +97 -0
  3491. package/dist/rendering/post/shaders/exposure.wgsl.js.map +1 -0
  3492. package/dist/rendering/post/shaders/finalize.glsl.d.ts +17 -0
  3493. package/dist/rendering/post/shaders/finalize.glsl.d.ts.map +1 -0
  3494. package/dist/rendering/post/shaders/finalize.glsl.js +120 -0
  3495. package/dist/rendering/post/shaders/finalize.glsl.js.map +1 -0
  3496. package/dist/rendering/post/shaders/finalize.wgsl.d.ts +13 -0
  3497. package/dist/rendering/post/shaders/finalize.wgsl.d.ts.map +1 -0
  3498. package/dist/rendering/post/shaders/finalize.wgsl.js +124 -0
  3499. package/dist/rendering/post/shaders/finalize.wgsl.js.map +1 -0
  3500. package/dist/rendering/post/shaders/fxaa.glsl.d.ts +26 -0
  3501. package/dist/rendering/post/shaders/fxaa.glsl.d.ts.map +1 -0
  3502. package/dist/rendering/post/shaders/fxaa.glsl.js +246 -0
  3503. package/dist/rendering/post/shaders/fxaa.glsl.js.map +1 -0
  3504. package/dist/rendering/post/shaders/fxaa.wgsl.d.ts +17 -0
  3505. package/dist/rendering/post/shaders/fxaa.wgsl.d.ts.map +1 -0
  3506. package/dist/rendering/post/shaders/fxaa.wgsl.js +268 -0
  3507. package/dist/rendering/post/shaders/fxaa.wgsl.js.map +1 -0
  3508. package/dist/rendering/post/shaders/godrays.glsl.d.ts +16 -0
  3509. package/dist/rendering/post/shaders/godrays.glsl.d.ts.map +1 -0
  3510. package/dist/rendering/post/shaders/godrays.glsl.js +70 -0
  3511. package/dist/rendering/post/shaders/godrays.glsl.js.map +1 -0
  3512. package/dist/rendering/post/shaders/godrays.wgsl.d.ts +8 -0
  3513. package/dist/rendering/post/shaders/godrays.wgsl.d.ts.map +1 -0
  3514. package/dist/rendering/post/shaders/godrays.wgsl.js +60 -0
  3515. package/dist/rendering/post/shaders/godrays.wgsl.js.map +1 -0
  3516. package/dist/rendering/post/shaders/gtao.glsl.d.ts +29 -0
  3517. package/dist/rendering/post/shaders/gtao.glsl.d.ts.map +1 -0
  3518. package/dist/rendering/post/shaders/gtao.glsl.js +190 -0
  3519. package/dist/rendering/post/shaders/gtao.glsl.js.map +1 -0
  3520. package/dist/rendering/post/shaders/gtao.wgsl.d.ts +13 -0
  3521. package/dist/rendering/post/shaders/gtao.wgsl.d.ts.map +1 -0
  3522. package/dist/rendering/post/shaders/gtao.wgsl.js +163 -0
  3523. package/dist/rendering/post/shaders/gtao.wgsl.js.map +1 -0
  3524. package/dist/rendering/post/shaders/gtaoDenoise.glsl.d.ts +22 -0
  3525. package/dist/rendering/post/shaders/gtaoDenoise.glsl.d.ts.map +1 -0
  3526. package/dist/rendering/post/shaders/gtaoDenoise.glsl.js +121 -0
  3527. package/dist/rendering/post/shaders/gtaoDenoise.glsl.js.map +1 -0
  3528. package/dist/rendering/post/shaders/gtaoDenoise.wgsl.d.ts +11 -0
  3529. package/dist/rendering/post/shaders/gtaoDenoise.wgsl.d.ts.map +1 -0
  3530. package/dist/rendering/post/shaders/gtaoDenoise.wgsl.js +117 -0
  3531. package/dist/rendering/post/shaders/gtaoDenoise.wgsl.js.map +1 -0
  3532. package/dist/rendering/post/shaders/motionBlur.glsl.d.ts +21 -0
  3533. package/dist/rendering/post/shaders/motionBlur.glsl.d.ts.map +1 -0
  3534. package/dist/rendering/post/shaders/motionBlur.glsl.js +110 -0
  3535. package/dist/rendering/post/shaders/motionBlur.glsl.js.map +1 -0
  3536. package/dist/rendering/post/shaders/motionBlur.wgsl.d.ts +10 -0
  3537. package/dist/rendering/post/shaders/motionBlur.wgsl.d.ts.map +1 -0
  3538. package/dist/rendering/post/shaders/motionBlur.wgsl.js +102 -0
  3539. package/dist/rendering/post/shaders/motionBlur.wgsl.js.map +1 -0
  3540. package/dist/rendering/post/shaders/smaa.glsl.d.ts +28 -0
  3541. package/dist/rendering/post/shaders/smaa.glsl.d.ts.map +1 -0
  3542. package/dist/rendering/post/shaders/smaa.glsl.js +354 -0
  3543. package/dist/rendering/post/shaders/smaa.glsl.js.map +1 -0
  3544. package/dist/rendering/post/shaders/smaa.wgsl.d.ts +20 -0
  3545. package/dist/rendering/post/shaders/smaa.wgsl.d.ts.map +1 -0
  3546. package/dist/rendering/post/shaders/smaa.wgsl.js +375 -0
  3547. package/dist/rendering/post/shaders/smaa.wgsl.js.map +1 -0
  3548. package/dist/rendering/post/shaders/taa.glsl.d.ts +23 -0
  3549. package/dist/rendering/post/shaders/taa.glsl.d.ts.map +1 -0
  3550. package/dist/rendering/post/shaders/taa.glsl.js +169 -0
  3551. package/dist/rendering/post/shaders/taa.glsl.js.map +1 -0
  3552. package/dist/rendering/post/shaders/taa.wgsl.d.ts +10 -0
  3553. package/dist/rendering/post/shaders/taa.wgsl.d.ts.map +1 -0
  3554. package/dist/rendering/post/shaders/taa.wgsl.js +185 -0
  3555. package/dist/rendering/post/shaders/taa.wgsl.js.map +1 -0
  3556. package/dist/rendering/post/shaders/velocityDilate.glsl.d.ts +16 -0
  3557. package/dist/rendering/post/shaders/velocityDilate.glsl.d.ts.map +1 -0
  3558. package/dist/rendering/post/shaders/velocityDilate.glsl.js +45 -0
  3559. package/dist/rendering/post/shaders/velocityDilate.glsl.js.map +1 -0
  3560. package/dist/rendering/post/shaders/velocityDilate.wgsl.d.ts +8 -0
  3561. package/dist/rendering/post/shaders/velocityDilate.wgsl.d.ts.map +1 -0
  3562. package/dist/rendering/post/shaders/velocityDilate.wgsl.js +30 -0
  3563. package/dist/rendering/post/shaders/velocityDilate.wgsl.js.map +1 -0
  3564. package/dist/rendering/post/smaa/textures.d.ts +17 -0
  3565. package/dist/rendering/post/smaa/textures.d.ts.map +1 -0
  3566. package/dist/rendering/post/smaa/textures.js +17 -0
  3567. package/dist/rendering/post/smaa/textures.js.map +1 -0
  3568. package/dist/rendering/post/v2Entry.d.ts +25 -0
  3569. package/dist/rendering/post/v2Entry.d.ts.map +1 -0
  3570. package/dist/rendering/post/v2Entry.js +28 -0
  3571. package/dist/rendering/post/v2Entry.js.map +1 -0
  3572. package/dist/rendering/post/v2Stages.d.ts +156 -0
  3573. package/dist/rendering/post/v2Stages.d.ts.map +1 -0
  3574. package/dist/rendering/post/v2Stages.js +1189 -0
  3575. package/dist/rendering/post/v2Stages.js.map +1 -0
  3576. package/dist/rendering/postprocess/EffectComposer.d.ts +6 -109
  3577. package/dist/rendering/postprocess/EffectComposer.d.ts.map +1 -1
  3578. package/dist/rendering/postprocess/EffectComposer.js +6 -246
  3579. package/dist/rendering/postprocess/EffectComposer.js.map +1 -1
  3580. package/dist/rendering/postprocess/NativeBloomPyramid.d.ts +51 -1
  3581. package/dist/rendering/postprocess/NativeBloomPyramid.d.ts.map +1 -1
  3582. package/dist/rendering/postprocess/NativeBloomPyramid.js +88 -1
  3583. package/dist/rendering/postprocess/NativeBloomPyramid.js.map +1 -1
  3584. package/dist/rendering/postprocess/SSAOPass.d.ts +5 -5
  3585. package/dist/rendering/postprocess/SSAOPass.d.ts.map +1 -1
  3586. package/dist/rendering/postprocess/SSAOPass.js +5 -17
  3587. package/dist/rendering/postprocess/SSAOPass.js.map +1 -1
  3588. package/dist/rendering/probes/IrradianceVolume.d.ts +45 -0
  3589. package/dist/rendering/probes/IrradianceVolume.d.ts.map +1 -0
  3590. package/dist/rendering/probes/IrradianceVolume.js +230 -0
  3591. package/dist/rendering/probes/IrradianceVolume.js.map +1 -0
  3592. package/dist/rendering/probes/LtcLuts.d.ts +30 -0
  3593. package/dist/rendering/probes/LtcLuts.d.ts.map +1 -0
  3594. package/dist/rendering/probes/LtcLuts.js +120 -0
  3595. package/dist/rendering/probes/LtcLuts.js.map +1 -0
  3596. package/dist/rendering/probes/Prd02ProbesContributor.d.ts +53 -0
  3597. package/dist/rendering/probes/Prd02ProbesContributor.d.ts.map +1 -0
  3598. package/dist/rendering/probes/Prd02ProbesContributor.js +241 -0
  3599. package/dist/rendering/probes/Prd02ProbesContributor.js.map +1 -0
  3600. package/dist/rendering/probes/ProbeBoxProjection.d.ts +53 -0
  3601. package/dist/rendering/probes/ProbeBoxProjection.d.ts.map +1 -0
  3602. package/dist/rendering/probes/ProbeBoxProjection.js +99 -0
  3603. package/dist/rendering/probes/ProbeBoxProjection.js.map +1 -0
  3604. package/dist/rendering/probes/ReflectionProbeSystem.d.ts +64 -0
  3605. package/dist/rendering/probes/ReflectionProbeSystem.d.ts.map +1 -0
  3606. package/dist/rendering/probes/ReflectionProbeSystem.js +157 -0
  3607. package/dist/rendering/probes/ReflectionProbeSystem.js.map +1 -0
  3608. package/dist/rendering/production-runtime/PBRHDRPipeline.d.ts.map +1 -1
  3609. package/dist/rendering/production-runtime/PBRHDRPipeline.js +23 -9
  3610. package/dist/rendering/production-runtime/PBRHDRPipeline.js.map +1 -1
  3611. package/dist/rendering/production-runtime/ProductionRendererTypes.d.ts +17 -6
  3612. package/dist/rendering/production-runtime/ProductionRendererTypes.d.ts.map +1 -1
  3613. package/dist/rendering/production-runtime/ProductionRendererTypes.js.map +1 -1
  3614. package/dist/rendering/production-runtime/ProductionRuntimeRenderer.d.ts +3 -0
  3615. package/dist/rendering/production-runtime/ProductionRuntimeRenderer.d.ts.map +1 -1
  3616. package/dist/rendering/production-runtime/ProductionRuntimeRenderer.js +8 -1
  3617. package/dist/rendering/production-runtime/ProductionRuntimeRenderer.js.map +1 -1
  3618. package/dist/rendering/production-runtime/ProductionWebGL2Renderer.d.ts +4 -0
  3619. package/dist/rendering/production-runtime/ProductionWebGL2Renderer.d.ts.map +1 -1
  3620. package/dist/rendering/production-runtime/ProductionWebGL2Renderer.js +15 -0
  3621. package/dist/rendering/production-runtime/ProductionWebGL2Renderer.js.map +1 -1
  3622. package/dist/rendering/production-runtime/ProductionWebGPURenderer.d.ts +11 -5
  3623. package/dist/rendering/production-runtime/ProductionWebGPURenderer.d.ts.map +1 -1
  3624. package/dist/rendering/production-runtime/ProductionWebGPURenderer.js +38 -47
  3625. package/dist/rendering/production-runtime/ProductionWebGPURenderer.js.map +1 -1
  3626. package/dist/rendering/production-runtime/backendSelection.d.ts +26 -0
  3627. package/dist/rendering/production-runtime/backendSelection.d.ts.map +1 -0
  3628. package/dist/rendering/production-runtime/backendSelection.js +46 -0
  3629. package/dist/rendering/production-runtime/backendSelection.js.map +1 -0
  3630. package/dist/rendering/production-runtime/backends/WebGL2RendererBackend.d.ts +1 -1
  3631. package/dist/rendering/production-runtime/backends/WebGL2RendererBackend.d.ts.map +1 -1
  3632. package/dist/rendering/production-runtime/backends/WebGL2RendererBackend.js +8 -4
  3633. package/dist/rendering/production-runtime/backends/WebGL2RendererBackend.js.map +1 -1
  3634. package/dist/rendering/production-runtime/backends/WebGPURendererBackend.d.ts +2 -19
  3635. package/dist/rendering/production-runtime/backends/WebGPURendererBackend.d.ts.map +1 -1
  3636. package/dist/rendering/production-runtime/backends/WebGPURendererBackend.js +2 -18
  3637. package/dist/rendering/production-runtime/backends/WebGPURendererBackend.js.map +1 -1
  3638. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Buffer.d.ts +2 -10
  3639. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Buffer.d.ts.map +1 -1
  3640. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Buffer.js +2 -7
  3641. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Buffer.js.map +1 -1
  3642. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Capabilities.d.ts +2 -10
  3643. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Capabilities.d.ts.map +1 -1
  3644. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Capabilities.js +2 -7
  3645. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Capabilities.js.map +1 -1
  3646. package/dist/rendering/production-runtime/backends/webgl2/WebGL2RenderTarget.d.ts +2 -10
  3647. package/dist/rendering/production-runtime/backends/webgl2/WebGL2RenderTarget.d.ts.map +1 -1
  3648. package/dist/rendering/production-runtime/backends/webgl2/WebGL2RenderTarget.js +2 -7
  3649. package/dist/rendering/production-runtime/backends/webgl2/WebGL2RenderTarget.js.map +1 -1
  3650. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Shader.d.ts +2 -10
  3651. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Shader.d.ts.map +1 -1
  3652. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Shader.js +2 -7
  3653. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Shader.js.map +1 -1
  3654. package/dist/rendering/production-runtime/backends/webgl2/WebGL2StateCache.d.ts +1 -0
  3655. package/dist/rendering/production-runtime/backends/webgl2/WebGL2StateCache.d.ts.map +1 -1
  3656. package/dist/rendering/production-runtime/backends/webgl2/WebGL2StateCache.js +1 -0
  3657. package/dist/rendering/production-runtime/backends/webgl2/WebGL2StateCache.js.map +1 -1
  3658. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Texture.d.ts +2 -10
  3659. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Texture.d.ts.map +1 -1
  3660. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Texture.js +2 -7
  3661. package/dist/rendering/production-runtime/backends/webgl2/WebGL2Texture.js.map +1 -1
  3662. package/dist/rendering/production-runtime/backends/webgpu/WebGPUBuffer.d.ts +2 -10
  3663. package/dist/rendering/production-runtime/backends/webgpu/WebGPUBuffer.d.ts.map +1 -1
  3664. package/dist/rendering/production-runtime/backends/webgpu/WebGPUBuffer.js +2 -7
  3665. package/dist/rendering/production-runtime/backends/webgpu/WebGPUBuffer.js.map +1 -1
  3666. package/dist/rendering/production-runtime/backends/webgpu/WebGPUCapabilities.d.ts +2 -10
  3667. package/dist/rendering/production-runtime/backends/webgpu/WebGPUCapabilities.d.ts.map +1 -1
  3668. package/dist/rendering/production-runtime/backends/webgpu/WebGPUCapabilities.js +2 -7
  3669. package/dist/rendering/production-runtime/backends/webgpu/WebGPUCapabilities.js.map +1 -1
  3670. package/dist/rendering/production-runtime/backends/webgpu/WebGPURenderTarget.d.ts +2 -10
  3671. package/dist/rendering/production-runtime/backends/webgpu/WebGPURenderTarget.d.ts.map +1 -1
  3672. package/dist/rendering/production-runtime/backends/webgpu/WebGPURenderTarget.js +2 -7
  3673. package/dist/rendering/production-runtime/backends/webgpu/WebGPURenderTarget.js.map +1 -1
  3674. package/dist/rendering/production-runtime/backends/webgpu/WebGPUShader.d.ts +2 -10
  3675. package/dist/rendering/production-runtime/backends/webgpu/WebGPUShader.d.ts.map +1 -1
  3676. package/dist/rendering/production-runtime/backends/webgpu/WebGPUShader.js +2 -7
  3677. package/dist/rendering/production-runtime/backends/webgpu/WebGPUShader.js.map +1 -1
  3678. package/dist/rendering/production-runtime/backends/webgpu/WebGPUTexture.d.ts +2 -10
  3679. package/dist/rendering/production-runtime/backends/webgpu/WebGPUTexture.d.ts.map +1 -1
  3680. package/dist/rendering/production-runtime/backends/webgpu/WebGPUTexture.js +2 -7
  3681. package/dist/rendering/production-runtime/backends/webgpu/WebGPUTexture.js.map +1 -1
  3682. package/dist/rendering/production-runtime/framegraph/FrameGraph.d.ts +4 -2
  3683. package/dist/rendering/production-runtime/framegraph/FrameGraph.d.ts.map +1 -1
  3684. package/dist/rendering/production-runtime/framegraph/FrameGraph.js +62 -4
  3685. package/dist/rendering/production-runtime/framegraph/FrameGraph.js.map +1 -1
  3686. package/dist/rendering/production-runtime/framegraph/NativeFrameGraphBindings.d.ts +32 -0
  3687. package/dist/rendering/production-runtime/framegraph/NativeFrameGraphBindings.d.ts.map +1 -0
  3688. package/dist/rendering/production-runtime/framegraph/NativeFrameGraphBindings.js +111 -0
  3689. package/dist/rendering/production-runtime/framegraph/NativeFrameGraphBindings.js.map +1 -0
  3690. package/dist/rendering/production-runtime/framegraph/RenderPass.d.ts +23 -0
  3691. package/dist/rendering/production-runtime/framegraph/RenderPass.d.ts.map +1 -1
  3692. package/dist/rendering/production-runtime/framegraph/RenderPass.js +87 -1
  3693. package/dist/rendering/production-runtime/framegraph/RenderPass.js.map +1 -1
  3694. package/dist/rendering/production-runtime/index.d.ts +8 -6
  3695. package/dist/rendering/production-runtime/index.d.ts.map +1 -1
  3696. package/dist/rendering/production-runtime/index.js +10 -3
  3697. package/dist/rendering/production-runtime/index.js.map +1 -1
  3698. package/dist/rendering/production-runtime/materials/GLTFMaterialAdapter.d.ts +12 -13
  3699. package/dist/rendering/production-runtime/materials/GLTFMaterialAdapter.d.ts.map +1 -1
  3700. package/dist/rendering/production-runtime/materials/GLTFMaterialAdapter.js +10 -4
  3701. package/dist/rendering/production-runtime/materials/GLTFMaterialAdapter.js.map +1 -1
  3702. package/dist/rendering/production-runtime/materials/GLTFPBRMaterialAdapter.d.ts +9 -2
  3703. package/dist/rendering/production-runtime/materials/GLTFPBRMaterialAdapter.d.ts.map +1 -1
  3704. package/dist/rendering/production-runtime/materials/GLTFPBRMaterialAdapter.js +7 -1
  3705. package/dist/rendering/production-runtime/materials/GLTFPBRMaterialAdapter.js.map +1 -1
  3706. package/dist/rendering/production-runtime/materials/MaterialCompiler.d.ts +10 -8
  3707. package/dist/rendering/production-runtime/materials/MaterialCompiler.d.ts.map +1 -1
  3708. package/dist/rendering/production-runtime/materials/MaterialCompiler.js +9 -4
  3709. package/dist/rendering/production-runtime/materials/MaterialCompiler.js.map +1 -1
  3710. package/dist/rendering/production-runtime/materials/PBRShaderFeatures.d.ts.map +1 -1
  3711. package/dist/rendering/production-runtime/materials/PBRShaderFeatures.js +30 -1
  3712. package/dist/rendering/production-runtime/materials/PBRShaderFeatures.js.map +1 -1
  3713. package/dist/rendering/production-runtime/passes/DepthPrepass.d.ts +4 -12
  3714. package/dist/rendering/production-runtime/passes/DepthPrepass.d.ts.map +1 -1
  3715. package/dist/rendering/production-runtime/passes/DepthPrepass.js +3 -11
  3716. package/dist/rendering/production-runtime/passes/DepthPrepass.js.map +1 -1
  3717. package/dist/rendering/production-runtime/passes/FramegraphTopology.js +1 -1
  3718. package/dist/rendering/production-runtime/passes/FramegraphTopology.js.map +1 -1
  3719. package/dist/rendering/production-runtime/passes/OpaquePass.d.ts +3 -8
  3720. package/dist/rendering/production-runtime/passes/OpaquePass.d.ts.map +1 -1
  3721. package/dist/rendering/production-runtime/passes/OpaquePass.js +3 -1
  3722. package/dist/rendering/production-runtime/passes/OpaquePass.js.map +1 -1
  3723. package/dist/rendering/production-runtime/passes/ShadowPass.d.ts +3 -8
  3724. package/dist/rendering/production-runtime/passes/ShadowPass.d.ts.map +1 -1
  3725. package/dist/rendering/production-runtime/passes/ShadowPass.js +2 -0
  3726. package/dist/rendering/production-runtime/passes/ShadowPass.js.map +1 -1
  3727. package/dist/rendering/production-runtime/passes/SkyboxPass.d.ts +3 -7
  3728. package/dist/rendering/production-runtime/passes/SkyboxPass.d.ts.map +1 -1
  3729. package/dist/rendering/production-runtime/passes/SkyboxPass.js +2 -0
  3730. package/dist/rendering/production-runtime/passes/SkyboxPass.js.map +1 -1
  3731. package/dist/rendering/production-runtime/passes/ToneMappingPass.d.ts +7 -10
  3732. package/dist/rendering/production-runtime/passes/ToneMappingPass.d.ts.map +1 -1
  3733. package/dist/rendering/production-runtime/passes/ToneMappingPass.js +9 -0
  3734. package/dist/rendering/production-runtime/passes/ToneMappingPass.js.map +1 -1
  3735. package/dist/rendering/production-runtime/passes/TransparentPass.d.ts +4 -9
  3736. package/dist/rendering/production-runtime/passes/TransparentPass.d.ts.map +1 -1
  3737. package/dist/rendering/production-runtime/passes/TransparentPass.js +6 -1
  3738. package/dist/rendering/production-runtime/passes/TransparentPass.js.map +1 -1
  3739. package/dist/rendering/production-runtime/renderProofs.d.ts +54 -0
  3740. package/dist/rendering/production-runtime/renderProofs.d.ts.map +1 -0
  3741. package/dist/rendering/production-runtime/renderProofs.js +245 -0
  3742. package/dist/rendering/production-runtime/renderProofs.js.map +1 -0
  3743. package/dist/rendering/program/DFGLut.d.ts +23 -0
  3744. package/dist/rendering/program/DFGLut.d.ts.map +1 -0
  3745. package/dist/rendering/program/DFGLut.js +58 -0
  3746. package/dist/rendering/program/DFGLut.js.map +1 -0
  3747. package/dist/rendering/program/DFGLutData.d.ts +35 -0
  3748. package/dist/rendering/program/DFGLutData.d.ts.map +1 -0
  3749. package/dist/rendering/program/DFGLutData.js +52 -0
  3750. package/dist/rendering/program/DFGLutData.js.map +1 -0
  3751. package/dist/rendering/program/FeatureSelect.d.ts +35 -0
  3752. package/dist/rendering/program/FeatureSelect.d.ts.map +1 -0
  3753. package/dist/rendering/program/FeatureSelect.js +88 -0
  3754. package/dist/rendering/program/FeatureSelect.js.map +1 -0
  3755. package/dist/rendering/program/MaterialFeatures.d.ts +66 -0
  3756. package/dist/rendering/program/MaterialFeatures.d.ts.map +1 -0
  3757. package/dist/rendering/program/MaterialFeatures.js +242 -0
  3758. package/dist/rendering/program/MaterialFeatures.js.map +1 -0
  3759. package/dist/rendering/program/ProgramCache.d.ts +83 -0
  3760. package/dist/rendering/program/ProgramCache.d.ts.map +1 -0
  3761. package/dist/rendering/program/ProgramCache.js +194 -0
  3762. package/dist/rendering/program/ProgramCache.js.map +1 -0
  3763. package/dist/rendering/program/ProgramFeatures.d.ts +21 -0
  3764. package/dist/rendering/program/ProgramFeatures.d.ts.map +1 -0
  3765. package/dist/rendering/program/ProgramFeatures.js +95 -0
  3766. package/dist/rendering/program/ProgramFeatures.js.map +1 -0
  3767. package/dist/rendering/program/ProgramGenerator.d.ts +60 -0
  3768. package/dist/rendering/program/ProgramGenerator.d.ts.map +1 -0
  3769. package/dist/rendering/program/ProgramGenerator.js +760 -0
  3770. package/dist/rendering/program/ProgramGenerator.js.map +1 -0
  3771. package/dist/rendering/program/ProgramKey.d.ts +10 -0
  3772. package/dist/rendering/program/ProgramKey.d.ts.map +1 -0
  3773. package/dist/rendering/program/ProgramKey.js +13 -0
  3774. package/dist/rendering/program/ProgramKey.js.map +1 -0
  3775. package/dist/rendering/program/ProgramWarmup.d.ts +37 -0
  3776. package/dist/rendering/program/ProgramWarmup.d.ts.map +1 -0
  3777. package/dist/rendering/program/ProgramWarmup.js +68 -0
  3778. package/dist/rendering/program/ProgramWarmup.js.map +1 -0
  3779. package/dist/rendering/program/UniformLayout.d.ts +40 -0
  3780. package/dist/rendering/program/UniformLayout.d.ts.map +1 -0
  3781. package/dist/rendering/program/UniformLayout.js +105 -0
  3782. package/dist/rendering/program/UniformLayout.js.map +1 -0
  3783. package/dist/rendering/program/chunks/alpha.glsl.d.ts +7 -0
  3784. package/dist/rendering/program/chunks/alpha.glsl.d.ts.map +1 -0
  3785. package/dist/rendering/program/chunks/alpha.glsl.js +17 -0
  3786. package/dist/rendering/program/chunks/alpha.glsl.js.map +1 -0
  3787. package/dist/rendering/program/chunks/brdf.glsl.d.ts +12 -0
  3788. package/dist/rendering/program/chunks/brdf.glsl.d.ts.map +1 -0
  3789. package/dist/rendering/program/chunks/brdf.glsl.js +144 -0
  3790. package/dist/rendering/program/chunks/brdf.glsl.js.map +1 -0
  3791. package/dist/rendering/program/chunks/colorspace.glsl.d.ts +8 -0
  3792. package/dist/rendering/program/chunks/colorspace.glsl.d.ts.map +1 -0
  3793. package/dist/rendering/program/chunks/colorspace.glsl.js +16 -0
  3794. package/dist/rendering/program/chunks/colorspace.glsl.js.map +1 -0
  3795. package/dist/rendering/program/chunks/common.glsl.d.ts +7 -0
  3796. package/dist/rendering/program/chunks/common.glsl.d.ts.map +1 -0
  3797. package/dist/rendering/program/chunks/common.glsl.js +25 -0
  3798. package/dist/rendering/program/chunks/common.glsl.js.map +1 -0
  3799. package/dist/rendering/program/chunks/depth.glsl.d.ts +9 -0
  3800. package/dist/rendering/program/chunks/depth.glsl.d.ts.map +1 -0
  3801. package/dist/rendering/program/chunks/depth.glsl.js +18 -0
  3802. package/dist/rendering/program/chunks/depth.glsl.js.map +1 -0
  3803. package/dist/rendering/program/chunks/drawId.wgsl.d.ts +9 -0
  3804. package/dist/rendering/program/chunks/drawId.wgsl.d.ts.map +1 -0
  3805. package/dist/rendering/program/chunks/drawId.wgsl.js +29 -0
  3806. package/dist/rendering/program/chunks/drawId.wgsl.js.map +1 -0
  3807. package/dist/rendering/program/chunks/fog_default.glsl.d.ts +8 -0
  3808. package/dist/rendering/program/chunks/fog_default.glsl.d.ts.map +1 -0
  3809. package/dist/rendering/program/chunks/fog_default.glsl.js +31 -0
  3810. package/dist/rendering/program/chunks/fog_default.glsl.js.map +1 -0
  3811. package/dist/rendering/program/chunks/indirect_default.glsl.d.ts +29 -0
  3812. package/dist/rendering/program/chunks/indirect_default.glsl.d.ts.map +1 -0
  3813. package/dist/rendering/program/chunks/indirect_default.glsl.js +113 -0
  3814. package/dist/rendering/program/chunks/indirect_default.glsl.js.map +1 -0
  3815. package/dist/rendering/program/chunks/instanceEmissive.wgsl.d.ts +10 -0
  3816. package/dist/rendering/program/chunks/instanceEmissive.wgsl.d.ts.map +1 -0
  3817. package/dist/rendering/program/chunks/instanceEmissive.wgsl.js +21 -0
  3818. package/dist/rendering/program/chunks/instanceEmissive.wgsl.js.map +1 -0
  3819. package/dist/rendering/program/chunks/instancing.glsl.d.ts +8 -0
  3820. package/dist/rendering/program/chunks/instancing.glsl.d.ts.map +1 -0
  3821. package/dist/rendering/program/chunks/instancing.glsl.js +25 -0
  3822. package/dist/rendering/program/chunks/instancing.glsl.js.map +1 -0
  3823. package/dist/rendering/program/chunks/lights_legacy.glsl.d.ts +15 -0
  3824. package/dist/rendering/program/chunks/lights_legacy.glsl.d.ts.map +1 -0
  3825. package/dist/rendering/program/chunks/lights_legacy.glsl.js +95 -0
  3826. package/dist/rendering/program/chunks/lights_legacy.glsl.js.map +1 -0
  3827. package/dist/rendering/program/chunks/manifest.d.ts +42 -0
  3828. package/dist/rendering/program/chunks/manifest.d.ts.map +1 -0
  3829. package/dist/rendering/program/chunks/manifest.js +48 -0
  3830. package/dist/rendering/program/chunks/manifest.js.map +1 -0
  3831. package/dist/rendering/program/chunks/normal.glsl.d.ts +8 -0
  3832. package/dist/rendering/program/chunks/normal.glsl.d.ts.map +1 -0
  3833. package/dist/rendering/program/chunks/normal.glsl.js +34 -0
  3834. package/dist/rendering/program/chunks/normal.glsl.js.map +1 -0
  3835. package/dist/rendering/program/chunks/shadow_forward.glsl.d.ts +23 -0
  3836. package/dist/rendering/program/chunks/shadow_forward.glsl.d.ts.map +1 -0
  3837. package/dist/rendering/program/chunks/shadow_forward.glsl.js +73 -0
  3838. package/dist/rendering/program/chunks/shadow_forward.glsl.js.map +1 -0
  3839. package/dist/rendering/quality/DeviceClasses.d.ts +31 -0
  3840. package/dist/rendering/quality/DeviceClasses.d.ts.map +1 -0
  3841. package/dist/rendering/quality/DeviceClasses.js +83 -0
  3842. package/dist/rendering/quality/DeviceClasses.js.map +1 -0
  3843. package/dist/rendering/quality/DeviceProbe.d.ts +42 -0
  3844. package/dist/rendering/quality/DeviceProbe.d.ts.map +1 -0
  3845. package/dist/rendering/quality/DeviceProbe.js +83 -0
  3846. package/dist/rendering/quality/DeviceProbe.js.map +1 -0
  3847. package/dist/rendering/quality/FrameStats.d.ts +62 -0
  3848. package/dist/rendering/quality/FrameStats.d.ts.map +1 -0
  3849. package/dist/rendering/quality/FrameStats.js +220 -0
  3850. package/dist/rendering/quality/FrameStats.js.map +1 -0
  3851. package/dist/rendering/quality/PostprocessGuard.d.ts +49 -0
  3852. package/dist/rendering/quality/PostprocessGuard.d.ts.map +1 -0
  3853. package/dist/rendering/quality/PostprocessGuard.js +92 -0
  3854. package/dist/rendering/quality/PostprocessGuard.js.map +1 -0
  3855. package/dist/rendering/quality/QualityController.d.ts +93 -0
  3856. package/dist/rendering/quality/QualityController.d.ts.map +1 -0
  3857. package/dist/rendering/quality/QualityController.js +248 -0
  3858. package/dist/rendering/quality/QualityController.js.map +1 -0
  3859. package/dist/rendering/quality/QualityGovernor.d.ts +78 -0
  3860. package/dist/rendering/quality/QualityGovernor.d.ts.map +1 -0
  3861. package/dist/rendering/quality/QualityGovernor.js +170 -0
  3862. package/dist/rendering/quality/QualityGovernor.js.map +1 -0
  3863. package/dist/rendering/quality/QualityTier.d.ts +17 -0
  3864. package/dist/rendering/quality/QualityTier.d.ts.map +1 -0
  3865. package/dist/rendering/quality/QualityTier.js +23 -0
  3866. package/dist/rendering/quality/QualityTier.js.map +1 -0
  3867. package/dist/rendering/quality/RenderScaleController.d.ts +35 -0
  3868. package/dist/rendering/quality/RenderScaleController.d.ts.map +1 -0
  3869. package/dist/rendering/quality/RenderScaleController.js +57 -0
  3870. package/dist/rendering/quality/RenderScaleController.js.map +1 -0
  3871. package/dist/rendering/quality/RetentionPolicy.d.ts +11 -0
  3872. package/dist/rendering/quality/RetentionPolicy.d.ts.map +1 -0
  3873. package/dist/rendering/quality/RetentionPolicy.js +12 -0
  3874. package/dist/rendering/quality/RetentionPolicy.js.map +1 -0
  3875. package/dist/rendering/quality/TierResolver.d.ts +52 -0
  3876. package/dist/rendering/quality/TierResolver.d.ts.map +1 -0
  3877. package/dist/rendering/quality/TierResolver.js +155 -0
  3878. package/dist/rendering/quality/TierResolver.js.map +1 -0
  3879. package/dist/rendering/quality/liveTier.d.ts +23 -0
  3880. package/dist/rendering/quality/liveTier.d.ts.map +1 -0
  3881. package/dist/rendering/quality/liveTier.js +16 -0
  3882. package/dist/rendering/quality/liveTier.js.map +1 -0
  3883. package/dist/rendering/reference/BloomPass.d.ts +10 -0
  3884. package/dist/rendering/reference/BloomPass.d.ts.map +1 -0
  3885. package/dist/rendering/reference/BloomPass.js +18 -0
  3886. package/dist/rendering/reference/BloomPass.js.map +1 -0
  3887. package/dist/rendering/reference/DepthHazePass.d.ts +12 -0
  3888. package/dist/rendering/reference/DepthHazePass.d.ts.map +1 -0
  3889. package/dist/rendering/reference/DepthHazePass.js +20 -0
  3890. package/dist/rendering/reference/DepthHazePass.js.map +1 -0
  3891. package/dist/rendering/reference/EffectComposer.d.ts +110 -0
  3892. package/dist/rendering/reference/EffectComposer.d.ts.map +1 -0
  3893. package/dist/rendering/reference/EffectComposer.js +247 -0
  3894. package/dist/rendering/reference/EffectComposer.js.map +1 -0
  3895. package/dist/rendering/reference/FilmGrainPass.d.ts +9 -0
  3896. package/dist/rendering/reference/FilmGrainPass.d.ts.map +1 -0
  3897. package/dist/rendering/reference/FilmGrainPass.js +17 -0
  3898. package/dist/rendering/reference/FilmGrainPass.js.map +1 -0
  3899. package/dist/rendering/reference/PostProcessPass.d.ts +511 -0
  3900. package/dist/rendering/reference/PostProcessPass.d.ts.map +1 -0
  3901. package/dist/rendering/reference/PostProcessPass.js +2020 -0
  3902. package/dist/rendering/reference/PostProcessPass.js.map +1 -0
  3903. package/dist/rendering/reference/SSAOPass.d.ts +6 -0
  3904. package/dist/rendering/reference/SSAOPass.d.ts.map +1 -0
  3905. package/dist/rendering/reference/SSAOPass.js +18 -0
  3906. package/dist/rendering/reference/SSAOPass.js.map +1 -0
  3907. package/dist/rendering/reference/VignettePass.d.ts +10 -0
  3908. package/dist/rendering/reference/VignettePass.d.ts.map +1 -0
  3909. package/dist/rendering/reference/VignettePass.js +17 -0
  3910. package/dist/rendering/reference/VignettePass.js.map +1 -0
  3911. package/dist/rendering/reference/index.d.ts +15 -0
  3912. package/dist/rendering/reference/index.d.ts.map +1 -0
  3913. package/dist/rendering/reference/index.js +15 -0
  3914. package/dist/rendering/reference/index.js.map +1 -0
  3915. package/dist/rendering/reflection-surfaces.d.ts +5 -0
  3916. package/dist/rendering/reflection-surfaces.d.ts.map +1 -0
  3917. package/dist/rendering/reflection-surfaces.js +3 -0
  3918. package/dist/rendering/reflection-surfaces.js.map +1 -0
  3919. package/dist/rendering/renderer/Background.d.ts +49 -0
  3920. package/dist/rendering/renderer/Background.d.ts.map +1 -0
  3921. package/dist/rendering/renderer/Background.js +259 -0
  3922. package/dist/rendering/renderer/Background.js.map +1 -0
  3923. package/dist/rendering/renderer/CullingBatching.d.ts +55 -0
  3924. package/dist/rendering/renderer/CullingBatching.d.ts.map +1 -0
  3925. package/dist/rendering/renderer/CullingBatching.js +362 -0
  3926. package/dist/rendering/renderer/CullingBatching.js.map +1 -0
  3927. package/dist/rendering/renderer/DeviceLifecycle.d.ts +29 -0
  3928. package/dist/rendering/renderer/DeviceLifecycle.d.ts.map +1 -0
  3929. package/dist/rendering/renderer/DeviceLifecycle.js +48 -0
  3930. package/dist/rendering/renderer/DeviceLifecycle.js.map +1 -0
  3931. package/dist/rendering/renderer/FrameGraph.d.ts +96 -0
  3932. package/dist/rendering/renderer/FrameGraph.d.ts.map +1 -0
  3933. package/dist/rendering/renderer/FrameGraph.js +301 -0
  3934. package/dist/rendering/renderer/FrameGraph.js.map +1 -0
  3935. package/dist/rendering/renderer/InterleavedTransparentPass.d.ts +31 -0
  3936. package/dist/rendering/renderer/InterleavedTransparentPass.d.ts.map +1 -0
  3937. package/dist/rendering/renderer/InterleavedTransparentPass.js +65 -0
  3938. package/dist/rendering/renderer/InterleavedTransparentPass.js.map +1 -0
  3939. package/dist/rendering/renderer/PixelRatio.d.ts +64 -0
  3940. package/dist/rendering/renderer/PixelRatio.d.ts.map +1 -0
  3941. package/dist/rendering/renderer/PixelRatio.js +81 -0
  3942. package/dist/rendering/renderer/PixelRatio.js.map +1 -0
  3943. package/dist/rendering/renderer/PostprocessExecution.d.ts +82 -0
  3944. package/dist/rendering/renderer/PostprocessExecution.d.ts.map +1 -0
  3945. package/dist/rendering/renderer/PostprocessExecution.js +741 -0
  3946. package/dist/rendering/renderer/PostprocessExecution.js.map +1 -0
  3947. package/dist/rendering/renderer/Prd06ShaderWarmup.d.ts +32 -0
  3948. package/dist/rendering/renderer/Prd06ShaderWarmup.d.ts.map +1 -0
  3949. package/dist/rendering/renderer/Prd06ShaderWarmup.js +45 -0
  3950. package/dist/rendering/renderer/Prd06ShaderWarmup.js.map +1 -0
  3951. package/dist/rendering/renderer/RenderShared.d.ts +11 -0
  3952. package/dist/rendering/renderer/RenderShared.d.ts.map +1 -0
  3953. package/dist/rendering/renderer/RenderShared.js +47 -0
  3954. package/dist/rendering/renderer/RenderShared.js.map +1 -0
  3955. package/dist/rendering/renderer/RendererFactory.d.ts +3 -0
  3956. package/dist/rendering/renderer/RendererFactory.d.ts.map +1 -0
  3957. package/dist/rendering/renderer/RendererFactory.js +19 -0
  3958. package/dist/rendering/renderer/RendererFactory.js.map +1 -0
  3959. package/dist/rendering/renderer/RendererHost.d.ts +25 -0
  3960. package/dist/rendering/renderer/RendererHost.d.ts.map +1 -0
  3961. package/dist/rendering/renderer/RendererHost.js +4 -0
  3962. package/dist/rendering/renderer/RendererHost.js.map +1 -0
  3963. package/dist/rendering/renderer/SceneDepthCopyPass.d.ts +50 -0
  3964. package/dist/rendering/renderer/SceneDepthCopyPass.d.ts.map +1 -0
  3965. package/dist/rendering/renderer/SceneDepthCopyPass.js +124 -0
  3966. package/dist/rendering/renderer/SceneDepthCopyPass.js.map +1 -0
  3967. package/dist/rendering/renderer/ShadowOrchestration.d.ts +32 -0
  3968. package/dist/rendering/renderer/ShadowOrchestration.d.ts.map +1 -0
  3969. package/dist/rendering/renderer/ShadowOrchestration.js +491 -0
  3970. package/dist/rendering/renderer/ShadowOrchestration.js.map +1 -0
  3971. package/dist/rendering/renderer/SkinnedBounds.d.ts +6 -0
  3972. package/dist/rendering/renderer/SkinnedBounds.d.ts.map +1 -0
  3973. package/dist/rendering/renderer/SkinnedBounds.js +74 -0
  3974. package/dist/rendering/renderer/SkinnedBounds.js.map +1 -0
  3975. package/dist/rendering/renderer/coreOutputPostRoute.d.ts +40 -0
  3976. package/dist/rendering/renderer/coreOutputPostRoute.d.ts.map +1 -0
  3977. package/dist/rendering/renderer/coreOutputPostRoute.js +46 -0
  3978. package/dist/rendering/renderer/coreOutputPostRoute.js.map +1 -0
  3979. package/dist/rendering/renderer/postSkipped.d.ts +12 -0
  3980. package/dist/rendering/renderer/postSkipped.d.ts.map +1 -0
  3981. package/dist/rendering/renderer/postSkipped.js +54 -0
  3982. package/dist/rendering/renderer/postSkipped.js.map +1 -0
  3983. package/dist/rendering/renderer/qrSubFlags.d.ts +45 -0
  3984. package/dist/rendering/renderer/qrSubFlags.d.ts.map +1 -0
  3985. package/dist/rendering/renderer/qrSubFlags.js +130 -0
  3986. package/dist/rendering/renderer/qrSubFlags.js.map +1 -0
  3987. package/dist/rendering/resources/InstanceBuffer.d.ts +34 -0
  3988. package/dist/rendering/resources/InstanceBuffer.d.ts.map +1 -0
  3989. package/dist/rendering/resources/InstanceBuffer.js +96 -0
  3990. package/dist/rendering/resources/InstanceBuffer.js.map +1 -0
  3991. package/dist/rendering/resources/MorphTargetTexture.d.ts +53 -0
  3992. package/dist/rendering/resources/MorphTargetTexture.d.ts.map +1 -0
  3993. package/dist/rendering/resources/MorphTargetTexture.js +135 -0
  3994. package/dist/rendering/resources/MorphTargetTexture.js.map +1 -0
  3995. package/dist/rendering/resources/RenderTargetPool.d.ts +47 -0
  3996. package/dist/rendering/resources/RenderTargetPool.d.ts.map +1 -0
  3997. package/dist/rendering/resources/RenderTargetPool.js +113 -0
  3998. package/dist/rendering/resources/RenderTargetPool.js.map +1 -0
  3999. package/dist/rendering/resources/ResourceRegistry.d.ts +48 -0
  4000. package/dist/rendering/resources/ResourceRegistry.d.ts.map +1 -0
  4001. package/dist/rendering/resources/ResourceRegistry.js +95 -0
  4002. package/dist/rendering/resources/ResourceRegistry.js.map +1 -0
  4003. package/dist/rendering/resources/UniformBlock.d.ts +90 -0
  4004. package/dist/rendering/resources/UniformBlock.d.ts.map +1 -0
  4005. package/dist/rendering/resources/UniformBlock.js +184 -0
  4006. package/dist/rendering/resources/UniformBlock.js.map +1 -0
  4007. package/dist/rendering/shaders/camera-fade.glsl.d.ts +26 -0
  4008. package/dist/rendering/shaders/camera-fade.glsl.d.ts.map +1 -0
  4009. package/dist/rendering/shaders/camera-fade.glsl.js +109 -0
  4010. package/dist/rendering/shaders/camera-fade.glsl.js.map +1 -0
  4011. package/dist/rendering/shaders/chunks/contact_shadow.glsl.d.ts +12 -0
  4012. package/dist/rendering/shaders/chunks/contact_shadow.glsl.d.ts.map +1 -0
  4013. package/dist/rendering/shaders/chunks/contact_shadow.glsl.js +53 -0
  4014. package/dist/rendering/shaders/chunks/contact_shadow.glsl.js.map +1 -0
  4015. package/dist/rendering/shaders/chunks/lighting_ibl.glsl.d.ts +29 -0
  4016. package/dist/rendering/shaders/chunks/lighting_ibl.glsl.d.ts.map +1 -0
  4017. package/dist/rendering/shaders/chunks/lighting_ibl.glsl.js +122 -0
  4018. package/dist/rendering/shaders/chunks/lighting_ibl.glsl.js.map +1 -0
  4019. package/dist/rendering/shaders/chunks/lighting_mirrors.d.ts +18 -0
  4020. package/dist/rendering/shaders/chunks/lighting_mirrors.d.ts.map +1 -0
  4021. package/dist/rendering/shaders/chunks/lighting_mirrors.js +35 -0
  4022. package/dist/rendering/shaders/chunks/lighting_mirrors.js.map +1 -0
  4023. package/dist/rendering/shaders/chunks/lighting_punctual.glsl.d.ts +17 -0
  4024. package/dist/rendering/shaders/chunks/lighting_punctual.glsl.d.ts.map +1 -0
  4025. package/dist/rendering/shaders/chunks/lighting_punctual.glsl.js +197 -0
  4026. package/dist/rendering/shaders/chunks/lighting_punctual.glsl.js.map +1 -0
  4027. package/dist/rendering/shaders/chunks/sh9.glsl.d.ts +9 -0
  4028. package/dist/rendering/shaders/chunks/sh9.glsl.d.ts.map +1 -0
  4029. package/dist/rendering/shaders/chunks/sh9.glsl.js +41 -0
  4030. package/dist/rendering/shaders/chunks/sh9.glsl.js.map +1 -0
  4031. package/dist/rendering/shaders/chunks/shadow_caster.glsl.d.ts +10 -0
  4032. package/dist/rendering/shaders/chunks/shadow_caster.glsl.d.ts.map +1 -0
  4033. package/dist/rendering/shaders/chunks/shadow_caster.glsl.js +32 -0
  4034. package/dist/rendering/shaders/chunks/shadow_caster.glsl.js.map +1 -0
  4035. package/dist/rendering/shaders/chunks/shadow_receive.glsl.d.ts +13 -0
  4036. package/dist/rendering/shaders/chunks/shadow_receive.glsl.d.ts.map +1 -0
  4037. package/dist/rendering/shaders/chunks/shadow_receive.glsl.js +136 -0
  4038. package/dist/rendering/shaders/chunks/shadow_receive.glsl.js.map +1 -0
  4039. package/dist/rendering/shaders/debug-view.glsl.d.ts +18 -0
  4040. package/dist/rendering/shaders/debug-view.glsl.d.ts.map +1 -0
  4041. package/dist/rendering/shaders/debug-view.glsl.js +153 -0
  4042. package/dist/rendering/shaders/debug-view.glsl.js.map +1 -0
  4043. package/dist/rendering/shaders/deform/deform.glsl.d.ts +17 -0
  4044. package/dist/rendering/shaders/deform/deform.glsl.d.ts.map +1 -0
  4045. package/dist/rendering/shaders/deform/deform.glsl.js +99 -0
  4046. package/dist/rendering/shaders/deform/deform.glsl.js.map +1 -0
  4047. package/dist/rendering/shaders/deform/deform.wgsl.d.ts +15 -0
  4048. package/dist/rendering/shaders/deform/deform.wgsl.d.ts.map +1 -0
  4049. package/dist/rendering/shaders/deform/deform.wgsl.js +89 -0
  4050. package/dist/rendering/shaders/deform/deform.wgsl.js.map +1 -0
  4051. package/dist/rendering/shaders/deform/depthFeature.d.ts +22 -0
  4052. package/dist/rendering/shaders/deform/depthFeature.d.ts.map +1 -0
  4053. package/dist/rendering/shaders/deform/depthFeature.js +44 -0
  4054. package/dist/rendering/shaders/deform/depthFeature.js.map +1 -0
  4055. package/dist/rendering/shaders/deform/forwardFeature.d.ts +114 -0
  4056. package/dist/rendering/shaders/deform/forwardFeature.d.ts.map +1 -0
  4057. package/dist/rendering/shaders/deform/forwardFeature.js +300 -0
  4058. package/dist/rendering/shaders/deform/forwardFeature.js.map +1 -0
  4059. package/dist/rendering/shaders/deform/morph.glsl.d.ts +14 -0
  4060. package/dist/rendering/shaders/deform/morph.glsl.d.ts.map +1 -0
  4061. package/dist/rendering/shaders/deform/morph.glsl.js +45 -0
  4062. package/dist/rendering/shaders/deform/morph.glsl.js.map +1 -0
  4063. package/dist/rendering/shaders/deform/morph.wgsl.d.ts +21 -0
  4064. package/dist/rendering/shaders/deform/morph.wgsl.d.ts.map +1 -0
  4065. package/dist/rendering/shaders/deform/morph.wgsl.js +73 -0
  4066. package/dist/rendering/shaders/deform/morph.wgsl.js.map +1 -0
  4067. package/dist/rendering/shaders/deform/skinning.glsl.d.ts +8 -0
  4068. package/dist/rendering/shaders/deform/skinning.glsl.d.ts.map +1 -0
  4069. package/dist/rendering/shaders/deform/skinning.glsl.js +37 -0
  4070. package/dist/rendering/shaders/deform/skinning.glsl.js.map +1 -0
  4071. package/dist/rendering/shaders/deform/skinning.wgsl.d.ts +26 -0
  4072. package/dist/rendering/shaders/deform/skinning.wgsl.d.ts.map +1 -0
  4073. package/dist/rendering/shaders/deform/skinning.wgsl.js +58 -0
  4074. package/dist/rendering/shaders/deform/skinning.wgsl.js.map +1 -0
  4075. package/dist/rendering/shaders/deform/twins.d.ts +8 -0
  4076. package/dist/rendering/shaders/deform/twins.d.ts.map +1 -0
  4077. package/dist/rendering/shaders/deform/twins.js +20 -0
  4078. package/dist/rendering/shaders/deform/twins.js.map +1 -0
  4079. package/dist/rendering/shaders/lod-dither.glsl.d.ts +12 -0
  4080. package/dist/rendering/shaders/lod-dither.glsl.d.ts.map +1 -0
  4081. package/dist/rendering/shaders/lod-dither.glsl.js +101 -0
  4082. package/dist/rendering/shaders/lod-dither.glsl.js.map +1 -0
  4083. package/dist/rendering/shaders/physical/alpha_a2c.glsl.d.ts +19 -0
  4084. package/dist/rendering/shaders/physical/alpha_a2c.glsl.d.ts.map +1 -0
  4085. package/dist/rendering/shaders/physical/alpha_a2c.glsl.js +29 -0
  4086. package/dist/rendering/shaders/physical/alpha_a2c.glsl.js.map +1 -0
  4087. package/dist/rendering/shaders/physical/anisotropy.glsl.d.ts +23 -0
  4088. package/dist/rendering/shaders/physical/anisotropy.glsl.d.ts.map +1 -0
  4089. package/dist/rendering/shaders/physical/anisotropy.glsl.js +116 -0
  4090. package/dist/rendering/shaders/physical/anisotropy.glsl.js.map +1 -0
  4091. package/dist/rendering/shaders/physical/bsdf_lobes_common.glsl.d.ts +25 -0
  4092. package/dist/rendering/shaders/physical/bsdf_lobes_common.glsl.d.ts.map +1 -0
  4093. package/dist/rendering/shaders/physical/bsdf_lobes_common.glsl.js +95 -0
  4094. package/dist/rendering/shaders/physical/bsdf_lobes_common.glsl.js.map +1 -0
  4095. package/dist/rendering/shaders/physical/clearcoat.glsl.d.ts +23 -0
  4096. package/dist/rendering/shaders/physical/clearcoat.glsl.d.ts.map +1 -0
  4097. package/dist/rendering/shaders/physical/clearcoat.glsl.js +70 -0
  4098. package/dist/rendering/shaders/physical/clearcoat.glsl.js.map +1 -0
  4099. package/dist/rendering/shaders/physical/debug_view.glsl.d.ts +19 -0
  4100. package/dist/rendering/shaders/physical/debug_view.glsl.d.ts.map +1 -0
  4101. package/dist/rendering/shaders/physical/debug_view.glsl.js +76 -0
  4102. package/dist/rendering/shaders/physical/debug_view.glsl.js.map +1 -0
  4103. package/dist/rendering/shaders/physical/dispersion.glsl.d.ts +18 -0
  4104. package/dist/rendering/shaders/physical/dispersion.glsl.d.ts.map +1 -0
  4105. package/dist/rendering/shaders/physical/dispersion.glsl.js +67 -0
  4106. package/dist/rendering/shaders/physical/dispersion.glsl.js.map +1 -0
  4107. package/dist/rendering/shaders/physical/emissive_strength.glsl.d.ts +18 -0
  4108. package/dist/rendering/shaders/physical/emissive_strength.glsl.d.ts.map +1 -0
  4109. package/dist/rendering/shaders/physical/emissive_strength.glsl.js +20 -0
  4110. package/dist/rendering/shaders/physical/emissive_strength.glsl.js.map +1 -0
  4111. package/dist/rendering/shaders/physical/index.d.ts +27 -0
  4112. package/dist/rendering/shaders/physical/index.d.ts.map +1 -0
  4113. package/dist/rendering/shaders/physical/index.js +69 -0
  4114. package/dist/rendering/shaders/physical/index.js.map +1 -0
  4115. package/dist/rendering/shaders/physical/iridescence.glsl.d.ts +25 -0
  4116. package/dist/rendering/shaders/physical/iridescence.glsl.d.ts.map +1 -0
  4117. package/dist/rendering/shaders/physical/iridescence.glsl.js +186 -0
  4118. package/dist/rendering/shaders/physical/iridescence.glsl.js.map +1 -0
  4119. package/dist/rendering/shaders/physical/lobe_calls.glsl.d.ts +83 -0
  4120. package/dist/rendering/shaders/physical/lobe_calls.glsl.d.ts.map +1 -0
  4121. package/dist/rendering/shaders/physical/lobe_calls.glsl.js +397 -0
  4122. package/dist/rendering/shaders/physical/lobe_calls.glsl.js.map +1 -0
  4123. package/dist/rendering/shaders/physical/sheen.glsl.d.ts +24 -0
  4124. package/dist/rendering/shaders/physical/sheen.glsl.d.ts.map +1 -0
  4125. package/dist/rendering/shaders/physical/sheen.glsl.js +108 -0
  4126. package/dist/rendering/shaders/physical/sheen.glsl.js.map +1 -0
  4127. package/dist/rendering/shaders/physical/specular_ior.glsl.d.ts +20 -0
  4128. package/dist/rendering/shaders/physical/specular_ior.glsl.d.ts.map +1 -0
  4129. package/dist/rendering/shaders/physical/specular_ior.glsl.js +64 -0
  4130. package/dist/rendering/shaders/physical/specular_ior.glsl.js.map +1 -0
  4131. package/dist/rendering/shaders/physical/tangent_frame.glsl.d.ts +27 -0
  4132. package/dist/rendering/shaders/physical/tangent_frame.glsl.d.ts.map +1 -0
  4133. package/dist/rendering/shaders/physical/tangent_frame.glsl.js +71 -0
  4134. package/dist/rendering/shaders/physical/tangent_frame.glsl.js.map +1 -0
  4135. package/dist/rendering/shaders/physical/transmission.glsl.d.ts +25 -0
  4136. package/dist/rendering/shaders/physical/transmission.glsl.d.ts.map +1 -0
  4137. package/dist/rendering/shaders/physical/transmission.glsl.js +204 -0
  4138. package/dist/rendering/shaders/physical/transmission.glsl.js.map +1 -0
  4139. package/dist/rendering/shaders/physical/transmission_copy.glsl.d.ts +15 -0
  4140. package/dist/rendering/shaders/physical/transmission_copy.glsl.d.ts.map +1 -0
  4141. package/dist/rendering/shaders/physical/transmission_copy.glsl.js +33 -0
  4142. package/dist/rendering/shaders/physical/transmission_copy.glsl.js.map +1 -0
  4143. package/dist/rendering/shaders/physical/unlit.glsl.d.ts +17 -0
  4144. package/dist/rendering/shaders/physical/unlit.glsl.d.ts.map +1 -0
  4145. package/dist/rendering/shaders/physical/unlit.glsl.js +19 -0
  4146. package/dist/rendering/shaders/physical/unlit.glsl.js.map +1 -0
  4147. package/dist/rendering/shaders/physical/uv_transform.glsl.d.ts +18 -0
  4148. package/dist/rendering/shaders/physical/uv_transform.glsl.d.ts.map +1 -0
  4149. package/dist/rendering/shaders/physical/uv_transform.glsl.js +30 -0
  4150. package/dist/rendering/shaders/physical/uv_transform.glsl.js.map +1 -0
  4151. package/dist/rendering/shaders/physical/volume.glsl.d.ts +19 -0
  4152. package/dist/rendering/shaders/physical/volume.glsl.d.ts.map +1 -0
  4153. package/dist/rendering/shaders/physical/volume.glsl.js +47 -0
  4154. package/dist/rendering/shaders/physical/volume.glsl.js.map +1 -0
  4155. package/dist/rendering/shaders/physical-wgsl/alpha_a2c.wgsl.d.ts +8 -0
  4156. package/dist/rendering/shaders/physical-wgsl/alpha_a2c.wgsl.d.ts.map +1 -0
  4157. package/dist/rendering/shaders/physical-wgsl/alpha_a2c.wgsl.js +26 -0
  4158. package/dist/rendering/shaders/physical-wgsl/alpha_a2c.wgsl.js.map +1 -0
  4159. package/dist/rendering/shaders/physical-wgsl/anisotropy.wgsl.d.ts +10 -0
  4160. package/dist/rendering/shaders/physical-wgsl/anisotropy.wgsl.d.ts.map +1 -0
  4161. package/dist/rendering/shaders/physical-wgsl/anisotropy.wgsl.js +97 -0
  4162. package/dist/rendering/shaders/physical-wgsl/anisotropy.wgsl.js.map +1 -0
  4163. package/dist/rendering/shaders/physical-wgsl/bsdf_lobes_common.wgsl.d.ts +11 -0
  4164. package/dist/rendering/shaders/physical-wgsl/bsdf_lobes_common.wgsl.d.ts.map +1 -0
  4165. package/dist/rendering/shaders/physical-wgsl/bsdf_lobes_common.wgsl.js +76 -0
  4166. package/dist/rendering/shaders/physical-wgsl/bsdf_lobes_common.wgsl.js.map +1 -0
  4167. package/dist/rendering/shaders/physical-wgsl/clearcoat.wgsl.d.ts +9 -0
  4168. package/dist/rendering/shaders/physical-wgsl/clearcoat.wgsl.d.ts.map +1 -0
  4169. package/dist/rendering/shaders/physical-wgsl/clearcoat.wgsl.js +56 -0
  4170. package/dist/rendering/shaders/physical-wgsl/clearcoat.wgsl.js.map +1 -0
  4171. package/dist/rendering/shaders/physical-wgsl/debug_view.wgsl.d.ts +10 -0
  4172. package/dist/rendering/shaders/physical-wgsl/debug_view.wgsl.d.ts.map +1 -0
  4173. package/dist/rendering/shaders/physical-wgsl/debug_view.wgsl.js +71 -0
  4174. package/dist/rendering/shaders/physical-wgsl/debug_view.wgsl.js.map +1 -0
  4175. package/dist/rendering/shaders/physical-wgsl/dispersion.wgsl.d.ts +10 -0
  4176. package/dist/rendering/shaders/physical-wgsl/dispersion.wgsl.d.ts.map +1 -0
  4177. package/dist/rendering/shaders/physical-wgsl/dispersion.wgsl.js +51 -0
  4178. package/dist/rendering/shaders/physical-wgsl/dispersion.wgsl.js.map +1 -0
  4179. package/dist/rendering/shaders/physical-wgsl/emissive_strength.wgsl.d.ts +9 -0
  4180. package/dist/rendering/shaders/physical-wgsl/emissive_strength.wgsl.d.ts.map +1 -0
  4181. package/dist/rendering/shaders/physical-wgsl/emissive_strength.wgsl.js +15 -0
  4182. package/dist/rendering/shaders/physical-wgsl/emissive_strength.wgsl.js.map +1 -0
  4183. package/dist/rendering/shaders/physical-wgsl/index.d.ts +35 -0
  4184. package/dist/rendering/shaders/physical-wgsl/index.d.ts.map +1 -0
  4185. package/dist/rendering/shaders/physical-wgsl/index.js +51 -0
  4186. package/dist/rendering/shaders/physical-wgsl/index.js.map +1 -0
  4187. package/dist/rendering/shaders/physical-wgsl/iridescence.wgsl.d.ts +9 -0
  4188. package/dist/rendering/shaders/physical-wgsl/iridescence.wgsl.d.ts.map +1 -0
  4189. package/dist/rendering/shaders/physical-wgsl/iridescence.wgsl.js +162 -0
  4190. package/dist/rendering/shaders/physical-wgsl/iridescence.wgsl.js.map +1 -0
  4191. package/dist/rendering/shaders/physical-wgsl/sheen.wgsl.d.ts +9 -0
  4192. package/dist/rendering/shaders/physical-wgsl/sheen.wgsl.d.ts.map +1 -0
  4193. package/dist/rendering/shaders/physical-wgsl/sheen.wgsl.js +85 -0
  4194. package/dist/rendering/shaders/physical-wgsl/sheen.wgsl.js.map +1 -0
  4195. package/dist/rendering/shaders/physical-wgsl/specular_ior.wgsl.d.ts +10 -0
  4196. package/dist/rendering/shaders/physical-wgsl/specular_ior.wgsl.d.ts.map +1 -0
  4197. package/dist/rendering/shaders/physical-wgsl/specular_ior.wgsl.js +47 -0
  4198. package/dist/rendering/shaders/physical-wgsl/specular_ior.wgsl.js.map +1 -0
  4199. package/dist/rendering/shaders/physical-wgsl/tangent_frame.wgsl.d.ts +11 -0
  4200. package/dist/rendering/shaders/physical-wgsl/tangent_frame.wgsl.d.ts.map +1 -0
  4201. package/dist/rendering/shaders/physical-wgsl/tangent_frame.wgsl.js +57 -0
  4202. package/dist/rendering/shaders/physical-wgsl/tangent_frame.wgsl.js.map +1 -0
  4203. package/dist/rendering/shaders/physical-wgsl/transmission.wgsl.d.ts +14 -0
  4204. package/dist/rendering/shaders/physical-wgsl/transmission.wgsl.d.ts.map +1 -0
  4205. package/dist/rendering/shaders/physical-wgsl/transmission.wgsl.js +159 -0
  4206. package/dist/rendering/shaders/physical-wgsl/transmission.wgsl.js.map +1 -0
  4207. package/dist/rendering/shaders/physical-wgsl/unlit.wgsl.d.ts +8 -0
  4208. package/dist/rendering/shaders/physical-wgsl/unlit.wgsl.d.ts.map +1 -0
  4209. package/dist/rendering/shaders/physical-wgsl/unlit.wgsl.js +13 -0
  4210. package/dist/rendering/shaders/physical-wgsl/unlit.wgsl.js.map +1 -0
  4211. package/dist/rendering/shaders/physical-wgsl/uv_transform.wgsl.d.ts +10 -0
  4212. package/dist/rendering/shaders/physical-wgsl/uv_transform.wgsl.d.ts.map +1 -0
  4213. package/dist/rendering/shaders/physical-wgsl/uv_transform.wgsl.js +24 -0
  4214. package/dist/rendering/shaders/physical-wgsl/uv_transform.wgsl.js.map +1 -0
  4215. package/dist/rendering/shaders/physical-wgsl/volume.wgsl.d.ts +10 -0
  4216. package/dist/rendering/shaders/physical-wgsl/volume.wgsl.d.ts.map +1 -0
  4217. package/dist/rendering/shaders/physical-wgsl/volume.wgsl.js +35 -0
  4218. package/dist/rendering/shaders/physical-wgsl/volume.wgsl.js.map +1 -0
  4219. package/dist/rendering/shadows/DirectionalCascadeFitter.d.ts +97 -0
  4220. package/dist/rendering/shadows/DirectionalCascadeFitter.d.ts.map +1 -0
  4221. package/dist/rendering/shadows/DirectionalCascadeFitter.js +372 -0
  4222. package/dist/rendering/shadows/DirectionalCascadeFitter.js.map +1 -0
  4223. package/dist/rendering/shadows/Prd02DepthShaderLibrary.d.ts +77 -0
  4224. package/dist/rendering/shadows/Prd02DepthShaderLibrary.d.ts.map +1 -0
  4225. package/dist/rendering/shadows/Prd02DepthShaderLibrary.js +381 -0
  4226. package/dist/rendering/shadows/Prd02DepthShaderLibrary.js.map +1 -0
  4227. package/dist/rendering/shadows/Prd02ReceiveShadowContributor.d.ts +20 -0
  4228. package/dist/rendering/shadows/Prd02ReceiveShadowContributor.d.ts.map +1 -0
  4229. package/dist/rendering/shadows/Prd02ReceiveShadowContributor.js +20 -0
  4230. package/dist/rendering/shadows/Prd02ReceiveShadowContributor.js.map +1 -0
  4231. package/dist/rendering/shadows/Prd02ShadowBridge.d.ts +111 -0
  4232. package/dist/rendering/shadows/Prd02ShadowBridge.d.ts.map +1 -0
  4233. package/dist/rendering/shadows/Prd02ShadowBridge.js +267 -0
  4234. package/dist/rendering/shadows/Prd02ShadowBridge.js.map +1 -0
  4235. package/dist/rendering/shadows/Prd02ShadowFilter.d.ts +29 -0
  4236. package/dist/rendering/shadows/Prd02ShadowFilter.d.ts.map +1 -0
  4237. package/dist/rendering/shadows/Prd02ShadowFilter.js +35 -0
  4238. package/dist/rendering/shadows/Prd02ShadowFilter.js.map +1 -0
  4239. package/dist/rendering/shadows/Prd02ShadowsContributor.d.ts +44 -0
  4240. package/dist/rendering/shadows/Prd02ShadowsContributor.d.ts.map +1 -0
  4241. package/dist/rendering/shadows/Prd02ShadowsContributor.js +197 -0
  4242. package/dist/rendering/shadows/Prd02ShadowsContributor.js.map +1 -0
  4243. package/dist/rendering/shadows/ShadowAtlas.d.ts +59 -0
  4244. package/dist/rendering/shadows/ShadowAtlas.d.ts.map +1 -0
  4245. package/dist/rendering/shadows/ShadowAtlas.js +137 -0
  4246. package/dist/rendering/shadows/ShadowAtlas.js.map +1 -0
  4247. package/dist/rendering/shadows/ShadowDebugViews.d.ts +5 -0
  4248. package/dist/rendering/shadows/ShadowDebugViews.d.ts.map +1 -1
  4249. package/dist/rendering/shadows/ShadowDebugViews.js +15 -10
  4250. package/dist/rendering/shadows/ShadowDebugViews.js.map +1 -1
  4251. package/dist/rendering/shadows/ShadowFrameBinding.d.ts +18 -0
  4252. package/dist/rendering/shadows/ShadowFrameBinding.d.ts.map +1 -0
  4253. package/dist/rendering/shadows/ShadowFrameBinding.js +52 -0
  4254. package/dist/rendering/shadows/ShadowFrameBinding.js.map +1 -0
  4255. package/dist/rendering/shadows/ShadowSystem.d.ts +125 -0
  4256. package/dist/rendering/shadows/ShadowSystem.d.ts.map +1 -0
  4257. package/dist/rendering/shadows/ShadowSystem.js +293 -0
  4258. package/dist/rendering/shadows/ShadowSystem.js.map +1 -0
  4259. package/dist/rendering/textures/TextureBudget.d.ts +42 -0
  4260. package/dist/rendering/textures/TextureBudget.d.ts.map +1 -0
  4261. package/dist/rendering/textures/TextureBudget.js +180 -0
  4262. package/dist/rendering/textures/TextureBudget.js.map +1 -0
  4263. package/dist/rendering/vfx/BeamPass.d.ts +42 -0
  4264. package/dist/rendering/vfx/BeamPass.d.ts.map +1 -0
  4265. package/dist/rendering/vfx/BeamPass.js +249 -0
  4266. package/dist/rendering/vfx/BeamPass.js.map +1 -0
  4267. package/dist/rendering/vfx/BlendFallback.d.ts +19 -0
  4268. package/dist/rendering/vfx/BlendFallback.d.ts.map +1 -0
  4269. package/dist/rendering/vfx/BlendFallback.js +73 -0
  4270. package/dist/rendering/vfx/BlendFallback.js.map +1 -0
  4271. package/dist/rendering/vfx/DecalBatch.d.ts +120 -0
  4272. package/dist/rendering/vfx/DecalBatch.d.ts.map +1 -0
  4273. package/dist/rendering/vfx/DecalBatch.js +234 -0
  4274. package/dist/rendering/vfx/DecalBatch.js.map +1 -0
  4275. package/dist/rendering/vfx/DecalPass.d.ts +63 -0
  4276. package/dist/rendering/vfx/DecalPass.d.ts.map +1 -0
  4277. package/dist/rendering/vfx/DecalPass.js +159 -0
  4278. package/dist/rendering/vfx/DecalPass.js.map +1 -0
  4279. package/dist/rendering/vfx/LowResParticles.d.ts +31 -0
  4280. package/dist/rendering/vfx/LowResParticles.d.ts.map +1 -0
  4281. package/dist/rendering/vfx/LowResParticles.js +151 -0
  4282. package/dist/rendering/vfx/LowResParticles.js.map +1 -0
  4283. package/dist/rendering/vfx/MeshParticleBatch.d.ts +49 -0
  4284. package/dist/rendering/vfx/MeshParticleBatch.d.ts.map +1 -0
  4285. package/dist/rendering/vfx/MeshParticleBatch.js +184 -0
  4286. package/dist/rendering/vfx/MeshParticleBatch.js.map +1 -0
  4287. package/dist/rendering/vfx/MeshParticlePass.d.ts +28 -0
  4288. package/dist/rendering/vfx/MeshParticlePass.d.ts.map +1 -0
  4289. package/dist/rendering/vfx/MeshParticlePass.js +150 -0
  4290. package/dist/rendering/vfx/MeshParticlePass.js.map +1 -0
  4291. package/dist/rendering/vfx/ParticleBatchPass.d.ts +61 -0
  4292. package/dist/rendering/vfx/ParticleBatchPass.d.ts.map +1 -0
  4293. package/dist/rendering/vfx/ParticleBatchPass.js +320 -0
  4294. package/dist/rendering/vfx/ParticleBatchPass.js.map +1 -0
  4295. package/dist/rendering/vfx/ParticleGpuSim.d.ts +85 -0
  4296. package/dist/rendering/vfx/ParticleGpuSim.d.ts.map +1 -0
  4297. package/dist/rendering/vfx/ParticleGpuSim.js +301 -0
  4298. package/dist/rendering/vfx/ParticleGpuSim.js.map +1 -0
  4299. package/dist/rendering/vfx/ParticleInstanceLayout.d.ts +38 -0
  4300. package/dist/rendering/vfx/ParticleInstanceLayout.d.ts.map +1 -0
  4301. package/dist/rendering/vfx/ParticleInstanceLayout.js +105 -0
  4302. package/dist/rendering/vfx/ParticleInstanceLayout.js.map +1 -0
  4303. package/dist/rendering/vfx/ParticleSort.d.ts +21 -0
  4304. package/dist/rendering/vfx/ParticleSort.d.ts.map +1 -0
  4305. package/dist/rendering/vfx/ParticleSort.js +80 -0
  4306. package/dist/rendering/vfx/ParticleSort.js.map +1 -0
  4307. package/dist/rendering/vfx/ProceduralVolumeEmitter.d.ts +90 -0
  4308. package/dist/rendering/vfx/ProceduralVolumeEmitter.d.ts.map +1 -0
  4309. package/dist/rendering/vfx/ProceduralVolumeEmitter.js +155 -0
  4310. package/dist/rendering/vfx/ProceduralVolumeEmitter.js.map +1 -0
  4311. package/dist/rendering/vfx/RibbonBatch.d.ts +71 -0
  4312. package/dist/rendering/vfx/RibbonBatch.d.ts.map +1 -0
  4313. package/dist/rendering/vfx/RibbonBatch.js +234 -0
  4314. package/dist/rendering/vfx/RibbonBatch.js.map +1 -0
  4315. package/dist/rendering/vfx/RibbonPass.d.ts +21 -0
  4316. package/dist/rendering/vfx/RibbonPass.d.ts.map +1 -0
  4317. package/dist/rendering/vfx/RibbonPass.js +108 -0
  4318. package/dist/rendering/vfx/RibbonPass.js.map +1 -0
  4319. package/dist/rendering/vfx/SceneDepthAdapter.d.ts +28 -0
  4320. package/dist/rendering/vfx/SceneDepthAdapter.d.ts.map +1 -0
  4321. package/dist/rendering/vfx/SceneDepthAdapter.js +70 -0
  4322. package/dist/rendering/vfx/SceneDepthAdapter.js.map +1 -0
  4323. package/dist/rendering/vfx/VfxAtlas.d.ts +68 -0
  4324. package/dist/rendering/vfx/VfxAtlas.d.ts.map +1 -0
  4325. package/dist/rendering/vfx/VfxAtlas.js +106 -0
  4326. package/dist/rendering/vfx/VfxAtlas.js.map +1 -0
  4327. package/dist/rendering/vfx/contributors.d.ts +73 -0
  4328. package/dist/rendering/vfx/contributors.d.ts.map +1 -0
  4329. package/dist/rendering/vfx/contributors.js +615 -0
  4330. package/dist/rendering/vfx/contributors.js.map +1 -0
  4331. package/dist/rendering/vfx/decalLighting.d.ts +8 -0
  4332. package/dist/rendering/vfx/decalLighting.d.ts.map +1 -0
  4333. package/dist/rendering/vfx/decalLighting.js +53 -0
  4334. package/dist/rendering/vfx/decalLighting.js.map +1 -0
  4335. package/dist/rendering/vfx/depthSampler.d.ts +3 -0
  4336. package/dist/rendering/vfx/depthSampler.d.ts.map +1 -0
  4337. package/dist/rendering/vfx/depthSampler.js +10 -0
  4338. package/dist/rendering/vfx/depthSampler.js.map +1 -0
  4339. package/dist/rendering/vfx/prd07FeaturePars.d.ts +12 -0
  4340. package/dist/rendering/vfx/prd07FeaturePars.d.ts.map +1 -0
  4341. package/dist/rendering/vfx/prd07FeaturePars.js +54 -0
  4342. package/dist/rendering/vfx/prd07FeaturePars.js.map +1 -0
  4343. package/dist/rendering/vfx/shaders/beam.glsl.d.ts +11 -0
  4344. package/dist/rendering/vfx/shaders/beam.glsl.d.ts.map +1 -0
  4345. package/dist/rendering/vfx/shaders/beam.glsl.js +89 -0
  4346. package/dist/rendering/vfx/shaders/beam.glsl.js.map +1 -0
  4347. package/dist/rendering/vfx/shaders/decal.glsl.d.ts +14 -0
  4348. package/dist/rendering/vfx/shaders/decal.glsl.d.ts.map +1 -0
  4349. package/dist/rendering/vfx/shaders/decal.glsl.js +157 -0
  4350. package/dist/rendering/vfx/shaders/decal.glsl.js.map +1 -0
  4351. package/dist/rendering/vfx/shaders/gpu-sim.glsl.d.ts +5 -0
  4352. package/dist/rendering/vfx/shaders/gpu-sim.glsl.d.ts.map +1 -0
  4353. package/dist/rendering/vfx/shaders/gpu-sim.glsl.js +177 -0
  4354. package/dist/rendering/vfx/shaders/gpu-sim.glsl.js.map +1 -0
  4355. package/dist/rendering/vfx/shaders/lowresComposite.glsl.d.ts +9 -0
  4356. package/dist/rendering/vfx/shaders/lowresComposite.glsl.d.ts.map +1 -0
  4357. package/dist/rendering/vfx/shaders/lowresComposite.glsl.js +64 -0
  4358. package/dist/rendering/vfx/shaders/lowresComposite.glsl.js.map +1 -0
  4359. package/dist/rendering/vfx/shaders/mesh-particle.glsl.d.ts +4 -0
  4360. package/dist/rendering/vfx/shaders/mesh-particle.glsl.d.ts.map +1 -0
  4361. package/dist/rendering/vfx/shaders/mesh-particle.glsl.js +55 -0
  4362. package/dist/rendering/vfx/shaders/mesh-particle.glsl.js.map +1 -0
  4363. package/dist/rendering/vfx/shaders/particle.glsl.d.ts +24 -0
  4364. package/dist/rendering/vfx/shaders/particle.glsl.d.ts.map +1 -0
  4365. package/dist/rendering/vfx/shaders/particle.glsl.js +215 -0
  4366. package/dist/rendering/vfx/shaders/particle.glsl.js.map +1 -0
  4367. package/dist/rendering/vfx/shaders/ribbon.glsl.d.ts +9 -0
  4368. package/dist/rendering/vfx/shaders/ribbon.glsl.d.ts.map +1 -0
  4369. package/dist/rendering/vfx/shaders/ribbon.glsl.js +60 -0
  4370. package/dist/rendering/vfx/shaders/ribbon.glsl.js.map +1 -0
  4371. package/dist/rendering/vfx/shaders/volume.glsl.d.ts +5 -0
  4372. package/dist/rendering/vfx/shaders/volume.glsl.d.ts.map +1 -0
  4373. package/dist/rendering/vfx/shaders/volume.glsl.js +52 -0
  4374. package/dist/rendering/vfx/shaders/volume.glsl.js.map +1 -0
  4375. package/dist/rendering/webgl2/ContextLifecycle.d.ts +43 -0
  4376. package/dist/rendering/webgl2/ContextLifecycle.d.ts.map +1 -0
  4377. package/dist/rendering/webgl2/ContextLifecycle.js +189 -0
  4378. package/dist/rendering/webgl2/ContextLifecycle.js.map +1 -0
  4379. package/dist/rendering/webgl2/Counters.d.ts +58 -0
  4380. package/dist/rendering/webgl2/Counters.d.ts.map +1 -0
  4381. package/dist/rendering/webgl2/Counters.js +207 -0
  4382. package/dist/rendering/webgl2/Counters.js.map +1 -0
  4383. package/dist/rendering/webgl2/DeviceHost.d.ts +41 -0
  4384. package/dist/rendering/webgl2/DeviceHost.d.ts.map +1 -0
  4385. package/dist/rendering/webgl2/DeviceHost.js +3 -0
  4386. package/dist/rendering/webgl2/DeviceHost.js.map +1 -0
  4387. package/dist/rendering/webgl2/LegacyPost.d.ts +279 -0
  4388. package/dist/rendering/webgl2/LegacyPost.d.ts.map +1 -0
  4389. package/dist/rendering/webgl2/LegacyPost.js +2477 -0
  4390. package/dist/rendering/webgl2/LegacyPost.js.map +1 -0
  4391. package/dist/rendering/webgl2/MultiDraw.d.ts +96 -0
  4392. package/dist/rendering/webgl2/MultiDraw.d.ts.map +1 -0
  4393. package/dist/rendering/webgl2/MultiDraw.js +716 -0
  4394. package/dist/rendering/webgl2/MultiDraw.js.map +1 -0
  4395. package/dist/rendering/webgl2/Probe.d.ts +27 -0
  4396. package/dist/rendering/webgl2/Probe.d.ts.map +1 -0
  4397. package/dist/rendering/webgl2/Probe.js +303 -0
  4398. package/dist/rendering/webgl2/Probe.js.map +1 -0
  4399. package/dist/rendering/webgl2/Samplers.d.ts +20 -0
  4400. package/dist/rendering/webgl2/Samplers.d.ts.map +1 -0
  4401. package/dist/rendering/webgl2/Samplers.js +179 -0
  4402. package/dist/rendering/webgl2/Samplers.js.map +1 -0
  4403. package/dist/rendering/webgl2/TextureFormats.d.ts +48 -0
  4404. package/dist/rendering/webgl2/TextureFormats.d.ts.map +1 -0
  4405. package/dist/rendering/webgl2/TextureFormats.js +185 -0
  4406. package/dist/rendering/webgl2/TextureFormats.js.map +1 -0
  4407. package/dist/rendering/webgl2/TextureUpload.d.ts +38 -0
  4408. package/dist/rendering/webgl2/TextureUpload.d.ts.map +1 -0
  4409. package/dist/rendering/webgl2/TextureUpload.js +346 -0
  4410. package/dist/rendering/webgl2/TextureUpload.js.map +1 -0
  4411. package/dist/rendering/webgpu/WebGPUBuffer.d.ts +1 -0
  4412. package/dist/rendering/webgpu/WebGPUBuffer.d.ts.map +1 -1
  4413. package/dist/rendering/webgpu/WebGPUCompute.d.ts +1 -0
  4414. package/dist/rendering/webgpu/WebGPUCompute.d.ts.map +1 -1
  4415. package/dist/rendering/webgpu/WebGPUCompute.js +1 -0
  4416. package/dist/rendering/webgpu/WebGPUCompute.js.map +1 -1
  4417. package/dist/rendering/webgpu/WebGPUPipelineCache.d.ts +4 -0
  4418. package/dist/rendering/webgpu/WebGPUPipelineCache.d.ts.map +1 -1
  4419. package/dist/rendering/webgpu/WebGPUPipelineCache.js +4 -0
  4420. package/dist/rendering/webgpu/WebGPUPipelineCache.js.map +1 -1
  4421. package/dist/rendering/webgpu/WebGPUPostShaders.d.ts +2 -3
  4422. package/dist/rendering/webgpu/WebGPUPostShaders.d.ts.map +1 -1
  4423. package/dist/rendering/webgpu/WebGPUPostShaders.js +35 -5
  4424. package/dist/rendering/webgpu/WebGPUPostShaders.js.map +1 -1
  4425. package/dist/rendering/webgpu/WebGPUTemporal.d.ts +17 -0
  4426. package/dist/rendering/webgpu/WebGPUTemporal.d.ts.map +1 -0
  4427. package/dist/rendering/webgpu/WebGPUTemporal.js +64 -0
  4428. package/dist/rendering/webgpu/WebGPUTemporal.js.map +1 -0
  4429. package/dist/rendering/webgpu/WebGPUTexture.d.ts +1 -0
  4430. package/dist/rendering/webgpu/WebGPUTexture.d.ts.map +1 -1
  4431. package/dist/rendering/webgpu/WebGPUTexture.js.map +1 -1
  4432. package/dist/rendering/webgpu.d.ts +6 -0
  4433. package/dist/rendering/webgpu.d.ts.map +1 -1
  4434. package/dist/rendering/webgpu.js +4 -0
  4435. package/dist/rendering/webgpu.js.map +1 -1
  4436. package/dist/rendering/world/chunks.d.ts +15 -0
  4437. package/dist/rendering/world/chunks.d.ts.map +1 -0
  4438. package/dist/rendering/world/chunks.js +56 -0
  4439. package/dist/rendering/world/chunks.js.map +1 -0
  4440. package/dist/rendering/world/index.d.ts +38 -0
  4441. package/dist/rendering/world/index.d.ts.map +1 -0
  4442. package/dist/rendering/world/index.js +39 -0
  4443. package/dist/rendering/world/index.js.map +1 -0
  4444. package/dist/rendering/world/shared/shaders/worldLightFallback.d.ts +12 -0
  4445. package/dist/rendering/world/shared/shaders/worldLightFallback.d.ts.map +1 -0
  4446. package/dist/rendering/world/shared/shaders/worldLightFallback.js +82 -0
  4447. package/dist/rendering/world/shared/shaders/worldLightFallback.js.map +1 -0
  4448. package/dist/rendering/world/space/PlanetMaterial.d.ts +24 -0
  4449. package/dist/rendering/world/space/PlanetMaterial.d.ts.map +1 -0
  4450. package/dist/rendering/world/space/PlanetMaterial.js +82 -0
  4451. package/dist/rendering/world/space/PlanetMaterial.js.map +1 -0
  4452. package/dist/rendering/world/space/SpaceSkyBake.d.ts +46 -0
  4453. package/dist/rendering/world/space/SpaceSkyBake.d.ts.map +1 -0
  4454. package/dist/rendering/world/space/SpaceSkyBake.js +145 -0
  4455. package/dist/rendering/world/space/SpaceSkyBake.js.map +1 -0
  4456. package/dist/rendering/world/space/shaders/planet.d.ts +8 -0
  4457. package/dist/rendering/world/space/shaders/planet.d.ts.map +1 -0
  4458. package/dist/rendering/world/space/shaders/planet.js +55 -0
  4459. package/dist/rendering/world/space/shaders/planet.js.map +1 -0
  4460. package/dist/rendering/world/space/shaders/spaceBake.d.ts +9 -0
  4461. package/dist/rendering/world/space/shaders/spaceBake.d.ts.map +1 -0
  4462. package/dist/rendering/world/space/shaders/spaceBake.js +102 -0
  4463. package/dist/rendering/world/space/shaders/spaceBake.js.map +1 -0
  4464. package/dist/rendering/world/terrain/SplatBake.d.ts +76 -0
  4465. package/dist/rendering/world/terrain/SplatBake.d.ts.map +1 -0
  4466. package/dist/rendering/world/terrain/SplatBake.js +308 -0
  4467. package/dist/rendering/world/terrain/SplatBake.js.map +1 -0
  4468. package/dist/rendering/world/terrain/TerrainCdlod.d.ts +67 -0
  4469. package/dist/rendering/world/terrain/TerrainCdlod.d.ts.map +1 -0
  4470. package/dist/rendering/world/terrain/TerrainCdlod.js +115 -0
  4471. package/dist/rendering/world/terrain/TerrainCdlod.js.map +1 -0
  4472. package/dist/rendering/world/terrain/TerrainHeightTexture.d.ts +44 -0
  4473. package/dist/rendering/world/terrain/TerrainHeightTexture.d.ts.map +1 -0
  4474. package/dist/rendering/world/terrain/TerrainHeightTexture.js +173 -0
  4475. package/dist/rendering/world/terrain/TerrainHeightTexture.js.map +1 -0
  4476. package/dist/rendering/world/terrain/TerrainPatchGeometry.d.ts +18 -0
  4477. package/dist/rendering/world/terrain/TerrainPatchGeometry.d.ts.map +1 -0
  4478. package/dist/rendering/world/terrain/TerrainPatchGeometry.js +40 -0
  4479. package/dist/rendering/world/terrain/TerrainPatchGeometry.js.map +1 -0
  4480. package/dist/rendering/world/terrain/shaders/terrain.vert.glsl.d.ts +19 -0
  4481. package/dist/rendering/world/terrain/shaders/terrain.vert.glsl.d.ts.map +1 -0
  4482. package/dist/rendering/world/terrain/shaders/terrain.vert.glsl.js +162 -0
  4483. package/dist/rendering/world/terrain/shaders/terrain.vert.glsl.js.map +1 -0
  4484. package/dist/rendering/world/terrain/shaders/terrainCdlod.d.ts +23 -0
  4485. package/dist/rendering/world/terrain/shaders/terrainCdlod.d.ts.map +1 -0
  4486. package/dist/rendering/world/terrain/shaders/terrainCdlod.js +110 -0
  4487. package/dist/rendering/world/terrain/shaders/terrainCdlod.js.map +1 -0
  4488. package/dist/rendering/world/terrain/shaders/terrainSplat.d.ts +26 -0
  4489. package/dist/rendering/world/terrain/shaders/terrainSplat.d.ts.map +1 -0
  4490. package/dist/rendering/world/terrain/shaders/terrainSplat.js +181 -0
  4491. package/dist/rendering/world/terrain/shaders/terrainSplat.js.map +1 -0
  4492. package/dist/rendering/world/vegetation/FoliageMaterial.d.ts +14 -0
  4493. package/dist/rendering/world/vegetation/FoliageMaterial.d.ts.map +1 -0
  4494. package/dist/rendering/world/vegetation/FoliageMaterial.js +107 -0
  4495. package/dist/rendering/world/vegetation/FoliageMaterial.js.map +1 -0
  4496. package/dist/rendering/world/vegetation/GrassField.d.ts +43 -0
  4497. package/dist/rendering/world/vegetation/GrassField.d.ts.map +1 -0
  4498. package/dist/rendering/world/vegetation/GrassField.js +68 -0
  4499. package/dist/rendering/world/vegetation/GrassField.js.map +1 -0
  4500. package/dist/rendering/world/vegetation/ImpostorMaterial.d.ts +20 -0
  4501. package/dist/rendering/world/vegetation/ImpostorMaterial.d.ts.map +1 -0
  4502. package/dist/rendering/world/vegetation/ImpostorMaterial.js +80 -0
  4503. package/dist/rendering/world/vegetation/ImpostorMaterial.js.map +1 -0
  4504. package/dist/rendering/world/vegetation/InstanceChunkGrid.d.ts +67 -0
  4505. package/dist/rendering/world/vegetation/InstanceChunkGrid.d.ts.map +1 -0
  4506. package/dist/rendering/world/vegetation/InstanceChunkGrid.js +150 -0
  4507. package/dist/rendering/world/vegetation/InstanceChunkGrid.js.map +1 -0
  4508. package/dist/rendering/world/vegetation/WindCpu.d.ts +19 -0
  4509. package/dist/rendering/world/vegetation/WindCpu.d.ts.map +1 -0
  4510. package/dist/rendering/world/vegetation/WindCpu.js +43 -0
  4511. package/dist/rendering/world/vegetation/WindCpu.js.map +1 -0
  4512. package/dist/rendering/world/vegetation/WindField.d.ts +42 -0
  4513. package/dist/rendering/world/vegetation/WindField.d.ts.map +1 -0
  4514. package/dist/rendering/world/vegetation/WindField.js +154 -0
  4515. package/dist/rendering/world/vegetation/WindField.js.map +1 -0
  4516. package/dist/rendering/world/vegetation/shaders/foliage.d.ts +8 -0
  4517. package/dist/rendering/world/vegetation/shaders/foliage.d.ts.map +1 -0
  4518. package/dist/rendering/world/vegetation/shaders/foliage.js +104 -0
  4519. package/dist/rendering/world/vegetation/shaders/foliage.js.map +1 -0
  4520. package/dist/rendering/world/vegetation/shaders/grass.d.ts +10 -0
  4521. package/dist/rendering/world/vegetation/shaders/grass.d.ts.map +1 -0
  4522. package/dist/rendering/world/vegetation/shaders/grass.js +79 -0
  4523. package/dist/rendering/world/vegetation/shaders/grass.js.map +1 -0
  4524. package/dist/rendering/world/vegetation/shaders/impostor.d.ts +9 -0
  4525. package/dist/rendering/world/vegetation/shaders/impostor.d.ts.map +1 -0
  4526. package/dist/rendering/world/vegetation/shaders/impostor.js +97 -0
  4527. package/dist/rendering/world/vegetation/shaders/impostor.js.map +1 -0
  4528. package/dist/rendering/world/vegetation/shaders/wind.d.ts +9 -0
  4529. package/dist/rendering/world/vegetation/shaders/wind.d.ts.map +1 -0
  4530. package/dist/rendering/world/vegetation/shaders/wind.js +103 -0
  4531. package/dist/rendering/world/vegetation/shaders/wind.js.map +1 -0
  4532. package/dist/rendering/world/water/GerstnerWaves.d.ts +65 -0
  4533. package/dist/rendering/world/water/GerstnerWaves.d.ts.map +1 -0
  4534. package/dist/rendering/world/water/GerstnerWaves.js +182 -0
  4535. package/dist/rendering/world/water/GerstnerWaves.js.map +1 -0
  4536. package/dist/rendering/world/water/ReflectionViewPass.d.ts +46 -0
  4537. package/dist/rendering/world/water/ReflectionViewPass.d.ts.map +1 -0
  4538. package/dist/rendering/world/water/ReflectionViewPass.js +85 -0
  4539. package/dist/rendering/world/water/ReflectionViewPass.js.map +1 -0
  4540. package/dist/rendering/world/water/SceneCopyFallback.d.ts +21 -0
  4541. package/dist/rendering/world/water/SceneCopyFallback.d.ts.map +1 -0
  4542. package/dist/rendering/world/water/SceneCopyFallback.js +150 -0
  4543. package/dist/rendering/world/water/SceneCopyFallback.js.map +1 -0
  4544. package/dist/rendering/world/water/UnderwaterState.d.ts +25 -0
  4545. package/dist/rendering/world/water/UnderwaterState.d.ts.map +1 -0
  4546. package/dist/rendering/world/water/UnderwaterState.js +134 -0
  4547. package/dist/rendering/world/water/UnderwaterState.js.map +1 -0
  4548. package/dist/rendering/world/water/WaterMaterial.d.ts +23 -0
  4549. package/dist/rendering/world/water/WaterMaterial.d.ts.map +1 -0
  4550. package/dist/rendering/world/water/WaterMaterial.js +129 -0
  4551. package/dist/rendering/world/water/WaterMaterial.js.map +1 -0
  4552. package/dist/rendering/world/water/shaders/caustics.d.ts +13 -0
  4553. package/dist/rendering/world/water/shaders/caustics.d.ts.map +1 -0
  4554. package/dist/rendering/world/water/shaders/caustics.js +103 -0
  4555. package/dist/rendering/world/water/shaders/caustics.js.map +1 -0
  4556. package/dist/rendering/world/water/shaders/gerstner.d.ts +9 -0
  4557. package/dist/rendering/world/water/shaders/gerstner.d.ts.map +1 -0
  4558. package/dist/rendering/world/water/shaders/gerstner.js +100 -0
  4559. package/dist/rendering/world/water/shaders/gerstner.js.map +1 -0
  4560. package/dist/rendering/world/water/shaders/water.d.ts +12 -0
  4561. package/dist/rendering/world/water/shaders/water.d.ts.map +1 -0
  4562. package/dist/rendering/world/water/shaders/water.js +112 -0
  4563. package/dist/rendering/world/water/shaders/water.js.map +1 -0
  4564. package/dist/scene/MathTypes.d.ts +30 -17
  4565. package/dist/scene/MathTypes.d.ts.map +1 -1
  4566. package/dist/scene/MathTypes.js +44 -0
  4567. package/dist/scene/MathTypes.js.map +1 -1
  4568. package/dist/workflows/AssetViewerWorkflow.js +1 -1
  4569. package/dist/workflows/AssetViewerWorkflow.js.map +1 -1
  4570. package/dist/workflows/WorkflowDiagnostics.d.ts +1 -1
  4571. package/dist/workflows/WorkflowDiagnostics.d.ts.map +1 -1
  4572. package/dist/workflows/WorkflowTypes.d.ts +1 -1
  4573. package/dist/workflows/WorkflowTypes.d.ts.map +1 -1
  4574. package/dist/workflows/production-runtime/ProductionExampleRuntime.d.ts.map +1 -1
  4575. package/dist/workflows/production-runtime/ProductionExampleRuntime.js +3 -3
  4576. package/dist/workflows/production-runtime/ProductionExampleRuntime.js.map +1 -1
  4577. package/package.json +159 -611
  4578. package/templates/cinematic-scene/.claude/CLAUDE.md +3 -0
  4579. package/templates/cinematic-scene/.github/workflows/aura3d-lookdev.yml +67 -0
  4580. package/templates/cinematic-scene/AGENTS.md +3 -0
  4581. package/templates/cinematic-scene/README.md +11 -2
  4582. package/templates/cinematic-scene/aura.assets.json +31 -0
  4583. package/templates/cinematic-scene/package.json +3 -2
  4584. package/templates/cinematic-scene/src/main.ts +46 -11
  4585. package/templates/cinematic-scene/tests/look-floor.ts +270 -0
  4586. package/templates/cinematic-scene/tests/route-health.spec.ts +31 -3
  4587. package/templates/cinematic-scene/tests/screenshot.spec.ts +34 -45
  4588. package/templates/mini-game/.claude/CLAUDE.md +3 -0
  4589. package/templates/mini-game/.github/workflows/aura3d-lookdev.yml +67 -0
  4590. package/templates/mini-game/AGENTS.md +3 -0
  4591. package/templates/mini-game/README.md +9 -6
  4592. package/templates/mini-game/aura.assets.json +196 -0
  4593. package/templates/mini-game/package.json +4 -3
  4594. package/templates/mini-game/public/aura-assets/kaykit-barbarian.glb +0 -0
  4595. package/templates/mini-game/public/aura-assets/kenneyPlatformerKitKey.2e930961.glb +0 -0
  4596. package/templates/mini-game/public/aura-assets/kenneyPlatformerKitStar.a102a1b9.glb +0 -0
  4597. package/templates/mini-game/public/aura-assets/quaternius-crate.glb +0 -0
  4598. package/templates/mini-game/public/aura-assets/quaternius-cube-crate.glb +0 -0
  4599. package/templates/mini-game/src/aura-assets.ts +141 -7
  4600. package/templates/mini-game/src/main.ts +209 -41
  4601. package/templates/mini-game/tests/certified-rig.spec.ts +40 -0
  4602. package/templates/mini-game/tests/look-floor.ts +270 -0
  4603. package/templates/mini-game/tests/playable.spec.ts +23 -2
  4604. package/templates/mini-game/tests/route-health.spec.ts +2 -2
  4605. package/templates/mini-game/tests/screenshot.spec.ts +44 -53
  4606. package/templates/product-viewer/.claude/CLAUDE.md +3 -0
  4607. package/templates/product-viewer/.github/workflows/aura3d-lookdev.yml +67 -0
  4608. package/templates/product-viewer/AGENTS.md +3 -0
  4609. package/templates/product-viewer/README.md +10 -8
  4610. package/templates/product-viewer/aura.assets.json +34 -0
  4611. package/templates/product-viewer/package.json +3 -2
  4612. package/templates/product-viewer/src/aura-assets.ts +1 -1
  4613. package/templates/product-viewer/src/main.ts +79 -13
  4614. package/templates/product-viewer/tests/look-floor.ts +270 -0
  4615. package/templates/product-viewer/tests/route-health.spec.ts +21 -3
  4616. package/templates/product-viewer/tests/screenshot.spec.ts +35 -41
  4617. package/templates/production-asset-inspector/package.json +1 -1
  4618. package/templates/production-material-studio/package.json +1 -1
  4619. package/templates/production-product-configurator/package.json +1 -1
  4620. package/templates/production-product-viewer/package.json +1 -1
  4621. package/dist/editor/index.d.ts +0 -2
  4622. package/dist/editor/index.d.ts.map +0 -1
  4623. package/dist/editor/index.js +0 -2
  4624. package/dist/editor/index.js.map +0 -1
  4625. package/dist/index.d.ts +0 -28
  4626. package/dist/index.js +0 -28
  4627. package/dist/lean/ArcadeRuntime.d.ts +0 -111
  4628. package/dist/lean/ArcadeRuntime.d.ts.map +0 -1
  4629. package/dist/lean/ArcadeRuntime.js +0 -219
  4630. package/dist/lean/ArcadeRuntime.js.map +0 -1
  4631. package/dist/lean/base.d.ts +0 -228
  4632. package/dist/lean/base.d.ts.map +0 -1
  4633. package/dist/lean/base.js +0 -322
  4634. package/dist/lean/base.js.map +0 -1
  4635. package/dist/lean/game.d.ts +0 -117
  4636. package/dist/lean/game.d.ts.map +0 -1
  4637. package/dist/lean/game.js +0 -229
  4638. package/dist/lean/game.js.map +0 -1
  4639. package/dist/lean/index.d.ts +0 -4
  4640. package/dist/lean/index.d.ts.map +0 -1
  4641. package/dist/lean/index.js +0 -10
  4642. package/dist/lean/index.js.map +0 -1
  4643. package/dist/lean/product.d.ts +0 -4
  4644. package/dist/lean/product.d.ts.map +0 -1
  4645. package/dist/lean/product.js +0 -55
  4646. package/dist/lean/product.js.map +0 -1
  4647. package/dist/materials/GameReadyMaterialLibrary.d.ts.map +0 -1
  4648. package/dist/materials/GameReadyMaterialLibrary.js +0 -253
  4649. package/dist/materials/GameReadyMaterialLibrary.js.map +0 -1
  4650. package/dist/materials/MaterialPreset.d.ts.map +0 -1
  4651. package/dist/materials/MaterialPreset.js.map +0 -1
  4652. package/dist/materials/MaterialPresets.d.ts.map +0 -1
  4653. package/dist/materials/MaterialPresets.js.map +0 -1
  4654. package/dist/materials/MaterialPreviewScene.d.ts.map +0 -1
  4655. package/dist/materials/MaterialPreviewScene.js.map +0 -1
  4656. package/dist/materials/MaterialValidation.d.ts.map +0 -1
  4657. package/dist/materials/MaterialValidation.js.map +0 -1
  4658. package/dist/materials/NodeMaterial.d.ts +0 -11
  4659. package/dist/materials/NodeMaterial.d.ts.map +0 -1
  4660. package/dist/materials/NodeMaterial.js +0 -15
  4661. package/dist/materials/NodeMaterial.js.map +0 -1
  4662. package/dist/materials/PBRMaterialLibrary.d.ts.map +0 -1
  4663. package/dist/materials/PBRMaterialLibrary.js.map +0 -1
  4664. package/dist/materials/TextureSet.d.ts.map +0 -1
  4665. package/dist/materials/TextureSet.js +0 -40
  4666. package/dist/materials/TextureSet.js.map +0 -1
  4667. package/dist/materials/browser-index.d.ts.map +0 -1
  4668. package/dist/materials/browser-index.js.map +0 -1
  4669. package/dist/materials/index.d.ts.map +0 -1
  4670. package/dist/materials/index.js.map +0 -1
  4671. package/dist/materials/node.d.ts.map +0 -1
  4672. package/dist/materials/node.js.map +0 -1
  4673. package/templates/mini-game/public/aura-assets/player-fixture.glb +0 -0
  4674. package/templates/mini-game/public/aura-assets/player.thumb.svg +0 -8
  4675. /package/dist/{materials → engine/devtools/materials}/GameReadyMaterialLibrary.d.ts +0 -0
  4676. /package/dist/{materials → engine/devtools/materials}/MaterialPreset.d.ts +0 -0
  4677. /package/dist/{materials → engine/devtools/materials}/MaterialPreset.js +0 -0
  4678. /package/dist/{materials → engine/devtools/materials}/MaterialPresets.d.ts +0 -0
  4679. /package/dist/{materials → engine/devtools/materials}/MaterialPresets.js +0 -0
  4680. /package/dist/{materials → engine/devtools/materials}/MaterialPreviewScene.d.ts +0 -0
  4681. /package/dist/{materials → engine/devtools/materials}/MaterialPreviewScene.js +0 -0
  4682. /package/dist/{materials → engine/devtools/materials}/MaterialValidation.d.ts +0 -0
  4683. /package/dist/{materials → engine/devtools/materials}/MaterialValidation.js +0 -0
  4684. /package/dist/{materials → engine/devtools/materials}/PBRMaterialLibrary.d.ts +0 -0
  4685. /package/dist/{materials → engine/devtools/materials}/PBRMaterialLibrary.js +0 -0
  4686. /package/dist/{materials → engine/devtools/materials}/TextureSet.d.ts +0 -0
  4687. /package/dist/{materials → engine/devtools/materials}/browser-index.d.ts +0 -0
  4688. /package/dist/{materials → engine/devtools/materials}/browser-index.js +0 -0
  4689. /package/dist/{materials → engine/devtools/materials}/index.d.ts +0 -0
  4690. /package/dist/{materials → engine/devtools/materials}/index.js +0 -0
  4691. /package/dist/{materials → engine/devtools/materials}/node.d.ts +0 -0
  4692. /package/dist/{materials → engine/devtools/materials}/node.js +0 -0
@@ -0,0 +1,4001 @@
1
+ import { RenderDeviceError, resolveGpuTargetOwner, spreadGpuTargetInventory, } from "./RenderDevice.js";
2
+ import { Texture, isCompressedTextureFormat, isFloatColorTextureFormat } from "./Texture.js";
3
+ import { isTextureBinding, TextureBinding } from "./TextureBinding.js";
4
+ import {} from "./VertexFormat.js";
5
+ import { WebGL2StateCache } from "./WebGL2StateCache.js";
6
+ import { BLOOM_BRIGHT_LUT_HEIGHT, BLOOM_BRIGHT_LUT_WIDTH, BLOOM_COMPOSITE_LUT_SIZE, OUTLINE_BLEND_LUT_WIDTH, OUTLINE_LIMB_RADIX, createOutlineBlendLut, createOutlineGradientBound, createBloomBrightThresholdLut, createBloomCompositeLut } from "./postprocess/NativeLdrEffectLuts.js";
7
+ import { normalizeBloomQualityPreset, resolveBloomPyramidBlurRadii, resolveBloomPyramidPlan, resolveBloomPyramidResponseGain, } from "./postprocess/NativeBloomPyramid.js";
8
+ const WEBGL_CUBE_FACES = ["px", "nx", "py", "ny", "pz", "nz"];
9
+ class WebGL2Buffer {
10
+ id;
11
+ usage;
12
+ byteLength;
13
+ target;
14
+ handle;
15
+ gl;
16
+ disposed = false;
17
+ constructor(id, usage, byteLength, target, handle, gl) {
18
+ this.id = id;
19
+ this.usage = usage;
20
+ this.byteLength = byteLength;
21
+ this.target = target;
22
+ this.handle = handle;
23
+ this.gl = gl;
24
+ }
25
+ dispose() {
26
+ if (!this.disposed) {
27
+ this.gl.deleteBuffer(this.handle);
28
+ this.disposed = true;
29
+ }
30
+ }
31
+ }
32
+ class WebGL2ShaderProgram {
33
+ id;
34
+ label;
35
+ marker;
36
+ reflection;
37
+ handle;
38
+ gl;
39
+ disposed = false;
40
+ constructor(id, label, marker, reflection, handle, gl) {
41
+ this.id = id;
42
+ this.label = label;
43
+ this.marker = marker;
44
+ this.reflection = reflection;
45
+ this.handle = handle;
46
+ this.gl = gl;
47
+ }
48
+ dispose() {
49
+ if (!this.disposed) {
50
+ this.gl.deleteProgram(this.handle);
51
+ this.disposed = true;
52
+ }
53
+ }
54
+ }
55
+ class WebGL2RenderTarget {
56
+ id;
57
+ width;
58
+ height;
59
+ label;
60
+ colorTexture;
61
+ depthTexture;
62
+ framebuffer;
63
+ colorHandle;
64
+ depthHandle;
65
+ depthTextureHandle;
66
+ sampleCount;
67
+ drawFramebuffer;
68
+ multisampleColorHandle;
69
+ gl;
70
+ disposed = false;
71
+ needsResolve = false;
72
+ constructor(id, width, height, label, colorTexture, depthTexture, framebuffer, colorHandle, depthHandle, depthTextureHandle, sampleCount, drawFramebuffer, multisampleColorHandle, gl) {
73
+ this.id = id;
74
+ this.width = width;
75
+ this.height = height;
76
+ this.label = label;
77
+ this.colorTexture = colorTexture;
78
+ this.depthTexture = depthTexture;
79
+ this.framebuffer = framebuffer;
80
+ this.colorHandle = colorHandle;
81
+ this.depthHandle = depthHandle;
82
+ this.depthTextureHandle = depthTextureHandle;
83
+ this.sampleCount = sampleCount;
84
+ this.drawFramebuffer = drawFramebuffer;
85
+ this.multisampleColorHandle = multisampleColorHandle;
86
+ this.gl = gl;
87
+ }
88
+ dispose() {
89
+ if (!this.disposed) {
90
+ this.gl.deleteFramebuffer(this.framebuffer);
91
+ if (this.drawFramebuffer !== this.framebuffer)
92
+ this.gl.deleteFramebuffer(this.drawFramebuffer);
93
+ this.gl.deleteTexture(this.colorHandle);
94
+ if (this.depthHandle)
95
+ this.gl.deleteRenderbuffer(this.depthHandle);
96
+ if (this.multisampleColorHandle)
97
+ this.gl.deleteRenderbuffer(this.multisampleColorHandle);
98
+ if (this.depthTextureHandle)
99
+ this.gl.deleteTexture(this.depthTextureHandle);
100
+ this.colorTexture.dispose();
101
+ this.depthTexture?.dispose();
102
+ this.disposed = true;
103
+ }
104
+ }
105
+ }
106
+ export class LeanWebGL2Device {
107
+ errorCheckMode;
108
+ kind = "webgl2";
109
+ info;
110
+ disposed = false;
111
+ contextLost = false;
112
+ gl;
113
+ nextId = 1;
114
+ drawCalls = 0;
115
+ buffers = new Set();
116
+ shaders = new Set();
117
+ renderTargets = new Set();
118
+ activeRenderTarget = null;
119
+ textures = new Map();
120
+ textureUploadModes = new Map();
121
+ fallbackTexture = null;
122
+ fallbackCubeTexture = null;
123
+ samplerObjectCache = new Map();
124
+ presentationProgram = null;
125
+ ldrPostprocessProgram = null;
126
+ bloomBrightExtractProgram = null;
127
+ bloomBlurProgram = null;
128
+ bloomCompositeProgram = null;
129
+ bloomDownsampleProgram = null;
130
+ bloomAccumulateProgram = null;
131
+ bloomPyramidResources = null;
132
+ outlineProgram = null;
133
+ ssaoProgram = null;
134
+ ssrProgram = null;
135
+ depthOfFieldProgram = null;
136
+ motionBlurProgram = null;
137
+ motionBlurVelocityTexture = null;
138
+ motionBlurVelocitySize = null;
139
+ taaProgram = null;
140
+ taaHistoryTexture = null;
141
+ taaHistorySize = null;
142
+ bloomPingPongResources = null;
143
+ bloomBrightLutTexture = null;
144
+ bloomBrightLutThreshold = null;
145
+ bloomCompositeLutTexture = null;
146
+ bloomCompositeLutIntensity = null;
147
+ bloomCompositeLutShoulder = null;
148
+ lastBloomDiagnostics = null;
149
+ outlineBlendLutTexture = null;
150
+ outlineBlendLutKey = null;
151
+ depthReadbackProgram = null;
152
+ uniformLocationCache = new WeakMap();
153
+ textureSamplerParameterCache = new WeakMap();
154
+ stateCache = new WebGL2StateCache({ label: "webgl2-device-state-cache" });
155
+ textureUnitBindings = new Map();
156
+ vertexArrayCache = new Map();
157
+ vertexFormatIds = new WeakMap();
158
+ presentationVertexArray = null;
159
+ activeTextureUnitIndex = -1;
160
+ shaderProgramCreateCount = 0;
161
+ uniformLocationLookupCount = 0;
162
+ bufferUpdateCount = 0;
163
+ textureBindCount = 0;
164
+ samplerParameterUploadCount = 0;
165
+ samplerAnisotropyUploadCount = 0;
166
+ vertexArrayCreateCount = 0;
167
+ nativeInstancedSubmissions = 0;
168
+ nextVertexFormatId = 1;
169
+ releasedTextureHandles = 0;
170
+ nativeEnvironmentBindings = 0;
171
+ nativeShadowMapBindings = 0;
172
+ shadowRenderTargetsAllocated = 0;
173
+ lastError = null;
174
+ frameActive = false;
175
+ viewportWidth = 0;
176
+ viewportHeight = 0;
177
+ maxVertexAttributes;
178
+ anisotropicFilteringExtension;
179
+ maxTextureAnisotropy;
180
+ /**
181
+ * WS-2.6 — subscribers for context loss and restoration.
182
+ *
183
+ * The device has tracked `contextLost` since before 1.6 and acted on it internally, but nothing
184
+ * could *observe* it: there was no callback, so a consumer could only poll `diagnostics()`. That is
185
+ * why the parity table listed context-loss recovery as a gap while the listeners existed — the
186
+ * device layer was never the gap, the absence of a public signal was.
187
+ */
188
+ deviceLostListeners = new Set();
189
+ deviceRestoredListeners = new Set();
190
+ contextLostListener;
191
+ contextRestoredListener;
192
+ canvas;
193
+ static create(options) {
194
+ const gl = options.canvas.getContext("webgl2", {
195
+ antialias: options.antialias ?? true,
196
+ alpha: options.alpha ?? false,
197
+ preserveDrawingBuffer: options.preserveDrawingBuffer ?? false
198
+ });
199
+ if (!gl) {
200
+ throw new RenderDeviceError("WebGL2 is not available for the provided canvas", "WEBGL2_UNAVAILABLE");
201
+ }
202
+ // Default to frame-level error checking.
203
+ //
204
+ // `strict` calls `gl.getError()` after every uniform upload, vertex-format
205
+ // bind, and draw. `gl.getError()` forces a synchronous CPU/GPU sync, so on a
206
+ // scene with a few dozen draws and many uniforms per draw it dominates frame
207
+ // time: profiling Aura Clash attributed ~93% of frame time to `getError`,
208
+ // holding the route at ~11 FPS on an Apple M4 Max. Frame-level checking still
209
+ // reports real WebGL errors (read once in `endFrame` and surfaced through
210
+ // `lastError`); callers that need per-operation attribution can still opt into
211
+ // `strict` explicitly.
212
+ return new LeanWebGL2Device(gl, options.canvas, options.errorCheckMode ?? "frame");
213
+ }
214
+ constructor(gl, canvas, errorCheckMode) {
215
+ this.errorCheckMode = errorCheckMode;
216
+ this.gl = gl;
217
+ // A browser returns the same WebGL2 context object after `webglcontextrestored`.
218
+ // The controller that owned it before the loss is disposed before a replacement
219
+ // device mounts, and Chromium can leave an INVALID_OPERATION from that stale
220
+ // resource teardown in the context's error queue. A fresh device must establish
221
+ // its own error boundary; otherwise its first valid uniform upload or presentation
222
+ // is blamed for an error produced by the previous owner.
223
+ for (let index = 0; index < 16 && gl.getError() !== gl.NO_ERROR; index += 1) {
224
+ // Drain only errors that predate this device. Normal frame/strict checks still
225
+ // report every error generated after construction.
226
+ }
227
+ this.maxVertexAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
228
+ this.anisotropicFilteringExtension = gl.getExtension("EXT_texture_filter_anisotropic");
229
+ this.maxTextureAnisotropy = this.anisotropicFilteringExtension
230
+ ? Math.max(1, gl.getParameter(this.anisotropicFilteringExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT))
231
+ : 1;
232
+ this.info = {
233
+ backend: "webgl2",
234
+ vendor: gl.getParameter(gl.VENDOR),
235
+ renderer: gl.getParameter(gl.RENDERER),
236
+ capabilities: [
237
+ "buffers",
238
+ "buffer-readback",
239
+ "shader-validation",
240
+ "render-targets",
241
+ "pixel-readback",
242
+ "postprocess-presentation",
243
+ "draw-validation",
244
+ "rasterization",
245
+ "depth-render-targets",
246
+ "depth-textures",
247
+ "spot-shadow-maps",
248
+ "point-shadow-maps",
249
+ "hdr-image-based-lighting",
250
+ ...(this.anisotropicFilteringExtension ? ["anisotropic-texture-filtering"] : []),
251
+ ...(gl.getExtension("EXT_color_buffer_float") ? ["hdr-render-targets", "float-readback"] : [])
252
+ ]
253
+ };
254
+ this.canvas = canvas;
255
+ if ("addEventListener" in canvas) {
256
+ this.contextLostListener = ((event) => {
257
+ event.preventDefault();
258
+ this.contextLost = true;
259
+ this.lastError = "CONTEXT_LOST";
260
+ this.frameActive = false;
261
+ // WS-2.6: notify subscribers. Errors in a listener must not prevent the others from running,
262
+ // nor leave the device in a half-notified state during an already-degraded condition.
263
+ for (const listener of [...this.deviceLostListeners]) {
264
+ try {
265
+ listener();
266
+ }
267
+ catch {
268
+ // A listener that throws is the listener's problem; the device stays consistent.
269
+ }
270
+ }
271
+ });
272
+ this.contextRestoredListener = (() => {
273
+ this.contextLost = false;
274
+ this.lastError = null;
275
+ for (const listener of [...this.deviceRestoredListeners]) {
276
+ try {
277
+ listener();
278
+ }
279
+ catch {
280
+ // As above.
281
+ }
282
+ }
283
+ });
284
+ canvas.addEventListener("webglcontextlost", this.contextLostListener);
285
+ canvas.addEventListener("webglcontextrestored", this.contextRestoredListener);
286
+ }
287
+ }
288
+ /**
289
+ * Subscribe to WebGL context loss. Returns an unsubscribe function.
290
+ *
291
+ * A lost context is not an error a caller can prevent — the browser reclaims GPU resources under
292
+ * memory pressure, on driver reset, or when a tab is backgrounded too long. What a caller can do is
293
+ * be told, so it can recreate resources rather than render nothing.
294
+ */
295
+ onDeviceLost(listener) {
296
+ this.deviceLostListeners.add(listener);
297
+ return () => this.deviceLostListeners.delete(listener);
298
+ }
299
+ /** Subscribe to context restoration. Returns an unsubscribe function. */
300
+ onDeviceRestored(listener) {
301
+ this.deviceRestoredListeners.add(listener);
302
+ return () => this.deviceRestoredListeners.delete(listener);
303
+ }
304
+ /** True while the WebGL context is lost. Polling alternative to {@link onDeviceLost}. */
305
+ isDeviceLost() {
306
+ return this.contextLost;
307
+ }
308
+ createBuffer(usage, byteLength, initialData) {
309
+ this.assertAlive();
310
+ if (byteLength <= 0 || !Number.isInteger(byteLength)) {
311
+ throw new RenderDeviceError("Buffer byteLength must be a positive integer", "INVALID_BUFFER_SIZE", { byteLength });
312
+ }
313
+ const handle = this.gl.createBuffer();
314
+ if (!handle) {
315
+ throw new RenderDeviceError("Failed to allocate WebGL buffer", "WEBGL_ALLOCATION_FAILED");
316
+ }
317
+ const target = usage === "index" ? this.gl.ELEMENT_ARRAY_BUFFER : this.gl.ARRAY_BUFFER;
318
+ this.bindNoVertexArray();
319
+ this.stateCache.bindBuffer(target, handle, () => this.gl.bindBuffer(target, handle));
320
+ this.gl.bufferData(target, byteLength, this.gl.DYNAMIC_DRAW);
321
+ if (initialData) {
322
+ if (initialData.byteLength > byteLength) {
323
+ throw new RenderDeviceError("Initial data exceeds buffer size", "BUFFER_OVERFLOW", {
324
+ byteLength,
325
+ dataByteLength: initialData.byteLength
326
+ });
327
+ }
328
+ this.gl.bufferSubData(target, 0, initialData);
329
+ }
330
+ const buffer = new WebGL2Buffer(this.nextId++, usage, byteLength, target, handle, this.gl);
331
+ this.buffers.add(buffer);
332
+ return buffer;
333
+ }
334
+ updateBuffer(buffer, byteOffset, data) {
335
+ this.assertAlive();
336
+ const webglBuffer = this.requireBuffer(buffer);
337
+ if (byteOffset < 0 || byteOffset + data.byteLength > webglBuffer.byteLength) {
338
+ throw new RenderDeviceError("Buffer update range is out of bounds", "BUFFER_RANGE_OUT_OF_BOUNDS", {
339
+ byteOffset,
340
+ dataByteLength: data.byteLength,
341
+ byteLength: webglBuffer.byteLength
342
+ });
343
+ }
344
+ this.bindNoVertexArray();
345
+ this.stateCache.bindBuffer(webglBuffer.target, webglBuffer.handle, () => this.gl.bindBuffer(webglBuffer.target, webglBuffer.handle));
346
+ this.gl.bufferSubData(webglBuffer.target, byteOffset, data);
347
+ this.bufferUpdateCount += 1;
348
+ }
349
+ readBuffer(buffer, byteOffset = 0, byteLength = buffer.byteLength - byteOffset) {
350
+ this.assertAlive();
351
+ const webglBuffer = this.requireBuffer(buffer);
352
+ if (byteOffset < 0 || byteLength < 0 || byteOffset + byteLength > webglBuffer.byteLength) {
353
+ throw new RenderDeviceError("Buffer read range is out of bounds", "BUFFER_RANGE_OUT_OF_BOUNDS", {
354
+ byteOffset,
355
+ byteLength,
356
+ bufferByteLength: webglBuffer.byteLength
357
+ });
358
+ }
359
+ const output = new Uint8Array(byteLength);
360
+ this.bindNoVertexArray();
361
+ this.stateCache.bindBuffer(webglBuffer.target, webglBuffer.handle, () => this.gl.bindBuffer(webglBuffer.target, webglBuffer.handle));
362
+ this.gl.getBufferSubData(webglBuffer.target, byteOffset, output);
363
+ return output;
364
+ }
365
+ createShaderProgram(sources) {
366
+ this.assertAlive();
367
+ if (!sources.vertex.includes(sources.marker) || !sources.fragment.includes(sources.marker)) {
368
+ throw new RenderDeviceError("Shader source marker is missing from compiled sources", "SHADER_MARKER_MISSING", {
369
+ label: sources.label,
370
+ marker: sources.marker
371
+ });
372
+ }
373
+ const vertexShader = this.compileShader(this.gl.VERTEX_SHADER, sources.vertex, sources.label);
374
+ const fragmentShader = this.compileShader(this.gl.FRAGMENT_SHADER, sources.fragment, sources.label);
375
+ const program = this.gl.createProgram();
376
+ if (!program) {
377
+ throw new RenderDeviceError("Failed to allocate WebGL shader program", "WEBGL_ALLOCATION_FAILED");
378
+ }
379
+ this.shaderProgramCreateCount += 1;
380
+ this.gl.attachShader(program, vertexShader);
381
+ this.gl.attachShader(program, fragmentShader);
382
+ this.gl.linkProgram(program);
383
+ this.gl.deleteShader(vertexShader);
384
+ this.gl.deleteShader(fragmentShader);
385
+ if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
386
+ const log = this.gl.getProgramInfoLog(program) ?? "Unknown shader link error";
387
+ this.gl.deleteProgram(program);
388
+ throw new RenderDeviceError("WebGL shader link failed", "SHADER_LINK_FAILED", { label: sources.label, log });
389
+ }
390
+ const shader = new WebGL2ShaderProgram(this.nextId++, sources.label, sources.marker, this.reflectProgram(program), program, this.gl);
391
+ this.shaders.add(shader);
392
+ return shader;
393
+ }
394
+ createRenderTarget(descriptor) {
395
+ this.assertAlive();
396
+ if (!Number.isInteger(descriptor.width) ||
397
+ descriptor.width <= 0 ||
398
+ !Number.isInteger(descriptor.height) ||
399
+ descriptor.height <= 0) {
400
+ throw new RenderDeviceError("Render target dimensions must be positive integers", "INVALID_RENDER_TARGET_SIZE", {
401
+ width: descriptor.width,
402
+ height: descriptor.height,
403
+ label: descriptor.label
404
+ });
405
+ }
406
+ const requestedSampleCount = descriptor.sampleCount ?? 1;
407
+ const maxSamples = Number(this.gl.getParameter(this.gl.MAX_SAMPLES) ?? 1);
408
+ if (!Number.isInteger(requestedSampleCount) || requestedSampleCount < 1 || requestedSampleCount > maxSamples) {
409
+ throw new RenderDeviceError("WebGL2 render-target sampleCount must be an integer supported by MAX_SAMPLES.", "INVALID_RENDER_TARGET_SAMPLE_COUNT", {
410
+ sampleCount: requestedSampleCount,
411
+ maxSamples,
412
+ label: descriptor.label
413
+ });
414
+ }
415
+ const sampleCount = requestedSampleCount;
416
+ const colorHandle = this.gl.createTexture();
417
+ const framebuffer = this.gl.createFramebuffer();
418
+ const drawFramebuffer = sampleCount > 1 ? this.gl.createFramebuffer() : framebuffer;
419
+ const multisampleColorHandle = sampleCount > 1 ? this.gl.createRenderbuffer() : null;
420
+ const depthMode = descriptor.depth === "texture" ? "texture" : descriptor.depth === false ? "none" : "renderbuffer";
421
+ const depthHandle = depthMode === "renderbuffer" ? this.gl.createRenderbuffer() : null;
422
+ const multisampleDepthHandle = sampleCount > 1 && depthMode !== "none"
423
+ ? (depthHandle ?? this.gl.createRenderbuffer())
424
+ : depthHandle;
425
+ const depthTextureHandle = depthMode === "texture" ? this.gl.createTexture() : null;
426
+ if (!colorHandle
427
+ || !framebuffer
428
+ || !drawFramebuffer
429
+ || (sampleCount > 1 && !multisampleColorHandle)
430
+ || ((depthMode === "renderbuffer" || (sampleCount > 1 && depthMode !== "none")) && !multisampleDepthHandle)
431
+ || (depthMode === "texture" && !depthTextureHandle)) {
432
+ if (colorHandle)
433
+ this.gl.deleteTexture(colorHandle);
434
+ if (framebuffer)
435
+ this.gl.deleteFramebuffer(framebuffer);
436
+ if (drawFramebuffer && drawFramebuffer !== framebuffer)
437
+ this.gl.deleteFramebuffer(drawFramebuffer);
438
+ if (multisampleColorHandle)
439
+ this.gl.deleteRenderbuffer(multisampleColorHandle);
440
+ if (multisampleDepthHandle)
441
+ this.gl.deleteRenderbuffer(multisampleDepthHandle);
442
+ if (depthTextureHandle)
443
+ this.gl.deleteTexture(depthTextureHandle);
444
+ throw new RenderDeviceError("Failed to allocate WebGL render target", "WEBGL_ALLOCATION_FAILED", {
445
+ width: descriptor.width,
446
+ height: descriptor.height,
447
+ label: descriptor.label
448
+ });
449
+ }
450
+ const previousActiveTexture = this.gl.getParameter(this.gl.ACTIVE_TEXTURE);
451
+ this.gl.activeTexture(this.gl.TEXTURE0);
452
+ const previousTexture = this.gl.getParameter(this.gl.TEXTURE_BINDING_2D);
453
+ const previousFramebuffer = this.gl.getParameter(this.gl.FRAMEBUFFER_BINDING);
454
+ const previousRenderbuffer = this.gl.getParameter(this.gl.RENDERBUFFER_BINDING);
455
+ this.gl.bindTexture(this.gl.TEXTURE_2D, colorHandle);
456
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR);
457
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);
458
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
459
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
460
+ const format = descriptor.format ?? "rgba8";
461
+ const textureFormat = this.resolveRenderTargetFormat(format);
462
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, textureFormat.internalFormat, descriptor.width, descriptor.height, 0, this.gl.RGBA, textureFormat.type, null);
463
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebuffer);
464
+ this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER, this.gl.COLOR_ATTACHMENT0, this.gl.TEXTURE_2D, colorHandle, 0);
465
+ if (depthHandle && sampleCount === 1) {
466
+ this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, depthHandle);
467
+ this.gl.renderbufferStorage(this.gl.RENDERBUFFER, this.gl.DEPTH_COMPONENT16, descriptor.width, descriptor.height);
468
+ this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER, this.gl.DEPTH_ATTACHMENT, this.gl.RENDERBUFFER, depthHandle);
469
+ }
470
+ if (depthTextureHandle) {
471
+ this.gl.bindTexture(this.gl.TEXTURE_2D, depthTextureHandle);
472
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
473
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
474
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
475
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
476
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.DEPTH_COMPONENT24, descriptor.width, descriptor.height, 0, this.gl.DEPTH_COMPONENT, this.gl.UNSIGNED_INT, null);
477
+ this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER, this.gl.DEPTH_ATTACHMENT, this.gl.TEXTURE_2D, depthTextureHandle, 0);
478
+ }
479
+ const resolveStatus = this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER);
480
+ let drawStatus = resolveStatus;
481
+ if (sampleCount > 1 && multisampleColorHandle) {
482
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, drawFramebuffer);
483
+ this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, multisampleColorHandle);
484
+ const multisampleColorFormat = format === "rgba8" ? this.gl.RGBA8 : textureFormat.internalFormat;
485
+ this.gl.renderbufferStorageMultisample(this.gl.RENDERBUFFER, sampleCount, multisampleColorFormat, descriptor.width, descriptor.height);
486
+ this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER, this.gl.COLOR_ATTACHMENT0, this.gl.RENDERBUFFER, multisampleColorHandle);
487
+ if (multisampleDepthHandle) {
488
+ this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, multisampleDepthHandle);
489
+ this.gl.renderbufferStorageMultisample(this.gl.RENDERBUFFER, sampleCount, this.gl.DEPTH_COMPONENT24, descriptor.width, descriptor.height);
490
+ this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER, this.gl.DEPTH_ATTACHMENT, this.gl.RENDERBUFFER, multisampleDepthHandle);
491
+ }
492
+ drawStatus = this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER);
493
+ }
494
+ this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, previousRenderbuffer);
495
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, previousFramebuffer);
496
+ this.gl.bindTexture(this.gl.TEXTURE_2D, previousTexture);
497
+ this.gl.activeTexture(previousActiveTexture);
498
+ this.stateCache.invalidate();
499
+ if (resolveStatus !== this.gl.FRAMEBUFFER_COMPLETE || drawStatus !== this.gl.FRAMEBUFFER_COMPLETE) {
500
+ this.gl.deleteTexture(colorHandle);
501
+ this.gl.deleteFramebuffer(framebuffer);
502
+ if (drawFramebuffer !== framebuffer)
503
+ this.gl.deleteFramebuffer(drawFramebuffer);
504
+ if (multisampleColorHandle)
505
+ this.gl.deleteRenderbuffer(multisampleColorHandle);
506
+ if (multisampleDepthHandle)
507
+ this.gl.deleteRenderbuffer(multisampleDepthHandle);
508
+ if (depthTextureHandle)
509
+ this.gl.deleteTexture(depthTextureHandle);
510
+ throw new RenderDeviceError("WebGL render target framebuffer status is invalid", "FRAMEBUFFER_INVALID", { resolveStatus, drawStatus });
511
+ }
512
+ const depthTexture = depthTextureHandle
513
+ ? new Texture({ width: descriptor.width, height: descriptor.height, format: "depth24", label: `${descriptor.label ?? "render-target"}-depth` })
514
+ : undefined;
515
+ const target = new WebGL2RenderTarget(this.nextId++, descriptor.width, descriptor.height, descriptor.label ?? "render-target", new Texture({ width: descriptor.width, height: descriptor.height, format, label: descriptor.label ?? "render-target-color" }), depthTexture, framebuffer, colorHandle, multisampleDepthHandle, depthTextureHandle, sampleCount, drawFramebuffer, multisampleColorHandle, this.gl);
516
+ this.renderTargets.add(target);
517
+ // Shadow passes label their depth target after the shadow map texture, so the
518
+ // label is the device-side signal that a shadow depth target was allocated.
519
+ if ((descriptor.label ?? "").toLowerCase().includes("shadow"))
520
+ this.shadowRenderTargetsAllocated += 1;
521
+ this.textures.set(target.colorTexture, colorHandle);
522
+ this.textureUploadModes.set(target.colorTexture, "rgba8");
523
+ if (depthTexture && depthTextureHandle) {
524
+ this.textures.set(depthTexture, depthTextureHandle);
525
+ this.textureUploadModes.set(depthTexture, "depth-render-target");
526
+ }
527
+ return target;
528
+ }
529
+ setRenderTarget(target) {
530
+ this.assertAlive();
531
+ if (this.activeRenderTarget && this.activeRenderTarget !== target) {
532
+ this.resolveMultisampleTarget(this.activeRenderTarget);
533
+ }
534
+ if (target === null) {
535
+ this.activeRenderTarget = null;
536
+ this.stateCache.bindFramebuffer(this.gl.FRAMEBUFFER, null, () => this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, null));
537
+ this.stateCache.viewport(0, 0, this.viewportWidth || this.gl.drawingBufferWidth, this.viewportHeight || this.gl.drawingBufferHeight, () => this.gl.viewport(0, 0, this.viewportWidth || this.gl.drawingBufferWidth, this.viewportHeight || this.gl.drawingBufferHeight));
538
+ return;
539
+ }
540
+ if (!(target instanceof WebGL2RenderTarget) || !this.renderTargets.has(target) || target.disposed) {
541
+ throw new RenderDeviceError("Render target is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
542
+ targetId: target.id
543
+ });
544
+ }
545
+ this.activeRenderTarget = target;
546
+ this.stateCache.bindFramebuffer(this.gl.FRAMEBUFFER, target.drawFramebuffer, () => this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, target.drawFramebuffer));
547
+ this.stateCache.viewport(0, 0, target.width, target.height, () => this.gl.viewport(0, 0, target.width, target.height));
548
+ }
549
+ resolveMultisampleTarget(target) {
550
+ if (target.sampleCount <= 1 || !target.needsResolve)
551
+ return;
552
+ const previousFramebuffer = this.gl.getParameter(this.gl.FRAMEBUFFER_BINDING);
553
+ this.gl.bindFramebuffer(this.gl.READ_FRAMEBUFFER, target.drawFramebuffer);
554
+ this.gl.bindFramebuffer(this.gl.DRAW_FRAMEBUFFER, target.framebuffer);
555
+ let mask = this.gl.COLOR_BUFFER_BIT;
556
+ if (target.depthTextureHandle)
557
+ mask |= this.gl.DEPTH_BUFFER_BIT;
558
+ this.gl.blitFramebuffer(0, 0, target.width, target.height, 0, 0, target.width, target.height, mask, this.gl.NEAREST);
559
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, previousFramebuffer);
560
+ target.needsResolve = false;
561
+ this.stateCache.invalidate();
562
+ }
563
+ writeRenderTargetPixels(target, pixels) {
564
+ this.assertAlive();
565
+ if (!(target instanceof WebGL2RenderTarget) || !this.renderTargets.has(target) || target.disposed) {
566
+ throw new RenderDeviceError("Render target is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
567
+ targetId: target.id
568
+ });
569
+ }
570
+ if (target.colorTexture.format !== "rgba8") {
571
+ throw new RenderDeviceError("Byte pixel uploads are only supported for rgba8 WebGL2 render targets", "INVALID_PIXEL_UPLOAD_FORMAT", {
572
+ targetId: target.id,
573
+ format: target.colorTexture.format
574
+ });
575
+ }
576
+ if (pixels.length !== target.width * target.height * 4) {
577
+ throw new RenderDeviceError("Render-target pixel upload must contain width * height * 4 bytes", "INVALID_PIXEL_UPLOAD_SIZE", {
578
+ targetId: target.id,
579
+ byteLength: pixels.length,
580
+ expectedByteLength: target.width * target.height * 4
581
+ });
582
+ }
583
+ const textureUnit0 = this.captureTextureUnit0();
584
+ try {
585
+ this.gl.bindTexture(this.gl.TEXTURE_2D, target.colorHandle);
586
+ this.gl.texSubImage2D(this.gl.TEXTURE_2D, 0, 0, 0, target.width, target.height, this.gl.RGBA, this.gl.UNSIGNED_BYTE, pixels);
587
+ target.needsResolve = false;
588
+ }
589
+ finally {
590
+ this.restoreTextureUnit0(textureUnit0);
591
+ }
592
+ this.lastError = this.readError();
593
+ if (this.lastError) {
594
+ throw new RenderDeviceError("WebGL2 render-target pixel upload failed", "WEBGL_PIXEL_UPLOAD_FAILED", {
595
+ targetId: target.id,
596
+ error: this.lastError
597
+ });
598
+ }
599
+ }
600
+ presentRenderTarget(source) {
601
+ this.assertAlive();
602
+ if (!(source instanceof WebGL2RenderTarget) || !this.renderTargets.has(source) || source.disposed) {
603
+ throw new RenderDeviceError("Render target is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
604
+ targetId: source.id
605
+ });
606
+ }
607
+ this.resolveMultisampleTarget(source);
608
+ const outputWidth = this.viewportWidth || this.gl.drawingBufferWidth;
609
+ const outputHeight = this.viewportHeight || this.gl.drawingBufferHeight;
610
+ this.drawRenderTargetToBackbuffer(source, outputWidth, outputHeight);
611
+ this.activeRenderTarget = null;
612
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, null);
613
+ this.lastError = this.readError();
614
+ if (this.lastError) {
615
+ throw new RenderDeviceError(`WebGL2 render-target presentation failed: ${this.lastError}`, "WEBGL_PRESENT_FAILED", {
616
+ targetId: source.id,
617
+ error: this.lastError
618
+ });
619
+ }
620
+ }
621
+ presentLdrPostprocess(source, options) {
622
+ this.assertAlive();
623
+ if (!(source instanceof WebGL2RenderTarget) || !this.renderTargets.has(source) || source.disposed) {
624
+ throw new RenderDeviceError("Render target is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
625
+ targetId: source.id
626
+ });
627
+ }
628
+ this.resolveMultisampleTarget(source);
629
+ const tonePass = options.passes.find((pass) => pass.name === "tone-mapping");
630
+ const bloomPass = options.passes.find((pass) => pass.name === "bloom");
631
+ const depthOfFieldPass = options.passes.find((pass) => pass.name === "depth-of-field");
632
+ const motionBlurPass = options.passes.find((pass) => pass.name === "motion-blur");
633
+ const ssaoPass = options.passes.find((pass) => pass.name === "ssao");
634
+ const ssrPass = options.passes.find((pass) => pass.name === "ssr");
635
+ const taaPass = options.passes.find((pass) => pass.name === "taa");
636
+ const outlinePass = options.passes.find((pass) => pass.name === "outline");
637
+ if (source.colorTexture.format !== "rgba8" && !tonePass) {
638
+ throw new RenderDeviceError("WebGL2 HDR postprocess presentation requires a tone-mapping pass before LDR output.", "WEBGL_LDR_POSTPROCESS_FORMAT_UNSUPPORTED", {
639
+ targetId: source.id,
640
+ format: source.colorTexture.format
641
+ });
642
+ }
643
+ if (source.colorTexture.format !== "rgba8" && (depthOfFieldPass || motionBlurPass || ssaoPass || ssrPass || taaPass || outlinePass) && !tonePass) {
644
+ throw new RenderDeviceError("WebGL2 byte-kernel postprocess requires rgba8 input or a preceding tone-mapping pass.", "WEBGL_LDR_POSTPROCESS_FORMAT_UNSUPPORTED", {
645
+ targetId: source.id,
646
+ format: source.colorTexture.format,
647
+ pass: depthOfFieldPass ? "depth-of-field" : motionBlurPass ? "motion-blur" : ssaoPass ? "ssao" : ssrPass ? "ssr" : taaPass ? "taa" : "outline"
648
+ });
649
+ }
650
+ if ((depthOfFieldPass || ssaoPass || ssrPass) && !source.depthTextureHandle) {
651
+ throw new RenderDeviceError("WebGL2 native depth postprocess requires a renderer-owned sampleable depth texture.", "WEBGL_LDR_POSTPROCESS_DEPTH_REQUIRED", {
652
+ targetId: source.id,
653
+ pass: depthOfFieldPass ? "depth-of-field" : ssaoPass ? "ssao" : "ssr"
654
+ });
655
+ }
656
+ // Raw GL depth is nonlinear (0.1/1000 defaults park the play area past
657
+ // 0.97), which blinded every depth-gated native pass. SSR and DOF compare
658
+ // linearized depth; SSAO keeps its legacy response (documented partial).
659
+ const depthRange = normalizeLdrDepthRange(options.depthRange);
660
+ const outputTarget = options.outputTarget;
661
+ if (outputTarget && (!(outputTarget instanceof WebGL2RenderTarget) || !this.renderTargets.has(outputTarget) || outputTarget.disposed)) {
662
+ throw new RenderDeviceError("Output render target is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
663
+ targetId: outputTarget.id
664
+ });
665
+ }
666
+ if (outputTarget && outputTarget.colorTexture.format !== "rgba8") {
667
+ throw new RenderDeviceError("WebGL2 LDR postprocess output target must be rgba8.", "WEBGL_LDR_POSTPROCESS_OUTPUT_FORMAT_UNSUPPORTED", {
668
+ targetId: outputTarget.id,
669
+ format: outputTarget.colorTexture.format
670
+ });
671
+ }
672
+ if (outputTarget && (outputTarget.width !== source.width || outputTarget.height !== source.height)) {
673
+ throw new RenderDeviceError("WebGL2 LDR postprocess source and output dimensions must match.", "WEBGL_LDR_POSTPROCESS_SIZE_MISMATCH", {
674
+ sourceWidth: source.width,
675
+ sourceHeight: source.height,
676
+ targetWidth: outputTarget.width,
677
+ targetHeight: outputTarget.height
678
+ });
679
+ }
680
+ const webglOutputTarget = outputTarget;
681
+ const colorPass = options.passes.find((pass) => pass.name === "color-grade");
682
+ const fxaaPass = options.passes.find((pass) => pass.name === "fxaa");
683
+ const bloomOptions = bloomPass ? normalizeNativeBloomOptions(bloomPass.options) : undefined;
684
+ const depthOfFieldOptions = depthOfFieldPass ? normalizeNativeDepthOfFieldOptions(depthOfFieldPass.options) : undefined;
685
+ const motionBlurOptions = motionBlurPass
686
+ ? normalizeNativeMotionBlurOptions(motionBlurPass.options, source.width, source.height)
687
+ : undefined;
688
+ const ssaoOptions = ssaoPass ? normalizeNativeSsaoOptions(ssaoPass.options) : undefined;
689
+ const ssrOptions = ssrPass ? normalizeNativeSsrOptions(ssrPass.options) : undefined;
690
+ const taaOptions = taaPass ? normalizeNativeTaaOptions(taaPass.options, source.width, source.height) : undefined;
691
+ const outlineOptions = outlinePass ? normalizeNativeOutlineOptions(outlinePass.options) : undefined;
692
+ const program = this.ensureLdrPostprocessProgram();
693
+ const vertexArray = this.ensurePresentationVertexArray();
694
+ const sourceIsHdr = source.colorTexture.format !== "rgba8";
695
+ const bloomResources = bloomOptions || depthOfFieldOptions || motionBlurOptions || ssaoOptions || ssrOptions || taaOptions || outlineOptions
696
+ ? this.ensureBloomPingPongResources(source.width, source.height, sourceIsHdr && Boolean(bloomOptions))
697
+ : undefined;
698
+ if (bloomOptions && !sourceIsHdr) {
699
+ this.ensureBloomLutTextures(bloomOptions);
700
+ }
701
+ if (outlineOptions) {
702
+ this.ensureOutlineBlendLutTexture(outlineOptions);
703
+ }
704
+ if (motionBlurOptions) {
705
+ this.ensureMotionBlurVelocityTexture(source.width, source.height, motionBlurOptions.velocity);
706
+ }
707
+ if (taaOptions) {
708
+ this.ensureTaaHistoryTexture(source.width, source.height, taaOptions.history);
709
+ }
710
+ const outputWidth = webglOutputTarget?.width ?? (this.viewportWidth || this.gl.drawingBufferWidth);
711
+ const outputHeight = webglOutputTarget?.height ?? (this.viewportHeight || this.gl.drawingBufferHeight);
712
+ const previousState = this.prepareFullscreenPresentation(webglOutputTarget?.framebuffer ?? null, outputWidth, outputHeight);
713
+ try {
714
+ let ldrSourceHandle = source.colorHandle;
715
+ let temporarySourceIndex = -1;
716
+ if (bloomOptions && bloomResources) {
717
+ if (bloomOptions.quality === "performance") {
718
+ ldrSourceHandle = this.executeNativeBloomPasses(ldrSourceHandle, bloomResources, bloomOptions, vertexArray, sourceIsHdr);
719
+ temporarySourceIndex = 1;
720
+ this.recordBloomDiagnostics(bloomOptions, source.width, source.height, sourceIsHdr, 1);
721
+ }
722
+ else {
723
+ const plan = resolveBloomPyramidPlan(source.width, source.height, bloomOptions.quality, sourceIsHdr);
724
+ const pyramid = this.ensureBloomPyramidResources(plan, sourceIsHdr);
725
+ const pyramidResult = this.executeNativeBloomPyramidPasses(ldrSourceHandle, source.width, source.height, pyramid, {
726
+ textureA: bloomResources.textures[0],
727
+ framebufferA: bloomResources.framebuffers[0],
728
+ textureB: bloomResources.textures[1],
729
+ framebufferB: bloomResources.framebuffers[1]
730
+ }, bloomOptions, vertexArray, sourceIsHdr);
731
+ // The pyramid sum lands in ping-pong texture A; composite it with the
732
+ // source through the proven single-scale composite program.
733
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, bloomResources.framebuffers[1]);
734
+ this.gl.viewport(0, 0, source.width, source.height);
735
+ const pyramidComposite = this.ensureBloomCompositeProgram();
736
+ this.gl.useProgram(pyramidComposite);
737
+ this.gl.bindVertexArray(vertexArray);
738
+ this.bindFullscreenTexture(0, ldrSourceHandle);
739
+ this.bindFullscreenTexture(1, pyramidResult);
740
+ if (this.bloomCompositeLutTexture)
741
+ this.bindFullscreenTexture(2, this.bloomCompositeLutTexture);
742
+ this.gl.uniform1i(this.gl.getUniformLocation(pyramidComposite, "u_source"), 0);
743
+ this.gl.uniform1i(this.gl.getUniformLocation(pyramidComposite, "u_blurred"), 1);
744
+ this.gl.uniform1i(this.gl.getUniformLocation(pyramidComposite, "u_compositeLut"), 2);
745
+ this.gl.uniform1i(this.gl.getUniformLocation(pyramidComposite, "u_hdr"), sourceIsHdr ? 1 : 0);
746
+ this.gl.uniform1f(this.gl.getUniformLocation(pyramidComposite, "u_intensity"), bloomOptions.intensity * resolveBloomPyramidResponseGain(plan));
747
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
748
+ ldrSourceHandle = bloomResources.textures[1];
749
+ // The composited result lives in texture B, so subsequent passes
750
+ // must write texture A (index 0) to avoid sampling a bound target.
751
+ temporarySourceIndex = 0;
752
+ this.recordBloomDiagnostics(bloomOptions, source.width, source.height, sourceIsHdr, plan.mipCount);
753
+ }
754
+ }
755
+ if ((depthOfFieldOptions || motionBlurOptions || ssaoOptions || ssrOptions || taaOptions || outlineOptions) && bloomResources) {
756
+ if (tonePass || colorPass) {
757
+ const baseTargetIndex = 0;
758
+ this.drawNativeLdrStage(ldrSourceHandle, bloomResources.framebuffers[baseTargetIndex], source.width, source.height, program, vertexArray, tonePass, colorPass, undefined, options.toneMappingDefaults);
759
+ ldrSourceHandle = bloomResources.textures[baseTargetIndex];
760
+ temporarySourceIndex = baseTargetIndex;
761
+ }
762
+ if (depthOfFieldOptions && source.depthTextureHandle) {
763
+ const depthOfFieldTargetIndex = temporarySourceIndex === 0 ? 1 : 0;
764
+ ldrSourceHandle = this.executeNativeDepthOfFieldPass(ldrSourceHandle, source.depthTextureHandle, bloomResources, depthOfFieldOptions, vertexArray, depthOfFieldTargetIndex, depthRange);
765
+ temporarySourceIndex = depthOfFieldTargetIndex;
766
+ }
767
+ if (motionBlurOptions) {
768
+ const motionBlurTargetIndex = temporarySourceIndex === 0 ? 1 : 0;
769
+ ldrSourceHandle = this.executeNativeMotionBlurPass(ldrSourceHandle, bloomResources, motionBlurOptions, vertexArray, motionBlurTargetIndex);
770
+ temporarySourceIndex = motionBlurTargetIndex;
771
+ }
772
+ if (ssaoOptions && source.depthTextureHandle) {
773
+ const ssaoTargetIndex = temporarySourceIndex === 0 ? 1 : 0;
774
+ ldrSourceHandle = this.executeNativeSsaoPass(ldrSourceHandle, source.depthTextureHandle, bloomResources, ssaoOptions, vertexArray, ssaoTargetIndex);
775
+ temporarySourceIndex = ssaoTargetIndex;
776
+ }
777
+ if (ssrOptions && source.depthTextureHandle) {
778
+ const ssrTargetIndex = temporarySourceIndex === 0 ? 1 : 0;
779
+ ldrSourceHandle = this.executeNativeSsrPass(ldrSourceHandle, source.depthTextureHandle, bloomResources, ssrOptions, vertexArray, ssrTargetIndex, depthRange);
780
+ temporarySourceIndex = ssrTargetIndex;
781
+ }
782
+ if (taaOptions) {
783
+ const taaTargetIndex = temporarySourceIndex === 0 ? 1 : 0;
784
+ ldrSourceHandle = this.executeNativeTaaPass(ldrSourceHandle, bloomResources, taaOptions, vertexArray, taaTargetIndex);
785
+ temporarySourceIndex = taaTargetIndex;
786
+ }
787
+ }
788
+ if (outlineOptions && bloomResources) {
789
+ const outlineTargetIndex = temporarySourceIndex === 0 ? 1 : 0;
790
+ ldrSourceHandle = this.executeNativeOutlinePasses(ldrSourceHandle, bloomResources, outlineOptions, vertexArray, outlineTargetIndex);
791
+ temporarySourceIndex = outlineTargetIndex;
792
+ }
793
+ this.drawNativeLdrStage(ldrSourceHandle, webglOutputTarget?.framebuffer ?? null, outputWidth, outputHeight, program, vertexArray, depthOfFieldOptions || motionBlurOptions || ssaoOptions || ssrOptions || taaOptions || outlineOptions ? undefined : tonePass, depthOfFieldOptions || motionBlurOptions || ssaoOptions || ssrOptions || taaOptions || outlineOptions ? undefined : colorPass, fxaaPass, options.toneMappingDefaults);
794
+ this.gl.flush();
795
+ }
796
+ finally {
797
+ this.restoreFullscreenPresentationState(previousState, outputWidth, outputHeight);
798
+ }
799
+ this.lastError = this.readError();
800
+ if (this.lastError) {
801
+ throw new RenderDeviceError(`WebGL2 LDR postprocess presentation failed: ${this.lastError}`, "WEBGL_LDR_POSTPROCESS_FAILED", {
802
+ targetId: source.id,
803
+ error: this.lastError
804
+ });
805
+ }
806
+ this.setRenderTarget(webglOutputTarget ?? null);
807
+ }
808
+ readPixels(x, y, width, height) {
809
+ this.assertAlive();
810
+ if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
811
+ throw new RenderDeviceError("Readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
812
+ }
813
+ const boundsWidth = this.activeRenderTarget?.width ?? this.gl.drawingBufferWidth;
814
+ const boundsHeight = this.activeRenderTarget?.height ?? this.gl.drawingBufferHeight;
815
+ if (x + width > boundsWidth || y + height > boundsHeight) {
816
+ throw new RenderDeviceError("Readback rectangle exceeds framebuffer bounds", "READBACK_OUT_OF_BOUNDS", {
817
+ x,
818
+ y,
819
+ width,
820
+ height,
821
+ boundsWidth,
822
+ boundsHeight
823
+ });
824
+ }
825
+ const readTarget = this.activeRenderTarget;
826
+ if (readTarget) {
827
+ this.resolveMultisampleTarget(readTarget);
828
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, readTarget.framebuffer);
829
+ }
830
+ const pixels = new Uint8Array(width * height * 4);
831
+ this.gl.readPixels(x, y, width, height, this.gl.RGBA, this.gl.UNSIGNED_BYTE, pixels);
832
+ if (readTarget && readTarget.sampleCount > 1) {
833
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, readTarget.drawFramebuffer);
834
+ this.stateCache.invalidate();
835
+ }
836
+ return pixels;
837
+ }
838
+ readFloatPixels(x, y, width, height) {
839
+ this.assertAlive();
840
+ if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
841
+ throw new RenderDeviceError("Float readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
842
+ }
843
+ const boundsWidth = this.activeRenderTarget?.width ?? this.gl.drawingBufferWidth;
844
+ const boundsHeight = this.activeRenderTarget?.height ?? this.gl.drawingBufferHeight;
845
+ if (x + width > boundsWidth || y + height > boundsHeight) {
846
+ throw new RenderDeviceError("Float readback rectangle exceeds framebuffer bounds", "READBACK_OUT_OF_BOUNDS", {
847
+ x,
848
+ y,
849
+ width,
850
+ height,
851
+ boundsWidth,
852
+ boundsHeight
853
+ });
854
+ }
855
+ const readTarget = this.activeRenderTarget;
856
+ if (readTarget) {
857
+ this.resolveMultisampleTarget(readTarget);
858
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, readTarget.framebuffer);
859
+ }
860
+ const pixels = new Float32Array(width * height * 4);
861
+ this.gl.readPixels(x, y, width, height, this.gl.RGBA, this.gl.FLOAT, pixels);
862
+ if (readTarget && readTarget.sampleCount > 1) {
863
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, readTarget.drawFramebuffer);
864
+ this.stateCache.invalidate();
865
+ }
866
+ return pixels;
867
+ }
868
+ readDepthPixels(x, y, width, height) {
869
+ this.assertAlive();
870
+ if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
871
+ throw new RenderDeviceError("Depth readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
872
+ }
873
+ const target = this.activeRenderTarget;
874
+ if (!target?.depthTextureHandle) {
875
+ throw new RenderDeviceError("Depth readback requires an active WebGL2 render target with a sampleable depth texture.", "DEPTH_READBACK_UNAVAILABLE", {
876
+ renderTarget: target?.label ?? null
877
+ });
878
+ }
879
+ if (x + width > target.width || y + height > target.height) {
880
+ throw new RenderDeviceError("Depth readback rectangle exceeds framebuffer bounds", "READBACK_OUT_OF_BOUNDS", {
881
+ x,
882
+ y,
883
+ width,
884
+ height,
885
+ boundsWidth: target.width,
886
+ boundsHeight: target.height
887
+ });
888
+ }
889
+ this.resolveMultisampleTarget(target);
890
+ const encoded = this.copyDepthTextureToBytes(target, x, y, width, height);
891
+ const pixels = new Float32Array(width * height);
892
+ for (let index = 0; index < pixels.length; index += 1) {
893
+ const byteIndex = index * 4;
894
+ const r = encoded[byteIndex] ?? 255;
895
+ const g = encoded[byteIndex + 1] ?? 255;
896
+ const b = encoded[byteIndex + 2] ?? 255;
897
+ pixels[index] = Math.max(0, Math.min(1, r / 255 + g / 65025 + b / 16581375));
898
+ }
899
+ return pixels;
900
+ }
901
+ beginFrame(width, height) {
902
+ this.assertAlive();
903
+ if (this.frameActive) {
904
+ throw new RenderDeviceError("Frame is already active", "FRAME_ALREADY_ACTIVE");
905
+ }
906
+ if (width <= 0 || height <= 0) {
907
+ throw new RenderDeviceError("Frame dimensions must be positive", "INVALID_FRAME_SIZE", { width, height });
908
+ }
909
+ this.frameActive = true;
910
+ this.drawCalls = 0;
911
+ this.nativeEnvironmentBindings = 0;
912
+ this.nativeShadowMapBindings = 0;
913
+ this.activeTextureUnitIndex = -1;
914
+ this.textureUnitBindings.clear();
915
+ this.stateCache.invalidate();
916
+ this.viewportWidth = width;
917
+ this.viewportHeight = height;
918
+ this.stateCache.bindFramebuffer(this.gl.FRAMEBUFFER, this.activeRenderTarget?.framebuffer ?? null, () => this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, this.activeRenderTarget?.framebuffer ?? null));
919
+ this.stateCache.viewport(0, 0, width, height, () => this.gl.viewport(0, 0, width, height));
920
+ this.stateCache.setEnabled(this.gl.DEPTH_TEST, true, () => this.gl.enable(this.gl.DEPTH_TEST));
921
+ this.stateCache.depthFunc(this.gl.LEQUAL, () => this.gl.depthFunc(this.gl.LEQUAL));
922
+ }
923
+ clear(color) {
924
+ this.assertFrame();
925
+ this.gl.clearColor(color[0], color[1], color[2], color[3]);
926
+ this.stateCache.depthMask(true, () => this.gl.depthMask(true));
927
+ this.gl.clearDepth(1);
928
+ this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);
929
+ if (this.activeRenderTarget?.sampleCount && this.activeRenderTarget.sampleCount > 1)
930
+ this.activeRenderTarget.needsResolve = true;
931
+ }
932
+ clearRenderTarget(color) {
933
+ this.assertFrame();
934
+ this.gl.clearColor(color[0], color[1], color[2], color[3]);
935
+ this.stateCache.depthMask(true, () => this.gl.depthMask(true));
936
+ this.gl.clearDepth(1);
937
+ this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);
938
+ if (this.activeRenderTarget?.sampleCount && this.activeRenderTarget.sampleCount > 1)
939
+ this.activeRenderTarget.needsResolve = true;
940
+ }
941
+ draw(command) {
942
+ this.assertFrame();
943
+ const vertexBuffer = this.requireBuffer(command.vertexBuffer);
944
+ this.applyRenderState(command.renderState);
945
+ let shader;
946
+ if (command.shader) {
947
+ const activeShader = this.requireShader(command.shader);
948
+ shader = activeShader;
949
+ this.stateCache.useProgram(activeShader.handle, () => this.gl.useProgram(activeShader.handle));
950
+ if (command.uniforms) {
951
+ this.uploadUniforms(activeShader, command.uniforms);
952
+ if (this.errorCheckMode === "strict") {
953
+ const uniformError = this.readError();
954
+ if (uniformError) {
955
+ throw new RenderDeviceError(`WebGL2 uniform upload failed for draw ${command.label ?? "unnamed"}: ${uniformError}`, "WEBGL_DRAW_FAILED", {
956
+ label: command.label,
957
+ stage: "uniforms",
958
+ error: uniformError
959
+ });
960
+ }
961
+ }
962
+ }
963
+ }
964
+ if (shader && command.vertexFormat) {
965
+ this.bindVertexArrayForCommand(command, shader, vertexBuffer);
966
+ if (this.errorCheckMode === "strict") {
967
+ const vertexFormatError = this.readError();
968
+ if (vertexFormatError) {
969
+ throw new RenderDeviceError(`WebGL2 vertex format binding failed for draw ${command.label ?? "unnamed"}: ${vertexFormatError}`, "WEBGL_DRAW_FAILED", {
970
+ label: command.label,
971
+ stage: "vertex-format",
972
+ error: vertexFormatError
973
+ });
974
+ }
975
+ }
976
+ }
977
+ else {
978
+ this.bindNoVertexArray();
979
+ this.stateCache.bindBuffer(this.gl.ARRAY_BUFFER, vertexBuffer.handle, () => this.gl.bindBuffer(this.gl.ARRAY_BUFFER, vertexBuffer.handle));
980
+ }
981
+ if (command.indexBuffer) {
982
+ const indexBuffer = this.requireBuffer(command.indexBuffer);
983
+ if (!shader || !command.vertexFormat) {
984
+ this.stateCache.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, indexBuffer.handle, () => this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, indexBuffer.handle));
985
+ }
986
+ const type = command.indexType === "uint32" ? this.gl.UNSIGNED_INT : this.gl.UNSIGNED_SHORT;
987
+ const indexByteSize = command.indexType === "uint32" ? 4 : 2;
988
+ const indexOffset = (command.firstIndex ?? 0) * indexByteSize;
989
+ if ((command.instanceCount ?? 1) > 1) {
990
+ this.gl.drawElementsInstanced(this.primitive(command.topology), command.indexCount ?? 0, type, indexOffset, command.instanceCount ?? 1);
991
+ this.nativeInstancedSubmissions += 1;
992
+ }
993
+ else {
994
+ this.gl.drawElements(this.primitive(command.topology), command.indexCount ?? 0, type, indexOffset);
995
+ }
996
+ }
997
+ else {
998
+ if ((command.instanceCount ?? 1) > 1) {
999
+ this.gl.drawArraysInstanced(this.primitive(command.topology), command.firstVertex ?? 0, command.vertexCount, command.instanceCount ?? 1);
1000
+ this.nativeInstancedSubmissions += 1;
1001
+ }
1002
+ else {
1003
+ this.gl.drawArrays(this.primitive(command.topology), command.firstVertex ?? 0, command.vertexCount);
1004
+ }
1005
+ }
1006
+ this.drawCalls += 1;
1007
+ if (this.activeRenderTarget?.sampleCount && this.activeRenderTarget.sampleCount > 1)
1008
+ this.activeRenderTarget.needsResolve = true;
1009
+ if (this.errorCheckMode === "strict") {
1010
+ const drawError = this.readError();
1011
+ if (drawError) {
1012
+ throw new RenderDeviceError(`WebGL2 draw failed for ${command.label ?? "unnamed"}: ${drawError}`, "WEBGL_DRAW_FAILED", {
1013
+ label: command.label,
1014
+ stage: "draw",
1015
+ error: drawError
1016
+ });
1017
+ }
1018
+ }
1019
+ }
1020
+ endFrame() {
1021
+ this.assertFrame();
1022
+ this.frameActive = false;
1023
+ this.lastError = this.readError();
1024
+ }
1025
+ captureState() {
1026
+ const viewport = this.gl.getParameter(this.gl.VIEWPORT);
1027
+ return new Map([
1028
+ ["backend", this.kind],
1029
+ ["disposed", this.disposed],
1030
+ ["contextLost", this.contextLost],
1031
+ ["frameActive", this.frameActive],
1032
+ ["depthTest", this.gl.isEnabled(this.gl.DEPTH_TEST)],
1033
+ ["blend", this.gl.isEnabled(this.gl.BLEND)],
1034
+ ["cullFace", this.gl.isEnabled(this.gl.CULL_FACE)],
1035
+ ["program", this.gl.getParameter(this.gl.CURRENT_PROGRAM) ? "bound" : null],
1036
+ ["arrayBuffer", this.gl.getParameter(this.gl.ARRAY_BUFFER_BINDING) ? "bound" : null],
1037
+ ["elementArrayBuffer", this.gl.getParameter(this.gl.ELEMENT_ARRAY_BUFFER_BINDING) ? "bound" : null],
1038
+ ["viewportWidth", this.viewportWidth],
1039
+ ["viewportHeight", this.viewportHeight],
1040
+ ["actualViewportWidth", viewport[2] ?? 0],
1041
+ ["actualViewportHeight", viewport[3] ?? 0],
1042
+ ["renderTarget", this.activeRenderTarget?.label ?? null],
1043
+ ["drawCalls", this.drawCalls],
1044
+ ["shaderProgramCreates", this.shaderProgramCreateCount],
1045
+ ["uniformLocationLookups", this.uniformLocationLookupCount],
1046
+ ["bufferUpdates", this.bufferUpdateCount],
1047
+ ["textureBinds", this.textureBindCount],
1048
+ ["samplerParameterUploads", this.samplerParameterUploadCount],
1049
+ ["vertexArrayCreates", this.vertexArrayCreateCount],
1050
+ ["samplerObjects", this.samplerObjectCache.size],
1051
+ ["samplerAnisotropyUploads", this.samplerAnisotropyUploadCount],
1052
+ ["maxTextureAnisotropy", this.maxTextureAnisotropy],
1053
+ ["nativeEnvironmentBindings", this.nativeEnvironmentBindings],
1054
+ ["nativeShadowMapBindings", this.nativeShadowMapBindings],
1055
+ ["nativeInstancedSubmissions", this.nativeInstancedSubmissions],
1056
+ ["stateCacheIssued", this.stateCache.stats().issued],
1057
+ ["stateCacheSkipped", this.stateCache.stats().skipped]
1058
+ ]);
1059
+ }
1060
+ getDiagnostics() {
1061
+ this.releaseDisposedTextureHandles();
1062
+ const liveRenderTargets = [...this.renderTargets].filter((target) => !target.disposed);
1063
+ const liveTextures = new Set([
1064
+ ...liveRenderTargets.map((target) => target.colorTexture),
1065
+ ...[...this.textures.keys()].filter((texture) => !texture.disposed)
1066
+ ]);
1067
+ const liveTextureList = [...liveTextures];
1068
+ const compressedTextures = liveTextureList.filter((texture) => isCompressedTextureFormat(texture.format));
1069
+ const fallbackTextures = liveTextureList.filter((texture) => this.textureUploadModes.get(texture) === "fallback");
1070
+ const stateCacheStats = this.stateCache.stats();
1071
+ const bufferBytes = [...this.buffers].filter((buffer) => !buffer.disposed).reduce((total, buffer) => total + buffer.byteLength, 0);
1072
+ const textureBytes = liveTextureList.reduce((total, texture) => total + texture.byteLength, 0);
1073
+ const gpuTargetEntries = this.describeGpuTargetInventory(liveRenderTargets);
1074
+ return {
1075
+ drawCalls: this.drawCalls,
1076
+ buffers: [...this.buffers].filter((buffer) => !buffer.disposed).length,
1077
+ shaders: [...this.shaders].filter((shader) => !shader.disposed).length,
1078
+ renderTargets: liveRenderTargets.length,
1079
+ maxRenderTargetSampleCount: Math.max(1, ...liveRenderTargets.map((target) => target.sampleCount)),
1080
+ textures: liveTextures.size,
1081
+ bufferBytes,
1082
+ textureBytes,
1083
+ approximateGpuMemoryBytes: bufferBytes + textureBytes,
1084
+ compressedTextures: compressedTextures.length,
1085
+ compressedTextureBytes: compressedTextures.reduce((total, texture) => total + texture.byteLength, 0),
1086
+ textureFallbacks: fallbackTextures.length,
1087
+ textureFallbackBytes: fallbackTextures.reduce((total, texture) => total + texture.fallbackByteLength, 0),
1088
+ nativeEnvironmentBindings: this.nativeEnvironmentBindings,
1089
+ nativeShadowMapBindings: this.nativeShadowMapBindings,
1090
+ shadowRenderTargetsAllocated: this.shadowRenderTargetsAllocated,
1091
+ nativeInstancedSubmissions: this.nativeInstancedSubmissions,
1092
+ bloom: this.lastBloomDiagnostics,
1093
+ samplerAnisotropyUploads: this.samplerAnisotropyUploadCount,
1094
+ maxTextureAnisotropy: this.maxTextureAnisotropy,
1095
+ stateCacheIssued: stateCacheStats.issued,
1096
+ stateCacheSkipped: stateCacheStats.skipped,
1097
+ stateCacheProgramSwitches: stateCacheStats.byOperation.useProgram?.issued ?? 0,
1098
+ stateCacheTextureBinds: stateCacheStats.byOperation.bindTexture?.issued ?? 0,
1099
+ stateCacheBufferBinds: stateCacheStats.byOperation.bindBuffer?.issued ?? 0,
1100
+ stateCacheVertexArrayBinds: stateCacheStats.byOperation.bindVertexArray?.issued ?? 0,
1101
+ stateCacheSamplerBinds: stateCacheStats.byOperation.bindSampler?.issued ?? 0,
1102
+ disposedBuffers: [...this.buffers].filter((buffer) => buffer.disposed).length,
1103
+ disposedShaders: [...this.shaders].filter((shader) => shader.disposed).length,
1104
+ disposedRenderTargets: [...this.renderTargets].filter((target) => target.disposed).length,
1105
+ disposedTextures: [...this.renderTargets].filter((target) => target.colorTexture.disposed).length + this.releasedTextureHandles,
1106
+ ...spreadGpuTargetInventory(gpuTargetEntries),
1107
+ lastError: this.lastError,
1108
+ contextLost: this.contextLost
1109
+ };
1110
+ }
1111
+ dispose() {
1112
+ if (this.canvas && "removeEventListener" in this.canvas) {
1113
+ this.deviceLostListeners.clear();
1114
+ this.deviceRestoredListeners.clear();
1115
+ if (this.contextLostListener)
1116
+ this.canvas.removeEventListener("webglcontextlost", this.contextLostListener);
1117
+ if (this.contextRestoredListener)
1118
+ this.canvas.removeEventListener("webglcontextrestored", this.contextRestoredListener);
1119
+ }
1120
+ for (const buffer of this.buffers) {
1121
+ buffer.dispose();
1122
+ }
1123
+ for (const shader of this.shaders) {
1124
+ shader.dispose();
1125
+ }
1126
+ for (const target of this.renderTargets) {
1127
+ target.dispose();
1128
+ }
1129
+ for (const entry of this.vertexArrayCache.values()) {
1130
+ this.gl.deleteVertexArray(entry.handle);
1131
+ }
1132
+ this.vertexArrayCache.clear();
1133
+ for (const sampler of this.samplerObjectCache.values()) {
1134
+ this.gl.deleteSampler(sampler);
1135
+ }
1136
+ this.samplerObjectCache.clear();
1137
+ for (const texture of this.textures.values()) {
1138
+ this.gl.deleteTexture(texture);
1139
+ }
1140
+ this.textureUploadModes.clear();
1141
+ if (this.fallbackTexture) {
1142
+ this.gl.deleteTexture(this.fallbackTexture);
1143
+ this.fallbackTexture = null;
1144
+ }
1145
+ if (this.fallbackCubeTexture) {
1146
+ this.gl.deleteTexture(this.fallbackCubeTexture);
1147
+ this.fallbackCubeTexture = null;
1148
+ }
1149
+ if (this.presentationProgram) {
1150
+ this.gl.deleteProgram(this.presentationProgram);
1151
+ this.presentationProgram = null;
1152
+ }
1153
+ if (this.ldrPostprocessProgram) {
1154
+ this.gl.deleteProgram(this.ldrPostprocessProgram);
1155
+ this.ldrPostprocessProgram = null;
1156
+ }
1157
+ if (this.bloomBrightExtractProgram) {
1158
+ this.gl.deleteProgram(this.bloomBrightExtractProgram);
1159
+ this.bloomBrightExtractProgram = null;
1160
+ }
1161
+ if (this.bloomBlurProgram) {
1162
+ this.gl.deleteProgram(this.bloomBlurProgram);
1163
+ this.bloomBlurProgram = null;
1164
+ }
1165
+ if (this.bloomCompositeProgram) {
1166
+ this.gl.deleteProgram(this.bloomCompositeProgram);
1167
+ this.bloomCompositeProgram = null;
1168
+ }
1169
+ if (this.bloomDownsampleProgram) {
1170
+ this.gl.deleteProgram(this.bloomDownsampleProgram);
1171
+ this.bloomDownsampleProgram = null;
1172
+ }
1173
+ if (this.bloomAccumulateProgram) {
1174
+ this.gl.deleteProgram(this.bloomAccumulateProgram);
1175
+ this.bloomAccumulateProgram = null;
1176
+ }
1177
+ if (this.outlineProgram) {
1178
+ this.gl.deleteProgram(this.outlineProgram);
1179
+ this.outlineProgram = null;
1180
+ }
1181
+ if (this.ssaoProgram) {
1182
+ this.gl.deleteProgram(this.ssaoProgram);
1183
+ this.ssaoProgram = null;
1184
+ }
1185
+ if (this.ssrProgram) {
1186
+ this.gl.deleteProgram(this.ssrProgram);
1187
+ this.ssrProgram = null;
1188
+ }
1189
+ if (this.depthOfFieldProgram) {
1190
+ this.gl.deleteProgram(this.depthOfFieldProgram);
1191
+ this.depthOfFieldProgram = null;
1192
+ }
1193
+ if (this.motionBlurProgram) {
1194
+ this.gl.deleteProgram(this.motionBlurProgram);
1195
+ this.motionBlurProgram = null;
1196
+ }
1197
+ if (this.motionBlurVelocityTexture) {
1198
+ this.gl.deleteTexture(this.motionBlurVelocityTexture);
1199
+ this.motionBlurVelocityTexture = null;
1200
+ this.motionBlurVelocitySize = null;
1201
+ }
1202
+ if (this.taaProgram) {
1203
+ this.gl.deleteProgram(this.taaProgram);
1204
+ this.taaProgram = null;
1205
+ }
1206
+ if (this.taaHistoryTexture) {
1207
+ this.gl.deleteTexture(this.taaHistoryTexture);
1208
+ this.taaHistoryTexture = null;
1209
+ this.taaHistorySize = null;
1210
+ }
1211
+ this.disposeBloomPingPongResources();
1212
+ this.disposeBloomPyramidResources();
1213
+ if (this.bloomBrightLutTexture) {
1214
+ this.gl.deleteTexture(this.bloomBrightLutTexture);
1215
+ this.bloomBrightLutTexture = null;
1216
+ this.bloomBrightLutThreshold = null;
1217
+ }
1218
+ if (this.bloomCompositeLutTexture) {
1219
+ this.gl.deleteTexture(this.bloomCompositeLutTexture);
1220
+ this.bloomCompositeLutTexture = null;
1221
+ this.bloomCompositeLutIntensity = null;
1222
+ this.bloomCompositeLutShoulder = null;
1223
+ }
1224
+ if (this.outlineBlendLutTexture) {
1225
+ this.gl.deleteTexture(this.outlineBlendLutTexture);
1226
+ this.outlineBlendLutTexture = null;
1227
+ this.outlineBlendLutKey = null;
1228
+ }
1229
+ if (this.presentationVertexArray) {
1230
+ this.gl.deleteVertexArray(this.presentationVertexArray);
1231
+ this.presentationVertexArray = null;
1232
+ }
1233
+ if (this.depthReadbackProgram) {
1234
+ this.gl.deleteProgram(this.depthReadbackProgram);
1235
+ this.depthReadbackProgram = null;
1236
+ }
1237
+ this.textures.clear();
1238
+ this.disposed = true;
1239
+ }
1240
+ copyDepthTextureToBytes(source, x, y, width, height) {
1241
+ const colorHandle = this.gl.createTexture();
1242
+ const framebuffer = this.gl.createFramebuffer();
1243
+ if (!colorHandle || !framebuffer) {
1244
+ if (colorHandle)
1245
+ this.gl.deleteTexture(colorHandle);
1246
+ if (framebuffer)
1247
+ this.gl.deleteFramebuffer(framebuffer);
1248
+ throw new RenderDeviceError("Failed to allocate WebGL2 depth readback target", "WEBGL_ALLOCATION_FAILED", {
1249
+ renderTarget: source.label
1250
+ });
1251
+ }
1252
+ const previousFramebuffer = this.gl.getParameter(this.gl.FRAMEBUFFER_BINDING);
1253
+ const previousProgram = this.gl.getParameter(this.gl.CURRENT_PROGRAM);
1254
+ const textureUnit0 = this.captureTextureUnit0();
1255
+ const viewport = this.gl.getParameter(this.gl.VIEWPORT);
1256
+ const depthTestEnabled = this.gl.isEnabled(this.gl.DEPTH_TEST);
1257
+ const depthMask = this.gl.getParameter(this.gl.DEPTH_WRITEMASK);
1258
+ const cullFaceEnabled = this.gl.isEnabled(this.gl.CULL_FACE);
1259
+ const blendEnabled = this.gl.isEnabled(this.gl.BLEND);
1260
+ const pixels = new Uint8Array(width * height * 4);
1261
+ try {
1262
+ this.gl.activeTexture(this.gl.TEXTURE0);
1263
+ this.gl.bindTexture(this.gl.TEXTURE_2D, colorHandle);
1264
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
1265
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
1266
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
1267
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
1268
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA8, width, height, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, null);
1269
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebuffer);
1270
+ this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER, this.gl.COLOR_ATTACHMENT0, this.gl.TEXTURE_2D, colorHandle, 0);
1271
+ const status = this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER);
1272
+ if (status !== this.gl.FRAMEBUFFER_COMPLETE) {
1273
+ throw new RenderDeviceError("WebGL2 depth readback framebuffer status is invalid", "FRAMEBUFFER_INVALID", {
1274
+ renderTarget: source.label,
1275
+ status
1276
+ });
1277
+ }
1278
+ this.gl.viewport(0, 0, width, height);
1279
+ this.gl.disable(this.gl.DEPTH_TEST);
1280
+ this.gl.disable(this.gl.CULL_FACE);
1281
+ this.gl.disable(this.gl.BLEND);
1282
+ this.gl.depthMask(false);
1283
+ this.gl.useProgram(this.ensureDepthReadbackProgram());
1284
+ this.gl.activeTexture(this.gl.TEXTURE0);
1285
+ this.gl.bindTexture(this.gl.TEXTURE_2D, source.depthTextureHandle);
1286
+ this.gl.bindSampler(0, null);
1287
+ this.gl.uniform1i(this.gl.getUniformLocation(this.ensureDepthReadbackProgram(), "u_depth"), 0);
1288
+ this.gl.uniform4f(this.gl.getUniformLocation(this.ensureDepthReadbackProgram(), "u_sourceRect"), x / source.width, y / source.height, width / source.width, height / source.height);
1289
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1290
+ this.gl.readPixels(0, 0, width, height, this.gl.RGBA, this.gl.UNSIGNED_BYTE, pixels);
1291
+ const error = this.readError();
1292
+ if (error) {
1293
+ throw new RenderDeviceError("WebGL2 depth texture readback failed", "WEBGL_DEPTH_READBACK_FAILED", {
1294
+ renderTarget: source.label,
1295
+ error
1296
+ });
1297
+ }
1298
+ return pixels;
1299
+ }
1300
+ finally {
1301
+ this.restoreTextureUnit0(textureUnit0);
1302
+ this.gl.useProgram(previousProgram);
1303
+ if (depthTestEnabled)
1304
+ this.gl.enable(this.gl.DEPTH_TEST);
1305
+ else
1306
+ this.gl.disable(this.gl.DEPTH_TEST);
1307
+ if (cullFaceEnabled)
1308
+ this.gl.enable(this.gl.CULL_FACE);
1309
+ else
1310
+ this.gl.disable(this.gl.CULL_FACE);
1311
+ if (blendEnabled)
1312
+ this.gl.enable(this.gl.BLEND);
1313
+ else
1314
+ this.gl.disable(this.gl.BLEND);
1315
+ this.gl.depthMask(depthMask);
1316
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, previousFramebuffer);
1317
+ this.gl.viewport(viewport[0] ?? 0, viewport[1] ?? 0, viewport[2] ?? this.viewportWidth, viewport[3] ?? this.viewportHeight);
1318
+ this.gl.deleteTexture(colorHandle);
1319
+ this.gl.deleteFramebuffer(framebuffer);
1320
+ this.stateCache.invalidate();
1321
+ }
1322
+ }
1323
+ drawRenderTargetToBackbuffer(source, outputWidth, outputHeight) {
1324
+ const program = this.ensurePresentationProgram();
1325
+ const vertexArray = this.ensurePresentationVertexArray();
1326
+ const previousState = this.prepareFullscreenPresentation(null, outputWidth, outputHeight);
1327
+ this.gl.useProgram(program);
1328
+ this.gl.bindVertexArray(vertexArray);
1329
+ this.gl.activeTexture(this.gl.TEXTURE0);
1330
+ this.gl.bindTexture(this.gl.TEXTURE_2D, source.colorHandle);
1331
+ this.gl.bindSampler(0, null);
1332
+ try {
1333
+ const uniformLocation = this.gl.getUniformLocation(program, "u_source");
1334
+ this.gl.uniform1i(uniformLocation, 0);
1335
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1336
+ this.gl.flush();
1337
+ }
1338
+ finally {
1339
+ this.restoreFullscreenPresentationState(previousState, outputWidth, outputHeight);
1340
+ }
1341
+ }
1342
+ ensureBloomPingPongResources(width, height, hdr = false) {
1343
+ const current = this.bloomPingPongResources;
1344
+ if (current && current.width === width && current.height === height && current.hdr === hdr) {
1345
+ return current;
1346
+ }
1347
+ this.disposeBloomPingPongResources();
1348
+ this.disposeBloomPyramidResources();
1349
+ const textureUnit0 = this.captureTextureUnit0();
1350
+ const previousFramebuffer = this.gl.getParameter(this.gl.FRAMEBUFFER_BINDING);
1351
+ const textures = [];
1352
+ const framebuffers = [];
1353
+ try {
1354
+ for (let index = 0; index < 2; index += 1) {
1355
+ const texture = this.gl.createTexture();
1356
+ const framebuffer = this.gl.createFramebuffer();
1357
+ if (!texture || !framebuffer) {
1358
+ if (texture)
1359
+ this.gl.deleteTexture(texture);
1360
+ if (framebuffer)
1361
+ this.gl.deleteFramebuffer(framebuffer);
1362
+ throw new RenderDeviceError("Failed to allocate WebGL2 bloom ping-pong resources", "WEBGL_ALLOCATION_FAILED", {
1363
+ width,
1364
+ height,
1365
+ index
1366
+ });
1367
+ }
1368
+ textures.push(texture);
1369
+ framebuffers.push(framebuffer);
1370
+ this.gl.bindTexture(this.gl.TEXTURE_2D, texture);
1371
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
1372
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
1373
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
1374
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
1375
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, hdr ? this.gl.RGBA16F : this.gl.RGBA8, width, height, 0, this.gl.RGBA, hdr ? this.gl.HALF_FLOAT : this.gl.UNSIGNED_BYTE, null);
1376
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebuffer);
1377
+ this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER, this.gl.COLOR_ATTACHMENT0, this.gl.TEXTURE_2D, texture, 0);
1378
+ const status = this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER);
1379
+ if (status !== this.gl.FRAMEBUFFER_COMPLETE) {
1380
+ throw new RenderDeviceError("WebGL2 bloom ping-pong framebuffer status is invalid", "FRAMEBUFFER_INVALID", {
1381
+ width,
1382
+ height,
1383
+ index,
1384
+ status
1385
+ });
1386
+ }
1387
+ }
1388
+ const resources = {
1389
+ width,
1390
+ height,
1391
+ hdr,
1392
+ textures: [textures[0], textures[1]],
1393
+ framebuffers: [framebuffers[0], framebuffers[1]]
1394
+ };
1395
+ this.bloomPingPongResources = resources;
1396
+ return resources;
1397
+ }
1398
+ catch (error) {
1399
+ for (const texture of textures)
1400
+ this.gl.deleteTexture(texture);
1401
+ for (const framebuffer of framebuffers)
1402
+ this.gl.deleteFramebuffer(framebuffer);
1403
+ throw error;
1404
+ }
1405
+ finally {
1406
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, previousFramebuffer);
1407
+ this.restoreTextureUnit0(textureUnit0);
1408
+ this.stateCache.invalidate();
1409
+ }
1410
+ }
1411
+ ensureBloomLutTextures(options) {
1412
+ const updateBright = this.bloomBrightLutThreshold !== options.threshold;
1413
+ const updateComposite = this.bloomCompositeLutIntensity !== options.intensity ||
1414
+ this.bloomCompositeLutShoulder !== options.shoulder;
1415
+ if (this.bloomBrightLutTexture && this.bloomCompositeLutTexture && !updateBright && !updateComposite) {
1416
+ return;
1417
+ }
1418
+ const textureUnit0 = this.captureTextureUnit0();
1419
+ try {
1420
+ if (!this.bloomBrightLutTexture) {
1421
+ this.bloomBrightLutTexture = this.createNativeBloomDataTexture();
1422
+ }
1423
+ if (updateBright) {
1424
+ const pixels = createBloomBrightThresholdLut(options.threshold);
1425
+ this.gl.bindTexture(this.gl.TEXTURE_2D, this.bloomBrightLutTexture);
1426
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA8, BLOOM_BRIGHT_LUT_WIDTH, BLOOM_BRIGHT_LUT_HEIGHT, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, pixels);
1427
+ this.bloomBrightLutThreshold = options.threshold;
1428
+ }
1429
+ if (!this.bloomCompositeLutTexture) {
1430
+ this.bloomCompositeLutTexture = this.createNativeBloomDataTexture();
1431
+ }
1432
+ if (updateComposite) {
1433
+ const pixels = createBloomCompositeLut(options.intensity, { shoulder: options.shoulder });
1434
+ this.gl.bindTexture(this.gl.TEXTURE_2D, this.bloomCompositeLutTexture);
1435
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA8, BLOOM_COMPOSITE_LUT_SIZE, BLOOM_COMPOSITE_LUT_SIZE, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, pixels);
1436
+ this.bloomCompositeLutIntensity = options.intensity;
1437
+ this.bloomCompositeLutShoulder = options.shoulder;
1438
+ }
1439
+ }
1440
+ finally {
1441
+ this.restoreTextureUnit0(textureUnit0);
1442
+ this.stateCache.invalidate();
1443
+ }
1444
+ }
1445
+ createNativeBloomDataTexture() {
1446
+ const texture = this.gl.createTexture();
1447
+ if (!texture) {
1448
+ throw new RenderDeviceError("Failed to allocate WebGL2 bloom lookup texture", "WEBGL_ALLOCATION_FAILED");
1449
+ }
1450
+ this.gl.bindTexture(this.gl.TEXTURE_2D, texture);
1451
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
1452
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
1453
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
1454
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
1455
+ return texture;
1456
+ }
1457
+ ensureOutlineBlendLutTexture(options) {
1458
+ const combinedAlpha = options.opacity * (options.color[3] / 255);
1459
+ const key = `${options.color.join(",")}|${combinedAlpha}`;
1460
+ if (this.outlineBlendLutTexture && this.outlineBlendLutKey === key)
1461
+ return;
1462
+ const textureUnit0 = this.captureTextureUnit0();
1463
+ try {
1464
+ if (!this.outlineBlendLutTexture) {
1465
+ this.outlineBlendLutTexture = this.createNativeBloomDataTexture();
1466
+ }
1467
+ this.gl.bindTexture(this.gl.TEXTURE_2D, this.outlineBlendLutTexture);
1468
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA8, OUTLINE_BLEND_LUT_WIDTH, 1, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, createOutlineBlendLut(options.color, combinedAlpha));
1469
+ this.outlineBlendLutKey = key;
1470
+ }
1471
+ finally {
1472
+ this.restoreTextureUnit0(textureUnit0);
1473
+ this.stateCache.invalidate();
1474
+ }
1475
+ }
1476
+ ensureMotionBlurVelocityTexture(width, height, velocity) {
1477
+ const textureUnit0 = this.captureTextureUnit0();
1478
+ try {
1479
+ if (!this.motionBlurVelocityTexture) {
1480
+ this.motionBlurVelocityTexture = this.createNativeBloomDataTexture();
1481
+ }
1482
+ this.motionBlurVelocitySize = { width, height };
1483
+ this.gl.bindTexture(this.gl.TEXTURE_2D, this.motionBlurVelocityTexture);
1484
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RG32F, width, height, 0, this.gl.RG, this.gl.FLOAT, velocity);
1485
+ }
1486
+ finally {
1487
+ this.restoreTextureUnit0(textureUnit0);
1488
+ this.stateCache.invalidate();
1489
+ }
1490
+ }
1491
+ ensureTaaHistoryTexture(width, height, history) {
1492
+ const textureUnit0 = this.captureTextureUnit0();
1493
+ try {
1494
+ if (!this.taaHistoryTexture) {
1495
+ this.taaHistoryTexture = this.createNativeBloomDataTexture();
1496
+ }
1497
+ this.taaHistorySize = { width, height };
1498
+ this.gl.bindTexture(this.gl.TEXTURE_2D, this.taaHistoryTexture);
1499
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA8, width, height, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, history);
1500
+ }
1501
+ finally {
1502
+ this.restoreTextureUnit0(textureUnit0);
1503
+ this.stateCache.invalidate();
1504
+ }
1505
+ }
1506
+ drawNativeLdrStage(sourceTexture, framebuffer, width, height, program, vertexArray, tonePass, colorPass, fxaaPass, toneMappingDefaults) {
1507
+ const toneOptions = { ...(toneMappingDefaults ?? {}), ...(tonePass?.options ?? {}) };
1508
+ const colorOptions = colorPass?.options ?? {};
1509
+ const fxaaOptions = fxaaPass?.options ?? {};
1510
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebuffer);
1511
+ this.gl.viewport(0, 0, width, height);
1512
+ this.gl.useProgram(program);
1513
+ this.gl.bindVertexArray(vertexArray);
1514
+ this.bindFullscreenTexture(0, sourceTexture);
1515
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1516
+ this.gl.uniform2f(this.gl.getUniformLocation(program, "u_texelSize"), 1 / width, 1 / height);
1517
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_hasToneMapping"), tonePass ? 1 : 0);
1518
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_toneOperator"), toneMappingOperatorId(stringOption(toneOptions, "operator", "reinhard")));
1519
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_inputColorSpace"), colorSpaceId(stringOption(toneOptions, "inputColorSpace", "linear")));
1520
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_outputColorSpace"), colorSpaceId(stringOption(toneOptions, "outputColorSpace", "linear")));
1521
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_exposure"), numberOption(toneOptions, "exposure", 1));
1522
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_whitePoint"), Math.max(0.0001, numberOption(toneOptions, "whitePoint", 1)));
1523
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_gamma"), Math.max(0.0001, numberOption(toneOptions, "gamma", 2.2)));
1524
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_hasColorGrade"), colorPass ? 1 : 0);
1525
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_contrast"), numberOption(colorOptions, "contrast", 1));
1526
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_temperature"), numberOption(colorOptions, "temperature", 0));
1527
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_tint"), numberOption(colorOptions, "tint", 0));
1528
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_saturation"), numberOption(colorOptions, "saturation", 1));
1529
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_vibrance"), numberOption(colorOptions, "vibrance", 0));
1530
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_vignette"), numberOption(colorOptions, "vignette", 0));
1531
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_sharpening"), numberOption(colorOptions, "sharpening", 0));
1532
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_hasFxaa"), fxaaPass ? 1 : 0);
1533
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_edgeThreshold"), numberOption(fxaaOptions, "edgeThreshold", 0.125));
1534
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_subpixelBlend"), numberOption(fxaaOptions, "subpixelBlend", 0.75));
1535
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1536
+ }
1537
+ executeNativeBloomPasses(sourceTexture, resources, options, vertexArray, hdr) {
1538
+ const brightLut = this.bloomBrightLutTexture;
1539
+ const compositeLut = this.bloomCompositeLutTexture;
1540
+ if (!hdr && (!brightLut || !compositeLut)) {
1541
+ throw new RenderDeviceError("WebGL2 bloom lookup textures were not initialized", "WEBGL_ALLOCATION_FAILED");
1542
+ }
1543
+ const [textureA, textureB] = resources.textures;
1544
+ const [framebufferA, framebufferB] = resources.framebuffers;
1545
+ const brightProgram = this.ensureBloomBrightExtractProgram();
1546
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebufferA);
1547
+ this.gl.viewport(0, 0, resources.width, resources.height);
1548
+ this.gl.useProgram(brightProgram);
1549
+ this.gl.bindVertexArray(vertexArray);
1550
+ this.bindFullscreenTexture(0, sourceTexture);
1551
+ if (brightLut)
1552
+ this.bindFullscreenTexture(1, brightLut);
1553
+ this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_source"), 0);
1554
+ this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_brightLut"), 1);
1555
+ this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_hdr"), hdr ? 1 : 0);
1556
+ this.gl.uniform1f(this.gl.getUniformLocation(brightProgram, "u_threshold"), options.threshold);
1557
+ this.gl.uniform1f(this.gl.getUniformLocation(brightProgram, "u_softKnee"), options.softKnee);
1558
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1559
+ const blurProgram = this.ensureBloomBlurProgram();
1560
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebufferB);
1561
+ this.gl.useProgram(blurProgram);
1562
+ this.bindFullscreenTexture(0, textureA);
1563
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_source"), 0);
1564
+ this.gl.uniform2i(this.gl.getUniformLocation(blurProgram, "u_size"), resources.width, resources.height);
1565
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_radius"), options.radius);
1566
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_horizontal"), 1);
1567
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_hdr"), hdr ? 1 : 0);
1568
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1569
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebufferA);
1570
+ this.bindFullscreenTexture(0, textureB);
1571
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_horizontal"), 0);
1572
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1573
+ const compositeProgram = this.ensureBloomCompositeProgram();
1574
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebufferB);
1575
+ this.gl.useProgram(compositeProgram);
1576
+ this.bindFullscreenTexture(0, sourceTexture);
1577
+ this.bindFullscreenTexture(1, textureA);
1578
+ if (compositeLut)
1579
+ this.bindFullscreenTexture(2, compositeLut);
1580
+ this.gl.uniform1i(this.gl.getUniformLocation(compositeProgram, "u_source"), 0);
1581
+ this.gl.uniform1i(this.gl.getUniformLocation(compositeProgram, "u_blurred"), 1);
1582
+ this.gl.uniform1i(this.gl.getUniformLocation(compositeProgram, "u_compositeLut"), 2);
1583
+ this.gl.uniform1i(this.gl.getUniformLocation(compositeProgram, "u_hdr"), hdr ? 1 : 0);
1584
+ this.gl.uniform1f(this.gl.getUniformLocation(compositeProgram, "u_intensity"), options.intensity);
1585
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1586
+ return textureB;
1587
+ }
1588
+ /**
1589
+ * Balanced/cinematic bloom: bright-extract once, then a half-resolution mip
1590
+ * chain where every level is downsampled, separably blurred, and accumulated
1591
+ * with its energy-preserving weight. Returns a full-resolution bloom texture
1592
+ * holding the weighted sum, ready for the existing composite program.
1593
+ */
1594
+ executeNativeBloomPyramidPasses(sourceTexture, sourceWidth, sourceHeight, resources, fullResStaging, options, vertexArray, hdr) {
1595
+ const plan = resources.plan;
1596
+ const mipCount = plan.mips.length;
1597
+ const blurRadii = resolveBloomPyramidBlurRadii(plan, options.radius);
1598
+ const downsampleProgram = this.ensureBloomDownsampleProgram();
1599
+ const brightProgram = this.ensureBloomBrightExtractProgram();
1600
+ const blurProgram = this.ensureBloomBlurProgram();
1601
+ const accumulateProgram = this.ensureBloomAccumulateProgram();
1602
+ const brightLut = this.bloomBrightLutTexture;
1603
+ const mipTexture = (level, slot) => resources.textures[level * 2 + slot];
1604
+ const mipFramebuffer = (level, slot) => resources.framebuffers[level * 2 + slot];
1605
+ const mipSize = (level) => plan.mips[level];
1606
+ // Every level settles in slot 0 after the vertical blur.
1607
+ const blurredSlot = (_level) => 0;
1608
+ const drawDownsample = (fromTexture, fromWidth, fromHeight, toFramebuffer, toWidth, toHeight) => {
1609
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, toFramebuffer);
1610
+ this.gl.viewport(0, 0, toWidth, toHeight);
1611
+ this.gl.useProgram(downsampleProgram);
1612
+ this.gl.bindVertexArray(vertexArray);
1613
+ this.bindFullscreenTexture(0, fromTexture);
1614
+ this.gl.uniform1i(this.gl.getUniformLocation(downsampleProgram, "u_source"), 0);
1615
+ this.gl.uniform2f(this.gl.getUniformLocation(downsampleProgram, "u_texelSize"), 1 / fromWidth, 1 / fromHeight);
1616
+ this.gl.uniform2f(this.gl.getUniformLocation(downsampleProgram, "u_targetSize"), toWidth, toHeight);
1617
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1618
+ };
1619
+ const drawBrightExtract = (fromTexture, toFramebuffer, size) => {
1620
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, toFramebuffer);
1621
+ this.gl.viewport(0, 0, size.width, size.height);
1622
+ this.gl.useProgram(brightProgram);
1623
+ this.gl.bindVertexArray(vertexArray);
1624
+ this.bindFullscreenTexture(0, fromTexture);
1625
+ if (brightLut)
1626
+ this.bindFullscreenTexture(1, brightLut);
1627
+ this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_source"), 0);
1628
+ this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_brightLut"), 1);
1629
+ this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_hdr"), hdr ? 1 : 0);
1630
+ this.gl.uniform1f(this.gl.getUniformLocation(brightProgram, "u_threshold"), options.threshold);
1631
+ this.gl.uniform1f(this.gl.getUniformLocation(brightProgram, "u_softKnee"), options.softKnee);
1632
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1633
+ };
1634
+ const drawSeparableBlur = (readTexture, tmpTexture, tmpFramebuffer, outFramebuffer, size, radius) => {
1635
+ // Horizontal into the temp target, vertical back into the output target.
1636
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, tmpFramebuffer);
1637
+ this.gl.viewport(0, 0, size.width, size.height);
1638
+ this.gl.useProgram(blurProgram);
1639
+ this.gl.bindVertexArray(vertexArray);
1640
+ this.bindFullscreenTexture(0, readTexture);
1641
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_source"), 0);
1642
+ this.gl.uniform2i(this.gl.getUniformLocation(blurProgram, "u_size"), size.width, size.height);
1643
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_radius"), radius);
1644
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_horizontal"), 1);
1645
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_hdr"), hdr ? 1 : 0);
1646
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1647
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, outFramebuffer);
1648
+ this.bindFullscreenTexture(0, tmpTexture);
1649
+ this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_horizontal"), 0);
1650
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1651
+ };
1652
+ // Extract highlights at the source resolution before the first downsample.
1653
+ // Downsampling the complete scene first averaged narrow emissive sources
1654
+ // below the authored threshold, so balanced/cinematic bloom could execute
1655
+ // all native passes yet remain pixel-identical to disabled output.
1656
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, fullResStaging.framebufferA);
1657
+ this.gl.viewport(0, 0, sourceWidth, sourceHeight);
1658
+ this.gl.useProgram(brightProgram);
1659
+ this.gl.bindVertexArray(vertexArray);
1660
+ this.bindFullscreenTexture(0, sourceTexture);
1661
+ if (brightLut)
1662
+ this.bindFullscreenTexture(1, brightLut);
1663
+ this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_source"), 0);
1664
+ this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_brightLut"), 1);
1665
+ this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_hdr"), hdr ? 1 : 0);
1666
+ this.gl.uniform1f(this.gl.getUniformLocation(brightProgram, "u_threshold"), options.threshold);
1667
+ this.gl.uniform1f(this.gl.getUniformLocation(brightProgram, "u_softKnee"), options.softKnee);
1668
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1669
+ // Level 0 downsamples the extracted highlight field, then blurs H into
1670
+ // slot 1 and V back into slot 0. The result therefore settles in slot 0.
1671
+ const level0 = mipSize(0);
1672
+ drawDownsample(fullResStaging.textureA, sourceWidth, sourceHeight, mipFramebuffer(0, 0), level0.width, level0.height);
1673
+ drawSeparableBlur(mipTexture(0, 0), mipTexture(0, 1), mipFramebuffer(0, 1), mipFramebuffer(0, 0), level0, blurRadii[0]);
1674
+ for (let level = 1; level < mipCount; level += 1) {
1675
+ const size = mipSize(level);
1676
+ const previous = mipSize(level - 1);
1677
+ drawDownsample(mipTexture(level - 1, blurredSlot(level - 1)), previous.width, previous.height, mipFramebuffer(level, 0), size.width, size.height);
1678
+ // H into slot 1, V back into slot 0: blurred result settles in slot 0.
1679
+ drawSeparableBlur(mipTexture(level, 0), mipTexture(level, 1), mipFramebuffer(level, 1), mipFramebuffer(level, 0), size, blurRadii[level]);
1680
+ }
1681
+ // Accumulate smallest-to-largest, ping-ponging between the two
1682
+ // accumulators (a pass must never sample its own bound target).
1683
+ const weights = plan.weights;
1684
+ let readAccumulator = { texture: resources.accumulatorTextureA, framebuffer: resources.accumulatorFramebufferA };
1685
+ let writeAccumulator = { texture: resources.accumulatorTextureB, framebuffer: resources.accumulatorFramebufferB };
1686
+ // Clear both accumulators; the seed reads the cleared sibling, never the
1687
+ // bound target (feedback loop).
1688
+ for (const acc of [readAccumulator, writeAccumulator]) {
1689
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, acc.framebuffer);
1690
+ this.gl.viewport(0, 0, level0.width, level0.height);
1691
+ this.gl.clearColor(0, 0, 0, 0);
1692
+ this.gl.clear(this.gl.COLOR_BUFFER_BIT);
1693
+ }
1694
+ // Seed: smallest mip onto the cleared sibling accumulator.
1695
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, writeAccumulator.framebuffer);
1696
+ this.gl.viewport(0, 0, level0.width, level0.height);
1697
+ this.gl.useProgram(accumulateProgram);
1698
+ this.gl.bindVertexArray(vertexArray);
1699
+ this.bindFullscreenTexture(0, readAccumulator.texture);
1700
+ this.bindFullscreenTexture(1, mipTexture(mipCount - 1, blurredSlot(mipCount - 1)));
1701
+ this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_base"), 0);
1702
+ this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_bloom"), 1);
1703
+ this.gl.uniform1f(this.gl.getUniformLocation(accumulateProgram, "u_weight"), weights[mipCount - 1]);
1704
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1705
+ for (let level = mipCount - 2; level >= 0; level -= 1) {
1706
+ const nextRead = writeAccumulator;
1707
+ const nextWrite = readAccumulator;
1708
+ readAccumulator = nextRead;
1709
+ writeAccumulator = nextWrite;
1710
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, writeAccumulator.framebuffer);
1711
+ this.gl.viewport(0, 0, level0.width, level0.height);
1712
+ this.gl.useProgram(accumulateProgram);
1713
+ this.gl.bindVertexArray(vertexArray);
1714
+ this.bindFullscreenTexture(0, readAccumulator.texture);
1715
+ this.bindFullscreenTexture(1, mipTexture(level, blurredSlot(level)));
1716
+ this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_base"), 0);
1717
+ this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_bloom"), 1);
1718
+ this.gl.uniform1f(this.gl.getUniformLocation(accumulateProgram, "u_weight"), weights[level]);
1719
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1720
+ }
1721
+ // Upsample the weighted sum onto full-resolution staging target A, using
1722
+ // the cleared staging target B as the zero base (never sample A while
1723
+ // rendering into it).
1724
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, fullResStaging.framebufferB);
1725
+ this.gl.viewport(0, 0, sourceWidth, sourceHeight);
1726
+ this.gl.clearColor(0, 0, 0, 0);
1727
+ this.gl.clear(this.gl.COLOR_BUFFER_BIT);
1728
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, fullResStaging.framebufferA);
1729
+ this.gl.viewport(0, 0, sourceWidth, sourceHeight);
1730
+ this.gl.useProgram(accumulateProgram);
1731
+ this.gl.bindVertexArray(vertexArray);
1732
+ this.bindFullscreenTexture(0, fullResStaging.textureB);
1733
+ this.bindFullscreenTexture(1, writeAccumulator.texture);
1734
+ this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_base"), 0);
1735
+ this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_bloom"), 1);
1736
+ this.gl.uniform1f(this.gl.getUniformLocation(accumulateProgram, "u_weight"), 1);
1737
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1738
+ return fullResStaging.textureA;
1739
+ }
1740
+ executeNativeOutlinePasses(sourceTexture, resources, options, vertexArray, targetIndex) {
1741
+ const blendLut = this.outlineBlendLutTexture;
1742
+ if (!blendLut) {
1743
+ throw new RenderDeviceError("WebGL2 outline lookup texture was not initialized", "WEBGL_ALLOCATION_FAILED");
1744
+ }
1745
+ const program = this.ensureOutlineProgram();
1746
+ const targetTexture = resources.textures[targetIndex];
1747
+ const targetFramebuffer = resources.framebuffers[targetIndex];
1748
+ const bound = createOutlineGradientBound(options.threshold);
1749
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, targetFramebuffer);
1750
+ this.gl.viewport(0, 0, resources.width, resources.height);
1751
+ this.gl.useProgram(program);
1752
+ this.gl.bindVertexArray(vertexArray);
1753
+ this.bindFullscreenTexture(0, sourceTexture);
1754
+ this.bindFullscreenTexture(1, blendLut);
1755
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1756
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_blendLut"), 1);
1757
+ this.gl.uniform2i(this.gl.getUniformLocation(program, "u_size"), resources.width, resources.height);
1758
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_width"), options.width);
1759
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_boundHigh"), bound.highWord);
1760
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_boundLow"), bound.lowWord);
1761
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1762
+ return targetTexture;
1763
+ }
1764
+ executeNativeSsaoPass(sourceTexture, depthTexture, resources, options, vertexArray, targetIndex) {
1765
+ const program = this.ensureSsaoProgram();
1766
+ const targetTexture = resources.textures[targetIndex];
1767
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, resources.framebuffers[targetIndex]);
1768
+ this.gl.viewport(0, 0, resources.width, resources.height);
1769
+ this.gl.useProgram(program);
1770
+ this.gl.bindVertexArray(vertexArray);
1771
+ this.bindFullscreenTexture(0, sourceTexture);
1772
+ this.bindFullscreenTexture(1, depthTexture);
1773
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1774
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_depth"), 1);
1775
+ this.gl.uniform2i(this.gl.getUniformLocation(program, "u_size"), resources.width, resources.height);
1776
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_radius"), options.radius);
1777
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_intensity"), options.intensity);
1778
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_bias"), options.bias);
1779
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1780
+ return targetTexture;
1781
+ }
1782
+ executeNativeSsrPass(sourceTexture, depthTexture, resources, options, vertexArray, targetIndex, depthRange) {
1783
+ const program = this.ensureSsrProgram();
1784
+ const targetTexture = resources.textures[targetIndex];
1785
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, resources.framebuffers[targetIndex]);
1786
+ this.gl.viewport(0, 0, resources.width, resources.height);
1787
+ this.gl.useProgram(program);
1788
+ this.gl.bindVertexArray(vertexArray);
1789
+ this.bindFullscreenTexture(0, sourceTexture);
1790
+ this.bindFullscreenTexture(1, depthTexture);
1791
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1792
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_depth"), 1);
1793
+ this.gl.uniform2i(this.gl.getUniformLocation(program, "u_size"), resources.width, resources.height);
1794
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_intensity"), options.intensity);
1795
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_maxDistance"), options.maxDistance);
1796
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_depthNear"), depthRange.near);
1797
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_depthFar"), depthRange.far);
1798
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1799
+ return targetTexture;
1800
+ }
1801
+ executeNativeDepthOfFieldPass(sourceTexture, depthTexture, resources, options, vertexArray, targetIndex, depthRange) {
1802
+ const program = this.ensureDepthOfFieldProgram();
1803
+ const targetTexture = resources.textures[targetIndex];
1804
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, resources.framebuffers[targetIndex]);
1805
+ this.gl.viewport(0, 0, resources.width, resources.height);
1806
+ this.gl.useProgram(program);
1807
+ this.gl.bindVertexArray(vertexArray);
1808
+ this.bindFullscreenTexture(0, sourceTexture);
1809
+ this.bindFullscreenTexture(1, depthTexture);
1810
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1811
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_depth"), 1);
1812
+ this.gl.uniform2i(this.gl.getUniformLocation(program, "u_size"), resources.width, resources.height);
1813
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_focusDepth"), options.focusDepth);
1814
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_focusRange"), options.focusRange);
1815
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_maxRadius"), options.maxRadius);
1816
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_depthNear"), depthRange.near);
1817
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_depthFar"), depthRange.far);
1818
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1819
+ return targetTexture;
1820
+ }
1821
+ executeNativeMotionBlurPass(sourceTexture, resources, options, vertexArray, targetIndex) {
1822
+ const velocityTexture = this.motionBlurVelocityTexture;
1823
+ if (!velocityTexture) {
1824
+ throw new RenderDeviceError("WebGL2 motion-blur velocity texture was not initialized", "WEBGL_ALLOCATION_FAILED");
1825
+ }
1826
+ const program = this.ensureMotionBlurProgram();
1827
+ const targetTexture = resources.textures[targetIndex];
1828
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, resources.framebuffers[targetIndex]);
1829
+ this.gl.viewport(0, 0, resources.width, resources.height);
1830
+ this.gl.useProgram(program);
1831
+ this.gl.bindVertexArray(vertexArray);
1832
+ this.bindFullscreenTexture(0, sourceTexture);
1833
+ this.bindFullscreenTexture(1, velocityTexture);
1834
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1835
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_velocity"), 1);
1836
+ this.gl.uniform2i(this.gl.getUniformLocation(program, "u_size"), resources.width, resources.height);
1837
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_samples"), options.samples);
1838
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_scale"), options.scale);
1839
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1840
+ return targetTexture;
1841
+ }
1842
+ executeNativeTaaPass(sourceTexture, resources, options, vertexArray, targetIndex) {
1843
+ const historyTexture = this.taaHistoryTexture;
1844
+ if (!historyTexture) {
1845
+ throw new RenderDeviceError("WebGL2 TAA history texture was not initialized", "WEBGL_ALLOCATION_FAILED");
1846
+ }
1847
+ const program = this.ensureTaaProgram();
1848
+ const targetTexture = resources.textures[targetIndex];
1849
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, resources.framebuffers[targetIndex]);
1850
+ this.gl.viewport(0, 0, resources.width, resources.height);
1851
+ this.gl.useProgram(program);
1852
+ this.gl.bindVertexArray(vertexArray);
1853
+ this.bindFullscreenTexture(0, sourceTexture);
1854
+ this.bindFullscreenTexture(1, historyTexture);
1855
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1856
+ this.gl.uniform1i(this.gl.getUniformLocation(program, "u_history"), 1);
1857
+ this.gl.uniform1f(this.gl.getUniformLocation(program, "u_blend"), options.blend);
1858
+ this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1859
+ return targetTexture;
1860
+ }
1861
+ bindFullscreenTexture(unit, texture) {
1862
+ this.gl.activeTexture(this.gl.TEXTURE0 + unit);
1863
+ this.gl.bindTexture(this.gl.TEXTURE_2D, texture);
1864
+ this.gl.bindSampler(unit, null);
1865
+ }
1866
+ disposeBloomPingPongResources() {
1867
+ if (!this.bloomPingPongResources)
1868
+ return;
1869
+ for (const texture of this.bloomPingPongResources.textures)
1870
+ this.gl.deleteTexture(texture);
1871
+ for (const framebuffer of this.bloomPingPongResources.framebuffers)
1872
+ this.gl.deleteFramebuffer(framebuffer);
1873
+ this.bloomPingPongResources = null;
1874
+ }
1875
+ /**
1876
+ * Diagnostics for the most recent native bloom execution (muse3jsparity-PRD
1877
+ * A1). Null when no native bloom pass has run yet on this device.
1878
+ */
1879
+ getBloomDiagnostics() {
1880
+ return this.lastBloomDiagnostics;
1881
+ }
1882
+ recordBloomDiagnostics(options, sourceWidth, sourceHeight, hdr, mipCount) {
1883
+ const plan = resolveBloomPyramidPlan(sourceWidth, sourceHeight, options.quality, hdr);
1884
+ const pingPongBytes = sourceWidth * sourceHeight * 4 * (hdr ? 2 : 1) * 2;
1885
+ const bytesPerChannel = plan.halfFloat ? 2 : 1;
1886
+ const level0 = plan.mips[0];
1887
+ const accumulatorBytes = level0.width * level0.height * 4 * bytesPerChannel;
1888
+ this.lastBloomDiagnostics = {
1889
+ quality: options.quality,
1890
+ mipCount,
1891
+ targetCount: options.quality === "performance" ? 2 : plan.mips.length * 2 + 1,
1892
+ targetBytes: (options.quality === "performance" ? pingPongBytes : plan.targetBytes + accumulatorBytes + pingPongBytes),
1893
+ compositeGain: options.intensity * resolveBloomPyramidResponseGain(plan),
1894
+ threshold: options.threshold,
1895
+ intensity: options.intensity,
1896
+ softKnee: options.softKnee,
1897
+ shoulder: options.shoulder,
1898
+ halfFloat: hdr || plan.halfFloat,
1899
+ };
1900
+ }
1901
+ /**
1902
+ * PART U: every live GPU allocation with bytes + lane owner — registry
1903
+ * render targets (B1 shadow maps arrive labeled, B4 captures arrive as
1904
+ * `-mirror-target`/`-scene-color-target`) plus the raw-handle residents the
1905
+ * registry set cannot see: the A1 bloom pyramid (two targets per mip plus
1906
+ * two level-0 accumulators), the legacy bloom ping-pong pair, the A1/A3
1907
+ * lookup textures, and the motion-blur/taa history textures. The
1908
+ * depth-readback scratch pair is intentionally absent: it is allocated and
1909
+ * deleted inside one synchronous call, so it is never live at a diagnostics
1910
+ * boundary. A5 volumetric light, C4 decals, and the G1 SDF atlas own no GPU
1911
+ * target (forward uniforms + CPU kernel, CPU geometry, CPU atlas data), so
1912
+ * no entry is emitted for them; a target appearing under their owner would
1913
+ * be the signal that the lane grew one.
1914
+ */
1915
+ describeGpuTargetInventory(liveRenderTargets) {
1916
+ const entries = liveRenderTargets.map((target) => ({
1917
+ label: target.label,
1918
+ kind: "render-target",
1919
+ bytes: target.colorTexture.byteLength + (target.depthTexture?.byteLength ?? 0),
1920
+ owner: resolveGpuTargetOwner(target.label)
1921
+ }));
1922
+ const pyramid = this.bloomPyramidResources;
1923
+ if (pyramid) {
1924
+ const bytesPerPixel = pyramid.hdr ? 8 : 4;
1925
+ pyramid.plan.mips.forEach((mip, index) => {
1926
+ for (const side of ["a", "b"]) {
1927
+ entries.push({
1928
+ label: `bloom-pyramid-mip${index}${side}`,
1929
+ kind: "pyramid-mip",
1930
+ bytes: mip.width * mip.height * bytesPerPixel,
1931
+ owner: "a1-bloom"
1932
+ });
1933
+ }
1934
+ });
1935
+ const level0 = pyramid.plan.mips[0];
1936
+ if (level0) {
1937
+ for (const side of ["a", "b"]) {
1938
+ entries.push({
1939
+ label: `bloom-pyramid-accumulator-${side}`,
1940
+ kind: "pyramid-accumulator",
1941
+ bytes: level0.width * level0.height * bytesPerPixel,
1942
+ owner: "a1-bloom"
1943
+ });
1944
+ }
1945
+ }
1946
+ }
1947
+ const pingPong = this.bloomPingPongResources;
1948
+ if (pingPong) {
1949
+ const bytesPerPixel = pingPong.hdr ? 8 : 4;
1950
+ for (const side of ["a", "b"]) {
1951
+ entries.push({
1952
+ label: `bloom-ping-pong-${side}`,
1953
+ kind: "ping-pong",
1954
+ bytes: pingPong.width * pingPong.height * bytesPerPixel,
1955
+ owner: "a1-bloom"
1956
+ });
1957
+ }
1958
+ }
1959
+ if (this.bloomBrightLutTexture) {
1960
+ entries.push({
1961
+ label: "bloom-bright-lut",
1962
+ kind: "lut",
1963
+ bytes: BLOOM_BRIGHT_LUT_WIDTH * BLOOM_BRIGHT_LUT_HEIGHT * 4,
1964
+ owner: "a1-bloom"
1965
+ });
1966
+ }
1967
+ if (this.bloomCompositeLutTexture) {
1968
+ entries.push({
1969
+ label: "bloom-composite-lut",
1970
+ kind: "lut",
1971
+ bytes: BLOOM_COMPOSITE_LUT_SIZE * BLOOM_COMPOSITE_LUT_SIZE * 4,
1972
+ owner: "a1-bloom"
1973
+ });
1974
+ }
1975
+ if (this.outlineBlendLutTexture) {
1976
+ entries.push({ label: "outline-blend-lut", kind: "lut", bytes: OUTLINE_BLEND_LUT_WIDTH * 4, owner: "post" });
1977
+ }
1978
+ if (this.motionBlurVelocityTexture && this.motionBlurVelocitySize) {
1979
+ entries.push({
1980
+ label: "motion-blur-velocity",
1981
+ kind: "history",
1982
+ bytes: this.motionBlurVelocitySize.width * this.motionBlurVelocitySize.height * 8,
1983
+ owner: "post"
1984
+ });
1985
+ }
1986
+ if (this.taaHistoryTexture && this.taaHistorySize) {
1987
+ entries.push({
1988
+ label: "taa-history",
1989
+ kind: "history",
1990
+ bytes: this.taaHistorySize.width * this.taaHistorySize.height * 4,
1991
+ owner: "post"
1992
+ });
1993
+ }
1994
+ return entries;
1995
+ }
1996
+ disposeBloomPyramidResources() {
1997
+ if (!this.bloomPyramidResources)
1998
+ return;
1999
+ for (const texture of this.bloomPyramidResources.textures)
2000
+ this.gl.deleteTexture(texture);
2001
+ for (const framebuffer of this.bloomPyramidResources.framebuffers)
2002
+ this.gl.deleteFramebuffer(framebuffer);
2003
+ this.gl.deleteTexture(this.bloomPyramidResources.accumulatorTextureA);
2004
+ this.gl.deleteFramebuffer(this.bloomPyramidResources.accumulatorFramebufferA);
2005
+ this.gl.deleteTexture(this.bloomPyramidResources.accumulatorTextureB);
2006
+ this.gl.deleteFramebuffer(this.bloomPyramidResources.accumulatorFramebufferB);
2007
+ this.bloomPyramidResources = null;
2008
+ }
2009
+ /**
2010
+ * Mip-chain targets for the balanced/cinematic bloom pyramid. Each level is a
2011
+ * single texture+framebuffer at the planned size with linear filtering so the
2012
+ * downsample and accumulate passes can sample across levels. Half-float backs
2013
+ * the chain when the source is HDR or the cinematic preset requests it.
2014
+ */
2015
+ ensureBloomPyramidResources(plan, hdr) {
2016
+ const current = this.bloomPyramidResources;
2017
+ if (current && current.plan.quality === plan.quality && current.hdr === (hdr || plan.halfFloat) &&
2018
+ current.plan.mips.length === plan.mips.length &&
2019
+ current.plan.mips.every((mip, index) => mip.width === plan.mips[index].width && mip.height === plan.mips[index].height)) {
2020
+ return current;
2021
+ }
2022
+ this.disposeBloomPyramidResources();
2023
+ const textureUnit0 = this.captureTextureUnit0();
2024
+ const previousFramebuffer = this.gl.getParameter(this.gl.FRAMEBUFFER_BINDING);
2025
+ const textures = [];
2026
+ const framebuffers = [];
2027
+ const useHalfFloat = hdr || plan.halfFloat;
2028
+ const allocateTarget = (width, height, label) => {
2029
+ const texture = this.gl.createTexture();
2030
+ const framebuffer = this.gl.createFramebuffer();
2031
+ if (!texture || !framebuffer) {
2032
+ if (texture)
2033
+ this.gl.deleteTexture(texture);
2034
+ if (framebuffer)
2035
+ this.gl.deleteFramebuffer(framebuffer);
2036
+ throw new RenderDeviceError(`Failed to allocate WebGL2 bloom pyramid ${label}`, "WEBGL_ALLOCATION_FAILED", { width, height });
2037
+ }
2038
+ textures.push(texture);
2039
+ framebuffers.push(framebuffer);
2040
+ this.gl.bindTexture(this.gl.TEXTURE_2D, texture);
2041
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR);
2042
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);
2043
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
2044
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
2045
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, useHalfFloat ? this.gl.RGBA16F : this.gl.RGBA8, width, height, 0, this.gl.RGBA, useHalfFloat ? this.gl.HALF_FLOAT : this.gl.UNSIGNED_BYTE, null);
2046
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebuffer);
2047
+ this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER, this.gl.COLOR_ATTACHMENT0, this.gl.TEXTURE_2D, texture, 0);
2048
+ const status = this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER);
2049
+ if (status !== this.gl.FRAMEBUFFER_COMPLETE) {
2050
+ throw new RenderDeviceError("WebGL2 bloom pyramid framebuffer status is invalid", "FRAMEBUFFER_INVALID", { width, height, status });
2051
+ }
2052
+ return { texture, framebuffer };
2053
+ };
2054
+ try {
2055
+ // Two ping-pong targets per mip (separable blur needs distinct read/write
2056
+ // targets at the same size), plus two level-0-sized accumulators: the
2057
+ // weighted sum ping-pongs between them so no pass ever samples the
2058
+ // texture of its own bound framebuffer (feedback loop).
2059
+ for (const mip of plan.mips) {
2060
+ allocateTarget(mip.width, mip.height, "mip");
2061
+ allocateTarget(mip.width, mip.height, "mip");
2062
+ }
2063
+ const level0 = plan.mips[0];
2064
+ const accumulatorA = allocateTarget(level0.width, level0.height, "accumulator-a");
2065
+ const accumulatorB = allocateTarget(level0.width, level0.height, "accumulator-b");
2066
+ const finalResources = {
2067
+ plan,
2068
+ hdr: useHalfFloat,
2069
+ textures,
2070
+ framebuffers,
2071
+ accumulatorTextureA: accumulatorA.texture,
2072
+ accumulatorFramebufferA: accumulatorA.framebuffer,
2073
+ accumulatorTextureB: accumulatorB.texture,
2074
+ accumulatorFramebufferB: accumulatorB.framebuffer
2075
+ };
2076
+ this.bloomPyramidResources = finalResources;
2077
+ return finalResources;
2078
+ }
2079
+ catch (error) {
2080
+ for (const texture of textures)
2081
+ this.gl.deleteTexture(texture);
2082
+ for (const framebuffer of framebuffers)
2083
+ this.gl.deleteFramebuffer(framebuffer);
2084
+ throw error;
2085
+ }
2086
+ finally {
2087
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, previousFramebuffer);
2088
+ this.restoreTextureUnit0(textureUnit0);
2089
+ this.stateCache.invalidate();
2090
+ }
2091
+ }
2092
+ captureTextureUnit0() {
2093
+ const activeTexture = this.gl.getParameter(this.gl.ACTIVE_TEXTURE);
2094
+ this.gl.activeTexture(this.gl.TEXTURE0);
2095
+ return {
2096
+ activeTexture,
2097
+ texture2d: this.gl.getParameter(this.gl.TEXTURE_BINDING_2D),
2098
+ sampler: this.gl.getParameter(this.gl.SAMPLER_BINDING)
2099
+ };
2100
+ }
2101
+ restoreTextureUnit0(snapshot) {
2102
+ this.gl.activeTexture(this.gl.TEXTURE0);
2103
+ this.gl.bindTexture(this.gl.TEXTURE_2D, snapshot.texture2d);
2104
+ this.gl.bindSampler(0, snapshot.sampler);
2105
+ this.gl.activeTexture(snapshot.activeTexture);
2106
+ }
2107
+ captureTextureUnitBinding(unit) {
2108
+ this.gl.activeTexture(this.gl.TEXTURE0 + unit);
2109
+ return {
2110
+ texture2d: this.gl.getParameter(this.gl.TEXTURE_BINDING_2D),
2111
+ sampler: this.gl.getParameter(this.gl.SAMPLER_BINDING)
2112
+ };
2113
+ }
2114
+ restoreTextureUnitBinding(unit, snapshot) {
2115
+ this.gl.activeTexture(this.gl.TEXTURE0 + unit);
2116
+ this.gl.bindTexture(this.gl.TEXTURE_2D, snapshot.texture2d);
2117
+ this.gl.bindSampler(unit, snapshot.sampler);
2118
+ }
2119
+ prepareFullscreenPresentation(framebuffer, outputWidth, outputHeight) {
2120
+ const textureUnit0 = this.captureTextureUnit0();
2121
+ const textureUnit1 = this.captureTextureUnitBinding(1);
2122
+ const textureUnit2 = this.captureTextureUnitBinding(2);
2123
+ this.gl.activeTexture(textureUnit0.activeTexture);
2124
+ const snapshot = {
2125
+ framebuffer: this.gl.getParameter(this.gl.FRAMEBUFFER_BINDING),
2126
+ program: this.gl.getParameter(this.gl.CURRENT_PROGRAM),
2127
+ textureUnit0,
2128
+ textureUnit1,
2129
+ textureUnit2,
2130
+ vertexArray: this.gl.getParameter(this.gl.VERTEX_ARRAY_BINDING),
2131
+ viewport: this.gl.getParameter(this.gl.VIEWPORT),
2132
+ colorMask: this.gl.getParameter(this.gl.COLOR_WRITEMASK),
2133
+ depthTestEnabled: this.gl.isEnabled(this.gl.DEPTH_TEST),
2134
+ cullFaceEnabled: this.gl.isEnabled(this.gl.CULL_FACE),
2135
+ blendEnabled: this.gl.isEnabled(this.gl.BLEND),
2136
+ scissorTestEnabled: this.gl.isEnabled(this.gl.SCISSOR_TEST),
2137
+ stencilTestEnabled: this.gl.isEnabled(this.gl.STENCIL_TEST),
2138
+ polygonOffsetFillEnabled: this.gl.isEnabled(this.gl.POLYGON_OFFSET_FILL),
2139
+ depthMask: this.gl.getParameter(this.gl.DEPTH_WRITEMASK)
2140
+ };
2141
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebuffer);
2142
+ this.gl.viewport(0, 0, outputWidth, outputHeight);
2143
+ this.gl.colorMask(true, true, true, true);
2144
+ this.gl.disable(this.gl.SCISSOR_TEST);
2145
+ this.gl.disable(this.gl.STENCIL_TEST);
2146
+ this.gl.disable(this.gl.POLYGON_OFFSET_FILL);
2147
+ this.gl.disable(this.gl.DEPTH_TEST);
2148
+ this.gl.disable(this.gl.CULL_FACE);
2149
+ this.gl.disable(this.gl.BLEND);
2150
+ this.gl.depthMask(false);
2151
+ return snapshot;
2152
+ }
2153
+ restoreFullscreenPresentationState(snapshot, fallbackWidth, fallbackHeight) {
2154
+ this.gl.bindVertexArray(snapshot.vertexArray);
2155
+ this.restoreTextureUnitBinding(2, snapshot.textureUnit2);
2156
+ this.restoreTextureUnitBinding(1, snapshot.textureUnit1);
2157
+ this.restoreTextureUnit0(snapshot.textureUnit0);
2158
+ this.gl.useProgram(snapshot.program);
2159
+ if (snapshot.depthTestEnabled)
2160
+ this.gl.enable(this.gl.DEPTH_TEST);
2161
+ else
2162
+ this.gl.disable(this.gl.DEPTH_TEST);
2163
+ if (snapshot.cullFaceEnabled)
2164
+ this.gl.enable(this.gl.CULL_FACE);
2165
+ else
2166
+ this.gl.disable(this.gl.CULL_FACE);
2167
+ if (snapshot.blendEnabled)
2168
+ this.gl.enable(this.gl.BLEND);
2169
+ else
2170
+ this.gl.disable(this.gl.BLEND);
2171
+ if (snapshot.scissorTestEnabled)
2172
+ this.gl.enable(this.gl.SCISSOR_TEST);
2173
+ else
2174
+ this.gl.disable(this.gl.SCISSOR_TEST);
2175
+ if (snapshot.stencilTestEnabled)
2176
+ this.gl.enable(this.gl.STENCIL_TEST);
2177
+ else
2178
+ this.gl.disable(this.gl.STENCIL_TEST);
2179
+ if (snapshot.polygonOffsetFillEnabled)
2180
+ this.gl.enable(this.gl.POLYGON_OFFSET_FILL);
2181
+ else
2182
+ this.gl.disable(this.gl.POLYGON_OFFSET_FILL);
2183
+ this.gl.colorMask(snapshot.colorMask[0] ?? true, snapshot.colorMask[1] ?? true, snapshot.colorMask[2] ?? true, snapshot.colorMask[3] ?? true);
2184
+ this.gl.depthMask(snapshot.depthMask);
2185
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, snapshot.framebuffer);
2186
+ this.gl.viewport(snapshot.viewport[0] ?? 0, snapshot.viewport[1] ?? 0, snapshot.viewport[2] ?? fallbackWidth, snapshot.viewport[3] ?? fallbackHeight);
2187
+ this.stateCache.invalidate();
2188
+ }
2189
+ ensurePresentationVertexArray() {
2190
+ if (this.presentationVertexArray)
2191
+ return this.presentationVertexArray;
2192
+ const vertexArray = this.gl.createVertexArray();
2193
+ if (!vertexArray) {
2194
+ throw new RenderDeviceError("Failed to allocate WebGL presentation vertex array", "WEBGL_ALLOCATION_FAILED");
2195
+ }
2196
+ this.presentationVertexArray = vertexArray;
2197
+ return vertexArray;
2198
+ }
2199
+ ensureDepthReadbackProgram() {
2200
+ if (this.depthReadbackProgram) {
2201
+ return this.depthReadbackProgram;
2202
+ }
2203
+ const vertex = this.compileShader(this.gl.VERTEX_SHADER, `#version 300 es
2204
+ precision highp float;
2205
+ out vec2 v_uv;
2206
+ void main() {
2207
+ vec2 position = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));
2208
+ v_uv = position;
2209
+ gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
2210
+ }
2211
+ `, "webgl2-depth-readback");
2212
+ const fragment = this.compileShader(this.gl.FRAGMENT_SHADER, `#version 300 es
2213
+ precision highp float;
2214
+ uniform sampler2D u_depth;
2215
+ uniform vec4 u_sourceRect;
2216
+ in vec2 v_uv;
2217
+ out vec4 outColor;
2218
+ vec3 packDepth24(float value) {
2219
+ value = clamp(value, 0.0, 1.0);
2220
+ vec3 encoded = fract(value * vec3(1.0, 255.0, 65025.0));
2221
+ encoded -= encoded.yzz * vec3(1.0 / 255.0, 1.0 / 255.0, 0.0);
2222
+ return encoded;
2223
+ }
2224
+ void main() {
2225
+ vec2 uv = u_sourceRect.xy + v_uv * u_sourceRect.zw;
2226
+ outColor = vec4(packDepth24(texture(u_depth, uv).r), 1.0);
2227
+ }
2228
+ `, "webgl2-depth-readback");
2229
+ const program = this.gl.createProgram();
2230
+ if (!program) {
2231
+ this.gl.deleteShader(vertex);
2232
+ this.gl.deleteShader(fragment);
2233
+ throw new RenderDeviceError("Failed to allocate WebGL2 depth readback shader", "WEBGL_ALLOCATION_FAILED");
2234
+ }
2235
+ this.gl.attachShader(program, vertex);
2236
+ this.gl.attachShader(program, fragment);
2237
+ this.gl.linkProgram(program);
2238
+ this.gl.deleteShader(vertex);
2239
+ this.gl.deleteShader(fragment);
2240
+ if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
2241
+ const log = this.gl.getProgramInfoLog(program) ?? "Unknown depth readback shader link error";
2242
+ this.gl.deleteProgram(program);
2243
+ throw new RenderDeviceError("WebGL2 depth readback shader link failed", "SHADER_LINK_FAILED", { log });
2244
+ }
2245
+ this.depthReadbackProgram = program;
2246
+ return program;
2247
+ }
2248
+ ensurePresentationProgram() {
2249
+ if (this.presentationProgram) {
2250
+ return this.presentationProgram;
2251
+ }
2252
+ const vertex = this.compileShader(this.gl.VERTEX_SHADER, `#version 300 es
2253
+ precision highp float;
2254
+ out vec2 v_uv;
2255
+ void main() {
2256
+ vec2 position = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));
2257
+ v_uv = position;
2258
+ gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
2259
+ }
2260
+ `, "webgl2-present-render-target");
2261
+ const fragment = this.compileShader(this.gl.FRAGMENT_SHADER, `#version 300 es
2262
+ precision highp float;
2263
+ uniform sampler2D u_source;
2264
+ in vec2 v_uv;
2265
+ out vec4 outColor;
2266
+ void main() {
2267
+ outColor = texture(u_source, v_uv);
2268
+ }
2269
+ `, "webgl2-present-render-target");
2270
+ const program = this.gl.createProgram();
2271
+ if (!program) {
2272
+ this.gl.deleteShader(vertex);
2273
+ this.gl.deleteShader(fragment);
2274
+ throw new RenderDeviceError("Failed to allocate WebGL presentation shader", "WEBGL_ALLOCATION_FAILED");
2275
+ }
2276
+ this.gl.attachShader(program, vertex);
2277
+ this.gl.attachShader(program, fragment);
2278
+ this.gl.linkProgram(program);
2279
+ this.gl.deleteShader(vertex);
2280
+ this.gl.deleteShader(fragment);
2281
+ if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
2282
+ const log = this.gl.getProgramInfoLog(program) ?? "Unknown presentation shader link error";
2283
+ this.gl.deleteProgram(program);
2284
+ throw new RenderDeviceError("WebGL presentation shader link failed", "SHADER_LINK_FAILED", { log });
2285
+ }
2286
+ this.presentationProgram = program;
2287
+ return program;
2288
+ }
2289
+ ensureBloomBrightExtractProgram() {
2290
+ if (this.bloomBrightExtractProgram) {
2291
+ return this.bloomBrightExtractProgram;
2292
+ }
2293
+ this.bloomBrightExtractProgram = this.createFullscreenProgram(`#version 300 es
2294
+ precision highp float;
2295
+ precision highp int;
2296
+ uniform sampler2D u_source;
2297
+ uniform sampler2D u_brightLut;
2298
+ uniform int u_hdr;
2299
+ uniform float u_threshold;
2300
+ uniform float u_softKnee;
2301
+ out vec4 outColor;
2302
+
2303
+ uvec4 byteTexel(sampler2D source, ivec2 coordinate) {
2304
+ return uvec4(texelFetch(source, coordinate, 0) * 255.0 + 0.5);
2305
+ }
2306
+
2307
+ void main() {
2308
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2309
+ if (u_hdr == 1) {
2310
+ vec4 source = texelFetch(u_source, pixel, 0);
2311
+ float luma = dot(source.rgb, vec3(0.2126, 0.7152, 0.0722));
2312
+ float kneeLow = max(u_threshold - u_softKnee, 0.0);
2313
+ float kneeHigh = min(u_threshold + u_softKnee, 1.0);
2314
+ float weight = u_softKnee <= 0.0
2315
+ ? (luma >= u_threshold ? 1.0 : 0.0)
2316
+ : smoothstep(kneeLow, kneeHigh, luma);
2317
+ outColor = source * weight;
2318
+ return;
2319
+ }
2320
+ uvec4 source = byteTexel(u_source, pixel);
2321
+ uint colorIndex = (source.r << 16u) | (source.g << 8u) | source.b;
2322
+ uint byteIndex = colorIndex >> 3u;
2323
+ uint texelIndex = byteIndex >> 2u;
2324
+ ivec2 lutCoordinate = ivec2(
2325
+ int(texelIndex % ${BLOOM_BRIGHT_LUT_WIDTH}u),
2326
+ int(texelIndex / ${BLOOM_BRIGHT_LUT_WIDTH}u)
2327
+ );
2328
+ uvec4 packed = byteTexel(u_brightLut, lutCoordinate);
2329
+ uint component = byteIndex & 3u;
2330
+ uint packedByte = component == 0u
2331
+ ? packed.r
2332
+ : component == 1u
2333
+ ? packed.g
2334
+ : component == 2u
2335
+ ? packed.b
2336
+ : packed.a;
2337
+ bool bright = ((packedByte >> (colorIndex & 7u)) & 1u) == 1u;
2338
+ outColor = bright ? vec4(source) / 255.0 : vec4(0.0);
2339
+ }
2340
+ `, "webgl2-bloom-bright-extract");
2341
+ return this.bloomBrightExtractProgram;
2342
+ }
2343
+ ensureBloomBlurProgram() {
2344
+ if (this.bloomBlurProgram) {
2345
+ return this.bloomBlurProgram;
2346
+ }
2347
+ this.bloomBlurProgram = this.createFullscreenProgram(`#version 300 es
2348
+ precision highp float;
2349
+ precision highp int;
2350
+ uniform sampler2D u_source;
2351
+ uniform ivec2 u_size;
2352
+ uniform int u_radius;
2353
+ uniform int u_horizontal;
2354
+ uniform int u_hdr;
2355
+ out vec4 outColor;
2356
+
2357
+ vec4 sourcePixel(ivec2 coordinate) {
2358
+ return texelFetch(u_source, clamp(coordinate, ivec2(0), u_size - ivec2(1)), 0);
2359
+ }
2360
+
2361
+ void main() {
2362
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2363
+ float sigma = max(float(u_radius) / 3.0, 0.5);
2364
+ float coefficient = 0.39894 / sigma;
2365
+ vec4 sum = sourcePixel(pixel) * coefficient;
2366
+ float weightSum = coefficient;
2367
+ for (int offset = 1; offset <= 16; offset += 1) {
2368
+ if (offset > u_radius) continue;
2369
+ float distance = float(offset);
2370
+ float weight = coefficient * exp(-0.5 * distance * distance / (sigma * sigma));
2371
+ ivec2 delta = u_horizontal == 1 ? ivec2(offset, 0) : ivec2(0, offset);
2372
+ sum += (sourcePixel(pixel + delta) + sourcePixel(pixel - delta)) * weight;
2373
+ weightSum += 2.0 * weight;
2374
+ }
2375
+ outColor = sum / max(weightSum, 0.000001);
2376
+ }
2377
+ `, "webgl2-bloom-blur");
2378
+ return this.bloomBlurProgram;
2379
+ }
2380
+ ensureBloomCompositeProgram() {
2381
+ if (this.bloomCompositeProgram) {
2382
+ return this.bloomCompositeProgram;
2383
+ }
2384
+ this.bloomCompositeProgram = this.createFullscreenProgram(`#version 300 es
2385
+ precision highp float;
2386
+ precision highp int;
2387
+ uniform sampler2D u_source;
2388
+ uniform sampler2D u_blurred;
2389
+ uniform sampler2D u_compositeLut;
2390
+ uniform int u_hdr;
2391
+ uniform float u_intensity;
2392
+ out vec4 outColor;
2393
+
2394
+ uvec4 byteTexel(sampler2D source, ivec2 coordinate) {
2395
+ return uvec4(texelFetch(source, coordinate, 0) * 255.0 + 0.5);
2396
+ }
2397
+
2398
+ float compositeChannel(uint source, uint blurred) {
2399
+ return texelFetch(u_compositeLut, ivec2(int(source), int(blurred)), 0).r;
2400
+ }
2401
+
2402
+ void main() {
2403
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2404
+ if (u_hdr == 1) {
2405
+ vec4 source = texelFetch(u_source, pixel, 0);
2406
+ vec3 blurred = texelFetch(u_blurred, pixel, 0).rgb;
2407
+ outColor = vec4(source.rgb + blurred * u_intensity, source.a);
2408
+ return;
2409
+ }
2410
+ uvec4 source = byteTexel(u_source, pixel);
2411
+ uvec4 blurred = byteTexel(u_blurred, pixel);
2412
+ outColor = vec4(
2413
+ compositeChannel(source.r, blurred.r),
2414
+ compositeChannel(source.g, blurred.g),
2415
+ compositeChannel(source.b, blurred.b),
2416
+ float(source.a) / 255.0
2417
+ );
2418
+ }
2419
+ `, "webgl2-bloom-composite");
2420
+ return this.bloomCompositeProgram;
2421
+ }
2422
+ ensureBloomDownsampleProgram() {
2423
+ if (this.bloomDownsampleProgram)
2424
+ return this.bloomDownsampleProgram;
2425
+ this.bloomDownsampleProgram = this.createFullscreenProgram(`#version 300 es
2426
+ precision highp float;
2427
+ uniform sampler2D u_source;
2428
+ uniform vec2 u_texelSize;
2429
+ uniform vec2 u_targetSize;
2430
+ out vec4 outColor;
2431
+ void main() {
2432
+ // gl_FragCoord is expressed in destination pixels. Normalize by the
2433
+ // destination size so every downsample covers the complete source image;
2434
+ // multiplying by source texel size cropped a half-size target to the
2435
+ // lower-left quarter of the preceding level.
2436
+ vec2 uv = gl_FragCoord.xy / u_targetSize;
2437
+ vec2 e = u_texelSize * 0.5;
2438
+ vec4 sum = texture(u_source, uv - e) + texture(u_source, uv + vec2(e.x, -e.y))
2439
+ + texture(u_source, uv + vec2(-e.x, e.y)) + texture(u_source, uv + e);
2440
+ outColor = sum * 0.25;
2441
+ }
2442
+ `, "webgl2-bloom-downsample");
2443
+ return this.bloomDownsampleProgram;
2444
+ }
2445
+ ensureBloomAccumulateProgram() {
2446
+ if (this.bloomAccumulateProgram)
2447
+ return this.bloomAccumulateProgram;
2448
+ this.bloomAccumulateProgram = this.createFullscreenProgram(`#version 300 es
2449
+ precision highp float;
2450
+ uniform sampler2D u_base;
2451
+ uniform sampler2D u_bloom;
2452
+ uniform float u_weight;
2453
+ out vec4 outColor;
2454
+ void main() {
2455
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2456
+ vec4 base = texelFetch(u_base, pixel, 0);
2457
+ vec2 uv = (vec2(pixel) + 0.5) / vec2(textureSize(u_base, 0));
2458
+ vec3 bloom = texture(u_bloom, uv).rgb;
2459
+ outColor = vec4(base.rgb + bloom * u_weight, base.a);
2460
+ }
2461
+ `, "webgl2-bloom-accumulate");
2462
+ return this.bloomAccumulateProgram;
2463
+ }
2464
+ ensureOutlineProgram() {
2465
+ if (this.outlineProgram)
2466
+ return this.outlineProgram;
2467
+ this.outlineProgram = this.createFullscreenProgram(`#version 300 es
2468
+ precision highp float;
2469
+ precision highp int;
2470
+ uniform sampler2D u_source;
2471
+ uniform sampler2D u_blendLut;
2472
+ uniform ivec2 u_size;
2473
+ uniform int u_width;
2474
+ uniform float u_boundHigh;
2475
+ uniform float u_boundLow;
2476
+ out vec4 outColor;
2477
+
2478
+ uvec4 sourceByte(ivec2 coordinate) {
2479
+ ivec2 bounded = clamp(coordinate, ivec2(0), u_size - ivec2(1));
2480
+ return uvec4(texelFetch(u_source, bounded, 0) * 255.0 + 0.5);
2481
+ }
2482
+
2483
+ uint lumaNumerator(ivec2 coordinate) {
2484
+ uvec3 source = sourceByte(coordinate).rgb;
2485
+ return 2126u * source.r + 7152u * source.g + 722u * source.b;
2486
+ }
2487
+
2488
+ uvec2 squareWords(int signedValue) {
2489
+ uint value = uint(abs(signedValue));
2490
+ uint high = value >> 12u;
2491
+ uint low = value & 4095u;
2492
+ uint middle = 2u * high * low;
2493
+ uint lowWord = low * low + (middle & 4095u) * 4096u;
2494
+ uint highWord = high * high + (middle >> 12u);
2495
+ highWord += lowWord / ${OUTLINE_LIMB_RADIX}u;
2496
+ lowWord %= ${OUTLINE_LIMB_RADIX}u;
2497
+ return uvec2(highWord, lowWord);
2498
+ }
2499
+
2500
+ bool edgeAt(ivec2 pixel) {
2501
+ int nw = int(lumaNumerator(pixel + ivec2(-1, -1)));
2502
+ int n = int(lumaNumerator(pixel + ivec2(0, -1)));
2503
+ int ne = int(lumaNumerator(pixel + ivec2(1, -1)));
2504
+ int w = int(lumaNumerator(pixel + ivec2(-1, 0)));
2505
+ int e = int(lumaNumerator(pixel + ivec2(1, 0)));
2506
+ int sw = int(lumaNumerator(pixel + ivec2(-1, 1)));
2507
+ int s = int(lumaNumerator(pixel + ivec2(0, 1)));
2508
+ int se = int(lumaNumerator(pixel + ivec2(1, 1)));
2509
+ int gx = -nw - 2 * w - sw + ne + 2 * e + se;
2510
+ int gy = -nw - 2 * n - ne + sw + 2 * s + se;
2511
+ uvec2 x = squareWords(gx);
2512
+ uvec2 y = squareWords(gy);
2513
+ uint low = x.y + y.y;
2514
+ uint high = x.x + y.x;
2515
+ if (low >= ${OUTLINE_LIMB_RADIX}u) {
2516
+ low -= ${OUTLINE_LIMB_RADIX}u;
2517
+ high += 1u;
2518
+ }
2519
+ uint boundHigh = uint(u_boundHigh);
2520
+ uint boundLow = uint(u_boundLow);
2521
+ return high != boundHigh ? high > boundHigh : low >= boundLow;
2522
+ }
2523
+
2524
+ void main() {
2525
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2526
+ bool outlined = false;
2527
+ for (int offsetY = -6; offsetY <= 6 && !outlined; offsetY += 1) {
2528
+ for (int offsetX = -6; offsetX <= 6; offsetX += 1) {
2529
+ if (abs(offsetX) > u_width || abs(offsetY) > u_width) continue;
2530
+ if (offsetX * offsetX + offsetY * offsetY > u_width * u_width) continue;
2531
+ ivec2 candidate = clamp(pixel + ivec2(offsetX, offsetY), ivec2(0), u_size - ivec2(1));
2532
+ if (edgeAt(candidate)) {
2533
+ outlined = true;
2534
+ break;
2535
+ }
2536
+ }
2537
+ }
2538
+ uvec4 source = sourceByte(pixel);
2539
+ if (!outlined) {
2540
+ outColor = vec4(source) / 255.0;
2541
+ return;
2542
+ }
2543
+ outColor = vec4(
2544
+ texelFetch(u_blendLut, ivec2(int(source.r), 0), 0).r,
2545
+ texelFetch(u_blendLut, ivec2(int(source.g), 0), 0).g,
2546
+ texelFetch(u_blendLut, ivec2(int(source.b), 0), 0).b,
2547
+ float(source.a) / 255.0
2548
+ );
2549
+ }
2550
+ `, "webgl2-outline");
2551
+ return this.outlineProgram;
2552
+ }
2553
+ ensureSsaoProgram() {
2554
+ if (this.ssaoProgram)
2555
+ return this.ssaoProgram;
2556
+ this.ssaoProgram = this.createFullscreenProgram(`#version 300 es
2557
+ precision highp float;
2558
+ precision highp int;
2559
+ uniform sampler2D u_source;
2560
+ uniform sampler2D u_depth;
2561
+ uniform ivec2 u_size;
2562
+ uniform int u_radius;
2563
+ uniform float u_intensity;
2564
+ uniform float u_bias;
2565
+ out vec4 outColor;
2566
+
2567
+ float depthAt(ivec2 coordinate) {
2568
+ return texelFetch(u_depth, clamp(coordinate, ivec2(0), u_size - ivec2(1)), 0).r;
2569
+ }
2570
+
2571
+ void main() {
2572
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2573
+ float centerDepth = depthAt(pixel);
2574
+ float occlusion = 0.0;
2575
+ float samples = 0.0;
2576
+ for (int stepY = -1; stepY <= 1; stepY += 1) {
2577
+ for (int stepX = -1; stepX <= 1; stepX += 1) {
2578
+ if (stepX == 0 && stepY == 0) continue;
2579
+ float sampleDepth = depthAt(pixel + ivec2(stepX * u_radius, stepY * u_radius));
2580
+ occlusion += clamp(
2581
+ (centerDepth - sampleDepth - u_bias) / (0.14 + float(u_radius) * 0.04),
2582
+ 0.0,
2583
+ 1.0
2584
+ );
2585
+ samples += 1.0;
2586
+ }
2587
+ }
2588
+ float factor = max(0.18, 1.0 - (occlusion / max(1.0, samples)) * u_intensity * 0.72);
2589
+ vec4 source = texelFetch(u_source, pixel, 0);
2590
+ outColor = vec4(source.rgb * factor, source.a);
2591
+ }
2592
+ `, "webgl2-ssao");
2593
+ return this.ssaoProgram;
2594
+ }
2595
+ ensureSsrProgram() {
2596
+ if (this.ssrProgram)
2597
+ return this.ssrProgram;
2598
+ this.ssrProgram = this.createFullscreenProgram(`#version 300 es
2599
+ precision highp float;
2600
+ precision highp int;
2601
+ uniform sampler2D u_source;
2602
+ uniform sampler2D u_depth;
2603
+ uniform ivec2 u_size;
2604
+ uniform float u_intensity;
2605
+ uniform int u_maxDistance;
2606
+ uniform float u_depthNear;
2607
+ uniform float u_depthFar;
2608
+ out vec4 outColor;
2609
+
2610
+ // Raw GL depth is nonlinear (0.1/1000 defaults park the play area past 0.97),
2611
+ // so every depth-gated comparison below runs on linearized depth. The CPU
2612
+ // byte kernel keeps fixture-unit semantics; the divergence is documented at
2613
+ // normalizeLdrDepthRange.
2614
+ float a3dSsrLinearDepth(float depth) {
2615
+ float viewZ = u_depthNear * u_depthFar / max(u_depthFar - depth * (u_depthFar - u_depthNear), 0.0001);
2616
+ return clamp((viewZ - u_depthNear) / max(u_depthFar - u_depthNear, 0.0001), 0.0, 1.0);
2617
+ }
2618
+
2619
+ void main() {
2620
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2621
+ vec4 target = texelFetch(u_source, pixel, 0);
2622
+ float linearDepth = a3dSsrLinearDepth(texelFetch(u_depth, pixel, 0).r);
2623
+ int rayDistance = max(1, int(round((1.0 - linearDepth) * float(u_maxDistance))));
2624
+ int direction = pixel.x < u_size.x / 2 ? 1 : -1;
2625
+ ivec2 samplePixel = ivec2(
2626
+ clamp(pixel.x + direction * rayDistance, 0, u_size.x - 1),
2627
+ clamp(u_size.y - 1 - pixel.y, 0, u_size.y - 1)
2628
+ );
2629
+ vec3 reflected = texelFetch(u_source, samplePixel, 0).rgb;
2630
+ float sourceLuma = (reflected.r + reflected.g + reflected.b) / 3.0;
2631
+ if (sourceLuma < 0.18 || linearDepth > 0.995) {
2632
+ outColor = target;
2633
+ return;
2634
+ }
2635
+ float boost = sourceLuma * u_intensity * (1.0 - linearDepth);
2636
+ outColor = vec4(clamp(target.rgb + reflected * boost, 0.0, 1.0), target.a);
2637
+ }
2638
+ `, "webgl2-ssr");
2639
+ return this.ssrProgram;
2640
+ }
2641
+ ensureDepthOfFieldProgram() {
2642
+ if (this.depthOfFieldProgram)
2643
+ return this.depthOfFieldProgram;
2644
+ this.depthOfFieldProgram = this.createFullscreenProgram(`#version 300 es
2645
+ precision highp float;
2646
+ precision highp int;
2647
+ uniform sampler2D u_source;
2648
+ uniform sampler2D u_depth;
2649
+ uniform ivec2 u_size;
2650
+ uniform float u_focusDepth;
2651
+ uniform float u_focusRange;
2652
+ uniform int u_maxRadius;
2653
+ uniform float u_depthNear;
2654
+ uniform float u_depthFar;
2655
+ out vec4 outColor;
2656
+
2657
+ // Same linearization contract as the SSR program, except focus is authored
2658
+ // directly as a linear-distance fraction (0 = near plane, 1 = far plane):
2659
+ // buffer-unit focus values are unusable once depth is linearized, because the
2660
+ // projection curve parks the whole play area inside a sliver of buffer units.
2661
+ // The CPU byte kernel keeps buffer-unit semantics; the divergence is
2662
+ // documented at normalizeLdrDepthRange.
2663
+ float a3dDofLinearDepth(float depth) {
2664
+ float viewZ = u_depthNear * u_depthFar / max(u_depthFar - depth * (u_depthFar - u_depthNear), 0.0001);
2665
+ return clamp((viewZ - u_depthNear) / max(u_depthFar - u_depthNear, 0.0001), 0.0, 1.0);
2666
+ }
2667
+
2668
+ void main() {
2669
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2670
+ vec4 source = texelFetch(u_source, pixel, 0);
2671
+ float linearDepth = a3dDofLinearDepth(texelFetch(u_depth, pixel, 0).r);
2672
+ float normalizedBlur = max(0.0, abs(linearDepth - u_focusDepth) - u_focusRange)
2673
+ / max(u_focusRange, 0.001) * float(u_maxRadius);
2674
+ int radius = min(u_maxRadius, int(round(normalizedBlur)));
2675
+ if (radius == 0) {
2676
+ outColor = source;
2677
+ return;
2678
+ }
2679
+ vec3 sum = vec3(0.0);
2680
+ float samples = 0.0;
2681
+ for (int offsetY = -8; offsetY <= 8; offsetY += 1) {
2682
+ for (int offsetX = -8; offsetX <= 8; offsetX += 1) {
2683
+ if (abs(offsetX) > radius || abs(offsetY) > radius) continue;
2684
+ if (offsetX * offsetX + offsetY * offsetY > radius * radius) continue;
2685
+ ivec2 samplePixel = clamp(pixel + ivec2(offsetX, offsetY), ivec2(0), u_size - ivec2(1));
2686
+ sum += texelFetch(u_source, samplePixel, 0).rgb;
2687
+ samples += 1.0;
2688
+ }
2689
+ }
2690
+ outColor = vec4(sum / max(1.0, samples), source.a);
2691
+ }
2692
+ `, "webgl2-depth-of-field");
2693
+ return this.depthOfFieldProgram;
2694
+ }
2695
+ ensureMotionBlurProgram() {
2696
+ if (this.motionBlurProgram)
2697
+ return this.motionBlurProgram;
2698
+ this.motionBlurProgram = this.createFullscreenProgram(`#version 300 es
2699
+ precision highp float;
2700
+ precision highp int;
2701
+ uniform sampler2D u_source;
2702
+ uniform sampler2D u_velocity;
2703
+ uniform ivec2 u_size;
2704
+ uniform int u_samples;
2705
+ uniform float u_scale;
2706
+ out vec4 outColor;
2707
+
2708
+ void main() {
2709
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2710
+ vec4 source = texelFetch(u_source, pixel, 0);
2711
+ vec2 velocity = texelFetch(u_velocity, pixel, 0).rg * u_scale;
2712
+ if (length(velocity) < 0.01) {
2713
+ outColor = source;
2714
+ return;
2715
+ }
2716
+ vec3 sum = vec3(0.0);
2717
+ for (int sampleIndex = 0; sampleIndex < 16; sampleIndex += 1) {
2718
+ if (sampleIndex >= u_samples) continue;
2719
+ float t = float(sampleIndex) / float(u_samples - 1) - 0.5;
2720
+ ivec2 samplePixel = ivec2(floor(vec2(pixel) - velocity * t + vec2(0.5)));
2721
+ samplePixel = clamp(samplePixel, ivec2(0), u_size - ivec2(1));
2722
+ sum += texelFetch(u_source, samplePixel, 0).rgb;
2723
+ }
2724
+ outColor = vec4(sum / float(u_samples), source.a);
2725
+ }
2726
+ `, "webgl2-motion-blur");
2727
+ return this.motionBlurProgram;
2728
+ }
2729
+ ensureTaaProgram() {
2730
+ if (this.taaProgram)
2731
+ return this.taaProgram;
2732
+ this.taaProgram = this.createFullscreenProgram(`#version 300 es
2733
+ precision highp float;
2734
+ uniform sampler2D u_source;
2735
+ uniform sampler2D u_history;
2736
+ uniform float u_blend;
2737
+ out vec4 outColor;
2738
+
2739
+ void main() {
2740
+ ivec2 pixel = ivec2(gl_FragCoord.xy);
2741
+ vec4 source = texelFetch(u_source, pixel, 0);
2742
+ vec3 history = texelFetch(u_history, pixel, 0).rgb;
2743
+ outColor = vec4(mix(source.rgb, history, u_blend), source.a);
2744
+ }
2745
+ `, "webgl2-taa");
2746
+ return this.taaProgram;
2747
+ }
2748
+ createFullscreenProgram(fragmentSource, label) {
2749
+ const vertex = this.compileShader(this.gl.VERTEX_SHADER, `#version 300 es
2750
+ precision highp float;
2751
+ void main() {
2752
+ vec2 position = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));
2753
+ gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
2754
+ }
2755
+ `, label);
2756
+ const fragment = this.compileShader(this.gl.FRAGMENT_SHADER, fragmentSource, label);
2757
+ const program = this.gl.createProgram();
2758
+ if (!program) {
2759
+ this.gl.deleteShader(vertex);
2760
+ this.gl.deleteShader(fragment);
2761
+ throw new RenderDeviceError("Failed to allocate WebGL2 fullscreen shader program", "WEBGL_ALLOCATION_FAILED", { label });
2762
+ }
2763
+ this.gl.attachShader(program, vertex);
2764
+ this.gl.attachShader(program, fragment);
2765
+ this.gl.linkProgram(program);
2766
+ this.gl.deleteShader(vertex);
2767
+ this.gl.deleteShader(fragment);
2768
+ if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
2769
+ const log = this.gl.getProgramInfoLog(program) ?? "Unknown fullscreen shader link error";
2770
+ this.gl.deleteProgram(program);
2771
+ throw new RenderDeviceError("WebGL2 fullscreen shader link failed", "SHADER_LINK_FAILED", { label, log });
2772
+ }
2773
+ return program;
2774
+ }
2775
+ ensureLdrPostprocessProgram() {
2776
+ if (this.ldrPostprocessProgram) {
2777
+ return this.ldrPostprocessProgram;
2778
+ }
2779
+ const vertex = this.compileShader(this.gl.VERTEX_SHADER, `#version 300 es
2780
+ precision highp float;
2781
+ out vec2 v_uv;
2782
+ void main() {
2783
+ vec2 position = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));
2784
+ v_uv = position;
2785
+ gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
2786
+ }
2787
+ `, "webgl2-ldr-postprocess");
2788
+ const fragment = this.compileShader(this.gl.FRAGMENT_SHADER, `#version 300 es
2789
+ precision highp float;
2790
+ uniform sampler2D u_source;
2791
+ uniform vec2 u_texelSize;
2792
+ uniform int u_hasToneMapping;
2793
+ uniform int u_toneOperator;
2794
+ uniform int u_inputColorSpace;
2795
+ uniform int u_outputColorSpace;
2796
+ uniform float u_exposure;
2797
+ uniform float u_whitePoint;
2798
+ uniform float u_gamma;
2799
+ uniform int u_hasColorGrade;
2800
+ uniform float u_contrast;
2801
+ uniform float u_temperature;
2802
+ uniform float u_tint;
2803
+ uniform float u_saturation;
2804
+ uniform float u_vibrance;
2805
+ uniform float u_vignette;
2806
+ uniform float u_sharpening;
2807
+ uniform int u_hasFxaa;
2808
+ uniform float u_edgeThreshold;
2809
+ uniform float u_subpixelBlend;
2810
+ in vec2 v_uv;
2811
+ out vec4 outColor;
2812
+
2813
+ float srgbToLinear(float value) {
2814
+ return value <= 0.04045 ? value / 12.92 : pow((value + 0.055) / 1.055, 2.4);
2815
+ }
2816
+
2817
+ float linearToSrgb(float value) {
2818
+ return value <= 0.0031308 ? value * 12.92 : 1.055 * pow(value, 1.0 / 2.4) - 0.055;
2819
+ }
2820
+
2821
+ vec3 decodeColor(vec3 color) {
2822
+ return u_inputColorSpace == 1 ? vec3(srgbToLinear(color.r), srgbToLinear(color.g), srgbToLinear(color.b)) : color;
2823
+ }
2824
+
2825
+ vec3 encodeColor(vec3 color) {
2826
+ vec3 linear = clamp(color, 0.0, 1.0);
2827
+ return u_outputColorSpace == 1 ? vec3(linearToSrgb(linear.r), linearToSrgb(linear.g), linearToSrgb(linear.b)) : linear;
2828
+ }
2829
+
2830
+ vec3 acesRrtAndOdtFit(vec3 value) {
2831
+ vec3 numerator = value * (value + 0.0245786) - 0.000090537;
2832
+ vec3 denominator = value * (0.983729 * value + 0.4329510) + 0.238081;
2833
+ return numerator / denominator;
2834
+ }
2835
+
2836
+ vec3 acesFilmic(vec3 color) {
2837
+ // Match current Three.js ACESFilmicToneMapping. ACES is a coupled RGB
2838
+ // transform; a scalar approximation shifts hue and washes saturated colors.
2839
+ const mat3 acesInput = mat3(
2840
+ vec3(0.59719, 0.07600, 0.02840),
2841
+ vec3(0.35458, 0.90834, 0.13383),
2842
+ vec3(0.04823, 0.01566, 0.83777)
2843
+ );
2844
+ const mat3 acesOutput = mat3(
2845
+ vec3(1.60475, -0.10208, -0.00327),
2846
+ vec3(-0.53108, 1.10813, -0.07276),
2847
+ vec3(-0.07367, -0.00605, 1.07602)
2848
+ );
2849
+ vec3 acesColor = acesInput * (color / 0.6);
2850
+ acesColor = acesRrtAndOdtFit(acesColor);
2851
+ return clamp(acesOutput * acesColor, 0.0, 1.0);
2852
+ }
2853
+
2854
+ float filmic(float value) {
2855
+ float x = max(0.0, value);
2856
+ float toe = max(0.0, x - 0.004);
2857
+ float curve = (toe * (6.2 * toe + 0.5)) / (toe * (6.2 * toe + 1.7) + 0.06);
2858
+ return min(curve, x * 1.08);
2859
+ }
2860
+
2861
+ float uncharted2(float value) {
2862
+ float a = 0.15;
2863
+ float b = 0.5;
2864
+ float c = 0.1;
2865
+ float d = 0.2;
2866
+ float e = 0.02;
2867
+ float f = 0.3;
2868
+ float w = 11.2;
2869
+ float x = value * 2.0;
2870
+ float curve = ((x * (a * x + c * b) + d * e) / (x * (a * x + b) + d * f)) - e / f;
2871
+ float wx = w;
2872
+ float white = ((wx * (a * wx + c * b) + d * e) / (wx * (a * wx + b) + d * f)) - e / f;
2873
+ return clamp(curve / white, 0.0, 1.0);
2874
+ }
2875
+
2876
+ float agx(float value) {
2877
+ float x = max(0.0, value);
2878
+ float encoded = log2(1.0 + x) / log2(17.0);
2879
+ return clamp(encoded * encoded * (3.0 - 2.0 * encoded), 0.0, 1.0);
2880
+ }
2881
+
2882
+ float neutral(float value) {
2883
+ float x = max(0.0, value);
2884
+ return min(1.0, (x * (1.0 + x / 7.5)) / (1.0 + x));
2885
+ }
2886
+
2887
+ float toneMapChannel(float value) {
2888
+ float exposed = max(0.0, value * u_exposure) / max(0.0001, u_whitePoint);
2889
+ if (u_toneOperator == 0) return min(1.0, exposed);
2890
+ if (u_toneOperator == 1) return exposed / (1.0 + exposed);
2891
+ if (u_toneOperator == 2) return exposed;
2892
+ if (u_toneOperator == 3) return filmic(exposed);
2893
+ if (u_toneOperator == 4) return uncharted2(exposed);
2894
+ if (u_toneOperator == 5) return agx(exposed);
2895
+ return neutral(exposed);
2896
+ }
2897
+
2898
+ vec3 applyToneMapping(vec3 color) {
2899
+ if (u_hasToneMapping == 0) return color;
2900
+ vec3 decoded = decodeColor(color);
2901
+ vec3 mapped = u_toneOperator == 2
2902
+ ? acesFilmic(max(vec3(0.0), decoded * u_exposure) / max(0.0001, u_whitePoint))
2903
+ : vec3(toneMapChannel(decoded.r), toneMapChannel(decoded.g), toneMapChannel(decoded.b));
2904
+ return encodeColor(mapped);
2905
+ }
2906
+
2907
+ vec3 applyColorGrade(vec3 color, vec2 uv) {
2908
+ if (u_hasColorGrade == 0) return color;
2909
+ float contrastOffset = 0.5 - 0.5 * u_contrast;
2910
+ float redShift = u_temperature * 0.08 - u_tint * 0.02;
2911
+ float greenShift = u_tint * 0.06;
2912
+ float blueShift = -u_temperature * 0.08 - u_tint * 0.02;
2913
+ float luma = dot(color, vec3(0.2126, 0.7152, 0.0722));
2914
+ vec3 graded = color * u_contrast + vec3(contrastOffset + redShift, contrastOffset + greenShift, contrastOffset + blueShift);
2915
+ float distanceFromLuma = min(1.0, abs(graded.r - luma) + abs(graded.g - luma) + abs(graded.b - luma));
2916
+ float vibranceBoost = u_vibrance == 0.0 ? 0.0 : u_vibrance * (1.0 - distanceFromLuma);
2917
+ float saturation = u_saturation + vibranceBoost;
2918
+ graded = vec3(luma) + (graded - vec3(luma)) * saturation;
2919
+ vec2 centered = uv * 2.0 - 1.0;
2920
+ float vignette = 1.0 - u_vignette * clamp((length(centered) - 0.28) / 1.12, 0.0, 1.0);
2921
+ return clamp(graded * vignette, 0.0, 1.0);
2922
+ }
2923
+
2924
+ vec3 baseColorAt(vec2 uv) {
2925
+ vec2 clampedUv = clamp(uv, vec2(0.0), vec2(1.0));
2926
+ vec3 color = texture(u_source, clampedUv).rgb;
2927
+ return applyColorGrade(applyToneMapping(color), clampedUv);
2928
+ }
2929
+
2930
+ vec3 finalColorAt(vec2 uv) {
2931
+ vec3 center = baseColorAt(uv);
2932
+ if (u_hasColorGrade == 0 || u_sharpening <= 0.0) return center;
2933
+ vec3 blur = (
2934
+ baseColorAt(uv + vec2(-u_texelSize.x, 0.0)) +
2935
+ baseColorAt(uv + vec2(u_texelSize.x, 0.0)) +
2936
+ baseColorAt(uv + vec2(0.0, -u_texelSize.y)) +
2937
+ baseColorAt(uv + vec2(0.0, u_texelSize.y))
2938
+ ) * 0.25;
2939
+ return clamp(center + (center - blur) * u_sharpening, 0.0, 1.0);
2940
+ }
2941
+
2942
+ float luma(vec3 color) {
2943
+ return dot(color, vec3(0.2126, 0.7152, 0.0722));
2944
+ }
2945
+
2946
+ void main() {
2947
+ vec3 center = finalColorAt(v_uv);
2948
+ float alpha = texture(u_source, clamp(v_uv, vec2(0.0), vec2(1.0))).a;
2949
+ if (u_hasFxaa == 0) {
2950
+ outColor = vec4(center, alpha);
2951
+ return;
2952
+ }
2953
+ vec3 north = finalColorAt(v_uv + vec2(0.0, -u_texelSize.y));
2954
+ vec3 south = finalColorAt(v_uv + vec2(0.0, u_texelSize.y));
2955
+ vec3 west = finalColorAt(v_uv + vec2(-u_texelSize.x, 0.0));
2956
+ vec3 east = finalColorAt(v_uv + vec2(u_texelSize.x, 0.0));
2957
+ float centerLuma = luma(center);
2958
+ float minLuma = min(centerLuma, min(min(luma(north), luma(south)), min(luma(west), luma(east))));
2959
+ float maxLuma = max(centerLuma, max(max(luma(north), luma(south)), max(luma(west), luma(east))));
2960
+ if (maxLuma - minLuma < u_edgeThreshold) {
2961
+ outColor = vec4(center, alpha);
2962
+ return;
2963
+ }
2964
+ vec3 average = (north + south + west + east) * 0.25;
2965
+ outColor = vec4(mix(center, average, clamp(u_subpixelBlend, 0.0, 1.0)), alpha);
2966
+ }
2967
+ `, "webgl2-ldr-postprocess");
2968
+ const program = this.gl.createProgram();
2969
+ if (!program) {
2970
+ this.gl.deleteShader(vertex);
2971
+ this.gl.deleteShader(fragment);
2972
+ throw new RenderDeviceError("Failed to allocate WebGL2 LDR postprocess shader", "WEBGL_ALLOCATION_FAILED");
2973
+ }
2974
+ this.gl.attachShader(program, vertex);
2975
+ this.gl.attachShader(program, fragment);
2976
+ this.gl.linkProgram(program);
2977
+ this.gl.deleteShader(vertex);
2978
+ this.gl.deleteShader(fragment);
2979
+ if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
2980
+ const log = this.gl.getProgramInfoLog(program) ?? "Unknown LDR postprocess shader link error";
2981
+ this.gl.deleteProgram(program);
2982
+ throw new RenderDeviceError("WebGL2 LDR postprocess shader link failed", "SHADER_LINK_FAILED", { log });
2983
+ }
2984
+ this.ldrPostprocessProgram = program;
2985
+ return program;
2986
+ }
2987
+ compileShader(type, source, label) {
2988
+ const shader = this.gl.createShader(type);
2989
+ if (!shader) {
2990
+ throw new RenderDeviceError("Failed to allocate WebGL shader", "WEBGL_ALLOCATION_FAILED", { label });
2991
+ }
2992
+ this.gl.shaderSource(shader, source);
2993
+ this.gl.compileShader(shader);
2994
+ if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) {
2995
+ const log = this.gl.getShaderInfoLog(shader) ?? "Unknown shader compile error";
2996
+ this.gl.deleteShader(shader);
2997
+ throw new RenderDeviceError("WebGL shader compile failed", "SHADER_COMPILE_FAILED", { label, log });
2998
+ }
2999
+ return shader;
3000
+ }
3001
+ reflectProgram(program) {
3002
+ const attributes = new Map();
3003
+ const uniforms = new Set();
3004
+ const attributeDetails = new Map();
3005
+ const uniformDetails = new Map();
3006
+ const activeAttributes = this.gl.getProgramParameter(program, this.gl.ACTIVE_ATTRIBUTES);
3007
+ const activeUniforms = this.gl.getProgramParameter(program, this.gl.ACTIVE_UNIFORMS);
3008
+ for (let i = 0; i < activeAttributes; i += 1) {
3009
+ const info = this.gl.getActiveAttrib(program, i);
3010
+ if (info) {
3011
+ const location = this.gl.getAttribLocation(program, info.name);
3012
+ attributes.set(info.name, location);
3013
+ attributeDetails.set(info.name, { name: info.name, type: String(info.type), location, source: "vertex", line: 0 });
3014
+ }
3015
+ }
3016
+ for (let i = 0; i < activeUniforms; i += 1) {
3017
+ const info = this.gl.getActiveUniform(program, i);
3018
+ if (info) {
3019
+ const name = info.name.replace(/\[0\]$/, "");
3020
+ uniforms.add(name);
3021
+ uniformDetails.set(name, { name, type: String(info.type), arraySize: info.size > 1 ? info.size : null, source: "fragment", line: 0 });
3022
+ }
3023
+ }
3024
+ return { attributes, uniforms, attributeDetails, uniformDetails };
3025
+ }
3026
+ uploadUniforms(shader, uniforms) {
3027
+ let textureUnit = 0;
3028
+ for (const [name, value] of uniforms) {
3029
+ if (!shader.reflection.uniforms.has(name)) {
3030
+ continue;
3031
+ }
3032
+ const location = this.getUniformLocation(shader, name);
3033
+ if (location === null) {
3034
+ throw new RenderDeviceError("Material tried to bind a missing shader uniform", "MISSING_UNIFORM", { name });
3035
+ }
3036
+ if (isTextureBinding(value)) {
3037
+ this.uploadTextureUniform(location, value, textureUnit);
3038
+ textureUnit += 1;
3039
+ }
3040
+ else if (typeof value === "number") {
3041
+ this.gl.uniform1f(location, value);
3042
+ }
3043
+ else if (Array.isArray(value) || ArrayBuffer.isView(value)) {
3044
+ const length = value.length;
3045
+ const floatData = value;
3046
+ if (length === 16 || (length > 16 && length % 16 === 0 && /(?:Matrix|Matrices)$/.test(name))) {
3047
+ this.gl.uniformMatrix4fv(location, false, floatData);
3048
+ }
3049
+ else if (length > 16 && length % 4 === 0) {
3050
+ this.gl.uniform4fv(location, floatData);
3051
+ }
3052
+ else if (length === 4) {
3053
+ this.gl.uniform4fv(location, floatData);
3054
+ }
3055
+ else if (length === 3) {
3056
+ this.gl.uniform3fv(location, floatData);
3057
+ }
3058
+ else if (length === 2) {
3059
+ this.gl.uniform2fv(location, floatData);
3060
+ }
3061
+ else {
3062
+ throw new RenderDeviceError("Unsupported uniform array length", "UNSUPPORTED_UNIFORM", { name, length });
3063
+ }
3064
+ }
3065
+ else {
3066
+ throw new RenderDeviceError("Unsupported uniform value", "UNSUPPORTED_UNIFORM", { name, valueType: typeof value });
3067
+ }
3068
+ if (this.errorCheckMode === "strict") {
3069
+ const uniformError = this.readError();
3070
+ if (uniformError) {
3071
+ throw new RenderDeviceError(`WebGL2 uniform upload failed for ${name}: ${uniformError}`, "WEBGL_DRAW_FAILED", {
3072
+ name,
3073
+ stage: "uniform",
3074
+ error: uniformError
3075
+ });
3076
+ }
3077
+ }
3078
+ }
3079
+ }
3080
+ getUniformLocation(shader, name) {
3081
+ let cache = this.uniformLocationCache.get(shader);
3082
+ if (!cache) {
3083
+ cache = new Map();
3084
+ this.uniformLocationCache.set(shader, cache);
3085
+ }
3086
+ if (!cache.has(name)) {
3087
+ this.uniformLocationLookupCount += 1;
3088
+ cache.set(name, this.gl.getUniformLocation(shader.handle, name) ?? this.gl.getUniformLocation(shader.handle, `${name}[0]`));
3089
+ }
3090
+ return cache.get(name) ?? null;
3091
+ }
3092
+ uploadTextureUniform(location, binding, textureUnit) {
3093
+ const validation = binding.validate();
3094
+ if (!validation.ok) {
3095
+ throw new RenderDeviceError("Texture binding validation failed", "INVALID_TEXTURE_BINDING", {
3096
+ diagnostics: validation.diagnostics,
3097
+ name: binding.name
3098
+ });
3099
+ }
3100
+ this.activateTextureUnit(textureUnit);
3101
+ const dimension = binding.texture?.dimension ?? (binding.name.toLowerCase().includes("cubemap") || binding.name.toLowerCase().includes("cube") ? "cube" : "2d");
3102
+ const target = dimension === "cube" ? this.gl.TEXTURE_CUBE_MAP : this.gl.TEXTURE_2D;
3103
+ const handle = binding.texture ? this.getTextureHandle(binding.texture) : dimension === "cube" ? this.getFallbackCubeTextureHandle() : this.getFallbackTextureHandle();
3104
+ if (binding.texture) {
3105
+ const lowerName = binding.name.toLowerCase();
3106
+ if (lowerName.includes("environment"))
3107
+ this.nativeEnvironmentBindings += 1;
3108
+ if (lowerName.includes("shadow"))
3109
+ this.nativeShadowMapBindings += 1;
3110
+ }
3111
+ this.bindTextureForUnit(textureUnit, target, handle);
3112
+ const samplerHandle = this.getSamplerHandle(binding.sampler, target);
3113
+ this.stateCache.bindSampler(textureUnit, samplerHandle, () => this.gl.bindSampler(textureUnit, samplerHandle));
3114
+ this.gl.uniform1i(location, textureUnit);
3115
+ }
3116
+ activateTextureUnit(textureUnit) {
3117
+ if (this.activeTextureUnitIndex === textureUnit)
3118
+ return;
3119
+ this.stateCache.activeTexture(textureUnit, () => this.gl.activeTexture(this.gl.TEXTURE0 + textureUnit));
3120
+ this.activeTextureUnitIndex = textureUnit;
3121
+ }
3122
+ bindTextureForUnit(textureUnit, target, handle) {
3123
+ const key = `${textureUnit}:${target}`;
3124
+ if (this.textureUnitBindings.get(key) === handle)
3125
+ return;
3126
+ this.stateCache.bindTexture(target, handle, () => this.gl.bindTexture(target, handle));
3127
+ this.textureUnitBindings.set(key, handle);
3128
+ this.textureBindCount += 1;
3129
+ }
3130
+ setTextureParameterIfNeeded(handle, target, parameter, value) {
3131
+ let parameters = this.textureSamplerParameterCache.get(handle);
3132
+ if (!parameters) {
3133
+ parameters = new Map();
3134
+ this.textureSamplerParameterCache.set(handle, parameters);
3135
+ }
3136
+ if (parameters.get(parameter) === value)
3137
+ return;
3138
+ this.gl.texParameteri(target, parameter, value);
3139
+ parameters.set(parameter, value);
3140
+ this.samplerParameterUploadCount += 1;
3141
+ }
3142
+ applySamplerAnisotropy(maxAnisotropy, target = this.gl.TEXTURE_2D) {
3143
+ if (maxAnisotropy <= 1)
3144
+ return;
3145
+ if (!this.anisotropicFilteringExtension)
3146
+ return;
3147
+ this.gl.texParameterf(target, this.anisotropicFilteringExtension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(Math.max(1, maxAnisotropy), this.maxTextureAnisotropy));
3148
+ this.samplerAnisotropyUploadCount += 1;
3149
+ }
3150
+ getSamplerHandle(sampler, target) {
3151
+ const key = this.samplerKey(sampler, target);
3152
+ const cached = this.samplerObjectCache.get(key);
3153
+ if (cached)
3154
+ return cached;
3155
+ const handle = this.gl.createSampler();
3156
+ if (!handle) {
3157
+ throw new RenderDeviceError("Failed to allocate WebGL sampler", "WEBGL_ALLOCATION_FAILED");
3158
+ }
3159
+ this.gl.samplerParameteri(handle, this.gl.TEXTURE_MIN_FILTER, this.minFilter(sampler.minFilter));
3160
+ this.gl.samplerParameteri(handle, this.gl.TEXTURE_MAG_FILTER, this.magFilter(sampler.magFilter));
3161
+ this.gl.samplerParameteri(handle, this.gl.TEXTURE_WRAP_S, this.addressMode(sampler.addressU));
3162
+ this.gl.samplerParameteri(handle, this.gl.TEXTURE_WRAP_T, this.addressMode(sampler.addressV));
3163
+ this.samplerParameterUploadCount += 4;
3164
+ if (target === this.gl.TEXTURE_CUBE_MAP) {
3165
+ this.gl.samplerParameteri(handle, this.gl.TEXTURE_WRAP_R, this.addressMode(sampler.addressV));
3166
+ this.samplerParameterUploadCount += 1;
3167
+ }
3168
+ if (sampler.maxAnisotropy > 1 && this.anisotropicFilteringExtension) {
3169
+ this.gl.samplerParameterf(handle, this.anisotropicFilteringExtension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(Math.max(1, sampler.maxAnisotropy), this.maxTextureAnisotropy));
3170
+ this.samplerAnisotropyUploadCount += 1;
3171
+ }
3172
+ this.samplerObjectCache.set(key, handle);
3173
+ return handle;
3174
+ }
3175
+ samplerKey(sampler, target) {
3176
+ return [
3177
+ sampler.minFilter,
3178
+ sampler.magFilter,
3179
+ sampler.addressU,
3180
+ sampler.addressV,
3181
+ sampler.maxAnisotropy,
3182
+ target === this.gl.TEXTURE_CUBE_MAP ? "cube" : "2d"
3183
+ ].join("|");
3184
+ }
3185
+ getFallbackTextureHandle() {
3186
+ if (this.fallbackTexture) {
3187
+ return this.fallbackTexture;
3188
+ }
3189
+ const handle = this.gl.createTexture();
3190
+ if (!handle) {
3191
+ throw new RenderDeviceError("Failed to allocate WebGL fallback texture", "WEBGL_ALLOCATION_FAILED");
3192
+ }
3193
+ this.stateCache.invalidate();
3194
+ this.gl.bindTexture(this.gl.TEXTURE_2D, handle);
3195
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
3196
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
3197
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
3198
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
3199
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, 1, 1, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, new Uint8Array([255, 255, 255, 255]));
3200
+ this.fallbackTexture = handle;
3201
+ return handle;
3202
+ }
3203
+ getFallbackCubeTextureHandle() {
3204
+ if (this.fallbackCubeTexture) {
3205
+ return this.fallbackCubeTexture;
3206
+ }
3207
+ const handle = this.gl.createTexture();
3208
+ if (!handle) {
3209
+ throw new RenderDeviceError("Failed to allocate WebGL fallback cube texture", "WEBGL_ALLOCATION_FAILED");
3210
+ }
3211
+ this.stateCache.invalidate();
3212
+ this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP, handle);
3213
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
3214
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
3215
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
3216
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
3217
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_R, this.gl.CLAMP_TO_EDGE);
3218
+ const pixel = new Uint8Array([255, 255, 255, 255]);
3219
+ for (const face of WEBGL_CUBE_FACES) {
3220
+ this.gl.texImage2D(this.cubeFaceTarget(face), 0, this.gl.RGBA, 1, 1, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, pixel);
3221
+ }
3222
+ this.fallbackCubeTexture = handle;
3223
+ return handle;
3224
+ }
3225
+ getTextureHandle(texture) {
3226
+ this.releaseDisposedTextureHandles();
3227
+ if (texture.disposed) {
3228
+ throw new RenderDeviceError("Texture is disposed", "DISPOSED_RESOURCE", { label: texture.label });
3229
+ }
3230
+ const cached = this.textures.get(texture);
3231
+ if (cached) {
3232
+ return cached;
3233
+ }
3234
+ const handle = this.gl.createTexture();
3235
+ if (!handle) {
3236
+ throw new RenderDeviceError("Failed to allocate WebGL texture", "WEBGL_ALLOCATION_FAILED", { label: texture.label });
3237
+ }
3238
+ this.stateCache.invalidate();
3239
+ this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false);
3240
+ this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
3241
+ this.gl.pixelStorei(this.gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this.gl.NONE);
3242
+ if (texture.dimension === "cube") {
3243
+ this.uploadCubeTexture(texture, handle);
3244
+ this.textureUploadModes.set(texture, "cube");
3245
+ this.textures.set(texture, handle);
3246
+ return handle;
3247
+ }
3248
+ this.gl.bindTexture(this.gl.TEXTURE_2D, handle);
3249
+ if (isCompressedTextureFormat(texture.format)) {
3250
+ const compressed = this.resolveCompressedTextureFormat(texture.format);
3251
+ if (compressed) {
3252
+ const uploadLevels = completeUploadLevels(texture.textureLevels);
3253
+ for (const [levelIndex, level] of uploadLevels.entries()) {
3254
+ this.gl.compressedTexImage2D(this.gl.TEXTURE_2D, levelIndex, compressed.internalFormat, level.width, level.height, 0, level.data);
3255
+ }
3256
+ const compressedUploadError = this.readError();
3257
+ if (!compressedUploadError) {
3258
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_BASE_LEVEL, 0);
3259
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAX_LEVEL, uploadLevels.length - 1);
3260
+ this.textureUploadModes.set(texture, "compressed");
3261
+ this.textures.set(texture, handle);
3262
+ return handle;
3263
+ }
3264
+ }
3265
+ const fallbackLevels = completeUploadLevels(texture.fallbackTextureLevels);
3266
+ if (fallbackLevels.length === 0) {
3267
+ this.gl.deleteTexture(handle);
3268
+ throw new RenderDeviceError("Compressed texture format is not supported and no RGBA8 fallback data was provided", "COMPRESSED_TEXTURE_UNSUPPORTED", {
3269
+ label: texture.label,
3270
+ format: texture.format
3271
+ });
3272
+ }
3273
+ this.uploadRgba8FallbackTexture(texture, fallbackLevels);
3274
+ this.textureUploadModes.set(texture, "fallback");
3275
+ this.textures.set(texture, handle);
3276
+ return handle;
3277
+ }
3278
+ if (texture.format === "depth24") {
3279
+ throw new RenderDeviceError("Depth textures cannot be uploaded to WebGL2 color samplers", "UNSUPPORTED_TEXTURE_FORMAT", {
3280
+ label: texture.label,
3281
+ format: texture.format
3282
+ });
3283
+ }
3284
+ if (texture.source) {
3285
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.rgba8TextureInternalFormat(texture), this.gl.RGBA, this.gl.UNSIGNED_BYTE, texture.source);
3286
+ this.gl.generateMipmap(this.gl.TEXTURE_2D);
3287
+ }
3288
+ else if (texture.mipLevels.length > 0) {
3289
+ const uploadFormat = this.textureUploadFormat(texture);
3290
+ const uploadLevels = completeUploadLevels(texture.textureLevels);
3291
+ for (const [levelIndex, level] of uploadLevels.entries()) {
3292
+ this.gl.texImage2D(this.gl.TEXTURE_2D, levelIndex, uploadFormat.internalFormat, level.width, level.height, 0, uploadFormat.format, uploadFormat.type, texturePixelUploadData(level.data, texture.format));
3293
+ }
3294
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_BASE_LEVEL, 0);
3295
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAX_LEVEL, uploadLevels.length - 1);
3296
+ }
3297
+ else {
3298
+ const uploadFormat = this.textureUploadFormat(texture);
3299
+ this.gl.texImage2D(this.gl.TEXTURE_2D, 0, uploadFormat.internalFormat, texture.width, texture.height, 0, uploadFormat.format, uploadFormat.type, texture.data ? texturePixelUploadData(texture.data, texture.format) : null);
3300
+ // Float colour formats are not guaranteed mipmap-filterable in WebGL2:
3301
+ // RGBA32F/RGBA16F are only linear-filterable with OES_texture_float_linear, and
3302
+ // generateMipmap on a non-filterable format raises INVALID_OPERATION. Data
3303
+ // textures such as joint palettes are point-sampled with texelFetch and never
3304
+ // need mips, so skip generation and pin the level range instead.
3305
+ if (isFloatColorTextureFormat(texture.format)) {
3306
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_BASE_LEVEL, 0);
3307
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAX_LEVEL, 0);
3308
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
3309
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
3310
+ }
3311
+ else {
3312
+ this.gl.generateMipmap(this.gl.TEXTURE_2D);
3313
+ }
3314
+ }
3315
+ this.textureUploadModes.set(texture, texture.format);
3316
+ this.textures.set(texture, handle);
3317
+ return handle;
3318
+ }
3319
+ uploadCubeTexture(texture, handle) {
3320
+ this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP, handle);
3321
+ const uploadFormat = this.textureUploadFormat(texture);
3322
+ for (const face of texture.cubeFaces) {
3323
+ const uploadLevels = completeUploadLevels(face.mipLevels);
3324
+ for (const [levelIndex, level] of uploadLevels.entries()) {
3325
+ this.gl.texImage2D(this.cubeFaceTarget(face.face), levelIndex, uploadFormat.internalFormat, level.width, level.height, 0, uploadFormat.format, uploadFormat.type, texturePixelUploadData(level.data, texture.format));
3326
+ }
3327
+ }
3328
+ const firstFaceLevels = completeUploadLevels(texture.cubeFaces[0]?.mipLevels ?? []);
3329
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_BASE_LEVEL, 0);
3330
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_MAX_LEVEL, Math.max(0, firstFaceLevels.length - 1));
3331
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
3332
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
3333
+ this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_R, this.gl.CLAMP_TO_EDGE);
3334
+ }
3335
+ uploadRgba8FallbackTexture(texture, fallbackLevels) {
3336
+ const internalFormat = this.rgba8TextureInternalFormat(texture);
3337
+ for (const [levelIndex, level] of fallbackLevels.entries()) {
3338
+ this.gl.texImage2D(this.gl.TEXTURE_2D, levelIndex, internalFormat, level.width, level.height, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, texturePixelUploadData(level.data, "rgba8"));
3339
+ }
3340
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_BASE_LEVEL, 0);
3341
+ this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAX_LEVEL, fallbackLevels.length - 1);
3342
+ }
3343
+ cubeFaceTarget(face) {
3344
+ switch (face) {
3345
+ case "px": return this.gl.TEXTURE_CUBE_MAP_POSITIVE_X;
3346
+ case "nx": return this.gl.TEXTURE_CUBE_MAP_NEGATIVE_X;
3347
+ case "py": return this.gl.TEXTURE_CUBE_MAP_POSITIVE_Y;
3348
+ case "ny": return this.gl.TEXTURE_CUBE_MAP_NEGATIVE_Y;
3349
+ case "pz": return this.gl.TEXTURE_CUBE_MAP_POSITIVE_Z;
3350
+ case "nz": return this.gl.TEXTURE_CUBE_MAP_NEGATIVE_Z;
3351
+ }
3352
+ }
3353
+ rgba8TextureInternalFormat(texture) {
3354
+ return texture.colorSpace === "srgb" ? this.gl.SRGB8_ALPHA8 : this.gl.RGBA;
3355
+ }
3356
+ textureUploadFormat(texture) {
3357
+ if (texture.format === "rgba8") {
3358
+ return { internalFormat: this.rgba8TextureInternalFormat(texture), format: this.gl.RGBA, type: this.gl.UNSIGNED_BYTE };
3359
+ }
3360
+ if (texture.colorSpace === "srgb") {
3361
+ throw new RenderDeviceError("Floating-point texture uploads must use linear colorSpace", "UNSUPPORTED_TEXTURE_FORMAT", {
3362
+ label: texture.label,
3363
+ format: texture.format,
3364
+ colorSpace: texture.colorSpace
3365
+ });
3366
+ }
3367
+ if (texture.format === "rgba16f") {
3368
+ return { internalFormat: this.gl.RGBA16F, format: this.gl.RGBA, type: this.gl.HALF_FLOAT };
3369
+ }
3370
+ if (texture.format === "rgba32f") {
3371
+ return { internalFormat: this.gl.RGBA32F, format: this.gl.RGBA, type: this.gl.FLOAT };
3372
+ }
3373
+ throw new RenderDeviceError("Unsupported texture upload format", "UNSUPPORTED_TEXTURE_FORMAT", {
3374
+ label: texture.label,
3375
+ format: texture.format
3376
+ });
3377
+ }
3378
+ resolveRenderTargetFormat(format) {
3379
+ if (format === "rgba8") {
3380
+ return { internalFormat: this.gl.RGBA, type: this.gl.UNSIGNED_BYTE };
3381
+ }
3382
+ if (!this.gl.getExtension("EXT_color_buffer_float")) {
3383
+ throw new RenderDeviceError("Floating-point color render targets require EXT_color_buffer_float", "HDR_RENDER_TARGET_UNSUPPORTED", { format });
3384
+ }
3385
+ if (format === "rgba16f") {
3386
+ return { internalFormat: this.gl.RGBA16F, type: this.gl.HALF_FLOAT };
3387
+ }
3388
+ return { internalFormat: this.gl.RGBA32F, type: this.gl.FLOAT };
3389
+ }
3390
+ releaseDisposedTextureHandles() {
3391
+ for (const [texture, handle] of [...this.textures]) {
3392
+ if (texture.disposed) {
3393
+ this.gl.deleteTexture(handle);
3394
+ this.textures.delete(texture);
3395
+ this.textureUploadModes.delete(texture);
3396
+ this.releasedTextureHandles += 1;
3397
+ }
3398
+ }
3399
+ }
3400
+ resolveCompressedTextureFormat(format) {
3401
+ switch (format) {
3402
+ case "bc1-rgba-unorm": {
3403
+ const extension = this.gl.getExtension("WEBGL_compressed_texture_s3tc");
3404
+ return extension ? { internalFormat: extension.COMPRESSED_RGBA_S3TC_DXT1_EXT } : null;
3405
+ }
3406
+ case "bc3-rgba-unorm": {
3407
+ const extension = this.gl.getExtension("WEBGL_compressed_texture_s3tc");
3408
+ return extension ? { internalFormat: extension.COMPRESSED_RGBA_S3TC_DXT5_EXT } : null;
3409
+ }
3410
+ case "etc2-rgba8unorm":
3411
+ return { internalFormat: 0x9278 };
3412
+ case "astc-4x4-rgba-unorm": {
3413
+ const extension = this.gl.getExtension("WEBGL_compressed_texture_astc");
3414
+ return extension ? { internalFormat: extension.COMPRESSED_RGBA_ASTC_4x4_KHR } : null;
3415
+ }
3416
+ }
3417
+ }
3418
+ magFilter(filter) {
3419
+ return filter === "nearest" ? this.gl.NEAREST : this.gl.LINEAR;
3420
+ }
3421
+ minFilter(filter) {
3422
+ switch (filter) {
3423
+ case "nearest":
3424
+ return this.gl.NEAREST;
3425
+ case "linear":
3426
+ return this.gl.LINEAR;
3427
+ case "nearest-mipmap-nearest":
3428
+ return this.gl.NEAREST_MIPMAP_NEAREST;
3429
+ case "linear-mipmap-nearest":
3430
+ return this.gl.LINEAR_MIPMAP_NEAREST;
3431
+ case "nearest-mipmap-linear":
3432
+ return this.gl.NEAREST_MIPMAP_LINEAR;
3433
+ case "linear-mipmap-linear":
3434
+ return this.gl.LINEAR_MIPMAP_LINEAR;
3435
+ }
3436
+ }
3437
+ addressMode(mode) {
3438
+ if (mode === "repeat")
3439
+ return this.gl.REPEAT;
3440
+ if (mode === "mirror-repeat")
3441
+ return this.gl.MIRRORED_REPEAT;
3442
+ return this.gl.CLAMP_TO_EDGE;
3443
+ }
3444
+ bindVertexFormat(shader, format) {
3445
+ const boundLocations = new Set();
3446
+ for (const attribute of format.attributes) {
3447
+ const location = this.resolveAttributeLocation(shader, attribute);
3448
+ if (location < 0) {
3449
+ continue;
3450
+ }
3451
+ if (attribute.type !== "float32") {
3452
+ throw new RenderDeviceError("Unsupported vertex attribute type", "UNSUPPORTED_VERTEX_ATTRIBUTE", {
3453
+ attribute: attribute.shaderName,
3454
+ type: attribute.type
3455
+ });
3456
+ }
3457
+ boundLocations.add(location);
3458
+ this.gl.enableVertexAttribArray(location);
3459
+ this.gl.vertexAttribDivisor(location, 0);
3460
+ this.gl.vertexAttribPointer(location, attribute.components, this.gl.FLOAT, attribute.normalized, format.stride, attribute.offset);
3461
+ }
3462
+ return boundLocations;
3463
+ }
3464
+ bindVertexArrayForCommand(command, shader, vertexBuffer) {
3465
+ const indexBuffer = command.indexBuffer ? this.requireBuffer(command.indexBuffer) : undefined;
3466
+ const key = this.vertexArrayCacheKey(command, shader, vertexBuffer, indexBuffer);
3467
+ const cached = this.vertexArrayCache.get(key);
3468
+ if (cached) {
3469
+ this.stateCache.bindVertexArray(cached.handle, () => this.gl.bindVertexArray(cached.handle));
3470
+ return cached;
3471
+ }
3472
+ const handle = this.gl.createVertexArray();
3473
+ if (!handle) {
3474
+ throw new RenderDeviceError("Failed to allocate WebGL vertex array", "WEBGL_ALLOCATION_FAILED");
3475
+ }
3476
+ this.vertexArrayCreateCount += 1;
3477
+ this.stateCache.bindVertexArray(handle, () => this.gl.bindVertexArray(handle));
3478
+ this.stateCache.bindBuffer(this.gl.ARRAY_BUFFER, vertexBuffer.handle, () => this.gl.bindBuffer(this.gl.ARRAY_BUFFER, vertexBuffer.handle));
3479
+ const boundLocations = this.bindVertexFormat(shader, command.vertexFormat);
3480
+ if (command.instanceAttributes && command.instanceAttributes.length > 0) {
3481
+ this.bindInstanceAttributes(shader, command.instanceAttributes, boundLocations);
3482
+ }
3483
+ if (indexBuffer) {
3484
+ this.stateCache.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, indexBuffer.handle, () => this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, indexBuffer.handle));
3485
+ }
3486
+ this.disableUnboundVertexAttributes(boundLocations);
3487
+ this.applyDefaultAttributes(shader, boundLocations);
3488
+ const entry = { key, handle, boundLocations };
3489
+ this.vertexArrayCache.set(key, entry);
3490
+ return entry;
3491
+ }
3492
+ bindNoVertexArray() {
3493
+ this.stateCache.bindVertexArray(null, () => this.gl.bindVertexArray(null));
3494
+ }
3495
+ vertexArrayCacheKey(command, shader, vertexBuffer, indexBuffer) {
3496
+ const instanceKey = (command.instanceAttributes ?? []).map((attribute) => {
3497
+ const buffer = this.requireBuffer(attribute.buffer);
3498
+ return `${attribute.shaderName}:${buffer.id}:${attribute.components}:${attribute.offset}:${attribute.stride}:${attribute.normalized === true ? 1 : 0}:${attribute.divisor ?? 1}`;
3499
+ }).join(",");
3500
+ return [
3501
+ shader.id,
3502
+ vertexBuffer.id,
3503
+ this.vertexFormatId(command.vertexFormat),
3504
+ indexBuffer?.id ?? 0,
3505
+ instanceKey
3506
+ ].join("|");
3507
+ }
3508
+ vertexFormatId(format) {
3509
+ const existing = this.vertexFormatIds.get(format);
3510
+ if (existing !== undefined)
3511
+ return existing;
3512
+ const next = this.nextVertexFormatId;
3513
+ this.nextVertexFormatId += 1;
3514
+ this.vertexFormatIds.set(format, next);
3515
+ return next;
3516
+ }
3517
+ bindInstanceAttributes(shader, attributes, boundLocations) {
3518
+ for (const attribute of attributes) {
3519
+ const location = shader.reflection.attributes.get(attribute.shaderName);
3520
+ if (location === undefined || location < 0) {
3521
+ continue;
3522
+ }
3523
+ if (![1, 2, 3, 4].includes(attribute.components)) {
3524
+ throw new RenderDeviceError("Instance vertex attribute components must be 1, 2, 3, or 4", "INVALID_DRAW_COMMAND", {
3525
+ attribute: attribute.shaderName,
3526
+ components: attribute.components
3527
+ });
3528
+ }
3529
+ if (!Number.isInteger(attribute.offset) || attribute.offset < 0 || attribute.offset % 4 !== 0) {
3530
+ throw new RenderDeviceError("Instance vertex attribute offset must be non-negative and 4-byte aligned", "INVALID_DRAW_COMMAND", {
3531
+ attribute: attribute.shaderName,
3532
+ offset: attribute.offset
3533
+ });
3534
+ }
3535
+ if (!Number.isInteger(attribute.stride) || attribute.stride <= 0 || attribute.stride % 4 !== 0) {
3536
+ throw new RenderDeviceError("Instance vertex attribute stride must be positive and 4-byte aligned", "INVALID_DRAW_COMMAND", {
3537
+ attribute: attribute.shaderName,
3538
+ stride: attribute.stride
3539
+ });
3540
+ }
3541
+ if (attribute.offset + attribute.components * 4 > attribute.stride) {
3542
+ throw new RenderDeviceError("Instance vertex attribute range must fit inside its stride", "INVALID_DRAW_COMMAND", {
3543
+ attribute: attribute.shaderName,
3544
+ offset: attribute.offset,
3545
+ components: attribute.components,
3546
+ stride: attribute.stride
3547
+ });
3548
+ }
3549
+ const buffer = this.requireBuffer(attribute.buffer);
3550
+ boundLocations.add(location);
3551
+ this.stateCache.bindBuffer(this.gl.ARRAY_BUFFER, buffer.handle, () => this.gl.bindBuffer(this.gl.ARRAY_BUFFER, buffer.handle));
3552
+ this.gl.enableVertexAttribArray(location);
3553
+ this.gl.vertexAttribPointer(location, attribute.components, this.gl.FLOAT, attribute.normalized ?? false, attribute.stride, attribute.offset);
3554
+ this.gl.vertexAttribDivisor(location, attribute.divisor ?? 1);
3555
+ }
3556
+ }
3557
+ resolveAttributeLocation(shader, attribute) {
3558
+ const reflected = shader.reflection.attributes.get(attribute.shaderName);
3559
+ if (reflected !== undefined) {
3560
+ return reflected;
3561
+ }
3562
+ return shader.reflection.attributes.get(attribute.semantic) ?? -1;
3563
+ }
3564
+ applyDefaultAttributes(shader, boundLocations) {
3565
+ const colorLocation = shader.reflection.attributes.get("a_color") ?? shader.reflection.attributes.get("color");
3566
+ if (colorLocation !== undefined && colorLocation >= 0 && !boundLocations.has(colorLocation)) {
3567
+ this.gl.disableVertexAttribArray(colorLocation);
3568
+ this.gl.vertexAttribDivisor(colorLocation, 0);
3569
+ this.gl.vertexAttrib4f(colorLocation, 1, 1, 1, 1);
3570
+ }
3571
+ const tangentLocation = shader.reflection.attributes.get("a_tangent") ?? shader.reflection.attributes.get("tangent");
3572
+ if (tangentLocation !== undefined && tangentLocation >= 0 && !boundLocations.has(tangentLocation)) {
3573
+ this.gl.disableVertexAttribArray(tangentLocation);
3574
+ this.gl.vertexAttribDivisor(tangentLocation, 0);
3575
+ this.gl.vertexAttrib4f(tangentLocation, 1, 0, 0, 1);
3576
+ }
3577
+ const uv1Location = shader.reflection.attributes.get("a_uv1") ?? shader.reflection.attributes.get("uv1");
3578
+ if (uv1Location !== undefined && uv1Location >= 0 && !boundLocations.has(uv1Location)) {
3579
+ this.gl.disableVertexAttribArray(uv1Location);
3580
+ this.gl.vertexAttribDivisor(uv1Location, 0);
3581
+ this.gl.vertexAttrib2f(uv1Location, 0, 0);
3582
+ }
3583
+ const instanceColorLocation = shader.reflection.attributes.get("a_instanceColor") ?? shader.reflection.attributes.get("instanceColor");
3584
+ if (instanceColorLocation !== undefined && instanceColorLocation >= 0 && !boundLocations.has(instanceColorLocation)) {
3585
+ this.gl.disableVertexAttribArray(instanceColorLocation);
3586
+ this.gl.vertexAttribDivisor(instanceColorLocation, 0);
3587
+ this.gl.vertexAttrib4f(instanceColorLocation, 1, 1, 1, 1);
3588
+ }
3589
+ }
3590
+ disableUnboundVertexAttributes(boundLocations) {
3591
+ for (let location = 0; location < this.maxVertexAttributes; location += 1) {
3592
+ if (!boundLocations.has(location)) {
3593
+ this.gl.disableVertexAttribArray(location);
3594
+ this.gl.vertexAttribDivisor(location, 0);
3595
+ }
3596
+ }
3597
+ }
3598
+ primitive(topology) {
3599
+ if (topology === "lines")
3600
+ return this.gl.LINES;
3601
+ if (topology === "points")
3602
+ return this.gl.POINTS;
3603
+ return this.gl.TRIANGLES;
3604
+ }
3605
+ applyRenderState(state) {
3606
+ const renderState = state ?? {
3607
+ depthTest: true,
3608
+ depthWrite: true,
3609
+ cullMode: "back",
3610
+ blend: false,
3611
+ depthCompare: "less-equal",
3612
+ colorWrite: [true, true, true, true],
3613
+ scissor: null,
3614
+ polygonOffset: null,
3615
+ stencil: null
3616
+ };
3617
+ this.stateCache.setEnabled(this.gl.DEPTH_TEST, renderState.depthTest, () => {
3618
+ if (renderState.depthTest)
3619
+ this.gl.enable(this.gl.DEPTH_TEST);
3620
+ else
3621
+ this.gl.disable(this.gl.DEPTH_TEST);
3622
+ });
3623
+ this.stateCache.depthMask(renderState.depthWrite, () => this.gl.depthMask(renderState.depthWrite));
3624
+ this.stateCache.depthFunc(renderState.depthCompare === "always" ? this.gl.ALWAYS : this.gl.LEQUAL, () => this.gl.depthFunc(renderState.depthCompare === "always" ? this.gl.ALWAYS : this.gl.LEQUAL));
3625
+ const colorWrite = renderState.colorWrite ?? [true, true, true, true];
3626
+ this.stateCache.colorMask(colorWrite[0], colorWrite[1], colorWrite[2], colorWrite[3], () => this.gl.colorMask(colorWrite[0], colorWrite[1], colorWrite[2], colorWrite[3]));
3627
+ if (renderState.scissor) {
3628
+ this.stateCache.setEnabled(this.gl.SCISSOR_TEST, true, () => this.gl.enable(this.gl.SCISSOR_TEST));
3629
+ this.stateCache.scissor(renderState.scissor.x, renderState.scissor.y, renderState.scissor.width, renderState.scissor.height, () => {
3630
+ this.gl.scissor(renderState.scissor.x, renderState.scissor.y, renderState.scissor.width, renderState.scissor.height);
3631
+ });
3632
+ }
3633
+ else {
3634
+ this.stateCache.setEnabled(this.gl.SCISSOR_TEST, false, () => this.gl.disable(this.gl.SCISSOR_TEST));
3635
+ }
3636
+ if (renderState.polygonOffset) {
3637
+ this.stateCache.setEnabled(this.gl.POLYGON_OFFSET_FILL, true, () => this.gl.enable(this.gl.POLYGON_OFFSET_FILL));
3638
+ this.stateCache.polygonOffset(renderState.polygonOffset.factor, renderState.polygonOffset.units, () => this.gl.polygonOffset(renderState.polygonOffset.factor, renderState.polygonOffset.units));
3639
+ }
3640
+ else {
3641
+ this.stateCache.setEnabled(this.gl.POLYGON_OFFSET_FILL, false, () => this.gl.disable(this.gl.POLYGON_OFFSET_FILL));
3642
+ }
3643
+ if (renderState.stencil) {
3644
+ const stencil = renderState.stencil;
3645
+ const compare = this.stencilCompare(stencil.compare ?? "always");
3646
+ const reference = stencil.reference ?? 0;
3647
+ const readMask = stencil.readMask ?? 0xff;
3648
+ const writeMask = stencil.writeMask ?? 0xff;
3649
+ const fail = this.stencilOperation(stencil.fail ?? "keep");
3650
+ const depthFail = this.stencilOperation(stencil.depthFail ?? "keep");
3651
+ const depthPass = this.stencilOperation(stencil.depthPass ?? "keep");
3652
+ this.stateCache.setEnabled(this.gl.STENCIL_TEST, true, () => this.gl.enable(this.gl.STENCIL_TEST));
3653
+ this.stateCache.stencilFunc(compare, reference, readMask, () => this.gl.stencilFunc(compare, reference, readMask));
3654
+ this.stateCache.stencilMask(writeMask, () => this.gl.stencilMask(writeMask));
3655
+ this.stateCache.stencilOp(fail, depthFail, depthPass, () => this.gl.stencilOp(fail, depthFail, depthPass));
3656
+ }
3657
+ else {
3658
+ this.stateCache.setEnabled(this.gl.STENCIL_TEST, false, () => this.gl.disable(this.gl.STENCIL_TEST));
3659
+ }
3660
+ if (renderState.cullMode === "none") {
3661
+ this.stateCache.setEnabled(this.gl.CULL_FACE, false, () => this.gl.disable(this.gl.CULL_FACE));
3662
+ }
3663
+ else {
3664
+ this.stateCache.setEnabled(this.gl.CULL_FACE, true, () => this.gl.enable(this.gl.CULL_FACE));
3665
+ this.stateCache.cullFace(renderState.cullMode === "front" ? this.gl.FRONT : this.gl.BACK, () => this.gl.cullFace(renderState.cullMode === "front" ? this.gl.FRONT : this.gl.BACK));
3666
+ }
3667
+ if (renderState.blend) {
3668
+ this.stateCache.setEnabled(this.gl.BLEND, true, () => this.gl.enable(this.gl.BLEND));
3669
+ this.stateCache.blendFunc(this.gl.SRC_ALPHA, this.gl.ONE_MINUS_SRC_ALPHA, () => this.gl.blendFunc(this.gl.SRC_ALPHA, this.gl.ONE_MINUS_SRC_ALPHA));
3670
+ }
3671
+ else {
3672
+ this.stateCache.setEnabled(this.gl.BLEND, false, () => this.gl.disable(this.gl.BLEND));
3673
+ }
3674
+ }
3675
+ requireBuffer(buffer) {
3676
+ if (!(buffer instanceof WebGL2Buffer) || !this.buffers.has(buffer) || buffer.disposed) {
3677
+ throw new RenderDeviceError("Buffer is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
3678
+ bufferId: buffer.id
3679
+ });
3680
+ }
3681
+ return buffer;
3682
+ }
3683
+ stencilCompare(compare) {
3684
+ switch (compare) {
3685
+ case "never": return this.gl.NEVER;
3686
+ case "less": return this.gl.LESS;
3687
+ case "less-equal": return this.gl.LEQUAL;
3688
+ case "greater": return this.gl.GREATER;
3689
+ case "greater-equal": return this.gl.GEQUAL;
3690
+ case "equal": return this.gl.EQUAL;
3691
+ case "not-equal": return this.gl.NOTEQUAL;
3692
+ case "always": return this.gl.ALWAYS;
3693
+ }
3694
+ }
3695
+ stencilOperation(operation) {
3696
+ switch (operation) {
3697
+ case "keep": return this.gl.KEEP;
3698
+ case "zero": return this.gl.ZERO;
3699
+ case "replace": return this.gl.REPLACE;
3700
+ case "increment": return this.gl.INCR;
3701
+ case "decrement": return this.gl.DECR;
3702
+ case "invert": return this.gl.INVERT;
3703
+ case "increment-wrap": return this.gl.INCR_WRAP;
3704
+ case "decrement-wrap": return this.gl.DECR_WRAP;
3705
+ }
3706
+ }
3707
+ requireShader(shader) {
3708
+ if (!(shader instanceof WebGL2ShaderProgram) || !this.shaders.has(shader) || shader.disposed) {
3709
+ throw new RenderDeviceError("Shader is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
3710
+ shaderId: shader.id
3711
+ });
3712
+ }
3713
+ return shader;
3714
+ }
3715
+ assertAlive() {
3716
+ if (this.disposed) {
3717
+ throw new RenderDeviceError("Render device is disposed", "DISPOSED_DEVICE");
3718
+ }
3719
+ if (this.contextLost) {
3720
+ throw new RenderDeviceError("Render context is lost", "CONTEXT_LOST");
3721
+ }
3722
+ }
3723
+ assertFrame() {
3724
+ this.assertAlive();
3725
+ if (!this.frameActive) {
3726
+ throw new RenderDeviceError("No active frame", "NO_ACTIVE_FRAME");
3727
+ }
3728
+ }
3729
+ readError() {
3730
+ const error = this.gl.getError();
3731
+ return error === this.gl.NO_ERROR ? null : `0x${error.toString(16)}`;
3732
+ }
3733
+ }
3734
+ function numberOption(options, key, fallback) {
3735
+ const value = options[key];
3736
+ return typeof value === "number" && Number.isFinite(value) ? value : fallback;
3737
+ }
3738
+ function normalizeNativeBloomOptions(options) {
3739
+ const threshold = bloomNumberOption(options, "threshold", 0.75);
3740
+ const intensity = bloomNumberOption(options, "intensity", 0.35);
3741
+ const radius = bloomNumberOption(options, "radius", 1);
3742
+ if (threshold < 0 || threshold > 1) {
3743
+ throw new RenderDeviceError("Bloom threshold must be finite and in [0, 1].", "INVALID_POSTPROCESS_OPTIONS", { threshold });
3744
+ }
3745
+ if (intensity < 0) {
3746
+ throw new RenderDeviceError("Bloom intensity must be finite and non-negative.", "INVALID_POSTPROCESS_OPTIONS", { intensity });
3747
+ }
3748
+ if (!Number.isInteger(radius) || radius < 0 || radius > 16) {
3749
+ throw new RenderDeviceError("Bloom radius must be an integer in [0, 16].", "INVALID_POSTPROCESS_OPTIONS", { radius });
3750
+ }
3751
+ const softKnee = bloomNumberOption(options, "softKnee", 0);
3752
+ if (!(softKnee >= 0) || softKnee > 0.5) {
3753
+ throw new RenderDeviceError("Bloom softKnee must be finite and in [0, 0.5].", "INVALID_POSTPROCESS_OPTIONS", { softKnee });
3754
+ }
3755
+ const shoulder = bloomNumberOption(options, "shoulder", 0);
3756
+ if (!(shoulder >= 0) || shoulder > 1) {
3757
+ throw new RenderDeviceError("Bloom shoulder must be finite and in [0, 1].", "INVALID_POSTPROCESS_OPTIONS", { shoulder });
3758
+ }
3759
+ let quality;
3760
+ try {
3761
+ quality = normalizeBloomQualityPreset(options.quality);
3762
+ }
3763
+ catch {
3764
+ throw new RenderDeviceError("Bloom quality must be one of performance|balanced|cinematic.", "INVALID_POSTPROCESS_OPTIONS", { quality: options.quality });
3765
+ }
3766
+ return { threshold, intensity, radius, quality, softKnee, shoulder };
3767
+ }
3768
+ function normalizeNativeOutlineOptions(options) {
3769
+ const width = outlineNumberOption(options, "width", 1);
3770
+ const threshold = outlineNumberOption(options, "threshold", 0.22);
3771
+ const opacity = outlineNumberOption(options, "opacity", 0.85);
3772
+ const value = options.color;
3773
+ const sourceColor = value === undefined ? [255, 188, 64, 255] : value;
3774
+ if (!Array.isArray(sourceColor)
3775
+ || (sourceColor.length !== 3 && sourceColor.length !== 4)
3776
+ || sourceColor.some((channel) => typeof channel !== "number" || !Number.isFinite(channel) || channel < 0 || channel > 255)) {
3777
+ throw new RenderDeviceError("Outline color must contain three or four finite channels in [0, 255].", "INVALID_POSTPROCESS_OPTIONS", { color: value });
3778
+ }
3779
+ if (!Number.isInteger(width) || width < 1 || width > 6) {
3780
+ throw new RenderDeviceError("Outline width must be an integer in [1, 6].", "INVALID_POSTPROCESS_OPTIONS", { width });
3781
+ }
3782
+ if (threshold < 0 || threshold > 4) {
3783
+ throw new RenderDeviceError("Outline threshold must be finite and in [0, 4].", "INVALID_POSTPROCESS_OPTIONS", { threshold });
3784
+ }
3785
+ if (opacity < 0 || opacity > 1) {
3786
+ throw new RenderDeviceError("Outline opacity must be finite and in [0, 1].", "INVALID_POSTPROCESS_OPTIONS", { opacity });
3787
+ }
3788
+ const color = [
3789
+ sourceColor[0],
3790
+ sourceColor[1],
3791
+ sourceColor[2],
3792
+ (sourceColor[3] ?? 255)
3793
+ ];
3794
+ return { width, threshold, opacity, color };
3795
+ }
3796
+ function normalizeNativeSsaoOptions(options) {
3797
+ const radius = ssaoNumberOption(options, "radius", 2);
3798
+ const intensity = ssaoNumberOption(options, "intensity", 0.38);
3799
+ const bias = ssaoNumberOption(options, "bias", 0.015);
3800
+ if (!Number.isInteger(radius) || radius < 1 || radius > 8) {
3801
+ throw new RenderDeviceError("SSAO radius must be an integer in [1, 8].", "INVALID_POSTPROCESS_OPTIONS", { radius });
3802
+ }
3803
+ if (intensity < 0 || intensity > 2) {
3804
+ throw new RenderDeviceError("SSAO intensity must be finite and in [0, 2].", "INVALID_POSTPROCESS_OPTIONS", { intensity });
3805
+ }
3806
+ if (bias < 0 || bias > 0.25) {
3807
+ throw new RenderDeviceError("SSAO bias must be finite and in [0, 0.25].", "INVALID_POSTPROCESS_OPTIONS", { bias });
3808
+ }
3809
+ return { radius, intensity, bias };
3810
+ }
3811
+ /**
3812
+ * Camera depth range for linearizing sampleable GL depth in the native
3813
+ * SSR/depth-of-field programs (muse3jsparity-PRD A3). Missing or invalid
3814
+ * ranges fall back to the engine perspective defaults (0.1/1000) rather than
3815
+ * failing the frame: the range is a calibration hint, and every engine camera
3816
+ * builder defaults to exactly 0.1/1000. The CPU byte kernels intentionally
3817
+ * keep fixture-unit depth semantics (deterministic reference); the native
3818
+ * programs document their GL-depth contract in-shader.
3819
+ */
3820
+ function normalizeLdrDepthRange(range) {
3821
+ const near = range && Number.isFinite(range.near) && range.near > 0 ? range.near : 0.1;
3822
+ const far = range && Number.isFinite(range.far) && range.far > near ? range.far : 1000;
3823
+ return { near, far };
3824
+ }
3825
+ function normalizeNativeSsrOptions(options) {
3826
+ const intensity = ssrNumberOption(options, "intensity", 0.32);
3827
+ const maxDistance = ssrNumberOption(options, "maxDistance", 16);
3828
+ if (intensity < 0 || intensity > 2) {
3829
+ throw new RenderDeviceError("SSR intensity must be finite and in [0, 2].", "INVALID_POSTPROCESS_OPTIONS", { intensity });
3830
+ }
3831
+ if (!Number.isInteger(maxDistance) || maxDistance < 1 || maxDistance > 64) {
3832
+ throw new RenderDeviceError("SSR maxDistance must be an integer in [1, 64].", "INVALID_POSTPROCESS_OPTIONS", { maxDistance });
3833
+ }
3834
+ return { intensity, maxDistance };
3835
+ }
3836
+ function normalizeNativeDepthOfFieldOptions(options) {
3837
+ const focusDepth = depthOfFieldNumberOption(options, "focusDepth", 0.5);
3838
+ const focusRange = depthOfFieldNumberOption(options, "focusRange", 0.12);
3839
+ const maxRadius = depthOfFieldNumberOption(options, "maxRadius", 2);
3840
+ if (focusDepth < 0 || focusDepth > 1) {
3841
+ throw new RenderDeviceError("Depth-of-field focusDepth must be finite and in [0, 1].", "INVALID_POSTPROCESS_OPTIONS", { focusDepth });
3842
+ }
3843
+ if (focusRange < 0.001 || focusRange > 1) {
3844
+ throw new RenderDeviceError("Depth-of-field focusRange must be finite and in [0.001, 1].", "INVALID_POSTPROCESS_OPTIONS", { focusRange });
3845
+ }
3846
+ if (!Number.isInteger(maxRadius) || maxRadius < 0 || maxRadius > 8) {
3847
+ throw new RenderDeviceError("Depth-of-field maxRadius must be an integer in [0, 8].", "INVALID_POSTPROCESS_OPTIONS", { maxRadius });
3848
+ }
3849
+ return { focusDepth, focusRange, maxRadius };
3850
+ }
3851
+ function normalizeNativeMotionBlurOptions(options, width, height) {
3852
+ const samples = motionBlurNumberOption(options, "samples", 5);
3853
+ const scale = motionBlurNumberOption(options, "scale", 1);
3854
+ const value = options.velocity;
3855
+ if (!(value instanceof Float32Array) && !Array.isArray(value)) {
3856
+ throw new RenderDeviceError("Motion blur requires a velocity Float32Array or number array.", "WEBGL_LDR_POSTPROCESS_VELOCITY_REQUIRED");
3857
+ }
3858
+ const velocity = value instanceof Float32Array ? value : new Float32Array(value);
3859
+ if (velocity.length !== width * height * 2) {
3860
+ throw new RenderDeviceError("Motion blur velocity must contain width * height * 2 float samples.", "INVALID_POSTPROCESS_OPTIONS", {
3861
+ expectedLength: width * height * 2,
3862
+ actualLength: velocity.length
3863
+ });
3864
+ }
3865
+ if (!Number.isInteger(samples) || samples < 2 || samples > 16) {
3866
+ throw new RenderDeviceError("Motion blur samples must be an integer in [2, 16].", "INVALID_POSTPROCESS_OPTIONS", { samples });
3867
+ }
3868
+ if (scale < 0 || scale > 8) {
3869
+ throw new RenderDeviceError("Motion blur scale must be finite and in [0, 8].", "INVALID_POSTPROCESS_OPTIONS", { scale });
3870
+ }
3871
+ return { samples, scale, velocity };
3872
+ }
3873
+ function normalizeNativeTaaOptions(options, width, height) {
3874
+ const blend = taaNumberOption(options, "blend", 0.18);
3875
+ const history = options.history;
3876
+ if (!(history instanceof Uint8Array)) {
3877
+ throw new RenderDeviceError("TAA requires a Uint8Array history buffer.", "WEBGL_LDR_POSTPROCESS_HISTORY_REQUIRED");
3878
+ }
3879
+ if (history.byteLength !== width * height * 4) {
3880
+ throw new RenderDeviceError("TAA history must contain width * height * 4 RGBA bytes.", "INVALID_POSTPROCESS_OPTIONS", {
3881
+ expectedLength: width * height * 4,
3882
+ actualLength: history.byteLength
3883
+ });
3884
+ }
3885
+ if (blend < 0 || blend > 0.95) {
3886
+ throw new RenderDeviceError("TAA blend must be finite and in [0, 0.95].", "INVALID_POSTPROCESS_OPTIONS", { blend });
3887
+ }
3888
+ return { blend, history };
3889
+ }
3890
+ function bloomNumberOption(options, key, fallback) {
3891
+ const value = options[key];
3892
+ if (value === undefined)
3893
+ return fallback;
3894
+ if (typeof value !== "number" || !Number.isFinite(value)) {
3895
+ throw new RenderDeviceError(`Bloom ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3896
+ }
3897
+ return value;
3898
+ }
3899
+ function outlineNumberOption(options, key, fallback) {
3900
+ const value = options[key];
3901
+ if (value === undefined)
3902
+ return fallback;
3903
+ if (typeof value !== "number" || !Number.isFinite(value)) {
3904
+ throw new RenderDeviceError(`Outline ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3905
+ }
3906
+ return value;
3907
+ }
3908
+ function ssaoNumberOption(options, key, fallback) {
3909
+ const value = options[key];
3910
+ if (value === undefined)
3911
+ return fallback;
3912
+ if (typeof value !== "number" || !Number.isFinite(value)) {
3913
+ throw new RenderDeviceError(`SSAO ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3914
+ }
3915
+ return value;
3916
+ }
3917
+ function ssrNumberOption(options, key, fallback) {
3918
+ const value = options[key];
3919
+ if (value === undefined)
3920
+ return fallback;
3921
+ if (typeof value !== "number" || !Number.isFinite(value)) {
3922
+ throw new RenderDeviceError(`SSR ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3923
+ }
3924
+ return value;
3925
+ }
3926
+ function depthOfFieldNumberOption(options, key, fallback) {
3927
+ const value = options[key];
3928
+ if (value === undefined)
3929
+ return fallback;
3930
+ if (typeof value !== "number" || !Number.isFinite(value)) {
3931
+ throw new RenderDeviceError(`Depth-of-field ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3932
+ }
3933
+ return value;
3934
+ }
3935
+ function motionBlurNumberOption(options, key, fallback) {
3936
+ const value = options[key];
3937
+ if (value === undefined)
3938
+ return fallback;
3939
+ if (typeof value !== "number" || !Number.isFinite(value)) {
3940
+ throw new RenderDeviceError(`Motion blur ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3941
+ }
3942
+ return value;
3943
+ }
3944
+ function taaNumberOption(options, key, fallback) {
3945
+ const value = options[key];
3946
+ if (value === undefined)
3947
+ return fallback;
3948
+ if (typeof value !== "number" || !Number.isFinite(value)) {
3949
+ throw new RenderDeviceError(`TAA ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3950
+ }
3951
+ return value;
3952
+ }
3953
+ function stringOption(options, key, fallback) {
3954
+ const value = options[key];
3955
+ return typeof value === "string" ? value : fallback;
3956
+ }
3957
+ function colorSpaceId(value) {
3958
+ return value === "srgb" ? 1 : 0;
3959
+ }
3960
+ function toneMappingOperatorId(value) {
3961
+ if (value === "linear")
3962
+ return 0;
3963
+ if (value === "reinhard")
3964
+ return 1;
3965
+ if (value === "aces")
3966
+ return 2;
3967
+ if (value === "filmic")
3968
+ return 3;
3969
+ if (value === "uncharted2")
3970
+ return 4;
3971
+ if (value === "agx")
3972
+ return 5;
3973
+ return 6;
3974
+ }
3975
+ function completeUploadLevels(levels) {
3976
+ const uploadLevels = [];
3977
+ for (const level of levels) {
3978
+ if (uploadLevels.length === 0) {
3979
+ uploadLevels.push(level);
3980
+ continue;
3981
+ }
3982
+ const previous = uploadLevels[uploadLevels.length - 1];
3983
+ const expectedWidth = Math.max(1, Math.floor(previous.width / 2));
3984
+ const expectedHeight = Math.max(1, Math.floor(previous.height / 2));
3985
+ if (level.width !== expectedWidth || level.height !== expectedHeight) {
3986
+ break;
3987
+ }
3988
+ uploadLevels.push(level);
3989
+ }
3990
+ return uploadLevels;
3991
+ }
3992
+ function texturePixelUploadData(data, format) {
3993
+ if (format === "rgba16f" && data instanceof Uint16Array)
3994
+ return data;
3995
+ if (format === "rgba32f" && data instanceof Float32Array)
3996
+ return data;
3997
+ if (format === "rgba8" && (data instanceof Uint8Array || data instanceof Uint8ClampedArray))
3998
+ return data;
3999
+ throw new RenderDeviceError("Texture pixel data type does not match texture format", "UNSUPPORTED_TEXTURE_FORMAT", { format });
4000
+ }
4001
+ //# sourceMappingURL=LeanWebGL2Device.js.map