@carbonenginejs/runtime 0.1.0-alpha.2 → 0.1.0-alpha.3

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 (45) hide show
  1. package/dist/global/model/CjsModel.js +3 -1
  2. package/dist/global/model/CjsModel.js.map +1 -1
  3. package/dist/global/model/document/CjsDocumentHydrator.js +5 -1
  4. package/dist/global/model/document/CjsDocumentHydrator.js.map +1 -1
  5. package/dist/global/schema/CjsSchema.js +98 -18
  6. package/dist/global/schema/CjsSchema.js.map +1 -1
  7. package/dist/global/schema/hydration.js +10 -8
  8. package/dist/global/schema/hydration.js.map +1 -1
  9. package/dist/index.js +2 -0
  10. package/dist/index.js.map +1 -1
  11. package/dist/resource/CjsResMan.js +177 -4
  12. package/dist/resource/CjsResMan.js.map +1 -1
  13. package/dist/resource/format/CjsBlueReader.js +8 -1
  14. package/dist/resource/format/CjsBlueReader.js.map +1 -1
  15. package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js +7 -1
  16. package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
  17. package/dist/resource/index.js +2 -0
  18. package/dist/resource/index.js.map +1 -1
  19. package/dist/resource/texture/SolidColorTextureConstructor.js +46 -0
  20. package/dist/resource/texture/SolidColorTextureConstructor.js.map +1 -0
  21. package/dist/resource/texture/TriTextureRes.js +43 -0
  22. package/dist/resource/texture/TriTextureRes.js.map +1 -1
  23. package/dist/resource/texture/index.js +2 -0
  24. package/dist/resource/texture/index.js.map +1 -1
  25. package/dist/resource/texture/solidColorTexture.js +111 -0
  26. package/dist/resource/texture/solidColorTexture.js.map +1 -0
  27. package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js +19 -8
  28. package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js.map +1 -1
  29. package/dist/trinity/eve/child/EveChildMesh.js +17 -3
  30. package/dist/trinity/eve/child/EveChildMesh.js.map +1 -1
  31. package/dist/trinity/eve/locator/EveLocatorSets.js +12 -3
  32. package/dist/trinity/eve/locator/EveLocatorSets.js.map +1 -1
  33. package/dist/trinity/eve/spaceObject/EveSpaceObject2.js +15 -2
  34. package/dist/trinity/eve/spaceObject/EveSpaceObject2.js.map +1 -1
  35. package/dist/trinity/eve/spaceObject/IEveSpaceObject2ParentData.js +44 -52
  36. package/dist/trinity/eve/spaceObject/IEveSpaceObject2ParentData.js.map +1 -1
  37. package/docs/resource/concepts/resource-lifecycle.md +10 -8
  38. package/docs/resource/formats/geometry-interchange.md +50 -0
  39. package/docs/resource/formats/webgl/decl-io.md +241 -397
  40. package/docs/resource/formats/webgl/memory-structured.md +91 -128
  41. package/docs/resource/formats/webgl/texture-sample.md +306 -469
  42. package/docs/resource/reference/classes/texture.md +11 -1
  43. package/docs/resource/reference/motherlode-cache.md +24 -11
  44. package/docs/resource/reference/queues.md +23 -1
  45. package/package.json +1 -1
