@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
@@ -1,12 +1,56 @@
1
+ import { temporalAccumulationWeight } from "./TemporalMath.js";
2
+ import { invertSsrProjection } from "./ProjectionMath.js";
1
3
  import { RenderDeviceError, resolveGpuTargetOwner, spreadGpuTargetInventory, } from "./RenderDevice.js";
2
4
  import { Texture, isCompressedTextureFormat, isFloatColorTextureFormat } from "./Texture.js";
3
5
  import { isTextureBinding, TextureBinding } from "./TextureBinding.js";
4
6
  import {} from "./VertexFormat.js";
5
7
  import { WebGL2StateCache } from "./WebGL2StateCache.js";
6
8
  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, resolveBloomPyramidPlan, } from "./postprocess/NativeBloomPyramid.js";
8
- const WEBGL_CUBE_FACES = ["px", "nx", "py", "ny", "pz", "nz"];
9
- class WebGL2Buffer {
9
+ import { normalizeBloomQualityPreset, resolveBloomPyramidBlurRadii, resolveBloomPyramidPlan, resolveBloomPyramidResponseGain, } from "./postprocess/NativeBloomPyramid.js";
10
+ import { WebGL2Counters } from "./webgl2/Counters.js";
11
+ import { createWebGL2DeviceProbe } from "./webgl2/Probe.js";
12
+ import { WebGL2ContextLifecycle } from "./webgl2/ContextLifecycle.js";
13
+ import { WebGL2TextureRegistry } from "./webgl2/TextureUpload.js";
14
+ import { WebGL2SamplerRegistry } from "./webgl2/Samplers.js";
15
+ import { WebGL2DrawCallBinder } from "./webgl2/MultiDraw.js";
16
+ import { AURA_FRAME_BINDING, AURA_LIGHTS_BINDING } from "./resources/UniformBlock.js";
17
+ import { WebGL2ReadbackProbe } from "./webgl2/Probe.js";
18
+ import { WebGL2LegacyPostPipeline } from "./webgl2/LegacyPost.js";
19
+ import { cubeFaceTarget, rgba8TextureInternalFormat, textureUploadFormat, resolveRenderTargetFormat, resolveCompressedTextureFormat, magFilter, minFilter, addressMode } from "./webgl2/TextureFormats.js";
20
+ export const WEBGL_CUBE_FACES = ["px", "nx", "py", "ny", "pz", "nz"];
21
+ /**
22
+ * #621 (01-RTARRAY): immutable storage (`texStorage2D/3D`) only accepts SIZED
23
+ * internal formats. `resolveRenderTargetFormat("rgba8")` returns unsized
24
+ * `gl.RGBA`, which is valid for the `texImage2D` 2d path but makes
25
+ * texStorage raise INVALID_ENUM and allocate nothing, so cube/array colour
26
+ * framebuffers come out incomplete (GPU run 38143556299: "array: WebGL render
27
+ * target framebuffer status is invalid"). Float formats are already sized.
28
+ */
29
+ export function renderTargetStorageFormat(gl, internalFormat) {
30
+ return internalFormat === gl.RGBA ? gl.RGBA8 : internalFormat;
31
+ }
32
+ /**
33
+ * Attachment-0 color format of a single-attachment 2d target: an explicit
34
+ * `colorAttachments[0].format` wins over the legacy `format` field.
35
+ */
36
+ export function renderTargetColorFormat(descriptor) {
37
+ return descriptor.colorAttachments?.[0]?.format ?? descriptor.format ?? "rgba8";
38
+ }
39
+ /**
40
+ * MAX_TEXTURE_SIZE of the canvas's WebGL2 context (4096 when unavailable).
41
+ * Lives in the device owner file so callers never touch getContext
42
+ * themselves (single-renderer gate). Moved from the engine's deleted
43
+ * safe-basic webglRuntime in Live Fix E6.
44
+ */
45
+ export function webGL2MaxTextureSize(canvas) {
46
+ return Number(canvas.getContext("webgl2")?.getParameter(WebGL2RenderingContext.MAX_TEXTURE_SIZE) ?? 4096);
47
+ }
48
+ /** C-08 named uniform-block → binding-point assignment applied post-link (T0-02). */
49
+ const NAMED_UNIFORM_BLOCK_BINDINGS = [
50
+ ["AuraFrame", AURA_FRAME_BINDING],
51
+ ["AuraLights", AURA_LIGHTS_BINDING]
52
+ ];
53
+ export class WebGL2Buffer {
10
54
  id;
11
55
  usage;
12
56
  byteLength;
@@ -14,6 +58,8 @@ class WebGL2Buffer {
14
58
  handle;
15
59
  gl;
16
60
  disposed = false;
61
+ /** PRD-01 Phase 6 (CONTRACTS §6.1): device-side cleanup hook — VAO eviction. */
62
+ onDispose;
17
63
  constructor(id, usage, byteLength, target, handle, gl) {
18
64
  this.id = id;
19
65
  this.usage = usage;
@@ -24,12 +70,14 @@ class WebGL2Buffer {
24
70
  }
25
71
  dispose() {
26
72
  if (!this.disposed) {
27
- this.gl.deleteBuffer(this.handle);
28
73
  this.disposed = true;
74
+ // Evict VAOs referencing this buffer before the GL object goes away.
75
+ this.onDispose?.();
76
+ this.gl.deleteBuffer(this.handle);
29
77
  }
30
78
  }
31
79
  }
32
- class WebGL2ShaderProgram {
80
+ export class WebGL2ShaderProgram {
33
81
  id;
34
82
  label;
35
83
  marker;
@@ -52,7 +100,7 @@ class WebGL2ShaderProgram {
52
100
  }
53
101
  }
54
102
  }
55
- class WebGL2RenderTarget {
103
+ export class WebGL2RenderTarget {
56
104
  id;
57
105
  width;
58
106
  height;
@@ -69,7 +117,14 @@ class WebGL2RenderTarget {
69
117
  gl;
70
118
  disposed = false;
71
119
  needsResolve = false;
72
- constructor(id, width, height, label, colorTexture, depthTexture, framebuffer, colorHandle, depthHandle, depthTextureHandle, sampleCount, drawFramebuffer, multisampleColorHandle, gl) {
120
+ dimension;
121
+ layers;
122
+ colorTextures;
123
+ layerTargets;
124
+ extraColorHandles;
125
+ layerFramebuffers;
126
+ layerChild;
127
+ constructor(id, width, height, label, colorTexture, depthTexture, framebuffer, colorHandle, depthHandle, depthTextureHandle, sampleCount, drawFramebuffer, multisampleColorHandle, gl, options = {}) {
73
128
  this.id = id;
74
129
  this.width = width;
75
130
  this.height = height;
@@ -84,13 +139,31 @@ class WebGL2RenderTarget {
84
139
  this.drawFramebuffer = drawFramebuffer;
85
140
  this.multisampleColorHandle = multisampleColorHandle;
86
141
  this.gl = gl;
142
+ this.dimension = options.dimension ?? "2d";
143
+ this.layers = options.layers;
144
+ this.colorTextures = options.colorTextures;
145
+ this.layerTargets = options.layerTargets;
146
+ this.extraColorHandles = options.extraColorHandles ?? [];
147
+ this.layerFramebuffers = options.layerFramebuffers ?? [];
148
+ this.layerChild = options.layerChild === true;
87
149
  }
88
150
  dispose() {
89
151
  if (!this.disposed) {
152
+ if (this.layerChild) {
153
+ this.disposed = true;
154
+ return;
155
+ }
156
+ for (const framebuffer of this.layerFramebuffers) {
157
+ if (framebuffer !== this.framebuffer)
158
+ this.gl.deleteFramebuffer(framebuffer);
159
+ }
90
160
  this.gl.deleteFramebuffer(this.framebuffer);
91
161
  if (this.drawFramebuffer !== this.framebuffer)
92
162
  this.gl.deleteFramebuffer(this.drawFramebuffer);
93
163
  this.gl.deleteTexture(this.colorHandle);
164
+ for (const handle of this.extraColorHandles) {
165
+ this.gl.deleteTexture(handle);
166
+ }
94
167
  if (this.depthHandle)
95
168
  this.gl.deleteRenderbuffer(this.depthHandle);
96
169
  if (this.multisampleColorHandle)
@@ -98,7 +171,14 @@ class WebGL2RenderTarget {
98
171
  if (this.depthTextureHandle)
99
172
  this.gl.deleteTexture(this.depthTextureHandle);
100
173
  this.colorTexture.dispose();
174
+ for (const texture of this.colorTextures ?? []) {
175
+ if (texture !== this.colorTexture)
176
+ texture.dispose();
177
+ }
101
178
  this.depthTexture?.dispose();
179
+ for (const child of this.layerTargets ?? []) {
180
+ child.disposed = true;
181
+ }
102
182
  this.disposed = true;
103
183
  }
104
184
  }
@@ -107,73 +187,13 @@ export class WebGL2Device {
107
187
  errorCheckMode;
108
188
  kind = "webgl2";
109
189
  info;
110
- disposed = false;
111
- contextLost = false;
112
190
  gl;
113
191
  nextId = 1;
114
- drawCalls = 0;
115
192
  buffers = new Set();
193
+ disposedBufferCount = 0;
116
194
  shaders = new Set();
117
195
  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
196
  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
197
  maxVertexAttributes;
178
198
  anisotropicFilteringExtension;
179
199
  maxTextureAnisotropy;
@@ -185,16 +205,15 @@ export class WebGL2Device {
185
205
  * why the parity table listed context-loss recovery as a gap while the listeners existed — the
186
206
  * device layer was never the gap, the absence of a public signal was.
187
207
  */
188
- deviceLostListeners = new Set();
189
- deviceRestoredListeners = new Set();
190
- contextLostListener;
191
- contextRestoredListener;
192
- canvas;
208
+ host;
209
+ /** C-28: device capability probe, filled from extension detection in the ctor. */
210
+ probe;
193
211
  static create(options) {
194
212
  const gl = options.canvas.getContext("webgl2", {
195
213
  antialias: options.antialias ?? true,
196
214
  alpha: options.alpha ?? false,
197
- preserveDrawingBuffer: options.preserveDrawingBuffer ?? false
215
+ preserveDrawingBuffer: options.preserveDrawingBuffer ?? false,
216
+ ...(options.powerPreference !== undefined ? { powerPreference: options.powerPreference } : {})
198
217
  });
199
218
  if (!gl) {
200
219
  throw new RenderDeviceError("WebGL2 is not available for the provided canvas", "WEBGL2_UNAVAILABLE");
@@ -251,39 +270,34 @@ export class WebGL2Device {
251
270
  ...(gl.getExtension("EXT_color_buffer_float") ? ["hdr-render-targets", "float-readback"] : [])
252
271
  ]
253
272
  };
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
- }
273
+ const host = {
274
+ gl,
275
+ stateCache: this.stateCache,
276
+ counters: new WebGL2Counters(),
277
+ buffers: this.buffers,
278
+ shaders: this.shaders,
279
+ renderTargets: this.renderTargets,
280
+ activeRenderTarget: null,
281
+ disposed: false,
282
+ contextLost: false,
283
+ errorCheckMode: this.errorCheckMode,
284
+ anisotropicFilteringExtension: this.anisotropicFilteringExtension,
285
+ maxTextureAnisotropy: this.maxTextureAnisotropy,
286
+ maxVertexAttributes: this.maxVertexAttributes,
287
+ resolveMultisampleTarget: (target) => this.resolveMultisampleTarget(target),
288
+ device: this
289
+ };
290
+ host.lifecycle = new WebGL2ContextLifecycle(host, canvas);
291
+ host.textureRegistry = new WebGL2TextureRegistry(host);
292
+ host.samplers = new WebGL2SamplerRegistry(host);
293
+ host.drawBinder = new WebGL2DrawCallBinder(host);
294
+ // #94 (Q-01-1): the C-29 restore hook (`renderer/DeviceLifecycle.ts`)
295
+ // calls `host.invalidateGpuObjects?.()` before the registry rebuild.
296
+ host.invalidateGpuObjects = () => this.invalidateGpuObjects();
297
+ host.probe = new WebGL2ReadbackProbe(host);
298
+ host.post = new WebGL2LegacyPostPipeline(host);
299
+ this.host = host;
300
+ this.probe = createWebGL2DeviceProbe(gl);
287
301
  }
288
302
  /**
289
303
  * Subscribe to WebGL context loss. Returns an unsubscribe function.
@@ -292,21 +306,190 @@ export class WebGL2Device {
292
306
  * memory pressure, on driver reset, or when a tab is backgrounded too long. What a caller can do is
293
307
  * be told, so it can recreate resources rather than render nothing.
294
308
  */
309
+ get disposed() {
310
+ return this.host.disposed;
311
+ }
312
+ set disposed(value) {
313
+ this.host.disposed = value;
314
+ }
315
+ get contextLost() {
316
+ return this.host.contextLost;
317
+ }
318
+ set contextLost(value) {
319
+ this.host.contextLost = value;
320
+ }
295
321
  onDeviceLost(listener) {
296
- this.deviceLostListeners.add(listener);
297
- return () => this.deviceLostListeners.delete(listener);
322
+ return this.host.lifecycle.onDeviceLost(listener);
298
323
  }
299
- /** Subscribe to context restoration. Returns an unsubscribe function. */
300
324
  onDeviceRestored(listener) {
301
- this.deviceRestoredListeners.add(listener);
302
- return () => this.deviceRestoredListeners.delete(listener);
325
+ return this.host.lifecycle.onDeviceRestored(listener);
303
326
  }
304
- /** True while the WebGL context is lost. Polling alternative to {@link onDeviceLost}. */
305
327
  isDeviceLost() {
306
- return this.contextLost;
328
+ return this.host.lifecycle.isDeviceLost();
329
+ }
330
+ beginFrame(width, height) {
331
+ this.host.lifecycle.beginFrame(width, height);
332
+ }
333
+ clear(color) {
334
+ this.host.lifecycle.clear(color);
335
+ }
336
+ clearRenderTarget(color, attachment) {
337
+ this.host.lifecycle.clearRenderTarget(color, attachment);
338
+ }
339
+ endFrame() {
340
+ this.host.lifecycle.endFrame();
341
+ }
342
+ draw(command) {
343
+ this.host.drawBinder.draw(command);
344
+ }
345
+ readPixels(x, y, width, height, attachment) {
346
+ return this.host.probe.readPixels(x, y, width, height, attachment);
347
+ }
348
+ readFloatPixels(x, y, width, height) {
349
+ return this.host.probe.readFloatPixels(x, y, width, height);
350
+ }
351
+ readDepthPixels(x, y, width, height) {
352
+ return this.host.probe.readDepthPixels(x, y, width, height);
353
+ }
354
+ writeRenderTargetPixels(target, pixels) {
355
+ this.host.probe.writeRenderTargetPixels(target, pixels);
356
+ }
357
+ presentRenderTarget(source) {
358
+ this.host.post.presentRenderTarget(source);
359
+ }
360
+ presentLdrPostprocess(source, options) {
361
+ this.host.post.presentLdrPostprocess(source, options);
362
+ }
363
+ executeReflectionSurfaceSsr(source, normalMask, output, options) {
364
+ this.host.post.executeReflectionSurfaceSsr(source, normalMask, output, options);
365
+ }
366
+ getBloomDiagnostics() {
367
+ return this.host.post.getBloomDiagnostics();
368
+ }
369
+ /** C-28: partial counters from existing diagnostics and the wrapped counter fields. */
370
+ counters() {
371
+ const diagnostics = this.getDiagnostics();
372
+ return {
373
+ drawCalls: this.host.counters.drawCalls,
374
+ bufferCreates: diagnostics.buffers,
375
+ textureUploads: diagnostics.textures ?? 0,
376
+ readbacks: this.host.counters.readbacks,
377
+ renderTargetsCreated: diagnostics.renderTargets ?? 0,
378
+ programCompiles: this.host.counters.programCompiles,
379
+ liveBuffers: diagnostics.buffers,
380
+ liveVertexArrays: this.host.drawBinder.vertexArrayCache.size,
381
+ textureBytes: diagnostics.textureBytes ?? 0,
382
+ renderTargetBytes: 0
383
+ };
384
+ }
385
+ resetFrameCounters() {
386
+ this.host.counters.drawCalls = 0;
387
+ this.host.counters.readbacks = 0;
388
+ }
389
+ /**
390
+ * PRD-01 §6.4 / 01-S7: with `KHR_parallel_shader_compile`, compile and
391
+ * link are issued without querying status, and the promise resolves once
392
+ * `COMPLETION_STATUS_KHR` reports done (polled per animation frame), so
393
+ * the caller's frame is not blocked. Without the extension this is the
394
+ * synchronous `createShaderProgram` wrapped in a resolved promise.
395
+ */
396
+ compileAsync(sources) {
397
+ const ext = this.parallelShaderCompileExtension();
398
+ if (!ext)
399
+ return Promise.resolve(this.createShaderProgram(sources));
400
+ this.host.lifecycle.assertAlive();
401
+ this.assertShaderMarker(sources);
402
+ const vertexShader = this.issueShaderCompile(this.gl.VERTEX_SHADER, sources.vertex, sources.label);
403
+ const fragmentShader = this.issueShaderCompile(this.gl.FRAGMENT_SHADER, sources.fragment, sources.label);
404
+ const program = this.gl.createProgram();
405
+ if (!program) {
406
+ throw new RenderDeviceError("Failed to allocate WebGL shader program", "WEBGL_ALLOCATION_FAILED");
407
+ }
408
+ this.host.counters.shaderProgramCreateCount += 1;
409
+ this.gl.attachShader(program, vertexShader);
410
+ this.gl.attachShader(program, fragmentShader);
411
+ this.gl.linkProgram(program);
412
+ this.host.counters.programCompiles += 1;
413
+ this.parallelCompilesPending += 1;
414
+ return new Promise((resolve, reject) => {
415
+ const poll = () => {
416
+ if (this.host.disposed || this.host.contextLost) {
417
+ this.parallelCompilesPending -= 1;
418
+ reject(new RenderDeviceError("Device lost during parallel shader compile", "DEVICE_LOST", { label: sources.label }));
419
+ return;
420
+ }
421
+ if (this.gl.getProgramParameter(program, ext.COMPLETION_STATUS_KHR) !== true) {
422
+ scheduleParallelCompilePoll(poll);
423
+ return;
424
+ }
425
+ this.parallelCompilesPending -= 1;
426
+ try {
427
+ for (const [shader, type] of [[vertexShader, "vertex"], [fragmentShader, "fragment"]]) {
428
+ if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) {
429
+ const log = this.gl.getShaderInfoLog(shader) ?? "Unknown shader compile error";
430
+ this.gl.deleteShader(vertexShader);
431
+ this.gl.deleteShader(fragmentShader);
432
+ this.gl.deleteProgram(program);
433
+ throw new RenderDeviceError("WebGL shader compile failed", "SHADER_COMPILE_FAILED", { label: sources.label, log, stage: type });
434
+ }
435
+ }
436
+ this.gl.deleteShader(vertexShader);
437
+ this.gl.deleteShader(fragmentShader);
438
+ resolve(this.finalizeLinkedProgram(program, sources));
439
+ }
440
+ catch (error) {
441
+ reject(error);
442
+ }
443
+ };
444
+ scheduleParallelCompilePoll(poll);
445
+ });
446
+ }
447
+ /** Programs issued through `compileAsync`'s parallel path that have not completed yet. */
448
+ parallelCompilesPending = 0;
449
+ parallelCompileExt;
450
+ parallelShaderCompileExtension() {
451
+ if (this.parallelCompileExt === undefined) {
452
+ this.parallelCompileExt = this.gl.getExtension("KHR_parallel_shader_compile") ?? null;
453
+ }
454
+ return this.parallelCompileExt;
455
+ }
456
+ issueShaderCompile(type, source, label) {
457
+ const shader = this.gl.createShader(type);
458
+ if (!shader) {
459
+ throw new RenderDeviceError("Failed to allocate WebGL shader", "WEBGL_ALLOCATION_FAILED", { label });
460
+ }
461
+ this.gl.shaderSource(shader, source);
462
+ this.gl.compileShader(shader);
463
+ return shader;
464
+ }
465
+ assertShaderMarker(sources) {
466
+ if (!sources.vertex.includes(sources.marker) || !sources.fragment.includes(sources.marker)) {
467
+ throw new RenderDeviceError("Shader source marker is missing from compiled sources", "SHADER_MARKER_MISSING", {
468
+ label: sources.label,
469
+ marker: sources.marker
470
+ });
471
+ }
472
+ }
473
+ multiDrawElementsInstanced(draws) {
474
+ this.host.drawBinder.multiDrawElementsInstanced(draws);
475
+ }
476
+ /**
477
+ * #94 (Q-01-1, C-28/C-29): forget every GL object name and uploaded value
478
+ * cached against the lost context — VAOs, uniform locations, last-value
479
+ * uniform snapshots, the GL state shadow and texture-unit bindings — so
480
+ * they recreate lazily on the next draw after `webglcontextrestored`.
481
+ * `counters().liveVertexArrays` reads 0 afterwards. Buffers, textures and
482
+ * programs are recreated by the C-29 ResourceRegistry rebuild that runs
483
+ * right after this in the restore hook.
484
+ */
485
+ invalidateGpuObjects() {
486
+ this.host.drawBinder.invalidateGpuObjects();
487
+ this.host.stateCache.invalidate();
488
+ this.host.samplers.activeTextureUnitIndex = -1;
489
+ this.host.samplers.textureUnitBindings.clear();
307
490
  }
308
491
  createBuffer(usage, byteLength, initialData) {
309
- this.assertAlive();
492
+ this.host.lifecycle.assertAlive();
310
493
  if (byteLength <= 0 || !Number.isInteger(byteLength)) {
311
494
  throw new RenderDeviceError("Buffer byteLength must be a positive integer", "INVALID_BUFFER_SIZE", { byteLength });
312
495
  }
@@ -314,8 +497,12 @@ export class WebGL2Device {
314
497
  if (!handle) {
315
498
  throw new RenderDeviceError("Failed to allocate WebGL buffer", "WEBGL_ALLOCATION_FAILED");
316
499
  }
317
- const target = usage === "index" ? this.gl.ELEMENT_ARRAY_BUFFER : this.gl.ARRAY_BUFFER;
318
- this.bindNoVertexArray();
500
+ const target = usage === "index"
501
+ ? this.gl.ELEMENT_ARRAY_BUFFER
502
+ : usage === "uniform"
503
+ ? this.gl.UNIFORM_BUFFER
504
+ : this.gl.ARRAY_BUFFER;
505
+ this.host.drawBinder.bindNoVertexArray();
319
506
  this.stateCache.bindBuffer(target, handle, () => this.gl.bindBuffer(target, handle));
320
507
  this.gl.bufferData(target, byteLength, this.gl.DYNAMIC_DRAW);
321
508
  if (initialData) {
@@ -328,12 +515,20 @@ export class WebGL2Device {
328
515
  this.gl.bufferSubData(target, 0, initialData);
329
516
  }
330
517
  const buffer = new WebGL2Buffer(this.nextId++, usage, byteLength, target, handle, this.gl);
518
+ buffer.onDispose = () => {
519
+ // §6.1 declared leak fix: cached VAOs key on buffer ids; a dead buffer's
520
+ // entries must die with it, and the live-buffer set drops the corpse
521
+ // (`disposedBuffers` stays meaningful via the monotonic counter).
522
+ this.host.drawBinder.evictVertexArraysForBuffer(buffer.id);
523
+ this.buffers.delete(buffer);
524
+ this.disposedBufferCount += 1;
525
+ };
331
526
  this.buffers.add(buffer);
332
527
  return buffer;
333
528
  }
334
529
  updateBuffer(buffer, byteOffset, data) {
335
- this.assertAlive();
336
- const webglBuffer = this.requireBuffer(buffer);
530
+ this.host.lifecycle.assertAlive();
531
+ const webglBuffer = this.host.drawBinder.requireBuffer(buffer);
337
532
  if (byteOffset < 0 || byteOffset + data.byteLength > webglBuffer.byteLength) {
338
533
  throw new RenderDeviceError("Buffer update range is out of bounds", "BUFFER_RANGE_OUT_OF_BOUNDS", {
339
534
  byteOffset,
@@ -341,14 +536,22 @@ export class WebGL2Device {
341
536
  byteLength: webglBuffer.byteLength
342
537
  });
343
538
  }
344
- this.bindNoVertexArray();
539
+ this.host.drawBinder.bindNoVertexArray();
345
540
  this.stateCache.bindBuffer(webglBuffer.target, webglBuffer.handle, () => this.gl.bindBuffer(webglBuffer.target, webglBuffer.handle));
346
541
  this.gl.bufferSubData(webglBuffer.target, byteOffset, data);
347
- this.bufferUpdateCount += 1;
542
+ this.host.counters.bufferUpdateCount += 1;
543
+ }
544
+ bindUniformBuffer(buffer, binding) {
545
+ this.host.lifecycle.assertAlive();
546
+ const webglBuffer = this.host.drawBinder.requireBuffer(buffer);
547
+ if (webglBuffer.target !== this.gl.UNIFORM_BUFFER) {
548
+ throw new RenderDeviceError("Buffer was not created with usage 'uniform'", "INVALID_BUFFER_USAGE", { bufferId: buffer.id });
549
+ }
550
+ this.gl.bindBufferBase(this.gl.UNIFORM_BUFFER, binding, webglBuffer.handle);
348
551
  }
349
552
  readBuffer(buffer, byteOffset = 0, byteLength = buffer.byteLength - byteOffset) {
350
- this.assertAlive();
351
- const webglBuffer = this.requireBuffer(buffer);
553
+ this.host.lifecycle.assertAlive();
554
+ const webglBuffer = this.host.drawBinder.requireBuffer(buffer);
352
555
  if (byteOffset < 0 || byteLength < 0 || byteOffset + byteLength > webglBuffer.byteLength) {
353
556
  throw new RenderDeviceError("Buffer read range is out of bounds", "BUFFER_RANGE_OUT_OF_BOUNDS", {
354
557
  byteOffset,
@@ -357,42 +560,59 @@ export class WebGL2Device {
357
560
  });
358
561
  }
359
562
  const output = new Uint8Array(byteLength);
360
- this.bindNoVertexArray();
563
+ this.host.drawBinder.bindNoVertexArray();
361
564
  this.stateCache.bindBuffer(webglBuffer.target, webglBuffer.handle, () => this.gl.bindBuffer(webglBuffer.target, webglBuffer.handle));
362
565
  this.gl.getBufferSubData(webglBuffer.target, byteOffset, output);
363
566
  return output;
364
567
  }
365
568
  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
- }
569
+ this.host.lifecycle.assertAlive();
570
+ this.assertShaderMarker(sources);
373
571
  const vertexShader = this.compileShader(this.gl.VERTEX_SHADER, sources.vertex, sources.label);
374
572
  const fragmentShader = this.compileShader(this.gl.FRAGMENT_SHADER, sources.fragment, sources.label);
375
573
  const program = this.gl.createProgram();
376
574
  if (!program) {
377
575
  throw new RenderDeviceError("Failed to allocate WebGL shader program", "WEBGL_ALLOCATION_FAILED");
378
576
  }
379
- this.shaderProgramCreateCount += 1;
577
+ this.host.counters.shaderProgramCreateCount += 1;
380
578
  this.gl.attachShader(program, vertexShader);
381
579
  this.gl.attachShader(program, fragmentShader);
382
580
  this.gl.linkProgram(program);
581
+ this.host.counters.programCompiles += 1;
383
582
  this.gl.deleteShader(vertexShader);
384
583
  this.gl.deleteShader(fragmentShader);
584
+ return this.finalizeLinkedProgram(program, sources);
585
+ }
586
+ /** LINK_STATUS check, named-block bindings and reflection for a linked program. */
587
+ finalizeLinkedProgram(program, sources) {
385
588
  if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
386
589
  const log = this.gl.getProgramInfoLog(program) ?? "Unknown shader link error";
387
590
  this.gl.deleteProgram(program);
388
591
  throw new RenderDeviceError("WebGL shader link failed", "SHADER_LINK_FAILED", { label: sources.label, log });
389
592
  }
593
+ // T0-02/C-08: generated blocks declare `layout(std140)` with no baked
594
+ // `binding=`; the named-block → binding-point assignment is fixed here so
595
+ // every linked program gets AuraFrame→0 and AuraLights→1 regardless of
596
+ // declaration order. Programs that do not declare a block are skipped.
597
+ for (const [blockName, binding] of NAMED_UNIFORM_BLOCK_BINDINGS) {
598
+ const index = this.gl.getUniformBlockIndex(program, blockName);
599
+ if (index !== this.gl.INVALID_INDEX) {
600
+ this.gl.uniformBlockBinding(program, index, binding);
601
+ }
602
+ }
390
603
  const shader = new WebGL2ShaderProgram(this.nextId++, sources.label, sources.marker, this.reflectProgram(program), program, this.gl);
391
604
  this.shaders.add(shader);
392
605
  return shader;
393
606
  }
394
607
  createRenderTarget(descriptor) {
395
- this.assertAlive();
608
+ this.host.lifecycle.assertAlive();
609
+ if ((descriptor.dimension !== undefined && descriptor.dimension !== "2d") ||
610
+ descriptor.layers !== undefined ||
611
+ descriptor.depthOnly === true ||
612
+ descriptor.depthCompare === true ||
613
+ (descriptor.colorAttachments?.length ?? 0) > 1) {
614
+ return this.createFeatureRenderTarget(descriptor);
615
+ }
396
616
  if (!Number.isInteger(descriptor.width) ||
397
617
  descriptor.width <= 0 ||
398
618
  !Number.isInteger(descriptor.height) ||
@@ -457,8 +677,15 @@ export class WebGL2Device {
457
677
  this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);
458
678
  this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
459
679
  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);
680
+ // A single `colorAttachments` entry is the attachment-0 format (CONTRACTS
681
+ // §3.4) and wins over the legacy `format` field. Before this, the 2d path
682
+ // ignored it, so `createHdrTarget` ({ format: "rgba8", colorAttachments:
683
+ // [{ format: "rgba16f" }] }) without coverage allocated an RGBA8 "HDR"
684
+ // scene target: linear radiance clamped at 1.0 and 8-bit dark banding
685
+ // before tone mapping (GPU run 38190015020: device ACES of 4.0 = 226 vs
686
+ // three 250; tonemap-ramp dark swatches ΔE2000 13-30).
687
+ const format = renderTargetColorFormat(descriptor);
688
+ const textureFormat = resolveRenderTargetFormat(this.gl, format);
462
689
  this.gl.texImage2D(this.gl.TEXTURE_2D, 0, textureFormat.internalFormat, descriptor.width, descriptor.height, 0, this.gl.RGBA, textureFormat.type, null);
463
690
  this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebuffer);
464
691
  this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER, this.gl.COLOR_ATTACHMENT0, this.gl.TEXTURE_2D, colorHandle, 0);
@@ -516,563 +743,376 @@ export class WebGL2Device {
516
743
  this.renderTargets.add(target);
517
744
  // Shadow passes label their depth target after the shadow map texture, so the
518
745
  // 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");
746
+ // Cascaded maps use the established renderer-csm-cascade-* labels.
747
+ // Count their actual allocation too, including the first shadow frame.
748
+ if (/shadow|(?:^|-)csm(?:-|$)/i.test(descriptor.label ?? ""))
749
+ this.host.counters.shadowRenderTargetsAllocated += 1;
750
+ this.host.textureRegistry.textures.set(target.colorTexture, colorHandle);
751
+ this.host.textureRegistry.textureUploadModes.set(target.colorTexture, "rgba8");
523
752
  if (depthTexture && depthTextureHandle) {
524
- this.textures.set(depthTexture, depthTextureHandle);
525
- this.textureUploadModes.set(depthTexture, "depth-render-target");
753
+ this.host.textureRegistry.textures.set(depthTexture, depthTextureHandle);
754
+ this.host.textureRegistry.textureUploadModes.set(depthTexture, "depth-render-target");
526
755
  }
527
756
  return target;
528
757
  }
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
758
+ /**
759
+ * PR 0a render-target fields (CONTRACTS §3.4): `dimension`/`layers` (cube +
760
+ * 2d-array layered targets rendered through `layerTargets`), `depthOnly`
761
+ * (no color attachment), `depthCompare` (comparison-sampler depth texture)
762
+ * and `colorAttachments` (MRT, per-layer `drawBuffers` state).
763
+ */
764
+ createFeatureRenderTarget(descriptor) {
765
+ const gl = this.gl;
766
+ if (!Number.isInteger(descriptor.width) ||
767
+ descriptor.width <= 0 ||
768
+ !Number.isInteger(descriptor.height) ||
769
+ descriptor.height <= 0) {
770
+ throw new RenderDeviceError("Render target dimensions must be positive integers", "INVALID_RENDER_TARGET_SIZE", {
771
+ width: descriptor.width,
772
+ height: descriptor.height,
773
+ label: descriptor.label
605
774
  });
606
775
  }
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
776
+ const dimension = descriptor.dimension ?? "2d";
777
+ if (descriptor.layers !== undefined && (!Number.isInteger(descriptor.layers) || descriptor.layers < 1)) {
778
+ throw new RenderDeviceError("Render target layer count must be a positive integer", "INVALID_RENDER_TARGET_SIZE", {
779
+ layers: descriptor.layers,
780
+ label: descriptor.label
618
781
  });
619
782
  }
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
783
+ if (descriptor.layers !== undefined && dimension !== "2d-array") {
784
+ throw new RenderDeviceError("Render target `layers` only applies to dimension \"2d-array\"", "INVALID_RENDER_TARGET_SIZE", {
785
+ dimension,
786
+ layers: descriptor.layers,
787
+ label: descriptor.label
626
788
  });
627
789
  }
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
790
+ const layerCount = dimension === "cube" ? 6 : dimension === "2d-array" ? descriptor.layers ?? 1 : 1;
791
+ const depthOnly = descriptor.depthOnly === true;
792
+ if (depthOnly && (descriptor.colorAttachments?.length ?? 0) > 0) {
793
+ throw new RenderDeviceError("Render target cannot combine `depthOnly` with `colorAttachments`", "INVALID_RENDER_TARGET_SIZE", {
794
+ label: descriptor.label
641
795
  });
642
796
  }
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"
797
+ if (depthOnly && descriptor.depth === false) {
798
+ throw new RenderDeviceError("Render target cannot combine `depthOnly` with `depth: false`", "INVALID_RENDER_TARGET_SIZE", {
799
+ label: descriptor.label
648
800
  });
649
801
  }
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"
802
+ const sampleCount = descriptor.sampleCount ?? 1;
803
+ const colorAttachmentCount = depthOnly ? 0 : Math.max(1, descriptor.colorAttachments?.length ?? 1);
804
+ if (sampleCount > 1 && (depthOnly || descriptor.depthCompare === true || (descriptor.colorAttachments?.length ?? 0) > 1 || layerCount > 1)) {
805
+ throw new RenderDeviceError("Multisample render targets do not support layered, depth-only, compare or MRT descriptors", "INVALID_RENDER_TARGET_SAMPLE_COUNT", {
806
+ sampleCount,
807
+ label: descriptor.label
654
808
  });
655
809
  }
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
810
+ const maxSamples = Number(gl.getParameter(gl.MAX_SAMPLES) ?? 1);
811
+ if (!Number.isInteger(sampleCount) || sampleCount < 1 || sampleCount > maxSamples) {
812
+ throw new RenderDeviceError("WebGL2 render-target sampleCount must be an integer supported by MAX_SAMPLES.", "INVALID_RENDER_TARGET_SAMPLE_COUNT", {
813
+ sampleCount,
814
+ maxSamples,
815
+ label: descriptor.label
664
816
  });
665
817
  }
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
- });
818
+ const label = descriptor.label ?? "render-target";
819
+ const textureTarget = dimension === "cube" ? gl.TEXTURE_CUBE_MAP : dimension === "2d-array" ? gl.TEXTURE_2D_ARRAY : gl.TEXTURE_2D;
820
+ const depthMode = depthOnly || descriptor.depth === "texture" || (layerCount > 1 && descriptor.depth !== false) ? "texture" : descriptor.depth === false ? "none" : "renderbuffer";
821
+ const depthCompare = descriptor.depthCompare === true;
822
+ const colorFormats = depthOnly
823
+ ? []
824
+ : colorAttachmentCount === 1 && !descriptor.colorAttachments
825
+ ? [descriptor.format ?? "rgba8"]
826
+ : (descriptor.colorAttachments ?? [{ format: descriptor.format ?? "rgba8" }]).map((attachment) => attachment.format);
827
+ const colorHandles = [];
828
+ const colorTextures = [];
829
+ let depthTextureHandle = null;
830
+ const layerFramebuffers = [];
831
+ const cleanup = () => {
832
+ for (const handle of colorHandles)
833
+ gl.deleteTexture(handle);
834
+ if (depthTextureHandle)
835
+ gl.deleteTexture(depthTextureHandle);
836
+ for (const framebuffer of layerFramebuffers)
837
+ gl.deleteFramebuffer(framebuffer);
838
+ };
839
+ const previousActiveTexture = gl.getParameter(gl.ACTIVE_TEXTURE);
840
+ gl.activeTexture(gl.TEXTURE0);
841
+ const previousTexture = gl.getParameter(gl.TEXTURE_BINDING_2D);
842
+ const previousCubeTexture = gl.getParameter(gl.TEXTURE_BINDING_CUBE_MAP);
843
+ const previousArrayTexture = gl.getParameter(gl.TEXTURE_BINDING_2D_ARRAY);
844
+ const previousFramebuffer = gl.getParameter(gl.FRAMEBUFFER_BINDING);
845
+ for (let attachment = 0; attachment < colorFormats.length; attachment += 1) {
846
+ const format = colorFormats[attachment];
847
+ const textureFormat = resolveRenderTargetFormat(gl, format);
848
+ const handle = gl.createTexture();
849
+ if (!handle) {
850
+ cleanup();
851
+ throw new RenderDeviceError("Failed to allocate WebGL render target", "WEBGL_ALLOCATION_FAILED", { label });
852
+ }
853
+ colorHandles.push(handle);
854
+ colorTextures.push(new Texture({ width: descriptor.width, height: descriptor.height, format, label: colorAttachmentCount > 1 ? `${label}-color-${attachment}` : descriptor.label ?? "render-target-color", dimension, layers: dimension === "2d" ? undefined : layerCount, renderAttachment: true }));
855
+ gl.bindTexture(textureTarget, handle);
856
+ gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
857
+ gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
858
+ gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
859
+ gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
860
+ if (dimension === "2d") {
861
+ gl.texImage2D(textureTarget, 0, textureFormat.internalFormat, descriptor.width, descriptor.height, 0, gl.RGBA, textureFormat.type, null);
862
+ }
863
+ else if (dimension === "cube") {
864
+ gl.texStorage2D(textureTarget, 1, renderTargetStorageFormat(gl, textureFormat.internalFormat), descriptor.width, descriptor.height);
865
+ }
866
+ else {
867
+ gl.texStorage3D(textureTarget, 1, renderTargetStorageFormat(gl, textureFormat.internalFormat), descriptor.width, descriptor.height, layerCount);
868
+ }
671
869
  }
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
870
+ let depthTexture;
871
+ if (depthMode === "texture") {
872
+ depthTextureHandle = gl.createTexture();
873
+ if (!depthTextureHandle) {
874
+ cleanup();
875
+ throw new RenderDeviceError("Failed to allocate WebGL render target", "WEBGL_ALLOCATION_FAILED", { label });
876
+ }
877
+ depthTexture = new Texture({
878
+ width: descriptor.width,
879
+ height: descriptor.height,
880
+ format: "depth24",
881
+ label: `${label}-depth`,
882
+ dimension,
883
+ layers: dimension === "2d" ? undefined : layerCount,
884
+ renderAttachment: true
678
885
  });
886
+ gl.bindTexture(textureTarget, depthTextureHandle);
887
+ gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
888
+ gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
889
+ gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
890
+ gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
891
+ if (depthCompare) {
892
+ gl.texParameteri(textureTarget, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);
893
+ gl.texParameteri(textureTarget, gl.TEXTURE_COMPARE_FUNC, gl.LEQUAL);
894
+ }
895
+ if (dimension === "2d-array") {
896
+ gl.texImage3D(textureTarget, 0, gl.DEPTH_COMPONENT24, descriptor.width, descriptor.height, layerCount, 0, gl.DEPTH_COMPONENT, gl.UNSIGNED_INT, null);
897
+ }
898
+ else if (dimension === "cube") {
899
+ gl.texStorage2D(textureTarget, 1, gl.DEPTH_COMPONENT24, descriptor.width, descriptor.height);
900
+ }
901
+ else {
902
+ gl.texImage2D(textureTarget, 0, gl.DEPTH_COMPONENT24, descriptor.width, descriptor.height, 0, gl.DEPTH_COMPONENT, gl.UNSIGNED_INT, null);
903
+ }
679
904
  }
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);
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
- }
905
+ let depthRenderbufferHandle = null;
906
+ if (depthMode === "renderbuffer") {
907
+ depthRenderbufferHandle = gl.createRenderbuffer();
908
+ if (!depthRenderbufferHandle) {
909
+ cleanup();
910
+ throw new RenderDeviceError("Failed to allocate WebGL render target", "WEBGL_ALLOCATION_FAILED", { label });
911
+ }
912
+ const previousRenderbuffer = gl.getParameter(gl.RENDERBUFFER_BINDING);
913
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthRenderbufferHandle);
914
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, descriptor.width, descriptor.height);
915
+ gl.bindRenderbuffer(gl.RENDERBUFFER, previousRenderbuffer);
916
+ }
917
+ const drawBuffers = depthOnly
918
+ ? [gl.NONE]
919
+ : colorFormats.map((_, attachment) => gl.COLOR_ATTACHMENT0 + attachment);
920
+ const attachLayer = (framebuffer, layer) => {
921
+ gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
922
+ if (depthOnly) {
923
+ gl.drawBuffers([gl.NONE]);
924
+ gl.readBuffer(gl.NONE);
925
+ }
926
+ else if (drawBuffers.length > 1) {
927
+ gl.drawBuffers(drawBuffers);
754
928
  }
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;
929
+ for (let attachment = 0; attachment < colorHandles.length; attachment += 1) {
930
+ if (dimension === "cube") {
931
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + attachment, gl.TEXTURE_CUBE_MAP_POSITIVE_X + layer, colorHandles[attachment], 0);
761
932
  }
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;
933
+ else if (dimension === "2d-array") {
934
+ gl.framebufferTextureLayer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + attachment, colorHandles[attachment], 0, layer);
766
935
  }
767
- if (motionBlurOptions) {
768
- const motionBlurTargetIndex = temporarySourceIndex === 0 ? 1 : 0;
769
- ldrSourceHandle = this.executeNativeMotionBlurPass(ldrSourceHandle, bloomResources, motionBlurOptions, vertexArray, motionBlurTargetIndex);
770
- temporarySourceIndex = motionBlurTargetIndex;
936
+ else {
937
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + attachment, gl.TEXTURE_2D, colorHandles[attachment], 0);
771
938
  }
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;
939
+ }
940
+ if (depthTextureHandle) {
941
+ if (dimension === "cube") {
942
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_CUBE_MAP_POSITIVE_X + layer, depthTextureHandle, 0);
776
943
  }
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;
944
+ else if (dimension === "2d-array") {
945
+ gl.framebufferTextureLayer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, depthTextureHandle, 0, layer);
781
946
  }
782
- if (taaOptions) {
783
- const taaTargetIndex = temporarySourceIndex === 0 ? 1 : 0;
784
- ldrSourceHandle = this.executeNativeTaaPass(ldrSourceHandle, bloomResources, taaOptions, vertexArray, taaTargetIndex);
785
- temporarySourceIndex = taaTargetIndex;
947
+ else {
948
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, depthTextureHandle, 0);
786
949
  }
787
950
  }
788
- if (outlineOptions && bloomResources) {
789
- const outlineTargetIndex = temporarySourceIndex === 0 ? 1 : 0;
790
- ldrSourceHandle = this.executeNativeOutlinePasses(ldrSourceHandle, bloomResources, outlineOptions, vertexArray, outlineTargetIndex);
791
- temporarySourceIndex = outlineTargetIndex;
951
+ if (depthRenderbufferHandle) {
952
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthRenderbufferHandle);
953
+ }
954
+ return gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE;
955
+ };
956
+ for (let layer = 0; layer < layerCount; layer += 1) {
957
+ const framebuffer = gl.createFramebuffer();
958
+ if (!framebuffer) {
959
+ cleanup();
960
+ throw new RenderDeviceError("Failed to allocate WebGL render target", "WEBGL_ALLOCATION_FAILED", { label });
961
+ }
962
+ layerFramebuffers.push(framebuffer);
963
+ if (!attachLayer(framebuffer, layer)) {
964
+ const status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
965
+ cleanup();
966
+ if (depthRenderbufferHandle)
967
+ gl.deleteRenderbuffer(depthRenderbufferHandle);
968
+ gl.bindFramebuffer(gl.FRAMEBUFFER, previousFramebuffer);
969
+ gl.bindTexture(gl.TEXTURE_2D, previousTexture);
970
+ if (previousCubeTexture !== null)
971
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, previousCubeTexture);
972
+ if (previousArrayTexture !== null)
973
+ gl.bindTexture(gl.TEXTURE_2D_ARRAY, previousArrayTexture);
974
+ gl.activeTexture(previousActiveTexture);
975
+ this.stateCache.invalidate();
976
+ throw new RenderDeviceError("WebGL render target framebuffer status is invalid", "FRAMEBUFFER_INVALID", { status, layer, label });
792
977
  }
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
978
  }
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
- });
979
+ gl.bindFramebuffer(gl.FRAMEBUFFER, previousFramebuffer);
980
+ gl.bindTexture(gl.TEXTURE_2D, previousTexture);
981
+ if (previousCubeTexture !== null)
982
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, previousCubeTexture);
983
+ if (previousArrayTexture !== null)
984
+ gl.bindTexture(gl.TEXTURE_2D_ARRAY, previousArrayTexture);
985
+ gl.activeTexture(previousActiveTexture);
986
+ this.stateCache.invalidate();
987
+ const colorTexture = colorTextures[0] ?? new Texture({ width: descriptor.width, height: descriptor.height, format: "rgba8", label: `${label}-colorless`, dimension, renderAttachment: true });
988
+ let parentColorHandle = colorHandles[0];
989
+ if (!parentColorHandle) {
990
+ // Depth-only targets keep a placeholder Texture in `colorTexture`; give it a
991
+ // real (never-attached, never-registered) GL handle so dispose stays sound.
992
+ parentColorHandle = gl.createTexture();
993
+ if (!parentColorHandle) {
994
+ cleanup();
995
+ if (depthRenderbufferHandle)
996
+ gl.deleteRenderbuffer(depthRenderbufferHandle);
997
+ throw new RenderDeviceError("Failed to allocate WebGL render target", "WEBGL_ALLOCATION_FAILED", { label });
998
+ }
805
999
  }
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
- });
1000
+ const target = new WebGL2RenderTarget(this.nextId++, descriptor.width, descriptor.height, label, colorTexture, depthTexture, layerFramebuffers[0], parentColorHandle, depthRenderbufferHandle, depthTextureHandle, 1, layerFramebuffers[0], null, gl, {
1001
+ dimension,
1002
+ layers: layerCount > 1 ? layerCount : undefined,
1003
+ colorTextures: colorTextures.length > 1 ? colorTextures : undefined,
1004
+ extraColorHandles: colorHandles.slice(1),
1005
+ layerFramebuffers,
1006
+ layerChild: false
1007
+ });
1008
+ if (layerCount > 1) {
1009
+ const children = layerFramebuffers.map((framebuffer, layer) => new WebGL2RenderTarget(this.nextId++, descriptor.width, descriptor.height, `${label}-layer-${layer}`, colorTexture, depthTexture, framebuffer, colorHandles[0], null, depthTextureHandle, 1, framebuffer, null, gl, { dimension, layers: 1, colorTextures: target.colorTextures, layerChild: true }));
1010
+ // layerTargets shares parent GL resources; children only mark dispose.
1011
+ target.layerTargets = children;
1012
+ for (const child of children) {
1013
+ this.renderTargets.add(child);
1014
+ }
824
1015
  }
