@carbonenginejs/runtime 0.1.0-alpha.0 → 0.1.0-alpha.1

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 (929) hide show
  1. package/README.md +58 -125
  2. package/dist/audio/index.js +8 -1
  3. package/dist/audio/index.js.map +1 -1
  4. package/dist/audio/trinity/audio/AudActionLog/AudActionLogCB.js +84 -0
  5. package/dist/audio/trinity/audio/AudActionLog/AudActionLogCB.js.map +1 -0
  6. package/dist/audio/trinity/audio/AudActionLog/AudActionRecord.js +14 -0
  7. package/dist/audio/trinity/audio/AudActionLog/AudActionRecord.js.map +1 -0
  8. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordExecuteActionOnPlayingID.js +26 -0
  9. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordExecuteActionOnPlayingID.js.map +1 -0
  10. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordPostEvent.js +27 -0
  11. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordPostEvent.js.map +1 -0
  12. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetRTPC.js +27 -0
  13. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetRTPC.js.map +1 -0
  14. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetState.js +25 -0
  15. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetState.js.map +1 -0
  16. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetSwitch.js +26 -0
  17. package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetSwitch.js.map +1 -0
  18. package/dist/audio/trinity/audio/AudActionLog/IAudActionLog.js +58 -0
  19. package/dist/audio/trinity/audio/AudActionLog/IAudActionLog.js.map +1 -0
  20. package/dist/audio/trinity/audio/AudManager.js +1 -1
  21. package/dist/audio/trinity/audio/AudManager.js.map +1 -1
  22. package/dist/audio/trinity/audio/{AudObstructionOcclusion.js → AudObstructionOcclusion/AudObstructionOcclusion.js} +8 -52
  23. package/dist/audio/trinity/audio/AudObstructionOcclusion/AudObstructionOcclusion.js.map +1 -0
  24. package/dist/audio/trinity/audio/AudObstructionOcclusion/EmitterState.js +17 -0
  25. package/dist/audio/trinity/audio/AudObstructionOcclusion/EmitterState.js.map +1 -0
  26. package/dist/audio/trinity/audio/AudObstructionOcclusion/FadingValue.js +46 -0
  27. package/dist/audio/trinity/audio/AudObstructionOcclusion/FadingValue.js.map +1 -0
  28. package/dist/audio/trinity/index.js +8 -1
  29. package/dist/audio/trinity/index.js.map +1 -1
  30. package/dist/character/CjsCharacterAppearanceConstruction.js +5 -0
  31. package/dist/character/CjsCharacterAppearanceConstruction.js.map +1 -1
  32. package/dist/character/CjsCharacterAppearanceManager.js +14 -0
  33. package/dist/character/CjsCharacterAppearanceManager.js.map +1 -1
  34. package/dist/character/CjsCharacterFoundationConstruction.js +5 -0
  35. package/dist/character/CjsCharacterFoundationConstruction.js.map +1 -1
  36. package/dist/character/CjsCharacterTexturePolicy.js +5 -0
  37. package/dist/character/CjsCharacterTexturePolicy.js.map +1 -1
  38. package/dist/character/gles/CjsCharacterGlesAppearanceAL.js +17 -0
  39. package/dist/character/gles/CjsCharacterGlesAppearanceAL.js.map +1 -1
  40. package/dist/character/gles/CjsCharacterGlesAtlasRenderer.js +2 -0
  41. package/dist/character/gles/CjsCharacterGlesAtlasRenderer.js.map +1 -1
  42. package/dist/character/gles/CjsCharacterGlesFoundationTranslator.js +5 -0
  43. package/dist/character/gles/CjsCharacterGlesFoundationTranslator.js.map +1 -1
  44. package/dist/character/gles/CjsCharacterGlesLegacyConstructionTranslator.js +5 -0
  45. package/dist/character/gles/CjsCharacterGlesLegacyConstructionTranslator.js.map +1 -1
  46. package/dist/character/gles/CjsCharacterGlesMorphDeformation.js +2 -0
  47. package/dist/character/gles/CjsCharacterGlesMorphDeformation.js.map +1 -1
  48. package/dist/character/gles/CjsCharacterGlesPaletteCompatibility.js +5 -0
  49. package/dist/character/gles/CjsCharacterGlesPaletteCompatibility.js.map +1 -1
  50. package/dist/character/gles/CjsCharacterGlesTriangleCoverage.js +5 -0
  51. package/dist/character/gles/CjsCharacterGlesTriangleCoverage.js.map +1 -1
  52. package/dist/character/webgl2/CjsCharacterWebgl2EffectRouter.js +9 -0
  53. package/dist/character/webgl2/CjsCharacterWebgl2EffectRouter.js.map +1 -1
  54. package/dist/global/blue/CjsScriptCallback.js +142 -0
  55. package/dist/global/blue/CjsScriptCallback.js.map +1 -0
  56. package/dist/global/blue/index.js +2 -0
  57. package/dist/global/blue/index.js.map +1 -0
  58. package/dist/global/consts/renderContext/formats.js +51 -1
  59. package/dist/global/consts/renderContext/formats.js.map +1 -1
  60. package/dist/global/consts/renderContext/index.js +2 -2
  61. package/dist/global/consts/renderContext/renderStates.js +16 -1
  62. package/dist/global/consts/renderContext/renderStates.js.map +1 -1
  63. package/dist/global/contracts/index.js +0 -1
  64. package/dist/global/contracts/index.js.map +1 -1
  65. package/dist/global/index.js +4 -3
  66. package/dist/global/index.js.map +1 -1
  67. package/dist/global/math/index.js +2 -0
  68. package/dist/global/math/index.js.map +1 -1
  69. package/dist/global/math/mesh.js +70 -16
  70. package/dist/global/math/mesh.js.map +1 -1
  71. package/dist/global/math/noise.js +47 -68
  72. package/dist/global/math/noise.js.map +1 -1
  73. package/dist/global/math/pool.js +18 -3
  74. package/dist/global/math/pool.js.map +1 -1
  75. package/dist/global/math/random.js +52 -0
  76. package/dist/global/math/random.js.map +1 -0
  77. package/dist/global/math/tri3.js +18 -4
  78. package/dist/global/math/tri3.js.map +1 -1
  79. package/dist/global/utils/bytes.js +22 -4
  80. package/dist/global/utils/bytes.js.map +1 -1
  81. package/dist/global/utils/checksum.js +80 -0
  82. package/dist/global/utils/checksum.js.map +1 -0
  83. package/dist/global/utils/errors/CjsCancellationError.js +36 -0
  84. package/dist/global/utils/errors/CjsCancellationError.js.map +1 -0
  85. package/dist/global/utils/errors/CjsError.js +21 -52
  86. package/dist/global/utils/errors/CjsError.js.map +1 -1
  87. package/dist/global/utils/errors/abort.js +1 -1
  88. package/dist/global/utils/errors/abort.js.map +1 -1
  89. package/dist/global/utils/errors/index.js +2 -1
  90. package/dist/global/utils/errors/index.js.map +1 -1
  91. package/dist/global/utils/index.js +4 -2
  92. package/dist/global/utils/index.js.map +1 -1
  93. package/dist/index.js +95 -35
  94. package/dist/index.js.map +1 -1
  95. package/dist/input/Tr2MainWindow.js +7 -9
  96. package/dist/input/Tr2MainWindow.js.map +1 -1
  97. package/dist/resource/CjsResMan.js +33 -39
  98. package/dist/resource/CjsResMan.js.map +1 -1
  99. package/dist/resource/CjsResource.js +19 -5
  100. package/dist/resource/CjsResource.js.map +1 -1
  101. package/dist/resource/audio/AudioGeometryResData.js +22 -27
  102. package/dist/resource/audio/AudioGeometryResData.js.map +1 -1
  103. package/dist/resource/audio/CjsAudioRes.js +4 -5
  104. package/dist/resource/audio/CjsAudioRes.js.map +1 -1
  105. package/dist/resource/format/CjsBitReader.js +263 -0
  106. package/dist/resource/format/CjsBitReader.js.map +1 -0
  107. package/dist/resource/format/CjsByteReader.js +130 -125
  108. package/dist/resource/format/CjsByteReader.js.map +1 -1
  109. package/dist/resource/format/CjsFormat.js +11 -4
  110. package/dist/resource/format/CjsFormat.js.map +1 -1
  111. package/dist/resource/format/CjsFormatError.js +37 -1
  112. package/dist/resource/format/CjsFormatError.js.map +1 -1
  113. package/dist/resource/format/CjsResourceProbe.js +41 -37
  114. package/dist/resource/format/CjsResourceProbe.js.map +1 -1
  115. package/dist/resource/format/carbonRecordGuard.js +33 -0
  116. package/dist/resource/format/carbonRecordGuard.js.map +1 -0
  117. package/dist/resource/format/imageSignatures.js +202 -0
  118. package/dist/resource/format/imageSignatures.js.map +1 -0
  119. package/dist/resource/format/index.js +2 -1
  120. package/dist/resource/format/index.js.map +1 -1
  121. package/dist/resource/format/jsonPolicies.js +180 -0
  122. package/dist/resource/format/jsonPolicies.js.map +1 -0
  123. package/dist/resource/formats/black/core/helpers.js +18 -29
  124. package/dist/resource/formats/black/core/helpers.js.map +1 -1
  125. package/dist/resource/formats/bnk/CjsBnkFormat.js +4 -3
  126. package/dist/resource/formats/bnk/CjsBnkFormat.js.map +1 -1
  127. package/dist/resource/formats/bnk/core/WwiseCursor.js +218 -0
  128. package/dist/resource/formats/bnk/core/WwiseCursor.js.map +1 -0
  129. package/dist/resource/formats/bnk/core/busNodes.js +2 -1
  130. package/dist/resource/formats/bnk/core/busNodes.js.map +1 -1
  131. package/dist/resource/formats/bnk/core/effectNodes.js +2 -1
  132. package/dist/resource/formats/bnk/core/effectNodes.js.map +1 -1
  133. package/dist/resource/formats/bnk/core/eventAction.js +15 -93
  134. package/dist/resource/formats/bnk/core/eventAction.js.map +1 -1
  135. package/dist/resource/formats/bnk/core/globalSettings.js +19 -94
  136. package/dist/resource/formats/bnk/core/globalSettings.js.map +1 -1
  137. package/dist/resource/formats/bnk/core/helpers.js +2 -48
  138. package/dist/resource/formats/bnk/core/helpers.js.map +1 -1
  139. package/dist/resource/formats/bnk/core/musicNodes.js +42 -134
  140. package/dist/resource/formats/bnk/core/musicNodes.js.map +1 -1
  141. package/dist/resource/formats/bnk/core/nodeBase.js +20 -111
  142. package/dist/resource/formats/bnk/core/nodeBase.js.map +1 -1
  143. package/dist/resource/formats/bnk/core/sfxNodes.js +2 -1
  144. package/dist/resource/formats/bnk/core/sfxNodes.js.map +1 -1
  145. package/dist/resource/formats/cmf/CjsCmfFormat.js +242 -228
  146. package/dist/resource/formats/cmf/CjsCmfFormat.js.map +1 -1
  147. package/dist/resource/formats/cmf/core/binary.js +54 -60
  148. package/dist/resource/formats/cmf/core/binary.js.map +1 -1
  149. package/dist/resource/formats/dds/CjsDdsFormat.js +5 -3
  150. package/dist/resource/formats/dds/CjsDdsFormat.js.map +1 -1
  151. package/dist/resource/formats/dds/core/bc6h.js +16 -18
  152. package/dist/resource/formats/dds/core/bc6h.js.map +1 -1
  153. package/dist/resource/formats/dds/core/bc7.js +28 -24
  154. package/dist/resource/formats/dds/core/bc7.js.map +1 -1
  155. package/dist/resource/formats/dds/core/helpers.js +7 -133
  156. package/dist/resource/formats/dds/core/helpers.js.map +1 -1
  157. package/dist/resource/formats/dxbc/CjsDxbcFormat.js +3 -2
  158. package/dist/resource/formats/dxbc/CjsDxbcFormat.js.map +1 -1
  159. package/dist/resource/formats/dxbc/core/helpers.js +4 -32
  160. package/dist/resource/formats/dxbc/core/helpers.js.map +1 -1
  161. package/dist/resource/formats/fbx/CjsFbxFormat.js +11 -0
  162. package/dist/resource/formats/fbx/CjsFbxFormat.js.map +1 -1
  163. package/dist/resource/formats/fbx/core/helpers.js +18 -12
  164. package/dist/resource/formats/fbx/core/helpers.js.map +1 -1
  165. package/dist/resource/formats/flac/CjsFlacFormat.js +4 -9
  166. package/dist/resource/formats/flac/CjsFlacFormat.js.map +1 -1
  167. package/dist/resource/formats/flac/core/helpers.js +1 -62
  168. package/dist/resource/formats/flac/core/helpers.js.map +1 -1
  169. package/dist/resource/formats/gif/CjsGifFormat.js +4 -9
  170. package/dist/resource/formats/gif/CjsGifFormat.js.map +1 -1
  171. package/dist/resource/formats/gif/core/helpers.js +1 -63
  172. package/dist/resource/formats/gif/core/helpers.js.map +1 -1
  173. package/dist/resource/formats/gltf/CjsGltfFormat.js +4 -3
  174. package/dist/resource/formats/gltf/CjsGltfFormat.js.map +1 -1
  175. package/dist/resource/formats/gltf/core/helpers.js +3 -19
  176. package/dist/resource/formats/gltf/core/helpers.js.map +1 -1
  177. package/dist/resource/formats/gr2/CjsGr2Format.js +105 -92
  178. package/dist/resource/formats/gr2/CjsGr2Format.js.map +1 -1
  179. package/dist/resource/formats/gr2/core/container.js +1 -10
  180. package/dist/resource/formats/gr2/core/container.js.map +1 -1
  181. package/dist/resource/formats/gr2/core/helpers.js +24 -35
  182. package/dist/resource/formats/gr2/core/helpers.js.map +1 -1
  183. package/dist/resource/formats/gr2/core/shared.js +193 -189
  184. package/dist/resource/formats/gr2/core/shared.js.map +1 -1
  185. package/dist/resource/formats/hlsl/CjsHlslFormat.js +4 -3
  186. package/dist/resource/formats/hlsl/CjsHlslFormat.js.map +1 -1
  187. package/dist/resource/formats/hlsl/core/helpers.js +1 -30
  188. package/dist/resource/formats/hlsl/core/helpers.js.map +1 -1
  189. package/dist/resource/formats/jpeg/CjsJpegFormat.js +5 -3
  190. package/dist/resource/formats/jpeg/CjsJpegFormat.js.map +1 -1
  191. package/dist/resource/formats/jpeg/core/helpers.js +7 -134
  192. package/dist/resource/formats/jpeg/core/helpers.js.map +1 -1
  193. package/dist/resource/formats/mp3/CjsMp3Format.js +4 -9
  194. package/dist/resource/formats/mp3/CjsMp3Format.js.map +1 -1
  195. package/dist/resource/formats/mp3/core/helpers.js +1 -64
  196. package/dist/resource/formats/mp3/core/helpers.js.map +1 -1
  197. package/dist/resource/formats/mp4/CjsMp4Format.js +4 -9
  198. package/dist/resource/formats/mp4/CjsMp4Format.js.map +1 -1
  199. package/dist/resource/formats/mp4/core/helpers.js +1 -73
  200. package/dist/resource/formats/mp4/core/helpers.js.map +1 -1
  201. package/dist/resource/formats/obj/CjsObjFormat.js +4 -3
  202. package/dist/resource/formats/obj/CjsObjFormat.js.map +1 -1
  203. package/dist/resource/formats/obj/core/helpers.js +93 -115
  204. package/dist/resource/formats/obj/core/helpers.js.map +1 -1
  205. package/dist/resource/formats/ogg/CjsOggFormat.js +4 -3
  206. package/dist/resource/formats/ogg/CjsOggFormat.js.map +1 -1
  207. package/dist/resource/formats/ogg/core/helpers.js +1 -15
  208. package/dist/resource/formats/ogg/core/helpers.js.map +1 -1
  209. package/dist/resource/formats/ogg/core/vorbis.js +138 -144
  210. package/dist/resource/formats/ogg/core/vorbis.js.map +1 -1
  211. package/dist/resource/formats/pickle/CjsPickleFormat.js +83 -114
  212. package/dist/resource/formats/pickle/CjsPickleFormat.js.map +1 -1
  213. package/dist/resource/formats/png/CjsPngFormat.js +5 -3
  214. package/dist/resource/formats/png/CjsPngFormat.js.map +1 -1
  215. package/dist/resource/formats/png/core/helpers.js +13 -152
  216. package/dist/resource/formats/png/core/helpers.js.map +1 -1
  217. package/dist/resource/formats/png/core/writer.js +3 -27
  218. package/dist/resource/formats/png/core/writer.js.map +1 -1
  219. package/dist/resource/formats/red/core/helpers.js +19 -29
  220. package/dist/resource/formats/red/core/helpers.js.map +1 -1
  221. package/dist/resource/formats/stl/CjsStlFormat.js +158 -147
  222. package/dist/resource/formats/stl/CjsStlFormat.js.map +1 -1
  223. package/dist/resource/formats/stl/core/helpers.js +44 -66
  224. package/dist/resource/formats/stl/core/helpers.js.map +1 -1
  225. package/dist/resource/formats/tga/CjsTgaFormat.js +5 -3
  226. package/dist/resource/formats/tga/CjsTgaFormat.js.map +1 -1
  227. package/dist/resource/formats/tga/core/helpers.js +7 -153
  228. package/dist/resource/formats/tga/core/helpers.js.map +1 -1
  229. package/dist/resource/formats/vta/CjsVtaFormat.js +4 -3
  230. package/dist/resource/formats/vta/CjsVtaFormat.js.map +1 -1
  231. package/dist/resource/formats/vta/core/helpers.js +1 -17
  232. package/dist/resource/formats/vta/core/helpers.js.map +1 -1
  233. package/dist/resource/formats/wav/CjsWavFormat.js +4 -3
  234. package/dist/resource/formats/wav/CjsWavFormat.js.map +1 -1
  235. package/dist/resource/formats/wav/core/helpers.js +1 -15
  236. package/dist/resource/formats/wav/core/helpers.js.map +1 -1
  237. package/dist/resource/formats/webgl/CjsWebglFormat.js +4 -3
  238. package/dist/resource/formats/webgl/CjsWebglFormat.js.map +1 -1
  239. package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js +52 -4
  240. package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
  241. package/dist/resource/formats/webgl/core/helpers.js +39 -68
  242. package/dist/resource/formats/webgl/core/helpers.js.map +1 -1
  243. package/dist/resource/formats/webgpu/CjsWebgpuFormat.js +4 -3
  244. package/dist/resource/formats/webgpu/CjsWebgpuFormat.js.map +1 -1
  245. package/dist/resource/formats/webgpu/core/helpers.js +4 -30
  246. package/dist/resource/formats/webgpu/core/helpers.js.map +1 -1
  247. package/dist/resource/formats/webm/CjsWebmFormat.js +4 -9
  248. package/dist/resource/formats/webm/CjsWebmFormat.js.map +1 -1
  249. package/dist/resource/formats/webm/core/helpers.js +1 -73
  250. package/dist/resource/formats/webm/core/helpers.js.map +1 -1
  251. package/dist/resource/formats/webp/CjsWebpFormat.js +4 -9
  252. package/dist/resource/formats/webp/CjsWebpFormat.js.map +1 -1
  253. package/dist/resource/formats/webp/core/helpers.js +1 -62
  254. package/dist/resource/formats/webp/core/helpers.js.map +1 -1
  255. package/dist/resource/formats/wem/CjsWemFormat.js +4 -3
  256. package/dist/resource/formats/wem/CjsWemFormat.js.map +1 -1
  257. package/dist/resource/formats/wem/core/bitStream.js +83 -106
  258. package/dist/resource/formats/wem/core/bitStream.js.map +1 -1
  259. package/dist/resource/formats/wem/core/codebookLibrary.js +52 -52
  260. package/dist/resource/formats/wem/core/codebookLibrary.js.map +1 -1
  261. package/dist/resource/formats/wem/core/helpers.js +1 -15
  262. package/dist/resource/formats/wem/core/helpers.js.map +1 -1
  263. package/dist/resource/formats/wem/core/wemToOgg.js +67 -67
  264. package/dist/resource/formats/wem/core/wemToOgg.js.map +1 -1
  265. package/dist/resource/geometry/MeshDecalData.js +23 -25
  266. package/dist/resource/geometry/MeshDecalData.js.map +1 -1
  267. package/dist/resource/geometry/MeshDecalLodData.js +14 -23
  268. package/dist/resource/geometry/MeshDecalLodData.js.map +1 -1
  269. package/dist/resource/geometry/TriGeometryRes.js +299 -284
  270. package/dist/resource/geometry/TriGeometryRes.js.map +1 -1
  271. package/dist/resource/geometry/TriGeometryResAreaData.js +30 -31
  272. package/dist/resource/geometry/TriGeometryResAreaData.js.map +1 -1
  273. package/dist/resource/geometry/TriGeometryResJointData.js +16 -24
  274. package/dist/resource/geometry/TriGeometryResJointData.js.map +1 -1
  275. package/dist/resource/geometry/TriGeometryResLodData.js +50 -41
  276. package/dist/resource/geometry/TriGeometryResLodData.js.map +1 -1
  277. package/dist/resource/geometry/TriGeometryResMeshData.js +32 -32
  278. package/dist/resource/geometry/TriGeometryResMeshData.js.map +1 -1
  279. package/dist/resource/geometry/TriGeometryResSkeletonData.js +14 -23
  280. package/dist/resource/geometry/TriGeometryResSkeletonData.js.map +1 -1
  281. package/dist/resource/geometry/TriJointBinding.js +16 -24
  282. package/dist/resource/geometry/TriJointBinding.js.map +1 -1
  283. package/dist/resource/geometry/TriMorphTargetGeometryConstants.js +22 -27
  284. package/dist/resource/geometry/TriMorphTargetGeometryConstants.js.map +1 -1
  285. package/dist/resource/geometry/TriRtGeometryConstants.js +50 -41
  286. package/dist/resource/geometry/TriRtGeometryConstants.js.map +1 -1
  287. package/dist/resource/geometry/granny/GStateBindingCallbackData.js +12 -22
  288. package/dist/resource/geometry/granny/GStateBindingCallbackData.js.map +1 -1
  289. package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js +30 -31
  290. package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js.map +1 -1
  291. package/dist/resource/index.js +1 -1
  292. package/dist/resource/shader/reflection/Tr2EffectConstant.js +16 -17
  293. package/dist/resource/shader/reflection/Tr2EffectConstant.js.map +1 -1
  294. package/dist/resource/shader/reflection/Tr2EffectDescription.js +26 -28
  295. package/dist/resource/shader/reflection/Tr2EffectDescription.js.map +1 -1
  296. package/dist/resource/shader/reflection/Tr2EffectLibrary.js +24 -25
  297. package/dist/resource/shader/reflection/Tr2EffectLibrary.js.map +1 -1
  298. package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +21 -22
  299. package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -1
  300. package/dist/resource/shader/reflection/Tr2EffectResource.js +25 -26
  301. package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
  302. package/dist/resource/shader/reflection/Tr2EffectStageInput.js +69 -72
  303. package/dist/resource/shader/reflection/Tr2EffectStageInput.js.map +1 -1
  304. package/dist/resource/shader/reflection/Tr2EffectTechnique.js +17 -18
  305. package/dist/resource/shader/reflection/Tr2EffectTechnique.js.map +1 -1
  306. package/dist/resource/shader/reflection/Tr2Pass.js +42 -43
  307. package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -1
  308. package/dist/resource/shader/reflection/Tr2RenderStateSetup.js +26 -5
  309. package/dist/resource/shader/reflection/Tr2RenderStateSetup.js.map +1 -1
  310. package/dist/resource/shader/reflection/carbonRecordFields.js +87 -90
  311. package/dist/resource/shader/reflection/carbonRecordFields.js.map +1 -1
  312. package/dist/resource/shader/sampler/Tr2SamplerSetup.js +32 -34
  313. package/dist/resource/shader/sampler/Tr2SamplerSetup.js.map +1 -1
  314. package/dist/resource/texture/CjsTextureArrayRes.js +1 -6
  315. package/dist/resource/texture/CjsTextureArrayRes.js.map +1 -1
  316. package/dist/resource/texture/Tr2TextureLodManager.js +35 -27
  317. package/dist/resource/texture/Tr2TextureLodManager.js.map +1 -1
  318. package/dist/resource/texture/Tr2TextureLodUpdateRequest.js +16 -24
  319. package/dist/resource/texture/Tr2TextureLodUpdateRequest.js.map +1 -1
  320. package/dist/resource/texture/Tr2TexturePackChannel.js +16 -24
  321. package/dist/resource/texture/Tr2TexturePackChannel.js.map +1 -1
  322. package/dist/resource/texture/Tr2TexturePipeline.js +24 -20
  323. package/dist/resource/texture/Tr2TexturePipeline.js.map +1 -1
  324. package/dist/resource/texture/Tr2TexturePipelineParams.js +14 -23
  325. package/dist/resource/texture/Tr2TexturePipelineParams.js.map +1 -1
  326. package/dist/resource/texture/Tr2TexturePipelineStepCompress.js +18 -25
  327. package/dist/resource/texture/Tr2TexturePipelineStepCompress.js.map +1 -1
  328. package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js +11 -16
  329. package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js.map +1 -1
  330. package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js +14 -23
  331. package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js.map +1 -1
  332. package/dist/resource/texture/Tr2TexturePipelineStepLoad.js +12 -22
  333. package/dist/resource/texture/Tr2TexturePipelineStepLoad.js.map +1 -1
  334. package/dist/resource/texture/Tr2TexturePipelineStepPack.js +38 -26
  335. package/dist/resource/texture/Tr2TexturePipelineStepPack.js.map +1 -1
  336. package/dist/resource/worker/CjsResManMainThreadLoader.js +2 -5
  337. package/dist/resource/worker/CjsResManMainThreadLoader.js.map +1 -1
  338. package/dist/resource/worker/CjsResManWorkerLoader.js +6 -7
  339. package/dist/resource/worker/CjsResManWorkerLoader.js.map +1 -1
  340. package/dist/resource/worker/protocol.js +18 -1
  341. package/dist/resource/worker/protocol.js.map +1 -1
  342. package/dist/sof/EveSOF.js +2 -222
  343. package/dist/sof/EveSOF.js.map +1 -1
  344. package/dist/sof/SofDocumentBuilder.js +205 -0
  345. package/dist/sof/SofDocumentBuilder.js.map +1 -0
  346. package/dist/sof/faction/ErrSOFFactionColorSetTypeNotFound.js +16 -0
  347. package/dist/sof/faction/ErrSOFFactionColorSetTypeNotFound.js.map +1 -0
  348. package/dist/sof/faction/ErrSOFFactionColorSetTypeUnknown.js +16 -0
  349. package/dist/sof/faction/ErrSOFFactionColorSetTypeUnknown.js.map +1 -0
  350. package/dist/sof/faction/EveSOFDataFactionColorSet.js +3 -27
  351. package/dist/sof/faction/EveSOFDataFactionColorSet.js.map +1 -1
  352. package/dist/sof/faction/index.js +3 -1
  353. package/dist/sof/faction/index.js.map +1 -1
  354. package/dist/sof/generic/ErrSOFAreaShaderNotFound.js +18 -0
  355. package/dist/sof/generic/ErrSOFAreaShaderNotFound.js.map +1 -0
  356. package/dist/sof/generic/ErrSOFDecalShaderNotFound.js +18 -0
  357. package/dist/sof/generic/ErrSOFDecalShaderNotFound.js.map +1 -0
  358. package/dist/sof/generic/ErrSOFMaterialPrefixNotFound.js +21 -0
  359. package/dist/sof/generic/ErrSOFMaterialPrefixNotFound.js.map +1 -0
  360. package/dist/sof/generic/ErrSOFPatternMaterialPrefixNotFound.js +21 -0
  361. package/dist/sof/generic/ErrSOFPatternMaterialPrefixNotFound.js.map +1 -0
  362. package/dist/sof/generic/EveSOFDataGeneric.js +5 -69
  363. package/dist/sof/generic/EveSOFDataGeneric.js.map +1 -1
  364. package/dist/sof/generic/index.js +5 -1
  365. package/dist/sof/generic/index.js.map +1 -1
  366. package/dist/sof/index.js +23 -7
  367. package/dist/sof/index.js.map +1 -1
  368. package/dist/sof/pattern/ErrSOFProjectionNotFound.js +20 -0
  369. package/dist/sof/pattern/ErrSOFProjectionNotFound.js.map +1 -0
  370. package/dist/sof/pattern/EveSOFDataPattern.js +2 -17
  371. package/dist/sof/pattern/EveSOFDataPattern.js.map +1 -1
  372. package/dist/sof/pattern/index.js +2 -1
  373. package/dist/sof/pattern/index.js.map +1 -1
  374. package/dist/sof/shared/ErrSOFAreaTypeNotFound.js +16 -0
  375. package/dist/sof/shared/ErrSOFAreaTypeNotFound.js.map +1 -0
  376. package/dist/sof/shared/ErrSOFLogoSetTypeNotFound.js +16 -0
  377. package/dist/sof/shared/ErrSOFLogoSetTypeNotFound.js.map +1 -0
  378. package/dist/sof/shared/ErrSOFLogoSetTypeUnknown.js +16 -0
  379. package/dist/sof/shared/ErrSOFLogoSetTypeUnknown.js.map +1 -0
  380. package/dist/sof/shared/EveSOFDataArea.js +2 -13
  381. package/dist/sof/shared/EveSOFDataArea.js.map +1 -1
  382. package/dist/sof/shared/EveSOFDataLogoSet.js +3 -27
  383. package/dist/sof/shared/EveSOFDataLogoSet.js.map +1 -1
  384. package/dist/sof/shared/EveSOFDataParameter.js +2 -146
  385. package/dist/sof/shared/EveSOFDataParameter.js.map +1 -1
  386. package/dist/sof/shared/EveSOFDataParameterBool.js +40 -0
  387. package/dist/sof/shared/EveSOFDataParameterBool.js.map +1 -0
  388. package/dist/sof/shared/EveSOFDataParameterColor.js +36 -0
  389. package/dist/sof/shared/EveSOFDataParameterColor.js.map +1 -0
  390. package/dist/sof/shared/EveSOFDataParameterFloat.js +37 -0
  391. package/dist/sof/shared/EveSOFDataParameterFloat.js.map +1 -0
  392. package/dist/sof/shared/EveSOFDataParameterInt.js +37 -0
  393. package/dist/sof/shared/EveSOFDataParameterInt.js.map +1 -0
  394. package/dist/sof/shared/EveSOFDataParameterVector2.js +37 -0
  395. package/dist/sof/shared/EveSOFDataParameterVector2.js.map +1 -0
  396. package/dist/sof/shared/EveSOFDataParameterVector3.js +37 -0
  397. package/dist/sof/shared/EveSOFDataParameterVector3.js.map +1 -0
  398. package/dist/sof/shared/{EveSOFDataSpotlightAttachment.js → EveSOFDataSpotLightAttachment.js} +1 -1
  399. package/dist/sof/shared/{EveSOFDataSpotlightAttachment.js.map → EveSOFDataSpotLightAttachment.js.map} +1 -1
  400. package/dist/sof/shared/index.js +13 -4
  401. package/dist/sof/shared/index.js.map +1 -1
  402. package/dist/sof/sofDocumentValues.js +33 -0
  403. package/dist/sof/sofDocumentValues.js.map +1 -0
  404. package/dist/trinity/controllers/ITr2Controller/ITr2ActionController.js +168 -0
  405. package/dist/trinity/controllers/ITr2Controller/ITr2ActionController.js.map +1 -0
  406. package/dist/trinity/controllers/{ITr2Controller.js → ITr2Controller/ITr2Controller.js} +2 -134
  407. package/dist/trinity/controllers/ITr2Controller/ITr2Controller.js.map +1 -0
  408. package/dist/trinity/controllers/Tr2Controller.js +2 -1
  409. package/dist/trinity/controllers/Tr2Controller.js.map +1 -1
  410. package/dist/trinity/controllers/Tr2ControllerReference.js +2 -1
  411. package/dist/trinity/controllers/Tr2ControllerReference.js.map +1 -1
  412. package/dist/trinity/controllers/action/ITr2ControllerAction.js +2 -1
  413. package/dist/trinity/controllers/action/ITr2ControllerAction.js.map +1 -1
  414. package/dist/trinity/controllers/action/Tr2ActionSpawnParticles.js +10 -9
  415. package/dist/trinity/controllers/action/Tr2ActionSpawnParticles.js.map +1 -1
  416. package/dist/trinity/controllers/expression/CjsControllerExpressionCompileError.js +26 -0
  417. package/dist/trinity/controllers/expression/CjsControllerExpressionCompileError.js.map +1 -0
  418. package/dist/trinity/controllers/expression/CjsControllerExpressionEvaluateError.js +24 -0
  419. package/dist/trinity/controllers/expression/CjsControllerExpressionEvaluateError.js.map +1 -0
  420. package/dist/trinity/controllers/expression/CjsControllerExpressionParser.js +387 -0
  421. package/dist/trinity/controllers/expression/CjsControllerExpressionParser.js.map +1 -0
  422. package/dist/trinity/controllers/expression/CjsControllerExpressionProgram.js +4 -1011
  423. package/dist/trinity/controllers/expression/CjsControllerExpressionProgram.js.map +1 -1
  424. package/dist/trinity/controllers/expression/expressionRuntime.js +605 -0
  425. package/dist/trinity/controllers/expression/expressionRuntime.js.map +1 -0
  426. package/dist/trinity/controllers/index.js +5 -2
  427. package/dist/trinity/controllers/index.js.map +1 -1
  428. package/dist/trinity/controllers/state/ITr2StateMachineStateFinalizer.js +2 -1
  429. package/dist/trinity/controllers/state/ITr2StateMachineStateFinalizer.js.map +1 -1
  430. package/dist/trinity/controllers/timeline/Tr2TimelineController.js +2 -1
  431. package/dist/trinity/controllers/timeline/Tr2TimelineController.js.map +1 -1
  432. package/dist/trinity/core/ITr2Updateable.js +2 -1
  433. package/dist/trinity/core/ITr2Updateable.js.map +1 -1
  434. package/dist/trinity/core/Tr2Blitter.js +6 -3
  435. package/dist/trinity/core/Tr2Blitter.js.map +1 -1
  436. package/dist/trinity/core/Tr2Denoiser.js +256 -0
  437. package/dist/trinity/core/Tr2Denoiser.js.map +1 -0
  438. package/dist/trinity/core/Tr2GpuResourcePool/GpuResourceHandle.js +115 -0
  439. package/dist/trinity/core/Tr2GpuResourcePool/GpuResourceHandle.js.map +1 -0
  440. package/dist/trinity/core/Tr2GpuResourcePool/TextureSize2D.js +79 -0
  441. package/dist/trinity/core/Tr2GpuResourcePool/TextureSize2D.js.map +1 -0
  442. package/dist/trinity/core/{Tr2GpuResourcePool.js → Tr2GpuResourcePool/Tr2GpuResourcePool.js} +63 -151
  443. package/dist/trinity/core/Tr2GpuResourcePool/Tr2GpuResourcePool.js.map +1 -0
  444. package/dist/trinity/core/{Tr2QuadRenderer.js → Tr2QuadRenderer/Tr2QuadRenderer.js} +8 -30
  445. package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRenderer.js.map +1 -0
  446. package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRendererEffectRecord.js +38 -0
  447. package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRendererEffectRecord.js.map +1 -0
  448. package/dist/trinity/core/Tr2RenderUtils.js +20 -3
  449. package/dist/trinity/core/Tr2RenderUtils.js.map +1 -1
  450. package/dist/trinity/core/Tr2Renderer.js +146 -1
  451. package/dist/trinity/core/Tr2Renderer.js.map +1 -1
  452. package/dist/trinity/core/Tr2ShadowMap.js +135 -14
  453. package/dist/trinity/core/Tr2ShadowMap.js.map +1 -1
  454. package/dist/trinity/core/{Tr2TextureArray.js → Tr2TextureArray/Tr2TextureArray.js} +3 -58
  455. package/dist/trinity/core/Tr2TextureArray/Tr2TextureArray.js.map +1 -0
  456. package/dist/trinity/core/Tr2TextureArray/Tr2TextureArrayElement.js +61 -0
  457. package/dist/trinity/core/Tr2TextureArray/Tr2TextureArrayElement.js.map +1 -0
  458. package/dist/trinity/core/batch/TriRenderBatch/DefaultKeyGenerator.js +26 -0
  459. package/dist/trinity/core/batch/TriRenderBatch/DefaultKeyGenerator.js.map +1 -0
  460. package/dist/trinity/core/batch/TriRenderBatch/EffectKeyGenerator.js +29 -0
  461. package/dist/trinity/core/batch/TriRenderBatch/EffectKeyGenerator.js.map +1 -0
  462. package/dist/trinity/core/batch/{ITriRenderBatchAccumulator.js → TriRenderBatch/ITriRenderBatchAccumulator.js} +30 -30
  463. package/dist/trinity/core/batch/TriRenderBatch/ITriRenderBatchAccumulator.js.map +1 -0
  464. package/dist/trinity/core/batch/{Tr2RenderBatch.js → TriRenderBatch/Tr2RenderBatch.js} +81 -154
  465. package/dist/trinity/core/batch/TriRenderBatch/Tr2RenderBatch.js.map +1 -0
  466. package/dist/trinity/core/batch/{TriRenderBatchAccumulator.js → TriRenderBatch/TriRenderBatchAccumulator.js} +7 -38
  467. package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAccumulator.js.map +1 -0
  468. package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlock.js +61 -0
  469. package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlock.js.map +1 -0
  470. package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlocksWithSharedMaterial.js +40 -0
  471. package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlocksWithSharedMaterial.js.map +1 -0
  472. package/dist/trinity/core/batch/TriRenderBatchMap.js +6 -1
  473. package/dist/trinity/core/batch/TriRenderBatchMap.js.map +1 -1
  474. package/dist/trinity/core/context/Tr2RenderContext.js +75 -57
  475. package/dist/trinity/core/context/Tr2RenderContext.js.map +1 -1
  476. package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityEvent.js +67 -0
  477. package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityEvent.js.map +1 -0
  478. package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityResults.js +50 -0
  479. package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityResults.js.map +1 -0
  480. package/dist/trinity/core/device/Tr2DepthStencil.js +186 -13
  481. package/dist/trinity/core/device/Tr2DepthStencil.js.map +1 -1
  482. package/dist/trinity/core/device/{Tr2RingBuffer.js → Tr2RingBuffer/Tr2RingBuffer.js} +27 -79
  483. package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBuffer.js.map +1 -0
  484. package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBufferOffsets.js +114 -0
  485. package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBufferOffsets.js.map +1 -0
  486. package/dist/trinity/core/device/{Tr2SuballocatedBuffer.js → Tr2SuballocatedBuffer/Tr2SuballocatedBuffer.js} +5 -59
  487. package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBuffer.js.map +1 -0
  488. package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBufferAllocation.js +80 -0
  489. package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBufferAllocation.js.map +1 -0
  490. package/dist/trinity/core/index.js +42 -15
  491. package/dist/trinity/core/index.js.map +1 -1
  492. package/dist/trinity/core/lighting/Tr2LightManager.js +6 -1
  493. package/dist/trinity/core/lighting/Tr2LightManager.js.map +1 -1
  494. package/dist/trinity/core/mesh/{ITr2ImpostorSource.js → ITr2ImpostorSource/ITr2ImpostorSource.js} +6 -28
  495. package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSource.js.map +1 -0
  496. package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSourceImpostorHash.js +32 -0
  497. package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSourceImpostorHash.js.map +1 -0
  498. package/dist/trinity/core/mesh/{ITr2InstanceData.js → ITr2InstanceData/ITr2InstanceData.js} +5 -29
  499. package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceData.js.map +1 -0
  500. package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceDataInstanceData.js +33 -0
  501. package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceDataInstanceData.js.map +1 -0
  502. package/dist/trinity/core/mesh/Tr2DirectInstanceData.js +2 -1
  503. package/dist/trinity/core/mesh/Tr2DirectInstanceData.js.map +1 -1
  504. package/dist/trinity/core/mesh/Tr2MeshBase.js +7 -1
  505. package/dist/trinity/core/mesh/Tr2MeshBase.js.map +1 -1
  506. package/dist/trinity/core/mesh/Tr2RuntimeInstanceData.js +2 -1
  507. package/dist/trinity/core/mesh/Tr2RuntimeInstanceData.js.map +1 -1
  508. package/dist/trinity/core/mesh/TriGeometryResAllocations.js +6 -2
  509. package/dist/trinity/core/mesh/TriGeometryResAllocations.js.map +1 -1
  510. package/dist/trinity/core/rawData/CjsConstantLayout.js +196 -0
  511. package/dist/trinity/core/rawData/CjsConstantLayout.js.map +1 -0
  512. package/dist/trinity/core/rawData/CjsPerFrameLayouts.js +8 -3
  513. package/dist/trinity/core/rawData/CjsPerFrameLayouts.js.map +1 -1
  514. package/dist/trinity/core/rawData/CjsPerObjectLayouts.js +40 -732
  515. package/dist/trinity/core/rawData/CjsPerObjectLayouts.js.map +1 -1
  516. package/dist/trinity/core/rawData/layouts/CjsEveBasicLayout.js +34 -0
  517. package/dist/trinity/core/rawData/layouts/CjsEveBasicLayout.js.map +1 -0
  518. package/dist/trinity/core/rawData/layouts/CjsEveBoosterSetLayout.js +69 -0
  519. package/dist/trinity/core/rawData/layouts/CjsEveBoosterSetLayout.js.map +1 -0
  520. package/dist/trinity/core/rawData/layouts/CjsEveChildBoosterSetLayout.js +59 -0
  521. package/dist/trinity/core/rawData/layouts/CjsEveChildBoosterSetLayout.js.map +1 -0
  522. package/dist/trinity/core/rawData/layouts/CjsEveChildBulletStormLayout.js +37 -0
  523. package/dist/trinity/core/rawData/layouts/CjsEveChildBulletStormLayout.js.map +1 -0
  524. package/dist/trinity/core/rawData/layouts/CjsEveChildSpherePinLayout.js +44 -0
  525. package/dist/trinity/core/rawData/layouts/CjsEveChildSpherePinLayout.js.map +1 -0
  526. package/dist/trinity/core/rawData/layouts/CjsEveLensflareLayout.js +31 -0
  527. package/dist/trinity/core/rawData/layouts/CjsEveLensflareLayout.js.map +1 -0
  528. package/dist/trinity/core/rawData/layouts/CjsEveMissileWarheadLayout.js +29 -0
  529. package/dist/trinity/core/rawData/layouts/CjsEveMissileWarheadLayout.js.map +1 -0
  530. package/dist/trinity/core/rawData/layouts/CjsEvePerObjectLayout.js +39 -0
  531. package/dist/trinity/core/rawData/layouts/CjsEvePerObjectLayout.js.map +1 -0
  532. package/dist/trinity/core/rawData/layouts/CjsEveSceneStaticParticlesLayout.js +30 -0
  533. package/dist/trinity/core/rawData/layouts/CjsEveSceneStaticParticlesLayout.js.map +1 -0
  534. package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectDecalLayout.js +78 -0
  535. package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectDecalLayout.js.map +1 -0
  536. package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectLayout.js +169 -0
  537. package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectLayout.js.map +1 -0
  538. package/dist/trinity/core/rawData/layouts/CjsEveSpacePerObjectLayout.js +107 -0
  539. package/dist/trinity/core/rawData/layouts/CjsEveSpacePerObjectLayout.js.map +1 -0
  540. package/dist/trinity/core/rawData/layouts/CjsEveSpherePinLayout.js +44 -0
  541. package/dist/trinity/core/rawData/layouts/CjsEveSpherePinLayout.js.map +1 -0
  542. package/dist/trinity/core/rawData/layouts/CjsEveStretch2Layout.js +34 -0
  543. package/dist/trinity/core/rawData/layouts/CjsEveStretch2Layout.js.map +1 -0
  544. package/dist/trinity/core/rawData/layouts/CjsEveTurretSetLayout.js +82 -0
  545. package/dist/trinity/core/rawData/layouts/CjsEveTurretSetLayout.js.map +1 -0
  546. package/dist/trinity/core/rawData/layouts/CjsTr2PerObjectLayout.js +42 -0
  547. package/dist/trinity/core/rawData/layouts/CjsTr2PerObjectLayout.js.map +1 -0
  548. package/dist/trinity/core/rawData/perObjectData/EveBasicPerObjectData.js +55 -0
  549. package/dist/trinity/core/rawData/perObjectData/EveBasicPerObjectData.js.map +1 -0
  550. package/dist/trinity/core/rawData/perObjectData/EveBoosterSetPerObjectData.js +59 -0
  551. package/dist/trinity/core/rawData/perObjectData/EveBoosterSetPerObjectData.js.map +1 -0
  552. package/dist/trinity/core/rawData/perObjectData/EveChildBoosterSetPerObjectData.js +59 -0
  553. package/dist/trinity/core/rawData/perObjectData/EveChildBoosterSetPerObjectData.js.map +1 -0
  554. package/dist/trinity/core/rawData/perObjectData/EveChildBulletStormPerObjectData.js +55 -0
  555. package/dist/trinity/core/rawData/perObjectData/EveChildBulletStormPerObjectData.js.map +1 -0
  556. package/dist/trinity/core/rawData/perObjectData/EveChildSpherePinPerObjectData.js +55 -0
  557. package/dist/trinity/core/rawData/perObjectData/EveChildSpherePinPerObjectData.js.map +1 -0
  558. package/dist/trinity/core/rawData/perObjectData/EveDecalPerObjectData.js +59 -0
  559. package/dist/trinity/core/rawData/perObjectData/EveDecalPerObjectData.js.map +1 -0
  560. package/dist/trinity/core/rawData/perObjectData/EveLensflarePerObjectData.js +55 -0
  561. package/dist/trinity/core/rawData/perObjectData/EveLensflarePerObjectData.js.map +1 -0
  562. package/dist/trinity/core/rawData/perObjectData/EveMissileWarheadPerObjectData.js +55 -0
  563. package/dist/trinity/core/rawData/perObjectData/EveMissileWarheadPerObjectData.js.map +1 -0
  564. package/dist/trinity/core/rawData/perObjectData/EveSceneStaticParticlesPerObjectData.js +55 -0
  565. package/dist/trinity/core/rawData/perObjectData/EveSceneStaticParticlesPerObjectData.js.map +1 -0
  566. package/dist/trinity/core/rawData/perObjectData/EveSpherePinPerObjectData.js +55 -0
  567. package/dist/trinity/core/rawData/perObjectData/EveSpherePinPerObjectData.js.map +1 -0
  568. package/dist/trinity/core/rawData/perObjectData/EveTurretSetPerObjectData.js +59 -0
  569. package/dist/trinity/core/rawData/perObjectData/EveTurretSetPerObjectData.js.map +1 -0
  570. package/dist/trinity/core/rawData/perObjectData/StretchPerObjectData.js +55 -0
  571. package/dist/trinity/core/rawData/perObjectData/StretchPerObjectData.js.map +1 -0
  572. package/dist/trinity/core/rawData/{Tr2PerObjectData.js → perObjectData/Tr2PerObjectData.js} +110 -62
  573. package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectData.js.map +1 -0
  574. package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataPSBuffer.js +104 -0
  575. package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataPSBuffer.js.map +1 -0
  576. package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataStandard.js +87 -0
  577. package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataStandard.js.map +1 -0
  578. package/dist/trinity/core/variable/TriVariable.js +83 -83
  579. package/dist/trinity/core/variable/TriVariable.js.map +1 -1
  580. package/dist/trinity/core/vertex/{Tr2VertexDefinition.js → Tr2VertexDefinition/Tr2VertexDefinition.js} +4 -20
  581. package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinition.js.map +1 -0
  582. package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinitionItem.js +29 -0
  583. package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinitionItem.js.map +1 -0
  584. package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js +116 -36
  585. package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js.map +1 -1
  586. package/dist/trinity/curves/curve/Tr2CurveRandomAxisRotation.js +50 -92
  587. package/dist/trinity/curves/curve/Tr2CurveRandomAxisRotation.js.map +1 -1
  588. package/dist/trinity/eve/EveModularObjectModifier.js +9 -5
  589. package/dist/trinity/eve/EveModularObjectModifier.js.map +1 -1
  590. package/dist/trinity/eve/IEveInheritPropertiesOwner.js +2 -1
  591. package/dist/trinity/eve/IEveInheritPropertiesOwner.js.map +1 -1
  592. package/dist/trinity/eve/IEveSpaceObject2.js +2 -1
  593. package/dist/trinity/eve/IEveSpaceObject2.js.map +1 -1
  594. package/dist/trinity/eve/IEveTransform.js +2 -1
  595. package/dist/trinity/eve/IEveTransform.js.map +1 -1
  596. package/dist/trinity/eve/attachment/banner/EveBannerSet.js +2 -2
  597. package/dist/trinity/eve/attachment/banner/EveBannerSet.js.map +1 -1
  598. package/dist/trinity/eve/attachment/booster/EveBoosterSet2.js +109 -133
  599. package/dist/trinity/eve/attachment/booster/EveBoosterSet2.js.map +1 -1
  600. package/dist/trinity/eve/attachment/booster/EveBoosterSet2Item.js +40 -0
  601. package/dist/trinity/eve/attachment/booster/EveBoosterSet2Item.js.map +1 -0
  602. package/dist/trinity/eve/attachment/booster/EveBoosterSet2Renderable.js +1 -1
  603. package/dist/trinity/eve/attachment/booster/EveBoosterSet2Renderable.js.map +1 -1
  604. package/dist/trinity/eve/attachment/decal/DecalMeshCache.js +2 -14
  605. package/dist/trinity/eve/attachment/decal/DecalMeshCache.js.map +1 -1
  606. package/dist/trinity/eve/attachment/decal/DecalMeshCacheMeshBuffers.js +18 -0
  607. package/dist/trinity/eve/attachment/decal/DecalMeshCacheMeshBuffers.js.map +1 -0
  608. package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js +1 -1
  609. package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js.map +1 -1
  610. package/dist/trinity/eve/attachment/haze/EveHazeSet.js +1 -1
  611. package/dist/trinity/eve/attachment/haze/EveHazeSet.js.map +1 -1
  612. package/dist/trinity/eve/attachment/plane/EvePlaneSet.js +1 -1
  613. package/dist/trinity/eve/attachment/plane/EvePlaneSet.js.map +1 -1
  614. package/dist/trinity/eve/attachment/spotlight/EveSpotlightSet.js +2 -2
  615. package/dist/trinity/eve/attachment/spotlight/EveSpotlightSet.js.map +1 -1
  616. package/dist/trinity/eve/attachment/sprite/EveSpriteLineSet.js +1 -1
  617. package/dist/trinity/eve/attachment/sprite/EveSpriteLineSet.js.map +1 -1
  618. package/dist/trinity/eve/attachment/sprite/EveSpriteSet.js +4 -2
  619. package/dist/trinity/eve/attachment/sprite/EveSpriteSet.js.map +1 -1
  620. package/dist/trinity/eve/attachment/turrets/EveTurretSet.js +143 -139
  621. package/dist/trinity/eve/attachment/turrets/EveTurretSet.js.map +1 -1
  622. package/dist/trinity/eve/camera/EveCamera.js +1 -1
  623. package/dist/trinity/eve/camera/EveCamera.js.map +1 -1
  624. package/dist/trinity/eve/child/EveChildBoosterSet.js +12 -1
  625. package/dist/trinity/eve/child/EveChildBoosterSet.js.map +1 -1
  626. package/dist/trinity/eve/child/EveChildCloud2.js +178 -151
  627. package/dist/trinity/eve/child/EveChildCloud2.js.map +1 -1
  628. package/dist/trinity/eve/child/EveChildContainer.js +141 -141
  629. package/dist/trinity/eve/child/EveChildContainer.js.map +1 -1
  630. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js +87 -0
  631. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js.map +1 -0
  632. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshArea.js +46 -0
  633. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshArea.js.map +1 -0
  634. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshInstance.js +35 -0
  635. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshInstance.js.map +1 -0
  636. package/dist/trinity/eve/child/{EveChildInstancedMeshes.js → EveChildInstancedMeshes/EveChildInstancedMeshes.js} +42 -163
  637. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshes.js.map +1 -0
  638. package/dist/trinity/eve/child/EveChildMesh.js +218 -218
  639. package/dist/trinity/eve/child/EveChildMesh.js.map +1 -1
  640. package/dist/trinity/eve/child/EveChildPartData/EveChildPartData.js +53 -0
  641. package/dist/trinity/eve/child/EveChildPartData/EveChildPartData.js.map +1 -0
  642. package/dist/trinity/eve/child/{EveChildPartData.js → EveChildPartData/EveChildPartDataPartData.js} +9 -45
  643. package/dist/trinity/eve/child/EveChildPartData/EveChildPartDataPartData.js.map +1 -0
  644. package/dist/trinity/eve/child/EveChildParticleSystem.js +30 -29
  645. package/dist/trinity/eve/child/EveChildParticleSystem.js.map +1 -1
  646. package/dist/trinity/eve/child/EveChildTransform.js +5 -0
  647. package/dist/trinity/eve/child/EveChildTransform.js.map +1 -1
  648. package/dist/trinity/eve/child/EveChildTurret.js +7 -0
  649. package/dist/trinity/eve/child/EveChildTurret.js.map +1 -1
  650. package/dist/trinity/eve/index.js +10 -4
  651. package/dist/trinity/eve/index.js.map +1 -1
  652. package/dist/trinity/eve/lights/Tr2Light.js +5 -0
  653. package/dist/trinity/eve/lights/Tr2Light.js.map +1 -1
  654. package/dist/trinity/eve/overlays/overlayBatches.js +6 -1
  655. package/dist/trinity/eve/overlays/overlayBatches.js.map +1 -1
  656. package/dist/trinity/eve/particles/static/EveSceneStaticParticles.js +4 -4
  657. package/dist/trinity/eve/particles/static/EveSceneStaticParticles.js.map +1 -1
  658. package/dist/trinity/eve/renderable/stretch/EveStretch2.js +76 -71
  659. package/dist/trinity/eve/renderable/stretch/EveStretch2.js.map +1 -1
  660. package/dist/trinity/eve/renderable/stretch/EveStretch3.js +1 -1
  661. package/dist/trinity/eve/renderable/stretch/EveStretch3.js.map +1 -1
  662. package/dist/trinity/eve/spaceObject/EveShip2.js +3 -3
  663. package/dist/trinity/eve/spaceObject/EveShip2.js.map +1 -1
  664. package/dist/trinity/eve/spaceObject/EveSpaceObject2.js +408 -407
  665. package/dist/trinity/eve/spaceObject/EveSpaceObject2.js.map +1 -1
  666. package/dist/trinity/eve/ui/EveTacticalOverlay.js +1 -1
  667. package/dist/trinity/eve/ui/EveTacticalOverlay.js.map +1 -1
  668. package/dist/trinity/eve/ui/lines/EveCurveLineSet.js +9 -9
  669. package/dist/trinity/eve/ui/lines/EveCurveLineSet.js.map +1 -1
  670. package/dist/trinity/eve/ui/lines/EveLineSet.js +27 -25
  671. package/dist/trinity/eve/ui/lines/EveLineSet.js.map +1 -1
  672. package/dist/trinity/eve/ui/tacticalOverlay/EveTacticalTrails.js +3 -2
  673. package/dist/trinity/eve/ui/tacticalOverlay/EveTacticalTrails.js.map +1 -1
  674. package/dist/trinity/generated/index.js +0 -1
  675. package/dist/trinity/generated/index.js.map +1 -1
  676. package/dist/trinity/generated/trinityCore/index.js +0 -1
  677. package/dist/trinity/generated/trinityCore/index.js.map +1 -1
  678. package/dist/trinity/index.js +59 -23
  679. package/dist/trinity/index.js.map +1 -1
  680. package/dist/trinity/particle/{ITr2GenericEmitter.js → ITr2GenericEmitter/ITr2GenericEmitter.js} +4 -32
  681. package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitter.js.map +1 -0
  682. package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitterUpdateArguments.js +36 -0
  683. package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitterUpdateArguments.js.map +1 -0
  684. package/dist/trinity/particle/Tr2ParticleSystem.js +4 -2
  685. package/dist/trinity/particle/Tr2ParticleSystem.js.map +1 -1
  686. package/dist/trinity/particle/element/Tr2ParticleElementData.js +15 -4
  687. package/dist/trinity/particle/element/Tr2ParticleElementData.js.map +1 -1
  688. package/dist/trinity/particle/emitter/Tr2DynamicEmitter.js +21 -20
  689. package/dist/trinity/particle/emitter/Tr2DynamicEmitter.js.map +1 -1
  690. package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js +23 -22
  691. package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js.map +1 -1
  692. package/dist/trinity/particle/emitter/Tr2StaticEmitter.js +14 -13
  693. package/dist/trinity/particle/emitter/Tr2StaticEmitter.js.map +1 -1
  694. package/dist/trinity/particle/index.js +2 -1
  695. package/dist/trinity/particle/index.js.map +1 -1
  696. package/dist/trinity/renderJob/step/TriStepPushRenderTarget.js +7 -1
  697. package/dist/trinity/renderJob/step/TriStepPushRenderTarget.js.map +1 -1
  698. package/dist/trinity/shader/Tr2Effect.js +131 -58
  699. package/dist/trinity/shader/Tr2Effect.js.map +1 -1
  700. package/dist/trinity/shader/Tr2EffectStateManager.js +17 -5
  701. package/dist/trinity/shader/Tr2EffectStateManager.js.map +1 -1
  702. package/dist/trinity/shader/Tr2Material.js +21 -4
  703. package/dist/trinity/shader/Tr2Material.js.map +1 -1
  704. package/dist/trinity/shader/material/Tr2EffectPassParameters.js +4 -1
  705. package/dist/trinity/shader/material/Tr2EffectPassParameters.js.map +1 -1
  706. package/dist/trinity/shader/parameter/Tr2GeometryBufferParameter.js +2 -2
  707. package/dist/trinity/shader/parameter/Tr2GeometryBufferParameter.js.map +1 -1
  708. package/dist/trinityal/Tr2BufferAL/Tr2BufferDescriptionAL.js +79 -0
  709. package/dist/trinityal/Tr2BufferAL/Tr2BufferDescriptionAL.js.map +1 -0
  710. package/dist/trinityal/{Tr2DeviceResourceAL.js → Tr2DeviceResourceAL/Tr2BaseDeviceResourceAL.js} +77 -79
  711. package/dist/trinityal/Tr2DeviceResourceAL/Tr2BaseDeviceResourceAL.js.map +1 -0
  712. package/dist/trinityal/Tr2DeviceResourceAL/Tr2DeviceResourceAL.js +24 -0
  713. package/dist/trinityal/Tr2DeviceResourceAL/Tr2DeviceResourceAL.js.map +1 -0
  714. package/dist/trinityal/Tr2DrawUPHelper.js +2 -1
  715. package/dist/trinityal/Tr2DrawUPHelper.js.map +1 -1
  716. package/dist/trinityal/Tr2HalHelperStructures/Tr2MsaaDesc.js +45 -0
  717. package/dist/trinityal/Tr2HalHelperStructures/Tr2MsaaDesc.js.map +1 -0
  718. package/dist/trinityal/Tr2HalHelperStructures/Tr2SamplerDescription.js +154 -0
  719. package/dist/trinityal/Tr2HalHelperStructures/Tr2SamplerDescription.js.map +1 -0
  720. package/dist/trinityal/Tr2HalHelperStructures/Tr2SubresourceData.js +48 -0
  721. package/dist/trinityal/Tr2HalHelperStructures/Tr2SubresourceData.js.map +1 -0
  722. package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureCoordBox.js +75 -0
  723. package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureCoordBox.js.map +1 -0
  724. package/dist/trinityal/{Tr2HalHelperStructures.js → Tr2HalHelperStructures/Tr2TextureSubresource.js} +11 -115
  725. package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureSubresource.js.map +1 -0
  726. package/dist/trinityal/Tr2HalHelperStructures/Tr2Viewport.js +51 -0
  727. package/dist/trinityal/Tr2HalHelperStructures/Tr2Viewport.js.map +1 -0
  728. package/dist/trinityal/{Tr2RenderPassAL.js → Tr2RenderPassAL/Tr2ColorAttachment.js} +5 -28
  729. package/dist/trinityal/Tr2RenderPassAL/Tr2ColorAttachment.js.map +1 -0
  730. package/dist/trinityal/Tr2RenderPassAL/Tr2DepthAttachment.js +38 -0
  731. package/dist/trinityal/Tr2RenderPassAL/Tr2DepthAttachment.js.map +1 -0
  732. package/dist/trinityal/Tr2ResourceSetAL/Tr2RegisterMapAL.js +80 -0
  733. package/dist/trinityal/Tr2ResourceSetAL/Tr2RegisterMapAL.js.map +1 -0
  734. package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetAL.js +76 -0
  735. package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetAL.js.map +1 -0
  736. package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetALStub.js +96 -0
  737. package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetALStub.js.map +1 -0
  738. package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetDescriptionAL.js +196 -0
  739. package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetDescriptionAL.js.map +1 -0
  740. package/dist/trinityal/index.js +22 -9
  741. package/dist/trinityal/index.js.map +1 -1
  742. package/dist/trinityal/stub/Tr2BufferALStub.js +86 -141
  743. package/dist/trinityal/stub/Tr2BufferALStub.js.map +1 -1
  744. package/dist/trinityal/stub/Tr2CapsALStub.js +17 -0
  745. package/dist/trinityal/stub/Tr2CapsALStub.js.map +1 -1
  746. package/dist/trinityal/stub/Tr2ConstantBufferALStub.js +57 -41
  747. package/dist/trinityal/stub/Tr2ConstantBufferALStub.js.map +1 -1
  748. package/dist/trinityal/stub/Tr2FenceALStub.js +18 -2
  749. package/dist/trinityal/stub/Tr2FenceALStub.js.map +1 -1
  750. package/dist/trinityal/stub/Tr2GpuTimerALStub.js +97 -0
  751. package/dist/trinityal/stub/Tr2GpuTimerALStub.js.map +1 -0
  752. package/dist/trinityal/stub/Tr2OcclusionQueryALStub.js +124 -0
  753. package/dist/trinityal/stub/Tr2OcclusionQueryALStub.js.map +1 -0
  754. package/dist/trinityal/stub/Tr2PipelineStatsQueryALStub/Tr2PipelineStatsQueryALStub.js +146 -0
  755. package/dist/trinityal/stub/Tr2PipelineStatsQueryALStub/Tr2PipelineStatsQueryALStub.js.map +1 -0
  756. package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2BindlessResourcesAL.js +28 -0
  757. package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2BindlessResourcesAL.js.map +1 -0
  758. package/dist/trinityal/stub/{Tr2RenderContextALStub.js → Tr2RenderContextALStub/Tr2RenderContextALStub.js} +70 -75
  759. package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2RenderContextALStub.js.map +1 -0
  760. package/dist/trinityal/stub/Tr2SamplerStateALStub.js +47 -31
  761. package/dist/trinityal/stub/Tr2SamplerStateALStub.js.map +1 -1
  762. package/dist/trinityal/stub/Tr2ShaderALStub.js +61 -45
  763. package/dist/trinityal/stub/Tr2ShaderALStub.js.map +1 -1
  764. package/dist/trinityal/stub/Tr2ShaderProgramALStub.js +51 -33
  765. package/dist/trinityal/stub/Tr2ShaderProgramALStub.js.map +1 -1
  766. package/dist/trinityal/stub/Tr2SwapChainALStub.js +61 -45
  767. package/dist/trinityal/stub/Tr2SwapChainALStub.js.map +1 -1
  768. package/dist/trinityal/stub/Tr2TextureALStub.js +188 -171
  769. package/dist/trinityal/stub/Tr2TextureALStub.js.map +1 -1
  770. package/dist/trinityal/stub/Tr2VertexLayoutALStub.js +43 -27
  771. package/dist/trinityal/stub/Tr2VertexLayoutALStub.js.map +1 -1
  772. package/dist/trinityal/stub/{Tr2VideoAdapterInfoALStub.js → Tr2VideoAdapterInfoStub.js} +16 -1
  773. package/dist/trinityal/stub/Tr2VideoAdapterInfoStub.js.map +1 -0
  774. package/dist/trinityal/stub/index.js +8 -4
  775. package/dist/trinityal/stub/index.js.map +1 -1
  776. package/dist/trinityal/vertexLayoutMatch.js +2 -2
  777. package/dist/trinityal/vertexLayoutMatch.js.map +1 -1
  778. package/dist/trinityal/webgpu/CjsWebgpuBufferAL.js +105 -90
  779. package/dist/trinityal/webgpu/CjsWebgpuBufferAL.js.map +1 -1
  780. package/dist/trinityal/webgpu/CjsWebgpuCapsAL.js +17 -0
  781. package/dist/trinityal/webgpu/CjsWebgpuCapsAL.js.map +1 -1
  782. package/dist/trinityal/webgpu/CjsWebgpuConstantBufferAL.js +15 -0
  783. package/dist/trinityal/webgpu/CjsWebgpuConstantBufferAL.js.map +1 -1
  784. package/dist/trinityal/webgpu/CjsWebgpuDevice.js +2 -2
  785. package/dist/trinityal/webgpu/CjsWebgpuDevice.js.map +1 -1
  786. package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js +900 -938
  787. package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js.map +1 -1
  788. package/dist/trinityal/webgpu/CjsWebgpuResourceSetAL.js +56 -60
  789. package/dist/trinityal/webgpu/CjsWebgpuResourceSetAL.js.map +1 -1
  790. package/dist/trinityal/webgpu/CjsWebgpuSamplerStateAL.js +16 -1
  791. package/dist/trinityal/webgpu/CjsWebgpuSamplerStateAL.js.map +1 -1
  792. package/dist/trinityal/webgpu/CjsWebgpuShaderAL.js +100 -379
  793. package/dist/trinityal/webgpu/CjsWebgpuShaderAL.js.map +1 -1
  794. package/dist/trinityal/webgpu/CjsWebgpuShaderProgramAL.js +330 -0
  795. package/dist/trinityal/webgpu/CjsWebgpuShaderProgramAL.js.map +1 -0
  796. package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js +15 -0
  797. package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js.map +1 -1
  798. package/dist/trinityal/webgpu/core/{constantArena.js → CjsWebgpuConstantArena.js} +1 -1
  799. package/dist/trinityal/webgpu/core/CjsWebgpuConstantArena.js.map +1 -0
  800. package/dist/trinityal/webgpu/core/{batchGroups.js → CjsWebgpuEncodeState.js} +1 -1
  801. package/dist/trinityal/webgpu/core/CjsWebgpuEncodeState.js.map +1 -0
  802. package/dist/trinityal/webgpu/core/{perFrameSource.js → CjsWebgpuPerFrameSource.js} +1 -1
  803. package/dist/trinityal/webgpu/core/CjsWebgpuPerFrameSource.js.map +1 -0
  804. package/dist/trinityal/webgpu/core/{pipelineCache.js → CjsWebgpuPipelineCache.js} +1 -1
  805. package/dist/trinityal/webgpu/core/CjsWebgpuPipelineCache.js.map +1 -0
  806. package/dist/trinityal/webgpu/core/{psoDescription.js → CjsWebgpuPsoDescription.js} +2 -2
  807. package/dist/trinityal/webgpu/core/CjsWebgpuPsoDescription.js.map +1 -0
  808. package/dist/trinityal/webgpu/core/{renderTarget.js → CjsWebgpuRenderTarget.js} +1 -1
  809. package/dist/trinityal/webgpu/core/CjsWebgpuRenderTarget.js.map +1 -0
  810. package/dist/trinityal/webgpu/core/{samplerSource.js → CjsWebgpuSamplerSource.js} +1 -1
  811. package/dist/trinityal/webgpu/core/CjsWebgpuSamplerSource.js.map +1 -0
  812. package/dist/trinityal/webgpu/core/{textureSource.js → CjsWebgpuTextureSource.js} +1 -1
  813. package/dist/trinityal/webgpu/core/CjsWebgpuTextureSource.js.map +1 -0
  814. package/dist/trinityal/webgpu/core/{trinityBatchDispatcher.js → CjsWebgpuTrinityBatchDispatcher.js} +4 -4
  815. package/dist/trinityal/webgpu/core/CjsWebgpuTrinityBatchDispatcher.js.map +1 -0
  816. package/dist/trinityal/webgpu/core/{trinityBatchResolver.js → CjsWebgpuTrinityBatchResolver.js} +81 -81
  817. package/dist/trinityal/webgpu/core/CjsWebgpuTrinityBatchResolver.js.map +1 -0
  818. package/dist/trinityal/webgpu/core/{trinityPassEncoder.js → CjsWebgpuTrinityPassEncoder.js} +2 -2
  819. package/dist/trinityal/webgpu/core/CjsWebgpuTrinityPassEncoder.js.map +1 -0
  820. package/dist/trinityal/webgpu/core/{workQueue.js → CjsWebgpuWorkQueue.js} +1 -1
  821. package/dist/trinityal/webgpu/core/CjsWebgpuWorkQueue.js.map +1 -0
  822. package/dist/trinityal/webgpu/internal.js +12 -11
  823. package/dist/trinityal/webgpu/internal.js.map +1 -1
  824. package/docs/audio/reference/classes/trinity.md +44 -34
  825. package/docs/character/architecture.md +276 -0
  826. package/docs/character/reference/character-appearance-plans.md +30 -66
  827. package/docs/character/reference/prepared-libraries.md +14 -30
  828. package/docs/global/reference/api.md +2 -1
  829. package/docs/global/reference/classes/README.md +53 -71
  830. package/docs/global/reference/classes/dropped.md +16 -0
  831. package/docs/resource/README.md +19 -15
  832. package/docs/resource/architecture.md +9 -2
  833. package/docs/resource/concepts/format-capabilities.md +124 -80
  834. package/docs/resource/concepts/shared-format-helpers.md +94 -0
  835. package/docs/resource/formats/README.md +230 -224
  836. package/docs/resource/formats/bitknit2.md +221 -0
  837. package/docs/resource/formats/carbon-effect-container.md +184 -269
  838. package/docs/resource/formats/gr2.md +6 -1
  839. package/docs/resource/formats/schemabound.md +28 -48
  840. package/docs/resource/formats/static.md +70 -97
  841. package/docs/resource/formats/webgl/carbon-constant-layouts.md +8 -8
  842. package/docs/resource/formats/webgl/decl-io.md +165 -256
  843. package/docs/resource/formats/webgl/memory-structured.md +64 -142
  844. package/docs/resource/formats/webgl/texture-sample.md +109 -138
  845. package/docs/resource/formats/webgpu/formats/carbon-webgpu.md +38 -69
  846. package/docs/resource/formats/webgpu/guides/effect-packaging.md +54 -116
  847. package/docs/resource/formats/webgpu/reference/api.md +64 -67
  848. package/docs/resource/formats/webgpu/reference/wgsl-compatibility.md +104 -260
  849. package/docs/resource/reference/classes/core.md +256 -236
  850. package/docs/resource/reference/classes/formats.md +1668 -1672
  851. package/docs/resource/reference/workers.md +4 -2
  852. package/docs/sof/reference/classes/core.md +1 -1
  853. package/docs/sof/reference/classes/faction.md +2 -2
  854. package/docs/sof/reference/classes/generic.md +4 -4
  855. package/docs/sof/reference/classes/pattern.md +1 -1
  856. package/docs/sof/reference/classes/shared.md +10 -10
  857. package/docs/trinity/architecture.md +55 -44
  858. package/docs/trinity/concepts/generated-class-lifecycle.md +10 -15
  859. package/docs/trinity/reference/classes/curves-and-utilities.md +496 -506
  860. package/docs/trinity/reference/classes/dropped.md +0 -189
  861. package/docs/trinity/reference/classes/eve-runtime.md +8 -8
  862. package/docs/trinity/reference/classes/generated.md +0 -10
  863. package/docs/trinity/reference/classes/particle.md +2 -2
  864. package/docs/trinity/reference/classes/trinity-core.md +1554 -1256
  865. package/docs/trinity/reference/implementation-status.md +50 -75
  866. package/docs/trinity/reference/main-semantic-extraction.md +13 -17
  867. package/docs/trinityal/reference/classes/README.md +77 -27
  868. package/docs/trinityal/reference/classes/dropped.md +82 -0
  869. package/docs/trinityal/webgpu/README.md +3 -1
  870. package/docs/trinityal/webgpu/architecture.md +121 -228
  871. package/docs/trinityal/webgpu/reference/api.md +5 -5
  872. package/docs/trinityal/webgpu/reference/classes/README.md +13 -13
  873. package/format-notices/gr2/NOTICE +18 -12
  874. package/format-notices/gr2/THIRD-PARTY-NOTICES.md +5 -5
  875. package/package.json +4 -1
  876. package/dist/audio/trinity/audio/AudActionLog.js +0 -173
  877. package/dist/audio/trinity/audio/AudActionLog.js.map +0 -1
  878. package/dist/audio/trinity/audio/AudObstructionOcclusion.js.map +0 -1
  879. package/dist/global/contracts/CjsScriptCallback.js +0 -94
  880. package/dist/global/contracts/CjsScriptCallback.js.map +0 -1
  881. package/dist/trinity/controllers/ITr2Controller.js.map +0 -1
  882. package/dist/trinity/core/Tr2GpuResourcePool.js.map +0 -1
  883. package/dist/trinity/core/Tr2QuadRenderer.js.map +0 -1
  884. package/dist/trinity/core/Tr2TextureArray.js.map +0 -1
  885. package/dist/trinity/core/batch/ITriRenderBatchAccumulator.js.map +0 -1
  886. package/dist/trinity/core/batch/Tr2RenderBatch.js.map +0 -1
  887. package/dist/trinity/core/batch/TriRenderBatchAccumulator.js.map +0 -1
  888. package/dist/trinity/core/context/CjsShadowMapExecutor.js +0 -43
  889. package/dist/trinity/core/context/CjsShadowMapExecutor.js.map +0 -1
  890. package/dist/trinity/core/context/CjsVolumetricsExecutor.js +0 -64
  891. package/dist/trinity/core/context/CjsVolumetricsExecutor.js.map +0 -1
  892. package/dist/trinity/core/context/Tr2VisibilityResults.js +0 -109
  893. package/dist/trinity/core/context/Tr2VisibilityResults.js.map +0 -1
  894. package/dist/trinity/core/device/Tr2RingBuffer.js.map +0 -1
  895. package/dist/trinity/core/device/Tr2SuballocatedBuffer.js.map +0 -1
  896. package/dist/trinity/core/mesh/ITr2ImpostorSource.js.map +0 -1
  897. package/dist/trinity/core/mesh/ITr2InstanceData.js.map +0 -1
  898. package/dist/trinity/core/rawData/Tr2PerObjectData.js.map +0 -1
  899. package/dist/trinity/core/rawData/constantLayout.js +0 -175
  900. package/dist/trinity/core/rawData/constantLayout.js.map +0 -1
  901. package/dist/trinity/core/vertex/Tr2VertexDefinition.js.map +0 -1
  902. package/dist/trinity/eve/child/EveChildInstancedMeshes.js.map +0 -1
  903. package/dist/trinity/eve/child/EveChildPartData.js.map +0 -1
  904. package/dist/trinity/generated/trinityCore/Tr2Denoiser.js +0 -47
  905. package/dist/trinity/generated/trinityCore/Tr2Denoiser.js.map +0 -1
  906. package/dist/trinity/particle/ITr2GenericEmitter.js.map +0 -1
  907. package/dist/trinityal/Tr2DeviceResourceAL.js.map +0 -1
  908. package/dist/trinityal/Tr2HalHelperStructures.js.map +0 -1
  909. package/dist/trinityal/Tr2RenderPassAL.js.map +0 -1
  910. package/dist/trinityal/Tr2ResourceSetAL.js +0 -419
  911. package/dist/trinityal/Tr2ResourceSetAL.js.map +0 -1
  912. package/dist/trinityal/Tr2SamplerDescription.js +0 -72
  913. package/dist/trinityal/Tr2SamplerDescription.js.map +0 -1
  914. package/dist/trinityal/stub/Tr2QueryALStub.js +0 -326
  915. package/dist/trinityal/stub/Tr2QueryALStub.js.map +0 -1
  916. package/dist/trinityal/stub/Tr2RenderContextALStub.js.map +0 -1
  917. package/dist/trinityal/stub/Tr2VideoAdapterInfoALStub.js.map +0 -1
  918. package/dist/trinityal/webgpu/core/batchGroups.js.map +0 -1
  919. package/dist/trinityal/webgpu/core/constantArena.js.map +0 -1
  920. package/dist/trinityal/webgpu/core/perFrameSource.js.map +0 -1
  921. package/dist/trinityal/webgpu/core/pipelineCache.js.map +0 -1
  922. package/dist/trinityal/webgpu/core/psoDescription.js.map +0 -1
  923. package/dist/trinityal/webgpu/core/renderTarget.js.map +0 -1
  924. package/dist/trinityal/webgpu/core/samplerSource.js.map +0 -1
  925. package/dist/trinityal/webgpu/core/textureSource.js.map +0 -1
  926. package/dist/trinityal/webgpu/core/trinityBatchDispatcher.js.map +0 -1
  927. package/dist/trinityal/webgpu/core/trinityBatchResolver.js.map +0 -1
  928. package/dist/trinityal/webgpu/core/trinityPassEncoder.js.map +0 -1
  929. package/dist/trinityal/webgpu/core/workQueue.js.map +0 -1
