@carbonenginejs/runtime-resource 0.9.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (544) hide show
  1. package/NOTICE +3 -2
  2. package/README.md +47 -6
  3. package/dist/CjsMotherLode.js +88 -88
  4. package/dist/CjsMotherLode.js.map +1 -1
  5. package/dist/CjsResMan.js +717 -228
  6. package/dist/CjsResMan.js.map +1 -1
  7. package/dist/CjsResManFetchProvider.js +94 -0
  8. package/dist/CjsResManFetchProvider.js.map +1 -0
  9. package/dist/{CjsResManQueue.js → CjsResManWorkQueue.js} +112 -25
  10. package/dist/CjsResManWorkQueue.js.map +1 -0
  11. package/dist/format/CjsBlueReader.js +89 -0
  12. package/dist/format/CjsBlueReader.js.map +1 -1
  13. package/dist/format/CjsFormat.js +42 -16
  14. package/dist/format/CjsFormat.js.map +1 -1
  15. package/dist/format/CjsReader.js +4 -0
  16. package/dist/format/CjsReader.js.map +1 -1
  17. package/dist/format/CjsResourceProbe.js +2 -0
  18. package/dist/format/CjsResourceProbe.js.map +1 -1
  19. package/dist/format/effect/effectPermutationGraph.js +257 -0
  20. package/dist/format/effect/effectPermutationGraph.js.map +1 -0
  21. package/dist/format/effect/effectReflectionPackage.js +636 -0
  22. package/dist/format/effect/effectReflectionPackage.js.map +1 -0
  23. package/dist/format/effect/sha256.js +114 -0
  24. package/dist/format/effect/sha256.js.map +1 -0
  25. package/dist/format/payloadContract.js +20 -0
  26. package/dist/format/payloadContract.js.map +1 -1
  27. package/dist/formats/black/CjsBlackFormat.js +15 -1
  28. package/dist/formats/black/CjsBlackFormat.js.map +1 -1
  29. package/dist/formats/black/core/CjsBlackBinaryReader.js +103 -0
  30. package/dist/formats/black/core/CjsBlackBinaryReader.js.map +1 -1
  31. package/dist/formats/black/core/CjsBlackPropertyReaders.js +61 -0
  32. package/dist/formats/black/core/CjsBlackPropertyReaders.js.map +1 -1
  33. package/dist/formats/black/core/CjsBlackReader.js +125 -0
  34. package/dist/formats/black/core/CjsBlackReader.js.map +1 -1
  35. package/dist/formats/black/core/CjsBlackSchemaRegistry.js +103 -0
  36. package/dist/formats/black/core/CjsBlackSchemaRegistry.js.map +1 -1
  37. package/dist/formats/black/core/helpers.js +17 -0
  38. package/dist/formats/black/core/helpers.js.map +1 -1
  39. package/dist/formats/bnk/CjsBnkFormat.js +8 -0
  40. package/dist/formats/bnk/CjsBnkFormat.js.map +1 -1
  41. package/dist/formats/bnk/core/helpers.js +20 -0
  42. package/dist/formats/bnk/core/helpers.js.map +1 -1
  43. package/dist/formats/bnk/core/musicNodes.js +40 -3
  44. package/dist/formats/bnk/core/musicNodes.js.map +1 -1
  45. package/dist/formats/bnk/core/soundbanksInfo.js +2 -0
  46. package/dist/formats/bnk/core/soundbanksInfo.js.map +1 -1
  47. package/dist/formats/cmf/core/binary.js +71 -0
  48. package/dist/formats/cmf/core/binary.js.map +1 -1
  49. package/dist/formats/cmf/core/buffers.js +4 -0
  50. package/dist/formats/cmf/core/buffers.js.map +1 -1
  51. package/dist/formats/cmf/core/helpers.js +31 -0
  52. package/dist/formats/cmf/core/helpers.js.map +1 -1
  53. package/dist/formats/cmf/core/schema.js +10 -0
  54. package/dist/formats/cmf/core/schema.js.map +1 -1
  55. package/dist/formats/cmf/core/shared.js +9 -0
  56. package/dist/formats/cmf/core/shared.js.map +1 -1
  57. package/dist/formats/cmf/core/writer.js +54 -0
  58. package/dist/formats/cmf/core/writer.js.map +1 -1
  59. package/dist/formats/dds/core/bc6h.js +10 -0
  60. package/dist/formats/dds/core/bc6h.js.map +1 -1
  61. package/dist/formats/dds/core/bc7.js +16 -0
  62. package/dist/formats/dds/core/bc7.js.map +1 -1
  63. package/dist/formats/dds/core/helpers.js +47 -0
  64. package/dist/formats/dds/core/helpers.js.map +1 -1
  65. package/dist/formats/dxbc/CjsDxbcFormat.js +142 -0
  66. package/dist/formats/dxbc/CjsDxbcFormat.js.map +1 -0
  67. package/dist/formats/dxbc/core/DxbcReader.js +266 -0
  68. package/dist/formats/dxbc/core/DxbcReader.js.map +1 -0
  69. package/dist/formats/dxbc/core/container.js +169 -0
  70. package/dist/formats/dxbc/core/container.js.map +1 -0
  71. package/dist/formats/dxbc/core/decoder.js +789 -0
  72. package/dist/formats/dxbc/core/decoder.js.map +1 -0
  73. package/dist/formats/dxbc/core/errors.js +19 -0
  74. package/dist/formats/dxbc/core/errors.js.map +1 -0
  75. package/dist/formats/dxbc/core/helpers.js +220 -0
  76. package/dist/formats/dxbc/core/helpers.js.map +1 -0
  77. package/dist/formats/dxbc/core/opcodes.js +45 -0
  78. package/dist/formats/dxbc/core/opcodes.js.map +1 -0
  79. package/dist/formats/dxbc/core/program.js +91 -0
  80. package/dist/formats/dxbc/core/program.js.map +1 -0
  81. package/dist/formats/dxbc/core/signature.js +172 -0
  82. package/dist/formats/dxbc/core/signature.js.map +1 -0
  83. package/dist/formats/dxbc/index.js +2 -0
  84. package/dist/formats/dxbc/index.js.map +1 -0
  85. package/dist/formats/fbx/core/helpers.js +21 -0
  86. package/dist/formats/fbx/core/helpers.js.map +1 -1
  87. package/dist/formats/flac/CjsFlacFormat.js +49 -0
  88. package/dist/formats/flac/CjsFlacFormat.js.map +1 -1
  89. package/dist/formats/flac/core/helpers.js +20 -0
  90. package/dist/formats/flac/core/helpers.js.map +1 -1
  91. package/dist/formats/gif/CjsGifFormat.js +49 -0
  92. package/dist/formats/gif/CjsGifFormat.js.map +1 -1
  93. package/dist/formats/gif/core/helpers.js +20 -0
  94. package/dist/formats/gif/core/helpers.js.map +1 -1
  95. package/dist/formats/gltf/core/helpers.js +15 -0
  96. package/dist/formats/gltf/core/helpers.js.map +1 -1
  97. package/dist/formats/gltf/core/parser.js +13 -0
  98. package/dist/formats/gltf/core/parser.js.map +1 -1
  99. package/dist/formats/gltf/core/targets.js +10 -0
  100. package/dist/formats/gltf/core/targets.js.map +1 -1
  101. package/dist/formats/gr2/core/bitknit2.js +2 -0
  102. package/dist/formats/gr2/core/bitknit2.js.map +1 -1
  103. package/dist/formats/gr2/core/helpers.js +20 -0
  104. package/dist/formats/gr2/core/helpers.js.map +1 -1
  105. package/dist/formats/gr2/core/targets.js +10 -0
  106. package/dist/formats/gr2/core/targets.js.map +1 -1
  107. package/dist/formats/hlsl/CjsHlslFormat.js +254 -0
  108. package/dist/formats/hlsl/CjsHlslFormat.js.map +1 -0
  109. package/dist/formats/hlsl/core/HlslBinaryUtils.js +15 -0
  110. package/dist/formats/hlsl/core/HlslBinaryUtils.js.map +1 -0
  111. package/dist/formats/hlsl/core/HlslEffectReadError.js +19 -0
  112. package/dist/formats/hlsl/core/HlslEffectReadError.js.map +1 -0
  113. package/dist/formats/hlsl/core/HlslEffectStateManager.js +130 -0
  114. package/dist/formats/hlsl/core/HlslEffectStateManager.js.map +1 -0
  115. package/dist/formats/hlsl/core/HlslReader.js +266 -0
  116. package/dist/formats/hlsl/core/HlslReader.js.map +1 -0
  117. package/dist/formats/hlsl/core/HlslRenderStateSetup.js +37 -0
  118. package/dist/formats/hlsl/core/HlslRenderStateSetup.js.map +1 -0
  119. package/dist/formats/hlsl/core/HlslResourceSetDescription.js +94 -0
  120. package/dist/formats/hlsl/core/HlslResourceSetDescription.js.map +1 -0
  121. package/dist/formats/hlsl/core/HlslShaderBytecode.js +44 -0
  122. package/dist/formats/hlsl/core/HlslShaderBytecode.js.map +1 -0
  123. package/dist/formats/hlsl/core/analysis.js +51 -0
  124. package/dist/formats/hlsl/core/analysis.js.map +1 -0
  125. package/dist/formats/hlsl/core/helpers.js +270 -0
  126. package/dist/formats/hlsl/core/helpers.js.map +1 -0
  127. package/dist/formats/hlsl/core/json.js +284 -0
  128. package/dist/formats/hlsl/core/json.js.map +1 -0
  129. package/dist/formats/hlsl/core/metadata.js +327 -0
  130. package/dist/formats/hlsl/core/metadata.js.map +1 -0
  131. package/dist/formats/hlsl/core/portableReflection.js +848 -0
  132. package/dist/formats/hlsl/core/portableReflection.js.map +1 -0
  133. package/dist/formats/hlsl/core/render-states.js +280 -0
  134. package/dist/formats/hlsl/core/render-states.js.map +1 -0
  135. package/dist/formats/hlsl/core/tr2/HlslRenderContextEnum.js +43 -0
  136. package/dist/formats/hlsl/core/tr2/HlslRenderContextEnum.js.map +1 -0
  137. package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js +294 -0
  138. package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js.map +1 -0
  139. package/dist/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js +33 -0
  140. package/dist/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js.map +1 -0
  141. package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js +416 -0
  142. package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js.map +1 -0
  143. package/dist/formats/hlsl/core/tr2/shader/HlslEffectConstant.js +40 -0
  144. package/dist/formats/hlsl/core/tr2/shader/HlslEffectConstant.js.map +1 -0
  145. package/dist/formats/hlsl/core/tr2/shader/HlslEffectDescription.js +742 -0
  146. package/dist/formats/hlsl/core/tr2/shader/HlslEffectDescription.js.map +1 -0
  147. package/dist/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js +52 -0
  148. package/dist/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js.map +1 -0
  149. package/dist/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js +38 -0
  150. package/dist/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js.map +1 -0
  151. package/dist/formats/hlsl/core/tr2/shader/HlslEffectResource.js +50 -0
  152. package/dist/formats/hlsl/core/tr2/shader/HlslEffectResource.js.map +1 -0
  153. package/dist/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js +86 -0
  154. package/dist/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js.map +1 -0
  155. package/dist/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js +31 -0
  156. package/dist/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js.map +1 -0
  157. package/dist/formats/hlsl/core/tr2/shader/HlslPass.js +42 -0
  158. package/dist/formats/hlsl/core/tr2/shader/HlslPass.js.map +1 -0
  159. package/dist/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js +55 -0
  160. package/dist/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js.map +1 -0
  161. package/dist/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js +29 -0
  162. package/dist/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js.map +1 -0
  163. package/dist/formats/hlsl/core/tr2/shader/HlslShader.js +220 -0
  164. package/dist/formats/hlsl/core/tr2/shader/HlslShader.js.map +1 -0
  165. package/dist/formats/hlsl/core/tr2/shader/HlslShaderOption.js +30 -0
  166. package/dist/formats/hlsl/core/tr2/shader/HlslShaderOption.js.map +1 -0
  167. package/dist/formats/hlsl/index.js +2 -0
  168. package/dist/formats/hlsl/index.js.map +1 -0
  169. package/dist/formats/hlsl/portable.js +2 -0
  170. package/dist/formats/hlsl/portable.js.map +1 -0
  171. package/dist/formats/index.js +4 -0
  172. package/dist/formats/index.js.map +1 -1
  173. package/dist/formats/jpeg/core/helpers.js +52 -0
  174. package/dist/formats/jpeg/core/helpers.js.map +1 -1
  175. package/dist/formats/jpeg/core/jpeg.js +93 -0
  176. package/dist/formats/jpeg/core/jpeg.js.map +1 -1
  177. package/dist/formats/mp3/core/helpers.js +37 -0
  178. package/dist/formats/mp3/core/helpers.js.map +1 -1
  179. package/dist/formats/mp4/core/helpers.js +35 -0
  180. package/dist/formats/mp4/core/helpers.js.map +1 -1
  181. package/dist/formats/ogg/CjsOggFormat.js +49 -0
  182. package/dist/formats/ogg/CjsOggFormat.js.map +1 -1
  183. package/dist/formats/ogg/core/helpers.js +23 -0
  184. package/dist/formats/ogg/core/helpers.js.map +1 -1
  185. package/dist/formats/ogg/core/vorbis.js +13 -0
  186. package/dist/formats/ogg/core/vorbis.js.map +1 -1
  187. package/dist/formats/png/core/helpers.js +52 -0
  188. package/dist/formats/png/core/helpers.js.map +1 -1
  189. package/dist/formats/red/CjsRedFormat.js +2 -0
  190. package/dist/formats/red/CjsRedFormat.js.map +1 -1
  191. package/dist/formats/red/core/CjsRedReader.js +52 -0
  192. package/dist/formats/red/core/CjsRedReader.js.map +1 -1
  193. package/dist/formats/red/core/helpers.js +19 -0
  194. package/dist/formats/red/core/helpers.js.map +1 -1
  195. package/dist/formats/stl/core/stl.js +8 -0
  196. package/dist/formats/stl/core/stl.js.map +1 -1
  197. package/dist/formats/stl/core/targets.js +10 -0
  198. package/dist/formats/stl/core/targets.js.map +1 -1
  199. package/dist/formats/tga/core/helpers.js +47 -0
  200. package/dist/formats/tga/core/helpers.js.map +1 -1
  201. package/dist/formats/wav/core/helpers.js +37 -0
  202. package/dist/formats/wav/core/helpers.js.map +1 -1
  203. package/dist/formats/webgl/CjsWebglFormat.js +221 -0
  204. package/dist/formats/webgl/CjsWebglFormat.js.map +1 -0
  205. package/dist/formats/webgl/core/cewg/CewgPackage.js +339 -0
  206. package/dist/formats/webgl/core/cewg/CewgPackage.js.map +1 -0
  207. package/dist/formats/webgl/core/cewg/CewgPackageBuilder.js +104 -0
  208. package/dist/formats/webgl/core/cewg/CewgPackageBuilder.js.map +1 -0
  209. package/dist/formats/webgl/core/cewg/binary.js +101 -0
  210. package/dist/formats/webgl/core/cewg/binary.js.map +1 -0
  211. package/dist/formats/webgl/core/cewgCompleteness.js +81 -0
  212. package/dist/formats/webgl/core/cewgCompleteness.js.map +1 -0
  213. package/dist/formats/webgl/core/effectPackage.js +789 -0
  214. package/dist/formats/webgl/core/effectPackage.js.map +1 -0
  215. package/dist/formats/webgl/core/effectPackageValidation.js +331 -0
  216. package/dist/formats/webgl/core/effectPackageValidation.js.map +1 -0
  217. package/dist/formats/webgl/core/errors.js +27 -0
  218. package/dist/formats/webgl/core/errors.js.map +1 -0
  219. package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js +2678 -0
  220. package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -0
  221. package/dist/formats/webgl/core/glsl/DxbcGlslHelpers.js +89 -0
  222. package/dist/formats/webgl/core/glsl/DxbcGlslHelpers.js.map +1 -0
  223. package/dist/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js +428 -0
  224. package/dist/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js.map +1 -0
  225. package/dist/formats/webgl/core/helpers.js +306 -0
  226. package/dist/formats/webgl/core/helpers.js.map +1 -0
  227. package/dist/formats/webgl/index.js +2 -0
  228. package/dist/formats/webgl/index.js.map +1 -0
  229. package/dist/formats/webgpu/CjsWebgpuFormat.js +376 -0
  230. package/dist/formats/webgpu/CjsWebgpuFormat.js.map +1 -0
  231. package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js +415 -0
  232. package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js.map +1 -0
  233. package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js +100 -0
  234. package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js.map +1 -0
  235. package/dist/formats/webgpu/core/cewgpu/binary.js +93 -0
  236. package/dist/formats/webgpu/core/cewgpu/binary.js.map +1 -0
  237. package/dist/formats/webgpu/core/cewgpu/tags.js +17 -0
  238. package/dist/formats/webgpu/core/cewgpu/tags.js.map +1 -0
  239. package/dist/formats/webgpu/core/effectAnalysis.js +82 -0
  240. package/dist/formats/webgpu/core/effectAnalysis.js.map +1 -0
  241. package/dist/formats/webgpu/core/effectBackendBodySet.js +305 -0
  242. package/dist/formats/webgpu/core/effectBackendBodySet.js.map +1 -0
  243. package/dist/formats/webgpu/core/effectPackageValidation.js +1078 -0
  244. package/dist/formats/webgpu/core/effectPackageValidation.js.map +1 -0
  245. package/dist/formats/webgpu/core/errors.js +20 -0
  246. package/dist/formats/webgpu/core/errors.js.map +1 -0
  247. package/dist/formats/webgpu/core/helpers.js +448 -0
  248. package/dist/formats/webgpu/core/helpers.js.map +1 -0
  249. package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js +223 -0
  250. package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js.map +1 -0
  251. package/dist/formats/webgpu/core/ir/buildControlFlow.js +220 -0
  252. package/dist/formats/webgpu/core/ir/buildControlFlow.js.map +1 -0
  253. package/dist/formats/webgpu/core/ir/indexableTemps.js +137 -0
  254. package/dist/formats/webgpu/core/ir/indexableTemps.js.map +1 -0
  255. package/dist/formats/webgpu/core/ir/inferValueTypes.js +454 -0
  256. package/dist/formats/webgpu/core/ir/inferValueTypes.js.map +1 -0
  257. package/dist/formats/webgpu/core/ir/lowerDxbcToIr.js +494 -0
  258. package/dist/formats/webgpu/core/ir/lowerDxbcToIr.js.map +1 -0
  259. package/dist/formats/webgpu/core/ir/resolveRegisterFlow.js +177 -0
  260. package/dist/formats/webgpu/core/ir/resolveRegisterFlow.js.map +1 -0
  261. package/dist/formats/webgpu/core/ir/sourceLanes.js +61 -0
  262. package/dist/formats/webgpu/core/ir/sourceLanes.js.map +1 -0
  263. package/dist/formats/webgpu/core/packageEffect.js +300 -0
  264. package/dist/formats/webgpu/core/packageEffect.js.map +1 -0
  265. package/dist/formats/webgpu/core/packageEffectSelection.js +164 -0
  266. package/dist/formats/webgpu/core/packageEffectSelection.js.map +1 -0
  267. package/dist/formats/webgpu/core/packageMetadata.js +8 -0
  268. package/dist/formats/webgpu/core/packageMetadata.js.map +1 -0
  269. package/dist/formats/webgpu/core/schema.js +4 -0
  270. package/dist/formats/webgpu/core/schema.js.map +1 -0
  271. package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js +275 -0
  272. package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js.map +1 -0
  273. package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js +182 -0
  274. package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js.map +1 -0
  275. package/dist/formats/webgpu/core/wgsl/buildWgslSet.js +324 -0
  276. package/dist/formats/webgpu/core/wgsl/buildWgslSet.js.map +1 -0
  277. package/dist/formats/webgpu/core/wgsl/emitWgsl.js +356 -0
  278. package/dist/formats/webgpu/core/wgsl/emitWgsl.js.map +1 -0
  279. package/dist/formats/webgpu/core/wgsl/hoistEscapingValues.js +77 -0
  280. package/dist/formats/webgpu/core/wgsl/hoistEscapingValues.js.map +1 -0
  281. package/dist/formats/webgpu/core/wgsl/lowerBindingLayout.js +451 -0
  282. package/dist/formats/webgpu/core/wgsl/lowerBindingLayout.js.map +1 -0
  283. package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js +754 -0
  284. package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js.map +1 -0
  285. package/dist/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js +457 -0
  286. package/dist/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js.map +1 -0
  287. package/dist/formats/webgpu/core/wgsl/lowerFragmentProgram.js +1572 -0
  288. package/dist/formats/webgpu/core/wgsl/lowerFragmentProgram.js.map +1 -0
  289. package/dist/formats/webgpu/core/wgsl/lowerMergeHistogramsComputeProgram.js +659 -0
  290. package/dist/formats/webgpu/core/wgsl/lowerMergeHistogramsComputeProgram.js.map +1 -0
  291. package/dist/formats/webgpu/core/wgsl/lowerParticleClearComputePrograms.js +734 -0
  292. package/dist/formats/webgpu/core/wgsl/lowerParticleClearComputePrograms.js.map +1 -0
  293. package/dist/formats/webgpu/core/wgsl/lowerParticleEmitComputeProgram.js +583 -0
  294. package/dist/formats/webgpu/core/wgsl/lowerParticleEmitComputeProgram.js.map +1 -0
  295. package/dist/formats/webgpu/core/wgsl/lowerSkinVerticesComputeProgram.js +621 -0
  296. package/dist/formats/webgpu/core/wgsl/lowerSkinVerticesComputeProgram.js.map +1 -0
  297. package/dist/formats/webgpu/core/wgsl/lowerSortComputeProgram.js +824 -0
  298. package/dist/formats/webgpu/core/wgsl/lowerSortComputeProgram.js.map +1 -0
  299. package/dist/formats/webgpu/core/wgsl/lowerSortInnerComputeProgram.js +697 -0
  300. package/dist/formats/webgpu/core/wgsl/lowerSortInnerComputeProgram.js.map +1 -0
  301. package/dist/formats/webgpu/core/wgsl/lowerSortStepComputeProgram.js +559 -0
  302. package/dist/formats/webgpu/core/wgsl/lowerSortStepComputeProgram.js.map +1 -0
  303. package/dist/formats/webgpu/core/wgsl/lowerVertexProgram.js +1328 -0
  304. package/dist/formats/webgpu/core/wgsl/lowerVertexProgram.js.map +1 -0
  305. package/dist/formats/webgpu/core/wgsl/particleEmitSemanticDigest.js +110 -0
  306. package/dist/formats/webgpu/core/wgsl/particleEmitSemanticDigest.js.map +1 -0
  307. package/dist/formats/webgpu/core/wgsl/precisionControls.js +55 -0
  308. package/dist/formats/webgpu/core/wgsl/precisionControls.js.map +1 -0
  309. package/dist/formats/webgpu/core/wgsl/selectionPlans.js +758 -0
  310. package/dist/formats/webgpu/core/wgsl/selectionPlans.js.map +1 -0
  311. package/dist/formats/webgpu/core/wgsl/uniformity.js +78 -0
  312. package/dist/formats/webgpu/core/wgsl/uniformity.js.map +1 -0
  313. package/dist/formats/webgpu/core/wgsl/validateExactComputeIr.js +196 -0
  314. package/dist/formats/webgpu/core/wgsl/validateExactComputeIr.js.map +1 -0
  315. package/dist/formats/webgpu/core/wgsl/validateHandleOperand.js +37 -0
  316. package/dist/formats/webgpu/core/wgsl/validateHandleOperand.js.map +1 -0
  317. package/dist/formats/webgpu/index.js +2 -0
  318. package/dist/formats/webgpu/index.js.map +1 -0
  319. package/dist/formats/webm/core/helpers.js +35 -0
  320. package/dist/formats/webm/core/helpers.js.map +1 -1
  321. package/dist/formats/webp/CjsWebpFormat.js +49 -0
  322. package/dist/formats/webp/CjsWebpFormat.js.map +1 -1
  323. package/dist/formats/webp/core/helpers.js +23 -0
  324. package/dist/formats/webp/core/helpers.js.map +1 -1
  325. package/dist/formats/wem/CjsWemFormat.js +8 -0
  326. package/dist/formats/wem/CjsWemFormat.js.map +1 -1
  327. package/dist/formats/wem/core/bitStream.js +2 -0
  328. package/dist/formats/wem/core/bitStream.js.map +1 -1
  329. package/dist/formats/wem/core/helpers.js +20 -0
  330. package/dist/formats/wem/core/helpers.js.map +1 -1
  331. package/dist/formats/yaml/CjsYamlFormat.js +45 -0
  332. package/dist/formats/yaml/CjsYamlFormat.js.map +1 -1
  333. package/dist/formats/yaml/core/CjsYamlReader.js +91 -0
  334. package/dist/formats/yaml/core/CjsYamlReader.js.map +1 -1
  335. package/dist/formats/yaml/core/helpers.js +10 -0
  336. package/dist/formats/yaml/core/helpers.js.map +1 -1
  337. package/dist/index.js +56 -43
  338. package/dist/index.js.map +1 -1
  339. package/dist/{CjsResource.js → resource/CjsResource.js} +232 -17
  340. package/dist/resource/CjsResource.js.map +1 -0
  341. package/dist/{resources → resource}/Tr2LightProfileRes.js +4 -3
  342. package/dist/resource/Tr2LightProfileRes.js.map +1 -0
  343. package/dist/{resources → resource/audio}/AudioGeometryResData.js +1 -1
  344. package/dist/resource/audio/AudioGeometryResData.js.map +1 -0
  345. package/dist/resource/audio/CjsAudioBufferRes.js +86 -0
  346. package/dist/resource/audio/CjsAudioBufferRes.js.map +1 -0
  347. package/dist/resource/audio/CjsAudioRes.js +213 -0
  348. package/dist/resource/audio/CjsAudioRes.js.map +1 -0
  349. package/dist/resource/audio/index.js +4 -0
  350. package/dist/resource/audio/index.js.map +1 -0
  351. package/dist/{resources → resource/geometry}/MeshDecalData.js +1 -1
  352. package/dist/resource/geometry/MeshDecalData.js.map +1 -0
  353. package/dist/{resources → resource/geometry}/MeshDecalLodData.js +1 -1
  354. package/dist/resource/geometry/MeshDecalLodData.js.map +1 -0
  355. package/dist/resource/geometry/TriGeometryRes.js +656 -0
  356. package/dist/resource/geometry/TriGeometryRes.js.map +1 -0
  357. package/dist/{resources → resource/geometry}/TriGeometryResAreaData.js +1 -1
  358. package/dist/resource/geometry/TriGeometryResAreaData.js.map +1 -0
  359. package/dist/{resources → resource/geometry}/TriGeometryResJointData.js +1 -1
  360. package/dist/resource/geometry/TriGeometryResJointData.js.map +1 -0
  361. package/dist/{resources → resource/geometry}/TriGeometryResLodData.js +1 -1
  362. package/dist/resource/geometry/TriGeometryResLodData.js.map +1 -0
  363. package/dist/{resources → resource/geometry}/TriGeometryResMeshData.js +1 -1
  364. package/dist/resource/geometry/TriGeometryResMeshData.js.map +1 -0
  365. package/dist/{resources → resource/geometry}/TriGeometryResSkeletonData.js +1 -1
  366. package/dist/resource/geometry/TriGeometryResSkeletonData.js.map +1 -0
  367. package/dist/{resources → resource/geometry}/TriJointBinding.js +1 -1
  368. package/dist/resource/geometry/TriJointBinding.js.map +1 -0
  369. package/dist/{resources → resource/geometry}/TriMorphTargetGeometryConstants.js +1 -1
  370. package/dist/resource/geometry/TriMorphTargetGeometryConstants.js.map +1 -0
  371. package/dist/{resources → resource/geometry}/TriRtGeometryConstants.js +1 -1
  372. package/dist/resource/geometry/TriRtGeometryConstants.js.map +1 -0
  373. package/dist/{resources → resource/geometry/granny}/GStateBindingCallbackData.js +1 -1
  374. package/dist/resource/geometry/granny/GStateBindingCallbackData.js.map +1 -0
  375. package/dist/{resources → resource/geometry/granny}/Tr2GrannyIntersectionResult.js +1 -1
  376. package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js.map +1 -0
  377. package/dist/{resources → resource/geometry/granny}/Tr2GrannyStateRes.js +6 -5
  378. package/dist/resource/geometry/granny/Tr2GrannyStateRes.js.map +1 -0
  379. package/dist/{resources → resource/geometry/granny}/TriGrannyRes.js +6 -5
  380. package/dist/resource/geometry/granny/TriGrannyRes.js.map +1 -0
  381. package/dist/{resources → resource/geometry/granny}/enums.js +1 -9
  382. package/dist/resource/geometry/granny/enums.js.map +1 -0
  383. package/dist/resource/geometry/granny/index.js +6 -0
  384. package/dist/resource/geometry/granny/index.js.map +1 -0
  385. package/dist/resource/geometry/index.js +17 -0
  386. package/dist/resource/geometry/index.js.map +1 -0
  387. package/dist/resource/index.js +52 -0
  388. package/dist/resource/index.js.map +1 -0
  389. package/dist/resource/resourceBoundary.js +64 -0
  390. package/dist/resource/resourceBoundary.js.map +1 -0
  391. package/dist/resource/shader/Tr2EffectRes.js +429 -0
  392. package/dist/resource/shader/Tr2EffectRes.js.map +1 -0
  393. package/dist/resource/shader/Tr2MaterialArea.js +34 -0
  394. package/dist/resource/shader/Tr2MaterialArea.js.map +1 -0
  395. package/dist/resource/shader/Tr2MaterialMesh.js +30 -0
  396. package/dist/resource/shader/Tr2MaterialMesh.js.map +1 -0
  397. package/dist/resource/shader/Tr2MaterialRes.js +35 -0
  398. package/dist/resource/shader/Tr2MaterialRes.js.map +1 -0
  399. package/dist/resource/shader/Tr2Shader.js +256 -0
  400. package/dist/resource/shader/Tr2Shader.js.map +1 -0
  401. package/dist/resource/shader/Tr2ShaderPermutation.js +47 -0
  402. package/dist/resource/shader/Tr2ShaderPermutation.js.map +1 -0
  403. package/dist/resource/shader/index.js +17 -0
  404. package/dist/resource/shader/index.js.map +1 -0
  405. package/dist/resource/shader/portable.js +33 -0
  406. package/dist/resource/shader/portable.js.map +1 -0
  407. package/dist/resource/shader/reflection/Tr2EffectConstant.js +135 -0
  408. package/dist/resource/shader/reflection/Tr2EffectConstant.js.map +1 -0
  409. package/dist/resource/shader/reflection/Tr2EffectDefine.js +28 -0
  410. package/dist/resource/shader/reflection/Tr2EffectDefine.js.map +1 -0
  411. package/dist/resource/shader/reflection/Tr2EffectDescription.js +107 -0
  412. package/dist/resource/shader/reflection/Tr2EffectDescription.js.map +1 -0
  413. package/dist/resource/shader/reflection/Tr2EffectLibrary.js +145 -0
  414. package/dist/resource/shader/reflection/Tr2EffectLibrary.js.map +1 -0
  415. package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +103 -0
  416. package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -0
  417. package/dist/resource/shader/reflection/Tr2EffectResource.js +84 -0
  418. package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -0
  419. package/dist/resource/shader/reflection/Tr2EffectStageInput.js +239 -0
  420. package/dist/resource/shader/reflection/Tr2EffectStageInput.js.map +1 -0
  421. package/dist/resource/shader/reflection/Tr2EffectTechnique.js +66 -0
  422. package/dist/resource/shader/reflection/Tr2EffectTechnique.js.map +1 -0
  423. package/dist/resource/shader/reflection/Tr2Pass.js +109 -0
  424. package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -0
  425. package/dist/resource/shader/sampler/Tr2SamplerSetup.js +75 -0
  426. package/dist/resource/shader/sampler/Tr2SamplerSetup.js.map +1 -0
  427. package/dist/{texture → resource/texture}/CjsTextureArrayRes.js +83 -6
  428. package/dist/resource/texture/CjsTextureArrayRes.js.map +1 -0
  429. package/dist/{texture/CjsTextureParameterProxy.js → resource/texture/CjsTextureArrayResParameterProxy.js} +56 -10
  430. package/dist/resource/texture/CjsTextureArrayResParameterProxy.js.map +1 -0
  431. package/dist/{resources → resource/texture}/Tr2ImageRes.js +6 -4
  432. package/dist/resource/texture/Tr2ImageRes.js.map +1 -0
  433. package/dist/{resources → resource/texture}/Tr2TextureLodManager.js +3 -1
  434. package/dist/resource/texture/Tr2TextureLodManager.js.map +1 -0
  435. package/dist/{resources → resource/texture}/Tr2TextureLodUpdateRequest.js +1 -1
  436. package/dist/resource/texture/Tr2TextureLodUpdateRequest.js.map +1 -0
  437. package/dist/{resources → resource/texture}/Tr2TexturePackChannel.js +1 -1
  438. package/dist/resource/texture/Tr2TexturePackChannel.js.map +1 -0
  439. package/dist/{resources → resource/texture}/Tr2TexturePipeline.js +6 -4
  440. package/dist/resource/texture/Tr2TexturePipeline.js.map +1 -0
  441. package/dist/{resources → resource/texture}/Tr2TexturePipelineParams.js +1 -1
  442. package/dist/resource/texture/Tr2TexturePipelineParams.js.map +1 -0
  443. package/dist/{resources → resource/texture}/Tr2TexturePipelineStepCompress.js +1 -1
  444. package/dist/resource/texture/Tr2TexturePipelineStepCompress.js.map +1 -0
  445. package/dist/{resources → resource/texture}/Tr2TexturePipelineStepGenerateMips.js +1 -1
  446. package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js.map +1 -0
  447. package/dist/{resources → resource/texture}/Tr2TexturePipelineStepLimitSize.js +1 -1
  448. package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js.map +1 -0
  449. package/dist/{resources → resource/texture}/Tr2TexturePipelineStepLoad.js +1 -1
  450. package/dist/resource/texture/Tr2TexturePipelineStepLoad.js.map +1 -0
  451. package/dist/{resources → resource/texture}/Tr2TexturePipelineStepPack.js +1 -1
  452. package/dist/resource/texture/Tr2TexturePipelineStepPack.js.map +1 -0
  453. package/dist/{resources → resource/texture}/TriTextureRes.js +42 -26
  454. package/dist/resource/texture/TriTextureRes.js.map +1 -0
  455. package/dist/resource/texture/index.js +15 -0
  456. package/dist/resource/texture/index.js.map +1 -0
  457. package/dist/{resources → resource/texture}/texturePipelineBehavior.js +59 -59
  458. package/dist/resource/texture/texturePipelineBehavior.js.map +1 -0
  459. package/dist/worker/CjsResManMainThreadLoader.js +87 -0
  460. package/dist/worker/CjsResManMainThreadLoader.js.map +1 -0
  461. package/dist/worker/CjsResManWorker.js +217 -0
  462. package/dist/worker/CjsResManWorker.js.map +1 -0
  463. package/dist/worker/CjsResManWorkerLoader.js +434 -0
  464. package/dist/worker/CjsResManWorkerLoader.js.map +1 -0
  465. package/dist/worker/protocol.js +12 -0
  466. package/dist/worker/protocol.js.map +1 -0
  467. package/docs/README.md +16 -3
  468. package/docs/architecture.md +39 -16
  469. package/docs/concepts/resource-lifecycle.md +2 -1
  470. package/docs/formats/README.md +8 -0
  471. package/docs/formats/provenance.md +11 -3
  472. package/docs/reference/classes/README.md +6 -4
  473. package/docs/reference/classes/audio.md +30 -0
  474. package/docs/reference/classes/core.md +31 -11
  475. package/docs/reference/classes/formats.md +440 -0
  476. package/docs/reference/classes/resources.md +151 -41
  477. package/docs/reference/classes/texture.md +7 -7
  478. package/docs/reference/motherlode-cache.md +17 -0
  479. package/docs/reference/queues.md +9 -1
  480. package/docs/reference/workers.md +135 -0
  481. package/docs/roadmap.md +27 -1
  482. package/format-notices/dxbc/LICENSE +21 -0
  483. package/format-notices/dxbc/NOTICE +20 -0
  484. package/format-notices/hlsl/LICENSE +21 -0
  485. package/format-notices/hlsl/NOTICE +25 -0
  486. package/format-notices/webgl/LICENSE +21 -0
  487. package/format-notices/webgl/NOTICE +35 -0
  488. package/format-notices/webgpu/LICENSE +21 -0
  489. package/format-notices/webgpu/NOTICE +31 -0
  490. package/package.json +13 -1
  491. package/dist/CjsResManQueue.js.map +0 -1
  492. package/dist/CjsResource.js.map +0 -1
  493. package/dist/CjsResourceSource.js +0 -68
  494. package/dist/CjsResourceSource.js.map +0 -1
  495. package/dist/resourcePath.js +0 -18
  496. package/dist/resourcePath.js.map +0 -1
  497. package/dist/resourceStates.js +0 -9
  498. package/dist/resourceStates.js.map +0 -1
  499. package/dist/resources/AudioGeometryResData.js.map +0 -1
  500. package/dist/resources/GStateBindingCallbackData.js.map +0 -1
  501. package/dist/resources/MeshDecalData.js.map +0 -1
  502. package/dist/resources/MeshDecalLodData.js.map +0 -1
  503. package/dist/resources/Tr2EffectRes.js +0 -71
  504. package/dist/resources/Tr2EffectRes.js.map +0 -1
  505. package/dist/resources/Tr2GrannyIntersectionResult.js.map +0 -1
  506. package/dist/resources/Tr2GrannyStateRes.js.map +0 -1
  507. package/dist/resources/Tr2ImageRes.js.map +0 -1
  508. package/dist/resources/Tr2LightProfileRes.js.map +0 -1
  509. package/dist/resources/Tr2MaterialArea.js +0 -34
  510. package/dist/resources/Tr2MaterialArea.js.map +0 -1
  511. package/dist/resources/Tr2MaterialMesh.js +0 -31
  512. package/dist/resources/Tr2MaterialMesh.js.map +0 -1
  513. package/dist/resources/Tr2MaterialRes.js +0 -34
  514. package/dist/resources/Tr2MaterialRes.js.map +0 -1
  515. package/dist/resources/Tr2ShaderPermutation.js +0 -43
  516. package/dist/resources/Tr2ShaderPermutation.js.map +0 -1
  517. package/dist/resources/Tr2TextureLodManager.js.map +0 -1
  518. package/dist/resources/Tr2TextureLodUpdateRequest.js.map +0 -1
  519. package/dist/resources/Tr2TexturePackChannel.js.map +0 -1
  520. package/dist/resources/Tr2TexturePipeline.js.map +0 -1
  521. package/dist/resources/Tr2TexturePipelineParams.js.map +0 -1
  522. package/dist/resources/Tr2TexturePipelineStepCompress.js.map +0 -1
  523. package/dist/resources/Tr2TexturePipelineStepGenerateMips.js.map +0 -1
  524. package/dist/resources/Tr2TexturePipelineStepLimitSize.js.map +0 -1
  525. package/dist/resources/Tr2TexturePipelineStepLoad.js.map +0 -1
  526. package/dist/resources/Tr2TexturePipelineStepPack.js.map +0 -1
  527. package/dist/resources/TriGeometryRes.js +0 -239
  528. package/dist/resources/TriGeometryRes.js.map +0 -1
  529. package/dist/resources/TriGeometryResAreaData.js.map +0 -1
  530. package/dist/resources/TriGeometryResJointData.js.map +0 -1
  531. package/dist/resources/TriGeometryResLodData.js.map +0 -1
  532. package/dist/resources/TriGeometryResMeshData.js.map +0 -1
  533. package/dist/resources/TriGeometryResSkeletonData.js.map +0 -1
  534. package/dist/resources/TriGrannyRes.js.map +0 -1
  535. package/dist/resources/TriJointBinding.js.map +0 -1
  536. package/dist/resources/TriMorphTargetGeometryConstants.js.map +0 -1
  537. package/dist/resources/TriRtGeometryConstants.js.map +0 -1
  538. package/dist/resources/TriTextureRes.js.map +0 -1
  539. package/dist/resources/enums.js.map +0 -1
  540. package/dist/resources/resourceBoundary.js +0 -47
  541. package/dist/resources/resourceBoundary.js.map +0 -1
  542. package/dist/resources/texturePipelineBehavior.js.map +0 -1
  543. package/dist/texture/CjsTextureArrayRes.js.map +0 -1
  544. package/dist/texture/CjsTextureParameterProxy.js.map +0 -1