@@ -1,70 +1,62 @@
1
- import { identity as _identity, applyDecs2311 as _applyDecs2311 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import { CjsModel } from '#model';
3
1
  import { mat4 } from '#math/mat4';
4
- import { type } from '#schema';
5
2
  import { vec3 } from '#math/vec3';
6
3
  import { vec4 } from '#math/vec4';
7
4
 
8
- let _initClass, _init_transform, _init_extra_transform, _init_killCount, _init_extra_killCount, _init_shipData, _init_extra_shipData, _init_clipSphereCenter, _init_extra_clipSphereCenter, _init_clipRadiusSq, _init_extra_clipRadiusSq, _init_clipRadius2Sq, _init_extra_clipRadius2Sq, _init_clipFactor, _init_extra_clipFactor, _init_clipFactor2, _init_extra_clipFactor2, _init_customData, _init_extra_customData;
5
+ // Source: trinity/trinity/Eve/IEveSpaceObject2.h (IEveSpaceObject2::ParentData)
6
+ // Hand-maintained. Carbon nests this struct inside the IEveSpaceObject2
7
+ // interface; the JS identity concatenates owner and inner name
8
+ // (IEveSpaceObject2 + ParentData) because a bare inner name is not unique
9
+ // across the corpus - fifteen inner names are claimed by several owners and
10
+ // thirteen collide with a top-level class.
11
+ //
12
+ // A plain class, not a model: it is internal per-frame data, filled by the
13
+ // owner's update pass (GetParentData) and copied member by member by the
14
+ // consumer, exactly as Carbon passes and copies the struct. Nothing hydrates
15
+ // it or edits it from a UI; if something ever needs to, compose values onto
16
+ // it rather than giving it the model base.
9
17
 
10
18
  /** The per-frame parent state a space object hands to its attachments. */
11
- let _IEveSpaceObject2Pare;
12
- new class extends _identity {
13
- static [class IEveSpaceObject2ParentData extends CjsModel {
14
- static {
15
- ({
16
- e: [_init_transform, _init_extra_transform, _init_killCount, _init_extra_killCount, _init_shipData, _init_extra_shipData, _init_clipSphereCenter, _init_extra_clipSphereCenter, _init_clipRadiusSq, _init_extra_clipRadiusSq, _init_clipRadius2Sq, _init_extra_clipRadius2Sq, _init_clipFactor, _init_extra_clipFactor, _init_clipFactor2, _init_extra_clipFactor2, _init_customData, _init_extra_customData],
17
- c: [_IEveSpaceObject2Pare, _initClass]
18
- } = _applyDecs2311(this, [type.define({
19
- className: "IEveSpaceObject2ParentData",
20
- family: "eve/spaceObject"
21
- })], [[[type, type.mat4], 16, "transform"], [[type, type.uint32], 16, "killCount"], [[type, type.vec4], 16, "shipData"], [[type, type.vec3], 16, "clipSphereCenter"], [[type, type.float32], 16, "clipRadiusSq"], [[type, type.float32], 16, "clipRadius2Sq"], [[type, type.float32], 16, "clipFactor"], [[type, type.float32], 16, "clipFactor2"], [[type, type.vec4], 16, "customData"]], 0, void 0, CjsModel));
22
- }
23
- /** transform (Matrix) - the parent's world transform. */
24
- transform = _init_transform(this, mat4.create());
19
+ class IEveSpaceObject2ParentData {
20
+ /** transform (Matrix) - the parent's world transform. */
21
+ transform = mat4.create();
25
22
 
26
- /** killCount (uint32_t) - EveSpaceObject2::GetParentData never assigns it,
27
- * so it stays zero through that path (EveSpaceObject2.cpp:1874). */
28
- killCount = (_init_extra_transform(this), _init_killCount(this, 0));
23
+ /** killCount (uint32_t) - EveSpaceObject2::GetParentData never assigns it,
24
+ * so it stays zero through that path (EveSpaceObject2.cpp:1874). */
25
+ killCount = 0;
29
26
 
30
- /** shipData (Vector4) - m_spaceObjectShipData. */
31
- shipData = (_init_extra_killCount(this), _init_shipData(this, vec4.create()));
27
+ /** shipData (Vector4) - m_spaceObjectShipData. */
28
+ shipData = vec4.create();
32
29
 
33
- /** clipSphereCenter (Vector3). */
34
- clipSphereCenter = (_init_extra_shipData(this), _init_clipSphereCenter(this, vec3.create()));
30
+ /** clipSphereCenter (Vector3). */
31
+ clipSphereCenter = vec3.create();
35
32
 
36
- /** clipRadiusSq (float). */
37
- clipRadiusSq = (_init_extra_clipSphereCenter(this), _init_clipRadiusSq(this, 0));
33
+ /** clipRadiusSq (float). */
34
+ clipRadiusSq = 0;
38
35
 
39
- /** clipRadius2Sq (float). */
40
- clipRadius2Sq = (_init_extra_clipRadiusSq(this), _init_clipRadius2Sq(this, 0));
36
+ /** clipRadius2Sq (float). */
37
+ clipRadius2Sq = 0;
41
38
 
42
- /** clipFactor (float) - the parent's clipSphereFactor. */
43
- clipFactor = (_init_extra_clipRadius2Sq(this), _init_clipFactor(this, 0));
39
+ /** clipFactor (float) - the parent's clipSphereFactor. */
40
+ clipFactor = 0;
44
41
 
45
- /** clipFactor2 (float) - the parent's clipSphereFactor2. */
46
- clipFactor2 = (_init_extra_clipFactor(this), _init_clipFactor2(this, 0));
42
+ /** clipFactor2 (float) - the parent's clipSphereFactor2. */
43
+ clipFactor2 = 0;
47
44
 
48
- /** customData (Vector4). */
49
- customData = (_init_extra_clipFactor2(this), _init_customData(this, vec4.create()));
45
+ /** customData (Vector4). */
46
+ customData = vec4.create();
50
47
 
51
- /**
52
- * shLighting (const Vector4*) - Carbon borrows a pointer to the parent's
53
- * seven packed spherical-harmonic coefficients and copies them at fill time,
54
- * zeroing when the pointer is null (EveSpaceObjectDecal.cpp:376-383). The
55
- * port holds the parent's array by reference with the same null contract; it
56
- * is runtime state, so it carries no persistence.
57
- */
58
- shLighting = (_init_extra_customData(this), null);
48
+ /**
49
+ * shLighting (const Vector4*) - Carbon borrows a pointer to the parent's
50
+ * seven packed spherical-harmonic coefficients and copies them at fill time,
51
+ * zeroing when the pointer is null (EveSpaceObjectDecal.cpp:376-383). The
52
+ * port holds the parent's array by reference with the same null contract.
53
+ */
54
+ shLighting = null;
59
55
 
60
- /** Carbon's packed spherical-harmonic coefficient count
61
- * (Tr2ShLightingManager::PACKED_COEFFICIENT_COUNT). */
62
- }];
63
- SH_COEFFICIENT_COUNT = 7;
64
- constructor() {
65
- super(_IEveSpaceObject2Pare), _initClass();
66
- }
67
- }();
56
+ /** Carbon's packed spherical-harmonic coefficient count
57
+ * (Tr2ShLightingManager::PACKED_COEFFICIENT_COUNT). */
58
+ static SH_COEFFICIENT_COUNT = 7;
59
+ }
68
60
 
69
- export { _IEveSpaceObject2Pare as IEveSpaceObject2ParentData };
61
+ export { IEveSpaceObject2ParentData };
70
62
  //# sourceMappingURL=IEveSpaceObject2ParentData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IEveSpaceObject2ParentData.js","sources":["../../../../../src/trinity/eve/spaceObject/IEveSpaceObject2ParentData.js"],"sourcesContent":["// Source: trinity/trinity/Eve/IEveSpaceObject2.h (IEveSpaceObject2::ParentData)\r\n// Hand-maintained. Carbon nests this struct inside the IEveSpaceObject2\r\n// interface; the JS identity concatenates owner and inner name\r\n// (IEveSpaceObject2 + ParentData) because a bare inner name is not unique\r\n// across the corpus - fifteen inner names are claimed by several owners and\r\n// thirteen collide with a top-level class.\r\nimport { CjsModel } from \"#model\";\r\nimport { mat4 } from \"#math/mat4\";\r\nimport { type } from \"#schema\";\r\nimport { vec3 } from \"#math/vec3\";\r\nimport { vec4 } from \"#math/vec4\";\r\n\r\n\r\n/** The per-frame parent state a space object hands to its attachments. */\r\n@type.define({ className: \"IEveSpaceObject2ParentData\", family: \"eve/spaceObject\" })\r\nexport class IEveSpaceObject2ParentData extends CjsModel\r\n{\r\n\r\n /** transform (Matrix) - the parent's world transform. */\r\n @type.mat4\r\n transform = mat4.create();\r\n\r\n /** killCount (uint32_t) - EveSpaceObject2::GetParentData never assigns it,\r\n * so it stays zero through that path (EveSpaceObject2.cpp:1874). */\r\n @type.uint32\r\n killCount = 0;\r\n\r\n /** shipData (Vector4) - m_spaceObjectShipData. */\r\n @type.vec4\r\n shipData = vec4.create();\r\n\r\n /** clipSphereCenter (Vector3). */\r\n @type.vec3\r\n clipSphereCenter = vec3.create();\r\n\r\n /** clipRadiusSq (float). */\r\n @type.float32\r\n clipRadiusSq = 0;\r\n\r\n /** clipRadius2Sq (float). */\r\n @type.float32\r\n clipRadius2Sq = 0;\r\n\r\n /** clipFactor (float) - the parent's clipSphereFactor. */\r\n @type.float32\r\n clipFactor = 0;\r\n\r\n /** clipFactor2 (float) - the parent's clipSphereFactor2. */\r\n @type.float32\r\n clipFactor2 = 0;\r\n\r\n /** customData (Vector4). */\r\n @type.vec4\r\n customData = vec4.create();\r\n\r\n /**\r\n * shLighting (const Vector4*) - Carbon borrows a pointer to the parent's\r\n * seven packed spherical-harmonic coefficients and copies them at fill time,\r\n * zeroing when the pointer is null (EveSpaceObjectDecal.cpp:376-383). The\r\n * port holds the parent's array by reference with the same null contract; it\r\n * is runtime state, so it carries no persistence.\r\n */\r\n shLighting = null;\r\n\r\n /** Carbon's packed spherical-harmonic coefficient count\r\n * (Tr2ShLightingManager::PACKED_COEFFICIENT_COUNT). */\r\n static SH_COEFFICIENT_COUNT = 7;\r\n\r\n}\r\n"],"names":["_IEveSpaceObject2Pare","_identity","IEveSpaceObject2ParentData","CjsModel","e","_init_transform","_init_extra_transform","_init_killCount","_init_extra_killCount","_init_shipData","_init_extra_shipData","_init_clipSphereCenter","_init_extra_clipSphereCenter","_init_clipRadiusSq","_init_extra_clipRadiusSq","_init_clipRadius2Sq","_init_extra_clipRadius2Sq","_init_clipFactor","_init_extra_clipFactor","_init_clipFactor2","_init_extra_clipFactor2","_init_customData","_init_extra_customData","c","_initClass","_applyDecs","type","define","className","family","mat4","uint32","vec4","vec3","float32","transform","create","killCount","shipData","clipSphereCenter","clipRadiusSq","clipRadius2Sq","clipFactor","clipFactor2","customData","shLighting","SH_COEFFICIENT_COUNT","constructor"],"mappings":"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"}
1
+ {"version":3,"file":"IEveSpaceObject2ParentData.js","sources":["../../../../../src/trinity/eve/spaceObject/IEveSpaceObject2ParentData.js"],"sourcesContent":["// Source: trinity/trinity/Eve/IEveSpaceObject2.h (IEveSpaceObject2::ParentData)\n// Hand-maintained. Carbon nests this struct inside the IEveSpaceObject2\n// interface; the JS identity concatenates owner and inner name\n// (IEveSpaceObject2 + ParentData) because a bare inner name is not unique\n// across the corpus - fifteen inner names are claimed by several owners and\n// thirteen collide with a top-level class.\n//\n// A plain class, not a model: it is internal per-frame data, filled by the\n// owner's update pass (GetParentData) and copied member by member by the\n// consumer, exactly as Carbon passes and copies the struct. Nothing hydrates\n// it or edits it from a UI; if something ever needs to, compose values onto\n// it rather than giving it the model base.\nimport { mat4 } from \"#math/mat4\";\nimport { vec3 } from \"#math/vec3\";\nimport { vec4 } from \"#math/vec4\";\n\n\n/** The per-frame parent state a space object hands to its attachments. */\nexport class IEveSpaceObject2ParentData\n{\n\n /** transform (Matrix) - the parent's world transform. */\n transform = mat4.create();\n\n /** killCount (uint32_t) - EveSpaceObject2::GetParentData never assigns it,\n * so it stays zero through that path (EveSpaceObject2.cpp:1874). */\n killCount = 0;\n\n /** shipData (Vector4) - m_spaceObjectShipData. */\n shipData = vec4.create();\n\n /** clipSphereCenter (Vector3). */\n clipSphereCenter = vec3.create();\n\n /** clipRadiusSq (float). */\n clipRadiusSq = 0;\n\n /** clipRadius2Sq (float). */\n clipRadius2Sq = 0;\n\n /** clipFactor (float) - the parent's clipSphereFactor. */\n clipFactor = 0;\n\n /** clipFactor2 (float) - the parent's clipSphereFactor2. */\n clipFactor2 = 0;\n\n /** customData (Vector4). */\n customData = vec4.create();\n\n /**\n * shLighting (const Vector4*) - Carbon borrows a pointer to the parent's\n * seven packed spherical-harmonic coefficients and copies them at fill time,\n * zeroing when the pointer is null (EveSpaceObjectDecal.cpp:376-383). The\n * port holds the parent's array by reference with the same null contract.\n */\n shLighting = null;\n\n /** Carbon's packed spherical-harmonic coefficient count\n * (Tr2ShLightingManager::PACKED_COEFFICIENT_COUNT). */\n static SH_COEFFICIENT_COUNT = 7;\n\n}\n"],"names":["IEveSpaceObject2ParentData","transform","mat4","create","killCount","shipData","vec4","clipSphereCenter","vec3","clipRadiusSq","clipRadius2Sq","clipFactor","clipFactor2","customData","shLighting","SH_COEFFICIENT_COUNT"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACO,MAAMA,0BAA0B,CACvC;AAEE;AACAC,EAAAA,SAAS,GAAGC,IAAI,CAACC,MAAM,EAAE;;AAEzB;AACF;AACEC,EAAAA,SAAS,GAAG,CAAC;;AAEb;AACAC,EAAAA,QAAQ,GAAGC,IAAI,CAACH,MAAM,EAAE;;AAExB;AACAI,EAAAA,gBAAgB,GAAGC,IAAI,CAACL,MAAM,EAAE;;AAEhC;AACAM,EAAAA,YAAY,GAAG,CAAC;;AAEhB;AACAC,EAAAA,aAAa,GAAG,CAAC;;AAEjB;AACAC,EAAAA,UAAU,GAAG,CAAC;;AAEd;AACAC,EAAAA,WAAW,GAAG,CAAC;;AAEf;AACAC,EAAAA,UAAU,GAAGP,IAAI,CAACH,MAAM,EAAE;;AAE1B;AACF;AACA;AACA;AACA;AACA;AACEW,EAAAA,UAAU,GAAG,IAAI;;AAEjB;AACF;EACE,OAAOC,oBAAoB,GAAG,CAAC;AAEjC;;;;"}
@@ -1,7 +1,7 @@
1
1
  # Resource lifecycle
2
2
 
3
3
  Status: Evolving
4
- Scope: `@carbonenginejs/runtime/resource`
4
+ Scope: `@carbonenginejs/runtime/resource`
5
5
  Audience: Users and integrators
6
6
  Summary: Explains resource states, the load/prepare split, and how a resource request flows from path to published CPU payload.
7
7
 
@@ -34,7 +34,7 @@ keeps; see [architecture](../architecture.md).
34
34
  ## CarbonEngineJS states
35
35
 
36
36
  ```text
37
- EMPTY -> REQUESTED/LOADING -> LOADED (resource layer)
37
+ EMPTY -> REQUESTED/LOADING -> LOADED (resource layer)
38
38
  LOADED -> PREPARING -> PREPARED (engine adapters)
39
39
  ```
40
40
 
@@ -56,8 +56,10 @@ LOADED -> PREPARING -> PREPARED (engine adapters)
56
56
  per source/path and limits active source operations with
57
57
  `maxConcurrentLoads`. After bytes arrive, object construction is split into
58
58
  separate main-queue items (`reader/format conversion -> publish`). Publication
59
- moves the resource to `LOADED`, then stops. ResMan never performs backend
60
- realization or marks the resource `PREPARED`/`GOOD`. See
59
+ moves the resource to `PREPARED`: the published value is already the reader or
60
+ converter outcome, so no CPU preparation remains. ResMan never performs backend
61
+ realization. A route that hydrates a `Target` builds a new object for each
62
+ caller from the retained decoded values, as Carbon's `LoadObject` does. See
61
63
  [reference/queues.md](../reference/queues.md) for the queue contract and
62
64
  [reference/motherlode-cache.md](../reference/motherlode-cache.md) for
63
65
  identity, retention, and release behavior.
@@ -212,10 +214,10 @@ device memory are different budgets. Retention therefore distinguishes:
212
214
  typed arrays;
213
215
  - adapter payload: WebGL/WebGPU textures, buffers, shader modules, pipelines.
214
216
 
215
- Identity and lightweight metadata remain resident while CPU and adapter
216
- payloads release independently. Engine adapters own adapter-resource destruction;
217
- the resource layer supplies lifecycle hooks and opaque adapter slots. See
218
- [reference/motherlode-cache.md](../reference/motherlode-cache.md).
217
+ Identity and lightweight metadata remain resident while CPU and adapter
218
+ payloads release independently. Engine adapters own adapter-resource destruction;
219
+ the resource layer supplies lifecycle hooks and opaque adapter slots. See
220
+ [reference/motherlode-cache.md](../reference/motherlode-cache.md).
219
221
 
220
222
  ## Related documentation
221
223
 
@@ -25,6 +25,51 @@ particular, it does not require normalized skin-weight sums or finite mesh
25
25
  bounds and UV densities. Destination writers may impose stricter requirements
26
26
  when their target format needs them.
27
27
 
28
+ ## glTF import contract
29
+
30
+ `CjsGltfFormat` defaults to `emit: "shared"`; `emit: "cmf"` uses the same
31
+ canonical CMF builder. JSON and `gltfJson` are explicit projections, not the
32
+ conversion boundary.
33
+
34
+ - **Vertex channels:** glTF `TANGENT` is XYZ plus handedness, not an EVE packed
35
+ tangent frame. Import produces separate tangent and binormal vectors from
36
+ the matching normal and handedness; a tangent without a matching normal channel is
37
+ rejected. Invalid direction vectors use the exporter's fixed fallbacks.
38
+ Indexed UV/color channels retain their usage indices and three/four-component
39
+ color width. Optional tangent packing is applied independently to every LOD.
40
+ - **Skinning:** `JOINTS_0` stays relative to the mesh's palette. Positive-weight
41
+ indices must address that palette; zero-weight indices become zero. Skins
42
+ sharing `skin.skeleton` share the full skeleton, including unused bones;
43
+ skins without it remain separate. `inverseBindMatrices` must be FLOAT MAT4,
44
+ one per joint, and map by joint-node identity without transpose. Conflicting
45
+ matrices for a shared bone reject; an absent accessor means identity.
46
+ - **Morphs:** CMF buffers are absolute. Deltas are added to each LOD's own base;
47
+ omitted components copy that base, and authored absolute targets stay
48
+ absolute. Non-empty morph declarations include Position and are subsets of
49
+ the base declaration. Displacement is measured against the base and aggregated
50
+ across LODs. Weight animations become scalar MorphTarget channels:
51
+ `FooShape` maps to `Foo`. Carbon's exporter omits original target names, so
52
+ unnamed exported targets become `target_n`, not reconstructed original names.
53
+ - **Animation:** missing TRS channels stay absent. Explicit one-key identity
54
+ channels retain `preserveIdentity`, since they may override a non-identity
55
+ rest pose. Track groups follow shared skeleton identity rather than duplicating
56
+ channels per mesh. Matrix decomposition is checked by recomposition; rotation
57
+ and reflected scale survive, but shear is rejected.
58
+ - **Scene and LOD:** when scenes exist, import uses mesh nodes reachable from
59
+ the default scene and reconstructs lower LODs through `MSFT_lod.ids`.
60
+ Coverage `[c0, c1, ..., sentinel]` becomes thresholds
61
+ `[0xffffffff, round(c0 * 2048), round(c1 * 2048), ...]`, strictly descending;
62
+ the sentinel creates no LOD. Export-clamped thresholds above 2048 are not
63
+ recoverable. LODs must agree on topology, declaration, material-area count,
64
+ joint palette, and morph declarations/names.
65
+ - **Topology:** non-indexed POINTS become PointList without an index buffer;
66
+ strips and fans are triangulated. CMF construction fills UV densities through
67
+ the highest TexCoord usage index, leaving missing usage indices zero.
68
+
69
+ Carbon's exporter loses source declarations, packed-frame storage, bounds,
70
+ metadata, morph names and some LOD information. Round trips are comparisons of
71
+ representable geometry/animation semantics, not byte-exact recovery.
72
+
28
73
  ## FBX compatibility modes
29
74
 
30
75
  FBX reads accept `compatibility: "source" | "carbon"`. The default is
@@ -94,6 +139,11 @@ subdivision limit, not silent reinterpretation of cubic controls.
94
139
 
95
140
  The following inputs remain hard errors rather than lossy conversions:
96
141
 
142
+ - glTF `JOINTS_n`/`WEIGHTS_n` above zero, pending an explicit influence-reduction
143
+ policy;
144
+ - indexed glTF POINTS, pending coordinated unindexing of base and morph channels;
145
+ - non-identity glTF mesh-node transforms, pending a complete bake through
146
+ geometry, morphs, bounds, directions and skinning;
97
147
  - multiple or weighted FBX animation layers and FBX cubic tangent semantics;
98
148
  Carbon delegates these to `ufbx_bake_anim`, and the runtime has no equivalent
99
149
  evaluator;