@carbonenginejs/runtime-resource 0.10.0 → 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 (254) hide show
  1. package/dist/format/effect/effectPermutationGraph.js +257 -0
  2. package/dist/format/effect/effectPermutationGraph.js.map +1 -0
  3. package/dist/format/effect/effectReflectionPackage.js +636 -0
  4. package/dist/format/effect/effectReflectionPackage.js.map +1 -0
  5. package/dist/format/effect/sha256.js +114 -0
  6. package/dist/format/effect/sha256.js.map +1 -0
  7. package/dist/formats/dxbc/CjsDxbcFormat.js +142 -0
  8. package/dist/formats/dxbc/CjsDxbcFormat.js.map +1 -0
  9. package/dist/formats/dxbc/core/DxbcReader.js +266 -0
  10. package/dist/formats/dxbc/core/DxbcReader.js.map +1 -0
  11. package/dist/formats/dxbc/core/container.js +169 -0
  12. package/dist/formats/dxbc/core/container.js.map +1 -0
  13. package/dist/formats/dxbc/core/decoder.js +789 -0
  14. package/dist/formats/dxbc/core/decoder.js.map +1 -0
  15. package/dist/formats/dxbc/core/errors.js +19 -0
  16. package/dist/formats/dxbc/core/errors.js.map +1 -0
  17. package/dist/formats/dxbc/core/helpers.js +220 -0
  18. package/dist/formats/dxbc/core/helpers.js.map +1 -0
  19. package/dist/formats/dxbc/core/opcodes.js +45 -0
  20. package/dist/formats/dxbc/core/opcodes.js.map +1 -0
  21. package/dist/formats/dxbc/core/program.js +91 -0
  22. package/dist/formats/dxbc/core/program.js.map +1 -0
  23. package/dist/formats/dxbc/core/signature.js +172 -0
  24. package/dist/formats/dxbc/core/signature.js.map +1 -0
  25. package/dist/formats/dxbc/index.js +2 -0
  26. package/dist/formats/dxbc/index.js.map +1 -0
  27. package/dist/formats/hlsl/CjsHlslFormat.js +254 -0
  28. package/dist/formats/hlsl/CjsHlslFormat.js.map +1 -0
  29. package/dist/formats/hlsl/core/HlslBinaryUtils.js +15 -0
  30. package/dist/formats/hlsl/core/HlslBinaryUtils.js.map +1 -0
  31. package/dist/formats/hlsl/core/HlslEffectReadError.js +19 -0
  32. package/dist/formats/hlsl/core/HlslEffectReadError.js.map +1 -0
  33. package/dist/formats/hlsl/core/HlslEffectStateManager.js +130 -0
  34. package/dist/formats/hlsl/core/HlslEffectStateManager.js.map +1 -0
  35. package/dist/formats/hlsl/core/HlslReader.js +266 -0
  36. package/dist/formats/hlsl/core/HlslReader.js.map +1 -0
  37. package/dist/formats/hlsl/core/HlslRenderStateSetup.js +37 -0
  38. package/dist/formats/hlsl/core/HlslRenderStateSetup.js.map +1 -0
  39. package/dist/formats/hlsl/core/HlslResourceSetDescription.js +94 -0
  40. package/dist/formats/hlsl/core/HlslResourceSetDescription.js.map +1 -0
  41. package/dist/formats/hlsl/core/HlslShaderBytecode.js +44 -0
  42. package/dist/formats/hlsl/core/HlslShaderBytecode.js.map +1 -0
  43. package/dist/formats/hlsl/core/analysis.js +51 -0
  44. package/dist/formats/hlsl/core/analysis.js.map +1 -0
  45. package/dist/formats/hlsl/core/helpers.js +270 -0
  46. package/dist/formats/hlsl/core/helpers.js.map +1 -0
  47. package/dist/formats/hlsl/core/json.js +284 -0
  48. package/dist/formats/hlsl/core/json.js.map +1 -0
  49. package/dist/formats/hlsl/core/metadata.js +327 -0
  50. package/dist/formats/hlsl/core/metadata.js.map +1 -0
  51. package/dist/formats/hlsl/core/portableReflection.js +848 -0
  52. package/dist/formats/hlsl/core/portableReflection.js.map +1 -0
  53. package/dist/formats/hlsl/core/render-states.js +280 -0
  54. package/dist/formats/hlsl/core/render-states.js.map +1 -0
  55. package/dist/formats/hlsl/core/tr2/HlslRenderContextEnum.js +43 -0
  56. package/dist/formats/hlsl/core/tr2/HlslRenderContextEnum.js.map +1 -0
  57. package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js +294 -0
  58. package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js.map +1 -0
  59. package/dist/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js +33 -0
  60. package/dist/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js.map +1 -0
  61. package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js +416 -0
  62. package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js.map +1 -0
  63. package/dist/formats/hlsl/core/tr2/shader/HlslEffectConstant.js +40 -0
  64. package/dist/formats/hlsl/core/tr2/shader/HlslEffectConstant.js.map +1 -0
  65. package/dist/formats/hlsl/core/tr2/shader/HlslEffectDescription.js +742 -0
  66. package/dist/formats/hlsl/core/tr2/shader/HlslEffectDescription.js.map +1 -0
  67. package/dist/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js +52 -0
  68. package/dist/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js.map +1 -0
  69. package/dist/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js +38 -0
  70. package/dist/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js.map +1 -0
  71. package/dist/formats/hlsl/core/tr2/shader/HlslEffectResource.js +50 -0
  72. package/dist/formats/hlsl/core/tr2/shader/HlslEffectResource.js.map +1 -0
  73. package/dist/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js +86 -0
  74. package/dist/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js.map +1 -0
  75. package/dist/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js +31 -0
  76. package/dist/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js.map +1 -0
  77. package/dist/formats/hlsl/core/tr2/shader/HlslPass.js +42 -0
  78. package/dist/formats/hlsl/core/tr2/shader/HlslPass.js.map +1 -0
  79. package/dist/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js +55 -0
  80. package/dist/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js.map +1 -0
  81. package/dist/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js +29 -0
  82. package/dist/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js.map +1 -0
  83. package/dist/formats/hlsl/core/tr2/shader/HlslShader.js +220 -0
  84. package/dist/formats/hlsl/core/tr2/shader/HlslShader.js.map +1 -0
  85. package/dist/formats/hlsl/core/tr2/shader/HlslShaderOption.js +30 -0
  86. package/dist/formats/hlsl/core/tr2/shader/HlslShaderOption.js.map +1 -0
  87. package/dist/formats/hlsl/index.js +2 -0
  88. package/dist/formats/hlsl/index.js.map +1 -0
  89. package/dist/formats/hlsl/portable.js +2 -0
  90. package/dist/formats/hlsl/portable.js.map +1 -0
  91. package/dist/formats/index.js +4 -0
  92. package/dist/formats/index.js.map +1 -1
  93. package/dist/formats/webgl/CjsWebglFormat.js +221 -0
  94. package/dist/formats/webgl/CjsWebglFormat.js.map +1 -0
  95. package/dist/formats/webgl/core/cewg/CewgPackage.js +339 -0
  96. package/dist/formats/webgl/core/cewg/CewgPackage.js.map +1 -0
  97. package/dist/formats/webgl/core/cewg/CewgPackageBuilder.js +104 -0
  98. package/dist/formats/webgl/core/cewg/CewgPackageBuilder.js.map +1 -0
  99. package/dist/formats/webgl/core/cewg/binary.js +101 -0
  100. package/dist/formats/webgl/core/cewg/binary.js.map +1 -0
  101. package/dist/formats/webgl/core/cewgCompleteness.js +81 -0
  102. package/dist/formats/webgl/core/cewgCompleteness.js.map +1 -0
  103. package/dist/formats/webgl/core/effectPackage.js +789 -0
  104. package/dist/formats/webgl/core/effectPackage.js.map +1 -0
  105. package/dist/formats/webgl/core/effectPackageValidation.js +331 -0
  106. package/dist/formats/webgl/core/effectPackageValidation.js.map +1 -0
  107. package/dist/formats/webgl/core/errors.js +27 -0
  108. package/dist/formats/webgl/core/errors.js.map +1 -0
  109. package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js +2678 -0
  110. package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -0
  111. package/dist/formats/webgl/core/glsl/DxbcGlslHelpers.js +89 -0
  112. package/dist/formats/webgl/core/glsl/DxbcGlslHelpers.js.map +1 -0
  113. package/dist/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js +428 -0
  114. package/dist/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js.map +1 -0
  115. package/dist/formats/webgl/core/helpers.js +306 -0
  116. package/dist/formats/webgl/core/helpers.js.map +1 -0
  117. package/dist/formats/webgl/index.js +2 -0
  118. package/dist/formats/webgl/index.js.map +1 -0
  119. package/dist/formats/webgpu/CjsWebgpuFormat.js +376 -0
  120. package/dist/formats/webgpu/CjsWebgpuFormat.js.map +1 -0
  121. package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js +415 -0
  122. package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js.map +1 -0
  123. package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js +100 -0
  124. package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js.map +1 -0
  125. package/dist/formats/webgpu/core/cewgpu/binary.js +93 -0
  126. package/dist/formats/webgpu/core/cewgpu/binary.js.map +1 -0
  127. package/dist/formats/webgpu/core/cewgpu/tags.js +17 -0
  128. package/dist/formats/webgpu/core/cewgpu/tags.js.map +1 -0
  129. package/dist/formats/webgpu/core/effectAnalysis.js +82 -0
  130. package/dist/formats/webgpu/core/effectAnalysis.js.map +1 -0
  131. package/dist/formats/webgpu/core/effectBackendBodySet.js +305 -0
  132. package/dist/formats/webgpu/core/effectBackendBodySet.js.map +1 -0
  133. package/dist/formats/webgpu/core/effectPackageValidation.js +1078 -0
  134. package/dist/formats/webgpu/core/effectPackageValidation.js.map +1 -0
  135. package/dist/formats/webgpu/core/errors.js +20 -0
  136. package/dist/formats/webgpu/core/errors.js.map +1 -0
  137. package/dist/formats/webgpu/core/helpers.js +448 -0
  138. package/dist/formats/webgpu/core/helpers.js.map +1 -0
  139. package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js +223 -0
  140. package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js.map +1 -0
  141. package/dist/formats/webgpu/core/ir/buildControlFlow.js +220 -0
  142. package/dist/formats/webgpu/core/ir/buildControlFlow.js.map +1 -0
  143. package/dist/formats/webgpu/core/ir/indexableTemps.js +137 -0
  144. package/dist/formats/webgpu/core/ir/indexableTemps.js.map +1 -0
  145. package/dist/formats/webgpu/core/ir/inferValueTypes.js +454 -0
  146. package/dist/formats/webgpu/core/ir/inferValueTypes.js.map +1 -0
  147. package/dist/formats/webgpu/core/ir/lowerDxbcToIr.js +494 -0
  148. package/dist/formats/webgpu/core/ir/lowerDxbcToIr.js.map +1 -0
  149. package/dist/formats/webgpu/core/ir/resolveRegisterFlow.js +177 -0
  150. package/dist/formats/webgpu/core/ir/resolveRegisterFlow.js.map +1 -0
  151. package/dist/formats/webgpu/core/ir/sourceLanes.js +61 -0
  152. package/dist/formats/webgpu/core/ir/sourceLanes.js.map +1 -0
  153. package/dist/formats/webgpu/core/packageEffect.js +300 -0
  154. package/dist/formats/webgpu/core/packageEffect.js.map +1 -0
  155. package/dist/formats/webgpu/core/packageEffectSelection.js +164 -0
  156. package/dist/formats/webgpu/core/packageEffectSelection.js.map +1 -0
  157. package/dist/formats/webgpu/core/packageMetadata.js +8 -0
  158. package/dist/formats/webgpu/core/packageMetadata.js.map +1 -0
  159. package/dist/formats/webgpu/core/schema.js +4 -0
  160. package/dist/formats/webgpu/core/schema.js.map +1 -0
  161. package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js +275 -0
  162. package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js.map +1 -0
  163. package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js +182 -0
  164. package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js.map +1 -0
  165. package/dist/formats/webgpu/core/wgsl/buildWgslSet.js +324 -0
  166. package/dist/formats/webgpu/core/wgsl/buildWgslSet.js.map +1 -0
  167. package/dist/formats/webgpu/core/wgsl/emitWgsl.js +356 -0
  168. package/dist/formats/webgpu/core/wgsl/emitWgsl.js.map +1 -0
  169. package/dist/formats/webgpu/core/wgsl/hoistEscapingValues.js +77 -0
  170. package/dist/formats/webgpu/core/wgsl/hoistEscapingValues.js.map +1 -0
  171. package/dist/formats/webgpu/core/wgsl/lowerBindingLayout.js +451 -0
  172. package/dist/formats/webgpu/core/wgsl/lowerBindingLayout.js.map +1 -0
  173. package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js +754 -0
  174. package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js.map +1 -0
  175. package/dist/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js +457 -0
  176. package/dist/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js.map +1 -0
  177. package/dist/formats/webgpu/core/wgsl/lowerFragmentProgram.js +1572 -0
  178. package/dist/formats/webgpu/core/wgsl/lowerFragmentProgram.js.map +1 -0
  179. package/dist/formats/webgpu/core/wgsl/lowerMergeHistogramsComputeProgram.js +659 -0
  180. package/dist/formats/webgpu/core/wgsl/lowerMergeHistogramsComputeProgram.js.map +1 -0
  181. package/dist/formats/webgpu/core/wgsl/lowerParticleClearComputePrograms.js +734 -0
  182. package/dist/formats/webgpu/core/wgsl/lowerParticleClearComputePrograms.js.map +1 -0
  183. package/dist/formats/webgpu/core/wgsl/lowerParticleEmitComputeProgram.js +583 -0
  184. package/dist/formats/webgpu/core/wgsl/lowerParticleEmitComputeProgram.js.map +1 -0
  185. package/dist/formats/webgpu/core/wgsl/lowerSkinVerticesComputeProgram.js +621 -0
  186. package/dist/formats/webgpu/core/wgsl/lowerSkinVerticesComputeProgram.js.map +1 -0
  187. package/dist/formats/webgpu/core/wgsl/lowerSortComputeProgram.js +824 -0
  188. package/dist/formats/webgpu/core/wgsl/lowerSortComputeProgram.js.map +1 -0
  189. package/dist/formats/webgpu/core/wgsl/lowerSortInnerComputeProgram.js +697 -0
  190. package/dist/formats/webgpu/core/wgsl/lowerSortInnerComputeProgram.js.map +1 -0
  191. package/dist/formats/webgpu/core/wgsl/lowerSortStepComputeProgram.js +559 -0
  192. package/dist/formats/webgpu/core/wgsl/lowerSortStepComputeProgram.js.map +1 -0
  193. package/dist/formats/webgpu/core/wgsl/lowerVertexProgram.js +1328 -0
  194. package/dist/formats/webgpu/core/wgsl/lowerVertexProgram.js.map +1 -0
  195. package/dist/formats/webgpu/core/wgsl/particleEmitSemanticDigest.js +110 -0
  196. package/dist/formats/webgpu/core/wgsl/particleEmitSemanticDigest.js.map +1 -0
  197. package/dist/formats/webgpu/core/wgsl/precisionControls.js +55 -0
  198. package/dist/formats/webgpu/core/wgsl/precisionControls.js.map +1 -0
  199. package/dist/formats/webgpu/core/wgsl/selectionPlans.js +758 -0
  200. package/dist/formats/webgpu/core/wgsl/selectionPlans.js.map +1 -0
  201. package/dist/formats/webgpu/core/wgsl/uniformity.js +78 -0
  202. package/dist/formats/webgpu/core/wgsl/uniformity.js.map +1 -0
  203. package/dist/formats/webgpu/core/wgsl/validateExactComputeIr.js +196 -0
  204. package/dist/formats/webgpu/core/wgsl/validateExactComputeIr.js.map +1 -0
  205. package/dist/formats/webgpu/core/wgsl/validateHandleOperand.js +37 -0
  206. package/dist/formats/webgpu/core/wgsl/validateHandleOperand.js.map +1 -0
  207. package/dist/formats/webgpu/index.js +2 -0
  208. package/dist/formats/webgpu/index.js.map +1 -0
  209. package/dist/resource/shader/Tr2EffectRes.js +159 -150
  210. package/dist/resource/shader/Tr2EffectRes.js.map +1 -1
  211. package/dist/resource/shader/Tr2MaterialArea.js +23 -28
  212. package/dist/resource/shader/Tr2MaterialArea.js.map +1 -1
  213. package/dist/resource/shader/Tr2MaterialMesh.js +21 -27
  214. package/dist/resource/shader/Tr2MaterialMesh.js.map +1 -1
  215. package/dist/resource/shader/Tr2MaterialRes.js +24 -29
  216. package/dist/resource/shader/Tr2MaterialRes.js.map +1 -1
  217. package/dist/resource/shader/Tr2Shader.js +45 -39
  218. package/dist/resource/shader/Tr2Shader.js.map +1 -1
  219. package/dist/resource/shader/Tr2ShaderPermutation.js +30 -32
  220. package/dist/resource/shader/Tr2ShaderPermutation.js.map +1 -1
  221. package/dist/resource/shader/reflection/Tr2EffectConstant.js +113 -78
  222. package/dist/resource/shader/reflection/Tr2EffectConstant.js.map +1 -1
  223. package/dist/resource/shader/reflection/Tr2EffectDefine.js +17 -23
  224. package/dist/resource/shader/reflection/Tr2EffectDefine.js.map +1 -1
  225. package/dist/resource/shader/reflection/Tr2EffectDescription.js +23 -29
  226. package/dist/resource/shader/reflection/Tr2EffectDescription.js.map +1 -1
  227. package/dist/resource/shader/reflection/Tr2EffectLibrary.js +44 -40
  228. package/dist/resource/shader/reflection/Tr2EffectLibrary.js.map +1 -1
  229. package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +82 -86
  230. package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -1
  231. package/dist/resource/shader/reflection/Tr2EffectResource.js +55 -61
  232. package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
  233. package/dist/resource/shader/reflection/Tr2EffectStageInput.js +49 -45
  234. package/dist/resource/shader/reflection/Tr2EffectStageInput.js.map +1 -1
  235. package/dist/resource/shader/reflection/Tr2EffectTechnique.js +25 -30
  236. package/dist/resource/shader/reflection/Tr2EffectTechnique.js.map +1 -1
  237. package/dist/resource/shader/reflection/Tr2Pass.js +30 -32
  238. package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -1
  239. package/dist/resource/shader/sampler/Tr2SamplerSetup.js +21 -26
  240. package/dist/resource/shader/sampler/Tr2SamplerSetup.js.map +1 -1
  241. package/docs/formats/README.md +4 -0
  242. package/docs/formats/provenance.md +11 -3
  243. package/docs/reference/classes/formats.md +440 -0
  244. package/format-notices/dxbc/LICENSE +21 -0
  245. package/format-notices/dxbc/NOTICE +20 -0
  246. package/format-notices/hlsl/LICENSE +21 -0
  247. package/format-notices/hlsl/NOTICE +25 -0
  248. package/format-notices/webgl/LICENSE +21 -0
  249. package/format-notices/webgl/NOTICE +35 -0
  250. package/format-notices/webgpu/LICENSE +21 -0
  251. package/format-notices/webgpu/NOTICE +31 -0
  252. package/package.json +6 -1
  253. package/dist/resource/shader/portableValidation.js +0 -461
  254. package/dist/resource/shader/portableValidation.js.map +0 -1