package/docs/roadmap.md CHANGED
@@ -22,10 +22,36 @@ resource preparation abstraction:
22
22
  - application-level default retention policy selection;
23
23
  - automatic resource/payload byte estimation and separate CPU/adapter
24
24
  budgets;
25
- - browser-aware source behavior such as fetch response type selection;
25
+ - additional browser-source response types and configurable worker-pool
26
+ concurrency;
26
27
  - purged-resource/device-loss recovery policy (backend device-loss recovery
27
28
  belongs to the engine's realization operation).
28
29
 
30
+ ## Browser shader formats
31
+
32
+ The HLSL, DXBC, WebGL, and WebGPU format packages are expected to migrate into
33
+ runtime-resource as independently exported format entry points. HLSL and DXBC
34
+ remain directly usable; WebGL and WebGPU may compose them to read DX11/DX12
35
+ effect inputs and translate them in the browser.
36
+
37
+ Browser-targeted production modules must not import or require Node-only
38
+ shader libraries. A format package may use local Node libraries as development
39
+ or test dependencies for fixtures, comparison, and conformance checks, but
40
+ those libraries must not ship and must not be runtime dependencies.
41
+
42
+ ccpwgl currently preserves an authored `.fx` path while `Tw2Device` maps it to
43
+ a backend-specific remote namespace such as `effect.gles2` or `effect.webgl2`
44
+ and appends the selected shader-model extension. The migrated resource/format
45
+ contract must retain both use cases:
46
+
47
+ - resolve and load a pretranslated backend artifact from a remote resource
48
+ provider or tools-core cache; and
49
+ - fall back to the authored effect input and translate it in the browser.
50
+
51
+ The authored effect path should remain the stable identity. Backend profile,
52
+ shader model, translated cache path, and translation capabilities are
53
+ resolution facts rather than changes a caller must make to its source path.
54
+
29
55
  ## Pre-adoption lifecycle API cleanup (approved, not implemented)
30
56
 
31
57
  No released consumer currently depends on the ccpwgl-compatible liveness
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 cppctamber / CarbonEngineJS contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ carbonenginejs/format-dxbc
2
+ ==========================
3
+
4
+ A pure-JavaScript reader for Microsoft DXBC (Direct3D compiled shader
5
+ bytecode) containers and the SM4/SM5 instruction token stream.
6
+
7
+ Contains no Microsoft, CarbonEngine, or Fenris Creations (CCP Games) code. The
8
+ token-stream layout follows Microsoft's public d3d11TokenizedProgramFormat
9
+ documentation. CarbonEngine and Fenris Creations (CCP Games) are mentioned for
10
+ interoperability and target-ecosystem context only; DXBC itself is a Microsoft
11
+ format. Unity Technologies' HLSLcc (MIT) was used as a behavioral reference
12
+ while auditing instruction semantics; no HLSLcc source is included in this
13
+ repository.
14
+
15
+ This package is not affiliated with or endorsed by CCP Games.
16
+
17
+ CarbonEngineJS-facing code is copyright cppctamber / CarbonEngineJS
18
+ contributors.
19
+
20
+ Repository license: MIT. See LICENSE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 cppctamber / CarbonEngineJS contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ carbonenginejs/format-hlsl
2
+ ==========================
3
+
4
+ A pure-JavaScript reader for CCP's Tr2 compiled effect container format
5
+ (`.sm_hi` / `.sm_lo` / `.sm_depth` bodies): the permutation axes, technique
6
+ and pass tables, and per-stage constant/resource/sampler metadata that make
7
+ up one compiled Carbon/Trinity effect resource.
8
+
9
+ Contains no CarbonEngine or Fenris Creations (CCP Games) code. The container layout and
10
+ data-shape model were reverse-engineered from compiled effect files, historical
11
+ GLES shader assets, and observed CarbonEngine source-code structure. Those
12
+ sources informed field names and layout hypotheses; the implementation here is
13
+ original CarbonEngineJS code.
14
+
15
+ No CarbonEngine or Fenris Creations (CCP Games) source files, tooling, proprietary documentation, or
16
+ shader compiler code are included in this repository. Shader bytecode bodies are
17
+ kept as opaque bytes (`CjsShaderBytecode`) — this package does not decode
18
+ DXBC/HLSL bytecode.
19
+
20
+ This package is not affiliated with or endorsed by CCP Games.
21
+
22
+ CarbonEngineJS-facing code is copyright cppctamber / CarbonEngineJS
23
+ contributors.
24
+
25
+ Repository license: MIT. See LICENSE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 cppctamber / CarbonEngineJS contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,35 @@
1
+ carbonenginejs/format-webgl
2
+ ===========================
3
+
4
+ A pure-JavaScript reader/builder for CarbonEngineJS `.cewg` WebGL shader
5
+ packages, and a DXBC (Direct3D compiled shader bytecode) to GLSL ES 3.00
6
+ emitter for the WebGL2 vertex/pixel/map-style-compute stages ccpwgl targets.
7
+
8
+ Contains no Microsoft, CarbonEngine, or Fenris Creations (CCP Games) code. The CEWG container format (a flat
9
+ four-byte-tagged chunk layout: `INFO`/`META`/`GLSL`/...) is a CarbonEngineJS
10
+ invention, not a Microsoft, CarbonEngine, or Fenris Creations (CCP Games) one. The DXBC token-stream layout follows
11
+ Microsoft's public d3d11TokenizedProgramFormat documentation (consumed here
12
+ only through `@carbonenginejs/format-dxbc`'s public format; this package
13
+ decodes no DXBC bytes itself). Unity Technologies' HLSLcc (MIT) was used as
14
+ a behavioral reference while auditing the GLSL lowering rules this emitter
15
+ implements; no HLSLcc source is included in this repository.
16
+
17
+ CarbonEngine and Fenris Creations (CCP Games) are mentioned for
18
+ interoperability and target-runtime context. This package is not affiliated with
19
+ or endorsed by CCP Games.
20
+
21
+ Provenance
22
+ ----------
23
+
24
+ The CEWG package reader/builder and the DXBC-to-GLSL emitter were originally
25
+ developed in this project's own prior-work repository,
26
+ `hlslreader` (`src/carbon/webgl/CewgPackage.js`, `CewgPackageBuilder.js`, and
27
+ `src/dxbc/glsl/*.js`), and ported here with import/error-class adjustments
28
+ only (see README for the ported-file list). No third-party, CarbonEngine, or
29
+ Fenris Creations (CCP Games) source was copied; both repositories are
30
+ cppctamber / CarbonEngineJS original work.
31
+
32
+ CarbonEngineJS-facing code is copyright cppctamber / CarbonEngineJS
33
+ contributors.
34
+
35
+ Repository license: MIT. See LICENSE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CarbonEngineJS contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,31 @@
1
+ format-webgpu
2
+
3
+ Copyright (c) CarbonEngineJS contributors.
4
+ CarbonEngine source material, formats, class names, and schema semantics remain
5
+ copyright their original CarbonEngine authors.
6
+ Fenris Creations (CCP Games) source material, tools, assets, shader behavior,
7
+ and EVE-related data remain copyright their original holders.
8
+
9
+ This package is a CarbonEngineJS-facing reader/builder for `.cewgpu` WebGPU
10
+ package data plus offline effect-analysis helpers. It contains original project
11
+ code only unless this notice is expanded with third-party attribution.
12
+ CarbonEngine and Fenris Creations (CCP Games) are mentioned for
13
+ interoperability, provenance, and future migration context only. This package is
14
+ not affiliated with or endorsed by CCP Games.
15
+
16
+ Provenance and legal requirements
17
+ ---------------------------------
18
+
19
+ This scaffold currently contains CarbonEngineJS original project code only. It
20
+ does not include copied CarbonEngine source code or third-party parser code.
21
+
22
+ If future work copies, ports, translates, or derives from CarbonEngine, ccpwgl,
23
+ Fenris Creations (CCP Games) / EVE assets or tools, or any third-party library,
24
+ update this NOTICE before committing that work with:
25
+
26
+ - upstream copyright holders;
27
+ - upstream project/repository, file path, and revision when known;
28
+ - upstream license name, license text or required notice location, and any
29
+ redistribution obligations;
30
+ - whether the material was copied/ported/adapted, or used only as a behavioral
31
+ reference with no copied expression.
package/package.json CHANGED
@@ -1,10 +1,17 @@
1
1
  {
2
2
  "name": "@carbonenginejs/runtime-resource",
3
- "version": "0.9.2",
3
+ "version": "0.11.0",
4
4
  "description": "CarbonEngineJS resource lifecycle, cache, source, and object loading contracts.",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": "./dist/index.js",
8
+ "./resource": "./dist/resource/index.js",
9
+ "./resource/audio": "./dist/resource/audio/index.js",
10
+ "./resource/geometry": "./dist/resource/geometry/index.js",
11
+ "./resource/geometry/granny": "./dist/resource/geometry/granny/index.js",
12
+ "./resource/shader": "./dist/resource/shader/index.js",
13
+ "./resource/texture": "./dist/resource/texture/index.js",
14
+ "./worker": "./dist/worker/CjsResManWorker.js",
8
15
  "./formats": "./dist/formats/index.js",
9
16
  "./formats/black": "./dist/formats/black/index.js",
10
17
  "./formats/black/schema": "./dist/formats/black/core/blackSchema.js",
@@ -13,6 +20,11 @@
13
20
  "./formats/bnk": "./dist/formats/bnk/index.js",
14
21
  "./formats/cmf": "./dist/formats/cmf/index.js",
15
22
  "./formats/dds": "./dist/formats/dds/index.js",
23
+ "./formats/dxbc": "./dist/formats/dxbc/index.js",
24
+ "./formats/hlsl": "./dist/formats/hlsl/index.js",
25
+ "./formats/hlsl/portable": "./dist/formats/hlsl/portable.js",
26
+ "./formats/webgl": "./dist/formats/webgl/index.js",
27
+ "./formats/webgpu": "./dist/formats/webgpu/index.js",
16
28
  "./formats/fbx": "./dist/formats/fbx/index.js",
17
29
  "./formats/flac": "./dist/formats/flac/index.js",
18
30
  "./formats/gif": "./dist/formats/gif/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"file":"CjsResManQueue.js","sources":["../../src/CjsResManQueue.js"],"sourcesContent":["export const CjsResManQueue = Object.freeze({\n MAIN: \"main\",\n BACKGROUND: \"background\",\n PREPARE: \"main\",\n LOAD: \"background\"\n});\n\nexport function NormalizeCjsResManQueue(value) {\n const name = String(value ?? \"\").trim().toLowerCase();\n if (name === \"main\" || name === \"prepare\") return CjsResManQueue.MAIN;\n if (name === \"background\" || name === \"load\") return CjsResManQueue.BACKGROUND;\n throw new TypeError(`Unknown CjsResMan queue: ${value}`);\n}\n\nexport function CjsResManQueueCancelledError(queue, id, reason = \"\") {\n const error = new Error(`CjsResMan ${queue} queue item ${id} was cancelled.${reason ? ` ${reason}` : \"\"}`);\n error.code = \"CJS_RESMAN_QUEUE_CANCELLED\";\n error.queue = queue;\n error.id = id;\n return error;\n}\n\n/**\n * Small FIFO executor used internally by CjsResMan.\n *\n * Queue policy stays in the manager. This class only tracks ids, pause state,\n * concurrency, cancellation, and sync/async completion.\n */\nexport class CjsResManWorkQueue\n{\n #active = new Map();\n #concurrency = 1;\n #head = 0;\n #items = [];\n #name;\n #nextId = 1;\n #onReady;\n #paused = false;\n #queued = new Map();\n\n constructor(name, options = {}) {\n this.#name = NormalizeCjsResManQueue(name);\n this.#onReady = typeof options.onReady === \"function\" ? options.onReady : null;\n this.SetConcurrency(options.concurrency ?? 1);\n }\n\n SetConcurrency(value) {\n if (!Number.isInteger(value) || value < 1) {\n throw new TypeError(\"CjsResMan queue concurrency must be a positive integer.\");\n }\n this.#concurrency = value;\n this.#NotifyReady();\n return this;\n }\n\n GetConcurrency() {\n return this.#concurrency;\n }\n\n GetNextId() {\n return this.#nextId;\n }\n\n GetQueuedCount() {\n return this.#queued.size;\n }\n\n GetActiveCount() {\n return this.#active.size;\n }\n\n GetPendingCount() {\n return this.#queued.size + this.#active.size;\n }\n\n IsPaused() {\n return this.#paused;\n }\n\n Add(callback, context = null, metadata = null) {\n if (typeof callback !== \"function\") {\n throw new TypeError(\"CjsResMan queue items require a callback.\");\n }\n\n const id = this.#nextId++;\n let resolve;\n let reject;\n const promise = new Promise((onResolve, onReject) => {\n resolve = onResolve;\n reject = onReject;\n });\n const item = {\n id,\n queue: this.#name,\n callback,\n context,\n metadata,\n promise,\n resolve,\n reject,\n state: \"queued\"\n };\n\n this.#items.push(item);\n this.#queued.set(id, item);\n this.#NotifyReady();\n return item;\n }\n\n Cancel(id, reason = \"\") {\n const item = this.#queued.get(id);\n if (!item) return false;\n this.#queued.delete(id);\n item.state = \"cancelled\";\n item.reject(CjsResManQueueCancelledError(this.#name, id, reason));\n this.#Compact();\n return true;\n }\n\n Pause() {\n this.#paused = true;\n return this;\n }\n\n Resume() {\n if (!this.#paused) return this;\n this.#paused = false;\n this.#NotifyReady();\n return this;\n }\n\n Clear(reason = \"Queue cleared.\") {\n const ids = [ ...this.#queued.keys() ];\n for (const id of ids) this.Cancel(id, reason);\n this.#Compact(true);\n return ids.length;\n }\n\n Pump(options = {}) {\n const maxItems = NormalizeLimit(options.maxItems);\n const maxTime = NormalizeLimit(options.maxTime);\n const now = typeof options.now === \"function\" ? options.now : DefaultNow;\n const startedAt = now();\n let processed = 0;\n\n if (!this.#paused) {\n while (this.#active.size < this.#concurrency && processed < maxItems) {\n const item = this.#TakeNext();\n if (!item) break;\n this.#Start(item);\n processed++;\n if (processed > 0 && now() - startedAt >= maxTime) break;\n }\n }\n\n this.#Compact();\n return Object.freeze({\n processed,\n queued: this.GetQueuedCount(),\n active: this.GetActiveCount(),\n pending: this.GetPendingCount(),\n paused: this.#paused\n });\n }\n\n GetStats() {\n return Object.freeze({\n name: this.#name,\n nextId: this.#nextId,\n concurrency: this.#concurrency,\n queued: this.GetQueuedCount(),\n active: this.GetActiveCount(),\n pending: this.GetPendingCount(),\n paused: this.#paused\n });\n }\n\n #TakeNext() {\n while (this.#head < this.#items.length) {\n const item = this.#items[this.#head++];\n if (item.state !== \"queued\") continue;\n this.#queued.delete(item.id);\n return item;\n }\n return null;\n }\n\n #Start(item) {\n item.state = \"active\";\n this.#active.set(item.id, item);\n\n let result;\n try {\n result = item.callback.call(item.context, Object.freeze({\n id: item.id,\n queue: item.queue,\n metadata: item.metadata\n }));\n } catch (error) {\n this.#Settle(item, false, error);\n return;\n }\n\n if (result && typeof result.then === \"function\") {\n Promise.resolve(result).then(\n value => this.#Settle(item, true, value),\n error => this.#Settle(item, false, error)\n );\n return;\n }\n this.#Settle(item, true, result);\n }\n\n #Settle(item, didResolve, value) {\n if (!this.#active.delete(item.id)) return;\n item.state = didResolve ? \"resolved\" : \"rejected\";\n if (didResolve) item.resolve(value);\n else item.reject(value);\n this.#NotifyReady();\n }\n\n #Compact(force = false) {\n if (force || (this.#head > 256 && this.#head > this.#items.length * 0.5)) {\n this.#items = this.#items.slice(this.#head);\n this.#head = 0;\n }\n }\n\n #NotifyReady() {\n if (this.#onReady && !this.#paused && this.GetQueuedCount() > 0) {\n this.#onReady(this);\n }\n }\n}\n\nfunction NormalizeLimit(value) {\n if (value === undefined || value === null || value === 0) return Number.POSITIVE_INFINITY;\n if (typeof value !== \"number\" || Number.isNaN(value) || value < 0) {\n throw new TypeError(\"CjsResMan queue limits must be non-negative numbers.\");\n }\n return value;\n}\n\nfunction DefaultNow() {\n return globalThis.performance?.now?.() ?? Date.now();\n}\n"],"names":["CjsResManQueue","Object","freeze","MAIN","BACKGROUND","PREPARE","LOAD","NormalizeCjsResManQueue","value","name","String","trim","toLowerCase","TypeError","CjsResManQueueCancelledError","queue","id","reason","error","Error","code","CjsResManWorkQueue","Map","constructor","options","onReady","SetConcurrency","concurrency","Number","isInteger","GetConcurrency","GetNextId","GetQueuedCount","size","GetActiveCount","GetPendingCount","IsPaused","Add","callback","context","metadata","resolve","reject","promise","Promise","onResolve","onReject","item","state","push","set","Cancel","get","delete","Pause","Resume","Clear","ids","keys","length","Pump","maxItems","NormalizeLimit","maxTime","now","DefaultNow","startedAt","processed","queued","active","pending","paused","GetStats","nextId","#TakeNext","#Start","result","call","then","#Settle","didResolve","#Compact","force","slice","#NotifyReady","undefined","POSITIVE_INFINITY","isNaN","globalThis","performance","Date"],"mappings":"MAAaA,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AAC1CC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,OAAO,EAAE,MAAM;AACfC,EAAAA,IAAI,EAAE;AACR,CAAC;AAEM,SAASC,uBAAuBA,CAACC,KAAK,EAAE;AAC7C,EAAA,MAAMC,IAAI,GAAGC,MAAM,CAACF,KAAK,IAAI,EAAE,CAAC,CAACG,IAAI,EAAE,CAACC,WAAW,EAAE;EACrD,IAAIH,IAAI,KAAK,MAAM,IAAIA,IAAI,KAAK,SAAS,EAAE,OAAOT,cAAc,CAACG,IAAI;EACrE,IAAIM,IAAI,KAAK,YAAY,IAAIA,IAAI,KAAK,MAAM,EAAE,OAAOT,cAAc,CAACI,UAAU;AAC9E,EAAA,MAAM,IAAIS,SAAS,CAAC,CAAA,yBAAA,EAA4BL,KAAK,EAAE,CAAC;AAC1D;AAEO,SAASM,4BAA4BA,CAACC,KAAK,EAAEC,EAAE,EAAEC,MAAM,GAAG,EAAE,EAAE;AACnE,EAAA,MAAMC,KAAK,GAAG,IAAIC,KAAK,CAAC,CAAA,UAAA,EAAaJ,KAAK,CAAA,YAAA,EAAeC,EAAE,CAAA,eAAA,EAAkBC,MAAM,GAAG,CAAA,CAAA,EAAIA,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;E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AI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACrB,IAAA;AACF,EAAA;AACF;AAEA,SAAS8B,cAAcA,CAACtD,KAAK,EAAE;AAC7B,EAAA,IAAIA,KAAK,KAAK6E,SAAS,IAAI7E,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAK,CAAC,EAAE,OAAOoB,MAAM,CAAC0D,iBAAiB;AACzF,EAAA,IAAI,OAAO9E,KAAK,KAAK,QAAQ,IAAIoB,MAAM,CAAC2D,KAAK,CAAC/E,KAAK,CAAC,IAAIA,KAAK,GAAG,CAAC,EAAE;AACjE,IAAA,MAAM,IAAIK,SAAS,CAAC,sDAAsD,CAAC;AAC7E,EAAA;AACA,EAAA,OAAOL,KAAK;AACd;AAEA,SAASyD,UAAUA,GAAG;AACpB,EAAA,OAAOuB,UAAU,CAACC,WAAW,EAAEzB,GAAG,IAAI,IAAI0B,IAAI,CAAC1B,GAAG,EAAE;AACtD;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CjsResource.js","sources":["../../src/CjsResource.js"],"sourcesContent":["import { CjsEventEmitter } from \"@carbonenginejs/runtime-utils/model\";\nimport { CjsSchema, carbon, impl, type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { getResourceExtension, normalizeResourcePath } from \"./resourcePath.js\";\n\n/**\n * Deterministic activity values accepted by resource-facing lease methods.\n *\n * @typedef {object} CjsResourceActivityOptions\n * @property {number} [frame] Explicit non-negative activity frame.\n * @property {number} [time] Explicit non-negative activity timestamp in milliseconds.\n */\n\n/**\n * Manager-owned callbacks attached while a resource has canonical ownership.\n * The controller deliberately contains no load, fetch, prepare, or reload hook.\n *\n * @typedef {object} CjsResourceLifecycleController\n * @property {Function} [isCurrent] Tests exact canonical manager ownership without renewing activity.\n * @property {Function} [keepAlive] Renews canonical identity activity.\n * @property {Function} [keepPayloadAlive] Renews identity and CPU-payload activity.\n * @property {Function} [lock] Adds one inactivity-purge lock and returns its count.\n * @property {Function} [unlock] Releases one inactivity-purge lock and returns its count.\n */\n\n@type.define({ className: \"CjsResource\", family: \"resource\" })\n/**\n * ResMan-owned runtime resource.\n *\n * Resources are not model graph objects: BLACK/RED graphs persist resource\n * paths (including empty paths), while CjsResMan constructs, initializes,\n * caches, and hydrates the corresponding runtime resource instances.\n */\nexport class CjsResource extends CjsEventEmitter\n{\n #payload = null;\n\n @type.path\n path = \"\";\n\n @type.string\n ext = \"\";\n\n @type.string\n requirement = \"\";\n\n @type.string\n state = CjsResource.State.EMPTY;\n\n get isResource() {\n return true;\n }\n\n /**\n * Create a detached runtime resource with empty identity and payload state.\n * Schema values are applied without attaching manager lifecycle callbacks;\n * CjsResMan supplies those callbacks after canonical insertion.\n *\n * @param {object|null} [values=null] Initial decorated schema-field values.\n */\n constructor(values = null) {\n super();\n Object.defineProperty(this, \"__adapterResources\", {\n value: Object.create(null),\n enumerable: false,\n configurable: true,\n writable: true\n });\n Object.defineProperty(this, \"__objectLoader\", {\n value: null,\n enumerable: false,\n configurable: true,\n writable: true\n });\n Object.defineProperty(this, \"__objectRequest\", {\n value: null,\n enumerable: false,\n configurable: true,\n writable: true\n });\n Object.defineProperty(this, \"__lifecycleController\", {\n value: null,\n enumerable: false,\n configurable: true,\n writable: true\n });\n if (values)\n {\n this.SetValues(values);\n }\n }\n\n /**\n * Apply resource identity or metadata values without model graph semantics.\n *\n * @param {object|null} values\n * @returns {CjsResource}\n */\n SetValues(values = null) {\n if (!values || typeof values !== \"object\") return this;\n const fields = CjsSchema.getSchema(this.constructor).fields;\n for (const field of fields) {\n if (Object.prototype.hasOwnProperty.call(values, field.name)) {\n this[field.name] = values[field.name];\n }\n }\n return this;\n }\n\n /**\n * Export resource identity and schema metadata. Runtime state is not a model\n * graph node; graph fields normally persist only their resource path.\n *\n * @returns {object}\n */\n GetValues() {\n const result = {};\n for (const field of CjsSchema.getSchema(this.constructor).fields) {\n result[field.name] = this[field.name];\n }\n return result;\n }\n\n /**\n * Initialize the resource identity from a path and optional extension.\n *\n * @param {string} path\n * @param {string|null} ext\n * @param {string|null} requirement\n * @returns {CjsResource}\n */\n @carbon.method\n @impl.adapted\n Initialize(path, ext = null, requirement = \"\") {\n this.path = normalizeResourcePath(path);\n this.ext = ext ? String(ext).replace(/^\\./u, \"\").toLowerCase() : getResourceExtension(this.path);\n this.requirement = requirement === null || requirement === undefined\n ? \"\"\n : String(requirement).trim().toLowerCase();\n this.state = CjsResource.State.EMPTY;\n this.error = null;\n return this;\n }\n\n /**\n * Get the normalized resource path.\n *\n * @returns {string}\n */\n @carbon.method\n @impl.adapted\n GetPath() {\n return this.path;\n }\n\n /**\n * Get the normalized resource extension.\n *\n * @returns {string}\n */\n @carbon.method\n @impl.adapted\n GetExt() {\n return this.ext;\n }\n\n /**\n * Return the normalized semantic outcome requested from this source path.\n * This metadata query is pure and does not renew manager activity.\n *\n * @returns {string} Lowercase requirement name, or an empty string.\n */\n GetRequirement() {\n return this.requirement;\n }\n\n /**\n * Return true when the resource is currently loading.\n *\n * @returns {boolean}\n */\n @carbon.method\n @impl.adapted\n IsLoading() {\n return this.state === CjsResource.State.REQUESTED || this.state === CjsResource.State.LOADING;\n }\n\n /**\n * Return true when CPU resource payload data has been loaded.\n *\n * @returns {boolean}\n */\n @carbon.method\n @impl.adapted\n HasLoaded() {\n return this.state === CjsResource.State.LOADED\n || this.state === CjsResource.State.PREPARING\n || this.state === CjsResource.State.PREPARED;\n }\n\n /**\n * Return true when preparation has completed or produced a good resource.\n *\n * @returns {boolean}\n */\n @carbon.method\n @impl.adapted\n IsPrepared() {\n return this.state === CjsResource.State.PREPARED;\n }\n\n /**\n * Return true when preparation completed successfully.\n *\n * @returns {boolean}\n */\n @carbon.method\n @impl.adapted\n IsGood() {\n return this.IsPrepared();\n }\n\n /**\n * Return true when preparation failed.\n *\n * @returns {boolean}\n */\n @carbon.method\n @impl.adapted\n IsFailed() {\n return this.state === CjsResource.State.FAILED;\n }\n\n SetState(state, ...details) {\n if (!CjsResource.IsValidState(state)) {\n throw new TypeError(`Invalid CjsResource state: ${state}`);\n }\n const previous = this.state;\n if (previous === state) return this;\n this.state = state;\n this.EmitEvent?.(state, this, ...details);\n this.EmitEvent?.(\"statechange\", this, state, previous);\n return this;\n }\n\n MarkRequested() {\n return this.SetState(CjsResource.State.REQUESTED);\n }\n\n MarkLoading() {\n return this.SetState(CjsResource.State.LOADING);\n }\n\n MarkLoaded() {\n return this.SetState(CjsResource.State.LOADED);\n }\n\n MarkPreparing() {\n return this.SetState(CjsResource.State.PREPARING);\n }\n\n MarkPrepared() {\n return this.SetState(CjsResource.State.PREPARED);\n }\n\n MarkGood() {\n return this.MarkPrepared();\n }\n\n /**\n * Mark this detached resource handle as purged after a successful\n * manager-owned policy eviction, such as inactivity or recorded-byte cache\n * pressure, released its adapter allocations and payload.\n *\n * @returns {CjsResource} This purged resource.\n */\n MarkPurged()\n {\n return this.SetState(CjsResource.State.PURGED);\n }\n\n /**\n * Return whether deterministic manager cleanup has purged this handle.\n * This is a pure state query and never renews resource activity.\n *\n * @returns {boolean} `true` when the current state is `PURGED`.\n */\n IsPurged()\n {\n return this.state === CjsResource.State.PURGED;\n }\n\n SetError(error) {\n this.error = error || null;\n return this.SetState(CjsResource.State.FAILED, this.error);\n }\n\n /**\n * Store the plain CPU payload associated with this resource.\n * Concrete resource classes validate the fields they require before calling\n * this method. If the compatibility `object` property still aliases the\n * previous payload, it is updated to the replacement; semantic resources\n * whose `object` points to the resource itself are unaffected. A non-null\n * payload explicitly renews its manager-owned identity and payload leases;\n * payload reads remain pure and do not renew either lease.\n *\n * @param {*} payload Plain reader/converter output, or `null` to clear it.\n * @returns {CjsResource} This resource with the supplied payload reference.\n */\n SetPayload(payload = null) {\n const previous = this.#payload;\n this.#payload = payload;\n if (this.object === previous) this.object = payload;\n if (this.HasPayload()) this.KeepPayloadAlive();\n return this;\n }\n\n /**\n * Read the plain CPU payload associated with this resource.\n *\n * The query is pure and does not renew the payload lease.\n *\n * @returns {*} Current payload reference, or `null` after release.\n */\n GetPayload() {\n return this.#payload;\n }\n\n /**\n * Return whether a payload has been explicitly assigned. This query is pure\n * and does not renew the payload lease.\n *\n * @returns {boolean} Whether a non-null payload is attached.\n */\n HasPayload() {\n return this.#payload !== null && this.#payload !== undefined;\n }\n\n /**\n * Release the complete payload reference after consumers have retained the\n * scalars and typed-array views they require. When the compatibility\n * `object` property still aliases that exact payload, it is cleared as part\n * of the same ownership release. Semantic resources whose `object` property\n * points to the resource itself are unaffected.\n *\n * @returns {CjsResource} This resource without its former payload reference.\n */\n ReleasePayload() {\n const payload = this.#payload;\n this.#payload = null;\n if (this.object === payload) this.object = null;\n return this;\n }\n\n /**\n * Bind or detach the manager callbacks used by explicit resource-facing\n * liveness operations. Runtime resources remain usable when unbound; their\n * liveness methods then become deterministic no-ops.\n *\n * @param {CjsResourceLifecycleController|null} controller Manager callbacks, or `null` after canonical ownership ends.\n * @returns {CjsResource} This resource.\n * @throws {TypeError} If the controller or any supplied callback is invalid.\n */\n SetLifecycleController(controller = null)\n {\n if (controller !== null && (typeof controller !== \"object\" || Array.isArray(controller)))\n {\n throw new TypeError(\"CjsResource lifecycle controller must be an object or null.\");\n }\n for (const name of [ \"isCurrent\", \"keepAlive\", \"keepPayloadAlive\", \"lock\", \"unlock\" ])\n {\n if (controller?.[name] !== undefined && typeof controller[name] !== \"function\")\n {\n throw new TypeError(`CjsResource lifecycle controller ${name} must be a function.`);\n }\n }\n this.__lifecycleController = controller;\n return this;\n }\n\n /**\n * Return whether this handle is still the manager's canonical resource.\n *\n * Engine adapters use this immediately before synchronously attaching a\n * completed backend candidate. Detached resources return `false`; the query\n * never renews activity, reloads data, or mutates lifecycle state.\n *\n * @returns {boolean} Whether the bound manager still owns this exact handle.\n */\n IsCurrent()\n {\n return Boolean(this.__lifecycleController?.isCurrent?.());\n }\n\n /**\n * Explicitly renew this resource's canonical identity activity.\n * Unlike ccpwgl compatibility behavior, `IsGood()`, `HasLoaded()`, and other\n * state queries never call this method implicitly. Renewal never fetches or\n * reloads a purged resource.\n *\n * @param {CjsResourceActivityOptions} [options={}] Optional deterministic activity values.\n * @returns {CjsResource} This resource, whether bound or detached.\n * @throws {TypeError} If the bound manager rejects invalid activity values.\n */\n KeepAlive(options = {})\n {\n this.__lifecycleController?.keepAlive?.(options);\n return this;\n }\n\n /**\n * Explicitly renew both canonical identity activity and the attached CPU\n * payload lease. Reading the payload through `GetPayload()` or\n * `HasPayload()` remains pure.\n *\n * @param {CjsResourceActivityOptions} [options={}] Optional deterministic activity values.\n * @returns {CjsResource} This resource, whether a payload exists or not.\n * @throws {TypeError} If the bound manager rejects invalid activity values.\n */\n KeepPayloadAlive(options = {})\n {\n this.__lifecycleController?.keepPayloadAlive?.(options);\n return this;\n }\n\n /**\n * Add one explicit purge lock through the bound manager and renew identity\n * activity. Locking never reloads or prepares a resource.\n *\n * @returns {number} New lock count, or `0` when this resource is detached.\n */\n Lock()\n {\n return this.__lifecycleController?.lock?.() || 0;\n }\n\n /**\n * Release one explicit purge lock without allowing the count to underflow.\n * Unlocking does not immediately purge or release a payload.\n *\n * @returns {number} Remaining lock count, or `0` when detached or unlocked.\n */\n Unlock()\n {\n return this.__lifecycleController?.unlock?.() || 0;\n }\n\n /**\n * Bind the manager-owned object operation and compact reconstruction request\n * for this shared resource handle. The request contains source provenance\n * and requested-output defaults, not reader implementations or registry\n * history.\n *\n * @param {Function|null} loader Manager callback, or `null` to detach it.\n * @param {object|null} [request=null] Compact reconstruction defaults retained with the handle.\n * @returns {CjsResource} This resource with the supplied loader binding.\n * @throws {TypeError} If the loader or reconstruction request is invalid.\n */\n SetObjectLoader(loader = null, request = null)\n {\n if (loader !== null && typeof loader !== \"function\")\n {\n throw new TypeError(\"CjsResource.SetObjectLoader requires a function or null.\");\n }\n if (request !== null && (!request || typeof request !== \"object\" || Array.isArray(request)))\n {\n throw new TypeError(\"CjsResource.SetObjectLoader request must be an object or null.\");\n }\n this.__objectLoader = loader;\n this.__objectRequest = request === null ? null : Object.freeze({ ...request });\n return this;\n }\n\n /**\n * Return the compact manager request retained for explicit reconstruction.\n * This query is pure and exposes no reader, constructor, or implementation\n * identity.\n *\n * @returns {Readonly<object>|null} Frozen reconstruction defaults, or `null` when unbound.\n */\n GetObjectRequest()\n {\n return this.__objectRequest;\n }\n\n /**\n * Return the manager-owned object outcome for this resource identity.\n * Concurrent callers share one in-flight operation. A resident payload is\n * returned without source work; after explicit payload release, this call is\n * an explicit reconstruction request and may load/prepare through the bound\n * manager. Detached or purged handles do not revive themselves: their loader\n * resolves the manager's current canonical identity.\n *\n * Promised-output fields retained by the handle take precedence over fields\n * supplied here; operation policy such as cache/reload controls may still be\n * overridden.\n *\n * @param {object} [options={}] Source, format, semantic outcome, and queue options forwarded to the manager.\n * @returns {Promise<*>} In-flight, resident, or reconstructed object outcome.\n */\n GetObject(options = {})\n {\n if (!this.__objectLoader)\n {\n const error = new Error(`Resource has no object loader: ${this.path}`);\n error.code = \"CJS_RESOURCE_LOADER_UNBOUND\";\n return Promise.reject(error);\n }\n return this.__objectLoader(options);\n }\n\n /**\n * Promise-shaped alias for {@link CjsResource#GetObject}. Readiness shares an\n * in-flight operation, returns resident payload without loading, and treats a\n * call after payload release as an explicit reconstruction request.\n *\n * @param {object} [options={}] Source, format, semantic outcome, and queue options forwarded to the manager.\n * @returns {Promise<*>} In-flight, resident, or reconstructed object outcome.\n */\n Ready(options = {})\n {\n return this.GetObject(options);\n }\n\n /**\n * Attach an opaque engine-owned resource object.\n *\n * Runtime-resource stores this value but does not inspect GPU APIs.\n *\n * @param {string} key\n * @param {*} value\n * @returns {CjsResource}\n */\n SetAdapterResource(key, value) {\n if (!key) throw new TypeError(\"CjsResource.SetAdapterResource requires a key.\");\n this.__adapterResources[String(key)] = value;\n return this;\n }\n\n /**\n * Get an opaque engine-owned resource object.\n *\n * @param {string} key\n * @returns {*}\n */\n GetAdapterResource(key) {\n return this.__adapterResources[String(key)] ?? null;\n }\n\n /**\n * Returns true when an adapter resource exists for the given key.\n *\n * @param {string} key\n * @returns {boolean}\n */\n HasAdapterResource(key) {\n return Object.prototype.hasOwnProperty.call(this.__adapterResources, String(key));\n }\n\n /**\n * Remove an adapter resource and optionally call its destroy/dispose method.\n *\n * @param {string} key\n * @param {object} options\n * @returns {CjsResource}\n */\n DestroyAdapterResource(key, options = {}) {\n const name = String(key);\n const value = this.__adapterResources[name];\n if (value && options.destroy !== false) {\n DestroyAdapterValue(value);\n }\n delete this.__adapterResources[name];\n return this;\n }\n\n /**\n * Remove all adapter resources and optionally call their destroy/dispose methods.\n *\n * @param {object} options\n * @returns {CjsResource}\n */\n DestroyAdapterResources(options = {}) {\n for (const key of Object.keys(this.__adapterResources)) {\n this.DestroyAdapterResource(key, options);\n }\n return this;\n }\n\n static State = Object.freeze({\n EMPTY: \"empty\",\n REQUESTED: \"requested\",\n LOADING: \"loading\",\n LOADED: \"loaded\",\n PREPARING: \"preparing\",\n PREPARED: \"prepared\",\n FAILED: \"failed\",\n UNLOADED: \"unloaded\",\n PURGED: \"purged\"\n });\n\n static IsValidState(state) {\n return Object.values(CjsResource.State).includes(state);\n }\n}\n\nfunction DestroyAdapterValue(value) {\n if (!value || typeof value !== \"object\") return;\n const destroy = value.Destroy || value.Dispose || value.destroy || value.dispose;\n if (typeof destroy === \"function\") {\n destroy.call(value);\n }\n}\n"],"names":["_CjsResource","_identity","CjsResource","CjsEventEmitter","e","_init_path","_init_extra_path","_init_ext","_init_extra_ext","_init_requirement","_init_extra_requirement","_init_state","_init_extra_state","_initProto","c","_initClass","_applyDecs","type","define","className","family","path","string","carbon","method","impl","adapted","ext","requirement","state","State","EMPTY","isResource","constructor","values","Object","defineProperty","value","create","enumerable","configurable","writable","SetValues","fields","CjsSchema","getSchema","field","prototype","hasOwnProperty","call","name","GetValues","result","Initialize","normalizeResourcePath","String","replace","toLowerCase","getResourceExtension","undefined","trim","error","GetPath","GetExt","GetRequirement","IsLoading","REQUESTED","LOADING","HasLoaded","LOADED","PREPARING","PREPARED","IsPrepared","IsGood","IsFailed","FAILED","SetState","details","IsValidState","TypeError","previous","EmitEvent","MarkRequested","MarkLoading","MarkLoaded","MarkPreparing","MarkPrepared","MarkGood","MarkPurged","PURGED","IsPurged","SetError","SetPayload","payload","object","HasPayload","KeepPayloadAlive","GetPayload","ReleasePayload","SetLifecycleController","controller","Array","isArray","__lifecycleController","IsCurrent","Boolean","isCurrent","KeepAlive","options","keepAlive","keepPayloadAlive","Lock","lock","Unlock","unlock","SetObjectLoader","loader","request","__objectLoader","__objectRequest","freeze","GetObjectRequest","GetObject","Error","code","Promise","reject","Ready","SetAdapterResource","key","__adapterResources","GetAdapterResource","HasAdapterResource","DestroyAdapterResource","destroy","DestroyAdapterValue","DestroyAdapterResources","keys","includes","UNLOADED","Destroy","Dispose","dispose"],"mappings":";;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA;AAAA,IAAA,cAAAC,SAAA,CAAA;AAAA,EAAA,QAYA,MAAAC,WAAA,SAQiCC,eAAe,CAChD;AAAA,IAAA;AAAA,MAAA,CAAA;AAAAC,QAAAA,CAAA,GAAAC,UAAA,EAAAC,gBAAA,EAAAC,SAAA,EAAAC,eAAA,EAAAC,iBAAA,EAAAC,uBAAA,EAAAC,WAAA,EAAAC,iBAAA,EAAAC,UAAA,CAAA;QAAAC,CAAA,EAAA,CAAAd,YAAA,EAAAe,UAAA;AAAA,OAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CATCC,IAAI,CAACC,MAAM,CAAC;AAAEC,QAAAA,SAAS,EAAE,aAAa;AAAEC,QAAAA,MAAM,EAAE;OAAY,CAAC,CAAA,EAAA,CAAA,CAAA,CAY3DH,IAAI,EAAJA,IAAI,CAACI,IAAI,CAAA,EAAA,EAAA,EAAA,MAAA,CAAA,EAAA,CAAA,CAGTJ,IAAI,EAAJA,IAAI,CAACK,MAAM,CAAA,EAAA,EAAA,EAAA,KAAA,CAAA,EAAA,CAAA,CAGXL,IAAI,EAAJ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,kBAAkB,CAAC,EAAE;AACtD,QAAA,IAAI,CAACG,sBAAsB,CAACJ,GAAG,EAAErB,OAAO,CAAC;AAC3C,MAAA;AACA,MAAA,OAAO,IAAI;AACb,IAAA;IAcA,OAAO9B,YAAYA,CAACjD,KAAK,EAAE;AACzB,MAAA,OAAOM,MAAM,CAACD,MAAM,CAAChC,YAAW,CAAC4B,KAAK,CAAC,CAAC4G,QAAQ,CAAC7G,KAAK,CAAC;AACzD,IAAA;GACD;AAfQC,EAAAA,KAAK,GAAGK,MAAM,CAACqF,MAAM,CAAC;AAC3BzF,IAAAA,KAAK,EAAE,OAAO;AACdmC,IAAAA,SAAS,EAAE,WAAW;AACtBC,IAAAA,OAAO,EAAE,SAAS;AAClBE,IAAAA,MAAM,EAAE,QAAQ;AAChBC,IAAAA,SAAS,EAAE,WAAW;AACtBC,IAAAA,QAAQ,EAAE,UAAU;AACpBI,IAAAA,MAAM,EAAE,QAAQ;AAChBgE,IAAAA,QAAQ,EAAE,UAAU;AACpBlD,IAAAA,MAAM,EAAE;AACV,GAAC,CAAC;EAACxD,WAAAA,GAAA;IAAA,KAAA,CAAAjC,YAAA,GAAAe,UAAA,EAAA;AAAA,EAAA;AAAA,CAAA,EAAA;AAOL,SAASwH,mBAAmBA,CAAClG,KAAK,EAAE;AAClC,EAAA,IAAI,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;AACzC,EAAA,MAAMiG,OAAO,GAAGjG,KAAK,CAACuG,OAAO,IAAIvG,KAAK,CAACwG,OAAO,IAAIxG,KAAK,CAACiG,OAAO,IAAIjG,KAAK,CAACyG,OAAO;AAChF,EAAA,IAAI,OAAOR,OAAO,KAAK,UAAU,EAAE;AACjCA,IAAAA,OAAO,CAACrF,IAAI,CAACZ,KAAK,CAAC;AACrB,EAAA;AACF;;;;"}
@@ -1,68 +0,0 @@
1
- import { normalizeResourcePath } from './resourcePath.js';
2
-
3
- /**
4
- * In-memory resource source that maps normalized resource paths to preset
5
- * values and serves them to reads without any I/O.
6
- */
7
- class CjsMemoryResourceSource {
8
- #records = new Map();
9
- constructor(records = null) {
10
- if (records) this.SetRecords(records);
11
- }
12
- Set(path, value) {
13
- this.#records.set(normalizeResourcePath(path), value);
14
- return this;
15
- }
16
- SetRecords(records) {
17
- for (const [path, value] of Object.entries(records)) {
18
- this.Set(path, value);
19
- }
20
- return this;
21
- }
22
- Has(path) {
23
- return this.#records.has(normalizeResourcePath(path));
24
- }
25
- async Read(path) {
26
- const key = normalizeResourcePath(path);
27
- if (!this.#records.has(key)) {
28
- const error = new Error(`Resource not found: ${key}`);
29
- error.code = "CJS_RESOURCE_NOT_FOUND";
30
- error.path = key;
31
- throw error;
32
- }
33
- return this.#records.get(key);
34
- }
35
- }
36
-
37
- /**
38
- * Resource source that resolves a normalized path against an optional base
39
- * URL and reads response bytes through an injected fetch implementation.
40
- */
41
- class CjsFetchResourceSource {
42
- constructor(options = {}) {
43
- this.baseUrl = options.baseUrl || "";
44
- this.fetch = options.fetch || globalThis.fetch;
45
- }
46
- async Read(path, options = {}) {
47
- if (typeof this.fetch !== "function") {
48
- throw new TypeError("CjsFetchResourceSource requires a fetch implementation.");
49
- }
50
- const response = await this.fetch(this.ResolveUrl(path), options);
51
- if (!response.ok) {
52
- const error = new Error(`Resource fetch failed: ${response.status} ${response.statusText}`);
53
- error.code = "CJS_RESOURCE_FETCH_FAILED";
54
- error.path = normalizeResourcePath(path);
55
- error.status = response.status;
56
- throw error;
57
- }
58
- return response.arrayBuffer();
59
- }
60
- ResolveUrl(path) {
61
- const normalized = normalizeResourcePath(path);
62
- if (!this.baseUrl) return normalized;
63
- return new URL(normalized, this.baseUrl).toString();
64
- }
65
- }
66
-
67
- export { CjsFetchResourceSource, CjsMemoryResourceSource };
68
- //# sourceMappingURL=CjsResourceSource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CjsResourceSource.js","sources":["../../src/CjsResourceSource.js"],"sourcesContent":["import { normalizeResourcePath } from \"./resourcePath.js\";\n\n/**\n * In-memory resource source that maps normalized resource paths to preset\n * values and serves them to reads without any I/O.\n */\nexport class CjsMemoryResourceSource\n{\n #records = new Map();\n\n constructor(records = null) {\n if (records) this.SetRecords(records);\n }\n\n Set(path, value) {\n this.#records.set(normalizeResourcePath(path), value);\n return this;\n }\n\n SetRecords(records) {\n for (const [path, value] of Object.entries(records)) {\n this.Set(path, value);\n }\n return this;\n }\n\n Has(path) {\n return this.#records.has(normalizeResourcePath(path));\n }\n\n async Read(path) {\n const key = normalizeResourcePath(path);\n if (!this.#records.has(key)) {\n const error = new Error(`Resource not found: ${key}`);\n error.code = \"CJS_RESOURCE_NOT_FOUND\";\n error.path = key;\n throw error;\n }\n return this.#records.get(key);\n }\n}\n\n/**\n * Resource source that resolves a normalized path against an optional base\n * URL and reads response bytes through an injected fetch implementation.\n */\nexport class CjsFetchResourceSource\n{\n constructor(options = {}) {\n this.baseUrl = options.baseUrl || \"\";\n this.fetch = options.fetch || globalThis.fetch;\n }\n\n async Read(path, options = {}) {\n if (typeof this.fetch !== \"function\") {\n throw new TypeError(\"CjsFetchResourceSource requires a fetch implementation.\");\n }\n\n const response = await this.fetch(this.ResolveUrl(path), options);\n if (!response.ok) {\n const error = new Error(`Resource fetch failed: ${response.status} ${response.statusText}`);\n error.code = \"CJS_RESOURCE_FETCH_FAILED\";\n error.path = normalizeResourcePath(path);\n error.status = response.status;\n throw error;\n }\n\n return response.arrayBuffer();\n }\n\n ResolveUrl(path) {\n const normalized = normalizeResourcePath(path);\n if (!this.baseUrl) return normalized;\n return new URL(normalized, this.baseUrl).toString();\n }\n}\n"],"names":["CjsMemoryResourceSource","Map","constructor","records","SetRecords","Set","path","value","set","normalizeResourcePath","Object","entries","Has","has","Read","key","error","Error","code","get","CjsFetchResourceSource","options","baseUrl","fetch","globalThis","TypeError","response","ResolveUrl","ok","status","statusText","arrayBuffer","normalized","URL","toString"],"mappings":";;AAEA;AACA;AACA;AACA;AACO,MAAMA,uBAAuB,CACpC;AACE,EA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@@ -1,18 +0,0 @@
1
- function normalizeResourcePath(value) {
2
- return String(value ?? "").trim().replace(/\\/g, "/").replace(/\/+/g, "/").toLowerCase();
3
- }
4
- function getResourceExtension(value) {
5
- const path = normalizeResourcePath(value);
6
- const queryIndex = path.search(/[?#]/u);
7
- const cleanPath = queryIndex === -1 ? path : path.slice(0, queryIndex);
8
- const slashIndex = cleanPath.lastIndexOf("/");
9
- const dotIndex = cleanPath.lastIndexOf(".");
10
- if (dotIndex === -1 || dotIndex < slashIndex) return "";
11
- return cleanPath.slice(dotIndex + 1);
12
- }
13
- function normalizeResourceExtension(value) {
14
- return String(value ?? "").trim().replace(/^\./u, "").toLowerCase();
15
- }
16
-
17
- export { getResourceExtension, normalizeResourceExtension, normalizeResourcePath };
18
- //# sourceMappingURL=resourcePath.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resourcePath.js","sources":["../../src/resourcePath.js"],"sourcesContent":["export function normalizeResourcePath(value) {\n return String(value ?? \"\")\n .trim()\n .replace(/\\\\/g, \"/\")\n .replace(/\\/+/g, \"/\")\n .toLowerCase();\n}\n\nexport function getResourceExtension(value) {\n const path = normalizeResourcePath(value);\n const queryIndex = path.search(/[?#]/u);\n const cleanPath = queryIndex === -1 ? path : path.slice(0, queryIndex);\n const slashIndex = cleanPath.lastIndexOf(\"/\");\n const dotIndex = cleanPath.lastIndexOf(\".\");\n\n if (dotIndex === -1 || dotIndex < slashIndex) return \"\";\n return cleanPath.slice(dotIndex + 1);\n}\n\nexport function normalizeResourceExtension(value) {\n return String(value ?? \"\").trim().replace(/^\\./u, \"\").toLowerCase();\n}\n"],"names":["normalizeResourcePath","value","String","trim","replace","toLowerCase","getResourceExtension","path","queryIndex","search","cleanPath","slice","slashIndex","lastIndexOf","dotIndex","normalizeResourceExtension"],"mappings":"AAAO,SAASA,qBAAqBA,CAACC,KAAK,EAAE;EAC3C,OAAOC,MAAM,CAACD,KAAK,IAAI,EAAE,CAAC,CACvBE,IAAI,EAAE,CACNC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CACnBA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBC,WAAW,EAAE;AAClB;AAEO,SAASC,oBAAoBA,CAACL,KAAK,EAAE;AAC1C,EAAA,MAAMM,IAAI,GAAGP,qBAAqB,CAACC,KAAK,CAAC;AACzC,EAAA,MAAMO,UAAU,GAAGD,IAAI,CAACE,MAAM,CAAC,OAAO,CAAC;AACvC,EAAA,MAAMC,SAAS,GAAGF,UAAU,KAAK,EAAE,GAAGD,IAAI,GAAGA,IAAI,CAACI,KAAK,CAAC,CAAC,EAAEH,UAAU,CAAC;AACtE,EAAA,MAAMI,UAAU,GAAGF,SAAS,CAACG,WAAW,CAAC,GAAG,CAAC;AAC7C,EAAA,MAAMC,QAAQ,GAAGJ,SAAS,CAACG,WAAW,CAAC,GAAG,CAAC;EAE3C,IAAIC,QAAQ,KAAK,EAAE,IAAIA,QAAQ,GAAGF,UAAU,EAAE,OAAO,EAAE;AACvD,EAAA,OAAOF,SAAS,CAACC,KAAK,CAACG,QAAQ,GAAG,CAAC,CAAC;AACtC;AAEO,SAASC,0BAA0BA,CAACd,KAAK,EAAE;EAChD,OAAOC,MAAM,CAACD,KAAK,IAAI,EAAE,CAAC,CAACE,IAAI,EAAE,CAACC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACC,WAAW,EAAE;AACrE;;;;"}
@@ -1,9 +0,0 @@
1
- import { CjsResource as _CjsResource } from './CjsResource.js';
2
-
3
- const CjsResourceState = _CjsResource.State;
4
- function isTerminalResourceState(state) {
5
- return state === CjsResourceState.PREPARED || state === CjsResourceState.FAILED || state === CjsResourceState.UNLOADED || state === CjsResourceState.PURGED;
6
- }
7
-
8
- export { CjsResourceState, isTerminalResourceState };
9
- //# sourceMappingURL=resourceStates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resourceStates.js","sources":["../../src/resourceStates.js"],"sourcesContent":["import { CjsResource } from \"./CjsResource.js\";\n\nexport const CjsResourceState = CjsResource.State;\n\nexport function isTerminalResourceState(state) {\n return state === CjsResourceState.PREPARED\n || state === CjsResourceState.FAILED\n || state === CjsResourceState.UNLOADED\n || state === CjsResourceState.PURGED;\n}\n"],"names":["CjsResourceState","CjsResource","State","isTerminalResourceState","state","PREPARED","FAILED","UNLOADED","PURGED"],"mappings":";;AAEO,MAAMA,gBAAgB,GAAGC,YAAW,CAACC;AAErC,SAASC,uBAAuBA,CAACC,KAAK,EAAE;EAC7C,OAAOA,KAAK,KAAKJ,gBAAgB,CAACK,QAAQ,IACrCD,KAAK,KAAKJ,gBAAgB,CAACM,MAAM,IACjCF,KAAK,KAAKJ,gBAAgB,CAACO,QAAQ,IACnCH,KAAK,KAAKJ,gBAAgB,CAACQ,MAAM;AACxC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AudioGeometryResData.js","sources":["../../../src/resources/AudioGeometryResData.js"],"sourcesContent":["// Source: trinity/trinity/Resources/TriGeometryRes.h\r\n// Schema: format-carbon resources/AudioGeometryResData.json; maintained by runtime-resource.\r\nimport { type } from \"@carbonenginejs/runtime-utils/schema\";\r\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\r\nimport { vec3 } from \"@carbonenginejs/runtime-utils/vec3\";\r\n\r\n/** AudioGeometryResData (resources) - maintained from schema shapeHash 89e7ddb7.... */\r\n@type.define({ className: \"AudioGeometryResData\", family: \"resources\" })\r\nexport class AudioGeometryResData extends CjsModel\r\n{\r\n\r\n /** m_id (uint64_t) */\r\n @type.uint64\r\n id = 0;\r\n\r\n /** m_vertices (std::vector<Vector3>) */\r\n @type.list(\"Vector3\")\r\n vertices = [];\r\n\r\n /** m_indices (std::vector<uint32_t>) */\r\n @type.list(\"uint32_t\")\r\n indices = [];\r\n\r\n /** m_minBounds (Vector3) */\r\n @type.vec3\r\n minBounds = vec3.create();\r\n\r\n /** m_maxBounds (Vector3) */\r\n @type.vec3\r\n maxBounds = vec3.create();\r\n\r\n /** s_nextId (static std::atomic<uint64_t>) */\r\n @type.rawStruct(\"static std::atomic<uint64_t>\")\r\n s_nextId = null;\r\n\r\n}\r\n"],"names":["_AudioGeometryResData","AudioGeometryResData","CjsModel","e","_init_id","_init_extra_id","_init_vertices","_init_extra_vertices","_init_indices","_init_extra_indices","_init_minBounds","_init_extra_minBounds","_init_maxBounds","_init_extra_maxBounds","_init_s_nextId","_init_extra_s_nextId","c","_initClass","_applyDecs","type","define","className","family","uint64","list","vec3","rawStruct","constructor","args","id","vertices","indices","minBounds","create","maxBounds","s_nextId"],"mappings":";;;;;;;AAMA;AAAA,IAAAA;AACA,MAAAC,oBAAA,SAC0CC,QAAQ,CAClD;AAAA,EAAA;AAAA,IAAA,CAAA;MAAAC,CAAA,EAAA,CAAAC,QAAA,EAAAC,cAAA,EAAAC,cAAA,EAAAC,oBAAA,EAAAC,aAAA,EAAAC,mBAAA,EAAAC,eAAA,EAAAC,qBAAA,EAAAC,eAAA,EAAAC,qBAAA,EAAAC,cAAA,EAAAC,oBAAA,CAAA;MAAAC,CAAA,EAAA,CAAAhB,qBAAA,EAAAiB,UAAA;AAAA,KAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,MAAAA,SAAS,EAAE,sBAAsB;AAAEC,MAAAA,MAAM,EAAE;AAAY,KAAC,CAAC,CAAA,EAAA,CAAA,CAAA,CAKrEH,IAAI,EAAJA,IAAI,CAACI,MAAM,CAAA,EAAA,EAAA,EAAA,IAAA,CAAA,EAAA,CAIXJ,IAAI,CAACK,IAAI,CAAC,SAAS,CAAC,mBAIpBL,IAAI,CAACK,IAAI,CAAC,UAAU,CAAC,EAAA,CAAA,EAAA,SAAA,CAAA,EAAA,CAAA,CAIrBL,IAAI,EAAJA,IAAI,CAACM,IAAI,CAAA,EAAA,EAAA,EAAA,WAAA,CAAA,EAAA,CAAA,CAITN,IAAI,EAAJA,IAAI,CAACM,IAAI,CAAA,EAAA,EAAA,EAAA,WAAA,CAAA,EAAA,CAITN,IAAI,CAACO,SAAS,CAAC,8BAA8B,CAAC,8BAxBPxB,QAAQ,CAAA;AAAA;AAAAyB,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;IAAAb,oBAAA,CAAA,IAAA,CAAA;AAAA,EAAA;AAGhD;EAEAc,EAAE,GAAAzB,QAAA,CAAA,IAAA,EAAG,CAAC,CAAA;;AAEN;AAEA0B,EAAAA,QAAQ,IAAAzB,cAAA,CAAA,IAAA,CAAA,EAAAC,cAAA,OAAG,EAAE,CAAA;;AAEb;AAEAyB,EAAAA,OAAO,IAAAxB,oBAAA,CAAA,IAAA,CAAA,EAAAC,aAAA,OAAG,EAAE,CAAA;;AAEZ;EAEAwB,SAAS,IAAAvB,mBAAA,CAAA,IAAA,CAAA,EAAAC,eAAA,OAAGe,IAAI,CAACQ,MAAM,EAAE,CAAA;;AAEzB;EAEAC,SAAS,IAAAvB,qBAAA,CAAA,IAAA,CAAA,EAAAC,eAAA,OAAGa,IAAI,CAACQ,MAAM,EAAE,CAAA;;AAEzB;AAEAE,EAAAA,QAAQ,IAAAtB,qBAAA,CAAA,IAAA,CAAA,EAAAC,cAAA,OAAG,IAAI,CAAA;AAAC,EAAA;IAAAG,UAAA,EAAA;AAAA;AAElB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GStateBindingCallbackData.js","sources":["../../../src/resources/GStateBindingCallbackData.js"],"sourcesContent":["// Source: trinity/trinity/Resources/Tr2GrannyStateRes.h\r\n// Schema: format-carbon resources/GStateBindingCallbackData.json; maintained by runtime-resource.\r\nimport { type } from \"@carbonenginejs/runtime-utils/schema\";\r\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\r\n\r\n/** GStateBindingCallbackData (resources) - maintained from schema shapeHash ffae27cd.... */\r\n@type.define({ className: \"GStateBindingCallbackData\", family: \"resources\" })\r\nexport class GStateBindingCallbackData extends CjsModel\r\n{\r\n\r\n /** gsf_path (std::string) */\r\n @type.string\r\n gsf_path = \"\";\r\n\r\n}\r\n"],"names":["_GStateBindingCallbac","GStateBindingCallbackData","CjsModel","e","_init_gsf_path","_init_extra_gsf_path","c","_initClass","_applyDecs","type","define","className","family","string","constructor","args","gsf_path"],"mappings":";;;;;;AAKA;AAAA,IAAAA;AACA,MAAAC,yBAAA,SAC+CC,QAAQ,CACvD;AAAA,EAAA;AAAA,IAAA,CAAA;MAAAC,CAAA,EAAA,CAAAC,cAAA,EAAAC,oBAAA,CAAA;MAAAC,CAAA,EAAA,CAAAN,qBAAA,EAAAO,UAAA;AAAA,KAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,MAAAA,SAAS,EAAE,2BAA2B;AAAEC,MAAAA,MAAM,EAAE;KAAa,CAAC,MAK1EH,IAAI,EAAJA,IAAI,CAACI,MAAM,gCAJiCX,QAAQ,CAAA;AAAA;AAAAY,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;IAAAV,oBAAA,CAAA,IAAA,CAAA;AAAA,EAAA;AAGrD;EAEAW,QAAQ,GAAAZ,cAAA,CAAA,IAAA,EAAG,EAAE,CAAA;AAAC,EAAA;IAAAG,UAAA,EAAA;AAAA;AAEhB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MeshDecalData.js","sources":["../../../src/resources/MeshDecalData.js"],"sourcesContent":["// Source: trinity/trinity/Resources/TriGeometryRes.h\r\n// Schema: format-carbon resources/MeshDecalData.json; maintained by runtime-resource.\r\nimport { type } from \"@carbonenginejs/runtime-utils/schema\";\r\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\r\n\r\n/** MeshDecalData (resources) - maintained from schema shapeHash edd09cef.... */\r\n@type.define({ className: \"MeshDecalData\", family: \"resources\" })\r\nexport class MeshDecalData extends CjsModel\r\n{\r\n\r\n /** m_indexBuffer (Tr2SuballocatedBuffer::Allocation) */\r\n @type.rawStruct(\"Tr2SuballocatedBuffer::Allocation\")\r\n indexBuffer = null;\r\n\r\n /** m_lodMask (uint32_t) */\r\n @type.uint32\r\n lodMask = 0;\r\n\r\n /** m_lods (std::vector<MeshDecalLodData>) */\r\n @type.list(\"MeshDecalLodData\")\r\n lods = [];\r\n\r\n}\r\n"],"names":["_MeshDecalData","MeshDecalData","CjsModel","e","_init_indexBuffer","_init_extra_indexBuffer","_init_lodMask","_init_extra_lodMask","_init_lods","_init_extra_lods","c","_initClass","_applyDecs","type","define","className","family","rawStruct","uint32","list","constructor","args","indexBuffer","lodMask","lods"],"mappings":";;;;;;AAKA;AAAA,IAAAA;AACA,MAAAC,aAAA,SACmCC,QAAQ,CAC3C;AAAA,EAAA;AAAA,IAAA,CAAA;MAAAC,CAAA,EAAA,CAAAC,iBAAA,EAAAC,uBAAA,EAAAC,aAAA,EAAAC,mBAAA,EAAAC,UAAA,EAAAC,gBAAA,CAAA;MAAAC,CAAA,EAAA,CAAAV,cAAA,EAAAW,UAAA;AAAA,KAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,MAAAA,SAAS,EAAE,eAAe;AAAEC,MAAAA,MAAM,EAAE;KAAa,CAAC,KAK9DH,IAAI,CAACI,SAAS,CAAC,mCAAmC,CAAC,EAAA,CAAA,EAAA,aAAA,CAAA,EAAA,CAAA,CAInDJ,IAAI,EAAJA,IAAI,CAACK,MAAM,oBAIXL,IAAI,CAACM,IAAI,CAAC,kBAAkB,CAAC,EAAA,CAAA,EAAA,MAAA,CAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAZGjB,QAAQ,CAAA;AAAA;AAAAkB,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;IAAAZ,gBAAA,CAAA,IAAA,CAAA;AAAA,EAAA;AAGzC;EAEAa,WAAW,GAAAlB,iBAAA,CAAA,IAAA,EAAG,IAAI,CAAA;;AAElB;AAEAmB,EAAAA,OAAO,IAAAlB,uBAAA,CAAA,IAAA,CAAA,EAAAC,aAAA,OAAG,CAAC,CAAA;;AAEX;AAEAkB,EAAAA,IAAI,IAAAjB,mBAAA,CAAA,IAAA,CAAA,EAAAC,UAAA,OAAG,EAAE,CAAA;AAAC,EAAA;IAAAG,UAAA,EAAA;AAAA;AAEZ;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MeshDecalLodData.js","sources":["../../../src/resources/MeshDecalLodData.js"],"sourcesContent":["// Source: trinity/trinity/Resources/TriGeometryRes.h\r\n// Schema: format-carbon resources/MeshDecalLodData.json; maintained by runtime-resource.\r\nimport { type } from \"@carbonenginejs/runtime-utils/schema\";\r\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\r\n\r\n/** MeshDecalLodData (resources) - maintained from schema shapeHash 932b2966.... */\r\n@type.define({ className: \"MeshDecalLodData\", family: \"resources\" })\r\nexport class MeshDecalLodData extends CjsModel\r\n{\r\n\r\n /** m_startIndex (uint32_t) */\r\n @type.uint32\r\n startIndex = 0;\r\n\r\n /** m_primitiveCount (uint32_t) */\r\n @type.uint32\r\n primitiveCount = 0;\r\n\r\n}\r\n"],"names":["_MeshDecalLodData","MeshDecalLodData","CjsModel","e","_init_startIndex","_init_extra_startIndex","_init_primitiveCount","_init_extra_primitiveCount","c","_initClass","_applyDecs","type","define","className","family","uint32","constructor","args","startIndex","primitiveCount"],"mappings":";;;;;;AAKA;AAAA,IAAAA;AACA,MAAAC,gBAAA,SACsCC,QAAQ,CAC9C;AAAA,EAAA;AAAA,IAAA,CAAA;AAAAC,MAAAA,CAAA,GAAAC,gBAAA,EAAAC,sBAAA,EAAAC,oBAAA,EAAAC,0BAAA,CAAA;MAAAC,CAAA,EAAA,CAAAR,iBAAA,EAAAS,UAAA;AAAA,KAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,MAAAA,SAAS,EAAE,kBAAkB;AAAEC,MAAAA,MAAM,EAAE;AAAY,KAAC,CAAC,CAAA,EAAA,CAAA,CAAA,CAKjEH,IAAI,EAAJA,IAAI,CAACI,MAAM,CAAA,EAAA,EAAA,EAAA,YAAA,CAAA,EAAA,CAAA,CAIXJ,IAAI,EAAJA,IAAI,CAACI,MAAM,sCARwBb,QAAQ,CAAA;AAAA;AAAAc,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;IAAAV,0BAAA,CAAA,IAAA,CAAA;AAAA,EAAA;AAG5C;EAEAW,UAAU,GAAAd,gBAAA,CAAA,IAAA,EAAG,CAAC,CAAA;;AAEd;AAEAe,EAAAA,cAAc,IAAAd,sBAAA,CAAA,IAAA,CAAA,EAAAC,oBAAA,OAAG,CAAC,CAAA;AAAC,EAAA;IAAAG,UAAA,EAAA;AAAA;AAErB;;;;"}