@carbonenginejs/runtime-resource 0.7.0 → 0.8.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 (219) hide show
  1. package/FORMAT-PROVENANCE.md +155 -144
  2. package/LICENSE +21 -21
  3. package/NOTICE +29 -29
  4. package/README.md +11 -0
  5. package/dist/CjsMotherLode.js +1271 -1271
  6. package/dist/CjsResMan.js +3005 -3005
  7. package/dist/CjsResManQueue.js +214 -214
  8. package/dist/CjsResource.js +566 -566
  9. package/dist/CjsResourceSource.js +59 -59
  10. package/dist/_virtual/_rollupPluginBabelHelpers.js +153 -153
  11. package/dist/format/CjsBlueReader.js +269 -269
  12. package/dist/format/CjsFormat.js +192 -192
  13. package/dist/format/CjsReader.js +18 -18
  14. package/dist/format/CjsResourceProbe.js +277 -277
  15. package/dist/format/payloadContract.js +173 -173
  16. package/dist/formats/black/CjsBlackFormat.js +278 -278
  17. package/dist/formats/black/core/CjsBlackBinaryReader.js +153 -153
  18. package/dist/formats/black/core/CjsBlackPropertyReaders.js +382 -382
  19. package/dist/formats/black/core/CjsBlackReader.js +639 -639
  20. package/dist/formats/black/core/CjsBlackSchemaRegistry.js +433 -433
  21. package/dist/formats/black/core/black-schema-v1-2026-07-11.json.js +4 -4
  22. package/dist/formats/black/core/blackConstants.js +7 -7
  23. package/dist/formats/black/core/blackDefinitions.js +10 -10
  24. package/dist/formats/black/core/blackEnums.js +6 -6
  25. package/dist/formats/black/core/blackSchema.js +3 -3
  26. package/dist/formats/black/core/blackVersion.js +22 -22
  27. package/dist/formats/black/core/helpers.js +182 -182
  28. package/dist/formats/black/core/schema.js +4 -4
  29. package/dist/formats/black/index.js +2 -2
  30. package/dist/formats/bnk/CjsBnkFormat.js +125 -125
  31. package/dist/formats/bnk/core/graph.js +140 -140
  32. package/dist/formats/bnk/core/helpers.js +409 -409
  33. package/dist/formats/bnk/core/musicNodes.js +489 -489
  34. package/dist/formats/bnk/core/soundbanksInfo.js +246 -246
  35. package/dist/formats/bnk/index.js +2 -2
  36. package/dist/formats/cmf/CjsCmfFormat.js +497 -497
  37. package/dist/formats/cmf/core/binary.js +118 -118
  38. package/dist/formats/cmf/core/buffers.js +233 -233
  39. package/dist/formats/cmf/core/constants.js +47 -47
  40. package/dist/formats/cmf/core/gr2Anim.js +453 -453
  41. package/dist/formats/cmf/core/helpers.js +287 -287
  42. package/dist/formats/cmf/core/pack.js +276 -276
  43. package/dist/formats/cmf/core/schema.js +364 -364
  44. package/dist/formats/cmf/core/shared.js +268 -268
  45. package/dist/formats/cmf/core/writer.js +517 -517
  46. package/dist/formats/cmf/index.js +2 -2
  47. package/dist/formats/dds/CjsDdsFormat.js +193 -193
  48. package/dist/formats/dds/core/bc6h.js +288 -0
  49. package/dist/formats/dds/core/bc6h.js.map +1 -0
  50. package/dist/formats/dds/core/bc7.js +251 -0
  51. package/dist/formats/dds/core/bc7.js.map +1 -0
  52. package/dist/formats/dds/core/helpers.js +815 -812
  53. package/dist/formats/dds/core/helpers.js.map +1 -1
  54. package/dist/formats/dds/index.js +2 -2
  55. package/dist/formats/fbx/CjsFbxFormat.js +266 -266
  56. package/dist/formats/fbx/core/helpers.js +3901 -3901
  57. package/dist/formats/fbx/index.js +2 -2
  58. package/dist/formats/flac/CjsFlacFormat.js +87 -87
  59. package/dist/formats/flac/core/helpers.js +295 -295
  60. package/dist/formats/flac/index.js +2 -2
  61. package/dist/formats/gif/CjsGifFormat.js +87 -87
  62. package/dist/formats/gif/core/helpers.js +360 -360
  63. package/dist/formats/gif/index.js +2 -2
  64. package/dist/formats/gltf/CjsGltfFormat.js +290 -290
  65. package/dist/formats/gltf/core/helpers.js +292 -292
  66. package/dist/formats/gltf/core/json.js +79 -79
  67. package/dist/formats/gltf/core/parser.js +666 -666
  68. package/dist/formats/gltf/core/targets.js +163 -163
  69. package/dist/formats/gltf/index.js +2 -2
  70. package/dist/formats/index.js +23 -23
  71. package/dist/formats/jpeg/CjsJpegFormat.js +206 -206
  72. package/dist/formats/jpeg/core/helpers.js +350 -350
  73. package/dist/formats/jpeg/core/jpeg.js +377 -377
  74. package/dist/formats/jpeg/index.js +2 -2
  75. package/dist/formats/mp3/CjsMp3Format.js +192 -192
  76. package/dist/formats/mp3/core/helpers.js +338 -338
  77. package/dist/formats/mp3/index.js +2 -2
  78. package/dist/formats/mp4/CjsMp4Format.js +191 -191
  79. package/dist/formats/mp4/core/helpers.js +449 -449
  80. package/dist/formats/mp4/index.js +2 -2
  81. package/dist/formats/obj/CjsObjFormat.js +253 -253
  82. package/dist/formats/obj/core/helpers.js +573 -573
  83. package/dist/formats/obj/core/json.js +64 -64
  84. package/dist/formats/obj/core/parser.js +321 -321
  85. package/dist/formats/obj/index.js +2 -2
  86. package/dist/formats/ogg/CjsOggFormat.js +88 -88
  87. package/dist/formats/ogg/core/helpers.js +387 -387
  88. package/dist/formats/ogg/core/imdct.js +178 -178
  89. package/dist/formats/ogg/core/vorbis.js +999 -999
  90. package/dist/formats/ogg/index.js +2 -2
  91. package/dist/formats/png/CjsPngFormat.js +195 -195
  92. package/dist/formats/png/core/helpers.js +583 -583
  93. package/dist/formats/png/index.js +2 -2
  94. package/dist/formats/red/CjsRedFormat.js +261 -261
  95. package/dist/formats/red/core/CjsRedReader.js +194 -194
  96. package/dist/formats/red/core/blackDefinitions.js +3 -3
  97. package/dist/formats/red/core/helpers.js +139 -139
  98. package/dist/formats/red/core/redGraph.js +68 -68
  99. package/dist/formats/red/core/schema.js +4 -4
  100. package/dist/formats/red/index.js +2 -2
  101. package/dist/formats/stl/CjsStlFormat.js +365 -365
  102. package/dist/formats/stl/core/helpers.js +261 -261
  103. package/dist/formats/stl/core/json.js +51 -51
  104. package/dist/formats/stl/core/stl.js +629 -629
  105. package/dist/formats/stl/core/targets.js +163 -163
  106. package/dist/formats/stl/index.js +2 -2
  107. package/dist/formats/tga/CjsTgaFormat.js +192 -192
  108. package/dist/formats/tga/core/helpers.js +446 -446
  109. package/dist/formats/tga/index.js +2 -2
  110. package/dist/formats/wav/CjsWavFormat.js +192 -192
  111. package/dist/formats/wav/core/helpers.js +328 -328
  112. package/dist/formats/wav/index.js +2 -2
  113. package/dist/formats/webm/CjsWebmFormat.js +191 -191
  114. package/dist/formats/webm/core/helpers.js +537 -537
  115. package/dist/formats/webm/index.js +2 -2
  116. package/dist/formats/webp/CjsWebpFormat.js +86 -86
  117. package/dist/formats/webp/core/helpers.js +214 -214
  118. package/dist/formats/webp/index.js +2 -2
  119. package/dist/formats/wem/CjsWemFormat.js +241 -241
  120. package/dist/formats/wem/core/bitStream.js +259 -259
  121. package/dist/formats/wem/core/codebookLibrary.js +164 -164
  122. package/dist/formats/wem/core/helpers.js +417 -417
  123. package/dist/formats/wem/core/packedCodebooksAotuv603.js +30 -30
  124. package/dist/formats/wem/core/ptadpcm.js +77 -77
  125. package/dist/formats/wem/core/resolve.js +121 -121
  126. package/dist/formats/wem/core/wemToOgg.js +485 -485
  127. package/dist/formats/wem/index.js +2 -2
  128. package/dist/formats/yaml/CjsYamlFormat.js +83 -83
  129. package/dist/formats/yaml/core/CjsYamlReader.js +305 -305
  130. package/dist/formats/yaml/core/helpers.js +160 -160
  131. package/dist/formats/yaml/index.js +2 -2
  132. package/dist/index.js +48 -48
  133. package/dist/resourcePath.js +18 -18
  134. package/dist/resourceStates.js +9 -9
  135. package/dist/resources/AudioGeometryResData.js +47 -47
  136. package/dist/resources/GStateBindingCallbackData.js +31 -31
  137. package/dist/resources/MeshDecalData.js +37 -37
  138. package/dist/resources/MeshDecalLodData.js +34 -34
  139. package/dist/resources/Tr2EffectRes.js +71 -71
  140. package/dist/resources/Tr2GrannyIntersectionResult.js +60 -60
  141. package/dist/resources/Tr2GrannyStateRes.js +44 -44
  142. package/dist/resources/Tr2ImageRes.js +114 -114
  143. package/dist/resources/Tr2LightProfileRes.js +40 -40
  144. package/dist/resources/Tr2MaterialArea.js +34 -34
  145. package/dist/resources/Tr2MaterialMesh.js +31 -31
  146. package/dist/resources/Tr2MaterialRes.js +34 -34
  147. package/dist/resources/Tr2ShaderPermutation.js +43 -43
  148. package/dist/resources/Tr2TextureLodManager.js +80 -80
  149. package/dist/resources/Tr2TextureLodUpdateRequest.js +37 -37
  150. package/dist/resources/Tr2TexturePackChannel.js +37 -37
  151. package/dist/resources/Tr2TexturePipeline.js +52 -52
  152. package/dist/resources/Tr2TexturePipelineParams.js +34 -34
  153. package/dist/resources/Tr2TexturePipelineStepCompress.js +40 -40
  154. package/dist/resources/Tr2TexturePipelineStepLimitSize.js +34 -34
  155. package/dist/resources/Tr2TexturePipelineStepLoad.js +31 -31
  156. package/dist/resources/Tr2TexturePipelineStepPack.js +43 -43
  157. package/dist/resources/TriGeometryRes.js +239 -216
  158. package/dist/resources/TriGeometryRes.js.map +1 -1
  159. package/dist/resources/TriGeometryResAreaData.js +59 -59
  160. package/dist/resources/TriGeometryResJointData.js +38 -38
  161. package/dist/resources/TriGeometryResLodData.js +88 -88
  162. package/dist/resources/TriGeometryResMeshData.js +63 -63
  163. package/dist/resources/TriGeometryResSkeletonData.js +34 -34
  164. package/dist/resources/TriGrannyRes.js +43 -43
  165. package/dist/resources/TriJointBinding.js +38 -38
  166. package/dist/resources/TriMorphTargetGeometryConstants.js +46 -46
  167. package/dist/resources/TriRtGeometryConstants.js +88 -88
  168. package/dist/resources/TriTextureRes.js +304 -304
  169. package/dist/resources/enums.js +18 -18
  170. package/dist/resources/resourceBoundary.js +47 -47
  171. package/dist/resources/texturePipelineBehavior.js +308 -308
  172. package/dist/texture/CjsTextureArrayRes.js +406 -406
  173. package/dist/texture/CjsTextureParameterProxy.js +133 -133
  174. package/format-notices/black/LICENSE +21 -21
  175. package/format-notices/black/NOTICE +47 -47
  176. package/format-notices/bnk/LICENSE +21 -21
  177. package/format-notices/bnk/NOTICE +20 -20
  178. package/format-notices/cmf/LICENSE +21 -21
  179. package/format-notices/cmf/NOTICE +36 -36
  180. package/format-notices/dds/LICENSE +21 -21
  181. package/format-notices/dds/NOTICE +14 -14
  182. package/format-notices/fbx/LICENSE +21 -21
  183. package/format-notices/fbx/NOTICE +14 -14
  184. package/format-notices/flac/LICENSE +21 -21
  185. package/format-notices/flac/NOTICE +14 -14
  186. package/format-notices/gif/LICENSE +21 -21
  187. package/format-notices/gif/NOTICE +14 -14
  188. package/format-notices/gltf/LICENSE +21 -21
  189. package/format-notices/gltf/NOTICE +27 -27
  190. package/format-notices/jpeg/LICENSE +21 -21
  191. package/format-notices/jpeg/NOTICE +14 -14
  192. package/format-notices/mp3/LICENSE +21 -21
  193. package/format-notices/mp3/NOTICE +14 -14
  194. package/format-notices/mp4/LICENSE +21 -21
  195. package/format-notices/mp4/NOTICE +14 -14
  196. package/format-notices/obj/LICENSE +21 -21
  197. package/format-notices/obj/NOTICE +26 -26
  198. package/format-notices/ogg/LICENSE +21 -21
  199. package/format-notices/ogg/NOTICE +28 -28
  200. package/format-notices/png/LICENSE +21 -21
  201. package/format-notices/png/NOTICE +14 -14
  202. package/format-notices/red/LICENSE +21 -21
  203. package/format-notices/red/NOTICE +31 -31
  204. package/format-notices/stl/LICENSE +21 -21
  205. package/format-notices/stl/NOTICE +21 -21
  206. package/format-notices/tga/LICENSE +21 -21
  207. package/format-notices/tga/NOTICE +14 -14
  208. package/format-notices/wav/LICENSE +21 -21
  209. package/format-notices/wav/NOTICE +14 -14
  210. package/format-notices/webm/LICENSE +21 -21
  211. package/format-notices/webm/NOTICE +14 -14
  212. package/format-notices/webp/LICENSE +21 -21
  213. package/format-notices/webp/NOTICE +14 -14
  214. package/format-notices/wem/LICENSE +57 -57
  215. package/format-notices/wem/NOTICE +33 -33
  216. package/format-notices/yaml/LICENSE +21 -21
  217. package/format-notices/yaml/NOTICE +44 -44
  218. package/package.json +2 -2
  219. package/resource-lifecycle.md +679 -679