@@ -1,100 +1,135 @@
1
- import { identity as _identity, applyDecs2311 as _applyDecs2311 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import { type, impl, schema } from '@carbonenginejs/runtime-utils/schema';
1
+ import { CjsSchema } from '@carbonenginejs/runtime-utils/schema';
3
2
  import { CjsModel } from '@carbonenginejs/runtime-utils/model';
4
3
  import { isPlainObject, isUint32 } from '@carbonenginejs/runtime-utils/is';
5
4
 
6
- let _initStatic, _initClass, _init_name, _init_extra_name, _init_offset, _init_extra_offset, _init_size, _init_extra_size, _init_type, _init_extra_type, _init_dimension, _init_extra_dimension, _init_elements, _init_extra_elements, _init_isSRGB, _init_extra_isSRGB, _init_isAutoregister, _init_extra_isAutoregister;
5
+ // Source: trinity/trinity/Shader/Tr2EffectDescription.h
7
6
 
8
7
  /** Reflected shader constant metadata. */
9
- let _Tr2EffectConstant;
10
- new class extends _identity {
11
- static [class Tr2EffectConstant extends CjsModel {
12
- static {
13
- ({
14
- e: [_init_name, _init_extra_name, _init_offset, _init_extra_offset, _init_size, _init_extra_size, _init_type, _init_extra_type, _init_dimension, _init_extra_dimension, _init_elements, _init_extra_elements, _init_isSRGB, _init_extra_isSRGB, _init_isAutoregister, _init_extra_isAutoregister, _initStatic],
15
- c: [_Tr2EffectConstant, _initClass]
16
- } = _applyDecs2311(this, [type.define({
17
- className: "Tr2EffectConstant",
18
- family: "shader"
19
- })], [[[type, type.string], 16, "name"], [[type, type.uint32], 16, "offset"], [[type, type.uint32], 16, "size"], [[type, type.int32, void 0, schema.enum("Type")], 16, "type"], [[type, type.uint32], 16, "dimension"], [[type, type.uint32], 16, "elements"], [[type, type.boolean], 16, "isSRGB"], [[type, type.boolean], 16, "isAutoregister"], [[impl, impl.custom, void 0, impl.reason("Carbon reads compiled effect bytes directly; CarbonEngineJS hydrates the browser-safe portable-reflection contract after format parsing.")], 26, "fromPortable"]], 0, void 0, CjsModel));
20
- _initStatic(this);
21
- }
22
- constructor(...args) {
23
- super(...args);
24
- _init_extra_isAutoregister(this);
25
- }
26
- /** name (BlueSharedString) */
27
- name = _init_name(this, "");
8
+ class Tr2EffectConstant extends CjsModel {
9
+ /** name (BlueSharedString) */
10
+ name = "";
28
11
 
29
- /** offset (unsigned) */
30
- offset = (_init_extra_name(this), _init_offset(this, 0));
12
+ /** offset (unsigned) */
13
+ offset = 0;
31
14
 
32
- /** size (unsigned) */
33
- size = (_init_extra_offset(this), _init_size(this, 0));
15
+ /** size (unsigned) */
16
+ size = 0;
34
17
 
35
- /** type (Type - enum Type) */
36
- type = (_init_extra_size(this), _init_type(this, 0));
18
+ /** type (Type - enum Type) */
19
+ type = 0;
37
20
 
38
- /** dimension (unsigned) */
39
- dimension = (_init_extra_type(this), _init_dimension(this, 0));
21
+ /** dimension (unsigned) */
22
+ dimension = 0;
40
23
 
41
- /** elements (unsigned) */
42
- elements = (_init_extra_dimension(this), _init_elements(this, 0));
24
+ /** elements (unsigned) */
25
+ elements = 0;
43
26
 
44
- /** isSRGB (bool) */
45
- isSRGB = (_init_extra_elements(this), _init_isSRGB(this, false));
27
+ /** isSRGB (bool) */
28
+ isSRGB = false;
46
29
 
47
- /** isAutoregister (bool) */
48
- isAutoregister = (_init_extra_isSRGB(this), _init_isAutoregister(this, false));
30
+ /** isAutoregister (bool) */
31
+ isAutoregister = false;
49
32
 
50
- /**
51
- * Build one constant from its portable JSON reflection record.
52
- *
53
- * @param {object} value Portable constant record.
54
- * @returns {Tr2EffectConstant} Reflected constant.
55
- */
56
- static fromPortable(value) {
57
- if (!isPlainObject(value)) {
58
- throw new TypeError("Portable effect constant must be an object");
59
- }
60
- if (!isUint32(value.offset)) {
61
- throw new RangeError("Portable constant offset must fit uint32");
62
- }
63
- if (!isUint32(value.size)) {
64
- throw new RangeError("Portable constant size must fit uint32");
65
- }
66
- if (!isUint32(value.type)) {
67
- throw new RangeError("Portable constant type must fit uint32");
68
- }
69
- if (!isUint32(value.dimension)) {
70
- throw new RangeError("Portable constant dimension must fit uint32");
71
- }
72
- if (!isUint32(value.elements)) {
73
- throw new RangeError("Portable constant element count must fit uint32");
74
- }
75
- const constant = new this();
76
- constant.name = String(value.name ?? "");
77
- constant.offset = value.offset;
78
- constant.size = value.size;
79
- constant.type = value.type;
80
- constant.dimension = value.dimension;
81
- constant.elements = value.elements;
82
- constant.isSRGB = !!value.isSRGB;
83
- constant.isAutoregister = !!value.isAutoregister;
84
- return constant;
33
+ /**
34
+ * Build one constant from its portable JSON reflection record.
35
+ *
36
+ * @param {object} value Portable constant record.
37
+ * @returns {Tr2EffectConstant} Reflected constant.
38
+ */
39
+ static fromPortable(value) {
40
+ if (!isPlainObject(value)) {
41
+ throw new TypeError("Portable effect constant must be an object");
42
+ }
43
+ if (!isUint32(value.offset)) {
44
+ throw new RangeError("Portable constant offset must fit uint32");
45
+ }
46
+ if (!isUint32(value.size)) {
47
+ throw new RangeError("Portable constant size must fit uint32");
48
+ }
49
+ if (!isUint32(value.type)) {
50
+ throw new RangeError("Portable constant type must fit uint32");
85
51
  }
86
- }];
87
- Type = Object.freeze({
52
+ if (!isUint32(value.dimension)) {
53
+ throw new RangeError("Portable constant dimension must fit uint32");
54
+ }
55
+ if (!isUint32(value.elements)) {
56
+ throw new RangeError("Portable constant element count must fit uint32");
57
+ }
58
+ const constant = new this();
59
+ constant.name = String(value.name ?? "");
60
+ constant.offset = value.offset;
61
+ constant.size = value.size;
62
+ constant.type = value.type;
63
+ constant.dimension = value.dimension;
64
+ constant.elements = value.elements;
65
+ constant.isSRGB = !!value.isSRGB;
66
+ constant.isAutoregister = !!value.isAutoregister;
67
+ return constant;
68
+ }
69
+ static Type = Object.freeze({
88
70
  FLOAT: 0,
89
71
  INT: 1,
90
72
  UINT: 2,
91
73
  BOOL: 3,
92
74
  OTHER: 4
93
75
  });
94
- constructor() {
95
- super(_Tr2EffectConstant), _initClass();
96
- }
97
- }();
76
+ }
77
+
78
+ // Declared imperatively rather than with decorators, so this module stays plain
79
+ // ESM that loads from source without a transform, which lets its tests import
80
+ // source instead of build output.
81
+ //
82
+ // Field order matters: it drives GetValues() export order. Statics belong in
83
+ // `methods` here rather than in a decorateMethod() call, which targets the
84
+ // prototype and would register a static as an instance field.
85
+ CjsSchema.define(Tr2EffectConstant, {
86
+ className: "Tr2EffectConstant",
87
+ family: "shader",
88
+ fields: [{
89
+ name: "name",
90
+ type: {
91
+ kind: "string"
92
+ }
93
+ }, {
94
+ name: "offset",
95
+ type: {
96
+ kind: "uint32"
97
+ }
98
+ }, {
99
+ name: "size",
100
+ type: {
101
+ kind: "uint32"
102
+ }
103
+ }, {
104
+ name: "type",
105
+ enum: {
106
+ enumType: "Type"
107
+ },
108
+ type: {
109
+ kind: "int32"
110
+ }
111
+ }, {
112
+ name: "dimension",
113
+ type: {
114
+ kind: "uint32"
115
+ }
116
+ }, {
117
+ name: "elements",
118
+ type: {
119
+ kind: "uint32"
120
+ }
121
+ }, {
122
+ name: "isSRGB",
123
+ type: {
124
+ kind: "boolean"
125
+ }
126
+ }, {
127
+ name: "isAutoregister",
128
+ type: {
129
+ kind: "boolean"
130
+ }
131
+ }]
132
+ });
98
133
 
99
- export { _Tr2EffectConstant as Tr2EffectConstant };
134
+ export { Tr2EffectConstant };
100
135
  //# sourceMappingURL=Tr2EffectConstant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tr2EffectConstant.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectConstant.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { impl, schema, type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\nimport {\n isPlainObject,\n isUint32\n} from \"@carbonenginejs/runtime-utils/is\";\n\n/** Reflected shader constant metadata. */\n@type.define({ className: \"Tr2EffectConstant\", family: \"shader\" })\nexport class Tr2EffectConstant extends CjsModel\n{\n\n /** name (BlueSharedString) */\n @type.string\n name = \"\";\n\n /** offset (unsigned) */\n @type.uint32\n offset = 0;\n\n /** size (unsigned) */\n @type.uint32\n size = 0;\n\n /** type (Type - enum Type) */\n @type.int32\n @schema.enum(\"Type\")\n type = 0;\n\n /** dimension (unsigned) */\n @type.uint32\n dimension = 0;\n\n /** elements (unsigned) */\n @type.uint32\n elements = 0;\n\n /** isSRGB (bool) */\n @type.boolean\n isSRGB = false;\n\n /** isAutoregister (bool) */\n @type.boolean\n isAutoregister = false;\n\n /**\n * Build one constant from its portable JSON reflection record.\n *\n * @param {object} value Portable constant record.\n * @returns {Tr2EffectConstant} Reflected constant.\n */\n @impl.custom\n @impl.reason(\"Carbon reads compiled effect bytes directly; CarbonEngineJS hydrates the browser-safe portable-reflection contract after format parsing.\")\n static fromPortable(value)\n {\n if (!isPlainObject(value))\n {\n throw new TypeError(\"Portable effect constant must be an object\");\n }\n if (!isUint32(value.offset))\n {\n throw new RangeError(\"Portable constant offset must fit uint32\");\n }\n if (!isUint32(value.size))\n {\n throw new RangeError(\"Portable constant size must fit uint32\");\n }\n if (!isUint32(value.type))\n {\n throw new RangeError(\"Portable constant type must fit uint32\");\n }\n if (!isUint32(value.dimension))\n {\n throw new RangeError(\"Portable constant dimension must fit uint32\");\n }\n if (!isUint32(value.elements))\n {\n throw new RangeError(\n \"Portable constant element count must fit uint32\"\n );\n }\n\n const constant = new this();\n constant.name = String(value.name ?? \"\");\n constant.offset = value.offset;\n constant.size = value.size;\n constant.type = value.type;\n constant.dimension = value.dimension;\n constant.elements = value.elements;\n constant.isSRGB = !!value.isSRGB;\n constant.isAutoregister = !!value.isAutoregister;\n return constant;\n }\n\n static Type = Object.freeze({\n FLOAT: 0,\n INT: 1,\n UINT: 2,\n BOOL: 3,\n OTHER: 4\n });\n\n}\n"],"names":["_Tr2EffectConstant","_identity","Tr2EffectConstant","CjsModel","e","_init_name","_init_extra_name","_init_offset","_init_extra_offset","_init_size","_init_extra_size","_init_type","_init_extra_type","_init_dimension","_init_extra_dimension","_init_elements","_init_extra_elements","_init_isSRGB","_init_extra_isSRGB","_init_isAutoregister","_init_extra_isAutoregister","_initStatic","c","_initClass","_applyDecs","type","define","className","family","string","uint32","int32","schema","enum","boolean","impl","custom","reason","constructor","args","name","offset","size","dimension","elements","isSRGB","isAutoregister","fromPortable","value","isPlainObject","TypeError","isUint32","RangeError","constant","String","Type","Object","freeze","FLOAT","INT","UINT","BOOL","OTHER"],"mappings":";;;;;;;AAQA;AAAA,IAAAA;AAAA,IAAA,cAAAC,SAAA,CAAA;AAAA,EAAA,QACA,MAAAC,iBAAA,SACuCC,QAAQ,CAC/C;AAAA,IAAA;AAAA,MAAA,CAAA;AAAAC,QAAAA,CAAA,EAAA,CAAAC,UAAA,EAAAC,gBAAA,EAAAC,YAAA,EAAAC,kBAAA,EAAAC,UAAA,EAAAC,gBAAA,EAAAC,UAAA,EAAAC,gBAAA,EAAAC,eAAA,EAAAC,qBAAA,EAAAC,cAAA,EAAAC,oBAAA,EAAAC,YAAA,EAAAC,kBAAA,EAAAC,oBAAA,EAAAC,0BAAA,EAAAC,WAAA,CAAA;QAAAC,CAAA,EAAA,CAAAtB,kBAAA,EAAAuB,UAAA;AAAA,OAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,QAAAA,SAAS,EAAE,mBAAmB;AAAEC,QAAAA,MAAM,EAAE;AAAS,OAAC,CAAC,CAAA,EAAA,CAAA,CAAA,CAK/DH,IAAI,EAAJA,IAAI,CAACI,MAAM,CAAA,EAAA,EAAA,EAAA,MAAA,CAAA,EAAA,CAAA,CAIXJ,IAAI,EAAJA,IAAI,CAACK,MAAM,oBAIXL,IAAI,EAAJA,IAAI,CAACK,MAAM,CAAA,EAAA,EAAA,EAAA,MAAA,CAAA,EAAA,CAAA,CAIXL,IAAI,EAAJA,IAAI,CAACM,KAAK,EAAA,MAAA,EACVC,MAAM,CAACC,IAAI,CAAC,MAAM,CAAC,kBAInBR,IAAI,EAAJA,IAAI,CAACK,MAAM,CAAA,EAAA,EAAA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K,CAACL,SAAS;AACpCU,MAAAA,QAAQ,CAACT,QAAQ,GAAGI,KAAK,CAACJ,QAAQ;AAClCS,MAAAA,QAAQ,CAACR,MAAM,GAAG,CAAC,CAACG,KAAK,CAACH,MAAM;AAChCQ,MAAAA,QAAQ,CAACP,cAAc,GAAG,CAAC,CAACE,KAAK,CAACF,cAAc;AAChD,MAAA,OAAOO,QAAQ;AACjB,IAAA;GAUD;AARQE,EAAAA,IAAI,GAAGC,MAAM,CAACC,MAAM,CAAC;AAC1BC,IAAAA,KAAK,EAAE,CAAC;AACRC,IAAAA,GAAG,EAAE,CAAC;AACNC,IAAAA,IAAI,EAAE,CAAC;AACPC,IAAAA,IAAI,EAAE,CAAC;AACPC,IAAAA,KAAK,EAAE;AACT,GAAC,CAAC;EAACxB,WAAAA,GAAA;IAAA,KAAA,CAAAtC,kBAAA,GAAAuB,UAAA,EAAA;AAAA,EAAA;AAAA,CAAA,EAAA;;;;"}
1
+ {"version":3,"file":"Tr2EffectConstant.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectConstant.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { CjsSchema } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\nimport {\n isPlainObject,\n isUint32\n} from \"@carbonenginejs/runtime-utils/is\";\n\n/** Reflected shader constant metadata. */\nexport class Tr2EffectConstant extends CjsModel\n{\n\n /** name (BlueSharedString) */\n name = \"\";\n\n /** offset (unsigned) */\n offset = 0;\n\n /** size (unsigned) */\n size = 0;\n\n /** type (Type - enum Type) */\n type = 0;\n\n /** dimension (unsigned) */\n dimension = 0;\n\n /** elements (unsigned) */\n elements = 0;\n\n /** isSRGB (bool) */\n isSRGB = false;\n\n /** isAutoregister (bool) */\n isAutoregister = false;\n\n /**\n * Build one constant from its portable JSON reflection record.\n *\n * @param {object} value Portable constant record.\n * @returns {Tr2EffectConstant} Reflected constant.\n */\n static fromPortable(value)\n {\n if (!isPlainObject(value))\n {\n throw new TypeError(\"Portable effect constant must be an object\");\n }\n if (!isUint32(value.offset))\n {\n throw new RangeError(\"Portable constant offset must fit uint32\");\n }\n if (!isUint32(value.size))\n {\n throw new RangeError(\"Portable constant size must fit uint32\");\n }\n if (!isUint32(value.type))\n {\n throw new RangeError(\"Portable constant type must fit uint32\");\n }\n if (!isUint32(value.dimension))\n {\n throw new RangeError(\"Portable constant dimension must fit uint32\");\n }\n if (!isUint32(value.elements))\n {\n throw new RangeError(\n \"Portable constant element count must fit uint32\"\n );\n }\n\n const constant = new this();\n constant.name = String(value.name ?? \"\");\n constant.offset = value.offset;\n constant.size = value.size;\n constant.type = value.type;\n constant.dimension = value.dimension;\n constant.elements = value.elements;\n constant.isSRGB = !!value.isSRGB;\n constant.isAutoregister = !!value.isAutoregister;\n return constant;\n }\n\n static Type = Object.freeze({\n FLOAT: 0,\n INT: 1,\n UINT: 2,\n BOOL: 3,\n OTHER: 4\n });\n\n}\n\n// Declared imperatively rather than with decorators, so this module stays plain\n// ESM that loads from source without a transform, which lets its tests import\n// source instead of build output.\n//\n// Field order matters: it drives GetValues() export order. Statics belong in\n// `methods` here rather than in a decorateMethod() call, which targets the\n// prototype and would register a static as an instance field.\nCjsSchema.define(Tr2EffectConstant, {\n className: \"Tr2EffectConstant\",\n family: \"shader\",\n fields: [\n { name: \"name\", type: { kind: \"string\" } },\n { name: \"offset\", type: { kind: \"uint32\" } },\n { name: \"size\", type: { kind: \"uint32\" } },\n { name: \"type\", enum: { enumType: \"Type\" }, type: { kind: \"int32\" } },\n { name: \"dimension\", type: { kind: \"uint32\" } },\n { name: \"elements\", type: { kind: \"uint32\" } },\n { name: \"isSRGB\", type: { kind: \"boolean\" } },\n { name: \"isAutoregister\", type: { kind: \"boolean\" } }\n ]\n});\n"],"names":["Tr2EffectConstant","CjsModel","name","offset","size","type","dimension","elements","isSRGB","isAutoregister","fromPortable","value","isPlainObject","TypeError","isUint32","RangeError","constant","String","Type","Object","freeze","FLOAT","INT","UINT","BOOL","OTHER","CjsSchema","define","className","family","fields","kind","enum","enumType"],"mappings":";;;;AAAA;;AAQA;AACO,MAAMA,iBAAiB,SAASC,QAAQ,CAC/C;AAEE;AACAC,EAAAA,IAAI,GAAG,EAAE;;AAET;AACAC,EAAAA,MAAM,GAAG,CAAC;;AAEV;AACAC,EAAAA,IAAI,GAAG,CAAC;;AAER;AACAC,EAAAA,IAAI,GAAG,CAAC;;AAER;AACAC,EAAAA,SAAS,GAAG,CAAC;;AAEb;AACAC,EAAAA,QAAQ,GAAG,CAAC;;AAEZ;AACAC,EAAAA,MAAM,GAAG,KAAK;;AAEd;AACAC,EAAAA,cAAc,GAAG,KAAK;;AAEtB;AACF;AACA;AACA;AACA;AACA;EACE,OAAOC,YAAYA,CAACC,KAAK,EACzB;AACE,IAAA,IAAI,CAACC,aAAa,CAACD,KAAK,CAAC,EACzB;AACE,MAAA,MAAM,IAAIE,SAAS,CAAC,4CAA4C,CAAC;AACnE,IAAA;AACA,IAAA,IAAI,CAACC,QAAQ,CAACH,KAAK,CAACR,MAAM,CAAC,EAC3B;AACE,MAAA,MAAM,IAAIY,UAAU,CAAC,0CAA0C,CAAC;AAClE,IAAA;AACA,IAAA,IAAI,CAACD,QAAQ,CAACH,KAAK,CAACP,IAAI,CAAC,EACzB;AACE,MAAA,MAAM,IAAIW,UAAU,CAAC,wCAAwC,CAAC;AAChE,IAAA;AACA,IAAA,IAAI,CAACD,QAAQ,CAACH,KAAK,CAACN,IAAI,CAAC,EACzB;AACE,MAAA,MAAM,IAAIU,UAAU,CAAC,wCAAwC,CAAC;AAChE,IAAA;AACA,IAAA,IAAI,CAACD,QAAQ,CAACH,KAAK,CAACL,SAAS,CAAC,EAC9B;AACE,MAAA,MAAM,IAAIS,UAAU,CAAC,6CAA6C,CAAC;AACrE,IAAA;AACA,IAAA,IAAI,CAACD,QAAQ,CAACH,KAAK,CAACJ,QAAQ,CAAC,EAC7B;AACE,MAAA,MAAM,IAAIQ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AA,IAAI,EAAE;AAAE0B,MAAAA,IAAI,EAAE;AAAS;AAAE,GAAC,EAC5C;AAAE7B,IAAAA,IAAI,EAAE,MAAM;AAAEG,IAAAA,IAAI,EAAE;AAAE0B,MAAAA,IAAI,EAAE;AAAS;AAAE,GAAC,EAC1C;AAAE7B,IAAAA,IAAI,EAAE,MAAM;AAAE8B,IAAAA,IAAI,EAAE;AAAEC,MAAAA,QAAQ,EAAE;KAAQ;AAAE5B,IAAAA,IAAI,EAAE;AAAE0B,MAAAA,IAAI,EAAE;AAAQ;AAAE,GAAC,EACrE;AAAE7B,IAAAA,IAAI,EAAE,WAAW;AAAEG,IAAAA,IAAI,EAAE;AAAE0B,MAAAA,IAAI,EAAE;AAAS;AAAE,GAAC,EAC/C;AAAE7B,IAAAA,IAAI,EAAE,UAAU;AAAEG,IAAAA,IAAI,EAAE;AAAE0B,MAAAA,IAAI,EAAE;AAAS;AAAE,GAAC,EAC9C;AAAE7B,IAAAA,IAAI,EAAE,QAAQ;AAAEG,IAAAA,IAAI,EAAE;AAAE0B,MAAAA,IAAI,EAAE;AAAU;AAAE,GAAC,EAC7C;AAAE7B,IAAAA,IAAI,EAAE,gBAAgB;AAAEG,IAAAA,IAAI,EAAE;AAAE0B,MAAAA,IAAI,EAAE;AAAU;GAAG;AAEzD,CAAC,CAAC;;;;"}
@@ -1,34 +1,28 @@
1
- import { applyDecs2311 as _applyDecs2311 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import { type } from '@carbonenginejs/runtime-utils/schema';
1
+ import { CjsSchema, type } from '@carbonenginejs/runtime-utils/schema';
3
2
  import { CjsModel } from '@carbonenginejs/runtime-utils/model';
4
3
 
5
- let _initClass, _init_name, _init_extra_name, _init_value, _init_extra_value;
4
+ // Source: trinity/trinity/Shader/Tr2EffectDescription.h
6
5
 
7
6
  /** Effect compile define retained as source metadata. */
8
- let _Tr2EffectDefine;
9
7
  class Tr2EffectDefine extends CjsModel {
10
- static {
11
- ({
12
- e: [_init_name, _init_extra_name, _init_value, _init_extra_value],
13
- c: [_Tr2EffectDefine, _initClass]
14
- } = _applyDecs2311(this, [type.define({
15
- className: "Tr2EffectDefine",
16
- family: "shader"
17
- })], [[[type, type.string], 16, "name"], [[type, type.string], 16, "value"]], 0, void 0, CjsModel));
18
- }
19
- constructor(...args) {
20
- super(...args);
21
- _init_extra_value(this);
22
- }
23
8
  /** name (const char*) */
24
- name = _init_name(this, "");
9
+ name = "";
25
10
 
26
11
  /** value (const char*) */
27
- value = (_init_extra_name(this), _init_value(this, ""));
28
- static {
29
- _initClass();
30
- }
12
+ value = "";
31
13
  }
32
14
 
33
- export { _Tr2EffectDefine as Tr2EffectDefine };
15
+ // Declared imperatively rather than with decorators, so this module stays
16
+ // plain ESM that loads from source without a transform. The decorator
17
+ // expressions are reused verbatim, so the registered metadata is identical.
18
+ // Statics belong in `methods`: decorateMethod targets the prototype and
19
+ // would register a static as an instance field.
20
+ CjsSchema.define(Tr2EffectDefine, {
21
+ className: "Tr2EffectDefine",
22
+ family: "shader"
23
+ });
24
+ CjsSchema.decorateField(Tr2EffectDefine, "name", type.string);
25
+ CjsSchema.decorateField(Tr2EffectDefine, "value", type.string);
26
+
27
+ export { Tr2EffectDefine };
34
28
  //# sourceMappingURL=Tr2EffectDefine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tr2EffectDefine.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectDefine.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\n\n/** Effect compile define retained as source metadata. */\n@type.define({ className: \"Tr2EffectDefine\", family: \"shader\" })\nexport class Tr2EffectDefine extends CjsModel\n{\n\n /** name (const char*) */\n @type.string\n name = \"\";\n\n /** value (const char*) */\n @type.string\n value = \"\";\n\n}\n"],"names":["_Tr2EffectDefine","Tr2EffectDefine","CjsModel","e","_init_name","_init_extra_name","_init_value","_init_extra_value","c","_initClass","_applyDecs","type","define","className","family","string","constructor","args","name","value"],"mappings":";;;;;;AAIA;AAAA,IAAAA;AACA,MAAAC,eAAA,SACqCC,QAAQ,CAC7C;AAAA,EAAA;AAAA,IAAA,CAAA;AAAAC,MAAAA,CAAA,GAAAC,UAAA,EAAAC,gBAAA,EAAAC,WAAA,EAAAC,iBAAA,CAAA;MAAAC,CAAA,EAAA,CAAAR,gBAAA,EAAAS,UAAA;AAAA,KAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,MAAAA,SAAS,EAAE,iBAAiB;AAAEC,MAAAA,MAAM,EAAE;AAAS,KAAC,CAAC,CAAA,EAAA,CAAA,CAAA,CAK7DH,IAAI,EAAJA,IAAI,CAACI,MAAM,CAAA,EAAA,EAAA,EAAA,MAAA,CAAA,EAAA,CAAA,CAIXJ,IAAI,EAAJA,IAAI,CAACI,MAAM,6BARuBb,QAAQ,CAAA;AAAA;AAAAc,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;IAAAV,iBAAA,CAAA,IAAA,CAAA;AAAA,EAAA;AAG3C;EAEAW,IAAI,GAAAd,UAAA,CAAA,IAAA,EAAG,EAAE,CAAA;;AAET;AAEAe,EAAAA,KAAK,IAAAd,gBAAA,CAAA,IAAA,CAAA,EAAAC,WAAA,OAAG,EAAE,CAAA;AAAC,EAAA;IAAAG,UAAA,EAAA;AAAA;AAEb;;;;"}
1
+ {"version":3,"file":"Tr2EffectDefine.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectDefine.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { CjsSchema, type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\n\n/** Effect compile define retained as source metadata. */\nexport class Tr2EffectDefine extends CjsModel\n{\n\n /** name (const char*) */\n name = \"\";\n\n /** value (const char*) */\n value = \"\";\n\n}\n\n// Declared imperatively rather than with decorators, so this module stays\n// plain ESM that loads from source without a transform. The decorator\n// expressions are reused verbatim, so the registered metadata is identical.\n// Statics belong in `methods`: decorateMethod targets the prototype and\n// would register a static as an instance field.\nCjsSchema.define(Tr2EffectDefine, {\n className: \"Tr2EffectDefine\",\n family: \"shader\"\n});\nCjsSchema.decorateField(Tr2EffectDefine, \"name\", type.string);\nCjsSchema.decorateField(Tr2EffectDefine, \"value\", type.string);\n"],"names":["Tr2EffectDefine","CjsModel","name","value","CjsSchema","define","className","family","decorateField","type","string"],"mappings":";;;AAAA;;AAIA;AACO,MAAMA,eAAe,SAASC,QAAQ,CAC7C;AAEE;AACAC,EAAAA,IAAI,GAAG,EAAE;;AAET;AACAC,EAAAA,KAAK,GAAG,EAAE;AAEZ;;AAEA;AACA;AACA;AACA;AACA;AACAC,SAAS,CAACC,MAAM,CAACL,eAAe,EAAE;AAChCM,EAAAA,SAAS,EAAE,iBAAiB;AAC5BC,EAAAA,MAAM,EAAE;AACV,CAAC,CAAC;AACFH,SAAS,CAACI,aAAa,CAACR,eAAe,EAAE,MAAM,EAAES,IAAI,CAACC,MAAM,CAAC;AAC7DN,SAAS,CAACI,aAAa,CAACR,eAAe,EAAE,OAAO,EAAES,IAAI,CAACC,MAAM,CAAC;;;;"}
@@ -1,34 +1,19 @@
1
- import { applyDecs2311 as _applyDecs2311 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import { impl, type } from '@carbonenginejs/runtime-utils/schema';
1
+ import { CjsSchema, type } from '@carbonenginejs/runtime-utils/schema';
3
2
  import { CjsModel } from '@carbonenginejs/runtime-utils/model';
4
3
  import { isPlainObject, isArray } from '@carbonenginejs/runtime-utils/is';
5
- import { Tr2EffectParameterAnnotation as _Tr2EffectParameterAn } from './Tr2EffectParameterAnnotation.js';
6
- import { Tr2EffectTechnique as _Tr2EffectTechnique } from './Tr2EffectTechnique.js';
4
+ import { Tr2EffectParameterAnnotation } from './Tr2EffectParameterAnnotation.js';
5
+ import { Tr2EffectTechnique } from './Tr2EffectTechnique.js';
7
6
 
8
- let _initStatic, _initClass, _init_techniques, _init_extra_techniques, _init_annotations, _init_extra_annotations;
7
+ // Source: trinity/trinity/Shader/Tr2EffectDescription.h
8
+ // Source: trinity/trinity/Shader/Tr2EffectDescription.cpp
9
9
 
10
10
  /** Complete device-free effect description for one selected shader body. */
11
- let _Tr2EffectDescription;
12
11
  class Tr2EffectDescription extends CjsModel {
13
- static {
14
- ({
15
- e: [_init_techniques, _init_extra_techniques, _init_annotations, _init_extra_annotations, _initStatic],
16
- c: [_Tr2EffectDescription, _initClass]
17
- } = _applyDecs2311(this, [type.define({
18
- className: "Tr2EffectDescription",
19
- family: "shader"
20
- })], [[type.list("Tr2EffectTechnique"), 0, "techniques"], [type.map("Tr2EffectParameterAnnotationMap"), 0, "annotations"], [[impl, impl.custom, void 0, impl.reason("Carbon reads compiled effect bytes directly; CarbonEngineJS hydrates the browser-safe portable-reflection contract after format parsing.")], 26, "fromPortable"], [[impl, impl.custom, void 0, impl.reason("Carbon reads annotation groups from compiled bytes; CarbonEngineJS indexes the validated portable groups into canonical maps.")], 26, "readPortableAnnotationGroups"]], 0, void 0, CjsModel));
21
- _initStatic(this);
22
- }
23
- constructor(...args) {
24
- super(...args);
25
- _init_extra_annotations(this);
26
- }
27
12
  /** techniques (TrackableStdVector<Tr2EffectTechnique>) */
28
- techniques = _init_techniques(this, []);
13
+ techniques = [];
29
14
 
30
15
  /** annotations (Tr2EffectAnnotationMap) */
31
- annotations = (_init_extra_techniques(this), _init_annotations(this, new Map()));
16
+ annotations = new Map();
32
17
 
33
18
  /**
34
19
  * Construct a canonical effect description from JS/JSON model values.
@@ -47,7 +32,7 @@ class Tr2EffectDescription extends CjsModel {
47
32
  if (!Array.isArray(records)) {
48
33
  throw new TypeError(`Effect annotations for "${parameterName}" must be an array`);
49
34
  }
50
- annotations.set(String(parameterName), records.map(record => record instanceof _Tr2EffectParameterAn ? record : _Tr2EffectParameterAn.from(record, options)));
35
+ annotations.set(String(parameterName), records.map(record => record instanceof Tr2EffectParameterAnnotation ? record : Tr2EffectParameterAnnotation.from(record, options)));
51
36
  }
52
37
  normalized = {
53
38
  ...values,
@@ -82,7 +67,7 @@ class Tr2EffectDescription extends CjsModel {
82
67
  }
83
68
  const effect = new this();
84
69
  effect.annotations = this.readPortableAnnotationGroups(value.annotations);
85
- effect.techniques = value.techniques.map(entry => _Tr2EffectTechnique.fromPortable(entry));
70
+ effect.techniques = value.techniques.map(entry => Tr2EffectTechnique.fromPortable(entry));
86
71
  return effect;
87
72
  }
88
73
 
@@ -100,14 +85,23 @@ class Tr2EffectDescription extends CjsModel {
100
85
  if (result.has(parameterName)) {
101
86
  throw new Error(`Portable effect annotation group "${parameterName}" is duplicated`);
102
87
  }
103
- result.set(parameterName, value.annotations.map(entry => _Tr2EffectParameterAn.fromPortable(entry)));
88
+ result.set(parameterName, value.annotations.map(entry => Tr2EffectParameterAnnotation.fromPortable(entry)));
104
89
  }
105
90
  return result;
106
91
  }
107
- static {
108
- _initClass();
109
- }
110
92
  }
111
93
 
112
- export { _Tr2EffectDescription as Tr2EffectDescription };
94
+ // Declared imperatively rather than with decorators, so this module stays
95
+ // plain ESM that loads from source without a transform. The decorator
96
+ // expressions are reused verbatim, so the registered metadata is identical.
97
+ // Statics belong in `methods`: decorateMethod targets the prototype and
98
+ // would register a static as an instance field.
99
+ CjsSchema.define(Tr2EffectDescription, {
100
+ className: "Tr2EffectDescription",
101
+ family: "shader"
102
+ });
103
+ CjsSchema.decorateField(Tr2EffectDescription, "techniques", type.list("Tr2EffectTechnique"));
104
+ CjsSchema.decorateField(Tr2EffectDescription, "annotations", type.map("Tr2EffectParameterAnnotationMap"));
105
+
106
+ export { Tr2EffectDescription };
113
107
  //# sourceMappingURL=Tr2EffectDescription.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tr2EffectDescription.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectDescription.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\n// Source: trinity/trinity/Shader/Tr2EffectDescription.cpp\nimport { impl, type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\nimport {\n isArray,\n isPlainObject\n} from \"@carbonenginejs/runtime-utils/is\";\nimport { Tr2EffectParameterAnnotation } from \"./Tr2EffectParameterAnnotation.js\";\nimport { Tr2EffectTechnique } from \"./Tr2EffectTechnique.js\";\n\n/** Complete device-free effect description for one selected shader body. */\n@type.define({ className: \"Tr2EffectDescription\", family: \"shader\" })\nexport class Tr2EffectDescription extends CjsModel\n{\n\n /** techniques (TrackableStdVector<Tr2EffectTechnique>) */\n @type.list(\"Tr2EffectTechnique\")\n techniques = [];\n\n /** annotations (Tr2EffectAnnotationMap) */\n @type.map(\"Tr2EffectParameterAnnotationMap\")\n annotations = new Map();\n\n /**\n * Construct a canonical effect description from JS/JSON model values.\n *\n * @param {object} values Canonical model values.\n * @param {object} options CjsModel import options.\n * @returns {Tr2EffectDescription} Hydrated description.\n */\n static from(values = {}, options = {})\n {\n let normalized = values;\n let annotations = null;\n if (values && Object.hasOwn(values, \"annotations\"))\n {\n const entries = values.annotations instanceof Map\n ? values.annotations\n : Object.entries(values.annotations ?? {});\n annotations = new Map();\n for (const [ parameterName, records ] of entries)\n {\n if (!Array.isArray(records))\n {\n throw new TypeError(\n `Effect annotations for \"${parameterName}\" must be an array`\n );\n }\n annotations.set(\n String(parameterName),\n records.map(record => record instanceof Tr2EffectParameterAnnotation\n ? record\n : Tr2EffectParameterAnnotation.from(record, options))\n );\n }\n normalized = { ...values, annotations };\n }\n const effect = super.from(normalized, options);\n if (annotations)\n {\n effect.annotations = annotations;\n }\n return effect;\n }\n\n /**\n * Build one complete effect description from its portable JSON record.\n *\n * @param {object} value Portable effect-description record.\n * @returns {Tr2EffectDescription} Reflected description.\n */\n @impl.custom\n @impl.reason(\"Carbon reads compiled effect bytes directly; CarbonEngineJS hydrates the browser-safe portable-reflection contract after format parsing.\")\n static fromPortable(value)\n {\n if (!isPlainObject(value))\n {\n throw new TypeError(\"Portable effect description must be an object\");\n }\n if (!isArray(value.annotations))\n {\n throw new TypeError(\n \"Portable effect annotation groups must be an array\"\n );\n }\n if (!isArray(value.techniques))\n {\n throw new TypeError(\"Portable effect techniques must be an array\");\n }\n if (value.annotationGroupCount !== value.annotations.length\n || value.techniqueCount !== value.techniques.length)\n {\n throw new Error(\n \"Portable effect description counts disagree with its collections\"\n );\n }\n\n const effect = new this();\n effect.annotations = this.readPortableAnnotationGroups(\n value.annotations\n );\n effect.techniques = value.techniques.map(\n entry => Tr2EffectTechnique.fromPortable(entry)\n );\n return effect;\n }\n\n /** Build parameter-name-indexed annotation groups. */\n @impl.custom\n @impl.reason(\"Carbon reads annotation groups from compiled bytes; CarbonEngineJS indexes the validated portable groups into canonical maps.\")\n static readPortableAnnotationGroups(values)\n {\n const result = new Map();\n for (const value of values)\n {\n if (!isPlainObject(value))\n {\n throw new TypeError(\n \"Portable effect annotation group must be an object\"\n );\n }\n const parameterName = String(value.parameterName ?? \"\");\n if (!isArray(value.annotations))\n {\n throw new TypeError(\n `Portable annotations for parameter \"${parameterName}\" must be an array`\n );\n }\n if (result.has(parameterName))\n {\n throw new Error(\n `Portable effect annotation group \"${parameterName}\" is duplicated`\n );\n }\n result.set(\n parameterName,\n value.annotations.map(\n entry => Tr2EffectParameterAnnotation.fromPortable(entry)\n )\n );\n }\n return result;\n }\n\n}\n"],"names":["_Tr2EffectDescription","Tr2EffectDescription","CjsModel","e","_init_techniques","_init_extra_techniques","_init_annotations","_init_extra_annotations","_initStatic","c","_initClass","_applyDecs","type","define","className","family","list","map","impl","custom","reason","constructor","args","techniques","annotations","Map","from","values","options","normalized","Object","hasOwn","entries","parameterName","records","Array","isArray","TypeError","set","String","record","Tr2EffectParameterAnnotation","effect","fromPortable","value","isPlainObject","annotationGroupCount","length","techniqueCount","Error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vD,MAAA,IAAI,CAACG,OAAO,CAACQ,KAAK,CAACpB,WAAW,CAAC,EAC/B;AACE,QAAA,MAAM,IAAIa,SAAS,CACjB,CAAA,oCAAA,EAAuCJ,aAAa,oBACtD,CAAC;AACH,MAAA;AACA,MAAA,IAAIoB,MAAM,CAACC,GAAG,CAACrB,aAAa,CAAC,EAC7B;AACE,QAAA,MAAM,IAAIgB,KAAK,CACb,CAAA,kCAAA,EAAqChB,aAAa,iBACpD,CAAC;AACH,MAAA;MACAoB,MAAM,CAACf,GAAG,CACRL,aAAa,EACbW,KAAK,CAACpB,WAAW,CAACP,GAAG,CACnBkC,KAAK,IAAIV,qBAA4B,CAACE,YAAY,CAACQ,KAAK,CAC1D,CACF,CAAC;AACH,IAAA;AACA,IAAA,OAAOE,MAAM;AACf,EAAA;AAAC,EAAA;IAAA3C,UAAA,EAAA;AAAA;AAEH;;;;"}
1
+ {"version":3,"file":"Tr2EffectDescription.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectDescription.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\n// Source: trinity/trinity/Shader/Tr2EffectDescription.cpp\nimport { CjsSchema, impl, type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\nimport {\n isArray,\n isPlainObject\n} from \"@carbonenginejs/runtime-utils/is\";\nimport { Tr2EffectParameterAnnotation } from \"./Tr2EffectParameterAnnotation.js\";\nimport { Tr2EffectTechnique } from \"./Tr2EffectTechnique.js\";\n\n/** Complete device-free effect description for one selected shader body. */\nexport class Tr2EffectDescription extends CjsModel\n{\n\n /** techniques (TrackableStdVector<Tr2EffectTechnique>) */\n techniques = [];\n\n /** annotations (Tr2EffectAnnotationMap) */\n annotations = new Map();\n\n /**\n * Construct a canonical effect description from JS/JSON model values.\n *\n * @param {object} values Canonical model values.\n * @param {object} options CjsModel import options.\n * @returns {Tr2EffectDescription} Hydrated description.\n */\n static from(values = {}, options = {})\n {\n let normalized = values;\n let annotations = null;\n if (values && Object.hasOwn(values, \"annotations\"))\n {\n const entries = values.annotations instanceof Map\n ? values.annotations\n : Object.entries(values.annotations ?? {});\n annotations = new Map();\n for (const [ parameterName, records ] of entries)\n {\n if (!Array.isArray(records))\n {\n throw new TypeError(\n `Effect annotations for \"${parameterName}\" must be an array`\n );\n }\n annotations.set(\n String(parameterName),\n records.map(record => record instanceof Tr2EffectParameterAnnotation\n ? record\n : Tr2EffectParameterAnnotation.from(record, options))\n );\n }\n normalized = { ...values, annotations };\n }\n const effect = super.from(normalized, options);\n if (annotations)\n {\n effect.annotations = annotations;\n }\n return effect;\n }\n\n /**\n * Build one complete effect description from its portable JSON record.\n *\n * @param {object} value Portable effect-description record.\n * @returns {Tr2EffectDescription} Reflected description.\n */\n static fromPortable(value)\n {\n if (!isPlainObject(value))\n {\n throw new TypeError(\"Portable effect description must be an object\");\n }\n if (!isArray(value.annotations))\n {\n throw new TypeError(\n \"Portable effect annotation groups must be an array\"\n );\n }\n if (!isArray(value.techniques))\n {\n throw new TypeError(\"Portable effect techniques must be an array\");\n }\n if (value.annotationGroupCount !== value.annotations.length\n || value.techniqueCount !== value.techniques.length)\n {\n throw new Error(\n \"Portable effect description counts disagree with its collections\"\n );\n }\n\n const effect = new this();\n effect.annotations = this.readPortableAnnotationGroups(\n value.annotations\n );\n effect.techniques = value.techniques.map(\n entry => Tr2EffectTechnique.fromPortable(entry)\n );\n return effect;\n }\n\n /** Build parameter-name-indexed annotation groups. */\n static readPortableAnnotationGroups(values)\n {\n const result = new Map();\n for (const value of values)\n {\n if (!isPlainObject(value))\n {\n throw new TypeError(\n \"Portable effect annotation group must be an object\"\n );\n }\n const parameterName = String(value.parameterName ?? \"\");\n if (!isArray(value.annotations))\n {\n throw new TypeError(\n `Portable annotations for parameter \"${parameterName}\" must be an array`\n );\n }\n if (result.has(parameterName))\n {\n throw new Error(\n `Portable effect annotation group \"${parameterName}\" is duplicated`\n );\n }\n result.set(\n parameterName,\n value.annotations.map(\n entry => Tr2EffectParameterAnnotation.fromPortable(entry)\n )\n );\n }\n return result;\n }\n\n}\n\n// Declared imperatively rather than with decorators, so this module stays\n// plain ESM that loads from source without a transform. The decorator\n// expressions are reused verbatim, so the registered metadata is identical.\n// Statics belong in `methods`: decorateMethod targets the prototype and\n// would register a static as an instance field.\nCjsSchema.define(Tr2EffectDescription, {\n className: \"Tr2EffectDescription\",\n family: \"shader\"\n});\nCjsSchema.decorateField(Tr2EffectDescription, \"techniques\", type.list(\"Tr2EffectTechnique\"));\nCjsSchema.decorateField(Tr2EffectDescription, \"annotations\", type.map(\"Tr2EffectParameterAnnotationMap\"));\n"],"names":["Tr2EffectDescription","CjsModel","techniques","annotations","Map","from","values","options","normalized","Object","hasOwn","entries","parameterName","records","Array","isArray","TypeError","set","String","map","record","Tr2EffectParameterAnnotation","effect","fromPortable","value","isPlainObject","annotationGroupCount","length","techniqueCount","Error","readPortableAnnotationGroups","entry","Tr2EffectTechnique","result","has","CjsSchema","define","className","family","decorateField","type","list"],"mappings":";;;;;;AAAA;AACA;;AAUA;AACO,MAAMA,oBAAoB,SAASC,QAAQ,CAClD;AAEE;AACAC,EAAAA,UAAU,GAAG,EAAE;;AAEf;AACAC,EAAAA,WAAW,GAAG,IAAIC,GAAG,EAAE;;AAEvB;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,IAAIA,CAACC,MAAM,GAAG,EAAE,EAAEC,OAAO,GAAG,EAAE,EACrC;IACE,IAAIC,UAAU,GAAGF,MAAM;IACvB,IAAIH,WAAW,GAAG,IAAI;IACtB,IAAIG,MAAM,IAAIG,MAAM,CAACC,MAAM,CAACJ,MAAM,EAAE,aAAa,CAAC,EAClD;MACE,MAAMK,OAAO,GAAGL,MAAM,CAACH,WAAW,YAAYC,GAAG,GAC7CE,MAAM,CAACH,WAAW,GAClBM,MAAM,CAACE,OAAO,CAACL,MAAM,CAACH,WAAW,IAAI,EAAE,CAAC;AAC5CA,MAAAA,WAAW,GAAG,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A4B,CAACE,YAAY,CAACQ,KAAK,CAC1D,CACF,CAAC;AACH,IAAA;AACA,IAAA,OAAOE,MAAM;AACf,EAAA;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACAE,SAAS,CAACC,MAAM,CAACpC,oBAAoB,EAAE;AACrCqC,EAAAA,SAAS,EAAE,sBAAsB;AACjCC,EAAAA,MAAM,EAAE;AACV,CAAC,CAAC;AACFH,SAAS,CAACI,aAAa,CAACvC,oBAAoB,EAAE,YAAY,EAAEwC,IAAI,CAACC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AAC5FN,SAAS,CAACI,aAAa,CAACvC,oBAAoB,EAAE,aAAa,EAAEwC,IAAI,CAACrB,GAAG,CAAC,iCAAiC,CAAC,CAAC;;;;"}
@@ -1,67 +1,51 @@
1
- import { applyDecs2311 as _applyDecs2311 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import { type, impl } from '@carbonenginejs/runtime-utils/schema';
1
+ import { CjsSchema, type, impl } from '@carbonenginejs/runtime-utils/schema';
3
2
  import { CjsModel } from '@carbonenginejs/runtime-utils/model';
4
3
  import { isPlainObject, isArray, isUint32 } from '@carbonenginejs/runtime-utils/is';
5
4
  import { clonePortableSourceProgram } from '../portable.js';
6
- import { Tr2EffectStageInput as _Tr2EffectStageInput } from './Tr2EffectStageInput.js';
5
+ import { Tr2EffectStageInput } from './Tr2EffectStageInput.js';
7
6
 
8
- let _initStatic, _initClass, _init_payloadSize, _init_extra_payloadSize, _init_libraryHandle, _init_extra_libraryHandle, _init_rayGenName, _init_extra_rayGenName, _init_missName, _init_extra_missName, _init_closestHitName, _init_extra_closestHitName, _init_anyHitName, _init_extra_anyHitName, _init_intersectionName, _init_extra_intersectionName, _init_hitGroupName, _init_extra_hitGroupName, _init_globalInput, _init_extra_globalInput, _init_localInput, _init_extra_localInput, _init_globalResourceSetDesc, _init_extra_globalResourceSetDesc, _init_sourceProgram, _init_extra_sourceProgram, _init_exports, _init_extra_exports;
7
+ // Source: trinity/trinity/Shader/Tr2EffectDescription.h
9
8
 
10
9
  /** Reflected shader-library metadata. */
11
- let _Tr2EffectLibrary;
12
10
  class Tr2EffectLibrary extends CjsModel {
13
- static {
14
- ({
15
- e: [_init_payloadSize, _init_extra_payloadSize, _init_libraryHandle, _init_extra_libraryHandle, _init_rayGenName, _init_extra_rayGenName, _init_missName, _init_extra_missName, _init_closestHitName, _init_extra_closestHitName, _init_anyHitName, _init_extra_anyHitName, _init_intersectionName, _init_extra_intersectionName, _init_hitGroupName, _init_extra_hitGroupName, _init_globalInput, _init_extra_globalInput, _init_localInput, _init_extra_localInput, _init_globalResourceSetDesc, _init_extra_globalResourceSetDesc, _init_sourceProgram, _init_extra_sourceProgram, _init_exports, _init_extra_exports, _initStatic],
16
- c: [_Tr2EffectLibrary, _initClass]
17
- } = _applyDecs2311(this, [type.define({
18
- className: "Tr2EffectLibrary",
19
- family: "shader"
20
- })], [[[type, type.uint32], 16, "payloadSize"], [[type, type.uint32], 16, "libraryHandle"], [[type, type.string], 16, "rayGenName"], [[type, type.string], 16, "missName"], [[type, type.string], 16, "closestHitName"], [[type, type.string], 16, "anyHitName"], [[type, type.string], 16, "intersectionName"], [[type, type.string], 16, "hitGroupName"], [type.rawStruct("Tr2EffectStageInput"), 0, "globalInput"], [type.rawStruct("Tr2EffectStageInput"), 0, "localInput"], [type.rawStruct("Tr2ResourceSetDescriptionAL"), 0, "globalResourceSetDesc"], [[impl, impl.adapted, void 0, impl.reason("Carbon registers the library with the renderer while reading; the device-free graph retains the source program for later engine realization."), void 0, type.rawStruct("CjsEffectSourceProgram")], 16, "sourceProgram"], [[impl, impl.adapted, void 0, impl.reason("Carbon resolves these exports into a renderer library handle; the device-free graph keeps the declarative export list."), void 0, type.rawStruct("CjsEffectLibraryExports")], 16, "exports"], [[impl, impl.custom, void 0, impl.reason("Carbon reads compiled effect bytes directly; CarbonEngineJS hydrates the browser-safe portable-reflection contract after format parsing.")], 26, "fromPortable"]], 0, void 0, CjsModel));
21
- _initStatic(this);
22
- }
23
- constructor(...args) {
24
- super(...args);
25
- _init_extra_exports(this);
26
- }
27
11
  /** payloadSize (uint32_t) */
28
- payloadSize = _init_payloadSize(this, 0);
12
+ payloadSize = 0;
29
13
 
30
14
  /** libraryHandle (uint32_t) */
31
- libraryHandle = (_init_extra_payloadSize(this), _init_libraryHandle(this, 0));
15
+ libraryHandle = 0;
32
16
 
33
17
  /** rayGenName (BlueSharedStringW) */
34
- rayGenName = (_init_extra_libraryHandle(this), _init_rayGenName(this, ""));
18
+ rayGenName = "";
35
19
 
36
20
  /** missName (BlueSharedStringW) */
37
- missName = (_init_extra_rayGenName(this), _init_missName(this, ""));
21
+ missName = "";
38
22
 
39
23
  /** closestHitName (BlueSharedStringW) */
40
- closestHitName = (_init_extra_missName(this), _init_closestHitName(this, ""));
24
+ closestHitName = "";
41
25
 
42
26
  /** anyHitName (BlueSharedStringW) */
43
- anyHitName = (_init_extra_closestHitName(this), _init_anyHitName(this, ""));
27
+ anyHitName = "";
44
28
 
45
29
  /** intersectionName (BlueSharedStringW) */
46
- intersectionName = (_init_extra_anyHitName(this), _init_intersectionName(this, ""));
30
+ intersectionName = "";
47
31
 
48
32
  /** hitGroupName (BlueSharedStringW) */
49
- hitGroupName = (_init_extra_intersectionName(this), _init_hitGroupName(this, ""));
33
+ hitGroupName = "";
50
34
 
51
35
  /** globalInput (Tr2EffectStageInput) */
52
- globalInput = (_init_extra_hitGroupName(this), _init_globalInput(this, null));
36
+ globalInput = null;
53
37
 
54
38
  /** localInput (Tr2EffectStageInput) */
55
- localInput = (_init_extra_globalInput(this), _init_localInput(this, null));
39
+ localInput = null;
56
40
 
57
41
  /** globalResourceSetDesc (Tr2ResourceSetDescriptionAL) */
58
- globalResourceSetDesc = (_init_extra_localInput(this), _init_globalResourceSetDesc(this, null));
42
+ globalResourceSetDesc = null;
59
43
 
60
44
  /** Exact source library program metadata and owned bytes. */
61
- sourceProgram = (_init_extra_globalResourceSetDesc(this), _init_sourceProgram(this, null));
45
+ sourceProgram = null;
62
46
 
63
47
  /** Portable export records retained before backend library registration. */
64
- exports = (_init_extra_sourceProgram(this), _init_exports(this, []));
48
+ exports = [];
65
49
 
66
50
  /**
67
51
  * Construct one canonical library from JS/JSON model values.
@@ -74,11 +58,11 @@ class Tr2EffectLibrary extends CjsModel {
74
58
  let normalized = values;
75
59
  const inputs = new Map();
76
60
  for (const field of ["globalInput", "localInput"]) {
77
- if (values?.[field] && !(values[field] instanceof _Tr2EffectStageInput)) {
61
+ if (values?.[field] && !(values[field] instanceof Tr2EffectStageInput)) {
78
62
  normalized = normalized === values ? {
79
63
  ...values
80
64
  } : normalized;
81
- normalized[field] = _Tr2EffectStageInput.from(values[field], options);
65
+ normalized[field] = Tr2EffectStageInput.from(values[field], options);
82
66
  inputs.set(field, normalized[field]);
83
67
  }
84
68
  }
@@ -128,14 +112,34 @@ class Tr2EffectLibrary extends CjsModel {
128
112
  if (entry.type === 4) library.intersectionName = entry.name;
129
113
  }
130
114
  library.sourceProgram = clonePortableSourceProgram(value.sourceProgram, "library");
131
- library.globalInput = _Tr2EffectStageInput.fromPortableInput(value.globalInput);
132
- library.localInput = _Tr2EffectStageInput.fromPortableInput(value.localInput);
115
+ library.globalInput = Tr2EffectStageInput.fromPortableInput(value.globalInput);
116
+ library.localInput = Tr2EffectStageInput.fromPortableInput(value.localInput);
133
117
  return library;
134
118
  }
135
- static {
136
- _initClass();
137
- }
138
119
  }
139
120
 
140
- export { _Tr2EffectLibrary as Tr2EffectLibrary };
121
+ // Declared imperatively rather than with decorators, so this module stays
122
+ // plain ESM that loads from source without a transform. The decorator
123
+ // expressions are reused verbatim, so the registered metadata is identical.
124
+ // Statics belong in `methods`: decorateMethod targets the prototype and
125
+ // would register a static as an instance field.
126
+ CjsSchema.define(Tr2EffectLibrary, {
127
+ className: "Tr2EffectLibrary",
128
+ family: "shader"
129
+ });
130
+ CjsSchema.decorateField(Tr2EffectLibrary, "payloadSize", type.uint32);
131
+ CjsSchema.decorateField(Tr2EffectLibrary, "libraryHandle", type.uint32);
132
+ CjsSchema.decorateField(Tr2EffectLibrary, "rayGenName", type.string);
133
+ CjsSchema.decorateField(Tr2EffectLibrary, "missName", type.string);
134
+ CjsSchema.decorateField(Tr2EffectLibrary, "closestHitName", type.string);
135
+ CjsSchema.decorateField(Tr2EffectLibrary, "anyHitName", type.string);
136
+ CjsSchema.decorateField(Tr2EffectLibrary, "intersectionName", type.string);
137
+ CjsSchema.decorateField(Tr2EffectLibrary, "hitGroupName", type.string);
138
+ CjsSchema.decorateField(Tr2EffectLibrary, "globalInput", type.rawStruct("Tr2EffectStageInput"));
139
+ CjsSchema.decorateField(Tr2EffectLibrary, "localInput", type.rawStruct("Tr2EffectStageInput"));
140
+ CjsSchema.decorateField(Tr2EffectLibrary, "globalResourceSetDesc", type.rawStruct("Tr2ResourceSetDescriptionAL"));
141
+ CjsSchema.decorateField(Tr2EffectLibrary, "sourceProgram", impl.adapted, impl.reason("Carbon registers the library with the renderer while reading; the device-free graph retains the source program for later engine realization."), type.rawStruct("CjsEffectSourceProgram"));
142
+ CjsSchema.decorateField(Tr2EffectLibrary, "exports", impl.adapted, impl.reason("Carbon resolves these exports into a renderer library handle; the device-free graph keeps the declarative export list."), type.rawStruct("CjsEffectLibraryExports"));
143
+
144
+ export { Tr2EffectLibrary };
141
145
  //# sourceMappingURL=Tr2EffectLibrary.js.map