825
- const readTarget = this.activeRenderTarget;
826
- if (readTarget) {
827
- this.resolveMultisampleTarget(readTarget);
828
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, readTarget.framebuffer);
1016
+ this.renderTargets.add(target);
1017
+ if (/shadow|(?:^|-)csm(?:-|$)/i.test(label))
1018
+ this.host.counters.shadowRenderTargetsAllocated += 1;
1019
+ for (let attachment = 0; attachment < colorHandles.length; attachment += 1) {
1020
+ this.host.textureRegistry.textures.set(colorTextures[attachment], colorHandles[attachment]);
1021
+ this.host.textureRegistry.textureUploadModes.set(colorTextures[attachment], colorFormats[attachment]);
829
1022
  }
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();
1023
+ if (depthTexture && depthTextureHandle) {
1024
+ this.host.textureRegistry.textures.set(depthTexture, depthTextureHandle);
1025
+ this.host.textureRegistry.textureUploadModes.set(depthTexture, "depth-render-target");
835
1026
  }
836
- return pixels;
1027
+ return target;
837
1028
  }
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();
1029
+ setRenderTarget(target) {
1030
+ this.host.lifecycle.assertAlive();
1031
+ if (this.host.activeRenderTarget && this.host.activeRenderTarget !== target) {
1032
+ this.resolveMultisampleTarget(this.host.activeRenderTarget);
865
1033
  }
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
- });
1034
+ if (target === null) {
1035
+ this.host.activeRenderTarget = null;
1036
+ this.stateCache.bindFramebuffer(this.gl.FRAMEBUFFER, null, () => this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, null));
1037
+ this.stateCache.viewport(0, 0, this.host.lifecycle.viewportWidth || this.gl.drawingBufferWidth, this.host.lifecycle.viewportHeight || this.gl.drawingBufferHeight, () => this.gl.viewport(0, 0, this.host.lifecycle.viewportWidth || this.gl.drawingBufferWidth, this.host.lifecycle.viewportHeight || this.gl.drawingBufferHeight));
1038
+ return;
878
1039
  }
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
1040
+ if (!(target instanceof WebGL2RenderTarget) || !this.renderTargets.has(target) || target.disposed) {
1041
+ throw new RenderDeviceError("Render target is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
1042
+ targetId: target.id
887
1043
  });