@@ -1,216 +1,239 @@
1
- import { identity as _identity, applyDecs2311 as _applyDecs2311 } from '../_virtual/_rollupPluginBabelHelpers.js';
2
- import { io, type, carbon, impl } from '@carbonenginejs/core-types/schema';
3
- import { CjsResource as _CjsResource } from '../CjsResource.js';
4
- import { AssertResourcePayloadObject, AssertResourcePayloadArray, ResourcePayloadError, CarbonStubError } from './resourceBoundary.js';
5
-
6
- let _initProto, _initClass, _init_forceLod, _init_extra_forceLod, _init_forcedLodIndex, _init_extra_forcedLodIndex, _init_name, _init_extra_name;
7
-
8
- /**
9
- * TriGeometryRes resource record.
10
- *
11
- * Geometry payload facts live here. Engine-gpu decides if and how they become
12
- * device buffers, vertex declarations, or draw-time state.
13
- */
14
- let _TriGeometryRes;
15
- new class extends _identity {
16
- static [class TriGeometryRes extends _CjsResource {
17
- static {
18
- ({
19
- e: [_init_forceLod, _init_extra_forceLod, _init_forcedLodIndex, _init_extra_forcedLodIndex, _init_name, _init_extra_name, _initProto],
20
- c: [_TriGeometryRes, _initClass]
21
- } = _applyDecs2311(this, [type.define({
22
- className: "TriGeometryRes",
23
- family: "resources"
24
- })], [[[io, io.readwrite, type, type.boolean], 16, "forceLod"], [[io, io.readwrite, type, type.int32], 16, "forcedLodIndex"], [[io, io.readwrite, type, type.string], 16, "name"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshCount"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetAnimationCount"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshAreaCount"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshName"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshAreaName"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetAreaBoundingBox"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetBoundingBox"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetBoundingSphere"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "CalculateBoundingBoxFromTransform"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "RecalculateBoundingSphere"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "Reload"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "GetIntersectionPointNormalBone"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "GetAreaIntersectionPointNormalBone"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshVertexElements"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "SaveMesh"]], 0, void 0, _CjsResource));
25
- }
26
- forceLod = (_initProto(this), _init_forceLod(this, false));
27
- forcedLodIndex = (_init_extra_forceLod(this), _init_forcedLodIndex(this, -1));
28
- name = (_init_extra_forcedLodIndex(this), _init_name(this, ""));
29
- constructor(values = null) {
30
- super(), _init_extra_name(this);
31
- this.SetValues(values || {}, {
32
- markDirty: false,
33
- skipUpdate: true,
34
- skipEvents: true
35
- });
36
- }
37
-
38
- /**
39
- * Attach a plain geometry payload.
40
- *
41
- * @param {object|null} payload
42
- * @param {object|null} options
43
- * @returns {TriGeometryRes}
44
- */
45
- SetPayload(payload = null, options = null) {
46
- if (payload === null) {
47
- super.SetPayload(null);
48
- return this;
49
- }
50
- AssertResourcePayloadObject("TriGeometryRes", payload);
51
- AssertResourcePayloadArray("TriGeometryRes", payload, "meshes");
52
- for (const field of ["skeletons", "animations"]) {
53
- if (payload[field] !== undefined && !Array.isArray(payload[field])) {
54
- throw ResourcePayloadError("TriGeometryRes", "Expected an array when provided.", field);
55
- }
56
- }
57
- super.SetPayload(payload);
58
- this.SetValues(options || {});
59
- return this;
60
- }
61
-
62
- /**
63
- * Get mesh count from the CPU geometry payload.
64
- *
65
- * @returns {number}
66
- */
67
- GetMeshCount() {
68
- return this.GetPayload()?.meshes?.length || 0;
69
- }
70
-
71
- /**
72
- * Get animation count from the CPU geometry payload.
73
- *
74
- * @returns {number}
75
- */
76
- GetAnimationCount() {
77
- return this.GetPayload()?.animations?.length || 0;
78
- }
79
-
80
- /**
81
- * Get mesh area count from a CPU geometry payload mesh.
82
- *
83
- * @param {number} meshIndex
84
- * @returns {number}
85
- */
86
- GetMeshAreaCount(meshIndex = 0) {
87
- const mesh = this.GetPayload()?.meshes?.[meshIndex];
88
- return mesh?.areas?.length || 0;
89
- }
90
-
91
- /**
92
- * Get mesh name from a CPU geometry payload.
93
- *
94
- * @param {number} meshIndex
95
- * @returns {string}
96
- */
97
- GetMeshName(meshIndex = 0) {
98
- return this.GetPayload()?.meshes?.[meshIndex]?.name || "";
99
- }
100
-
101
- /**
102
- * Get mesh area name from a CPU geometry payload.
103
- *
104
- * @param {number} meshIndex
105
- * @param {number} areaIndex
106
- * @returns {string}
107
- */
108
- GetMeshAreaName(meshIndex = 0, areaIndex = 0) {
109
- return this.GetPayload()?.meshes?.[meshIndex]?.areas?.[areaIndex]?.name || "";
110
- }
111
-
112
- /**
113
- * Get area bounding box from geometry payload data.
114
- *
115
- * @param {number} meshIndex
116
- * @param {number} areaIndex
117
- * @returns {*}
118
- */
119
- GetAreaBoundingBox(meshIndex = 0, areaIndex = 0) {
120
- return this.GetPayload()?.meshes?.[meshIndex]?.areas?.[areaIndex]?.bounds || null;
121
- }
122
-
123
- /**
124
- * Get mesh bounding box from geometry payload data.
125
- * TODO: Should have a box3 as an argument, and write the result to that box3
126
- *
127
- * @param {number} meshIndex
128
- * @returns {*}
129
- */
130
- GetBoundingBox(meshIndex = 0) {
131
- return this.GetPayload()?.meshes?.[meshIndex]?.bounds || this.GetPayload()?.bounds || null;
132
- }
133
-
134
- /**
135
- * Get mesh bounding sphere from geometry payload data.
136
- * TODO: Should have a sph4 as an argument, and write the result to that sph4
137
- *
138
- * @param {number} meshIndex
139
- * @returns {*}
140
- */
141
- GetBoundingSphere(meshIndex = 0) {
142
- return this.GetPayload()?.meshes?.[meshIndex]?.sphere || this.GetPayload()?.sphere || null;
143
- }
144
-
145
- /**
146
- * Calculate a transformed bounding box for a mesh.
147
- *
148
- * @throws {Error}
149
- */
150
- CalculateBoundingBoxFromTransform() {
151
- throw CarbonStubError("TriGeometryRes", "CalculateBoundingBoxFromTransform");
152
- }
153
-
154
- /**
155
- * Recalculate bounding sphere data.
156
- *
157
- * @throws {Error}
158
- */
159
- RecalculateBoundingSphere() {
160
- throw CarbonStubError("TriGeometryRes", "RecalculateBoundingSphere");
161
- }
162
-
163
- /**
164
- * Reload this geometry resource.
165
- *
166
- * @throws {Error}
167
- */
168
- Reload() {
169
- throw CarbonStubError("TriGeometryRes", "Reload");
170
- }
171
-
172
- /**
173
- * Intersect a ray with this geometry resource.
174
- *
175
- * @throws {Error}
176
- */
177
- GetIntersectionPointNormalBone() {
178
- throw CarbonStubError("TriGeometryRes", "GetIntersectionPointNormalBone");
179
- }
180
-
181
- /**
182
- * Intersect a ray with a single mesh area.
183
- *
184
- * @throws {Error}
185
- */
186
- GetAreaIntersectionPointNormalBone() {
187
- throw CarbonStubError("TriGeometryRes", "GetAreaIntersectionPointNormalBone");
188
- }
189
-
190
- /**
191
- * Get vertex element descriptors for a mesh.
192
- *
193
- * @param {number} meshIndex
194
- * @returns {Array<*>}
195
- */
196
- GetMeshVertexElements(meshIndex = 0) {
197
- return this.GetPayload()?.meshes?.[meshIndex]?.vertexElements || [];
198
- }
199
-
200
- /**
201
- * Save a mesh to a Granny file.
202
- *
203
- * @throws {Error}
204
- */
205
- SaveMesh() {
206
- throw CarbonStubError("TriGeometryRes", "SaveMesh");
207
- }
208
- }];
209
- payload = "geometry";
210
- constructor() {
211
- super(_TriGeometryRes), _initClass();
212
- }
213
- }();
214
-
215
- export { _TriGeometryRes as TriGeometryRes };
216
- //# sourceMappingURL=TriGeometryRes.js.map
1
+ import { identity as _identity, applyDecs2311 as _applyDecs2311 } from '../_virtual/_rollupPluginBabelHelpers.js';
2
+ import { io, type, carbon, impl } from '@carbonenginejs/core-types/schema';
3
+ import { CjsResource as _CjsResource } from '../CjsResource.js';
4
+ import { AssertResourcePayloadObject, AssertResourcePayloadArray, ResourcePayloadError, CarbonStubError } from './resourceBoundary.js';
5
+
6
+ let _initProto, _initClass, _init_forceLod, _init_extra_forceLod, _init_forcedLodIndex, _init_extra_forcedLodIndex, _init_name, _init_extra_name;
7
+
8
+ /**
9
+ * TriGeometryRes resource record.
10
+ *
11
+ * Geometry payload facts live here. Engine-gpu decides if and how they become
12
+ * device buffers, vertex declarations, or draw-time state.
13
+ */
14
+ let _TriGeometryRes;
15
+ new class extends _identity {
16
+ static [class TriGeometryRes extends _CjsResource {
17
+ static {
18
+ ({
19
+ e: [_init_forceLod, _init_extra_forceLod, _init_forcedLodIndex, _init_extra_forcedLodIndex, _init_name, _init_extra_name, _initProto],
20
+ c: [_TriGeometryRes, _initClass]
21
+ } = _applyDecs2311(this, [type.define({
22
+ className: "TriGeometryRes",
23
+ family: "resources"
24
+ })], [[[io, io.readwrite, type, type.boolean], 16, "forceLod"], [[io, io.readwrite, type, type.int32], 16, "forcedLodIndex"], [[io, io.readwrite, type, type.string], 16, "name"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshCount"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetAnimationCount"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetSkeletonCount"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetSkeletonData"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshAreaCount"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshName"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshAreaName"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetAreaBoundingBox"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetBoundingBox"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetBoundingSphere"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "CalculateBoundingBoxFromTransform"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "RecalculateBoundingSphere"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "Reload"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "GetIntersectionPointNormalBone"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "GetAreaIntersectionPointNormalBone"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMeshVertexElements"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "SaveMesh"]], 0, void 0, _CjsResource));
25
+ }
26
+ forceLod = (_initProto(this), _init_forceLod(this, false));
27
+ forcedLodIndex = (_init_extra_forceLod(this), _init_forcedLodIndex(this, -1));
28
+ name = (_init_extra_forcedLodIndex(this), _init_name(this, ""));
29
+ constructor(values = null) {
30
+ super(), _init_extra_name(this);
31
+ this.SetValues(values || {}, {
32
+ markDirty: false,
33
+ skipUpdate: true,
34
+ skipEvents: true
35
+ });
36
+ }
37
+
38
+ /**
39
+ * Attach a plain geometry payload.
40
+ *
41
+ * @param {object|null} payload
42
+ * @param {object|null} options
43
+ * @returns {TriGeometryRes}
44
+ */
45
+ SetPayload(payload = null, options = null) {
46
+ if (payload === null) {
47
+ super.SetPayload(null);
48
+ return this;
49
+ }
50
+ AssertResourcePayloadObject("TriGeometryRes", payload);
51
+ AssertResourcePayloadArray("TriGeometryRes", payload, "meshes");
52
+ for (const field of ["skeletons", "animations"]) {
53
+ if (payload[field] !== undefined && !Array.isArray(payload[field])) {
54
+ throw ResourcePayloadError("TriGeometryRes", "Expected an array when provided.", field);
55
+ }
56
+ }
57
+ super.SetPayload(payload);
58
+ this.SetValues(options || {});
59
+ return this;
60
+ }
61
+
62
+ /**
63
+ * Get mesh count from the CPU geometry payload.
64
+ *
65
+ * @returns {number}
66
+ */
67
+ GetMeshCount() {
68
+ return this.GetPayload()?.meshes?.length || 0;
69
+ }
70
+
71
+ /**
72
+ * Get animation count from the CPU geometry payload.
73
+ *
74
+ * @returns {number}
75
+ */
76
+ GetAnimationCount() {
77
+ return this.GetPayload()?.animations?.length || 0;
78
+ }
79
+
80
+ /**
81
+ * Get skeleton count from the CPU geometry payload.
82
+ *
83
+ * @returns {number}
84
+ */
85
+ GetSkeletonCount() {
86
+ return this.GetPayload()?.skeletons?.length || 0;
87
+ }
88
+
89
+ /**
90
+ * Get one resource-owned skeleton from the CPU geometry payload.
91
+ *
92
+ * @param {number} skeletonIndex
93
+ * @returns {*}
94
+ */
95
+ GetSkeletonData(skeletonIndex = 0) {
96
+ const index = Number(skeletonIndex);
97
+ if (!Number.isInteger(index) || index < 0) {
98
+ return null;
99
+ }
100
+ return this.GetPayload()?.skeletons?.[index] || null;
101
+ }
102
+
103
+ /**
104
+ * Get mesh area count from a CPU geometry payload mesh.
105
+ *
106
+ * @param {number} meshIndex
107
+ * @returns {number}
108
+ */
109
+ GetMeshAreaCount(meshIndex = 0) {
110
+ const mesh = this.GetPayload()?.meshes?.[meshIndex];
111
+ return mesh?.areas?.length || 0;
112
+ }
113
+
114
+ /**
115
+ * Get mesh name from a CPU geometry payload.
116
+ *
117
+ * @param {number} meshIndex
118
+ * @returns {string}
119
+ */
120
+ GetMeshName(meshIndex = 0) {
121
+ return this.GetPayload()?.meshes?.[meshIndex]?.name || "";
122
+ }
123
+
124
+ /**
125
+ * Get mesh area name from a CPU geometry payload.
126
+ *
127
+ * @param {number} meshIndex
128
+ * @param {number} areaIndex
129
+ * @returns {string}
130
+ */
131
+ GetMeshAreaName(meshIndex = 0, areaIndex = 0) {
132
+ return this.GetPayload()?.meshes?.[meshIndex]?.areas?.[areaIndex]?.name || "";
133
+ }
134
+
135
+ /**
136
+ * Get area bounding box from geometry payload data.
137
+ *
138
+ * @param {number} meshIndex
139
+ * @param {number} areaIndex
140
+ * @returns {*}
141
+ */
142
+ GetAreaBoundingBox(meshIndex = 0, areaIndex = 0) {
143
+ return this.GetPayload()?.meshes?.[meshIndex]?.areas?.[areaIndex]?.bounds || null;
144
+ }
145
+
146
+ /**
147
+ * Get mesh bounding box from geometry payload data.
148
+ * TODO: Should have a box3 as an argument, and write the result to that box3
149
+ *
150
+ * @param {number} meshIndex
151
+ * @returns {*}
152
+ */
153
+ GetBoundingBox(meshIndex = 0) {
154
+ return this.GetPayload()?.meshes?.[meshIndex]?.bounds || this.GetPayload()?.bounds || null;
155
+ }
156
+
157
+ /**
158
+ * Get mesh bounding sphere from geometry payload data.
159
+ * TODO: Should have a sph4 as an argument, and write the result to that sph4
160
+ *
161
+ * @param {number} meshIndex
162
+ * @returns {*}
163
+ */
164
+ GetBoundingSphere(meshIndex = 0) {
165
+ return this.GetPayload()?.meshes?.[meshIndex]?.sphere || this.GetPayload()?.sphere || null;
166
+ }
167
+
168
+ /**
169
+ * Calculate a transformed bounding box for a mesh.
170
+ *
171
+ * @throws {Error}
172
+ */
173
+ CalculateBoundingBoxFromTransform() {
174
+ throw CarbonStubError("TriGeometryRes", "CalculateBoundingBoxFromTransform");
175
+ }
176
+
177
+ /**
178
+ * Recalculate bounding sphere data.
179
+ *
180
+ * @throws {Error}
181
+ */
182
+ RecalculateBoundingSphere() {
183
+ throw CarbonStubError("TriGeometryRes", "RecalculateBoundingSphere");
184
+ }
185
+
186
+ /**
187
+ * Reload this geometry resource.
188
+ *
189
+ * @throws {Error}
190
+ */
191
+ Reload() {
192
+ throw CarbonStubError("TriGeometryRes", "Reload");
193
+ }
194
+
195
+ /**
196
+ * Intersect a ray with this geometry resource.
197
+ *
198
+ * @throws {Error}
199
+ */
200
+ GetIntersectionPointNormalBone() {
201
+ throw CarbonStubError("TriGeometryRes", "GetIntersectionPointNormalBone");
202
+ }
203
+
204
+ /**
205
+ * Intersect a ray with a single mesh area.
206
+ *
207
+ * @throws {Error}
208
+ */
209
+ GetAreaIntersectionPointNormalBone() {
210
+ throw CarbonStubError("TriGeometryRes", "GetAreaIntersectionPointNormalBone");
211
+ }
212
+
213
+ /**
214
+ * Get vertex element descriptors for a mesh.
215
+ *
216
+ * @param {number} meshIndex
217
+ * @returns {Array<*>}
218
+ */
219
+ GetMeshVertexElements(meshIndex = 0) {
220
+ return this.GetPayload()?.meshes?.[meshIndex]?.vertexElements || [];
221
+ }
222
+
223
+ /**
224
+ * Save a mesh to a Granny file.
225
+ *
226
+ * @throws {Error}
227
+ */
228
+ SaveMesh() {
229
+ throw CarbonStubError("TriGeometryRes", "SaveMesh");
230
+ }
231
+ }];
232
+ payload = "geometry";
233
+ constructor() {
234
+ super(_TriGeometryRes), _initClass();
235
+ }
236
+ }();
237
+
238
+ export { _TriGeometryRes as TriGeometryRes };
239
+ //# sourceMappingURL=TriGeometryRes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TriGeometryRes.js","sources":["../../../src/resources/TriGeometryRes.js"],"sourcesContent":["// Source: trinity/trinity/Resources/TriGeometryRes.h\n// Source: trinity/trinity/Resources/TriGeometryRes.cpp\n// Source: trinity/trinity/Resources/TriGeometryRes_Blue.cpp\nimport { carbon, impl, io, type } from \"@carbonenginejs/core-types/schema\";\nimport { CjsResource } from \"../CjsResource.js\";\nimport {\n AssertResourcePayloadArray,\n AssertResourcePayloadObject,\n CarbonStubError,\n ResourcePayloadError\n} from \"./resourceBoundary.js\";\n\n/**\n * TriGeometryRes resource record.\n *\n * Geometry payload facts live here. Engine-gpu decides if and how they become\n * device buffers, vertex declarations, or draw-time state.\n */\n@type.define({ className: \"TriGeometryRes\", family: \"resources\" })\nexport class TriGeometryRes extends CjsResource\n{\n\n @io.readwrite\n @type.boolean\n forceLod = false;\n\n @io.readwrite\n @type.int32\n forcedLodIndex = -1;\n\n @io.readwrite\n @type.string\n name = \"\";\n\n constructor(values = null)\n {\n super();\n this.SetValues(values || {}, {\n markDirty: false,\n skipUpdate: true,\n skipEvents: true\n });\n }\n\n /**\n * Attach a plain geometry payload.\n *\n * @param {object|null} payload\n * @param {object|null} options\n * @returns {TriGeometryRes}\n */\n SetPayload(payload = null, options = null)\n {\n if (payload === null)\n {\n super.SetPayload(null);\n return this;\n }\n AssertResourcePayloadObject(\"TriGeometryRes\", payload);\n AssertResourcePayloadArray(\"TriGeometryRes\", payload, \"meshes\");\n for (const field of [ \"skeletons\", \"animations\" ])\n {\n if (payload[field] !== undefined && !Array.isArray(payload[field]))\n {\n throw ResourcePayloadError(\"TriGeometryRes\", \"Expected an array when provided.\", field);\n }\n }\n super.SetPayload(payload);\n this.SetValues(options || {});\n return this;\n }\n\n /**\n * Get mesh count from the CPU geometry payload.\n *\n * @returns {number}\n */\n @carbon.method\n @impl.adapted\n GetMeshCount()\n {\n return this.GetPayload()?.meshes?.length || 0;\n }\n\n /**\n * Get animation count from the CPU geometry payload.\n *\n * @returns {number}\n */\n @carbon.method\n @impl.adapted\n GetAnimationCount()\n {\n return this.GetPayload()?.animations?.length || 0;\n }\n\n /**\n * Get mesh area count from a CPU geometry payload mesh.\n *\n * @param {number} meshIndex\n * @returns {number}\n */\n @carbon.method\n @impl.adapted\n GetMeshAreaCount(meshIndex = 0)\n {\n const mesh = this.GetPayload()?.meshes?.[meshIndex];\n return mesh?.areas?.length || 0;\n }\n\n /**\n * Get mesh name from a CPU geometry payload.\n *\n * @param {number} meshIndex\n * @returns {string}\n */\n @carbon.method\n @impl.adapted\n GetMeshName(meshIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.name || \"\";\n }\n\n /**\n * Get mesh area name from a CPU geometry payload.\n *\n * @param {number} meshIndex\n * @param {number} areaIndex\n * @returns {string}\n */\n @carbon.method\n @impl.adapted\n GetMeshAreaName(meshIndex = 0, areaIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.areas?.[areaIndex]?.name || \"\";\n }\n\n /**\n * Get area bounding box from geometry payload data.\n *\n * @param {number} meshIndex\n * @param {number} areaIndex\n * @returns {*}\n */\n @carbon.method\n @impl.adapted\n GetAreaBoundingBox(meshIndex = 0, areaIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.areas?.[areaIndex]?.bounds || null;\n }\n\n /**\n * Get mesh bounding box from geometry payload data.\n * TODO: Should have a box3 as an argument, and write the result to that box3\n *\n * @param {number} meshIndex\n * @returns {*}\n */\n @carbon.method\n @impl.adapted\n GetBoundingBox(meshIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.bounds || this.GetPayload()?.bounds || null;\n }\n\n /**\n * Get mesh bounding sphere from geometry payload data.\n * TODO: Should have a sph4 as an argument, and write the result to that sph4\n *\n * @param {number} meshIndex\n * @returns {*}\n */\n @carbon.method\n @impl.adapted\n GetBoundingSphere(meshIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.sphere || this.GetPayload()?.sphere || null;\n }\n\n /**\n * Calculate a transformed bounding box for a mesh.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n CalculateBoundingBoxFromTransform()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"CalculateBoundingBoxFromTransform\");\n }\n\n /**\n * Recalculate bounding sphere data.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n RecalculateBoundingSphere()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"RecalculateBoundingSphere\");\n }\n\n /**\n * Reload this geometry resource.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n Reload() {\n throw CarbonStubError(\"TriGeometryRes\", \"Reload\");\n }\n\n /**\n * Intersect a ray with this geometry resource.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n GetIntersectionPointNormalBone()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"GetIntersectionPointNormalBone\");\n }\n\n /**\n * Intersect a ray with a single mesh area.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n GetAreaIntersectionPointNormalBone()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"GetAreaIntersectionPointNormalBone\");\n }\n\n /**\n * Get vertex element descriptors for a mesh.\n *\n * @param {number} meshIndex\n * @returns {Array<*>}\n */\n @carbon.method\n @impl.adapted\n GetMeshVertexElements(meshIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.vertexElements || [];\n }\n\n /**\n * Save a mesh to a Granny file.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n SaveMesh()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"SaveMesh\");\n }\n\n static payload = \"geometry\";\n\n}\n"],"names":["_TriGeometryRes","_identity","TriGeometryRes","CjsResource","e","_init_forceLod","_init_extra_forceLod","_init_forcedLodIndex","_init_extra_forcedLodIndex","_init_name","_init_extra_name","_initProto","c","_initClass","_applyDecs","type","define","className","family","io","readwrite","boolean","int32","string","carbon","method","impl","adapted","notImplemented","forceLod","forcedLodIndex","name","constructor","values","SetValues","markDirty","skipUpdate","skipEvents","SetPayload","payload","options","AssertResourcePayloadObject","AssertResourcePayloadArray","field","undefined","Array","isArray","ResourcePayloadError","GetMeshCount","GetPayload","meshes","length","GetAnimationCount","animations","GetMeshAreaCount","meshIndex","mesh","areas","GetMeshName","GetMeshAreaName","areaIndex","GetAreaBoundingBox","bounds","GetBoundingBox","GetBoundingSphere","sphere","CalculateBoundingBoxFromTransform","CarbonStubError","RecalculateBoundingSphere","Reload","GetIntersectionPointNormalBone","GetAreaIntersectionPointNormalBone","GetMeshVertexElements","vertexElements","SaveMesh"],"mappings":";;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AALA,IAAAA;AAAA,IAAA,cAAAC,SAAA,CAAA;AAAA,EAAA,QAMA,MAAAC,cAAA,SACoCC,YAAW,CAC/C;AAAA,IAAA;AAAA,MAAA,CAAA;AAAAC,QAAAA,CAAA,EAAA,CAAAC,cAAA,EAAAC,oBAAA,EAAAC,oBAAA,EAAAC,0BAAA,EAAAC,UAAA,EAAAC,gBAAA,EAAAC,UAAA,CAAA;QAAAC,CAAA,EAAA,CAAAZ,eAAA,EAAAa,UAAA;AAAA,OAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,QAAAA,SAAS,EAAE,gBAAgB;AAAEC,QAAAA,MAAM,EAAE;OAAa,CAAC,MAI/DC,EAAE,EAAFA,EAAE,CAACC,SAAS,EACZL,IAAI,EAAJA,IAAI,CAACM,OAAO,CAAA,EAAA,EAAA,EAAA,UAAA,CAAA,EAAA,CAAA,CAGZF,EAAE,EAAFA,EAAE,CAACC,SAAS,EACZL,IAAI,EAAJA,IAAI,CAACO,KAAK,4BAGVH,EAAE,EAAFA,EAAE,CAACC,SAAS,EACZL,IAAI,EAAJA,IAAI,CAACQ,MAAM,CAAA,EAAA,EAAA,EAAA,MAAA,CAAA,EAAA,CAAA,C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ACE,MAAA,MAAMC,eAAe,CAAC,gBAAgB,EAAE,mCAAmC,CAAC;AAC9E,IAAA;;AAEA;AACF;AACA;AACA;AACA;AAGEC,IAAAA,yBAAyBA,GACzB;AACE,MAAA,MAAMD,eAAe,CAAC,gBAAgB,EAAE,2BAA2B,CAAC;AACtE,IAAA;;AAEA;AACF;AACA;AACA;AACA;AAGEE,IAAAA,MAAMA,GAAG;AACP,MAAA,MAAMF,eAAe,CAAC,gBAAgB,EAAE,QAAQ,CAAC;AACnD,IAAA;;AAEA;AACF;AACA;AACA;AACA;AAGEG,IAAAA,8BAA8BA,GAC9B;AACE,MAAA,MAAMH,eAAe,CAAC,gBAAgB,EAAE,gCAAgC,CAAC;AAC3E,IAAA;;AAEA;AACF;AACA;AACA;AACA;AAGEI,IAAAA,kCAAkCA,GAClC;AACE,MAAA,MAAMJ,eAAe,CAAC,gBAAgB,EAAE,oCAAoC,CAAC;AAC/E,IAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AAGEK,IAAAA,qBAAqBA,CAACjB,SAAS,GAAG,CAAC,EACnC;AACE,MAAA,OAAO,IAAI,CAACN,UAAU,EAAE,EAAEC,MAAM,GAAGK,SAAS,CAAC,EAAEkB,cAAc,IAAI,EAAE;AACrE,IAAA;;AAEA;AACF;AACA;AACA;AACA;AAGEC,IAAAA,QAAQA,GACR;AACE,MAAA,MAAMP,eAAe,CAAC,gBAAgB,EAAE,UAAU,CAAC;AACrD,IAAA;GAID;AAFQ5B,EAAAA,OAAO,GAAG,UAAU;EAACP,WAAAA,GAAA;IAAA,KAAA,CAAAhC,eAAA,GAAAa,UAAA,EAAA;AAAA,EAAA;AAAA,CAAA,EAAA;;;;"}
1
+ {"version":3,"file":"TriGeometryRes.js","sources":["../../../src/resources/TriGeometryRes.js"],"sourcesContent":["// Source: trinity/trinity/Resources/TriGeometryRes.h\n// Source: trinity/trinity/Resources/TriGeometryRes.cpp\n// Source: trinity/trinity/Resources/TriGeometryRes_Blue.cpp\nimport { carbon, impl, io, type } from \"@carbonenginejs/core-types/schema\";\nimport { CjsResource } from \"../CjsResource.js\";\nimport {\n AssertResourcePayloadArray,\n AssertResourcePayloadObject,\n CarbonStubError,\n ResourcePayloadError\n} from \"./resourceBoundary.js\";\n\n/**\n * TriGeometryRes resource record.\n *\n * Geometry payload facts live here. Engine-gpu decides if and how they become\n * device buffers, vertex declarations, or draw-time state.\n */\n@type.define({ className: \"TriGeometryRes\", family: \"resources\" })\nexport class TriGeometryRes extends CjsResource\n{\n\n @io.readwrite\n @type.boolean\n forceLod = false;\n\n @io.readwrite\n @type.int32\n forcedLodIndex = -1;\n\n @io.readwrite\n @type.string\n name = \"\";\n\n constructor(values = null)\n {\n super();\n this.SetValues(values || {}, {\n markDirty: false,\n skipUpdate: true,\n skipEvents: true\n });\n }\n\n /**\n * Attach a plain geometry payload.\n *\n * @param {object|null} payload\n * @param {object|null} options\n * @returns {TriGeometryRes}\n */\n SetPayload(payload = null, options = null)\n {\n if (payload === null)\n {\n super.SetPayload(null);\n return this;\n }\n AssertResourcePayloadObject(\"TriGeometryRes\", payload);\n AssertResourcePayloadArray(\"TriGeometryRes\", payload, \"meshes\");\n for (const field of [ \"skeletons\", \"animations\" ])\n {\n if (payload[field] !== undefined && !Array.isArray(payload[field]))\n {\n throw ResourcePayloadError(\"TriGeometryRes\", \"Expected an array when provided.\", field);\n }\n }\n super.SetPayload(payload);\n this.SetValues(options || {});\n return this;\n }\n\n /**\n * Get mesh count from the CPU geometry payload.\n *\n * @returns {number}\n */\n @carbon.method\n @impl.adapted\n GetMeshCount()\n {\n return this.GetPayload()?.meshes?.length || 0;\n }\n\n /**\n * Get animation count from the CPU geometry payload.\n *\n * @returns {number}\n */\n @carbon.method\n @impl.adapted\n GetAnimationCount()\n {\n return this.GetPayload()?.animations?.length || 0;\n }\n\n /**\n * Get skeleton count from the CPU geometry payload.\n *\n * @returns {number}\n */\n @carbon.method\n @impl.adapted\n GetSkeletonCount()\n {\n return this.GetPayload()?.skeletons?.length || 0;\n }\n\n /**\n * Get one resource-owned skeleton from the CPU geometry payload.\n *\n * @param {number} skeletonIndex\n * @returns {*}\n */\n @carbon.method\n @impl.adapted\n GetSkeletonData(skeletonIndex = 0)\n {\n const index = Number(skeletonIndex);\n\n if (!Number.isInteger(index) || index < 0)\n {\n return null;\n }\n\n return this.GetPayload()?.skeletons?.[index] || null;\n }\n\n /**\n * Get mesh area count from a CPU geometry payload mesh.\n *\n * @param {number} meshIndex\n * @returns {number}\n */\n @carbon.method\n @impl.adapted\n GetMeshAreaCount(meshIndex = 0)\n {\n const mesh = this.GetPayload()?.meshes?.[meshIndex];\n return mesh?.areas?.length || 0;\n }\n\n /**\n * Get mesh name from a CPU geometry payload.\n *\n * @param {number} meshIndex\n * @returns {string}\n */\n @carbon.method\n @impl.adapted\n GetMeshName(meshIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.name || \"\";\n }\n\n /**\n * Get mesh area name from a CPU geometry payload.\n *\n * @param {number} meshIndex\n * @param {number} areaIndex\n * @returns {string}\n */\n @carbon.method\n @impl.adapted\n GetMeshAreaName(meshIndex = 0, areaIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.areas?.[areaIndex]?.name || \"\";\n }\n\n /**\n * Get area bounding box from geometry payload data.\n *\n * @param {number} meshIndex\n * @param {number} areaIndex\n * @returns {*}\n */\n @carbon.method\n @impl.adapted\n GetAreaBoundingBox(meshIndex = 0, areaIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.areas?.[areaIndex]?.bounds || null;\n }\n\n /**\n * Get mesh bounding box from geometry payload data.\n * TODO: Should have a box3 as an argument, and write the result to that box3\n *\n * @param {number} meshIndex\n * @returns {*}\n */\n @carbon.method\n @impl.adapted\n GetBoundingBox(meshIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.bounds || this.GetPayload()?.bounds || null;\n }\n\n /**\n * Get mesh bounding sphere from geometry payload data.\n * TODO: Should have a sph4 as an argument, and write the result to that sph4\n *\n * @param {number} meshIndex\n * @returns {*}\n */\n @carbon.method\n @impl.adapted\n GetBoundingSphere(meshIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.sphere || this.GetPayload()?.sphere || null;\n }\n\n /**\n * Calculate a transformed bounding box for a mesh.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n CalculateBoundingBoxFromTransform()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"CalculateBoundingBoxFromTransform\");\n }\n\n /**\n * Recalculate bounding sphere data.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n RecalculateBoundingSphere()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"RecalculateBoundingSphere\");\n }\n\n /**\n * Reload this geometry resource.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n Reload() {\n throw CarbonStubError(\"TriGeometryRes\", \"Reload\");\n }\n\n /**\n * Intersect a ray with this geometry resource.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n GetIntersectionPointNormalBone()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"GetIntersectionPointNormalBone\");\n }\n\n /**\n * Intersect a ray with a single mesh area.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n GetAreaIntersectionPointNormalBone()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"GetAreaIntersectionPointNormalBone\");\n }\n\n /**\n * Get vertex element descriptors for a mesh.\n *\n * @param {number} meshIndex\n * @returns {Array<*>}\n */\n @carbon.method\n @impl.adapted\n GetMeshVertexElements(meshIndex = 0)\n {\n return this.GetPayload()?.meshes?.[meshIndex]?.vertexElements || [];\n }\n\n /**\n * Save a mesh to a Granny file.\n *\n * @throws {Error}\n */\n @carbon.method\n @impl.notImplemented\n SaveMesh()\n {\n throw CarbonStubError(\"TriGeometryRes\", \"SaveMesh\");\n }\n\n static payload = \"geometry\";\n\n}\n"],"names":["_TriGeometryRes","_identity","TriGeometryRes","CjsResource","e","_init_forceLod","_init_extra_forceLod","_init_forcedLodIndex","_init_extra_forcedLodIndex","_init_name","_init_extra_name","_initProto","c","_initClass","_applyDecs","type","define","className","family","io","readwrite","boolean","int32","string","carbon","method","impl","adapted","notImplemented","forceLod","forcedLodIndex","name","constructor","values","SetValues","markDirty","skipUpdate","skipEvents","SetPayload","payload","options","AssertResourcePayloadObject","AssertResourcePayloadArray","field","undefined","Array","isArray","ResourcePayloadError","GetMeshCount","GetPayload","meshes","length","GetAnimationCount","animations","GetSkeletonCount","skeletons","GetSkeletonData","skeletonIndex","index","Number","isInteger","GetMeshAreaCount","meshIndex","mesh","areas","GetMeshName","GetMeshAreaName","areaIndex","GetAreaBoundingBox","bounds","GetBoundingBox","GetBoundingSphere","sphere","CalculateBoundingBoxFromTransform","CarbonStubError","RecalculateBoundingSphere","Reload","GetIntersectionPointNormalBone","GetAreaIntersectionPointNormalBone","GetMeshVertexElements","vertexElements","SaveMesh"],"mappings":";;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AALA,IAAAA;AAAA,IAAA,cAAAC,SAAA,CAAA;AAAA,EAAA,QAMA,MAAAC,cAAA,SACoCC,YAAW,CAC/C;AAAA,IAAA;AAAA,MAAA,CAAA;AAAAC,QAAAA,CAAA,EAAA,CAAAC,cAAA,EAAAC,oBAAA,EAAAC,oBAAA,EAAAC,0BAAA,EAAAC,UAAA,EAAAC,gBAAA,EAAAC,UAAA,CAAA;QAAAC,CAAA,EAAA,CAAAZ,eAAA,EAAAa,UAAA;AAAA,OAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,QAAAA,SAAS,EAAE,gBAAgB;AAAEC,QAAAA,MAAM,EAAE;OAAa,CAAC,CAAA,EAAA,CAAA,CAAA,CAI/DC,EAAE,EAAFA,EAAE,CAACC,SAAS,EACZL,IAAI,EAAJA,IAAI,CAACM,OAAO,sBAGZF,EAAE,EAAFA,EAAE,CAACC,SAAS,EACZL,IAAI,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