@@ -11,13 +11,13 @@ const DEFAULT_VALUES = Object.freeze({
11
11
  const VALID_EMITS = new Set([OUTPUT_JSON]);
12
12
  const OPTION_KEYS = new Set(["emit", "source"]);
13
13
 
14
- /**
15
- * Merge format values over a base set and validate them.
16
- *
17
- * @param {object} base Current values.
18
- * @param {object} [options] Values to merge in.
19
- * @param {string} [readerName] Reader name used in error messages.
20
- * @returns {object} A validated copy of the merged values.
14
+ /**
15
+ * Merge format values over a base set and validate them.
16
+ *
17
+ * @param {object} base Current values.
18
+ * @param {object} [options] Values to merge in.
19
+ * @param {string} [readerName] Reader name used in error messages.
20
+ * @returns {object} A validated copy of the merged values.
21
21
  */
22
22
  function normalizeValues(base, options = {}, readerName = "CjsWebglFormat") {
23
23
  if (!options || typeof options !== "object") {
@@ -44,21 +44,21 @@ function normalizeValues(base, options = {}, readerName = "CjsWebglFormat") {
44
44
  };
45
45
  }
46
46
 
47
- /**
48
- * Normalize caller input into a Uint8Array of package/DXBC bytes.
49
- *
50
- * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.
51
- * @returns {Uint8Array} The payload bytes.
47
+ /**
48
+ * Normalize caller input into a Uint8Array of package/DXBC bytes.
49
+ *
50
+ * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.
51
+ * @returns {Uint8Array} The payload bytes.
52
52
  */
53
- /**
54
- * Reports whether a payload has the Carbon effect container shape.
55
- *
56
- * A shape check, not an identity check: our files are stock Carbon containers,
57
- * so nothing in the bytes distinguishes a WebGL one from a shipped
58
- * `effect.dx11`. Identity comes from the path the file was resolved through.
59
- *
60
- * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.
61
- * @returns {boolean} True when the payload has the container shape.
53
+ /**
54
+ * Reports whether a payload has the Carbon effect container shape.
55
+ *
56
+ * A shape check, not an identity check: our files are stock Carbon containers,
57
+ * so nothing in the bytes distinguishes a WebGL one from a shipped
58
+ * `effect.dx11`. Identity comes from the path the file was resolved through.
59
+ *
60
+ * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.
61
+ * @returns {boolean} True when the payload has the container shape.
62
62
  */
63
63
  function isWebglEffectContainer(input) {
64
64
  try {
@@ -67,24 +67,24 @@ function isWebglEffectContainer(input) {
67
67
  return false;
68
68
  }
69
69
  }
70
- const EMIT_GLSL_OPTION_KEYS = new Set(["constantBufferStyle", "pixelConstantBufferRemap", "samplerName", "vertexStructuredCapacity", "dataTextureWidth", "stubResourceRegisters", "neutralResourceRegisters", "detailMapArrayRegisters", "lightConstantBuffer", "lightPackedTexture", "packedLightProfiles", "emulatedAddressing", "depthRange", "pairVaryings", "source"]);
71
- const EMIT_GLSL_PROFILE_KEYS = new Set(["constantBufferStyle", "pixelConstantBufferRemap", "samplerName", "vertexStructuredCapacity", "dataTextureWidth", "stubResourceRegisters", "neutralResourceRegisters", "detailMapArrayRegisters", "lightConstantBuffer", "lightPackedTexture", "packedLightProfiles", "emulatedAddressing", "depthRange"]);
70
+ const EMIT_GLSL_OPTION_KEYS = new Set(["constantBufferStyle", "pixelConstantBufferRemap", "samplerName", "vertexStructuredCapacity", "dataTextureWidth", "stubResourceRegisters", "neutralResourceRegisters", "detailMapArrayRegisters", "lightConstantBuffer", "lightPackedTexture", "packedLightProfiles", "emulatedAddressing", "depthRange", "clipYFlip", "pairVaryings", "source"]);
71
+ const EMIT_GLSL_PROFILE_KEYS = new Set(["constantBufferStyle", "pixelConstantBufferRemap", "samplerName", "vertexStructuredCapacity", "dataTextureWidth", "stubResourceRegisters", "neutralResourceRegisters", "detailMapArrayRegisters", "lightConstantBuffer", "lightPackedTexture", "packedLightProfiles", "emulatedAddressing", "depthRange", "clipYFlip"]);
72
72
 
73
- /**
74
- * Translates one DXBC stage into GLSL ES 3.00 source, sharing one core path
75
- * between `CjsWebglFormat.emitGlsl` (static) and `EmitGlsl` (instance).
76
- *
77
- * `options` is a flat bag combining the emitter's ccpwgl-profile constructor
78
- * bits (`constantBufferStyle`, `pixelConstantBufferRemap`, `samplerName`,
79
- * `vertexStructuredCapacity`, `dataTextureWidth`) with its per-call Emit
80
- * options (`pairVaryings`, `source`); omitted keys keep the emitter's
81
- * existing defaults exactly.
82
- *
83
- * @param {ArrayBuffer|ArrayBufferView|Uint8Array} dxbcBytes DXBC container bytes.
84
- * @param {object} [options] Combined profile/emit options.
85
- * @returns {{source:string,stageName:string,inputs:object[],outputs:object[],bindings:object[],warnings:string[],computeFragment:(object|undefined)}}
86
- * GLSL text plus the IO contract the packaging layer records; compute
87
- * stages add the emitter's `computeFragment` host contract.
73
+ /**
74
+ * Translates one DXBC stage into GLSL ES 3.00 source, sharing one core path
75
+ * between `CjsWebglFormat.emitGlsl` (static) and `EmitGlsl` (instance).
76
+ *
77
+ * `options` is a flat bag combining the emitter's ccpwgl-profile constructor
78
+ * bits (`constantBufferStyle`, `pixelConstantBufferRemap`, `samplerName`,
79
+ * `vertexStructuredCapacity`, `dataTextureWidth`) with its per-call Emit
80
+ * options (`pairVaryings`, `source`); omitted keys keep the emitter's
81
+ * existing defaults exactly.
82
+ *
83
+ * @param {ArrayBuffer|ArrayBufferView|Uint8Array} dxbcBytes DXBC container bytes.
84
+ * @param {object} [options] Combined profile/emit options.
85
+ * @returns {{source:string,stageName:string,inputs:object[],outputs:object[],bindings:object[],warnings:string[],computeFragment:(object|undefined)}}
86
+ * GLSL text plus the IO contract the packaging layer records; compute
87
+ * stages add the emitter's `computeFragment` host contract.
88
88
  */
89
89
  function emitGlslWithOptions(dxbcBytes, options = {}) {
90
90
  if (!options || typeof options !== "object") {
@@ -118,34 +118,5 @@ function emitGlslWithOptions(dxbcBytes, options = {}) {
118
118
  };
119
119
  }
120
120
 
121
- /**
122
- * Deep-convert a value to plain JSON-compatible data. Typed arrays become
123
- * plain number arrays; Maps/Sets become objects/arrays; class instances
124
- * with toJSON are honoured.
125
- *
126
- * @param {any} value Value to convert.
127
- * @returns {any} Plain data.
128
- */
129
- function toJsonValue(value) {
130
- if (value === null || value === undefined) return value ?? null;
131
- if (typeof value === "number" || typeof value === "string" || typeof value === "boolean") return value;
132
- if (typeof value === "bigint") return value.toString();
133
- if (ArrayBuffer.isView(value)) return Array.from(value);
134
- if (Array.isArray(value)) return value.map(toJsonValue);
135
- if (value instanceof Map) {
136
- const out = {};
137
- for (const [key, entry] of value) out[key] = toJsonValue(entry);
138
- return out;
139
- }
140
- if (value instanceof Set) return Array.from(value, toJsonValue);
141
- if (typeof value === "object") {
142
- if (typeof value.toJSON === "function") return toJsonValue(value.toJSON());
143
- const out = {};
144
- for (const key of Object.keys(value)) out[key] = toJsonValue(value[key]);
145
- return out;
146
- }
147
- return null;
148
- }
149
-
150
- export { DEFAULT_VALUES, OUTPUT_JSON, emitGlslWithOptions, isWebglEffectContainer, normalizeValues, toJsonValue };
121
+ export { DEFAULT_VALUES, OUTPUT_JSON, emitGlslWithOptions, isWebglEffectContainer, normalizeValues };
151
122
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../../../../../src/resource/formats/webgl/core/helpers.js"],"sourcesContent":["import { asUint8Array } from \"#utils/bytes\";\r\n\r\n/**\r\n * Internal glue for CjsWebglFormat.\r\n *\r\n * Keeps the public class file small: input/option normalization, DXBC-to-GLSL\r\n * emission, and JSON conversion live here. Reading an effect is\r\n * `readGlslEffectContainer` and summarising one is `inspectGlslEffectContainer`;\r\n * neither needs glue, so neither is wrapped here. The GLSL emitter lives under\r\n * src/formats/webgl/core/glsl.\r\n */\r\n\r\nimport { DxbcGlslEmitter } from \"./glsl/DxbcGlslEmitter.js\";\r\nimport { applyPackedLightFixups } from \"./glsl/packedLightFixups.js\";\r\nimport { WebglReadError } from \"./errors.js\";\r\nimport {\r\n looksLikeCarbonEffectContainer\r\n} from \"../../../format/carbonEffect/CjsCarbonEffectReader.js\";\r\n\r\nexport const OUTPUT_JSON = \"json\";\r\n\r\nexport const DEFAULT_VALUES = Object.freeze({\r\n emit: OUTPUT_JSON,\r\n source: \"memory\"\r\n});\r\n\r\nconst VALID_EMITS = new Set([ OUTPUT_JSON ]);\r\nconst OPTION_KEYS = new Set([ \"emit\", \"source\" ]);\r\n\r\n/**\r\n * Merge format values over a base set and validate them.\r\n *\r\n * @param {object} base Current values.\r\n * @param {object} [options] Values to merge in.\r\n * @param {string} [readerName] Reader name used in error messages.\r\n * @returns {object} A validated copy of the merged values.\r\n */\r\nexport function normalizeValues(base, options = {}, readerName = \"CjsWebglFormat\")\r\n{\r\n if (!options || typeof options !== \"object\")\r\n {\r\n throw new TypeError(`${readerName}: options must be an object`);\r\n }\r\n for (const key of Object.keys(options))\r\n {\r\n if (!OPTION_KEYS.has(key))\r\n {\r\n throw new TypeError(`${readerName}: unknown option ${JSON.stringify(key)}`);\r\n }\r\n }\r\n\r\n const values = { ...base, ...options };\r\n\r\n if (!VALID_EMITS.has(values.emit))\r\n {\r\n throw new TypeError(`${readerName}: emit must be \"${OUTPUT_JSON}\", got ${JSON.stringify(values.emit)}`);\r\n }\r\n if (typeof values.source !== \"string\" || !values.source)\r\n {\r\n values.source = DEFAULT_VALUES.source;\r\n }\r\n\r\n return {\r\n emit: values.emit,\r\n source: values.source\r\n };\r\n}\r\n\r\n/**\r\n * Normalize caller input into a Uint8Array of package/DXBC bytes.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.\r\n * @returns {Uint8Array} The payload bytes.\r\n */\r\n/**\r\n * Reports whether a payload has the Carbon effect container shape.\r\n *\r\n * A shape check, not an identity check: our files are stock Carbon containers,\r\n * so nothing in the bytes distinguishes a WebGL one from a shipped\r\n * `effect.dx11`. Identity comes from the path the file was resolved through.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.\r\n * @returns {boolean} True when the payload has the container shape.\r\n */\r\nexport function isWebglEffectContainer(input)\r\n{\r\n try\r\n {\r\n return looksLikeCarbonEffectContainer(asUint8Array(input, \"CjsWebglFormat input\"));\r\n }\r\n catch\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nconst EMIT_GLSL_OPTION_KEYS = new Set([\r\n \"constantBufferStyle\",\r\n \"pixelConstantBufferRemap\",\r\n \"samplerName\",\r\n \"vertexStructuredCapacity\",\r\n \"dataTextureWidth\",\r\n \"stubResourceRegisters\",\r\n \"neutralResourceRegisters\",\r\n \"detailMapArrayRegisters\",\r\n \"lightConstantBuffer\",\r\n \"lightPackedTexture\",\r\n \"packedLightProfiles\",\r\n \"emulatedAddressing\",\r\n \"depthRange\",\r\n \"pairVaryings\",\r\n \"source\"\r\n]);\r\n\r\nconst EMIT_GLSL_PROFILE_KEYS = new Set([\r\n \"constantBufferStyle\",\r\n \"pixelConstantBufferRemap\",\r\n \"samplerName\",\r\n \"vertexStructuredCapacity\",\r\n \"dataTextureWidth\",\r\n \"stubResourceRegisters\",\r\n \"neutralResourceRegisters\",\r\n \"detailMapArrayRegisters\",\r\n \"lightConstantBuffer\",\r\n \"lightPackedTexture\",\r\n \"packedLightProfiles\",\r\n \"emulatedAddressing\",\r\n \"depthRange\"\r\n]);\r\n\r\n/**\r\n * Translates one DXBC stage into GLSL ES 3.00 source, sharing one core path\r\n * between `CjsWebglFormat.emitGlsl` (static) and `EmitGlsl` (instance).\r\n *\r\n * `options` is a flat bag combining the emitter's ccpwgl-profile constructor\r\n * bits (`constantBufferStyle`, `pixelConstantBufferRemap`, `samplerName`,\r\n * `vertexStructuredCapacity`, `dataTextureWidth`) with its per-call Emit\r\n * options (`pairVaryings`, `source`); omitted keys keep the emitter's\r\n * existing defaults exactly.\r\n *\r\n * @param {ArrayBuffer|ArrayBufferView|Uint8Array} dxbcBytes DXBC container bytes.\r\n * @param {object} [options] Combined profile/emit options.\r\n * @returns {{source:string,stageName:string,inputs:object[],outputs:object[],bindings:object[],warnings:string[],computeFragment:(object|undefined)}}\r\n * GLSL text plus the IO contract the packaging layer records; compute\r\n * stages add the emitter's `computeFragment` host contract.\r\n */\r\nexport function emitGlslWithOptions(dxbcBytes, options = {})\r\n{\r\n if (!options || typeof options !== \"object\")\r\n {\r\n throw new TypeError(\"CjsWebglFormat: emitGlsl options must be an object\");\r\n }\r\n for (const key of Object.keys(options))\r\n {\r\n if (!EMIT_GLSL_OPTION_KEYS.has(key))\r\n {\r\n throw new TypeError(`CjsWebglFormat: unknown emitGlsl option ${JSON.stringify(key)}`);\r\n }\r\n }\r\n\r\n const profile = {};\r\n for (const key of EMIT_GLSL_PROFILE_KEYS)\r\n {\r\n if (Object.prototype.hasOwnProperty.call(options, key)) profile[key] = options[key];\r\n }\r\n\r\n const emitter = new DxbcGlslEmitter({ profile });\r\n const result = emitter.Emit(dxbcBytes, {\r\n source: options.source,\r\n pairVaryings: options.pairVaryings\r\n });\r\n\r\n // The packed local-light lowering leaves two idioms that must not reach a\r\n // driver: a flag mask round-tripped through a float, and an all-bits mask\r\n // stored as a float and then used for branch control, where 0xFFFFFFFF is a\r\n // NaN. Applied here rather than at a call site so every caller gets them.\r\n if (!options.lightPackedTexture) return result;\r\n\r\n return {\r\n ...result,\r\n source: applyPackedLightFixups(result.source, result.stageName)\r\n };\r\n}\r\n\r\n/**\r\n * Deep-convert a value to plain JSON-compatible data. Typed arrays become\r\n * plain number arrays; Maps/Sets become objects/arrays; class instances\r\n * with toJSON are honoured.\r\n *\r\n * @param {any} value Value to convert.\r\n * @returns {any} Plain data.\r\n */\r\nexport function toJsonValue(value)\r\n{\r\n if (value === null || value === undefined) return value ?? null;\r\n if (typeof value === \"number\" || typeof value === \"string\" || typeof value === \"boolean\") return value;\r\n if (typeof value === \"bigint\") return value.toString();\r\n if (ArrayBuffer.isView(value)) return Array.from(value);\r\n if (Array.isArray(value)) return value.map(toJsonValue);\r\n if (value instanceof Map)\r\n {\r\n const out = {};\r\n for (const [ key, entry ] of value) out[key] = toJsonValue(entry);\r\n return out;\r\n }\r\n if (value instanceof Set) return Array.from(value, toJsonValue);\r\n if (typeof value === \"object\")\r\n {\r\n if (typeof value.toJSON === \"function\") return toJsonValue(value.toJSON());\r\n const out = {};\r\n for (const key of Object.keys(value)) out[key] = toJsonValue(value[key]);\r\n return out;\r\n }\r\n return null;\r\n}\r\n\r\nexport { WebglReadError };\r\n\r\n"],"names":["OUTPUT_JSON","DEFAULT_VALUES","Object","freeze","emit","source","VALID_EMITS","Set","OPTION_KEYS","normalizeValues","base","options","readerName","TypeError","key","keys","has","JSON","stringify","values","isWebglEffectContainer","input","looksLikeCarbonEffectContainer","asUint8Array","EMIT_GLSL_OPTION_KEYS","EMIT_GLSL_PROFILE_KEYS","emitGlslWithOptions","dxbcBytes","profile","prototype","hasOwnProperty","call","emitter","DxbcGlslEmitter","result","Emit","pairVaryings","lightPackedTexture","applyPackedLightFixups","stageName","toJsonValue","value","undefined","toString","ArrayBuffer","isView","Array","from","isArray","map","Map","out","entry","toJSON"],"mappings":";;;;;AAmBO,MAAMA,WAAW,GAAG;MAEdC,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AACxCC,EAAAA,IAAI,EAAEJ,WAAW;AACjBK,EAAAA,MAAM,EAAE;AACZ,CAAC;AAED,MAAMC,WAAW,GAAG,IAAIC,GAAG,CAAC,CAAEP,WAAW,CAAE,CAAC;AAC5C,MAAMQ,WAAW,GAAG,IAAID,GAAG,CAAC,CAAE,MAAM,EAAE,QAAQ,CAAE,CAAC;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,eAAeA,CAACC,IAAI,EAAEC,OAAO,GAAG,EAAE,EAAEC,UAAU,GAAG,gBAAgB,EACjF;AACI,EAAA,IAAI,CAACD,OAAO,IAAI,OAAOA,OAAO,KAAK,QAA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AAK,CAAE,IAAIX,KAAK,EAAEU,GAAG,CAACrC,GAAG,CAAC,GAAG0B,WAAW,CAACY,KAAK,CAAC;AACjE,IAAA,OAAOD,GAAG;AACd,EAAA;AACA,EAAA,IAAIV,KAAK,YAAYlC,GAAG,EAAE,OAAOuC,KAAK,CAACC,IAAI,CAACN,KAAK,EAAED,WAAW,CAAC;AAC/D,EAAA,IAAI,OAAOC,KAAK,KAAK,QAAQ,EAC7B;AACI,IAAA,IAAI,OAAOA,KAAK,CAACY,MAAM,KAAK,UAAU,EAAE,OAAOb,WAAW,CAACC,KAAK,CAACY,MAAM,EAAE,CAAC;IAC1E,MAAMF,GAAG,GAAG,EAAE;IACd,KAAK,MAAMrC,GAAG,IAAIZ,MAAM,CAACa,IAAI,CAAC0B,KAAK,CAAC,EAAEU,GAAG,CAACrC,GAAG,CAAC,GAAG0B,WAAW,CAACC,KAAK,CAAC3B,GAAG,CAAC,CAAC;AACxE,IAAA,OAAOqC,GAAG;AACd,EAAA;AACA,EAAA,OAAO,IAAI;AACf;;;;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../../../../../src/resource/formats/webgl/core/helpers.js"],"sourcesContent":["import { toJsonWithCollections as toJsonValue } from \"../../../format/jsonPolicies.js\";\nimport { asUint8Array } from \"#utils/bytes\";\n\n/**\n * Internal glue for CjsWebglFormat.\n *\n * Keeps the public class file small: input/option normalization, DXBC-to-GLSL\n * emission, and JSON conversion live here. Reading an effect is\n * `readGlslEffectContainer` and summarising one is `inspectGlslEffectContainer`;\n * neither needs glue, so neither is wrapped here. The GLSL emitter lives under\n * src/formats/webgl/core/glsl.\n */\n\nimport { DxbcGlslEmitter } from \"./glsl/DxbcGlslEmitter.js\";\nimport { applyPackedLightFixups } from \"./glsl/packedLightFixups.js\";\nimport { WebglReadError } from \"./errors.js\";\nimport {\n looksLikeCarbonEffectContainer\n} from \"../../../format/carbonEffect/CjsCarbonEffectReader.js\";\n\nexport const OUTPUT_JSON = \"json\";\n\nexport const DEFAULT_VALUES = Object.freeze({\n emit: OUTPUT_JSON,\n source: \"memory\"\n});\n\nconst VALID_EMITS = new Set([ OUTPUT_JSON ]);\nconst OPTION_KEYS = new Set([ \"emit\", \"source\" ]);\n\n/**\n * Merge format values over a base set and validate them.\n *\n * @param {object} base Current values.\n * @param {object} [options] Values to merge in.\n * @param {string} [readerName] Reader name used in error messages.\n * @returns {object} A validated copy of the merged values.\n */\nexport function normalizeValues(base, options = {}, readerName = \"CjsWebglFormat\")\n{\n if (!options || typeof options !== \"object\")\n {\n throw new TypeError(`${readerName}: options must be an object`);\n }\n for (const key of Object.keys(options))\n {\n if (!OPTION_KEYS.has(key))\n {\n throw new TypeError(`${readerName}: unknown option ${JSON.stringify(key)}`);\n }\n }\n\n const values = { ...base, ...options };\n\n if (!VALID_EMITS.has(values.emit))\n {\n throw new TypeError(`${readerName}: emit must be \"${OUTPUT_JSON}\", got ${JSON.stringify(values.emit)}`);\n }\n if (typeof values.source !== \"string\" || !values.source)\n {\n values.source = DEFAULT_VALUES.source;\n }\n\n return {\n emit: values.emit,\n source: values.source\n };\n}\n\n/**\n * Normalize caller input into a Uint8Array of package/DXBC bytes.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.\n * @returns {Uint8Array} The payload bytes.\n */\n/**\n * Reports whether a payload has the Carbon effect container shape.\n *\n * A shape check, not an identity check: our files are stock Carbon containers,\n * so nothing in the bytes distinguishes a WebGL one from a shipped\n * `effect.dx11`. Identity comes from the path the file was resolved through.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.\n * @returns {boolean} True when the payload has the container shape.\n */\nexport function isWebglEffectContainer(input)\n{\n try\n {\n return looksLikeCarbonEffectContainer(asUint8Array(input, \"CjsWebglFormat input\"));\n }\n catch\n {\n return false;\n }\n}\n\nconst EMIT_GLSL_OPTION_KEYS = new Set([\n \"constantBufferStyle\",\n \"pixelConstantBufferRemap\",\n \"samplerName\",\n \"vertexStructuredCapacity\",\n \"dataTextureWidth\",\n \"stubResourceRegisters\",\n \"neutralResourceRegisters\",\n \"detailMapArrayRegisters\",\n \"lightConstantBuffer\",\n \"lightPackedTexture\",\n \"packedLightProfiles\",\n \"emulatedAddressing\",\n \"depthRange\",\n \"clipYFlip\",\n \"pairVaryings\",\n \"source\"\n]);\n\nconst EMIT_GLSL_PROFILE_KEYS = new Set([\n \"constantBufferStyle\",\n \"pixelConstantBufferRemap\",\n \"samplerName\",\n \"vertexStructuredCapacity\",\n \"dataTextureWidth\",\n \"stubResourceRegisters\",\n \"neutralResourceRegisters\",\n \"detailMapArrayRegisters\",\n \"lightConstantBuffer\",\n \"lightPackedTexture\",\n \"packedLightProfiles\",\n \"emulatedAddressing\",\n \"depthRange\",\n \"clipYFlip\"\n]);\n\n/**\n * Translates one DXBC stage into GLSL ES 3.00 source, sharing one core path\n * between `CjsWebglFormat.emitGlsl` (static) and `EmitGlsl` (instance).\n *\n * `options` is a flat bag combining the emitter's ccpwgl-profile constructor\n * bits (`constantBufferStyle`, `pixelConstantBufferRemap`, `samplerName`,\n * `vertexStructuredCapacity`, `dataTextureWidth`) with its per-call Emit\n * options (`pairVaryings`, `source`); omitted keys keep the emitter's\n * existing defaults exactly.\n *\n * @param {ArrayBuffer|ArrayBufferView|Uint8Array} dxbcBytes DXBC container bytes.\n * @param {object} [options] Combined profile/emit options.\n * @returns {{source:string,stageName:string,inputs:object[],outputs:object[],bindings:object[],warnings:string[],computeFragment:(object|undefined)}}\n * GLSL text plus the IO contract the packaging layer records; compute\n * stages add the emitter's `computeFragment` host contract.\n */\nexport function emitGlslWithOptions(dxbcBytes, options = {})\n{\n if (!options || typeof options !== \"object\")\n {\n throw new TypeError(\"CjsWebglFormat: emitGlsl options must be an object\");\n }\n for (const key of Object.keys(options))\n {\n if (!EMIT_GLSL_OPTION_KEYS.has(key))\n {\n throw new TypeError(`CjsWebglFormat: unknown emitGlsl option ${JSON.stringify(key)}`);\n }\n }\n\n const profile = {};\n for (const key of EMIT_GLSL_PROFILE_KEYS)\n {\n if (Object.prototype.hasOwnProperty.call(options, key)) profile[key] = options[key];\n }\n\n const emitter = new DxbcGlslEmitter({ profile });\n const result = emitter.Emit(dxbcBytes, {\n source: options.source,\n pairVaryings: options.pairVaryings\n });\n\n // The packed local-light lowering leaves two idioms that must not reach a\n // driver: a flag mask round-tripped through a float, and an all-bits mask\n // stored as a float and then used for branch control, where 0xFFFFFFFF is a\n // NaN. Applied here rather than at a call site so every caller gets them.\n if (!options.lightPackedTexture) return result;\n\n return {\n ...result,\n source: applyPackedLightFixups(result.source, result.stageName)\n };\n}\n\n/**\n * Deep-convert a value to plain JSON-compatible data. Typed arrays become\n * plain number arrays; Maps/Sets become objects/arrays; class instances\n * with toJSON are honoured.\n *\n * @param {any} value Value to convert.\n * @returns {any} Plain data.\n */\n/** The shared JSON policy for this reader, under the name its callers use. */\nexport { toJsonValue };\n\nexport { WebglReadError };\n\n"],"names":["OUTPUT_JSON","DEFAULT_VALUES","Object","freeze","emit","source","VALID_EMITS","Set","OPTION_KEYS","normalizeValues","base","options","readerName","TypeError","key","keys","has","JSON","stringify","values","isWebglEffectContainer","input","looksLikeCarbonEffectContainer","asUint8Array","EMIT_GLSL_OPTION_KEYS","EMIT_GLSL_PROFILE_KEYS","emitGlslWithOptions","dxbcBytes","profile","prototype","hasOwnProperty","call","emitter","DxbcGlslEmitter","result","Emit","pairVaryings","lightPackedTexture","applyPackedLightFixups","stageName"],"mappings":";;;;;AAoBO,MAAMA,WAAW,GAAG;MAEdC,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AACxCC,EAAAA,IAAI,EAAEJ,WAAW;AACjBK,EAAAA,MAAM,EAAE;AACZ,CAAC;AAED,MAAMC,WAAW,GAAG,IAAIC,GAAG,CAAC,CAAEP,WAAW,CAAE,CAAC;AAC5C,MAAMQ,WAAW,GAAG,IAAID,GAAG,CAAC,CAAE,MAAM,EAAE,QAAQ,CAAE,CAAC;;AAEjD;AACA;AACA;AACA;AACA;AACA;AAC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MAAMc,OAAO,GAAG,EAAE;AAClB,EAAA,KAAK,MAAMd,GAAG,IAAIW,sBAAsB,EACxC;IACI,IAAIvB,MAAM,CAAC2B,SAAS,CAACC,cAAc,CAACC,IAAI,CAACpB,OAAO,EAAEG,GAAG,CAAC,EAAEc,OAAO,CAACd,GAAG,CAAC,GAAGH,OAAO,CAACG,GAAG,CAAC;AACvF,EAAA;AAEA,EAAA,MAAMkB,OAAO,GAAG,IAAIC,eAAe,CAAC;AAAEL,IAAAA;AAAQ,GAAC,CAAC;AAChD,EAAA,MAAMM,MAAM,GAAGF,OAAO,CAACG,IAAI,CAACR,SAAS,EAAE;IACnCtB,MAAM,EAAEM,OAAO,CAACN,MAAM;IACtB+B,YAAY,EAAEzB,OAAO,CAACyB;AAC1B,GAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,EAAA,IAAI,CAACzB,OAAO,CAAC0B,kBAAkB,EAAE,OAAOH,MAAM;EAE9C,OAAO;AACH,IAAA,GAAGA,MAAM;IACT7B,MAAM,EAAEiC,sBAAsB,CAACJ,MAAM,CAAC7B,MAAM,EAAE6B,MAAM,CAACK,SAAS;GACjE;AACL;;;;"}
@@ -6,7 +6,8 @@ import { buildWgslBindingPlan } from './core/wgsl/buildWgslBindingPlan.js';
6
6
  import { buildWgslSet } from './core/wgsl/buildWgslSet.js';
7
7
  import { buildEffectPackage } from './core/packageEffect.js';
8
8
  import { FORMAT_WEBGPU_PACKAGE_VERSION } from './core/packageMetadata.js';
9
- import { DEFAULT_VALUES, normalizeValues, validateClassKey, validateClass, readWithValues, inspectWithValues, analyzeEffectWithValues, toJsonValue, isCarbonWebgpu, OUTPUT_JSON, CARBON_WEBGPU_FORMAT, CARBON_WEBGPU_ANALYSIS_FORMAT } from './core/helpers.js';
9
+ import { DEFAULT_VALUES, normalizeValues, validateClassKey, validateClass, readWithValues, inspectWithValues, analyzeEffectWithValues, isCarbonWebgpu, OUTPUT_JSON, CARBON_WEBGPU_FORMAT, CARBON_WEBGPU_ANALYSIS_FORMAT } from './core/helpers.js';
10
+ import { toJsonWithCollections } from '../../format/jsonPolicies.js';
10
11
 
11
12
  const FORMAT_NAME = "CjsWebgpuFormat";
12
13
 
@@ -229,7 +230,7 @@ class CjsWebgpuFormat extends CjsFormat {
229
230
  * @returns {any} Plain JSON-compatible data.
230
231
  */
231
232
  ToJSON(value) {
232
- return toJsonValue(value);
233
+ return toJsonWithCollections(value);
233
234
  }
234
235
 
235
236
  /**
@@ -339,7 +340,7 @@ class CjsWebgpuFormat extends CjsFormat {
339
340
  * @returns {any} Plain JSON-compatible data.
340
341
  */
341
342
  static toJSON(value) {
342
- return toJsonValue(value);
343
+ return toJsonWithCollections(value);
343
344
  }
344
345
  static OUTPUT_JSON = OUTPUT_JSON;
345
346
  static CLASS_KEYS = CLASS_KEYS;
@@ -1 +1 @@
1
- {"version":3,"file":"CjsWebgpuFormat.js","sources":["../../../../../src/resource/formats/webgpu/CjsWebgpuFormat.js"],"sourcesContent":["import { CjsFormat } from \"../../format/CjsFormat.js\";\r\nimport { CLASS_KEYS } from \"./core/schema.js\";\r\nimport { lowerDxbcToIr } from \"./core/ir/lowerDxbcToIr.js\";\r\nimport { buildWgsl } from \"./core/wgsl/emitWgsl.js\";\r\nimport { buildWgslBindingPlan } from \"./core/wgsl/buildWgslBindingPlan.js\";\r\nimport { buildWgslSet } from \"./core/wgsl/buildWgslSet.js\";\r\nimport { buildEffectPackage } from \"./core/packageEffect.js\";\r\nimport { FORMAT_WEBGPU_PACKAGE_VERSION } from \"./core/packageMetadata.js\";\r\nimport {\r\n CARBON_WEBGPU_ANALYSIS_FORMAT,\r\n CARBON_WEBGPU_FORMAT,\r\n DEFAULT_VALUES,\r\n OUTPUT_JSON,\r\n analyzeEffectWithValues,\r\n inspectWithValues,\r\n isCarbonWebgpu,\r\n normalizeValues,\r\n readWithValues,\r\n toJsonValue,\r\n validateClass,\r\n validateClassKey\r\n} from \"./core/helpers.js\";\r\n\r\nconst FORMAT_NAME = \"CjsWebgpuFormat\";\r\n\r\n/**\r\n * CarbonEngineJS-facing format surface for `.carbonwebgpu` WebGPU packages, plus an\r\n * offline effect-analysis helper built on the runtime resource HLSL and DXBC\n * format subpaths.\r\n *\r\n * The package owns read/build, normalized shader analysis, and the current\r\n * bounded DXBC-to-WGSL profiles. Broader shader-semantic coverage remains an\r\n * explicit qualification ladder.\r\n */\r\nexport class CjsWebgpuFormat extends CjsFormat\r\n{\r\n #emit = DEFAULT_VALUES.emit;\r\n #source = DEFAULT_VALUES.source;\r\n #decodeInstructions = DEFAULT_VALUES.decodeInstructions;\r\n #permutation = DEFAULT_VALUES.permutation;\r\n #schema = DEFAULT_VALUES.schema;\r\n #classes = {};\r\n\r\n /**\r\n * Create a reusable format profile.\r\n *\r\n * @param {object} [options] Default format values.\r\n */\r\n constructor(options = {})\r\n {\r\n super();\r\n this.SetValues(options);\r\n }\r\n\r\n /**\r\n * Set format values for this reusable profile.\r\n *\r\n * @param {object} [options] Values to merge into the profile.\r\n * @returns {CjsWebgpuFormat} This format profile.\r\n */\r\n SetValues(options = {})\r\n {\r\n const values = normalizeValues(this.GetValues(), options, CLASS_KEYS, FORMAT_NAME);\r\n this.#emit = values.emit;\r\n this.#source = values.source;\r\n this.#decodeInstructions = values.decodeInstructions;\r\n this.#permutation = values.permutation;\r\n this.#schema = values.schema;\r\n this.#classes = values.classes;\r\n return this;\r\n }\r\n\r\n /**\r\n * Get this profile's current values, optionally with per-call overrides.\r\n *\r\n * @param {object} [options] Optional values to merge into a copy.\r\n * @returns {object} A copy of the effective values.\r\n */\r\n GetValues(options = {})\r\n {\r\n return normalizeValues({\r\n emit: this.#emit,\r\n source: this.#source,\r\n decodeInstructions: this.#decodeInstructions,\r\n permutation: this.#permutation,\r\n schema: this.#schema,\r\n classes: this.#classes\r\n }, options, CLASS_KEYS, FORMAT_NAME);\r\n }\r\n\r\n /**\r\n * Set multiple node-class constructors for this profile.\r\n *\r\n * @param {object} [classes] Map of node class keys to constructors.\r\n * @returns {CjsWebgpuFormat} This format profile.\r\n */\r\n SetClasses(classes = {})\r\n {\r\n return this.SetValues({ classes });\r\n }\r\n\r\n /**\r\n * Set one node-class constructor for this profile.\r\n *\r\n * @param {string} type Node class key.\r\n * @param {Function|null|undefined} Class constructor to use, or nullish to delete.\r\n * @returns {CjsWebgpuFormat} This format profile.\r\n */\r\n SetClass(type, Class)\r\n {\r\n validateClassKey(CLASS_KEYS, type, FORMAT_NAME);\r\n if (Class === null || Class === undefined)\r\n {\r\n delete this.#classes[type];\r\n return this;\r\n }\r\n\r\n validateClass(CLASS_KEYS, type, Class, FORMAT_NAME);\r\n this.#classes = { ...this.#classes, [type]: Class };\r\n return this;\r\n }\r\n\r\n /**\r\n * Get a configured node-class constructor.\r\n *\r\n * @param {string} type Node class key.\r\n * @returns {Function|undefined} The registered constructor, if any.\r\n */\r\n GetClass(type)\r\n {\r\n validateClassKey(CLASS_KEYS, type, FORMAT_NAME);\r\n return this.#classes[type];\r\n }\r\n\r\n /**\r\n * Whether this format profile has a constructor registered for a node key.\r\n *\r\n * @param {string} type Node class key.\r\n * @returns {boolean} True when a constructor is registered.\r\n */\r\n HasClass(type)\r\n {\r\n return !!this.GetClass(type);\r\n }\r\n\r\n /**\r\n * Read a Carbon WebGPU package with this profile's values.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU package bytes.\r\n * @param {object} [options] Per-call value overrides.\r\n * @returns {object} Plain JSON data: the container-backed views plus the complete backend body set.\r\n */\r\n Read(input, options = {})\r\n {\r\n return readWithValues(input, this.GetValues(options));\r\n }\r\n\r\n /**\r\n * Inspect a Carbon WebGPU package without building the full JSON shape.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU package bytes.\r\n * @param {object} [options] Per-call value overrides.\r\n * @returns {object} Plain summary data.\r\n */\r\n Inspect(input, options = {})\r\n {\r\n return inspectWithValues(input, this.GetValues(options));\r\n }\r\n\r\n /**\r\n * Analyzes one compiled effect payload into a normalized WebGPU-facing\r\n * document using the current profile's values.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Tr2 effect bytes.\r\n * @param {object} [options] Per-call value overrides.\r\n * @returns {object} Plain JSON-compatible analysis data.\r\n */\r\n AnalyzeEffect(input, options = {})\r\n {\r\n return analyzeEffectWithValues(input, this.GetValues(options));\r\n }\r\n\r\n /**\r\n * Builds a Carbon WebGPU package with complete version-15 source reflection and\r\n * selected-body WebGPU output from compiled Tr2 effect bytes.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView} input Compiled effect bytes.\r\n * @param {object} [options] Source, body-mode, permutation, and stage-selection policy.\r\n * @returns {object} Package bytes plus inspection and provenance documents.\r\n */\r\n BuildEffect(input, options = {})\r\n {\r\n const values = this.GetValues();\r\n\r\n return buildEffectPackage(input, {\r\n source: values.source,\r\n permutation: values.permutation,\r\n ...options\r\n });\r\n }\r\n\r\n /**\r\n * Lowers DXBC bytes or decoded instructions into the front-end shader IR.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView|object} input DXBC input.\r\n * @param {object} [options] IR provenance options.\r\n * @returns {object} Frozen shader IR program.\r\n */\r\n BuildShaderIr(input, options = {})\r\n {\r\n return lowerDxbcToIr(input, options);\r\n }\r\n\r\n /**\r\n * Emits WGSL for the currently supported typed shader slice.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView|object} input DXBC or shader IR.\r\n * @param {object} [options] Source/provenance options.\r\n * @returns {object} Frozen WGSL shader descriptor.\r\n */\r\n BuildWgsl(input, options = {})\r\n {\r\n return buildWgsl(input, options);\r\n }\r\n\r\n /**\r\n * Assign one canonical numeric binding layout across shader stages in a pass.\r\n * Unshared D3D tuples remain stage-scoped unless shared explicitly.\r\n *\r\n * @param {object[]} programs Complete CJS shader IR stage set for one pass.\r\n * @param {object} [options] Pass-level binding policy.\r\n * @param {string[]} [options.sharedIdentities] Compatible D3D identities\r\n * confirmed to represent one resource across stages.\r\n * @returns {object} Frozen CJS_WGSL_BINDING_PLAN document.\r\n */\r\n BuildWgslBindingPlan(programs, options = {})\r\n {\r\n return buildWgslBindingPlan(programs, options);\r\n }\r\n\r\n /**\r\n * Assembles emitted shader descriptors into a portable WGSL set.\r\n *\r\n * @param {object[]} entries Canonically keyed emitted shader descriptors.\r\n * @returns {object} Frozen CJS_WGSL_SET document.\r\n */\r\n BuildWgslSet(entries)\r\n {\r\n return buildWgslSet(entries);\r\n }\r\n\r\n /**\r\n * Convert format output to JSON-compatible data.\r\n *\r\n * @param {any} value Format output to convert.\r\n * @returns {any} Plain JSON-compatible data.\r\n */\r\n ToJSON(value)\r\n {\r\n return toJsonValue(value);\r\n }\r\n\r\n /**\r\n * Static payload sniff. Static methods use camelCase by convention.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate bytes.\r\n * @returns {boolean} True when the payload has Carbon's version-15 shape.\r\n */\r\n static isCarbonWebgpu(input)\r\n {\r\n return isCarbonWebgpu(input);\r\n }\r\n\r\n /**\r\n * Static one-shot read.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU package bytes.\r\n * @param {object} [options] Format values.\r\n * @returns {object} Plain JSON data: the container-backed views plus the complete backend body set.\r\n */\r\n static read(input, options = {})\r\n {\r\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, CLASS_KEYS, FORMAT_NAME));\r\n }\r\n\r\n /**\r\n * Static one-shot inspection.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU package bytes.\r\n * @param {object} [options] Format values.\r\n * @returns {object} Plain summary data.\r\n */\r\n static inspect(input, options = {})\r\n {\r\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, CLASS_KEYS, FORMAT_NAME));\r\n }\r\n\r\n /**\r\n * Static one-shot effect analysis.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Tr2 effect bytes.\r\n * @param {object} [options] Format values.\r\n * @returns {object} Plain JSON-compatible analysis data.\r\n */\r\n static analyzeEffect(input, options = {})\r\n {\r\n return analyzeEffectWithValues(input, normalizeValues(DEFAULT_VALUES, options, CLASS_KEYS, FORMAT_NAME));\r\n }\r\n\r\n /**\r\n * Static selected-body Carbon WebGPU builder.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView} input Compiled effect bytes.\r\n * @param {object} [options] Source, body-mode, permutation, and stage-selection policy.\r\n * @returns {object} Package bytes plus inspection and provenance documents.\r\n */\r\n static buildEffect(input, options = {})\r\n {\r\n return buildEffectPackage(input, options);\r\n }\r\n\r\n /**\r\n * Static DXBC-to-front-end-IR helper.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView|object} input DXBC input.\r\n * @param {object} [options] IR provenance options.\r\n * @returns {object} Frozen shader IR program.\r\n */\r\n static buildShaderIr(input, options = {})\r\n {\r\n return lowerDxbcToIr(input, options);\r\n }\r\n\r\n /**\r\n * Static WGSL emission helper for the currently supported typed slice.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView|object} input DXBC or shader IR.\r\n * @param {object} [options] Source/provenance options.\r\n * @returns {object} Frozen WGSL shader descriptor.\r\n */\r\n static buildWgsl(input, options = {})\r\n {\r\n return buildWgsl(input, options);\r\n }\r\n\r\n /**\r\n * Static pass-global WGSL binding-plan helper. Unshared D3D tuples remain\r\n * stage-scoped unless listed in options.sharedIdentities.\r\n *\r\n * @param {object[]} programs Complete CJS shader IR stage set for one pass.\r\n * @param {object} [options] Pass-level binding policy.\r\n * @param {string[]} [options.sharedIdentities] Compatible D3D identities\r\n * confirmed to represent one resource across stages.\r\n * @returns {object} Frozen CJS_WGSL_BINDING_PLAN document.\r\n */\r\n static buildWgslBindingPlan(programs, options = {})\r\n {\r\n return buildWgslBindingPlan(programs, options);\r\n }\r\n\r\n /**\r\n * Static WGSL-set assembly helper.\r\n *\r\n * @param {object[]} entries Canonically keyed emitted shader descriptors.\r\n * @returns {object} Frozen CJS_WGSL_SET document.\r\n */\r\n static buildWgslSet(entries)\r\n {\r\n return buildWgslSet(entries);\r\n }\r\n\r\n /**\r\n * Static JSON-compatible conversion.\r\n *\r\n * @param {any} value Format output to convert.\r\n * @returns {any} Plain JSON-compatible data.\r\n */\r\n static toJSON(value)\r\n {\r\n return toJsonValue(value);\r\n }\r\n\r\n static OUTPUT_JSON = OUTPUT_JSON;\r\n static CLASS_KEYS = CLASS_KEYS;\r\n static id = \"webgpu\";\r\n static mediaTypes = Object.freeze([ \"shader\" ]);\r\n static outputs = CjsFormat.defineOutputs({\r\n json: { default: true, decoded: true }\r\n });\r\n static extensions = Object.freeze([ \".carbonwebgpu\" ]);\r\n static format = CARBON_WEBGPU_FORMAT;\r\n static analysisFormat = CARBON_WEBGPU_ANALYSIS_FORMAT;\r\n static packageVersion = FORMAT_WEBGPU_PACKAGE_VERSION;\r\n}\r\n\r\nexport default CjsWebgpuFormat;\r\n"],"names":["FORMAT_NAME","CjsWebgpuFormat","CjsFormat","DEFAULT_VALUES","emit","source","decodeInstructions","permutation","schema","constructor","options","SetValues","values","normalizeValues","GetValues","CLASS_KEYS","classes","SetClasses","SetClass","type","Class","validateClassKey","undefined","validateClass","GetClass","HasClass","Read","input","readWithValues","Inspect","inspectWithValues","AnalyzeEffect","analyzeEffectWithValues","BuildEffect","buildEffectPackage","BuildShaderIr","lowerDxbcToIr","BuildWgsl","buildWgsl","BuildWgslBindingPlan","programs","buildWgslBindingPlan","BuildWgslSet","entries","buildWgslSet","ToJSON","value","toJsonValue","isCarbonWebgpu","read","inspect","analyzeEffect","buildEffect","buildShaderIr","toJSON","OUTPUT_JSON","id","mediaTypes","Object","freeze","outputs","defineOutputs","json","default","decoded","extensions","format","CARBON_WEBGPU_FORMAT","analysisFormat","CARBON_WEBGPU_ANALYSIS_FORMAT","packageVersion","FORMAT_WEBGPU_PACKAGE_VERSION"],"mappings":";;;;;;;;;;AAuBA,MAAMA,WAAW,GAAG,iBAAiB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,CAAC,CAAE,QAAQ,CAAE,CAAC;AAC/C,EAAA,OAAOC,OAAO,GAAG1D,SAAS,CAAC2D,aAAa,CAAC;AACrCC,IAAAA,IAAI,EAAE;AAAEC,MAAAA,OAAO,EAAE,IAAI;AAAEC,MAAAA,OAAO,EAAE;AAAK;AACzC,GAAC,CAAC;EACF,OAAOC,UAAU,GAAGP,MAAM,CAACC,MAAM,CAAC,CAAE,eAAe,CAAE,CAAC;EACtD,OAAOO,MAAM,GAAGC,oBAAoB;EACpC,OAAOC,cAAc,GAAGC,6BAA6B;EACrD,OAAOC,cAAc,GAAGC,6BAA6B;AACzD;;;;"}
1
+ {"version":3,"file":"CjsWebgpuFormat.js","sources":["../../../../../src/resource/formats/webgpu/CjsWebgpuFormat.js"],"sourcesContent":["import { CjsFormat } from \"../../format/CjsFormat.js\";\r\nimport { CLASS_KEYS } from \"./core/schema.js\";\r\nimport { lowerDxbcToIr } from \"./core/ir/lowerDxbcToIr.js\";\r\nimport { buildWgsl } from \"./core/wgsl/emitWgsl.js\";\r\nimport { buildWgslBindingPlan } from \"./core/wgsl/buildWgslBindingPlan.js\";\r\nimport { buildWgslSet } from \"./core/wgsl/buildWgslSet.js\";\r\nimport { buildEffectPackage } from \"./core/packageEffect.js\";\r\nimport { FORMAT_WEBGPU_PACKAGE_VERSION } from \"./core/packageMetadata.js\";\r\nimport {\r\n CARBON_WEBGPU_ANALYSIS_FORMAT,\r\n CARBON_WEBGPU_FORMAT,\r\n DEFAULT_VALUES,\r\n OUTPUT_JSON,\r\n analyzeEffectWithValues,\r\n inspectWithValues,\r\n isCarbonWebgpu,\r\n normalizeValues,\r\n readWithValues,\r\n toJsonValue,\r\n validateClass,\r\n validateClassKey\r\n} from \"./core/helpers.js\";\r\n\r\nconst FORMAT_NAME = \"CjsWebgpuFormat\";\r\n\r\n/**\r\n * CarbonEngineJS-facing format surface for `.carbonwebgpu` WebGPU packages, plus an\r\n * offline effect-analysis helper built on the runtime resource HLSL and DXBC\n * format subpaths.\r\n *\r\n * The package owns read/build, normalized shader analysis, and the current\r\n * bounded DXBC-to-WGSL profiles. Broader shader-semantic coverage remains an\r\n * explicit qualification ladder.\r\n */\r\nexport class CjsWebgpuFormat extends CjsFormat\r\n{\r\n #emit = DEFAULT_VALUES.emit;\r\n #source = DEFAULT_VALUES.source;\r\n #decodeInstructions = DEFAULT_VALUES.decodeInstructions;\r\n #permutation = DEFAULT_VALUES.permutation;\r\n #schema = DEFAULT_VALUES.schema;\r\n #classes = {};\r\n\r\n /**\r\n * Create a reusable format profile.\r\n *\r\n * @param {object} [options] Default format values.\r\n */\r\n constructor(options = {})\r\n {\r\n super();\r\n this.SetValues(options);\r\n }\r\n\r\n /**\r\n * Set format values for this reusable profile.\r\n *\r\n * @param {object} [options] Values to merge into the profile.\r\n * @returns {CjsWebgpuFormat} This format profile.\r\n */\r\n SetValues(options = {})\r\n {\r\n const values = normalizeValues(this.GetValues(), options, CLASS_KEYS, FORMAT_NAME);\r\n this.#emit = values.emit;\r\n this.#source = values.source;\r\n this.#decodeInstructions = values.decodeInstructions;\r\n this.#permutation = values.permutation;\r\n this.#schema = values.schema;\r\n this.#classes = values.classes;\r\n return this;\r\n }\r\n\r\n /**\r\n * Get this profile's current values, optionally with per-call overrides.\r\n *\r\n * @param {object} [options] Optional values to merge into a copy.\r\n * @returns {object} A copy of the effective values.\r\n */\r\n GetValues(options = {})\r\n {\r\n return normalizeValues({\r\n emit: this.#emit,\r\n source: this.#source,\r\n decodeInstructions: this.#decodeInstructions,\r\n permutation: this.#permutation,\r\n schema: this.#schema,\r\n classes: this.#classes\r\n }, options, CLASS_KEYS, FORMAT_NAME);\r\n }\r\n\r\n /**\r\n * Set multiple node-class constructors for this profile.\r\n *\r\n * @param {object} [classes] Map of node class keys to constructors.\r\n * @returns {CjsWebgpuFormat} This format profile.\r\n */\r\n SetClasses(classes = {})\r\n {\r\n return this.SetValues({ classes });\r\n }\r\n\r\n /**\r\n * Set one node-class constructor for this profile.\r\n *\r\n * @param {string} type Node class key.\r\n * @param {Function|null|undefined} Class constructor to use, or nullish to delete.\r\n * @returns {CjsWebgpuFormat} This format profile.\r\n */\r\n SetClass(type, Class)\r\n {\r\n validateClassKey(CLASS_KEYS, type, FORMAT_NAME);\r\n if (Class === null || Class === undefined)\r\n {\r\n delete this.#classes[type];\r\n return this;\r\n }\r\n\r\n validateClass(CLASS_KEYS, type, Class, FORMAT_NAME);\r\n this.#classes = { ...this.#classes, [type]: Class };\r\n return this;\r\n }\r\n\r\n /**\r\n * Get a configured node-class constructor.\r\n *\r\n * @param {string} type Node class key.\r\n * @returns {Function|undefined} The registered constructor, if any.\r\n */\r\n GetClass(type)\r\n {\r\n validateClassKey(CLASS_KEYS, type, FORMAT_NAME);\r\n return this.#classes[type];\r\n }\r\n\r\n /**\r\n * Whether this format profile has a constructor registered for a node key.\r\n *\r\n * @param {string} type Node class key.\r\n * @returns {boolean} True when a constructor is registered.\r\n */\r\n HasClass(type)\r\n {\r\n return !!this.GetClass(type);\r\n }\r\n\r\n /**\r\n * Read a Carbon WebGPU package with this profile's values.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU package bytes.\r\n * @param {object} [options] Per-call value overrides.\r\n * @returns {object} Plain JSON data: the container-backed views plus the complete backend body set.\r\n */\r\n Read(input, options = {})\r\n {\r\n return readWithValues(input, this.GetValues(options));\r\n }\r\n\r\n /**\r\n * Inspect a Carbon WebGPU package without building the full JSON shape.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU package bytes.\r\n * @param {object} [options] Per-call value overrides.\r\n * @returns {object} Plain summary data.\r\n */\r\n Inspect(input, options = {})\r\n {\r\n return inspectWithValues(input, this.GetValues(options));\r\n }\r\n\r\n /**\r\n * Analyzes one compiled effect payload into a normalized WebGPU-facing\r\n * document using the current profile's values.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Tr2 effect bytes.\r\n * @param {object} [options] Per-call value overrides.\r\n * @returns {object} Plain JSON-compatible analysis data.\r\n */\r\n AnalyzeEffect(input, options = {})\r\n {\r\n return analyzeEffectWithValues(input, this.GetValues(options));\r\n }\r\n\r\n /**\r\n * Builds a Carbon WebGPU package with complete version-15 source reflection and\r\n * selected-body WebGPU output from compiled Tr2 effect bytes.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView} input Compiled effect bytes.\r\n * @param {object} [options] Source, body-mode, permutation, and stage-selection policy.\r\n * @returns {object} Package bytes plus inspection and provenance documents.\r\n */\r\n BuildEffect(input, options = {})\r\n {\r\n const values = this.GetValues();\r\n\r\n return buildEffectPackage(input, {\r\n source: values.source,\r\n permutation: values.permutation,\r\n ...options\r\n });\r\n }\r\n\r\n /**\r\n * Lowers DXBC bytes or decoded instructions into the front-end shader IR.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView|object} input DXBC input.\r\n * @param {object} [options] IR provenance options.\r\n * @returns {object} Frozen shader IR program.\r\n */\r\n BuildShaderIr(input, options = {})\r\n {\r\n return lowerDxbcToIr(input, options);\r\n }\r\n\r\n /**\r\n * Emits WGSL for the currently supported typed shader slice.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView|object} input DXBC or shader IR.\r\n * @param {object} [options] Source/provenance options.\r\n * @returns {object} Frozen WGSL shader descriptor.\r\n */\r\n BuildWgsl(input, options = {})\r\n {\r\n return buildWgsl(input, options);\r\n }\r\n\r\n /**\r\n * Assign one canonical numeric binding layout across shader stages in a pass.\r\n * Unshared D3D tuples remain stage-scoped unless shared explicitly.\r\n *\r\n * @param {object[]} programs Complete CJS shader IR stage set for one pass.\r\n * @param {object} [options] Pass-level binding policy.\r\n * @param {string[]} [options.sharedIdentities] Compatible D3D identities\r\n * confirmed to represent one resource across stages.\r\n * @returns {object} Frozen CJS_WGSL_BINDING_PLAN document.\r\n */\r\n BuildWgslBindingPlan(programs, options = {})\r\n {\r\n return buildWgslBindingPlan(programs, options);\r\n }\r\n\r\n /**\r\n * Assembles emitted shader descriptors into a portable WGSL set.\r\n *\r\n * @param {object[]} entries Canonically keyed emitted shader descriptors.\r\n * @returns {object} Frozen CJS_WGSL_SET document.\r\n */\r\n BuildWgslSet(entries)\r\n {\r\n return buildWgslSet(entries);\r\n }\r\n\r\n /**\r\n * Convert format output to JSON-compatible data.\r\n *\r\n * @param {any} value Format output to convert.\r\n * @returns {any} Plain JSON-compatible data.\r\n */\r\n ToJSON(value)\r\n {\r\n return toJsonValue(value);\r\n }\r\n\r\n /**\r\n * Static payload sniff. Static methods use camelCase by convention.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate bytes.\r\n * @returns {boolean} True when the payload has Carbon's version-15 shape.\r\n */\r\n static isCarbonWebgpu(input)\r\n {\r\n return isCarbonWebgpu(input);\r\n }\r\n\r\n /**\r\n * Static one-shot read.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU package bytes.\r\n * @param {object} [options] Format values.\r\n * @returns {object} Plain JSON data: the container-backed views plus the complete backend body set.\r\n */\r\n static read(input, options = {})\r\n {\r\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, CLASS_KEYS, FORMAT_NAME));\r\n }\r\n\r\n /**\r\n * Static one-shot inspection.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU package bytes.\r\n * @param {object} [options] Format values.\r\n * @returns {object} Plain summary data.\r\n */\r\n static inspect(input, options = {})\r\n {\r\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, CLASS_KEYS, FORMAT_NAME));\r\n }\r\n\r\n /**\r\n * Static one-shot effect analysis.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Tr2 effect bytes.\r\n * @param {object} [options] Format values.\r\n * @returns {object} Plain JSON-compatible analysis data.\r\n */\r\n static analyzeEffect(input, options = {})\r\n {\r\n return analyzeEffectWithValues(input, normalizeValues(DEFAULT_VALUES, options, CLASS_KEYS, FORMAT_NAME));\r\n }\r\n\r\n /**\r\n * Static selected-body Carbon WebGPU builder.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView} input Compiled effect bytes.\r\n * @param {object} [options] Source, body-mode, permutation, and stage-selection policy.\r\n * @returns {object} Package bytes plus inspection and provenance documents.\r\n */\r\n static buildEffect(input, options = {})\r\n {\r\n return buildEffectPackage(input, options);\r\n }\r\n\r\n /**\r\n * Static DXBC-to-front-end-IR helper.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView|object} input DXBC input.\r\n * @param {object} [options] IR provenance options.\r\n * @returns {object} Frozen shader IR program.\r\n */\r\n static buildShaderIr(input, options = {})\r\n {\r\n return lowerDxbcToIr(input, options);\r\n }\r\n\r\n /**\r\n * Static WGSL emission helper for the currently supported typed slice.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|ArrayBufferView|object} input DXBC or shader IR.\r\n * @param {object} [options] Source/provenance options.\r\n * @returns {object} Frozen WGSL shader descriptor.\r\n */\r\n static buildWgsl(input, options = {})\r\n {\r\n return buildWgsl(input, options);\r\n }\r\n\r\n /**\r\n * Static pass-global WGSL binding-plan helper. Unshared D3D tuples remain\r\n * stage-scoped unless listed in options.sharedIdentities.\r\n *\r\n * @param {object[]} programs Complete CJS shader IR stage set for one pass.\r\n * @param {object} [options] Pass-level binding policy.\r\n * @param {string[]} [options.sharedIdentities] Compatible D3D identities\r\n * confirmed to represent one resource across stages.\r\n * @returns {object} Frozen CJS_WGSL_BINDING_PLAN document.\r\n */\r\n static buildWgslBindingPlan(programs, options = {})\r\n {\r\n return buildWgslBindingPlan(programs, options);\r\n }\r\n\r\n /**\r\n * Static WGSL-set assembly helper.\r\n *\r\n * @param {object[]} entries Canonically keyed emitted shader descriptors.\r\n * @returns {object} Frozen CJS_WGSL_SET document.\r\n */\r\n static buildWgslSet(entries)\r\n {\r\n return buildWgslSet(entries);\r\n }\r\n\r\n /**\r\n * Static JSON-compatible conversion.\r\n *\r\n * @param {any} value Format output to convert.\r\n * @returns {any} Plain JSON-compatible data.\r\n */\r\n static toJSON(value)\r\n {\r\n return toJsonValue(value);\r\n }\r\n\r\n static OUTPUT_JSON = OUTPUT_JSON;\r\n static CLASS_KEYS = CLASS_KEYS;\r\n static id = \"webgpu\";\r\n static mediaTypes = Object.freeze([ \"shader\" ]);\r\n static outputs = CjsFormat.defineOutputs({\r\n json: { default: true, decoded: true }\r\n });\r\n static extensions = Object.freeze([ \".carbonwebgpu\" ]);\r\n static format = CARBON_WEBGPU_FORMAT;\r\n static analysisFormat = CARBON_WEBGPU_ANALYSIS_FORMAT;\r\n static packageVersion = FORMAT_WEBGPU_PACKAGE_VERSION;\r\n}\r\n\r\nexport default CjsWebgpuFormat;\r\n"],"names":["FORMAT_NAME","CjsWebgpuFormat","CjsFormat","DEFAULT_VALUES","emit","source","decodeInstructions","permutation","schema","constructor","options","SetValues","values","normalizeValues","GetValues","CLASS_KEYS","classes","SetClasses","SetClass","type","Class","validateClassKey","undefined","validateClass","GetClass","HasClass","Read","input","readWithValues","Inspect","inspectWithValues","AnalyzeEffect","analyzeEffectWithValues","BuildEffect","buildEffectPackage","BuildShaderIr","lowerDxbcToIr","BuildWgsl","buildWgsl","BuildWgslBindingPlan","programs","buildWgslBindingPlan","BuildWgslSet","entries","buildWgslSet","ToJSON","value","toJsonValue","isCarbonWebgpu","read","inspect","analyzeEffect","buildEffect","buildShaderIr","toJSON","OUTPUT_JSON","id","mediaTypes","Object","freeze","outputs","defineOutputs","json","default","decoded","extensions","format","CARBON_WEBGPU_FORMAT","analysisFormat","CARBON_WEBGPU_ANALYSIS_FORMAT","packageVersion","FORMAT_WEBGPU_PACKAGE_VERSION"],"mappings":";;;;;;;;;;;AAuBA,MAAMA,WAAW,GAAG,iBAAiB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,SAASC,SAAS,CAC9C;AACI,EAAA,KAAK,GAAGC,cAAc,CAACC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AE;AAAEC,MAAAA,OAAO,EAAE,IAAI;AAAEC,MAAAA,OAAO,EAAE;AAAK;AACzC,GAAC,CAAC;EACF,OAAOC,UAAU,GAAGP,MAAM,CAACC,MAAM,CAAC,CAAE,eAAe,CAAE,CAAC;EACtD,OAAOO,MAAM,GAAGC,oBAAoB;EACpC,OAAOC,cAAc,GAAGC,6BAA6B;EACrD,OAAOC,cAAc,GAAGC,6BAA6B;AACzD;;;;"}
@@ -1,3 +1,4 @@
1
+ import { toJsonWithCollections } from '../../../format/jsonPolicies.js';
1
2
  import { asUint8Array } from '#utils/bytes';
2
3
  import { CjsDxbcFormat } from '../../dxbc/CjsDxbcFormat.js';
3
4
  import { readEffectAnalysis, normalizeBytecodeBytes } from './effectAnalysis.js';
@@ -212,7 +213,7 @@ function packageToJson(container, options = {}) {
212
213
  const wgsl = deriveWgsl(container, {
213
214
  permutationIndex
214
215
  });
215
- return toJsonValue({
216
+ return toJsonWithCollections({
216
217
  format: CARBON_WEBGPU_FORMAT,
217
218
  version: container.carbon.version,
218
219
  sourcePath: source,
@@ -379,7 +380,7 @@ function buildEffectAnalysis(resolved, options = {}) {
379
380
  bytecodeBytes: resolvedStageBytecode(stage, key, bytecodeByKey)
380
381
  });
381
382
  });
382
- return toJsonValue({
383
+ return toJsonWithCollections({
383
384
  format: CARBON_WEBGPU_ANALYSIS_FORMAT,
384
385
  formatVersion: CARBON_WEBGPU_ANALYSIS_VERSION,
385
386
  source,
@@ -415,32 +416,5 @@ function analyzeEffectWithValues(input, values) {
415
416
  });
416
417
  }
417
418
 
418
- /**
419
- * Deep-convert a value to plain JSON-compatible data.
420
- *
421
- * @param {any} value Value to convert.
422
- * @returns {any} Plain data.
423
- */
424
- function toJsonValue(value) {
425
- if (value === null || value === undefined) return value ?? null;
426
- if (typeof value === "number" || typeof value === "string" || typeof value === "boolean") return value;
427
- if (typeof value === "bigint") return value.toString();
428
- if (ArrayBuffer.isView(value)) return Array.from(value);
429
- if (Array.isArray(value)) return value.map(toJsonValue);
430
- if (value instanceof Map) {
431
- const out = {};
432
- for (const [key, entry] of value) out[key] = toJsonValue(entry);
433
- return out;
434
- }
435
- if (value instanceof Set) return Array.from(value, toJsonValue);
436
- if (typeof value === "object") {
437
- if (typeof value.toJSON === "function") return toJsonValue(value.toJSON());
438
- const out = {};
439
- for (const key of Object.keys(value)) out[key] = toJsonValue(value[key]);
440
- return out;
441
- }
442
- return null;
443
- }
444
-
445
- export { CARBON_WEBGPU_ANALYSIS_FORMAT, CARBON_WEBGPU_ANALYSIS_VERSION, CARBON_WEBGPU_FORMAT, DEFAULT_VALUES, OUTPUT_JSON, WebgpuReadError, analyzeEffectWithValues, buildEffectAnalysis, inspectWithValues, isCarbonWebgpu, normalizeValues, packageToJson, readRaw, readWithValues, toJsonValue, validateClass, validateClassKey };
419
+ export { CARBON_WEBGPU_ANALYSIS_FORMAT, CARBON_WEBGPU_ANALYSIS_VERSION, CARBON_WEBGPU_FORMAT, DEFAULT_VALUES, OUTPUT_JSON, WebgpuReadError, analyzeEffectWithValues, buildEffectAnalysis, inspectWithValues, isCarbonWebgpu, normalizeValues, packageToJson, readRaw, readWithValues, toJsonWithCollections as toJsonValue, validateClass, validateClassKey };
446
420
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../../../../../src/resource/formats/webgpu/core/helpers.js"],"sourcesContent":["import { asUint8Array } from \"#utils/bytes\";\nimport CjsDxbcFormat from \"../../dxbc/index.js\";\nimport { normalizeBytecodeBytes, readEffectAnalysis } from \"./effectAnalysis.js\";\n\nimport { CarbonWebgpuContainer, looksLikeCarbonWebgpuContainer } from \"./carbonWebgpu/CarbonWebgpuContainer.js\";\nimport { validateEffectContainer } from \"./carbonWebgpu/validateContainer.js\";\nimport {\n deriveAnalysis,\n deriveBackendBodySet,\n deriveInfo,\n deriveMetadata,\n deriveWgsl,\n resolvedPermutationIndex\n} from \"./carbonWebgpu/containerViews.js\";\nimport { WebgpuReadError } from \"./errors.js\";\nimport { lowerDxbcToIr } from \"./ir/lowerDxbcToIr.js\";\nimport {\n normalizeEffectPermutation,\n validateResolvedPermutation\n} from \"./packageEffectSelection.js\";\n\nexport const OUTPUT_JSON = \"json\";\nexport const CARBON_WEBGPU_FORMAT = \"CARBON_WEBGPU\";\nexport const CARBON_WEBGPU_ANALYSIS_FORMAT = \"CARBON_WEBGPU_ANALYSIS\";\nexport const CARBON_WEBGPU_ANALYSIS_VERSION = 1;\n\nexport const DEFAULT_VALUES = Object.freeze({\n emit: OUTPUT_JSON,\n source: \"memory\",\n decodeInstructions: true,\n permutation: null,\n schema: null,\n classes: Object.freeze({})\n});\n\nconst OPTION_KEYS = new Set([ \"emit\", \"source\", \"decodeInstructions\", \"permutation\", \"schema\", \"classes\" ]);\n// One emit, as WebGL has. `Read` returns the container-backed document and that\n// document is complete: the analysis, WGSL, metadata and permutation views the\n// caller selects among, plus `backendBodySet`, which is every translated body\n// joined to its shared translation units.\n//\n// A second `raw` emit used to hand back the live `CarbonWebgpuContainer` because\n// the chunk package's JSON could not express the body set. It became the only way\n// to reach a body, so the former `engine-webgpu` donor duck-typed the container instead of reading\n// the document - and when the chunk package was replaced, the engine kept asking\n// for a shape the producer had stopped emitting. Both halves then failed, in\n// different directions, for weeks: the default emit built pipelines but resolved\n// no bodies, and the raw emit resolved bodies but built no pipelines.\n//\n// Neither is reachable now. The container stays internal to this module.\nconst VALID_EMITS = new Set([ OUTPUT_JSON ]);\n\n\nfunction normalizeEmit(emit, readerName)\n{\n if (emit === undefined || VALID_EMITS.has(emit)) return OUTPUT_JSON;\n throw new TypeError(`${readerName}: emit must be \"${OUTPUT_JSON}\", got ${JSON.stringify(emit)}`);\n}\n\nfunction assertKnownOptions(options, readerName)\n{\n for (const key of Object.keys(options))\n {\n if (!OPTION_KEYS.has(key))\n {\n throw new TypeError(`${readerName}: unknown option ${JSON.stringify(key)}`);\n }\n }\n}\n\nfunction classMap(values)\n{\n return values && values.classes ? values.classes : {};\n}\n\nfunction cloneValues(values)\n{\n return {\n emit: values.emit,\n source: values.source ?? DEFAULT_VALUES.source,\n decodeInstructions: values.decodeInstructions ?? DEFAULT_VALUES.decodeInstructions,\n permutation: values.permutation ?? null,\n schema: values.schema ?? null,\n classes: { ...classMap(values) }\n };\n}\n\n/**\n * Rejects class override keys outside a format reader's supported class set.\n *\n * @param {string[]} classKeys Supported class override keys.\n * @param {string} key Candidate override key.\n * @param {string} readerName Reader name used in diagnostics.\n */\nexport function validateClassKey(classKeys, key, readerName)\n{\n if (!classKeys.includes(key))\n {\n throw new Error(`${readerName} unknown class type \"${String(key)}\"`);\n }\n}\n\n/**\n * Validates one constructor supplied through a format reader class override.\n *\n * @param {string[]} classKeys Supported class override keys.\n * @param {string} type Candidate override key.\n * @param {Function} Class Candidate constructor.\n * @param {string} readerName Reader name used in diagnostics.\n */\nexport function validateClass(classKeys, type, Class, readerName)\n{\n validateClassKey(classKeys, type, readerName);\n if (typeof Class !== \"function\")\n {\n throw new TypeError(`${readerName} class \"${type}\" must be a constructor`);\n }\n}\n\nfunction mergeClasses(values, classes, classKeys, readerName)\n{\n if (!classes || typeof classes !== \"object\")\n {\n throw new TypeError(`${readerName} classes option must be an object`);\n }\n\n const next = { ...values.classes };\n for (const [ type, Class ] of Object.entries(classes))\n {\n validateClass(classKeys, type, Class, readerName);\n next[type] = Class;\n }\n values.classes = next;\n}\n\n/**\n * Merge format values over a base set and validate them.\n *\n * @param {object} base Current values.\n * @param {object} [options] Values to merge in.\n * @param {string[]} classKeys Valid class keys.\n * @param {string} readerName Reader name used in error messages.\n * @returns {object} A validated copy of the merged values.\n */\nexport function normalizeValues(base, options = {}, classKeys = [], readerName = \"CjsWebgpuFormat\")\n{\n if (!options || typeof options !== \"object\")\n {\n throw new TypeError(`${readerName} options must be an object`);\n }\n\n assertKnownOptions(options, readerName);\n\n const values = cloneValues(base);\n if (Object.hasOwn(options, \"emit\")) values.emit = normalizeEmit(options.emit, readerName);\n if (Object.hasOwn(options, \"source\")) values.source = typeof options.source === \"string\" && options.source ? options.source : DEFAULT_VALUES.source;\n if (Object.hasOwn(options, \"decodeInstructions\")) values.decodeInstructions = !!options.decodeInstructions;\n if (Object.hasOwn(options, \"permutation\")) values.permutation = options.permutation ?? null;\n if (Object.hasOwn(options, \"schema\")) values.schema = options.schema ?? null;\n if (Object.hasOwn(options, \"classes\")) mergeClasses(values, options.classes, classKeys, readerName);\n return values;\n}\n\n/**\n * Normalize caller input into a Uint8Array of package bytes.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.\n * @returns {Uint8Array} The payload bytes.\n */\r/**\n * Reports whether a payload has the Carbon v15 container shape.\n *\n * This is a **shape** check, not an identity check. Our containers are stock\n * Carbon v15 files, so nothing in the bytes separates one from a shipped\n * `effect.dx11` file -- and nothing should. Identity comes from the resource\n * path the file was resolved through, exactly as it does for Carbon, whose own\n * three backend trees are byte-format-identical with no language field anywhere.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.\n * @returns {boolean} True when the payload opens on Carbon's v15 version dword.\n */\nexport function isCarbonWebgpu(input)\n{\n try\n {\n return looksLikeCarbonWebgpuContainer(asUint8Array(input, \"CjsWebgpuFormat input\"));\n }\n catch\n {\n return false;\n }\n}\n\n/**\n * The shared read path used by the instance Read/Inspect and static one-shots.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU container payload.\n * @param {object} values Normalized format values.\n * @returns {CarbonWebgpuContainer} The loaded container.\n */\nexport function readRaw(input, values)\n{\n const bytes = asUint8Array(input, \"CjsWebgpuFormat input\");\n const container = new CarbonWebgpuContainer();\n const ok = container.Read(bytes, { sourcePath: values.source });\n\n if (!ok)\n {\n throw new WebgpuReadError(\n container.readError ? container.readError.message : \"Failed to read Carbon WebGPU container\",\n {\n source: values.source,\n cause: container.readError || null\n }\n );\n }\n\n try\n {\n validateEffectContainer(container, { source: values.source });\n }\n catch (error)\n {\n if (error instanceof WebgpuReadError) throw error;\n throw new WebgpuReadError(error.message, {\n source: values.source,\n cause: error\n });\n }\n\n return container;\n}\n\n/**\n * Converts a loaded container to the documented plain JSON shape.\n *\n * `analysis` and `wgsl` are **derived views**, not stored documents. The chunk\n * package kept them beside the reflection they were computed from and carried\n * digests to detect the two disagreeing; there is now one document, so there is\n * nothing left to disagree and no digest to carry.\n *\n * `chunks` is gone. It described a container that no longer exists, and a record\n * layout has no chunk table to translate it into.\n *\n * @param {CarbonWebgpuContainer} container Loaded container.\n * @param {object} [options] View options.\n * @returns {object} Plain JSON data.\n */\nexport function packageToJson(container, options = {})\n{\n const source = options.source || container.sourcePath || \"memory\";\n const permutationIndex = options.permutationIndex ?? resolvedPermutationIndex(container);\n const analysis = deriveAnalysis(container, { source, permutationIndex });\n const wgsl = deriveWgsl(container, { permutationIndex });\n\n return toJsonValue({\n format: CARBON_WEBGPU_FORMAT,\n version: container.carbon.version,\n sourcePath: source,\n info: deriveInfo(container, { source }),\n metadata: deriveMetadata(container, { source, permutationIndex }),\n permutationGraph: container.permutationGraph,\n analysis,\n wgsl,\n backendBodySet: deriveBackendBodySet(container),\n stages: analysis.stages ?? [],\n shaders: wgsl.shaders ?? [],\n layouts: wgsl.layouts ?? []\n });\n}\n\n/**\n * Shared read entry.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU container payload.\n * @param {object} values Normalized format values.\n * @returns {object} Plain JSON data.\n */\nexport function readWithValues(input, values)\n{\n return packageToJson(readRaw(input, values), { source: values.source });\n}\n\n/**\n * Compact inspection: Carbon version and compiler bytes, body counts, and the\n * resolved analysis/WGSL counts without building the full JSON package shape.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU container payload.\n * @param {object} values Normalized format values.\n * @returns {object} Plain summary data.\n */\nexport function inspectWithValues(input, values)\n{\n const container = readRaw(input, values);\n const graph = container.permutationGraph;\n const permutationIndex = resolvedPermutationIndex(container);\n const analysis = deriveAnalysis(container, { source: values.source, permutationIndex });\n const wgsl = deriveWgsl(container, { permutationIndex });\n\n return {\n source: values.source,\n isCarbonWebgpu: true,\n version: container.carbon.version,\n compilerVersion: [ ...container.carbon.compilerVersion ],\n permutationCount: graph.variants.length,\n uniqueBodyCount: graph.bodies.length,\n stageCount: analysis.stages.length,\n shaderCount: wgsl.shaders.length,\n layoutCount: wgsl.layouts.length\n };\n}\n\nfunction dxbcSource(source, key)\n{\n return source ? `${source}#${key}` : key;\n}\n\nfunction resolvedStageBytecode(stage, key, bytecodeByKey)\n{\n if (!Number.isInteger(stage.stageType)\n || !Number.isInteger(stage.passIndex)\n || typeof stage.techniqueName !== \"string\"\n || !stage.techniqueName\n || typeof stage.stageName !== \"string\"\n || !stage.stageName)\n {\n throw new Error(`${key} manifest stage identity is invalid`);\n }\n\n const innerStageType = stage.shaderBytecode?.stageType;\n if (innerStageType !== undefined && !Number.isInteger(innerStageType))\n {\n throw new Error(`${key} manifest stage bytecode type is invalid`);\n }\n\n let raw = bytecodeByKey?.get(key);\n if (!raw && bytecodeByKey instanceof Map)\n {\n raw = Array.from(bytecodeByKey.values()).find((entry) =>\n entry.techniqueName === stage.techniqueName\n && entry.passIndex === stage.passIndex\n && entry.stageType === stage.stageType\n );\n }\n if (!raw) return stage.shaderBytecode?.bytes;\n\n if (!Number.isInteger(raw.stageType)\n || stage.stageType !== raw.stageType\n || (innerStageType !== undefined && innerStageType !== raw.stageType)\n || stage.stageName !== raw.stageName\n || (stage.shaderBytecode?.stageName !== undefined\n && stage.shaderBytecode.stageName !== raw.stageName))\n {\n throw new Error(`${key} manifest and raw stage metadata disagree`);\n }\n\n if (stage.shaderBytecode?.bytes !== undefined)\n {\n const manifestBytes = normalizeBytecodeBytes(\n stage.shaderBytecode.bytes,\n `${key} manifest stage bytecode`\n );\n if (!manifestBytes\n || manifestBytes.length !== raw.bytes.length\n || manifestBytes.some((value, index) => value !== raw.bytes[index]))\n {\n throw new Error(`${key} manifest and raw stage bytecode disagree`);\n }\n }\n\n return raw.bytes;\n}\n\nfunction analyzeStage(stage, options)\n{\n const key = `${stage.techniqueName}.pass${stage.passIndex}.${stage.stageName}`;\n const shaderBytecode = stage.shaderBytecode && typeof stage.shaderBytecode === \"object\"\n ? { ...stage.shaderBytecode }\n : stage.shaderBytecode;\n if (shaderBytecode && typeof shaderBytecode === \"object\")\n {\n delete shaderBytecode.bytes;\n }\n const out = {\n ...stage,\n shaderBytecode,\n key,\n dxbc: null,\n dxbcError: null,\n ir: null,\n irError: null\n };\n\n if (options.decodeBytecode === false)\n {\n return out;\n }\n\n const bytecodeBytes = normalizeBytecodeBytes(\n options.bytecodeBytes ?? stage.shaderBytecode?.bytes,\n `${key} stage bytecode`\n );\n if (!bytecodeBytes?.length)\n {\n return out;\n }\n\n try\n {\n out.dxbc = CjsDxbcFormat.read(bytecodeBytes, {\n source: dxbcSource(options.source, key),\n decodeInstructions: options.decodeInstructions\n });\n if (options.decodeInstructions && Array.isArray(out.dxbc.instructions))\n {\n try\n {\n out.ir = lowerDxbcToIr(out.dxbc, { source: dxbcSource(options.source, key) });\n }\n catch (error)\n {\n out.irError = {\n name: error.name,\n message: error.message\n };\n }\n }\n }\n catch (error)\n {\n out.dxbcError = {\n name: error.name,\n message: error.message\n };\n }\n\n return out;\n}\n\n/**\n * Builds the normalized WebGPU analysis document from a resolved effect.\n *\n * @param {object} resolved Raw resolved-effect context from `readEffectAnalysis`.\n * @param {object} [options] Analysis options.\n * @param {string} [options.source] Source label for diagnostics.\n * @param {boolean} [options.decodeBytecode] Whether stage bytecode is inspected.\n * @param {boolean} [options.decodeInstructions] Whether DXBC instructions are decoded.\n * @returns {object} Plain JSON-compatible analysis data.\n */\nexport function buildEffectAnalysis(resolved, options = {})\n{\n const source = options.source || resolved.effectRes?.sourcePath || \"memory\";\n const decodeBytecode = options.decodeBytecode !== undefined ? !!options.decodeBytecode : true;\n const decodeInstructions = options.decodeInstructions !== undefined ? !!options.decodeInstructions : true;\n const manifest = resolved.bindingManifest?.toJSON?.() ?? null;\n const bytecodeByKey = resolved.stageBytecodeByKey instanceof Map\n ? resolved.stageBytecodeByKey\n : null;\n const stages = (manifest?.stages || []).map((stage) =>\n {\n const key = `${stage.techniqueName}.pass${stage.passIndex}.${stage.stageName}`;\n\n return analyzeStage(stage, {\n source,\n decodeBytecode,\n decodeInstructions,\n bytecodeBytes: resolvedStageBytecode(stage, key, bytecodeByKey)\n });\n });\n\n return toJsonValue({\n format: CARBON_WEBGPU_ANALYSIS_FORMAT,\n formatVersion: CARBON_WEBGPU_ANALYSIS_VERSION,\n source,\n effectVersion: resolved.effectDescription?.version ?? manifest?.version ?? resolved.effectRes?.m_version ?? null,\n compilerVersion: resolved.effectRes?.m_compilerVersion ?? null,\n effectName: manifest?.effectName || resolved.effectDescription?.effectName || null,\n bodyIndex: resolved.selection?.bodyIndex ?? 0,\n selectedOptions: resolved.selection?.selectedOptions ?? [],\n passes: manifest?.passes || [],\n stages\n });\n}\n\n/**\n * Analyzes one compiled effect payload into a normalized WebGPU-facing\n * document: selected permutation, Carbon binding manifest, and per-stage DXBC\n * decode.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Tr2 effect payload.\n * @param {object} values Normalized format values.\n * @returns {object} Plain JSON-compatible analysis data.\n */\nexport function analyzeEffectWithValues(input, values)\n{\n const permutation = normalizeEffectPermutation(values.permutation);\n const resolved = readEffectAnalysis(input, {\n source: values.source,\n permutation\n });\n validateResolvedPermutation(\n permutation,\n resolved.selection?.selectedOptions ?? []\n );\n\n return buildEffectAnalysis(resolved, {\n source: values.source,\n decodeInstructions: values.decodeInstructions\n });\n}\n\n/**\n * Deep-convert a value to plain JSON-compatible data.\n *\n * @param {any} value Value to convert.\n * @returns {any} Plain data.\n */\nexport function toJsonValue(value)\n{\n if (value === null || value === undefined) return value ?? null;\n if (typeof value === \"number\" || typeof value === \"string\" || typeof value === \"boolean\") return value;\n if (typeof value === \"bigint\") return value.toString();\n if (ArrayBuffer.isView(value)) return Array.from(value);\n if (Array.isArray(value)) return value.map(toJsonValue);\n if (value instanceof Map)\n {\n const out = {};\n for (const [ key, entry ] of value) out[key] = toJsonValue(entry);\n return out;\n }\n if (value instanceof Set) return Array.from(value, toJsonValue);\n if (typeof value === \"object\")\n {\n if (typeof value.toJSON === \"function\") return toJsonValue(value.toJSON());\n const out = {};\n for (const key of Object.keys(value)) out[key] = toJsonValue(value[key]);\n return out;\n }\n return null;\n}\n\nexport { WebgpuReadError };\n\n"],"names":["OUTPUT_JSON","CARBON_WEBGPU_FORMAT","CARBON_WEBGPU_ANALYSIS_FORMAT","CARBON_WEBGPU_ANALYSIS_VERSION","DEFAULT_VALUES","Object","freeze","emit","source","decodeInstructions","permutation","schema","classes","OPTION_KEYS","Set","VALID_EMITS","normalizeEmit","readerName","undefined","has","TypeError","JSON","stringify","assertKnownOptions","options","key","keys","classMap","values","cloneValues","validateClassKey","classKeys","includes","Error","String","validateClass","type","Class","mergeClasses","next","entries","normalizeValues","base","hasOwn","isCarbonWebgpu","input","looksLikeCarbonWebgpuContainer","asUint8Array","readRaw","bytes","container","CarbonWebgpuContainer","ok","Read","sourcePath","WebgpuReadError","readError","message","cause","validateEffectContainer","error","packageToJson","permutationIndex","resolvedPermutationIndex","analysis","deriveAnalysis","wgsl","deriveWgsl","toJsonValue","format","version","carbon","info","deriveInfo","metadata","deriveMetadata","permutationGraph","backendBodySet","deriveBackendBodySet","stages","shaders","layouts","readWithValues","inspectWithValues","graph","compilerVersion","permutationCount","variants","length","uniqueBodyCount","bodies","stageCount","shaderCount","layoutCount","dxbcSource","resolvedStageBytecode","stage","bytecodeByKey","Number","isInteger","stageType","passIndex","techniqueName","stageName","innerStageType","shaderBytecode","raw","get","Map","Array","from","find","entry","manifestBytes","normalizeBytecodeBytes","some","value","index","analyzeStage","out","dxbc","dxbcError","ir","irError","decodeBytecode","bytecodeBytes","CjsDxbcFormat","read","isArray","instructions","lowerDxbcToIr","name","buildEffectAnalysis","resolved","effectRes","manifest","bindingManifest","toJSON","stageBytecodeByKey","map","formatVersion","effectVersion","effectDescription","m_version","m_compilerVersion","effectName","bodyIndex","selection","selectedOptions","passes","analyzeEffectWithValues","normalizeEffectPermutation","readEffectAnalysis","validateResolvedPermutation","toString","ArrayBuffer","isView"],"mappings":";;;;;;;;;;AAqBO,MAAMA,WAAW,GAAG;AACpB,MAAMC,oBAAoB,GAAG;AAC7B,MAAMC,6BAA6B,GAAG;AACtC,MAAMC,8BAA8B,GAAG;MAEjCC,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AACxCC,EAAAA,IAAI,EAAEP,WAAW;AACjBQ,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,kBAAkB,EAAE,IAAI;AACxBC,EAAAA,WAAW,EAAE,IAAI;AACjBC,EAAAA,MAAM,EAAE,IAAI;AACZC,EAAAA,OAAO,EAAEP,MAAM,CAACC,MAAM,CAAC,EAAE;AAC7B,CAAC;AAED,MAAMO,WAAW,GAAG,IAAIC,GAAG,CAAC,CAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAE,CAAC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,IAAID,GAAG,CAAC,CAAEd,WAAW,CAAE,CAAC;AAG5C,SAASgB,aAAaA,CAACT,IAAI,EAAEU,UAAU,EACvC;AACI,EAAA,IAAIV,IAAI,KAAKW,SAAS,IAAIH,WAAW,CAACI,GAAG,CAACZ,IAAI,CAAC,EAAE,OAAOP,WAAW;AACnE,EAAA,MAAM,IAAIoB,SAAS,CAAC,CAAA,EAAGH,UAAU,CAAA,gBAAA,EAAmBjB,WAAW,CAAA,OAAA,EAAUqB,IAAI,CAACC,SAAS,CAACf,IAAI,CAAC,EAAE,CAAC;AACpG;AAEA,SAASgB,kBAAkBA,CAACC,OAAO,EAAEP,UAAU,EAC/C;EACI,KAAK,MAAMQ,GAAG,IAAIpB,MAAM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AAW,CAACgD,KAAK,CAACqB,MAAM,EAAE,CAAC;IAC1E,MAAMlB,GAAG,GAAG,EAAE;IACd,KAAK,MAAM9F,GAAG,IAAIpB,MAAM,CAACqB,IAAI,CAAC0F,KAAK,CAAC,EAAEG,GAAG,CAAC9F,GAAG,CAAC,GAAG2C,WAAW,CAACgD,KAAK,CAAC3F,GAAG,CAAC,CAAC;AACxE,IAAA,OAAO8F,GAAG;AACd,EAAA;AACA,EAAA,OAAO,IAAI;AACf;;;;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../../../../../src/resource/formats/webgpu/core/helpers.js"],"sourcesContent":["import { toJsonWithCollections as toJsonValue } from \"../../../format/jsonPolicies.js\";\nimport { asUint8Array } from \"#utils/bytes\";\nimport CjsDxbcFormat from \"../../dxbc/index.js\";\nimport { normalizeBytecodeBytes, readEffectAnalysis } from \"./effectAnalysis.js\";\n\nimport { CarbonWebgpuContainer, looksLikeCarbonWebgpuContainer } from \"./carbonWebgpu/CarbonWebgpuContainer.js\";\nimport { validateEffectContainer } from \"./carbonWebgpu/validateContainer.js\";\nimport {\n deriveAnalysis,\n deriveBackendBodySet,\n deriveInfo,\n deriveMetadata,\n deriveWgsl,\n resolvedPermutationIndex\n} from \"./carbonWebgpu/containerViews.js\";\nimport { WebgpuReadError } from \"./errors.js\";\nimport { lowerDxbcToIr } from \"./ir/lowerDxbcToIr.js\";\nimport {\n normalizeEffectPermutation,\n validateResolvedPermutation\n} from \"./packageEffectSelection.js\";\n\nexport const OUTPUT_JSON = \"json\";\nexport const CARBON_WEBGPU_FORMAT = \"CARBON_WEBGPU\";\nexport const CARBON_WEBGPU_ANALYSIS_FORMAT = \"CARBON_WEBGPU_ANALYSIS\";\nexport const CARBON_WEBGPU_ANALYSIS_VERSION = 1;\n\nexport const DEFAULT_VALUES = Object.freeze({\n emit: OUTPUT_JSON,\n source: \"memory\",\n decodeInstructions: true,\n permutation: null,\n schema: null,\n classes: Object.freeze({})\n});\n\nconst OPTION_KEYS = new Set([ \"emit\", \"source\", \"decodeInstructions\", \"permutation\", \"schema\", \"classes\" ]);\n// One emit, as WebGL has. `Read` returns the container-backed document and that\n// document is complete: the analysis, WGSL, metadata and permutation views the\n// caller selects among, plus `backendBodySet`, which is every translated body\n// joined to its shared translation units.\n//\n// A second `raw` emit used to hand back the live `CarbonWebgpuContainer` because\n// the chunk package's JSON could not express the body set. It became the only way\n// to reach a body, so the former `engine-webgpu` donor duck-typed the container instead of reading\n// the document - and when the chunk package was replaced, the engine kept asking\n// for a shape the producer had stopped emitting. Both halves then failed, in\n// different directions, for weeks: the default emit built pipelines but resolved\n// no bodies, and the raw emit resolved bodies but built no pipelines.\n//\n// Neither is reachable now. The container stays internal to this module.\nconst VALID_EMITS = new Set([ OUTPUT_JSON ]);\n\n\nfunction normalizeEmit(emit, readerName)\n{\n if (emit === undefined || VALID_EMITS.has(emit)) return OUTPUT_JSON;\n throw new TypeError(`${readerName}: emit must be \"${OUTPUT_JSON}\", got ${JSON.stringify(emit)}`);\n}\n\nfunction assertKnownOptions(options, readerName)\n{\n for (const key of Object.keys(options))\n {\n if (!OPTION_KEYS.has(key))\n {\n throw new TypeError(`${readerName}: unknown option ${JSON.stringify(key)}`);\n }\n }\n}\n\nfunction classMap(values)\n{\n return values && values.classes ? values.classes : {};\n}\n\nfunction cloneValues(values)\n{\n return {\n emit: values.emit,\n source: values.source ?? DEFAULT_VALUES.source,\n decodeInstructions: values.decodeInstructions ?? DEFAULT_VALUES.decodeInstructions,\n permutation: values.permutation ?? null,\n schema: values.schema ?? null,\n classes: { ...classMap(values) }\n };\n}\n\n/**\n * Rejects class override keys outside a format reader's supported class set.\n *\n * @param {string[]} classKeys Supported class override keys.\n * @param {string} key Candidate override key.\n * @param {string} readerName Reader name used in diagnostics.\n */\nexport function validateClassKey(classKeys, key, readerName)\n{\n if (!classKeys.includes(key))\n {\n throw new Error(`${readerName} unknown class type \"${String(key)}\"`);\n }\n}\n\n/**\n * Validates one constructor supplied through a format reader class override.\n *\n * @param {string[]} classKeys Supported class override keys.\n * @param {string} type Candidate override key.\n * @param {Function} Class Candidate constructor.\n * @param {string} readerName Reader name used in diagnostics.\n */\nexport function validateClass(classKeys, type, Class, readerName)\n{\n validateClassKey(classKeys, type, readerName);\n if (typeof Class !== \"function\")\n {\n throw new TypeError(`${readerName} class \"${type}\" must be a constructor`);\n }\n}\n\nfunction mergeClasses(values, classes, classKeys, readerName)\n{\n if (!classes || typeof classes !== \"object\")\n {\n throw new TypeError(`${readerName} classes option must be an object`);\n }\n\n const next = { ...values.classes };\n for (const [ type, Class ] of Object.entries(classes))\n {\n validateClass(classKeys, type, Class, readerName);\n next[type] = Class;\n }\n values.classes = next;\n}\n\n/**\n * Merge format values over a base set and validate them.\n *\n * @param {object} base Current values.\n * @param {object} [options] Values to merge in.\n * @param {string[]} classKeys Valid class keys.\n * @param {string} readerName Reader name used in error messages.\n * @returns {object} A validated copy of the merged values.\n */\nexport function normalizeValues(base, options = {}, classKeys = [], readerName = \"CjsWebgpuFormat\")\n{\n if (!options || typeof options !== \"object\")\n {\n throw new TypeError(`${readerName} options must be an object`);\n }\n\n assertKnownOptions(options, readerName);\n\n const values = cloneValues(base);\n if (Object.hasOwn(options, \"emit\")) values.emit = normalizeEmit(options.emit, readerName);\n if (Object.hasOwn(options, \"source\")) values.source = typeof options.source === \"string\" && options.source ? options.source : DEFAULT_VALUES.source;\n if (Object.hasOwn(options, \"decodeInstructions\")) values.decodeInstructions = !!options.decodeInstructions;\n if (Object.hasOwn(options, \"permutation\")) values.permutation = options.permutation ?? null;\n if (Object.hasOwn(options, \"schema\")) values.schema = options.schema ?? null;\n if (Object.hasOwn(options, \"classes\")) mergeClasses(values, options.classes, classKeys, readerName);\n return values;\n}\n\n/**\n * Normalize caller input into a Uint8Array of package bytes.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.\n * @returns {Uint8Array} The payload bytes.\n */\n/**\n * Reports whether a payload has the Carbon v15 container shape.\n *\n * This is a **shape** check, not an identity check. Our containers are stock\n * Carbon v15 files, so nothing in the bytes separates one from a shipped\n * `effect.dx11` file -- and nothing should. Identity comes from the resource\n * path the file was resolved through, exactly as it does for Carbon, whose own\n * three backend trees are byte-format-identical with no language field anywhere.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate payload.\n * @returns {boolean} True when the payload opens on Carbon's v15 version dword.\n */\nexport function isCarbonWebgpu(input)\n{\n try\n {\n return looksLikeCarbonWebgpuContainer(asUint8Array(input, \"CjsWebgpuFormat input\"));\n }\n catch\n {\n return false;\n }\n}\n\n/**\n * The shared read path used by the instance Read/Inspect and static one-shots.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU container payload.\n * @param {object} values Normalized format values.\n * @returns {CarbonWebgpuContainer} The loaded container.\n */\nexport function readRaw(input, values)\n{\n const bytes = asUint8Array(input, \"CjsWebgpuFormat input\");\n const container = new CarbonWebgpuContainer();\n const ok = container.Read(bytes, { sourcePath: values.source });\n\n if (!ok)\n {\n throw new WebgpuReadError(\n container.readError ? container.readError.message : \"Failed to read Carbon WebGPU container\",\n {\n source: values.source,\n cause: container.readError || null\n }\n );\n }\n\n try\n {\n validateEffectContainer(container, { source: values.source });\n }\n catch (error)\n {\n if (error instanceof WebgpuReadError) throw error;\n throw new WebgpuReadError(error.message, {\n source: values.source,\n cause: error\n });\n }\n\n return container;\n}\n\n/**\n * Converts a loaded container to the documented plain JSON shape.\n *\n * `analysis` and `wgsl` are **derived views**, not stored documents. The chunk\n * package kept them beside the reflection they were computed from and carried\n * digests to detect the two disagreeing; there is now one document, so there is\n * nothing left to disagree and no digest to carry.\n *\n * `chunks` is gone. It described a container that no longer exists, and a record\n * layout has no chunk table to translate it into.\n *\n * @param {CarbonWebgpuContainer} container Loaded container.\n * @param {object} [options] View options.\n * @returns {object} Plain JSON data.\n */\nexport function packageToJson(container, options = {})\n{\n const source = options.source || container.sourcePath || \"memory\";\n const permutationIndex = options.permutationIndex ?? resolvedPermutationIndex(container);\n const analysis = deriveAnalysis(container, { source, permutationIndex });\n const wgsl = deriveWgsl(container, { permutationIndex });\n\n return toJsonValue({\n format: CARBON_WEBGPU_FORMAT,\n version: container.carbon.version,\n sourcePath: source,\n info: deriveInfo(container, { source }),\n metadata: deriveMetadata(container, { source, permutationIndex }),\n permutationGraph: container.permutationGraph,\n analysis,\n wgsl,\n backendBodySet: deriveBackendBodySet(container),\n stages: analysis.stages ?? [],\n shaders: wgsl.shaders ?? [],\n layouts: wgsl.layouts ?? []\n });\n}\n\n/**\n * Shared read entry.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU container payload.\n * @param {object} values Normalized format values.\n * @returns {object} Plain JSON data.\n */\nexport function readWithValues(input, values)\n{\n return packageToJson(readRaw(input, values), { source: values.source });\n}\n\n/**\n * Compact inspection: Carbon version and compiler bytes, body counts, and the\n * resolved analysis/WGSL counts without building the full JSON package shape.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Carbon WebGPU container payload.\n * @param {object} values Normalized format values.\n * @returns {object} Plain summary data.\n */\nexport function inspectWithValues(input, values)\n{\n const container = readRaw(input, values);\n const graph = container.permutationGraph;\n const permutationIndex = resolvedPermutationIndex(container);\n const analysis = deriveAnalysis(container, { source: values.source, permutationIndex });\n const wgsl = deriveWgsl(container, { permutationIndex });\n\n return {\n source: values.source,\n isCarbonWebgpu: true,\n version: container.carbon.version,\n compilerVersion: [ ...container.carbon.compilerVersion ],\n permutationCount: graph.variants.length,\n uniqueBodyCount: graph.bodies.length,\n stageCount: analysis.stages.length,\n shaderCount: wgsl.shaders.length,\n layoutCount: wgsl.layouts.length\n };\n}\n\nfunction dxbcSource(source, key)\n{\n return source ? `${source}#${key}` : key;\n}\n\nfunction resolvedStageBytecode(stage, key, bytecodeByKey)\n{\n if (!Number.isInteger(stage.stageType)\n || !Number.isInteger(stage.passIndex)\n || typeof stage.techniqueName !== \"string\"\n || !stage.techniqueName\n || typeof stage.stageName !== \"string\"\n || !stage.stageName)\n {\n throw new Error(`${key} manifest stage identity is invalid`);\n }\n\n const innerStageType = stage.shaderBytecode?.stageType;\n if (innerStageType !== undefined && !Number.isInteger(innerStageType))\n {\n throw new Error(`${key} manifest stage bytecode type is invalid`);\n }\n\n let raw = bytecodeByKey?.get(key);\n if (!raw && bytecodeByKey instanceof Map)\n {\n raw = Array.from(bytecodeByKey.values()).find((entry) =>\n entry.techniqueName === stage.techniqueName\n && entry.passIndex === stage.passIndex\n && entry.stageType === stage.stageType\n );\n }\n if (!raw) return stage.shaderBytecode?.bytes;\n\n if (!Number.isInteger(raw.stageType)\n || stage.stageType !== raw.stageType\n || (innerStageType !== undefined && innerStageType !== raw.stageType)\n || stage.stageName !== raw.stageName\n || (stage.shaderBytecode?.stageName !== undefined\n && stage.shaderBytecode.stageName !== raw.stageName))\n {\n throw new Error(`${key} manifest and raw stage metadata disagree`);\n }\n\n if (stage.shaderBytecode?.bytes !== undefined)\n {\n const manifestBytes = normalizeBytecodeBytes(\n stage.shaderBytecode.bytes,\n `${key} manifest stage bytecode`\n );\n if (!manifestBytes\n || manifestBytes.length !== raw.bytes.length\n || manifestBytes.some((value, index) => value !== raw.bytes[index]))\n {\n throw new Error(`${key} manifest and raw stage bytecode disagree`);\n }\n }\n\n return raw.bytes;\n}\n\nfunction analyzeStage(stage, options)\n{\n const key = `${stage.techniqueName}.pass${stage.passIndex}.${stage.stageName}`;\n const shaderBytecode = stage.shaderBytecode && typeof stage.shaderBytecode === \"object\"\n ? { ...stage.shaderBytecode }\n : stage.shaderBytecode;\n if (shaderBytecode && typeof shaderBytecode === \"object\")\n {\n delete shaderBytecode.bytes;\n }\n const out = {\n ...stage,\n shaderBytecode,\n key,\n dxbc: null,\n dxbcError: null,\n ir: null,\n irError: null\n };\n\n if (options.decodeBytecode === false)\n {\n return out;\n }\n\n const bytecodeBytes = normalizeBytecodeBytes(\n options.bytecodeBytes ?? stage.shaderBytecode?.bytes,\n `${key} stage bytecode`\n );\n if (!bytecodeBytes?.length)\n {\n return out;\n }\n\n try\n {\n out.dxbc = CjsDxbcFormat.read(bytecodeBytes, {\n source: dxbcSource(options.source, key),\n decodeInstructions: options.decodeInstructions\n });\n if (options.decodeInstructions && Array.isArray(out.dxbc.instructions))\n {\n try\n {\n out.ir = lowerDxbcToIr(out.dxbc, { source: dxbcSource(options.source, key) });\n }\n catch (error)\n {\n out.irError = {\n name: error.name,\n message: error.message\n };\n }\n }\n }\n catch (error)\n {\n out.dxbcError = {\n name: error.name,\n message: error.message\n };\n }\n\n return out;\n}\n\n/**\n * Builds the normalized WebGPU analysis document from a resolved effect.\n *\n * @param {object} resolved Raw resolved-effect context from `readEffectAnalysis`.\n * @param {object} [options] Analysis options.\n * @param {string} [options.source] Source label for diagnostics.\n * @param {boolean} [options.decodeBytecode] Whether stage bytecode is inspected.\n * @param {boolean} [options.decodeInstructions] Whether DXBC instructions are decoded.\n * @returns {object} Plain JSON-compatible analysis data.\n */\nexport function buildEffectAnalysis(resolved, options = {})\n{\n const source = options.source || resolved.effectRes?.sourcePath || \"memory\";\n const decodeBytecode = options.decodeBytecode !== undefined ? !!options.decodeBytecode : true;\n const decodeInstructions = options.decodeInstructions !== undefined ? !!options.decodeInstructions : true;\n const manifest = resolved.bindingManifest?.toJSON?.() ?? null;\n const bytecodeByKey = resolved.stageBytecodeByKey instanceof Map\n ? resolved.stageBytecodeByKey\n : null;\n const stages = (manifest?.stages || []).map((stage) =>\n {\n const key = `${stage.techniqueName}.pass${stage.passIndex}.${stage.stageName}`;\n\n return analyzeStage(stage, {\n source,\n decodeBytecode,\n decodeInstructions,\n bytecodeBytes: resolvedStageBytecode(stage, key, bytecodeByKey)\n });\n });\n\n return toJsonValue({\n format: CARBON_WEBGPU_ANALYSIS_FORMAT,\n formatVersion: CARBON_WEBGPU_ANALYSIS_VERSION,\n source,\n effectVersion: resolved.effectDescription?.version ?? manifest?.version ?? resolved.effectRes?.m_version ?? null,\n compilerVersion: resolved.effectRes?.m_compilerVersion ?? null,\n effectName: manifest?.effectName || resolved.effectDescription?.effectName || null,\n bodyIndex: resolved.selection?.bodyIndex ?? 0,\n selectedOptions: resolved.selection?.selectedOptions ?? [],\n passes: manifest?.passes || [],\n stages\n });\n}\n\n/**\n * Analyzes one compiled effect payload into a normalized WebGPU-facing\n * document: selected permutation, Carbon binding manifest, and per-stage DXBC\n * decode.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Tr2 effect payload.\n * @param {object} values Normalized format values.\n * @returns {object} Plain JSON-compatible analysis data.\n */\nexport function analyzeEffectWithValues(input, values)\n{\n const permutation = normalizeEffectPermutation(values.permutation);\n const resolved = readEffectAnalysis(input, {\n source: values.source,\n permutation\n });\n validateResolvedPermutation(\n permutation,\n resolved.selection?.selectedOptions ?? []\n );\n\n return buildEffectAnalysis(resolved, {\n source: values.source,\n decodeInstructions: values.decodeInstructions\n });\n}\n\n/**\n * Deep-convert a value to plain JSON-compatible data.\n *\n * @param {any} value Value to convert.\n * @returns {any} Plain data.\n */\n/** The shared JSON policy for this reader, under the name its callers use. */\nexport { toJsonValue };\n\nexport { WebgpuReadError };\n\n"],"names":["OUTPUT_JSON","CARBON_WEBGPU_FORMAT","CARBON_WEBGPU_ANALYSIS_FORMAT","CARBON_WEBGPU_ANALYSIS_VERSION","DEFAULT_VALUES","Object","freeze","emit","source","decodeInstructions","permutation","schema","classes","OPTION_KEYS","Set","VALID_EMITS","normalizeEmit","readerName","undefined","has","TypeError","JSON","stringify","assertKnownOptions","options","key","keys","classMap","values","cloneValues","validateClassKey","classKeys","includes","Error","String","validateClass","type","Class","mergeClasses","next","entries","normalizeValues","base","hasOwn","isCarbonWebgpu","input","looksLikeCarbonWebgpuContainer","asUint8Array","readRaw","bytes","container","CarbonWebgpuContainer","ok","Read","sourcePath","WebgpuReadError","readError","message","cause","validateEffectContainer","error","packageToJson","permutationIndex","resolvedPermutationIndex","analysis","deriveAnalysis","wgsl","deriveWgsl","toJsonValue","format","version","carbon","info","deriveInfo","metadata","deriveMetadata","permutationGraph","backendBodySet","deriveBackendBodySet","stages","shaders","layouts","readWithValues","inspectWithValues","graph","compilerVersion","permutationCount","variants","length","uniqueBodyCount","bodies","stageCount","shaderCount","layoutCount","dxbcSource","resolvedStageBytecode","stage","bytecodeByKey","Number","isInteger","stageType","passIndex","techniqueName","stageName","innerStageType","shaderBytecode","raw","get","Map","Array","from","find","entry","manifestBytes","normalizeBytecodeBytes","some","value","index","analyzeStage","out","dxbc","dxbcError","ir","irError","decodeBytecode","bytecodeBytes","CjsDxbcFormat","read","isArray","instructions","lowerDxbcToIr","name","buildEffectAnalysis","resolved","effectRes","manifest","bindingManifest","toJSON","stageBytecodeByKey","map","formatVersion","effectVersion","effectDescription","m_version","m_compilerVersion","effectName","bodyIndex","selection","selectedOptions","passes","analyzeEffectWithValues","normalizeEffectPermutation","readEffectAnalysis","validateResolvedPermutation"],"mappings":";;;;;;;;;;;AAsBO,MAAMA,WAAW,GAAG;AACpB,MAAMC,oBAAoB,GAAG;AAC7B,MAAMC,6BAA6B,GAAG;AACtC,MAAMC,8BAA8B,GAAG;MAEjCC,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AACxCC,EAAAA,IAAI,EAAEP,WAAW;AACjBQ,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,kBAAkB,EAAE,IAAI;AACxBC,EAAAA,WAAW,EAAE,IAAI;AACjBC,EAAAA,MAAM,EAAE,IAAI;AACZC,EAAAA,OAAO,EAAEP,MAAM,CAACC,MAAM,CAAC,EAAE;AAC7B,CAAC;AAED,MAAMO,WAAW,GAAG,IAAIC,GAAG,CAAC,CAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAE,CAAC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,IAAID,GAAG,CAAC,CAAEd,WAAW,CAAE,C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E;AAC9BtE,IAAAA;AACJ,GAAC,CAAC;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASuE,uBAAuBA,CAACzG,KAAK,EAAEjB,MAAM,EACrD;AACI,EAAA,MAAMlB,WAAW,GAAG6I,0BAA0B,CAAC3H,MAAM,CAAClB,WAAW,CAAC;AAClE,EAAA,MAAM2H,QAAQ,GAAGmB,kBAAkB,CAAC3G,KAAK,EAAE;IACvCrC,MAAM,EAAEoB,MAAM,CAACpB,MAAM;AACrBE,IAAAA;AACJ,GAAC,CAAC;EACF+I,2BAA2B,CACvB/I,WAAW,EACX2H,QAAQ,CAACc,SAAS,EAAEC,eAAe,IAAI,EAC3C,CAAC;EAED,OAAOhB,mBAAmB,CAACC,QAAQ,EAAE;IACjC7H,MAAM,EAAEoB,MAAM,CAACpB,MAAM;IACrBC,kBAAkB,EAAEmB,MAAM,CAACnB;AAC/B,GAAC,CAAC;AACN;;;;"}
@@ -1,6 +1,7 @@
1
1
  import { asUint8Array } from '#utils/bytes';
2
2
  import { CjsFormat } from '../../format/CjsFormat.js';
3
- import { DEFAULT_VALUES, normalizeValues, readWithValues, inspectWithValues, toJsonValue, probeSupportWithValues, isWebM, OUTPUT_JSON, OUTPUT_RAW, OUTPUT_VIDEO } from './core/helpers.js';
3
+ import { DEFAULT_VALUES, normalizeValues, readWithValues, inspectWithValues, isWebM, OUTPUT_JSON, OUTPUT_RAW, OUTPUT_VIDEO } from './core/helpers.js';
4
+ import { toJsonWithByteSummary } from '../../format/jsonPolicies.js';
4
5
 
5
6
  const FORMAT_NAME = "CjsWebmFormat";
6
7
 
@@ -89,7 +90,7 @@ class CjsWebmFormat extends CjsFormat {
89
90
  * @returns {any} JSON-compatible value.
90
91
  */
91
92
  ToJSON(value) {
92
- return toJsonValue(value);
93
+ return toJsonWithByteSummary(value);
93
94
  }
94
95
 
95
96
  /**
@@ -138,12 +139,6 @@ class CjsWebmFormat extends CjsFormat {
138
139
  * @param {object} [options] Probe options.
139
140
  * @returns {object} Support/probe report.
140
141
  */
141
- static probeSupport(input, options = {}) {
142
- return probeSupportWithValues(input, normalizeValues(DEFAULT_VALUES, {
143
- inputType: "webm",
144
- ...options
145
- }, FORMAT_NAME), "webm");
146
- }
147
142
 
148
143
  /**
149
144
  * Convert format output into JSON-compatible debug data.
@@ -152,7 +147,7 @@ class CjsWebmFormat extends CjsFormat {
152
147
  * @returns {any} JSON-compatible value.
153
148
  */
154
149
  static toJSON(value) {
155
- return toJsonValue(value);
150
+ return toJsonWithByteSummary(value);
156
151
  }
157
152
 
158
153
  /**