888
1044
  }
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;
1045
+ this.host.activeRenderTarget = target;
1046
+ this.stateCache.bindFramebuffer(this.gl.FRAMEBUFFER, target.drawFramebuffer, () => this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, target.drawFramebuffer));
1047
+ this.stateCache.viewport(0, 0, target.width, target.height, () => this.gl.viewport(0, 0, target.width, target.height));
900
1048
  }
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();
1049
+ resolveMultisampleTarget(target) {
1050
+ if (target.sampleCount <= 1 || !target.needsResolve)
1051
+ return;
1052
+ const previousFramebuffer = this.gl.getParameter(this.gl.FRAMEBUFFER_BINDING);
1053
+ this.gl.bindFramebuffer(this.gl.READ_FRAMEBUFFER, target.drawFramebuffer);
1054
+ this.gl.bindFramebuffer(this.gl.DRAW_FRAMEBUFFER, target.framebuffer);
1055
+ let mask = this.gl.COLOR_BUFFER_BIT;
1056
+ if (target.depthTextureHandle)
1057
+ mask |= this.gl.DEPTH_BUFFER_BIT;
1058
+ this.gl.blitFramebuffer(0, 0, target.width, target.height, 0, 0, target.width, target.height, mask, this.gl.NEAREST);
1059
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, previousFramebuffer);
1060
+ target.needsResolve = false;
915
1061
  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
1062
  }
1025
1063
  captureState() {
1026
1064
  const viewport = this.gl.getParameter(this.gl.VIEWPORT);
1027
1065
  return new Map([
1028
1066
  ["backend", this.kind],
1029
- ["disposed", this.disposed],
1030
- ["contextLost", this.contextLost],
1031
- ["frameActive", this.frameActive],
1067
+ ["disposed", this.host.disposed],
1068
+ ["contextLost", this.host.contextLost],
1069
+ ["frameActive", this.host.lifecycle.frameActive],
1032
1070
  ["depthTest", this.gl.isEnabled(this.gl.DEPTH_TEST)],
1033
1071
  ["blend", this.gl.isEnabled(this.gl.BLEND)],
1034
1072
  ["cullFace", this.gl.isEnabled(this.gl.CULL_FACE)],
1035
1073
  ["program", this.gl.getParameter(this.gl.CURRENT_PROGRAM) ? "bound" : null],
1036
1074
  ["arrayBuffer", this.gl.getParameter(this.gl.ARRAY_BUFFER_BINDING) ? "bound" : null],
1037
1075
  ["elementArrayBuffer", this.gl.getParameter(this.gl.ELEMENT_ARRAY_BUFFER_BINDING) ? "bound" : null],
1038
- ["viewportWidth", this.viewportWidth],
1039
- ["viewportHeight", this.viewportHeight],
1076
+ ["viewportWidth", this.host.lifecycle.viewportWidth],
1077
+ ["viewportHeight", this.host.lifecycle.viewportHeight],
1040
1078
  ["actualViewportWidth", viewport[2] ?? 0],
1041
1079
  ["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],
1080
+ ["renderTarget", this.host.activeRenderTarget?.label ?? null],
1081
+ ["drawCalls", this.host.counters.drawCalls],
1082
+ ["nativeTemporalPasses", this.host.counters.nativeTemporalPasses],
1083
+ ["nativeTemporalBindings", this.host.counters.nativeTemporalBindings],
1084
+ ["shaderProgramCreates", this.host.counters.shaderProgramCreateCount],
1085
+ ["uniformLocationLookups", this.host.counters.uniformLocationLookupCount],
1086
+ ["bufferUpdates", this.host.counters.bufferUpdateCount],
1087
+ ["textureBinds", this.host.counters.textureBindCount],
1088
+ ["samplerParameterUploads", this.host.counters.samplerParameterUploadCount],
1089
+ ["vertexArrayCreates", this.host.counters.vertexArrayCreateCount],
1090
+ ["samplerObjects", this.host.samplers.samplerObjectCache.size],
1091
+ ["samplerAnisotropyUploads", this.host.counters.samplerAnisotropyUploadCount],
1052
1092
  ["maxTextureAnisotropy", this.maxTextureAnisotropy],
1053
- ["nativeEnvironmentBindings", this.nativeEnvironmentBindings],
1054
- ["nativeShadowMapBindings", this.nativeShadowMapBindings],
1055
- ["nativeInstancedSubmissions", this.nativeInstancedSubmissions],
1093
+ ["nativeEnvironmentBindings", this.host.counters.nativeEnvironmentBindings],
1094
+ ["nativeShadowMapBindings", this.host.counters.nativeShadowMapBindings],
1095
+ ["nativeInstancedSubmissions", this.host.counters.nativeInstancedSubmissions],
1056
1096
  ["stateCacheIssued", this.stateCache.stats().issued],
1057
1097
  ["stateCacheSkipped", this.stateCache.stats().skipped]
1058
1098
  ]);
1059
1099
  }
1060
1100
  getDiagnostics() {
1061
- this.releaseDisposedTextureHandles();
1101
+ this.host.textureRegistry.releaseDisposedTextureHandles();
1062
1102
  const liveRenderTargets = [...this.renderTargets].filter((target) => !target.disposed);
1063
1103
  const liveTextures = new Set([
1064
1104
  ...liveRenderTargets.map((target) => target.colorTexture),
1065
- ...[...this.textures.keys()].filter((texture) => !texture.disposed)
1105
+ ...[...this.host.textureRegistry.textures.keys()].filter((texture) => !texture.disposed)
1066
1106
  ]);
1067
1107
  const liveTextureList = [...liveTextures];
1068
1108
  const compressedTextures = liveTextureList.filter((texture) => isCompressedTextureFormat(texture.format));
1069
- const fallbackTextures = liveTextureList.filter((texture) => this.textureUploadModes.get(texture) === "fallback");
1109
+ const fallbackTextures = liveTextureList.filter((texture) => this.host.textureRegistry.textureUploadModes.get(texture) === "fallback");
1070
1110
  const stateCacheStats = this.stateCache.stats();
1071
1111
  const bufferBytes = [...this.buffers].filter((buffer) => !buffer.disposed).reduce((total, buffer) => total + buffer.byteLength, 0);
1072
1112
  const textureBytes = liveTextureList.reduce((total, texture) => total + texture.byteLength, 0);
1073
- const gpuTargetEntries = this.describeGpuTargetInventory(liveRenderTargets);
1113
+ const gpuTargetEntries = this.host.post.describeGpuTargetInventory(liveRenderTargets);
1074
1114
  return {
1075
- drawCalls: this.drawCalls,
1115
+ drawCalls: this.host.counters.drawCalls,
1076
1116
  buffers: [...this.buffers].filter((buffer) => !buffer.disposed).length,
1077
1117
  shaders: [...this.shaders].filter((shader) => !shader.disposed).length,
1078
1118
  renderTargets: liveRenderTargets.length,
@@ -1085,12 +1125,14 @@ export class WebGL2Device {
1085
1125
  compressedTextureBytes: compressedTextures.reduce((total, texture) => total + texture.byteLength, 0),
1086
1126
  textureFallbacks: fallbackTextures.length,
1087
1127
  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,
1128
+ nativeEnvironmentBindings: this.host.counters.nativeEnvironmentBindings,
1129
+ nativeShadowMapBindings: this.host.counters.nativeShadowMapBindings,
1130
+ shadowRenderTargetsAllocated: this.host.counters.shadowRenderTargetsAllocated,
1131
+ nativeInstancedSubmissions: this.host.counters.nativeInstancedSubmissions,
1132
+ bloom: this.host.post.lastBloomDiagnostics,
1133
+ nativeTemporalPasses: this.host.counters.nativeTemporalPasses,
1134
+ nativeTemporalBindings: this.host.counters.nativeTemporalBindings,
1135
+ samplerAnisotropyUploads: this.host.counters.samplerAnisotropyUploadCount,
1094
1136
  maxTextureAnisotropy: this.maxTextureAnisotropy,
1095
1137
  stateCacheIssued: stateCacheStats.issued,
1096
1138
  stateCacheSkipped: stateCacheStats.skipped,
@@ -1099,23 +1141,25 @@ export class WebGL2Device {
1099
1141
  stateCacheBufferBinds: stateCacheStats.byOperation.bindBuffer?.issued ?? 0,
1100
1142
  stateCacheVertexArrayBinds: stateCacheStats.byOperation.bindVertexArray?.issued ?? 0,
1101
1143
  stateCacheSamplerBinds: stateCacheStats.byOperation.bindSampler?.issued ?? 0,
1102
- disposedBuffers: [...this.buffers].filter((buffer) => buffer.disposed).length,
1144
+ disposedBuffers: this.disposedBufferCount + [...this.buffers].filter((buffer) => buffer.disposed).length,
1103
1145
  disposedShaders: [...this.shaders].filter((shader) => shader.disposed).length,
1104
1146
  disposedRenderTargets: [...this.renderTargets].filter((target) => target.disposed).length,
1105
- disposedTextures: [...this.renderTargets].filter((target) => target.colorTexture.disposed).length + this.releasedTextureHandles,
1147
+ disposedTextures: [...this.renderTargets].filter((target) => target.colorTexture.disposed).length + this.host.counters.releasedTextureHandles,
1106
1148
  ...spreadGpuTargetInventory(gpuTargetEntries),
1107
- lastError: this.lastError,
1108
- contextLost: this.contextLost
1149
+ programCompileCount: this.host.counters.programCompiles,
1150
+ readPixelsCalls: this.host.counters.readbacks,
1151
+ lastError: this.host.lifecycle.lastError,
1152
+ contextLost: this.host.contextLost
1109
1153
  };
1110
1154
  }
1111
1155
  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);
1156
+ if (this.host.lifecycle.canvas && "removeEventListener" in this.host.lifecycle.canvas) {
1157
+ this.host.lifecycle.deviceLostListeners.clear();
1158
+ this.host.lifecycle.deviceRestoredListeners.clear();
1159
+ if (this.host.lifecycle.contextLostListener)
1160
+ this.host.lifecycle.canvas.removeEventListener("webglcontextlost", this.host.lifecycle.contextLostListener);
1161
+ if (this.host.lifecycle.contextRestoredListener)
1162
+ this.host.lifecycle.canvas.removeEventListener("webglcontextrestored", this.host.lifecycle.contextRestoredListener);
1119
1163
  }
1120
1164
  for (const buffer of this.buffers) {
1121
1165
  buffer.dispose();
@@ -1126,1853 +1170,120 @@ export class WebGL2Device {
1126
1170
  for (const target of this.renderTargets) {
1127
1171
  target.dispose();
1128
1172
  }
1129
- for (const entry of this.vertexArrayCache.values()) {
1173
+ for (const entry of this.host.drawBinder.vertexArrayCache.values()) {
1130
1174
  this.gl.deleteVertexArray(entry.handle);
1131
1175
  }
1132
- this.vertexArrayCache.clear();
1133
- for (const sampler of this.samplerObjectCache.values()) {
1176
+ this.host.drawBinder.vertexArrayCache.clear();
1177
+ for (const sampler of this.host.samplers.samplerObjectCache.values()) {
1134
1178
  this.gl.deleteSampler(sampler);
1135
1179
  }
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 downsampleProgram = this.ensureBloomDownsampleProgram();
1598
- const brightProgram = this.ensureBloomBrightExtractProgram();
1599
- const blurProgram = this.ensureBloomBlurProgram();
1600
- const accumulateProgram = this.ensureBloomAccumulateProgram();
1601
- const brightLut = this.bloomBrightLutTexture;
1602
- const mipTexture = (level, slot) => resources.textures[level * 2 + slot];
1603
- const mipFramebuffer = (level, slot) => resources.framebuffers[level * 2 + slot];
1604
- const mipSize = (level) => plan.mips[level];
1605
- // Blurred result settles in slot 1 for level 0, slot 0 for levels >= 1.
1606
- const blurredSlot = (level) => (level === 0 ? 1 : 0);
1607
- const drawDownsample = (fromTexture, fromWidth, fromHeight, toFramebuffer, toWidth, toHeight) => {
1608
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, toFramebuffer);
1609
- this.gl.viewport(0, 0, toWidth, toHeight);
1610
- this.gl.useProgram(downsampleProgram);
1611
- this.gl.bindVertexArray(vertexArray);
1612
- this.bindFullscreenTexture(0, fromTexture);
1613
- this.gl.uniform1i(this.gl.getUniformLocation(downsampleProgram, "u_source"), 0);
1614
- this.gl.uniform2f(this.gl.getUniformLocation(downsampleProgram, "u_texelSize"), 1 / fromWidth, 1 / fromHeight);
1615
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1616
- };
1617
- const drawBrightExtract = (fromTexture, toFramebuffer, size) => {
1618
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, toFramebuffer);
1619
- this.gl.viewport(0, 0, size.width, size.height);
1620
- this.gl.useProgram(brightProgram);
1621
- this.gl.bindVertexArray(vertexArray);
1622
- this.bindFullscreenTexture(0, fromTexture);
1623
- if (brightLut)
1624
- this.bindFullscreenTexture(1, brightLut);
1625
- this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_source"), 0);
1626
- this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_brightLut"), 1);
1627
- this.gl.uniform1i(this.gl.getUniformLocation(brightProgram, "u_hdr"), hdr ? 1 : 0);
1628
- this.gl.uniform1f(this.gl.getUniformLocation(brightProgram, "u_threshold"), options.threshold);
1629
- this.gl.uniform1f(this.gl.getUniformLocation(brightProgram, "u_softKnee"), options.softKnee);
1630
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1631
- };
1632
- const drawSeparableBlur = (readTexture, tmpTexture, tmpFramebuffer, outFramebuffer, size) => {
1633
- // Horizontal into the temp target, vertical back into the output target.
1634
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, tmpFramebuffer);
1635
- this.gl.viewport(0, 0, size.width, size.height);
1636
- this.gl.useProgram(blurProgram);
1637
- this.gl.bindVertexArray(vertexArray);
1638
- this.bindFullscreenTexture(0, readTexture);
1639
- this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_source"), 0);
1640
- this.gl.uniform2i(this.gl.getUniformLocation(blurProgram, "u_size"), size.width, size.height);
1641
- this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_radius"), options.radius);
1642
- this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_horizontal"), 1);
1643
- this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_hdr"), hdr ? 1 : 0);
1644
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1645
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, outFramebuffer);
1646
- this.bindFullscreenTexture(0, tmpTexture);
1647
- this.gl.uniform1i(this.gl.getUniformLocation(blurProgram, "u_horizontal"), 0);
1648
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1649
- };
1650
- // Level 0: downsample, bright-extract into slot 1, blur H into slot 0 and
1651
- // V back into slot 1. Blurred result settles in slot 1.
1652
- const level0 = mipSize(0);
1653
- drawDownsample(sourceTexture, sourceWidth, sourceHeight, mipFramebuffer(0, 0), level0.width, level0.height);
1654
- drawBrightExtract(mipTexture(0, 0), mipFramebuffer(0, 1), level0);
1655
- drawSeparableBlur(mipTexture(0, 1), mipTexture(0, 0), mipFramebuffer(0, 0), mipFramebuffer(0, 1), level0);
1656
- for (let level = 1; level < mipCount; level += 1) {
1657
- const size = mipSize(level);
1658
- const previous = mipSize(level - 1);
1659
- drawDownsample(mipTexture(level - 1, blurredSlot(level - 1)), previous.width, previous.height, mipFramebuffer(level, 0), size.width, size.height);
1660
- // H into slot 1, V back into slot 0: blurred result settles in slot 0.
1661
- drawSeparableBlur(mipTexture(level, 0), mipTexture(level, 1), mipFramebuffer(level, 1), mipFramebuffer(level, 0), size);
1662
- }
1663
- // Accumulate smallest-to-largest, ping-ponging between the two
1664
- // accumulators (a pass must never sample its own bound target).
1665
- const weights = plan.weights;
1666
- let readAccumulator = { texture: resources.accumulatorTextureA, framebuffer: resources.accumulatorFramebufferA };
1667
- let writeAccumulator = { texture: resources.accumulatorTextureB, framebuffer: resources.accumulatorFramebufferB };
1668
- // Clear both accumulators; the seed reads the cleared sibling, never the
1669
- // bound target (feedback loop).
1670
- for (const acc of [readAccumulator, writeAccumulator]) {
1671
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, acc.framebuffer);
1672
- this.gl.viewport(0, 0, level0.width, level0.height);
1673
- this.gl.clearColor(0, 0, 0, 0);
1674
- this.gl.clear(this.gl.COLOR_BUFFER_BIT);
1675
- }
1676
- // Seed: smallest mip onto the cleared sibling accumulator.
1677
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, writeAccumulator.framebuffer);
1678
- this.gl.viewport(0, 0, level0.width, level0.height);
1679
- this.gl.useProgram(accumulateProgram);
1680
- this.gl.bindVertexArray(vertexArray);
1681
- this.bindFullscreenTexture(0, readAccumulator.texture);
1682
- this.bindFullscreenTexture(1, mipTexture(mipCount - 1, blurredSlot(mipCount - 1)));
1683
- this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_base"), 0);
1684
- this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_bloom"), 1);
1685
- this.gl.uniform1f(this.gl.getUniformLocation(accumulateProgram, "u_weight"), weights[mipCount - 1]);
1686
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1687
- for (let level = mipCount - 2; level >= 0; level -= 1) {
1688
- const nextRead = writeAccumulator;
1689
- const nextWrite = readAccumulator;
1690
- readAccumulator = nextRead;
1691
- writeAccumulator = nextWrite;
1692
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, writeAccumulator.framebuffer);
1693
- this.gl.viewport(0, 0, level0.width, level0.height);
1694
- this.gl.useProgram(accumulateProgram);
1695
- this.gl.bindVertexArray(vertexArray);
1696
- this.bindFullscreenTexture(0, readAccumulator.texture);
1697
- this.bindFullscreenTexture(1, mipTexture(level, blurredSlot(level)));
1698
- this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_base"), 0);
1699
- this.gl.uniform1i(this.gl.getUniformLocation(accumulateProgram, "u_bloom"), 1);
1700
- this.gl.uniform1f(this.gl.getUniformLocation(accumulateProgram, "u_weight"), weights[level]);
1701
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1702
- }
1703
- // Upsample the weighted sum onto full-resolution staging target A, using
1704
- // the cleared staging target B as the zero base (never sample A while
1705
- // rendering into it).
1706
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, fullResStaging.framebufferB);
1707
- this.gl.viewport(0, 0, sourceWidth, sourceHeight);
1708
- this.gl.clearColor(0, 0, 0, 0);
1709
- this.gl.clear(this.gl.COLOR_BUFFER_BIT);
1710
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, fullResStaging.framebufferA);
1711
- this.gl.viewport(0, 0, sourceWidth, sourceHeight);
1712
- this.gl.useProgram(accumulateProgram);
1713
- this.gl.bindVertexArray(vertexArray);
1714
- this.bindFullscreenTexture(0, fullResStaging.textureB);
1715
- this.bindFullscreenTexture(1, writeAccumulator.texture);
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"), 1);
1719
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1720
- return fullResStaging.textureA;
1721
- }
1722
- executeNativeOutlinePasses(sourceTexture, resources, options, vertexArray, targetIndex) {
1723
- const blendLut = this.outlineBlendLutTexture;
1724
- if (!blendLut) {
1725
- throw new RenderDeviceError("WebGL2 outline lookup texture was not initialized", "WEBGL_ALLOCATION_FAILED");
1726
- }
1727
- const program = this.ensureOutlineProgram();
1728
- const targetTexture = resources.textures[targetIndex];
1729
- const targetFramebuffer = resources.framebuffers[targetIndex];
1730
- const bound = createOutlineGradientBound(options.threshold);
1731
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, targetFramebuffer);
1732
- this.gl.viewport(0, 0, resources.width, resources.height);
1733
- this.gl.useProgram(program);
1734
- this.gl.bindVertexArray(vertexArray);
1735
- this.bindFullscreenTexture(0, sourceTexture);
1736
- this.bindFullscreenTexture(1, blendLut);
1737
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1738
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_blendLut"), 1);
1739
- this.gl.uniform2i(this.gl.getUniformLocation(program, "u_size"), resources.width, resources.height);
1740
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_width"), options.width);
1741
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_boundHigh"), bound.highWord);
1742
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_boundLow"), bound.lowWord);
1743
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1744
- return targetTexture;
1745
- }
1746
- executeNativeSsaoPass(sourceTexture, depthTexture, resources, options, vertexArray, targetIndex) {
1747
- const program = this.ensureSsaoProgram();
1748
- const targetTexture = resources.textures[targetIndex];
1749
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, resources.framebuffers[targetIndex]);
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, depthTexture);
1755
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1756
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_depth"), 1);
1757
- this.gl.uniform2i(this.gl.getUniformLocation(program, "u_size"), resources.width, resources.height);
1758
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_radius"), options.radius);
1759
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_intensity"), options.intensity);
1760
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_bias"), options.bias);
1761
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1762
- return targetTexture;
1763
- }
1764
- executeNativeSsrPass(sourceTexture, depthTexture, resources, options, vertexArray, targetIndex, depthRange) {
1765
- const program = this.ensureSsrProgram();
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.uniform1f(this.gl.getUniformLocation(program, "u_intensity"), options.intensity);
1777
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_maxDistance"), options.maxDistance);
1778
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_depthNear"), depthRange.near);
1779
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_depthFar"), depthRange.far);
1780
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1781
- return targetTexture;
1782
- }
1783
- executeNativeDepthOfFieldPass(sourceTexture, depthTexture, resources, options, vertexArray, targetIndex, depthRange) {
1784
- const program = this.ensureDepthOfFieldProgram();
1785
- const targetTexture = resources.textures[targetIndex];
1786
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, resources.framebuffers[targetIndex]);
1787
- this.gl.viewport(0, 0, resources.width, resources.height);
1788
- this.gl.useProgram(program);
1789
- this.gl.bindVertexArray(vertexArray);
1790
- this.bindFullscreenTexture(0, sourceTexture);
1791
- this.bindFullscreenTexture(1, depthTexture);
1792
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1793
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_depth"), 1);
1794
- this.gl.uniform2i(this.gl.getUniformLocation(program, "u_size"), resources.width, resources.height);
1795
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_focusDepth"), options.focusDepth);
1796
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_focusRange"), options.focusRange);
1797
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_maxRadius"), options.maxRadius);
1798
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_depthNear"), depthRange.near);
1799
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_depthFar"), depthRange.far);
1800
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1801
- return targetTexture;
1802
- }
1803
- executeNativeMotionBlurPass(sourceTexture, resources, options, vertexArray, targetIndex) {
1804
- const velocityTexture = this.motionBlurVelocityTexture;
1805
- if (!velocityTexture) {
1806
- throw new RenderDeviceError("WebGL2 motion-blur velocity texture was not initialized", "WEBGL_ALLOCATION_FAILED");
1807
- }
1808
- const program = this.ensureMotionBlurProgram();
1809
- const targetTexture = resources.textures[targetIndex];
1810
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, resources.framebuffers[targetIndex]);
1811
- this.gl.viewport(0, 0, resources.width, resources.height);
1812
- this.gl.useProgram(program);
1813
- this.gl.bindVertexArray(vertexArray);
1814
- this.bindFullscreenTexture(0, sourceTexture);
1815
- this.bindFullscreenTexture(1, velocityTexture);
1816
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1817
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_velocity"), 1);
1818
- this.gl.uniform2i(this.gl.getUniformLocation(program, "u_size"), resources.width, resources.height);
1819
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_samples"), options.samples);
1820
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_scale"), options.scale);
1821
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1822
- return targetTexture;
1823
- }
1824
- executeNativeTaaPass(sourceTexture, resources, options, vertexArray, targetIndex) {
1825
- const historyTexture = this.taaHistoryTexture;
1826
- if (!historyTexture) {
1827
- throw new RenderDeviceError("WebGL2 TAA history texture was not initialized", "WEBGL_ALLOCATION_FAILED");
1828
- }
1829
- const program = this.ensureTaaProgram();
1830
- const targetTexture = resources.textures[targetIndex];
1831
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, resources.framebuffers[targetIndex]);
1832
- this.gl.viewport(0, 0, resources.width, resources.height);
1833
- this.gl.useProgram(program);
1834
- this.gl.bindVertexArray(vertexArray);
1835
- this.bindFullscreenTexture(0, sourceTexture);
1836
- this.bindFullscreenTexture(1, historyTexture);
1837
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_source"), 0);
1838
- this.gl.uniform1i(this.gl.getUniformLocation(program, "u_history"), 1);
1839
- this.gl.uniform1f(this.gl.getUniformLocation(program, "u_blend"), options.blend);
1840
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 3);
1841
- return targetTexture;
1842
- }
1843
- bindFullscreenTexture(unit, texture) {
1844
- this.gl.activeTexture(this.gl.TEXTURE0 + unit);
1845
- this.gl.bindTexture(this.gl.TEXTURE_2D, texture);
1846
- this.gl.bindSampler(unit, null);
1847
- }
1848
- disposeBloomPingPongResources() {
1849
- if (!this.bloomPingPongResources)
1850
- return;
1851
- for (const texture of this.bloomPingPongResources.textures)
1852
- this.gl.deleteTexture(texture);
1853
- for (const framebuffer of this.bloomPingPongResources.framebuffers)
1854
- this.gl.deleteFramebuffer(framebuffer);
1855
- this.bloomPingPongResources = null;
1856
- }
1857
- /**
1858
- * Diagnostics for the most recent native bloom execution (muse3jsparity-PRD
1859
- * A1). Null when no native bloom pass has run yet on this device.
1860
- */
1861
- getBloomDiagnostics() {
1862
- return this.lastBloomDiagnostics;
1863
- }
1864
- recordBloomDiagnostics(options, sourceWidth, sourceHeight, hdr, mipCount) {
1865
- const plan = resolveBloomPyramidPlan(sourceWidth, sourceHeight, options.quality, hdr);
1866
- const pingPongBytes = sourceWidth * sourceHeight * 4 * (hdr ? 2 : 1) * 2;
1867
- const bytesPerChannel = plan.halfFloat ? 2 : 1;
1868
- const level0 = plan.mips[0];
1869
- const accumulatorBytes = level0.width * level0.height * 4 * bytesPerChannel;
1870
- this.lastBloomDiagnostics = {
1871
- quality: options.quality,
1872
- mipCount,
1873
- targetCount: options.quality === "performance" ? 2 : plan.mips.length * 2 + 1,
1874
- targetBytes: (options.quality === "performance" ? pingPongBytes : plan.targetBytes + accumulatorBytes + pingPongBytes),
1875
- compositeGain: options.intensity,
1876
- threshold: options.threshold,
1877
- intensity: options.intensity,
1878
- softKnee: options.softKnee,
1879
- shoulder: options.shoulder,
1880
- halfFloat: hdr || plan.halfFloat,
1881
- };
1882
- }
1883
- /**
1884
- * PART U: every live GPU allocation with bytes + lane owner — registry
1885
- * render targets (B1 shadow maps arrive labeled, B4 captures arrive as
1886
- * `-mirror-target`/`-scene-color-target`) plus the raw-handle residents the
1887
- * registry set cannot see: the A1 bloom pyramid (two targets per mip plus
1888
- * two level-0 accumulators), the legacy bloom ping-pong pair, the A1/A3
1889
- * lookup textures, and the motion-blur/taa history textures. The
1890
- * depth-readback scratch pair is intentionally absent: it is allocated and
1891
- * deleted inside one synchronous call, so it is never live at a diagnostics
1892
- * boundary. A5 volumetric light, C4 decals, and the G1 SDF atlas own no GPU
1893
- * target (forward uniforms + CPU kernel, CPU geometry, CPU atlas data), so
1894
- * no entry is emitted for them; a target appearing under their owner would
1895
- * be the signal that the lane grew one.
1896
- */
1897
- describeGpuTargetInventory(liveRenderTargets) {
1898
- const entries = liveRenderTargets.map((target) => ({
1899
- label: target.label,
1900
- kind: "render-target",
1901
- bytes: target.colorTexture.byteLength + (target.depthTexture?.byteLength ?? 0),
1902
- owner: resolveGpuTargetOwner(target.label)
1903
- }));
1904
- const pyramid = this.bloomPyramidResources;
1905
- if (pyramid) {
1906
- const bytesPerPixel = pyramid.hdr ? 8 : 4;
1907
- pyramid.plan.mips.forEach((mip, index) => {
1908
- for (const side of ["a", "b"]) {
1909
- entries.push({
1910
- label: `bloom-pyramid-mip${index}${side}`,
1911
- kind: "pyramid-mip",
1912
- bytes: mip.width * mip.height * bytesPerPixel,
1913
- owner: "a1-bloom"
1914
- });
1915
- }
1916
- });
1917
- const level0 = pyramid.plan.mips[0];
1918
- if (level0) {
1919
- for (const side of ["a", "b"]) {
1920
- entries.push({
1921
- label: `bloom-pyramid-accumulator-${side}`,
1922
- kind: "pyramid-accumulator",
1923
- bytes: level0.width * level0.height * bytesPerPixel,
1924
- owner: "a1-bloom"
1925
- });
1926
- }
1927
- }
1928
- }
1929
- const pingPong = this.bloomPingPongResources;
1930
- if (pingPong) {
1931
- const bytesPerPixel = pingPong.hdr ? 8 : 4;
1932
- for (const side of ["a", "b"]) {
1933
- entries.push({
1934
- label: `bloom-ping-pong-${side}`,
1935
- kind: "ping-pong",
1936
- bytes: pingPong.width * pingPong.height * bytesPerPixel,
1937
- owner: "a1-bloom"
1938
- });
1939
- }
1940
- }
1941
- if (this.bloomBrightLutTexture) {
1942
- entries.push({
1943
- label: "bloom-bright-lut",
1944
- kind: "lut",
1945
- bytes: BLOOM_BRIGHT_LUT_WIDTH * BLOOM_BRIGHT_LUT_HEIGHT * 4,
1946
- owner: "a1-bloom"
1947
- });
1948
- }
1949
- if (this.bloomCompositeLutTexture) {
1950
- entries.push({
1951
- label: "bloom-composite-lut",
1952
- kind: "lut",
1953
- bytes: BLOOM_COMPOSITE_LUT_SIZE * BLOOM_COMPOSITE_LUT_SIZE * 4,
1954
- owner: "a1-bloom"
1955
- });
1956
- }
1957
- if (this.outlineBlendLutTexture) {
1958
- entries.push({ label: "outline-blend-lut", kind: "lut", bytes: OUTLINE_BLEND_LUT_WIDTH * 4, owner: "post" });
1959
- }
1960
- if (this.motionBlurVelocityTexture && this.motionBlurVelocitySize) {
1961
- entries.push({
1962
- label: "motion-blur-velocity",
1963
- kind: "history",
1964
- bytes: this.motionBlurVelocitySize.width * this.motionBlurVelocitySize.height * 8,
1965
- owner: "post"
1966
- });
1967
- }
1968
- if (this.taaHistoryTexture && this.taaHistorySize) {
1969
- entries.push({
1970
- label: "taa-history",
1971
- kind: "history",
1972
- bytes: this.taaHistorySize.width * this.taaHistorySize.height * 4,
1973
- owner: "post"
1974
- });
1975
- }
1976
- return entries;
1977
- }
1978
- disposeBloomPyramidResources() {
1979
- if (!this.bloomPyramidResources)
1980
- return;
1981
- for (const texture of this.bloomPyramidResources.textures)
1180
+ this.host.samplers.samplerObjectCache.clear();
1181
+ for (const texture of this.host.textureRegistry.textures.values()) {
1982
1182
  this.gl.deleteTexture(texture);
1983
- for (const framebuffer of this.bloomPyramidResources.framebuffers)
1984
- this.gl.deleteFramebuffer(framebuffer);
1985
- this.gl.deleteTexture(this.bloomPyramidResources.accumulatorTextureA);
1986
- this.gl.deleteFramebuffer(this.bloomPyramidResources.accumulatorFramebufferA);
1987
- this.gl.deleteTexture(this.bloomPyramidResources.accumulatorTextureB);
1988
- this.gl.deleteFramebuffer(this.bloomPyramidResources.accumulatorFramebufferB);
1989
- this.bloomPyramidResources = null;
1990
- }
1991
- /**
1992
- * Mip-chain targets for the balanced/cinematic bloom pyramid. Each level is a
1993
- * single texture+framebuffer at the planned size with linear filtering so the
1994
- * downsample and accumulate passes can sample across levels. Half-float backs
1995
- * the chain when the source is HDR or the cinematic preset requests it.
1996
- */
1997
- ensureBloomPyramidResources(plan, hdr) {
1998
- const current = this.bloomPyramidResources;
1999
- if (current && current.plan.quality === plan.quality && current.hdr === (hdr || plan.halfFloat) &&
2000
- current.plan.mips.length === plan.mips.length &&
2001
- current.plan.mips.every((mip, index) => mip.width === plan.mips[index].width && mip.height === plan.mips[index].height)) {
2002
- return current;
2003
- }
2004
- this.disposeBloomPyramidResources();
2005
- const textureUnit0 = this.captureTextureUnit0();
2006
- const previousFramebuffer = this.gl.getParameter(this.gl.FRAMEBUFFER_BINDING);
2007
- const textures = [];
2008
- const framebuffers = [];
2009
- const useHalfFloat = hdr || plan.halfFloat;
2010
- const allocateTarget = (width, height, label) => {
2011
- const texture = this.gl.createTexture();
2012
- const framebuffer = this.gl.createFramebuffer();
2013
- if (!texture || !framebuffer) {
2014
- if (texture)
2015
- this.gl.deleteTexture(texture);
2016
- if (framebuffer)
2017
- this.gl.deleteFramebuffer(framebuffer);
2018
- throw new RenderDeviceError(`Failed to allocate WebGL2 bloom pyramid ${label}`, "WEBGL_ALLOCATION_FAILED", { width, height });
2019
- }
2020
- textures.push(texture);
2021
- framebuffers.push(framebuffer);
2022
- this.gl.bindTexture(this.gl.TEXTURE_2D, texture);
2023
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR);
2024
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);
2025
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
2026
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
2027
- 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);
2028
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebuffer);
2029
- this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER, this.gl.COLOR_ATTACHMENT0, this.gl.TEXTURE_2D, texture, 0);
2030
- const status = this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER);
2031
- if (status !== this.gl.FRAMEBUFFER_COMPLETE) {
2032
- throw new RenderDeviceError("WebGL2 bloom pyramid framebuffer status is invalid", "FRAMEBUFFER_INVALID", { width, height, status });
2033
- }
2034
- return { texture, framebuffer };
2035
- };
2036
- try {
2037
- // Two ping-pong targets per mip (separable blur needs distinct read/write
2038
- // targets at the same size), plus two level-0-sized accumulators: the
2039
- // weighted sum ping-pongs between them so no pass ever samples the
2040
- // texture of its own bound framebuffer (feedback loop).
2041
- for (const mip of plan.mips) {
2042
- allocateTarget(mip.width, mip.height, "mip");
2043
- allocateTarget(mip.width, mip.height, "mip");
2044
- }
2045
- const level0 = plan.mips[0];
2046
- const accumulatorA = allocateTarget(level0.width, level0.height, "accumulator-a");
2047
- const accumulatorB = allocateTarget(level0.width, level0.height, "accumulator-b");
2048
- const finalResources = {
2049
- plan,
2050
- hdr: useHalfFloat,
2051
- textures,
2052
- framebuffers,
2053
- accumulatorTextureA: accumulatorA.texture,
2054
- accumulatorFramebufferA: accumulatorA.framebuffer,
2055
- accumulatorTextureB: accumulatorB.texture,
2056
- accumulatorFramebufferB: accumulatorB.framebuffer
2057
- };
2058
- this.bloomPyramidResources = finalResources;
2059
- return finalResources;
2060
- }
2061
- catch (error) {
2062
- for (const texture of textures)
2063
- this.gl.deleteTexture(texture);
2064
- for (const framebuffer of framebuffers)
2065
- this.gl.deleteFramebuffer(framebuffer);
2066
- throw error;
2067
- }
2068
- finally {
2069
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, previousFramebuffer);
2070
- this.restoreTextureUnit0(textureUnit0);
2071
- this.stateCache.invalidate();
2072
- }
2073
- }
2074
- captureTextureUnit0() {
2075
- const activeTexture = this.gl.getParameter(this.gl.ACTIVE_TEXTURE);
2076
- this.gl.activeTexture(this.gl.TEXTURE0);
2077
- return {
2078
- activeTexture,
2079
- texture2d: this.gl.getParameter(this.gl.TEXTURE_BINDING_2D),
2080
- sampler: this.gl.getParameter(this.gl.SAMPLER_BINDING)
2081
- };
2082
- }
2083
- restoreTextureUnit0(snapshot) {
2084
- this.gl.activeTexture(this.gl.TEXTURE0);
2085
- this.gl.bindTexture(this.gl.TEXTURE_2D, snapshot.texture2d);
2086
- this.gl.bindSampler(0, snapshot.sampler);
2087
- this.gl.activeTexture(snapshot.activeTexture);
2088
- }
2089
- captureTextureUnitBinding(unit) {
2090
- this.gl.activeTexture(this.gl.TEXTURE0 + unit);
2091
- return {
2092
- texture2d: this.gl.getParameter(this.gl.TEXTURE_BINDING_2D),
2093
- sampler: this.gl.getParameter(this.gl.SAMPLER_BINDING)
2094
- };
2095
- }
2096
- restoreTextureUnitBinding(unit, snapshot) {
2097
- this.gl.activeTexture(this.gl.TEXTURE0 + unit);
2098
- this.gl.bindTexture(this.gl.TEXTURE_2D, snapshot.texture2d);
2099
- this.gl.bindSampler(unit, snapshot.sampler);
2100
- }
2101
- prepareFullscreenPresentation(framebuffer, outputWidth, outputHeight) {
2102
- const textureUnit0 = this.captureTextureUnit0();
2103
- const textureUnit1 = this.captureTextureUnitBinding(1);
2104
- const textureUnit2 = this.captureTextureUnitBinding(2);
2105
- this.gl.activeTexture(textureUnit0.activeTexture);
2106
- const snapshot = {
2107
- framebuffer: this.gl.getParameter(this.gl.FRAMEBUFFER_BINDING),
2108
- program: this.gl.getParameter(this.gl.CURRENT_PROGRAM),
2109
- textureUnit0,
2110
- textureUnit1,
2111
- textureUnit2,
2112
- vertexArray: this.gl.getParameter(this.gl.VERTEX_ARRAY_BINDING),
2113
- viewport: this.gl.getParameter(this.gl.VIEWPORT),
2114
- colorMask: this.gl.getParameter(this.gl.COLOR_WRITEMASK),
2115
- depthTestEnabled: this.gl.isEnabled(this.gl.DEPTH_TEST),
2116
- cullFaceEnabled: this.gl.isEnabled(this.gl.CULL_FACE),
2117
- blendEnabled: this.gl.isEnabled(this.gl.BLEND),
2118
- scissorTestEnabled: this.gl.isEnabled(this.gl.SCISSOR_TEST),
2119
- stencilTestEnabled: this.gl.isEnabled(this.gl.STENCIL_TEST),
2120
- polygonOffsetFillEnabled: this.gl.isEnabled(this.gl.POLYGON_OFFSET_FILL),
2121
- depthMask: this.gl.getParameter(this.gl.DEPTH_WRITEMASK)
2122
- };
2123
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, framebuffer);
2124
- this.gl.viewport(0, 0, outputWidth, outputHeight);
2125
- this.gl.colorMask(true, true, true, true);
2126
- this.gl.disable(this.gl.SCISSOR_TEST);
2127
- this.gl.disable(this.gl.STENCIL_TEST);
2128
- this.gl.disable(this.gl.POLYGON_OFFSET_FILL);
2129
- this.gl.disable(this.gl.DEPTH_TEST);
2130
- this.gl.disable(this.gl.CULL_FACE);
2131
- this.gl.disable(this.gl.BLEND);
2132
- this.gl.depthMask(false);
2133
- return snapshot;
2134
- }
2135
- restoreFullscreenPresentationState(snapshot, fallbackWidth, fallbackHeight) {
2136
- this.gl.bindVertexArray(snapshot.vertexArray);
2137
- this.restoreTextureUnitBinding(2, snapshot.textureUnit2);
2138
- this.restoreTextureUnitBinding(1, snapshot.textureUnit1);
2139
- this.restoreTextureUnit0(snapshot.textureUnit0);
2140
- this.gl.useProgram(snapshot.program);
2141
- if (snapshot.depthTestEnabled)
2142
- this.gl.enable(this.gl.DEPTH_TEST);
2143
- else
2144
- this.gl.disable(this.gl.DEPTH_TEST);
2145
- if (snapshot.cullFaceEnabled)
2146
- this.gl.enable(this.gl.CULL_FACE);
2147
- else
2148
- this.gl.disable(this.gl.CULL_FACE);
2149
- if (snapshot.blendEnabled)
2150
- this.gl.enable(this.gl.BLEND);
2151
- else
2152
- this.gl.disable(this.gl.BLEND);
2153
- if (snapshot.scissorTestEnabled)
2154
- this.gl.enable(this.gl.SCISSOR_TEST);
2155
- else
2156
- this.gl.disable(this.gl.SCISSOR_TEST);
2157
- if (snapshot.stencilTestEnabled)
2158
- this.gl.enable(this.gl.STENCIL_TEST);
2159
- else
2160
- this.gl.disable(this.gl.STENCIL_TEST);
2161
- if (snapshot.polygonOffsetFillEnabled)
2162
- this.gl.enable(this.gl.POLYGON_OFFSET_FILL);
2163
- else
2164
- this.gl.disable(this.gl.POLYGON_OFFSET_FILL);
2165
- this.gl.colorMask(snapshot.colorMask[0] ?? true, snapshot.colorMask[1] ?? true, snapshot.colorMask[2] ?? true, snapshot.colorMask[3] ?? true);
2166
- this.gl.depthMask(snapshot.depthMask);
2167
- this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, snapshot.framebuffer);
2168
- this.gl.viewport(snapshot.viewport[0] ?? 0, snapshot.viewport[1] ?? 0, snapshot.viewport[2] ?? fallbackWidth, snapshot.viewport[3] ?? fallbackHeight);
2169
- this.stateCache.invalidate();
2170
- }
2171
- ensurePresentationVertexArray() {
2172
- if (this.presentationVertexArray)
2173
- return this.presentationVertexArray;
2174
- const vertexArray = this.gl.createVertexArray();
2175
- if (!vertexArray) {
2176
- throw new RenderDeviceError("Failed to allocate WebGL presentation vertex array", "WEBGL_ALLOCATION_FAILED");
2177
- }
2178
- this.presentationVertexArray = vertexArray;
2179
- return vertexArray;
2180
- }
2181
- ensureDepthReadbackProgram() {
2182
- if (this.depthReadbackProgram) {
2183
- return this.depthReadbackProgram;
2184
- }
2185
- const vertex = this.compileShader(this.gl.VERTEX_SHADER, `#version 300 es
2186
- precision highp float;
2187
- out vec2 v_uv;
2188
- void main() {
2189
- vec2 position = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));
2190
- v_uv = position;
2191
- gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
2192
- }
2193
- `, "webgl2-depth-readback");
2194
- const fragment = this.compileShader(this.gl.FRAGMENT_SHADER, `#version 300 es
2195
- precision highp float;
2196
- uniform sampler2D u_depth;
2197
- uniform vec4 u_sourceRect;
2198
- in vec2 v_uv;
2199
- out vec4 outColor;
2200
- vec3 packDepth24(float value) {
2201
- value = clamp(value, 0.0, 1.0);
2202
- vec3 encoded = fract(value * vec3(1.0, 255.0, 65025.0));
2203
- encoded -= encoded.yzz * vec3(1.0 / 255.0, 1.0 / 255.0, 0.0);
2204
- return encoded;
2205
- }
2206
- void main() {
2207
- vec2 uv = u_sourceRect.xy + v_uv * u_sourceRect.zw;
2208
- outColor = vec4(packDepth24(texture(u_depth, uv).r), 1.0);
2209
- }
2210
- `, "webgl2-depth-readback");
2211
- const program = this.gl.createProgram();
2212
- if (!program) {
2213
- this.gl.deleteShader(vertex);
2214
- this.gl.deleteShader(fragment);
2215
- throw new RenderDeviceError("Failed to allocate WebGL2 depth readback shader", "WEBGL_ALLOCATION_FAILED");
2216
- }
2217
- this.gl.attachShader(program, vertex);
2218
- this.gl.attachShader(program, fragment);
2219
- this.gl.linkProgram(program);
2220
- this.gl.deleteShader(vertex);
2221
- this.gl.deleteShader(fragment);
2222
- if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
2223
- const log = this.gl.getProgramInfoLog(program) ?? "Unknown depth readback shader link error";
2224
- this.gl.deleteProgram(program);
2225
- throw new RenderDeviceError("WebGL2 depth readback shader link failed", "SHADER_LINK_FAILED", { log });
2226
- }
2227
- this.depthReadbackProgram = program;
2228
- return program;
2229
- }
2230
- ensurePresentationProgram() {
2231
- if (this.presentationProgram) {
2232
- return this.presentationProgram;
2233
- }
2234
- const vertex = this.compileShader(this.gl.VERTEX_SHADER, `#version 300 es
2235
- precision highp float;
2236
- out vec2 v_uv;
2237
- void main() {
2238
- vec2 position = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));
2239
- v_uv = position;
2240
- gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
2241
- }
2242
- `, "webgl2-present-render-target");
2243
- const fragment = this.compileShader(this.gl.FRAGMENT_SHADER, `#version 300 es
2244
- precision highp float;
2245
- uniform sampler2D u_source;
2246
- in vec2 v_uv;
2247
- out vec4 outColor;
2248
- void main() {
2249
- outColor = texture(u_source, v_uv);
2250
- }
2251
- `, "webgl2-present-render-target");
2252
- const program = this.gl.createProgram();
2253
- if (!program) {
2254
- this.gl.deleteShader(vertex);
2255
- this.gl.deleteShader(fragment);
2256
- throw new RenderDeviceError("Failed to allocate WebGL presentation shader", "WEBGL_ALLOCATION_FAILED");
2257
1183
  }
2258
- this.gl.attachShader(program, vertex);
2259
- this.gl.attachShader(program, fragment);
2260
- this.gl.linkProgram(program);
2261
- this.gl.deleteShader(vertex);
2262
- this.gl.deleteShader(fragment);
2263
- if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
2264
- const log = this.gl.getProgramInfoLog(program) ?? "Unknown presentation shader link error";
2265
- this.gl.deleteProgram(program);
2266
- throw new RenderDeviceError("WebGL presentation shader link failed", "SHADER_LINK_FAILED", { log });
2267
- }
2268
- this.presentationProgram = program;
2269
- return program;
2270
- }
2271
- ensureBloomBrightExtractProgram() {
2272
- if (this.bloomBrightExtractProgram) {
2273
- return this.bloomBrightExtractProgram;
2274
- }
2275
- this.bloomBrightExtractProgram = this.createFullscreenProgram(`#version 300 es
2276
- precision highp float;
2277
- precision highp int;
2278
- uniform sampler2D u_source;
2279
- uniform sampler2D u_brightLut;
2280
- uniform int u_hdr;
2281
- uniform float u_threshold;
2282
- uniform float u_softKnee;
2283
- out vec4 outColor;
2284
-
2285
- uvec4 byteTexel(sampler2D source, ivec2 coordinate) {
2286
- return uvec4(texelFetch(source, coordinate, 0) * 255.0 + 0.5);
2287
- }
2288
-
2289
- void main() {
2290
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2291
- if (u_hdr == 1) {
2292
- vec4 source = texelFetch(u_source, pixel, 0);
2293
- float luma = dot(source.rgb, vec3(0.2126, 0.7152, 0.0722));
2294
- float kneeLow = max(u_threshold - u_softKnee, 0.0);
2295
- float kneeHigh = min(u_threshold + u_softKnee, 1.0);
2296
- float weight = u_softKnee <= 0.0
2297
- ? (luma >= u_threshold ? 1.0 : 0.0)
2298
- : smoothstep(kneeLow, kneeHigh, luma);
2299
- outColor = source * weight;
2300
- return;
2301
- }
2302
- uvec4 source = byteTexel(u_source, pixel);
2303
- uint colorIndex = (source.r << 16u) | (source.g << 8u) | source.b;
2304
- uint byteIndex = colorIndex >> 3u;
2305
- uint texelIndex = byteIndex >> 2u;
2306
- ivec2 lutCoordinate = ivec2(
2307
- int(texelIndex % ${BLOOM_BRIGHT_LUT_WIDTH}u),
2308
- int(texelIndex / ${BLOOM_BRIGHT_LUT_WIDTH}u)
2309
- );
2310
- uvec4 packed = byteTexel(u_brightLut, lutCoordinate);
2311
- uint component = byteIndex & 3u;
2312
- uint packedByte = component == 0u
2313
- ? packed.r
2314
- : component == 1u
2315
- ? packed.g
2316
- : component == 2u
2317
- ? packed.b
2318
- : packed.a;
2319
- bool bright = ((packedByte >> (colorIndex & 7u)) & 1u) == 1u;
2320
- outColor = bright ? vec4(source) / 255.0 : vec4(0.0);
2321
- }
2322
- `, "webgl2-bloom-bright-extract");
2323
- return this.bloomBrightExtractProgram;
2324
- }
2325
- ensureBloomBlurProgram() {
2326
- if (this.bloomBlurProgram) {
2327
- return this.bloomBlurProgram;
2328
- }
2329
- this.bloomBlurProgram = this.createFullscreenProgram(`#version 300 es
2330
- precision highp float;
2331
- precision highp int;
2332
- uniform sampler2D u_source;
2333
- uniform ivec2 u_size;
2334
- uniform int u_radius;
2335
- uniform int u_horizontal;
2336
- uniform int u_hdr;
2337
- out vec4 outColor;
2338
-
2339
- uvec4 sourceByte(ivec2 coordinate) {
2340
- ivec2 bounded = clamp(coordinate, ivec2(0), u_size - ivec2(1));
2341
- return uvec4(texelFetch(u_source, bounded, 0) * 255.0 + 0.5);
2342
- }
2343
-
2344
- void main() {
2345
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2346
- if (u_hdr == 1) {
2347
- vec4 sum = vec4(0.0);
2348
- for (int offset = -16; offset <= 16; offset += 1) {
2349
- if (abs(offset) > u_radius) continue;
2350
- ivec2 sampleCoordinate = pixel + (u_horizontal == 1 ? ivec2(offset, 0) : ivec2(0, offset));
2351
- sum += texelFetch(u_source, clamp(sampleCoordinate, ivec2(0), u_size - ivec2(1)), 0);
2352
- }
2353
- outColor = sum / float(u_radius * 2 + 1);
2354
- return;
2355
- }
2356
- uvec4 sum = uvec4(0u);
2357
- for (int offset = -16; offset <= 16; offset += 1) {
2358
- if (abs(offset) > u_radius) {
2359
- continue;
2360
- }
2361
- ivec2 sampleCoordinate = pixel + (
2362
- u_horizontal == 1
2363
- ? ivec2(offset, 0)
2364
- : ivec2(0, offset)
2365
- );
2366
- sum += sourceByte(sampleCoordinate);
2367
- }
2368
- uint kernelSize = uint(u_radius * 2 + 1);
2369
- uvec4 rounded = (sum * 2u + uvec4(kernelSize)) / uvec4(kernelSize * 2u);
2370
- outColor = vec4(rounded) / 255.0;
2371
- }
2372
- `, "webgl2-bloom-blur");
2373
- return this.bloomBlurProgram;
2374
- }
2375
- ensureBloomCompositeProgram() {
2376
- if (this.bloomCompositeProgram) {
2377
- return this.bloomCompositeProgram;
2378
- }
2379
- this.bloomCompositeProgram = this.createFullscreenProgram(`#version 300 es
2380
- precision highp float;
2381
- precision highp int;
2382
- uniform sampler2D u_source;
2383
- uniform sampler2D u_blurred;
2384
- uniform sampler2D u_compositeLut;
2385
- uniform int u_hdr;
2386
- uniform float u_intensity;
2387
- out vec4 outColor;
2388
-
2389
- uvec4 byteTexel(sampler2D source, ivec2 coordinate) {
2390
- return uvec4(texelFetch(source, coordinate, 0) * 255.0 + 0.5);
2391
- }
2392
-
2393
- float compositeChannel(uint source, uint blurred) {
2394
- return texelFetch(u_compositeLut, ivec2(int(source), int(blurred)), 0).r;
2395
- }
2396
-
2397
- void main() {
2398
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2399
- if (u_hdr == 1) {
2400
- vec4 source = texelFetch(u_source, pixel, 0);
2401
- vec3 blurred = texelFetch(u_blurred, pixel, 0).rgb;
2402
- outColor = vec4(source.rgb + blurred * u_intensity, source.a);
2403
- return;
2404
- }
2405
- uvec4 source = byteTexel(u_source, pixel);
2406
- uvec4 blurred = byteTexel(u_blurred, pixel);
2407
- outColor = vec4(
2408
- compositeChannel(source.r, blurred.r),
2409
- compositeChannel(source.g, blurred.g),
2410
- compositeChannel(source.b, blurred.b),
2411
- float(source.a) / 255.0
2412
- );
2413
- }
2414
- `, "webgl2-bloom-composite");
2415
- return this.bloomCompositeProgram;
2416
- }
2417
- ensureBloomDownsampleProgram() {
2418
- if (this.bloomDownsampleProgram)
2419
- return this.bloomDownsampleProgram;
2420
- this.bloomDownsampleProgram = this.createFullscreenProgram(`#version 300 es
2421
- precision highp float;
2422
- uniform sampler2D u_source;
2423
- uniform vec2 u_texelSize;
2424
- out vec4 outColor;
2425
- void main() {
2426
- vec2 uv = (gl_FragCoord.xy - 0.5) * u_texelSize;
2427
- vec2 e = u_texelSize * 0.5;
2428
- vec4 sum = texture(u_source, uv - e) + texture(u_source, uv + vec2(e.x, -e.y))
2429
- + texture(u_source, uv + vec2(-e.x, e.y)) + texture(u_source, uv + e);
2430
- outColor = sum * 0.25;
2431
- }
2432
- `, "webgl2-bloom-downsample");
2433
- return this.bloomDownsampleProgram;
2434
- }
2435
- ensureBloomAccumulateProgram() {
2436
- if (this.bloomAccumulateProgram)
2437
- return this.bloomAccumulateProgram;
2438
- this.bloomAccumulateProgram = this.createFullscreenProgram(`#version 300 es
2439
- precision highp float;
2440
- uniform sampler2D u_base;
2441
- uniform sampler2D u_bloom;
2442
- uniform float u_weight;
2443
- out vec4 outColor;
2444
- void main() {
2445
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2446
- vec4 base = texelFetch(u_base, pixel, 0);
2447
- vec2 uv = (vec2(pixel) + 0.5) / vec2(textureSize(u_base, 0));
2448
- vec3 bloom = texture(u_bloom, uv).rgb;
2449
- outColor = vec4(base.rgb + bloom * u_weight, base.a);
2450
- }
2451
- `, "webgl2-bloom-accumulate");
2452
- return this.bloomAccumulateProgram;
2453
- }
2454
- ensureOutlineProgram() {
2455
- if (this.outlineProgram)
2456
- return this.outlineProgram;
2457
- this.outlineProgram = this.createFullscreenProgram(`#version 300 es
2458
- precision highp float;
2459
- precision highp int;
2460
- uniform sampler2D u_source;
2461
- uniform sampler2D u_blendLut;
2462
- uniform ivec2 u_size;
2463
- uniform int u_width;
2464
- uniform float u_boundHigh;
2465
- uniform float u_boundLow;
2466
- out vec4 outColor;
2467
-
2468
- uvec4 sourceByte(ivec2 coordinate) {
2469
- ivec2 bounded = clamp(coordinate, ivec2(0), u_size - ivec2(1));
2470
- return uvec4(texelFetch(u_source, bounded, 0) * 255.0 + 0.5);
2471
- }
2472
-
2473
- uint lumaNumerator(ivec2 coordinate) {
2474
- uvec3 source = sourceByte(coordinate).rgb;
2475
- return 2126u * source.r + 7152u * source.g + 722u * source.b;
2476
- }
2477
-
2478
- uvec2 squareWords(int signedValue) {
2479
- uint value = uint(abs(signedValue));
2480
- uint high = value >> 12u;
2481
- uint low = value & 4095u;
2482
- uint middle = 2u * high * low;
2483
- uint lowWord = low * low + (middle & 4095u) * 4096u;
2484
- uint highWord = high * high + (middle >> 12u);
2485
- highWord += lowWord / ${OUTLINE_LIMB_RADIX}u;
2486
- lowWord %= ${OUTLINE_LIMB_RADIX}u;
2487
- return uvec2(highWord, lowWord);
2488
- }
2489
-
2490
- bool edgeAt(ivec2 pixel) {
2491
- int nw = int(lumaNumerator(pixel + ivec2(-1, -1)));
2492
- int n = int(lumaNumerator(pixel + ivec2(0, -1)));
2493
- int ne = int(lumaNumerator(pixel + ivec2(1, -1)));
2494
- int w = int(lumaNumerator(pixel + ivec2(-1, 0)));
2495
- int e = int(lumaNumerator(pixel + ivec2(1, 0)));
2496
- int sw = int(lumaNumerator(pixel + ivec2(-1, 1)));
2497
- int s = int(lumaNumerator(pixel + ivec2(0, 1)));
2498
- int se = int(lumaNumerator(pixel + ivec2(1, 1)));
2499
- int gx = -nw - 2 * w - sw + ne + 2 * e + se;
2500
- int gy = -nw - 2 * n - ne + sw + 2 * s + se;
2501
- uvec2 x = squareWords(gx);
2502
- uvec2 y = squareWords(gy);
2503
- uint low = x.y + y.y;
2504
- uint high = x.x + y.x;
2505
- if (low >= ${OUTLINE_LIMB_RADIX}u) {
2506
- low -= ${OUTLINE_LIMB_RADIX}u;
2507
- high += 1u;
2508
- }
2509
- uint boundHigh = uint(u_boundHigh);
2510
- uint boundLow = uint(u_boundLow);
2511
- return high != boundHigh ? high > boundHigh : low >= boundLow;
2512
- }
2513
-
2514
- void main() {
2515
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2516
- bool outlined = false;
2517
- for (int offsetY = -6; offsetY <= 6 && !outlined; offsetY += 1) {
2518
- for (int offsetX = -6; offsetX <= 6; offsetX += 1) {
2519
- if (abs(offsetX) > u_width || abs(offsetY) > u_width) continue;
2520
- if (offsetX * offsetX + offsetY * offsetY > u_width * u_width) continue;
2521
- ivec2 candidate = clamp(pixel + ivec2(offsetX, offsetY), ivec2(0), u_size - ivec2(1));
2522
- if (edgeAt(candidate)) {
2523
- outlined = true;
2524
- break;
2525
- }
2526
- }
2527
- }
2528
- uvec4 source = sourceByte(pixel);
2529
- if (!outlined) {
2530
- outColor = vec4(source) / 255.0;
2531
- return;
2532
- }
2533
- outColor = vec4(
2534
- texelFetch(u_blendLut, ivec2(int(source.r), 0), 0).r,
2535
- texelFetch(u_blendLut, ivec2(int(source.g), 0), 0).g,
2536
- texelFetch(u_blendLut, ivec2(int(source.b), 0), 0).b,
2537
- float(source.a) / 255.0
2538
- );
2539
- }
2540
- `, "webgl2-outline");
2541
- return this.outlineProgram;
2542
- }
2543
- ensureSsaoProgram() {
2544
- if (this.ssaoProgram)
2545
- return this.ssaoProgram;
2546
- this.ssaoProgram = this.createFullscreenProgram(`#version 300 es
2547
- precision highp float;
2548
- precision highp int;
2549
- uniform sampler2D u_source;
2550
- uniform sampler2D u_depth;
2551
- uniform ivec2 u_size;
2552
- uniform int u_radius;
2553
- uniform float u_intensity;
2554
- uniform float u_bias;
2555
- out vec4 outColor;
2556
-
2557
- float depthAt(ivec2 coordinate) {
2558
- return texelFetch(u_depth, clamp(coordinate, ivec2(0), u_size - ivec2(1)), 0).r;
2559
- }
2560
-
2561
- void main() {
2562
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2563
- float centerDepth = depthAt(pixel);
2564
- float occlusion = 0.0;
2565
- float samples = 0.0;
2566
- for (int stepY = -1; stepY <= 1; stepY += 1) {
2567
- for (int stepX = -1; stepX <= 1; stepX += 1) {
2568
- if (stepX == 0 && stepY == 0) continue;
2569
- float sampleDepth = depthAt(pixel + ivec2(stepX * u_radius, stepY * u_radius));
2570
- occlusion += clamp(
2571
- (centerDepth - sampleDepth - u_bias) / (0.14 + float(u_radius) * 0.04),
2572
- 0.0,
2573
- 1.0
2574
- );
2575
- samples += 1.0;
2576
- }
2577
- }
2578
- float factor = max(0.18, 1.0 - (occlusion / max(1.0, samples)) * u_intensity * 0.72);
2579
- vec4 source = texelFetch(u_source, pixel, 0);
2580
- outColor = vec4(source.rgb * factor, source.a);
2581
- }
2582
- `, "webgl2-ssao");
2583
- return this.ssaoProgram;
2584
- }
2585
- ensureSsrProgram() {
2586
- if (this.ssrProgram)
2587
- return this.ssrProgram;
2588
- this.ssrProgram = this.createFullscreenProgram(`#version 300 es
2589
- precision highp float;
2590
- precision highp int;
2591
- uniform sampler2D u_source;
2592
- uniform sampler2D u_depth;
2593
- uniform ivec2 u_size;
2594
- uniform float u_intensity;
2595
- uniform int u_maxDistance;
2596
- uniform float u_depthNear;
2597
- uniform float u_depthFar;
2598
- out vec4 outColor;
2599
-
2600
- // Raw GL depth is nonlinear (0.1/1000 defaults park the play area past 0.97),
2601
- // so every depth-gated comparison below runs on linearized depth. The CPU
2602
- // byte kernel keeps fixture-unit semantics; the divergence is documented at
2603
- // normalizeLdrDepthRange.
2604
- float a3dSsrLinearDepth(float depth) {
2605
- float viewZ = u_depthNear * u_depthFar / max(u_depthFar - depth * (u_depthFar - u_depthNear), 0.0001);
2606
- return clamp((viewZ - u_depthNear) / max(u_depthFar - u_depthNear, 0.0001), 0.0, 1.0);
2607
- }
2608
-
2609
- void main() {
2610
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2611
- vec4 target = texelFetch(u_source, pixel, 0);
2612
- float linearDepth = a3dSsrLinearDepth(texelFetch(u_depth, pixel, 0).r);
2613
- int rayDistance = max(1, int(round((1.0 - linearDepth) * float(u_maxDistance))));
2614
- int direction = pixel.x < u_size.x / 2 ? 1 : -1;
2615
- ivec2 samplePixel = ivec2(
2616
- clamp(pixel.x + direction * rayDistance, 0, u_size.x - 1),
2617
- clamp(u_size.y - 1 - pixel.y, 0, u_size.y - 1)
2618
- );
2619
- vec3 reflected = texelFetch(u_source, samplePixel, 0).rgb;
2620
- float sourceLuma = (reflected.r + reflected.g + reflected.b) / 3.0;
2621
- if (sourceLuma < 0.18 || linearDepth > 0.995) {
2622
- outColor = target;
2623
- return;
2624
- }
2625
- float boost = sourceLuma * u_intensity * (1.0 - linearDepth);
2626
- outColor = vec4(clamp(target.rgb + reflected * boost, 0.0, 1.0), target.a);
2627
- }
2628
- `, "webgl2-ssr");
2629
- return this.ssrProgram;
2630
- }
2631
- ensureDepthOfFieldProgram() {
2632
- if (this.depthOfFieldProgram)
2633
- return this.depthOfFieldProgram;
2634
- this.depthOfFieldProgram = this.createFullscreenProgram(`#version 300 es
2635
- precision highp float;
2636
- precision highp int;
2637
- uniform sampler2D u_source;
2638
- uniform sampler2D u_depth;
2639
- uniform ivec2 u_size;
2640
- uniform float u_focusDepth;
2641
- uniform float u_focusRange;
2642
- uniform int u_maxRadius;
2643
- uniform float u_depthNear;
2644
- uniform float u_depthFar;
2645
- out vec4 outColor;
2646
-
2647
- // Same linearization contract as the SSR program, except focus is authored
2648
- // directly as a linear-distance fraction (0 = near plane, 1 = far plane):
2649
- // buffer-unit focus values are unusable once depth is linearized, because the
2650
- // projection curve parks the whole play area inside a sliver of buffer units.
2651
- // The CPU byte kernel keeps buffer-unit semantics; the divergence is
2652
- // documented at normalizeLdrDepthRange.
2653
- float a3dDofLinearDepth(float depth) {
2654
- float viewZ = u_depthNear * u_depthFar / max(u_depthFar - depth * (u_depthFar - u_depthNear), 0.0001);
2655
- return clamp((viewZ - u_depthNear) / max(u_depthFar - u_depthNear, 0.0001), 0.0, 1.0);
2656
- }
2657
-
2658
- void main() {
2659
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2660
- vec4 source = texelFetch(u_source, pixel, 0);
2661
- float linearDepth = a3dDofLinearDepth(texelFetch(u_depth, pixel, 0).r);
2662
- float normalizedBlur = max(0.0, abs(linearDepth - u_focusDepth) - u_focusRange)
2663
- / max(u_focusRange, 0.001) * float(u_maxRadius);
2664
- int radius = min(u_maxRadius, int(round(normalizedBlur)));
2665
- if (radius == 0) {
2666
- outColor = source;
2667
- return;
2668
- }
2669
- vec3 sum = vec3(0.0);
2670
- float samples = 0.0;
2671
- for (int offsetY = -8; offsetY <= 8; offsetY += 1) {
2672
- for (int offsetX = -8; offsetX <= 8; offsetX += 1) {
2673
- if (abs(offsetX) > radius || abs(offsetY) > radius) continue;
2674
- if (offsetX * offsetX + offsetY * offsetY > radius * radius) continue;
2675
- ivec2 samplePixel = clamp(pixel + ivec2(offsetX, offsetY), ivec2(0), u_size - ivec2(1));
2676
- sum += texelFetch(u_source, samplePixel, 0).rgb;
2677
- samples += 1.0;
2678
- }
2679
- }
2680
- outColor = vec4(sum / max(1.0, samples), source.a);
2681
- }
2682
- `, "webgl2-depth-of-field");
2683
- return this.depthOfFieldProgram;
2684
- }
2685
- ensureMotionBlurProgram() {
2686
- if (this.motionBlurProgram)
2687
- return this.motionBlurProgram;
2688
- this.motionBlurProgram = this.createFullscreenProgram(`#version 300 es
2689
- precision highp float;
2690
- precision highp int;
2691
- uniform sampler2D u_source;
2692
- uniform sampler2D u_velocity;
2693
- uniform ivec2 u_size;
2694
- uniform int u_samples;
2695
- uniform float u_scale;
2696
- out vec4 outColor;
2697
-
2698
- void main() {
2699
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2700
- vec4 source = texelFetch(u_source, pixel, 0);
2701
- vec2 velocity = texelFetch(u_velocity, pixel, 0).rg * u_scale;
2702
- if (length(velocity) < 0.01) {
2703
- outColor = source;
2704
- return;
2705
- }
2706
- vec3 sum = vec3(0.0);
2707
- for (int sampleIndex = 0; sampleIndex < 16; sampleIndex += 1) {
2708
- if (sampleIndex >= u_samples) continue;
2709
- float t = float(sampleIndex) / float(u_samples - 1) - 0.5;
2710
- ivec2 samplePixel = ivec2(floor(vec2(pixel) - velocity * t + vec2(0.5)));
2711
- samplePixel = clamp(samplePixel, ivec2(0), u_size - ivec2(1));
2712
- sum += texelFetch(u_source, samplePixel, 0).rgb;
2713
- }
2714
- outColor = vec4(sum / float(u_samples), source.a);
2715
- }
2716
- `, "webgl2-motion-blur");
2717
- return this.motionBlurProgram;
2718
- }
2719
- ensureTaaProgram() {
2720
- if (this.taaProgram)
2721
- return this.taaProgram;
2722
- this.taaProgram = this.createFullscreenProgram(`#version 300 es
2723
- precision highp float;
2724
- uniform sampler2D u_source;
2725
- uniform sampler2D u_history;
2726
- uniform float u_blend;
2727
- out vec4 outColor;
2728
-
2729
- void main() {
2730
- ivec2 pixel = ivec2(gl_FragCoord.xy);
2731
- vec4 source = texelFetch(u_source, pixel, 0);
2732
- vec3 history = texelFetch(u_history, pixel, 0).rgb;
2733
- outColor = vec4(mix(source.rgb, history, u_blend), source.a);
2734
- }
2735
- `, "webgl2-taa");
2736
- return this.taaProgram;
2737
- }
2738
- createFullscreenProgram(fragmentSource, label) {
2739
- const vertex = this.compileShader(this.gl.VERTEX_SHADER, `#version 300 es
2740
- precision highp float;
2741
- void main() {
2742
- vec2 position = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));
2743
- gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
2744
- }
2745
- `, label);
2746
- const fragment = this.compileShader(this.gl.FRAGMENT_SHADER, fragmentSource, label);
2747
- const program = this.gl.createProgram();
2748
- if (!program) {
2749
- this.gl.deleteShader(vertex);
2750
- this.gl.deleteShader(fragment);
2751
- throw new RenderDeviceError("Failed to allocate WebGL2 fullscreen shader program", "WEBGL_ALLOCATION_FAILED", { label });
2752
- }
2753
- this.gl.attachShader(program, vertex);
2754
- this.gl.attachShader(program, fragment);
2755
- this.gl.linkProgram(program);
2756
- this.gl.deleteShader(vertex);
2757
- this.gl.deleteShader(fragment);
2758
- if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
2759
- const log = this.gl.getProgramInfoLog(program) ?? "Unknown fullscreen shader link error";
2760
- this.gl.deleteProgram(program);
2761
- throw new RenderDeviceError("WebGL2 fullscreen shader link failed", "SHADER_LINK_FAILED", { label, log });
2762
- }
2763
- return program;
2764
- }
2765
- ensureLdrPostprocessProgram() {
2766
- if (this.ldrPostprocessProgram) {
2767
- return this.ldrPostprocessProgram;
2768
- }
2769
- const vertex = this.compileShader(this.gl.VERTEX_SHADER, `#version 300 es
2770
- precision highp float;
2771
- out vec2 v_uv;
2772
- void main() {
2773
- vec2 position = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));
2774
- v_uv = position;
2775
- gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
2776
- }
2777
- `, "webgl2-ldr-postprocess");
2778
- const fragment = this.compileShader(this.gl.FRAGMENT_SHADER, `#version 300 es
2779
- precision highp float;
2780
- uniform sampler2D u_source;
2781
- uniform vec2 u_texelSize;
2782
- uniform int u_hasToneMapping;
2783
- uniform int u_toneOperator;
2784
- uniform int u_inputColorSpace;
2785
- uniform int u_outputColorSpace;
2786
- uniform float u_exposure;
2787
- uniform float u_whitePoint;
2788
- uniform float u_gamma;
2789
- uniform int u_hasColorGrade;
2790
- uniform float u_contrast;
2791
- uniform float u_temperature;
2792
- uniform float u_tint;
2793
- uniform float u_saturation;
2794
- uniform float u_vibrance;
2795
- uniform float u_vignette;
2796
- uniform float u_sharpening;
2797
- uniform int u_hasFxaa;
2798
- uniform float u_edgeThreshold;
2799
- uniform float u_subpixelBlend;
2800
- in vec2 v_uv;
2801
- out vec4 outColor;
2802
-
2803
- float srgbToLinear(float value) {
2804
- return value <= 0.04045 ? value / 12.92 : pow((value + 0.055) / 1.055, 2.4);
2805
- }
2806
-
2807
- float linearToSrgb(float value) {
2808
- return value <= 0.0031308 ? value * 12.92 : 1.055 * pow(value, 1.0 / 2.4) - 0.055;
2809
- }
2810
-
2811
- vec3 decodeColor(vec3 color) {
2812
- return u_inputColorSpace == 1 ? vec3(srgbToLinear(color.r), srgbToLinear(color.g), srgbToLinear(color.b)) : color;
2813
- }
2814
-
2815
- vec3 encodeColor(vec3 color) {
2816
- vec3 linear = clamp(color, 0.0, 1.0);
2817
- return u_outputColorSpace == 1 ? vec3(linearToSrgb(linear.r), linearToSrgb(linear.g), linearToSrgb(linear.b)) : linear;
2818
- }
2819
-
2820
- vec3 acesRrtAndOdtFit(vec3 value) {
2821
- vec3 numerator = value * (value + 0.0245786) - 0.000090537;
2822
- vec3 denominator = value * (0.983729 * value + 0.4329510) + 0.238081;
2823
- return numerator / denominator;
2824
- }
2825
-
2826
- vec3 acesFilmic(vec3 color) {
2827
- // Match current Three.js ACESFilmicToneMapping. ACES is a coupled RGB
2828
- // transform; a scalar approximation shifts hue and washes saturated colors.
2829
- const mat3 acesInput = mat3(
2830
- vec3(0.59719, 0.07600, 0.02840),
2831
- vec3(0.35458, 0.90834, 0.13383),
2832
- vec3(0.04823, 0.01566, 0.83777)
2833
- );
2834
- const mat3 acesOutput = mat3(
2835
- vec3(1.60475, -0.10208, -0.00327),
2836
- vec3(-0.53108, 1.10813, -0.07276),
2837
- vec3(-0.07367, -0.00605, 1.07602)
2838
- );
2839
- vec3 acesColor = acesInput * (color / 0.6);
2840
- acesColor = acesRrtAndOdtFit(acesColor);
2841
- return clamp(acesOutput * acesColor, 0.0, 1.0);
2842
- }
2843
-
2844
- float filmic(float value) {
2845
- float x = max(0.0, value);
2846
- float toe = max(0.0, x - 0.004);
2847
- float curve = (toe * (6.2 * toe + 0.5)) / (toe * (6.2 * toe + 1.7) + 0.06);
2848
- return min(curve, x * 1.08);
2849
- }
2850
-
2851
- float uncharted2(float value) {
2852
- float a = 0.15;
2853
- float b = 0.5;
2854
- float c = 0.1;
2855
- float d = 0.2;
2856
- float e = 0.02;
2857
- float f = 0.3;
2858
- float w = 11.2;
2859
- float x = value * 2.0;
2860
- float curve = ((x * (a * x + c * b) + d * e) / (x * (a * x + b) + d * f)) - e / f;
2861
- float wx = w;
2862
- float white = ((wx * (a * wx + c * b) + d * e) / (wx * (a * wx + b) + d * f)) - e / f;
2863
- return clamp(curve / white, 0.0, 1.0);
2864
- }
2865
-
2866
- float agx(float value) {
2867
- float x = max(0.0, value);
2868
- float encoded = log2(1.0 + x) / log2(17.0);
2869
- return clamp(encoded * encoded * (3.0 - 2.0 * encoded), 0.0, 1.0);
2870
- }
2871
-
2872
- float neutral(float value) {
2873
- float x = max(0.0, value);
2874
- return min(1.0, (x * (1.0 + x / 7.5)) / (1.0 + x));
2875
- }
2876
-
2877
- float toneMapChannel(float value) {
2878
- float exposed = max(0.0, value * u_exposure) / max(0.0001, u_whitePoint);
2879
- if (u_toneOperator == 0) return min(1.0, exposed);
2880
- if (u_toneOperator == 1) return exposed / (1.0 + exposed);
2881
- if (u_toneOperator == 2) return exposed;
2882
- if (u_toneOperator == 3) return filmic(exposed);
2883
- if (u_toneOperator == 4) return uncharted2(exposed);
2884
- if (u_toneOperator == 5) return agx(exposed);
2885
- return neutral(exposed);
2886
- }
2887
-
2888
- vec3 applyToneMapping(vec3 color) {
2889
- if (u_hasToneMapping == 0) return color;
2890
- vec3 decoded = decodeColor(color);
2891
- vec3 mapped = u_toneOperator == 2
2892
- ? acesFilmic(max(vec3(0.0), decoded * u_exposure) / max(0.0001, u_whitePoint))
2893
- : vec3(toneMapChannel(decoded.r), toneMapChannel(decoded.g), toneMapChannel(decoded.b));
2894
- return encodeColor(mapped);
2895
- }
2896
-
2897
- vec3 applyColorGrade(vec3 color, vec2 uv) {
2898
- if (u_hasColorGrade == 0) return color;
2899
- float contrastOffset = 0.5 - 0.5 * u_contrast;
2900
- float redShift = u_temperature * 0.08 - u_tint * 0.02;
2901
- float greenShift = u_tint * 0.06;
2902
- float blueShift = -u_temperature * 0.08 - u_tint * 0.02;
2903
- float luma = dot(color, vec3(0.2126, 0.7152, 0.0722));
2904
- vec3 graded = color * u_contrast + vec3(contrastOffset + redShift, contrastOffset + greenShift, contrastOffset + blueShift);
2905
- float distanceFromLuma = min(1.0, abs(graded.r - luma) + abs(graded.g - luma) + abs(graded.b - luma));
2906
- float vibranceBoost = u_vibrance == 0.0 ? 0.0 : u_vibrance * (1.0 - distanceFromLuma);
2907
- float saturation = u_saturation + vibranceBoost;
2908
- graded = vec3(luma) + (graded - vec3(luma)) * saturation;
2909
- vec2 centered = uv * 2.0 - 1.0;
2910
- float vignette = 1.0 - u_vignette * clamp((length(centered) - 0.28) / 1.12, 0.0, 1.0);
2911
- return clamp(graded * vignette, 0.0, 1.0);
2912
- }
2913
-
2914
- vec3 baseColorAt(vec2 uv) {
2915
- vec2 clampedUv = clamp(uv, vec2(0.0), vec2(1.0));
2916
- vec3 color = texture(u_source, clampedUv).rgb;
2917
- return applyColorGrade(applyToneMapping(color), clampedUv);
2918
- }
2919
-
2920
- vec3 finalColorAt(vec2 uv) {
2921
- vec3 center = baseColorAt(uv);
2922
- if (u_hasColorGrade == 0 || u_sharpening <= 0.0) return center;
2923
- vec3 blur = (
2924
- baseColorAt(uv + vec2(-u_texelSize.x, 0.0)) +
2925
- baseColorAt(uv + vec2(u_texelSize.x, 0.0)) +
2926
- baseColorAt(uv + vec2(0.0, -u_texelSize.y)) +
2927
- baseColorAt(uv + vec2(0.0, u_texelSize.y))
2928
- ) * 0.25;
2929
- return clamp(center + (center - blur) * u_sharpening, 0.0, 1.0);
2930
- }
2931
-
2932
- float luma(vec3 color) {
2933
- return dot(color, vec3(0.2126, 0.7152, 0.0722));
2934
- }
2935
-
2936
- void main() {
2937
- vec3 center = finalColorAt(v_uv);
2938
- float alpha = texture(u_source, clamp(v_uv, vec2(0.0), vec2(1.0))).a;
2939
- if (u_hasFxaa == 0) {
2940
- outColor = vec4(center, alpha);
2941
- return;
2942
- }
2943
- vec3 north = finalColorAt(v_uv + vec2(0.0, -u_texelSize.y));
2944
- vec3 south = finalColorAt(v_uv + vec2(0.0, u_texelSize.y));
2945
- vec3 west = finalColorAt(v_uv + vec2(-u_texelSize.x, 0.0));
2946
- vec3 east = finalColorAt(v_uv + vec2(u_texelSize.x, 0.0));
2947
- float centerLuma = luma(center);
2948
- float minLuma = min(centerLuma, min(min(luma(north), luma(south)), min(luma(west), luma(east))));
2949
- float maxLuma = max(centerLuma, max(max(luma(north), luma(south)), max(luma(west), luma(east))));
2950
- if (maxLuma - minLuma < u_edgeThreshold) {
2951
- outColor = vec4(center, alpha);
2952
- return;
2953
- }
2954
- vec3 average = (north + south + west + east) * 0.25;
2955
- outColor = vec4(mix(center, average, clamp(u_subpixelBlend, 0.0, 1.0)), alpha);
2956
- }
2957
- `, "webgl2-ldr-postprocess");
2958
- const program = this.gl.createProgram();
2959
- if (!program) {
2960
- this.gl.deleteShader(vertex);
2961
- this.gl.deleteShader(fragment);
2962
- throw new RenderDeviceError("Failed to allocate WebGL2 LDR postprocess shader", "WEBGL_ALLOCATION_FAILED");
2963
- }
2964
- this.gl.attachShader(program, vertex);
2965
- this.gl.attachShader(program, fragment);
2966
- this.gl.linkProgram(program);
2967
- this.gl.deleteShader(vertex);
2968
- this.gl.deleteShader(fragment);
2969
- if (!this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {
2970
- const log = this.gl.getProgramInfoLog(program) ?? "Unknown LDR postprocess shader link error";
2971
- this.gl.deleteProgram(program);
2972
- throw new RenderDeviceError("WebGL2 LDR postprocess shader link failed", "SHADER_LINK_FAILED", { log });
2973
- }
2974
- this.ldrPostprocessProgram = program;
2975
- return program;
1184
+ this.host.textureRegistry.textureUploadModes.clear();
1185
+ if (this.host.textureRegistry.fallbackTexture) {
1186
+ this.gl.deleteTexture(this.host.textureRegistry.fallbackTexture);
1187
+ this.host.textureRegistry.fallbackTexture = null;
1188
+ }
1189
+ if (this.host.textureRegistry.fallbackCubeTexture) {
1190
+ this.gl.deleteTexture(this.host.textureRegistry.fallbackCubeTexture);
1191
+ this.host.textureRegistry.fallbackCubeTexture = null;
1192
+ }
1193
+ if (this.host.post.presentationProgram) {
1194
+ this.gl.deleteProgram(this.host.post.presentationProgram);
1195
+ this.host.post.presentationProgram = null;
1196
+ }
1197
+ if (this.host.post.ldrPostprocessProgram) {
1198
+ this.gl.deleteProgram(this.host.post.ldrPostprocessProgram);
1199
+ this.host.post.ldrPostprocessProgram = null;
1200
+ }
1201
+ if (this.host.post.bloomBrightExtractProgram) {
1202
+ this.gl.deleteProgram(this.host.post.bloomBrightExtractProgram);
1203
+ this.host.post.bloomBrightExtractProgram = null;
1204
+ }
1205
+ if (this.host.post.bloomBlurProgram) {
1206
+ this.gl.deleteProgram(this.host.post.bloomBlurProgram);
1207
+ this.host.post.bloomBlurProgram = null;
1208
+ }
1209
+ if (this.host.post.bloomCompositeProgram) {
1210
+ this.gl.deleteProgram(this.host.post.bloomCompositeProgram);
1211
+ this.host.post.bloomCompositeProgram = null;
1212
+ }
1213
+ if (this.host.post.bloomDownsampleProgram) {
1214
+ this.gl.deleteProgram(this.host.post.bloomDownsampleProgram);
1215
+ this.host.post.bloomDownsampleProgram = null;
1216
+ }
1217
+ if (this.host.post.bloomAccumulateProgram) {
1218
+ this.gl.deleteProgram(this.host.post.bloomAccumulateProgram);
1219
+ this.host.post.bloomAccumulateProgram = null;
1220
+ }
1221
+ if (this.host.post.outlineProgram) {
1222
+ this.gl.deleteProgram(this.host.post.outlineProgram);
1223
+ this.host.post.outlineProgram = null;
1224
+ }
1225
+ if (this.host.post.ssaoProgram) {
1226
+ this.gl.deleteProgram(this.host.post.ssaoProgram);
1227
+ this.host.post.ssaoProgram = null;
1228
+ }
1229
+ if (this.host.post.ssrProgram) {
1230
+ this.gl.deleteProgram(this.host.post.ssrProgram);
1231
+ this.host.post.ssrProgram = null;
1232
+ }
1233
+ if (this.host.post.depthOfFieldProgram) {
1234
+ this.gl.deleteProgram(this.host.post.depthOfFieldProgram);
1235
+ this.host.post.depthOfFieldProgram = null;
1236
+ }
1237
+ if (this.host.post.motionBlurProgram) {
1238
+ this.gl.deleteProgram(this.host.post.motionBlurProgram);
1239
+ this.host.post.motionBlurProgram = null;
1240
+ }
1241
+ if (this.host.post.motionBlurVelocityTexture) {
1242
+ this.gl.deleteTexture(this.host.post.motionBlurVelocityTexture);
1243
+ this.host.post.motionBlurVelocityTexture = null;
1244
+ this.host.post.motionBlurVelocitySize = null;
1245
+ }
1246
+ if (this.host.post.taaProgram) {
1247
+ this.gl.deleteProgram(this.host.post.taaProgram);
1248
+ this.host.post.taaProgram = null;
1249
+ }
1250
+ if (this.host.post.taaPresentationProgram) {
1251
+ this.gl.deleteProgram(this.host.post.taaPresentationProgram);
1252
+ this.host.post.taaPresentationProgram = null;
1253
+ }
1254
+ if (this.host.post.taaHistoryTexture) {
1255
+ this.gl.deleteTexture(this.host.post.taaHistoryTexture);
1256
+ this.host.post.taaHistoryTexture = null;
1257
+ this.host.post.taaHistorySize = null;
1258
+ }
1259
+ this.host.post.disposeBloomPingPongResources();
1260
+ this.host.post.disposeBloomPyramidResources();
1261
+ if (this.host.post.bloomBrightLutTexture) {
1262
+ this.gl.deleteTexture(this.host.post.bloomBrightLutTexture);
1263
+ this.host.post.bloomBrightLutTexture = null;
1264
+ this.host.post.bloomBrightLutThreshold = null;
1265
+ }
1266
+ if (this.host.post.bloomCompositeLutTexture) {
1267
+ this.gl.deleteTexture(this.host.post.bloomCompositeLutTexture);
1268
+ this.host.post.bloomCompositeLutTexture = null;
1269
+ this.host.post.bloomCompositeLutIntensity = null;
1270
+ this.host.post.bloomCompositeLutShoulder = null;
1271
+ }
1272
+ if (this.host.post.outlineBlendLutTexture) {
1273
+ this.gl.deleteTexture(this.host.post.outlineBlendLutTexture);
1274
+ this.host.post.outlineBlendLutTexture = null;
1275
+ this.host.post.outlineBlendLutKey = null;
1276
+ }
1277
+ if (this.host.post.presentationVertexArray) {
1278
+ this.gl.deleteVertexArray(this.host.post.presentationVertexArray);
1279
+ this.host.post.presentationVertexArray = null;
1280
+ }
1281
+ if (this.host.probe.depthReadbackProgram) {
1282
+ this.gl.deleteProgram(this.host.probe.depthReadbackProgram);
1283
+ this.host.probe.depthReadbackProgram = null;
1284
+ }
1285
+ this.host.textureRegistry.textures.clear();
1286
+ this.host.disposed = true;
2976
1287
  }
2977
1288
  compileShader(type, source, label) {
2978
1289
  const shader = this.gl.createShader(type);
@@ -3013,790 +1324,6 @@ void main() {
3013
1324
  }
3014
1325
  return { attributes, uniforms, attributeDetails, uniformDetails };
3015
1326
  }
3016
- uploadUniforms(shader, uniforms) {
3017
- let textureUnit = 0;
3018
- for (const [name, value] of uniforms) {
3019
- if (!shader.reflection.uniforms.has(name)) {
3020
- continue;
3021
- }
3022
- const location = this.getUniformLocation(shader, name);
3023
- if (location === null) {
3024
- throw new RenderDeviceError("Material tried to bind a missing shader uniform", "MISSING_UNIFORM", { name });
3025
- }
3026
- if (isTextureBinding(value)) {
3027
- this.uploadTextureUniform(location, value, textureUnit);
3028
- textureUnit += 1;
3029
- }
3030
- else if (typeof value === "number") {
3031
- this.gl.uniform1f(location, value);
3032
- }
3033
- else if (Array.isArray(value) || ArrayBuffer.isView(value)) {
3034
- const length = value.length;
3035
- const floatData = value;
3036
- if (length === 16 || (length > 16 && length % 16 === 0 && /(?:Matrix|Matrices)$/.test(name))) {
3037
- this.gl.uniformMatrix4fv(location, false, floatData);
3038
- }
3039
- else if (length > 16 && length % 4 === 0) {
3040
- this.gl.uniform4fv(location, floatData);
3041
- }
3042
- else if (length === 4) {
3043
- this.gl.uniform4fv(location, floatData);
3044
- }
3045
- else if (length === 3) {
3046
- this.gl.uniform3fv(location, floatData);
3047
- }
3048
- else if (length === 2) {
3049
- this.gl.uniform2fv(location, floatData);
3050
- }
3051
- else {
3052
- throw new RenderDeviceError("Unsupported uniform array length", "UNSUPPORTED_UNIFORM", { name, length });
3053
- }
3054
- }
3055
- else {
3056
- throw new RenderDeviceError("Unsupported uniform value", "UNSUPPORTED_UNIFORM", { name, valueType: typeof value });
3057
- }
3058
- if (this.errorCheckMode === "strict") {
3059
- const uniformError = this.readError();
3060
- if (uniformError) {
3061
- throw new RenderDeviceError(`WebGL2 uniform upload failed for ${name}: ${uniformError}`, "WEBGL_DRAW_FAILED", {
3062
- name,
3063
- stage: "uniform",
3064
- error: uniformError
3065
- });
3066
- }
3067
- }
3068
- }
3069
- }
3070
- getUniformLocation(shader, name) {
3071
- let cache = this.uniformLocationCache.get(shader);
3072
- if (!cache) {
3073
- cache = new Map();
3074
- this.uniformLocationCache.set(shader, cache);
3075
- }
3076
- if (!cache.has(name)) {
3077
- this.uniformLocationLookupCount += 1;
3078
- cache.set(name, this.gl.getUniformLocation(shader.handle, name) ?? this.gl.getUniformLocation(shader.handle, `${name}[0]`));
3079
- }
3080
- return cache.get(name) ?? null;
3081
- }
3082
- uploadTextureUniform(location, binding, textureUnit) {
3083
- const validation = binding.validate();
3084
- if (!validation.ok) {
3085
- throw new RenderDeviceError("Texture binding validation failed", "INVALID_TEXTURE_BINDING", {
3086
- diagnostics: validation.diagnostics,
3087
- name: binding.name
3088
- });
3089
- }
3090
- this.activateTextureUnit(textureUnit);
3091
- const dimension = binding.texture?.dimension ?? (binding.name.toLowerCase().includes("cubemap") || binding.name.toLowerCase().includes("cube") ? "cube" : "2d");
3092
- const target = dimension === "cube" ? this.gl.TEXTURE_CUBE_MAP : this.gl.TEXTURE_2D;
3093
- const handle = binding.texture ? this.getTextureHandle(binding.texture) : dimension === "cube" ? this.getFallbackCubeTextureHandle() : this.getFallbackTextureHandle();
3094
- if (binding.texture) {
3095
- const lowerName = binding.name.toLowerCase();
3096
- if (lowerName.includes("environment"))
3097
- this.nativeEnvironmentBindings += 1;
3098
- if (lowerName.includes("shadow"))
3099
- this.nativeShadowMapBindings += 1;
3100
- }
3101
- this.bindTextureForUnit(textureUnit, target, handle);
3102
- const samplerHandle = this.getSamplerHandle(binding.sampler, target);
3103
- this.stateCache.bindSampler(textureUnit, samplerHandle, () => this.gl.bindSampler(textureUnit, samplerHandle));
3104
- this.gl.uniform1i(location, textureUnit);
3105
- }
3106
- activateTextureUnit(textureUnit) {
3107
- if (this.activeTextureUnitIndex === textureUnit)
3108
- return;
3109
- this.stateCache.activeTexture(textureUnit, () => this.gl.activeTexture(this.gl.TEXTURE0 + textureUnit));
3110
- this.activeTextureUnitIndex = textureUnit;
3111
- }
3112
- bindTextureForUnit(textureUnit, target, handle) {
3113
- const key = `${textureUnit}:${target}`;
3114
- if (this.textureUnitBindings.get(key) === handle)
3115
- return;
3116
- this.stateCache.bindTexture(target, handle, () => this.gl.bindTexture(target, handle));
3117
- this.textureUnitBindings.set(key, handle);
3118
- this.textureBindCount += 1;
3119
- }
3120
- setTextureParameterIfNeeded(handle, target, parameter, value) {
3121
- let parameters = this.textureSamplerParameterCache.get(handle);
3122
- if (!parameters) {
3123
- parameters = new Map();
3124
- this.textureSamplerParameterCache.set(handle, parameters);
3125
- }
3126
- if (parameters.get(parameter) === value)
3127
- return;
3128
- this.gl.texParameteri(target, parameter, value);
3129
- parameters.set(parameter, value);
3130
- this.samplerParameterUploadCount += 1;
3131
- }
3132
- applySamplerAnisotropy(maxAnisotropy, target = this.gl.TEXTURE_2D) {
3133
- if (maxAnisotropy <= 1)
3134
- return;
3135
- if (!this.anisotropicFilteringExtension)
3136
- return;
3137
- this.gl.texParameterf(target, this.anisotropicFilteringExtension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(Math.max(1, maxAnisotropy), this.maxTextureAnisotropy));
3138
- this.samplerAnisotropyUploadCount += 1;
3139
- }
3140
- getSamplerHandle(sampler, target) {
3141
- const key = this.samplerKey(sampler, target);
3142
- const cached = this.samplerObjectCache.get(key);
3143
- if (cached)
3144
- return cached;
3145
- const handle = this.gl.createSampler();
3146
- if (!handle) {
3147
- throw new RenderDeviceError("Failed to allocate WebGL sampler", "WEBGL_ALLOCATION_FAILED");
3148
- }
3149
- this.gl.samplerParameteri(handle, this.gl.TEXTURE_MIN_FILTER, this.minFilter(sampler.minFilter));
3150
- this.gl.samplerParameteri(handle, this.gl.TEXTURE_MAG_FILTER, this.magFilter(sampler.magFilter));
3151
- this.gl.samplerParameteri(handle, this.gl.TEXTURE_WRAP_S, this.addressMode(sampler.addressU));
3152
- this.gl.samplerParameteri(handle, this.gl.TEXTURE_WRAP_T, this.addressMode(sampler.addressV));
3153
- this.samplerParameterUploadCount += 4;
3154
- if (target === this.gl.TEXTURE_CUBE_MAP) {
3155
- this.gl.samplerParameteri(handle, this.gl.TEXTURE_WRAP_R, this.addressMode(sampler.addressV));
3156
- this.samplerParameterUploadCount += 1;
3157
- }
3158
- if (sampler.maxAnisotropy > 1 && this.anisotropicFilteringExtension) {
3159
- this.gl.samplerParameterf(handle, this.anisotropicFilteringExtension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(Math.max(1, sampler.maxAnisotropy), this.maxTextureAnisotropy));
3160
- this.samplerAnisotropyUploadCount += 1;
3161
- }
3162
- this.samplerObjectCache.set(key, handle);
3163
- return handle;
3164
- }
3165
- samplerKey(sampler, target) {
3166
- return [
3167
- sampler.minFilter,
3168
- sampler.magFilter,
3169
- sampler.addressU,
3170
- sampler.addressV,
3171
- sampler.maxAnisotropy,
3172
- target === this.gl.TEXTURE_CUBE_MAP ? "cube" : "2d"
3173
- ].join("|");
3174
- }
3175
- getFallbackTextureHandle() {
3176
- if (this.fallbackTexture) {
3177
- return this.fallbackTexture;
3178
- }
3179
- const handle = this.gl.createTexture();
3180
- if (!handle) {
3181
- throw new RenderDeviceError("Failed to allocate WebGL fallback texture", "WEBGL_ALLOCATION_FAILED");
3182
- }
3183
- this.stateCache.invalidate();
3184
- this.gl.bindTexture(this.gl.TEXTURE_2D, handle);
3185
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
3186
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
3187
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
3188
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
3189
- 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]));
3190
- this.fallbackTexture = handle;
3191
- return handle;
3192
- }
3193
- getFallbackCubeTextureHandle() {
3194
- if (this.fallbackCubeTexture) {
3195
- return this.fallbackCubeTexture;
3196
- }
3197
- const handle = this.gl.createTexture();
3198
- if (!handle) {
3199
- throw new RenderDeviceError("Failed to allocate WebGL fallback cube texture", "WEBGL_ALLOCATION_FAILED");
3200
- }
3201
- this.stateCache.invalidate();
3202
- this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP, handle);
3203
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
3204
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
3205
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
3206
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
3207
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_R, this.gl.CLAMP_TO_EDGE);
3208
- const pixel = new Uint8Array([255, 255, 255, 255]);
3209
- for (const face of WEBGL_CUBE_FACES) {
3210
- this.gl.texImage2D(this.cubeFaceTarget(face), 0, this.gl.RGBA, 1, 1, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, pixel);
3211
- }
3212
- this.fallbackCubeTexture = handle;
3213
- return handle;
3214
- }
3215
- getTextureHandle(texture) {
3216
- this.releaseDisposedTextureHandles();
3217
- if (texture.disposed) {
3218
- throw new RenderDeviceError("Texture is disposed", "DISPOSED_RESOURCE", { label: texture.label });
3219
- }
3220
- const cached = this.textures.get(texture);
3221
- if (cached) {
3222
- return cached;
3223
- }
3224
- const handle = this.gl.createTexture();
3225
- if (!handle) {
3226
- throw new RenderDeviceError("Failed to allocate WebGL texture", "WEBGL_ALLOCATION_FAILED", { label: texture.label });
3227
- }
3228
- this.stateCache.invalidate();
3229
- this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false);
3230
- this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
3231
- this.gl.pixelStorei(this.gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this.gl.NONE);
3232
- if (texture.dimension === "cube") {
3233
- this.uploadCubeTexture(texture, handle);
3234
- this.textureUploadModes.set(texture, "cube");
3235
- this.textures.set(texture, handle);
3236
- return handle;
3237
- }
3238
- this.gl.bindTexture(this.gl.TEXTURE_2D, handle);
3239
- if (isCompressedTextureFormat(texture.format)) {
3240
- const compressed = this.resolveCompressedTextureFormat(texture.format);
3241
- if (compressed) {
3242
- const uploadLevels = completeUploadLevels(texture.textureLevels);
3243
- for (const [levelIndex, level] of uploadLevels.entries()) {
3244
- this.gl.compressedTexImage2D(this.gl.TEXTURE_2D, levelIndex, compressed.internalFormat, level.width, level.height, 0, level.data);
3245
- }
3246
- const compressedUploadError = this.readError();
3247
- if (!compressedUploadError) {
3248
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_BASE_LEVEL, 0);
3249
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAX_LEVEL, uploadLevels.length - 1);
3250
- this.textureUploadModes.set(texture, "compressed");
3251
- this.textures.set(texture, handle);
3252
- return handle;
3253
- }
3254
- }
3255
- const fallbackLevels = completeUploadLevels(texture.fallbackTextureLevels);
3256
- if (fallbackLevels.length === 0) {
3257
- this.gl.deleteTexture(handle);
3258
- throw new RenderDeviceError("Compressed texture format is not supported and no RGBA8 fallback data was provided", "COMPRESSED_TEXTURE_UNSUPPORTED", {
3259
- label: texture.label,
3260
- format: texture.format
3261
- });
3262
- }
3263
- this.uploadRgba8FallbackTexture(texture, fallbackLevels);
3264
- this.textureUploadModes.set(texture, "fallback");
3265
- this.textures.set(texture, handle);
3266
- return handle;
3267
- }
3268
- if (texture.format === "depth24") {
3269
- throw new RenderDeviceError("Depth textures cannot be uploaded to WebGL2 color samplers", "UNSUPPORTED_TEXTURE_FORMAT", {
3270
- label: texture.label,
3271
- format: texture.format
3272
- });
3273
- }
3274
- if (texture.source) {
3275
- this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.rgba8TextureInternalFormat(texture), this.gl.RGBA, this.gl.UNSIGNED_BYTE, texture.source);
3276
- this.gl.generateMipmap(this.gl.TEXTURE_2D);
3277
- }
3278
- else if (texture.mipLevels.length > 0) {
3279
- const uploadFormat = this.textureUploadFormat(texture);
3280
- const uploadLevels = completeUploadLevels(texture.textureLevels);
3281
- for (const [levelIndex, level] of uploadLevels.entries()) {
3282
- this.gl.texImage2D(this.gl.TEXTURE_2D, levelIndex, uploadFormat.internalFormat, level.width, level.height, 0, uploadFormat.format, uploadFormat.type, texturePixelUploadData(level.data, texture.format));
3283
- }
3284
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_BASE_LEVEL, 0);
3285
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAX_LEVEL, uploadLevels.length - 1);
3286
- }
3287
- else {
3288
- const uploadFormat = this.textureUploadFormat(texture);
3289
- 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);
3290
- // Float colour formats are not guaranteed mipmap-filterable in WebGL2:
3291
- // RGBA32F/RGBA16F are only linear-filterable with OES_texture_float_linear, and
3292
- // generateMipmap on a non-filterable format raises INVALID_OPERATION. Data
3293
- // textures such as joint palettes are point-sampled with texelFetch and never
3294
- // need mips, so skip generation and pin the level range instead.
3295
- if (isFloatColorTextureFormat(texture.format)) {
3296
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_BASE_LEVEL, 0);
3297
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAX_LEVEL, 0);
3298
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
3299
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
3300
- }
3301
- else {
3302
- this.gl.generateMipmap(this.gl.TEXTURE_2D);
3303
- }
3304
- }
3305
- this.textureUploadModes.set(texture, texture.format);
3306
- this.textures.set(texture, handle);
3307
- return handle;
3308
- }
3309
- uploadCubeTexture(texture, handle) {
3310
- this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP, handle);
3311
- const uploadFormat = this.textureUploadFormat(texture);
3312
- for (const face of texture.cubeFaces) {
3313
- const uploadLevels = completeUploadLevels(face.mipLevels);
3314
- for (const [levelIndex, level] of uploadLevels.entries()) {
3315
- this.gl.texImage2D(this.cubeFaceTarget(face.face), levelIndex, uploadFormat.internalFormat, level.width, level.height, 0, uploadFormat.format, uploadFormat.type, texturePixelUploadData(level.data, texture.format));
3316
- }
3317
- }
3318
- const firstFaceLevels = completeUploadLevels(texture.cubeFaces[0]?.mipLevels ?? []);
3319
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_BASE_LEVEL, 0);
3320
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_MAX_LEVEL, Math.max(0, firstFaceLevels.length - 1));
3321
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
3322
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
3323
- this.gl.texParameteri(this.gl.TEXTURE_CUBE_MAP, this.gl.TEXTURE_WRAP_R, this.gl.CLAMP_TO_EDGE);
3324
- }
3325
- uploadRgba8FallbackTexture(texture, fallbackLevels) {
3326
- const internalFormat = this.rgba8TextureInternalFormat(texture);
3327
- for (const [levelIndex, level] of fallbackLevels.entries()) {
3328
- 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"));
3329
- }
3330
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_BASE_LEVEL, 0);
3331
- this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAX_LEVEL, fallbackLevels.length - 1);
3332
- }
3333
- cubeFaceTarget(face) {
3334
- switch (face) {
3335
- case "px": return this.gl.TEXTURE_CUBE_MAP_POSITIVE_X;
3336
- case "nx": return this.gl.TEXTURE_CUBE_MAP_NEGATIVE_X;
3337
- case "py": return this.gl.TEXTURE_CUBE_MAP_POSITIVE_Y;
3338
- case "ny": return this.gl.TEXTURE_CUBE_MAP_NEGATIVE_Y;
3339
- case "pz": return this.gl.TEXTURE_CUBE_MAP_POSITIVE_Z;
3340
- case "nz": return this.gl.TEXTURE_CUBE_MAP_NEGATIVE_Z;
3341
- }
3342
- }
3343
- rgba8TextureInternalFormat(texture) {
3344
- return texture.colorSpace === "srgb" ? this.gl.SRGB8_ALPHA8 : this.gl.RGBA;
3345
- }
3346
- textureUploadFormat(texture) {
3347
- if (texture.format === "rgba8") {
3348
- return { internalFormat: this.rgba8TextureInternalFormat(texture), format: this.gl.RGBA, type: this.gl.UNSIGNED_BYTE };
3349
- }
3350
- if (texture.colorSpace === "srgb") {
3351
- throw new RenderDeviceError("Floating-point texture uploads must use linear colorSpace", "UNSUPPORTED_TEXTURE_FORMAT", {
3352
- label: texture.label,
3353
- format: texture.format,
3354
- colorSpace: texture.colorSpace
3355
- });
3356
- }
3357
- if (texture.format === "rgba16f") {
3358
- return { internalFormat: this.gl.RGBA16F, format: this.gl.RGBA, type: this.gl.HALF_FLOAT };
3359
- }
3360
- if (texture.format === "rgba32f") {
3361
- return { internalFormat: this.gl.RGBA32F, format: this.gl.RGBA, type: this.gl.FLOAT };
3362
- }
3363
- throw new RenderDeviceError("Unsupported texture upload format", "UNSUPPORTED_TEXTURE_FORMAT", {
3364
- label: texture.label,
3365
- format: texture.format
3366
- });
3367
- }
3368
- resolveRenderTargetFormat(format) {
3369
- if (format === "rgba8") {
3370
- return { internalFormat: this.gl.RGBA, type: this.gl.UNSIGNED_BYTE };
3371
- }
3372
- if (!this.gl.getExtension("EXT_color_buffer_float")) {
3373
- throw new RenderDeviceError("Floating-point color render targets require EXT_color_buffer_float", "HDR_RENDER_TARGET_UNSUPPORTED", { format });
3374
- }
3375
- if (format === "rgba16f") {
3376
- return { internalFormat: this.gl.RGBA16F, type: this.gl.HALF_FLOAT };
3377
- }
3378
- return { internalFormat: this.gl.RGBA32F, type: this.gl.FLOAT };
3379
- }
3380
- releaseDisposedTextureHandles() {
3381
- for (const [texture, handle] of [...this.textures]) {
3382
- if (texture.disposed) {
3383
- this.gl.deleteTexture(handle);
3384
- this.textures.delete(texture);
3385
- this.textureUploadModes.delete(texture);
3386
- this.releasedTextureHandles += 1;
3387
- }
3388
- }
3389
- }
3390
- resolveCompressedTextureFormat(format) {
3391
- switch (format) {
3392
- case "bc1-rgba-unorm": {
3393
- const extension = this.gl.getExtension("WEBGL_compressed_texture_s3tc");
3394
- return extension ? { internalFormat: extension.COMPRESSED_RGBA_S3TC_DXT1_EXT } : null;
3395
- }
3396
- case "bc3-rgba-unorm": {
3397
- const extension = this.gl.getExtension("WEBGL_compressed_texture_s3tc");
3398
- return extension ? { internalFormat: extension.COMPRESSED_RGBA_S3TC_DXT5_EXT } : null;
3399
- }
3400
- case "etc2-rgba8unorm":
3401
- return { internalFormat: 0x9278 };
3402
- case "astc-4x4-rgba-unorm": {
3403
- const extension = this.gl.getExtension("WEBGL_compressed_texture_astc");
3404
- return extension ? { internalFormat: extension.COMPRESSED_RGBA_ASTC_4x4_KHR } : null;
3405
- }
3406
- }
3407
- }
3408
- magFilter(filter) {
3409
- return filter === "nearest" ? this.gl.NEAREST : this.gl.LINEAR;
3410
- }
3411
- minFilter(filter) {
3412
- switch (filter) {
3413
- case "nearest":
3414
- return this.gl.NEAREST;
3415
- case "linear":
3416
- return this.gl.LINEAR;
3417
- case "nearest-mipmap-nearest":
3418
- return this.gl.NEAREST_MIPMAP_NEAREST;
3419
- case "linear-mipmap-nearest":
3420
- return this.gl.LINEAR_MIPMAP_NEAREST;
3421
- case "nearest-mipmap-linear":
3422
- return this.gl.NEAREST_MIPMAP_LINEAR;
3423
- case "linear-mipmap-linear":
3424
- return this.gl.LINEAR_MIPMAP_LINEAR;
3425
- }
3426
- }
3427
- addressMode(mode) {
3428
- if (mode === "repeat")
3429
- return this.gl.REPEAT;
3430
- if (mode === "mirror-repeat")
3431
- return this.gl.MIRRORED_REPEAT;
3432
- return this.gl.CLAMP_TO_EDGE;
3433
- }
3434
- bindVertexFormat(shader, format) {
3435
- const boundLocations = new Set();
3436
- for (const attribute of format.attributes) {
3437
- const location = this.resolveAttributeLocation(shader, attribute);
3438
- if (location < 0) {
3439
- continue;
3440
- }
3441
- if (attribute.type !== "float32") {
3442
- throw new RenderDeviceError("Unsupported vertex attribute type", "UNSUPPORTED_VERTEX_ATTRIBUTE", {
3443
- attribute: attribute.shaderName,
3444
- type: attribute.type
3445
- });
3446
- }
3447
- boundLocations.add(location);
3448
- this.gl.enableVertexAttribArray(location);
3449
- this.gl.vertexAttribDivisor(location, 0);
3450
- this.gl.vertexAttribPointer(location, attribute.components, this.gl.FLOAT, attribute.normalized, format.stride, attribute.offset);
3451
- }
3452
- return boundLocations;
3453
- }
3454
- bindVertexArrayForCommand(command, shader, vertexBuffer) {
3455
- const indexBuffer = command.indexBuffer ? this.requireBuffer(command.indexBuffer) : undefined;
3456
- const key = this.vertexArrayCacheKey(command, shader, vertexBuffer, indexBuffer);
3457
- const cached = this.vertexArrayCache.get(key);
3458
- if (cached) {
3459
- this.stateCache.bindVertexArray(cached.handle, () => this.gl.bindVertexArray(cached.handle));
3460
- return cached;
3461
- }
3462
- const handle = this.gl.createVertexArray();
3463
- if (!handle) {
3464
- throw new RenderDeviceError("Failed to allocate WebGL vertex array", "WEBGL_ALLOCATION_FAILED");
3465
- }
3466
- this.vertexArrayCreateCount += 1;
3467
- this.stateCache.bindVertexArray(handle, () => this.gl.bindVertexArray(handle));
3468
- this.stateCache.bindBuffer(this.gl.ARRAY_BUFFER, vertexBuffer.handle, () => this.gl.bindBuffer(this.gl.ARRAY_BUFFER, vertexBuffer.handle));
3469
- const boundLocations = this.bindVertexFormat(shader, command.vertexFormat);
3470
- if (command.instanceAttributes && command.instanceAttributes.length > 0) {
3471
- this.bindInstanceAttributes(shader, command.instanceAttributes, boundLocations);
3472
- }
3473
- if (indexBuffer) {
3474
- this.stateCache.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, indexBuffer.handle, () => this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, indexBuffer.handle));
3475
- }
3476
- this.disableUnboundVertexAttributes(boundLocations);
3477
- this.applyDefaultAttributes(shader, boundLocations);
3478
- const entry = { key, handle, boundLocations };
3479
- this.vertexArrayCache.set(key, entry);
3480
- return entry;
3481
- }
3482
- bindNoVertexArray() {
3483
- this.stateCache.bindVertexArray(null, () => this.gl.bindVertexArray(null));
3484
- }
3485
- vertexArrayCacheKey(command, shader, vertexBuffer, indexBuffer) {
3486
- const instanceKey = (command.instanceAttributes ?? []).map((attribute) => {
3487
- const buffer = this.requireBuffer(attribute.buffer);
3488
- return `${attribute.shaderName}:${buffer.id}:${attribute.components}:${attribute.offset}:${attribute.stride}:${attribute.normalized === true ? 1 : 0}:${attribute.divisor ?? 1}`;
3489
- }).join(",");
3490
- return [
3491
- shader.id,
3492
- vertexBuffer.id,
3493
- this.vertexFormatId(command.vertexFormat),
3494
- indexBuffer?.id ?? 0,
3495
- instanceKey
3496
- ].join("|");
3497
- }
3498
- vertexFormatId(format) {
3499
- const existing = this.vertexFormatIds.get(format);
3500
- if (existing !== undefined)
3501
- return existing;
3502
- const next = this.nextVertexFormatId;
3503
- this.nextVertexFormatId += 1;
3504
- this.vertexFormatIds.set(format, next);
3505
- return next;
3506
- }
3507
- bindInstanceAttributes(shader, attributes, boundLocations) {
3508
- for (const attribute of attributes) {
3509
- const location = shader.reflection.attributes.get(attribute.shaderName);
3510
- if (location === undefined || location < 0) {
3511
- continue;
3512
- }
3513
- if (![1, 2, 3, 4].includes(attribute.components)) {
3514
- throw new RenderDeviceError("Instance vertex attribute components must be 1, 2, 3, or 4", "INVALID_DRAW_COMMAND", {
3515
- attribute: attribute.shaderName,
3516
- components: attribute.components
3517
- });
3518
- }
3519
- if (!Number.isInteger(attribute.offset) || attribute.offset < 0 || attribute.offset % 4 !== 0) {
3520
- throw new RenderDeviceError("Instance vertex attribute offset must be non-negative and 4-byte aligned", "INVALID_DRAW_COMMAND", {
3521
- attribute: attribute.shaderName,
3522
- offset: attribute.offset
3523
- });
3524
- }
3525
- if (!Number.isInteger(attribute.stride) || attribute.stride <= 0 || attribute.stride % 4 !== 0) {
3526
- throw new RenderDeviceError("Instance vertex attribute stride must be positive and 4-byte aligned", "INVALID_DRAW_COMMAND", {
3527
- attribute: attribute.shaderName,
3528
- stride: attribute.stride
3529
- });
3530
- }
3531
- if (attribute.offset + attribute.components * 4 > attribute.stride) {
3532
- throw new RenderDeviceError("Instance vertex attribute range must fit inside its stride", "INVALID_DRAW_COMMAND", {
3533
- attribute: attribute.shaderName,
3534
- offset: attribute.offset,
3535
- components: attribute.components,
3536
- stride: attribute.stride
3537
- });
3538
- }
3539
- const buffer = this.requireBuffer(attribute.buffer);
3540
- boundLocations.add(location);
3541
- this.stateCache.bindBuffer(this.gl.ARRAY_BUFFER, buffer.handle, () => this.gl.bindBuffer(this.gl.ARRAY_BUFFER, buffer.handle));
3542
- this.gl.enableVertexAttribArray(location);
3543
- this.gl.vertexAttribPointer(location, attribute.components, this.gl.FLOAT, attribute.normalized ?? false, attribute.stride, attribute.offset);
3544
- this.gl.vertexAttribDivisor(location, attribute.divisor ?? 1);
3545
- }
3546
- }
3547
- resolveAttributeLocation(shader, attribute) {
3548
- const reflected = shader.reflection.attributes.get(attribute.shaderName);
3549
- if (reflected !== undefined) {
3550
- return reflected;
3551
- }
3552
- return shader.reflection.attributes.get(attribute.semantic) ?? -1;
3553
- }
3554
- applyDefaultAttributes(shader, boundLocations) {
3555
- const colorLocation = shader.reflection.attributes.get("a_color") ?? shader.reflection.attributes.get("color");
3556
- if (colorLocation !== undefined && colorLocation >= 0 && !boundLocations.has(colorLocation)) {
3557
- this.gl.disableVertexAttribArray(colorLocation);
3558
- this.gl.vertexAttribDivisor(colorLocation, 0);
3559
- this.gl.vertexAttrib4f(colorLocation, 1, 1, 1, 1);
3560
- }
3561
- const tangentLocation = shader.reflection.attributes.get("a_tangent") ?? shader.reflection.attributes.get("tangent");
3562
- if (tangentLocation !== undefined && tangentLocation >= 0 && !boundLocations.has(tangentLocation)) {
3563
- this.gl.disableVertexAttribArray(tangentLocation);
3564
- this.gl.vertexAttribDivisor(tangentLocation, 0);
3565
- this.gl.vertexAttrib4f(tangentLocation, 1, 0, 0, 1);
3566
- }
3567
- const uv1Location = shader.reflection.attributes.get("a_uv1") ?? shader.reflection.attributes.get("uv1");
3568
- if (uv1Location !== undefined && uv1Location >= 0 && !boundLocations.has(uv1Location)) {
3569
- this.gl.disableVertexAttribArray(uv1Location);
3570
- this.gl.vertexAttribDivisor(uv1Location, 0);
3571
- this.gl.vertexAttrib2f(uv1Location, 0, 0);
3572
- }
3573
- const instanceColorLocation = shader.reflection.attributes.get("a_instanceColor") ?? shader.reflection.attributes.get("instanceColor");
3574
- if (instanceColorLocation !== undefined && instanceColorLocation >= 0 && !boundLocations.has(instanceColorLocation)) {
3575
- this.gl.disableVertexAttribArray(instanceColorLocation);
3576
- this.gl.vertexAttribDivisor(instanceColorLocation, 0);
3577
- this.gl.vertexAttrib4f(instanceColorLocation, 1, 1, 1, 1);
3578
- }
3579
- }
3580
- disableUnboundVertexAttributes(boundLocations) {
3581
- for (let location = 0; location < this.maxVertexAttributes; location += 1) {
3582
- if (!boundLocations.has(location)) {
3583
- this.gl.disableVertexAttribArray(location);
3584
- this.gl.vertexAttribDivisor(location, 0);
3585
- }
3586
- }
3587
- }
3588
- primitive(topology) {
3589
- if (topology === "lines")
3590
- return this.gl.LINES;
3591
- if (topology === "points")
3592
- return this.gl.POINTS;
3593
- return this.gl.TRIANGLES;
3594
- }
3595
- applyRenderState(state) {
3596
- const renderState = state ?? {
3597
- depthTest: true,
3598
- depthWrite: true,
3599
- cullMode: "back",
3600
- blend: false,
3601
- depthCompare: "less-equal",
3602
- colorWrite: [true, true, true, true],
3603
- scissor: null,
3604
- polygonOffset: null,
3605
- stencil: null
3606
- };
3607
- this.stateCache.setEnabled(this.gl.DEPTH_TEST, renderState.depthTest, () => {
3608
- if (renderState.depthTest)
3609
- this.gl.enable(this.gl.DEPTH_TEST);
3610
- else
3611
- this.gl.disable(this.gl.DEPTH_TEST);
3612
- });
3613
- this.stateCache.depthMask(renderState.depthWrite, () => this.gl.depthMask(renderState.depthWrite));
3614
- this.stateCache.depthFunc(renderState.depthCompare === "always" ? this.gl.ALWAYS : this.gl.LEQUAL, () => this.gl.depthFunc(renderState.depthCompare === "always" ? this.gl.ALWAYS : this.gl.LEQUAL));
3615
- const colorWrite = renderState.colorWrite ?? [true, true, true, true];
3616
- this.stateCache.colorMask(colorWrite[0], colorWrite[1], colorWrite[2], colorWrite[3], () => this.gl.colorMask(colorWrite[0], colorWrite[1], colorWrite[2], colorWrite[3]));
3617
- if (renderState.scissor) {
3618
- this.stateCache.setEnabled(this.gl.SCISSOR_TEST, true, () => this.gl.enable(this.gl.SCISSOR_TEST));
3619
- this.stateCache.scissor(renderState.scissor.x, renderState.scissor.y, renderState.scissor.width, renderState.scissor.height, () => {
3620
- this.gl.scissor(renderState.scissor.x, renderState.scissor.y, renderState.scissor.width, renderState.scissor.height);
3621
- });
3622
- }
3623
- else {
3624
- this.stateCache.setEnabled(this.gl.SCISSOR_TEST, false, () => this.gl.disable(this.gl.SCISSOR_TEST));
3625
- }
3626
- if (renderState.polygonOffset) {
3627
- this.stateCache.setEnabled(this.gl.POLYGON_OFFSET_FILL, true, () => this.gl.enable(this.gl.POLYGON_OFFSET_FILL));
3628
- this.stateCache.polygonOffset(renderState.polygonOffset.factor, renderState.polygonOffset.units, () => this.gl.polygonOffset(renderState.polygonOffset.factor, renderState.polygonOffset.units));
3629
- }
3630
- else {
3631
- this.stateCache.setEnabled(this.gl.POLYGON_OFFSET_FILL, false, () => this.gl.disable(this.gl.POLYGON_OFFSET_FILL));
3632
- }
3633
- if (renderState.stencil) {
3634
- const stencil = renderState.stencil;
3635
- const compare = this.stencilCompare(stencil.compare ?? "always");
3636
- const reference = stencil.reference ?? 0;
3637
- const readMask = stencil.readMask ?? 0xff;
3638
- const writeMask = stencil.writeMask ?? 0xff;
3639
- const fail = this.stencilOperation(stencil.fail ?? "keep");
3640
- const depthFail = this.stencilOperation(stencil.depthFail ?? "keep");
3641
- const depthPass = this.stencilOperation(stencil.depthPass ?? "keep");
3642
- this.stateCache.setEnabled(this.gl.STENCIL_TEST, true, () => this.gl.enable(this.gl.STENCIL_TEST));
3643
- this.stateCache.stencilFunc(compare, reference, readMask, () => this.gl.stencilFunc(compare, reference, readMask));
3644
- this.stateCache.stencilMask(writeMask, () => this.gl.stencilMask(writeMask));
3645
- this.stateCache.stencilOp(fail, depthFail, depthPass, () => this.gl.stencilOp(fail, depthFail, depthPass));
3646
- }
3647
- else {
3648
- this.stateCache.setEnabled(this.gl.STENCIL_TEST, false, () => this.gl.disable(this.gl.STENCIL_TEST));
3649
- }
3650
- if (renderState.cullMode === "none") {
3651
- this.stateCache.setEnabled(this.gl.CULL_FACE, false, () => this.gl.disable(this.gl.CULL_FACE));
3652
- }
3653
- else {
3654
- this.stateCache.setEnabled(this.gl.CULL_FACE, true, () => this.gl.enable(this.gl.CULL_FACE));
3655
- this.stateCache.cullFace(renderState.cullMode === "front" ? this.gl.FRONT : this.gl.BACK, () => this.gl.cullFace(renderState.cullMode === "front" ? this.gl.FRONT : this.gl.BACK));
3656
- }
3657
- if (renderState.blend) {
3658
- this.stateCache.setEnabled(this.gl.BLEND, true, () => this.gl.enable(this.gl.BLEND));
3659
- 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));
3660
- }
3661
- else {
3662
- this.stateCache.setEnabled(this.gl.BLEND, false, () => this.gl.disable(this.gl.BLEND));
3663
- }
3664
- }
3665
- requireBuffer(buffer) {
3666
- if (!(buffer instanceof WebGL2Buffer) || !this.buffers.has(buffer) || buffer.disposed) {
3667
- throw new RenderDeviceError("Buffer is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
3668
- bufferId: buffer.id
3669
- });
3670
- }
3671
- return buffer;
3672
- }
3673
- stencilCompare(compare) {
3674
- switch (compare) {
3675
- case "never": return this.gl.NEVER;
3676
- case "less": return this.gl.LESS;
3677
- case "less-equal": return this.gl.LEQUAL;
3678
- case "greater": return this.gl.GREATER;
3679
- case "greater-equal": return this.gl.GEQUAL;
3680
- case "equal": return this.gl.EQUAL;
3681
- case "not-equal": return this.gl.NOTEQUAL;
3682
- case "always": return this.gl.ALWAYS;
3683
- }
3684
- }
3685
- stencilOperation(operation) {
3686
- switch (operation) {
3687
- case "keep": return this.gl.KEEP;
3688
- case "zero": return this.gl.ZERO;
3689
- case "replace": return this.gl.REPLACE;
3690
- case "increment": return this.gl.INCR;
3691
- case "decrement": return this.gl.DECR;
3692
- case "invert": return this.gl.INVERT;
3693
- case "increment-wrap": return this.gl.INCR_WRAP;
3694
- case "decrement-wrap": return this.gl.DECR_WRAP;
3695
- }
3696
- }
3697
- requireShader(shader) {
3698
- if (!(shader instanceof WebGL2ShaderProgram) || !this.shaders.has(shader) || shader.disposed) {
3699
- throw new RenderDeviceError("Shader is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", {
3700
- shaderId: shader.id
3701
- });
3702
- }
3703
- return shader;
3704
- }
3705
- assertAlive() {
3706
- if (this.disposed) {
3707
- throw new RenderDeviceError("Render device is disposed", "DISPOSED_DEVICE");
3708
- }
3709
- if (this.contextLost) {
3710
- throw new RenderDeviceError("Render context is lost", "CONTEXT_LOST");
3711
- }
3712
- }
3713
- assertFrame() {
3714
- this.assertAlive();
3715
- if (!this.frameActive) {
3716
- throw new RenderDeviceError("No active frame", "NO_ACTIVE_FRAME");
3717
- }
3718
- }
3719
- readError() {
3720
- const error = this.gl.getError();
3721
- return error === this.gl.NO_ERROR ? null : `0x${error.toString(16)}`;
3722
- }
3723
- }
3724
- function numberOption(options, key, fallback) {
3725
- const value = options[key];
3726
- return typeof value === "number" && Number.isFinite(value) ? value : fallback;
3727
- }
3728
- function normalizeNativeBloomOptions(options) {
3729
- const threshold = bloomNumberOption(options, "threshold", 0.75);
3730
- const intensity = bloomNumberOption(options, "intensity", 0.35);
3731
- const radius = bloomNumberOption(options, "radius", 1);
3732
- if (threshold < 0 || threshold > 1) {
3733
- throw new RenderDeviceError("Bloom threshold must be finite and in [0, 1].", "INVALID_POSTPROCESS_OPTIONS", { threshold });
3734
- }
3735
- if (intensity < 0) {
3736
- throw new RenderDeviceError("Bloom intensity must be finite and non-negative.", "INVALID_POSTPROCESS_OPTIONS", { intensity });
3737
- }
3738
- if (!Number.isInteger(radius) || radius < 0 || radius > 16) {
3739
- throw new RenderDeviceError("Bloom radius must be an integer in [0, 16].", "INVALID_POSTPROCESS_OPTIONS", { radius });
3740
- }
3741
- const softKnee = bloomNumberOption(options, "softKnee", 0);
3742
- if (!(softKnee >= 0) || softKnee > 0.5) {
3743
- throw new RenderDeviceError("Bloom softKnee must be finite and in [0, 0.5].", "INVALID_POSTPROCESS_OPTIONS", { softKnee });
3744
- }
3745
- const shoulder = bloomNumberOption(options, "shoulder", 0);
3746
- if (!(shoulder >= 0) || shoulder > 1) {
3747
- throw new RenderDeviceError("Bloom shoulder must be finite and in [0, 1].", "INVALID_POSTPROCESS_OPTIONS", { shoulder });
3748
- }
3749
- let quality;
3750
- try {
3751
- quality = normalizeBloomQualityPreset(options.quality);
3752
- }
3753
- catch {
3754
- throw new RenderDeviceError("Bloom quality must be one of performance|balanced|cinematic.", "INVALID_POSTPROCESS_OPTIONS", { quality: options.quality });
3755
- }
3756
- return { threshold, intensity, radius, quality, softKnee, shoulder };
3757
- }
3758
- function normalizeNativeOutlineOptions(options) {
3759
- const width = outlineNumberOption(options, "width", 1);
3760
- const threshold = outlineNumberOption(options, "threshold", 0.22);
3761
- const opacity = outlineNumberOption(options, "opacity", 0.85);
3762
- const value = options.color;
3763
- const sourceColor = value === undefined ? [255, 188, 64, 255] : value;
3764
- if (!Array.isArray(sourceColor)
3765
- || (sourceColor.length !== 3 && sourceColor.length !== 4)
3766
- || sourceColor.some((channel) => typeof channel !== "number" || !Number.isFinite(channel) || channel < 0 || channel > 255)) {
3767
- throw new RenderDeviceError("Outline color must contain three or four finite channels in [0, 255].", "INVALID_POSTPROCESS_OPTIONS", { color: value });
3768
- }
3769
- if (!Number.isInteger(width) || width < 1 || width > 6) {
3770
- throw new RenderDeviceError("Outline width must be an integer in [1, 6].", "INVALID_POSTPROCESS_OPTIONS", { width });
3771
- }
3772
- if (threshold < 0 || threshold > 4) {
3773
- throw new RenderDeviceError("Outline threshold must be finite and in [0, 4].", "INVALID_POSTPROCESS_OPTIONS", { threshold });
3774
- }
3775
- if (opacity < 0 || opacity > 1) {
3776
- throw new RenderDeviceError("Outline opacity must be finite and in [0, 1].", "INVALID_POSTPROCESS_OPTIONS", { opacity });
3777
- }
3778
- const color = [
3779
- sourceColor[0],
3780
- sourceColor[1],
3781
- sourceColor[2],
3782
- (sourceColor[3] ?? 255)
3783
- ];
3784
- return { width, threshold, opacity, color };
3785
- }
3786
- function normalizeNativeSsaoOptions(options) {
3787
- const radius = ssaoNumberOption(options, "radius", 2);
3788
- const intensity = ssaoNumberOption(options, "intensity", 0.38);
3789
- const bias = ssaoNumberOption(options, "bias", 0.015);
3790
- if (!Number.isInteger(radius) || radius < 1 || radius > 8) {
3791
- throw new RenderDeviceError("SSAO radius must be an integer in [1, 8].", "INVALID_POSTPROCESS_OPTIONS", { radius });
3792
- }
3793
- if (intensity < 0 || intensity > 2) {
3794
- throw new RenderDeviceError("SSAO intensity must be finite and in [0, 2].", "INVALID_POSTPROCESS_OPTIONS", { intensity });
3795
- }
3796
- if (bias < 0 || bias > 0.25) {
3797
- throw new RenderDeviceError("SSAO bias must be finite and in [0, 0.25].", "INVALID_POSTPROCESS_OPTIONS", { bias });
3798
- }
3799
- return { radius, intensity, bias };
3800
1327
  }
3801
1328
  /**
3802
1329
  * Camera depth range for linearizing sampleable GL depth in the native
@@ -3807,185 +1334,12 @@ function normalizeNativeSsaoOptions(options) {
3807
1334
  * keep fixture-unit depth semantics (deterministic reference); the native
3808
1335
  * programs document their GL-depth contract in-shader.
3809
1336
  */
3810
- function normalizeLdrDepthRange(range) {
3811
- const near = range && Number.isFinite(range.near) && range.near > 0 ? range.near : 0.1;
3812
- const far = range && Number.isFinite(range.far) && range.far > near ? range.far : 1000;
3813
- return { near, far };
3814
- }
3815
- function normalizeNativeSsrOptions(options) {
3816
- const intensity = ssrNumberOption(options, "intensity", 0.32);
3817
- const maxDistance = ssrNumberOption(options, "maxDistance", 16);
3818
- if (intensity < 0 || intensity > 2) {
3819
- throw new RenderDeviceError("SSR intensity must be finite and in [0, 2].", "INVALID_POSTPROCESS_OPTIONS", { intensity });
3820
- }
3821
- if (!Number.isInteger(maxDistance) || maxDistance < 1 || maxDistance > 64) {
3822
- throw new RenderDeviceError("SSR maxDistance must be an integer in [1, 64].", "INVALID_POSTPROCESS_OPTIONS", { maxDistance });
3823
- }
3824
- return { intensity, maxDistance };
3825
- }
3826
- function normalizeNativeDepthOfFieldOptions(options) {
3827
- const focusDepth = depthOfFieldNumberOption(options, "focusDepth", 0.5);
3828
- const focusRange = depthOfFieldNumberOption(options, "focusRange", 0.12);
3829
- const maxRadius = depthOfFieldNumberOption(options, "maxRadius", 2);
3830
- if (focusDepth < 0 || focusDepth > 1) {
3831
- throw new RenderDeviceError("Depth-of-field focusDepth must be finite and in [0, 1].", "INVALID_POSTPROCESS_OPTIONS", { focusDepth });
3832
- }
3833
- if (focusRange < 0.001 || focusRange > 1) {
3834
- throw new RenderDeviceError("Depth-of-field focusRange must be finite and in [0.001, 1].", "INVALID_POSTPROCESS_OPTIONS", { focusRange });
3835
- }
3836
- if (!Number.isInteger(maxRadius) || maxRadius < 0 || maxRadius > 8) {
3837
- throw new RenderDeviceError("Depth-of-field maxRadius must be an integer in [0, 8].", "INVALID_POSTPROCESS_OPTIONS", { maxRadius });
3838
- }
3839
- return { focusDepth, focusRange, maxRadius };
3840
- }
3841
- function normalizeNativeMotionBlurOptions(options, width, height) {
3842
- const samples = motionBlurNumberOption(options, "samples", 5);
3843
- const scale = motionBlurNumberOption(options, "scale", 1);
3844
- const value = options.velocity;
3845
- if (!(value instanceof Float32Array) && !Array.isArray(value)) {
3846
- throw new RenderDeviceError("Motion blur requires a velocity Float32Array or number array.", "WEBGL_LDR_POSTPROCESS_VELOCITY_REQUIRED");
3847
- }
3848
- const velocity = value instanceof Float32Array ? value : new Float32Array(value);
3849
- if (velocity.length !== width * height * 2) {
3850
- throw new RenderDeviceError("Motion blur velocity must contain width * height * 2 float samples.", "INVALID_POSTPROCESS_OPTIONS", {
3851
- expectedLength: width * height * 2,
3852
- actualLength: velocity.length
3853
- });
3854
- }
3855
- if (!Number.isInteger(samples) || samples < 2 || samples > 16) {
3856
- throw new RenderDeviceError("Motion blur samples must be an integer in [2, 16].", "INVALID_POSTPROCESS_OPTIONS", { samples });
3857
- }
3858
- if (scale < 0 || scale > 8) {
3859
- throw new RenderDeviceError("Motion blur scale must be finite and in [0, 8].", "INVALID_POSTPROCESS_OPTIONS", { scale });
3860
- }
3861
- return { samples, scale, velocity };
3862
- }
3863
- function normalizeNativeTaaOptions(options, width, height) {
3864
- const blend = taaNumberOption(options, "blend", 0.18);
3865
- const history = options.history;
3866
- if (!(history instanceof Uint8Array)) {
3867
- throw new RenderDeviceError("TAA requires a Uint8Array history buffer.", "WEBGL_LDR_POSTPROCESS_HISTORY_REQUIRED");
3868
- }
3869
- if (history.byteLength !== width * height * 4) {
3870
- throw new RenderDeviceError("TAA history must contain width * height * 4 RGBA bytes.", "INVALID_POSTPROCESS_OPTIONS", {
3871
- expectedLength: width * height * 4,
3872
- actualLength: history.byteLength
3873
- });
3874
- }
3875
- if (blend < 0 || blend > 0.95) {
3876
- throw new RenderDeviceError("TAA blend must be finite and in [0, 0.95].", "INVALID_POSTPROCESS_OPTIONS", { blend });
3877
- }
3878
- return { blend, history };
3879
- }
3880
- function bloomNumberOption(options, key, fallback) {
3881
- const value = options[key];
3882
- if (value === undefined)
3883
- return fallback;
3884
- if (typeof value !== "number" || !Number.isFinite(value)) {
3885
- throw new RenderDeviceError(`Bloom ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3886
- }
3887
- return value;
3888
- }
3889
- function outlineNumberOption(options, key, fallback) {
3890
- const value = options[key];
3891
- if (value === undefined)
3892
- return fallback;
3893
- if (typeof value !== "number" || !Number.isFinite(value)) {
3894
- throw new RenderDeviceError(`Outline ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3895
- }
3896
- return value;
3897
- }
3898
- function ssaoNumberOption(options, key, fallback) {
3899
- const value = options[key];
3900
- if (value === undefined)
3901
- return fallback;
3902
- if (typeof value !== "number" || !Number.isFinite(value)) {
3903
- throw new RenderDeviceError(`SSAO ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3904
- }
3905
- return value;
3906
- }
3907
- function ssrNumberOption(options, key, fallback) {
3908
- const value = options[key];
3909
- if (value === undefined)
3910
- return fallback;
3911
- if (typeof value !== "number" || !Number.isFinite(value)) {
3912
- throw new RenderDeviceError(`SSR ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3913
- }
3914
- return value;
3915
- }
3916
- function depthOfFieldNumberOption(options, key, fallback) {
3917
- const value = options[key];
3918
- if (value === undefined)
3919
- return fallback;
3920
- if (typeof value !== "number" || !Number.isFinite(value)) {
3921
- throw new RenderDeviceError(`Depth-of-field ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3922
- }
3923
- return value;
3924
- }
3925
- function motionBlurNumberOption(options, key, fallback) {
3926
- const value = options[key];
3927
- if (value === undefined)
3928
- return fallback;
3929
- if (typeof value !== "number" || !Number.isFinite(value)) {
3930
- throw new RenderDeviceError(`Motion blur ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3931
- }
3932
- return value;
3933
- }
3934
- function taaNumberOption(options, key, fallback) {
3935
- const value = options[key];
3936
- if (value === undefined)
3937
- return fallback;
3938
- if (typeof value !== "number" || !Number.isFinite(value)) {
3939
- throw new RenderDeviceError(`TAA ${key} must be a finite number.`, "INVALID_POSTPROCESS_OPTIONS", { key, value });
3940
- }
3941
- return value;
3942
- }
3943
- function stringOption(options, key, fallback) {
3944
- const value = options[key];
3945
- return typeof value === "string" ? value : fallback;
3946
- }
3947
- function colorSpaceId(value) {
3948
- return value === "srgb" ? 1 : 0;
3949
- }
3950
- function toneMappingOperatorId(value) {
3951
- if (value === "linear")
3952
- return 0;
3953
- if (value === "reinhard")
3954
- return 1;
3955
- if (value === "aces")
3956
- return 2;
3957
- if (value === "filmic")
3958
- return 3;
3959
- if (value === "uncharted2")
3960
- return 4;
3961
- if (value === "agx")
3962
- return 5;
3963
- return 6;
3964
- }
3965
- function completeUploadLevels(levels) {
3966
- const uploadLevels = [];
3967
- for (const level of levels) {
3968
- if (uploadLevels.length === 0) {
3969
- uploadLevels.push(level);
3970
- continue;
3971
- }
3972
- const previous = uploadLevels[uploadLevels.length - 1];
3973
- const expectedWidth = Math.max(1, Math.floor(previous.width / 2));
3974
- const expectedHeight = Math.max(1, Math.floor(previous.height / 2));
3975
- if (level.width !== expectedWidth || level.height !== expectedHeight) {
3976
- break;
3977
- }
3978
- uploadLevels.push(level);
3979
- }
3980
- return uploadLevels;
3981
- }
3982
- function texturePixelUploadData(data, format) {
3983
- if (format === "rgba16f" && data instanceof Uint16Array)
3984
- return data;
3985
- if (format === "rgba32f" && data instanceof Float32Array)
3986
- return data;
3987
- if (format === "rgba8" && (data instanceof Uint8Array || data instanceof Uint8ClampedArray))
3988
- return data;
3989
- throw new RenderDeviceError("Texture pixel data type does not match texture format", "UNSUPPORTED_TEXTURE_FORMAT", { format });
1337
+ /** Next animation frame when available (browser), else a macrotask. */
1338
+ function scheduleParallelCompilePoll(poll) {
1339
+ const raf = globalThis.requestAnimationFrame;
1340
+ if (typeof raf === "function")
1341
+ raf(poll);
1342
+ else
1343
+ setTimeout(poll, 0);
3990
1344
  }
3991
1345
  //# sourceMappingURL=WebGL2Device.js.map