@automovie/ingest 0.3.3 → 0.4.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 (225) hide show
  1. package/README.md +9 -29
  2. package/lib/AUTOMOVIE_GLTF_MOTION_INTERPRETATION_PROFILE.d.ts +4 -1
  3. package/lib/AUTOMOVIE_GLTF_MOTION_INTERPRETATION_PROFILE.js +4 -1
  4. package/lib/AUTOMOVIE_GLTF_MOTION_INTERPRETATION_PROFILE.js.map +1 -1
  5. package/lib/AUTO_MOVIE_EXTERNAL_MODEL_INGEST_PROFILES.d.ts +4 -1
  6. package/lib/AUTO_MOVIE_EXTERNAL_MODEL_INGEST_PROFILES.js +4 -1
  7. package/lib/AUTO_MOVIE_EXTERNAL_MODEL_INGEST_PROFILES.js.map +1 -1
  8. package/lib/adoptAutoMovieExternalMotion.d.ts +21 -11
  9. package/lib/adoptAutoMovieExternalMotion.js +26 -12
  10. package/lib/adoptAutoMovieExternalMotion.js.map +1 -1
  11. package/lib/audio/admitProductionTtsReceipt.d.ts +25 -0
  12. package/lib/audio/admitProductionTtsReceipt.js +166 -0
  13. package/lib/audio/admitProductionTtsReceipt.js.map +1 -0
  14. package/lib/audio/decodeProductionAudioAsset.d.ts +42 -14
  15. package/lib/audio/decodeProductionAudioAsset.js +53 -30
  16. package/lib/audio/decodeProductionAudioAsset.js.map +1 -1
  17. package/lib/audio/index.d.ts +1 -0
  18. package/lib/audio/index.js +1 -0
  19. package/lib/audio/index.js.map +1 -1
  20. package/lib/audio/resampleProductionAudio.d.ts +22 -0
  21. package/lib/audio/resampleProductionAudio.js +103 -0
  22. package/lib/audio/resampleProductionAudio.js.map +1 -0
  23. package/lib/decodeAutoMoviePpmImage.d.ts +10 -18
  24. package/lib/decodeAutoMoviePpmImage.js +10 -18
  25. package/lib/decodeAutoMoviePpmImage.js.map +1 -1
  26. package/lib/font/TrueTypeByteReader.d.ts +34 -0
  27. package/lib/font/TrueTypeByteReader.js +67 -0
  28. package/lib/font/TrueTypeByteReader.js.map +1 -0
  29. package/lib/font/decodeAutoMovieTrueTypeFont.d.ts +31 -0
  30. package/lib/font/decodeAutoMovieTrueTypeFont.js +168 -0
  31. package/lib/font/decodeAutoMovieTrueTypeFont.js.map +1 -0
  32. package/lib/font/index.d.ts +1 -0
  33. package/lib/font/index.js +18 -0
  34. package/lib/font/index.js.map +1 -0
  35. package/lib/font/readTrueTypeCharacterMap.d.ts +23 -0
  36. package/lib/font/readTrueTypeCharacterMap.js +98 -0
  37. package/lib/font/readTrueTypeCharacterMap.js.map +1 -0
  38. package/lib/font/readTrueTypeGlyphOutline.d.ts +45 -0
  39. package/lib/font/readTrueTypeGlyphOutline.js +275 -0
  40. package/lib/font/readTrueTypeGlyphOutline.js.map +1 -0
  41. package/lib/font/readTrueTypeKerning.d.ts +19 -0
  42. package/lib/font/readTrueTypeKerning.js +63 -0
  43. package/lib/font/readTrueTypeKerning.js.map +1 -0
  44. package/lib/font/readTrueTypeNames.d.ts +20 -0
  45. package/lib/font/readTrueTypeNames.js +75 -0
  46. package/lib/font/readTrueTypeNames.js.map +1 -0
  47. package/lib/humanoidSkeleton.d.ts +28 -15
  48. package/lib/humanoidSkeleton.js +28 -15
  49. package/lib/humanoidSkeleton.js.map +1 -1
  50. package/lib/index.d.ts +1 -0
  51. package/lib/index.js +1 -0
  52. package/lib/index.js.map +1 -1
  53. package/lib/ingestDocument.d.ts +25 -12
  54. package/lib/ingestDocument.js +25 -12
  55. package/lib/ingestDocument.js.map +1 -1
  56. package/lib/inspectAutoMovieExternalModelBytes.d.ts +24 -12
  57. package/lib/inspectAutoMovieExternalModelBytes.js +24 -12
  58. package/lib/inspectAutoMovieExternalModelBytes.js.map +1 -1
  59. package/lib/internal/IAccessorSource.d.ts +11 -8
  60. package/lib/internal/IExternalModelAccessorReader.d.ts +1 -8
  61. package/lib/internal/IHumanoidSlot.d.ts +9 -10
  62. package/lib/internal/IParsedContainer.d.ts +10 -8
  63. package/lib/internal/SHAPE_COMPONENTS.d.ts +4 -1
  64. package/lib/internal/SHAPE_COMPONENTS.js +4 -1
  65. package/lib/internal/SHAPE_COMPONENTS.js.map +1 -1
  66. package/lib/internal/accessorElementByteLength.d.ts +1 -11
  67. package/lib/internal/accessorElementByteLength.js +1 -11
  68. package/lib/internal/accessorElementByteLength.js.map +1 -1
  69. package/lib/internal/accessorReader.d.ts +5 -9
  70. package/lib/internal/accessorReader.js +5 -9
  71. package/lib/internal/accessorReader.js.map +1 -1
  72. package/lib/internal/accessorValues.d.ts +10 -10
  73. package/lib/internal/accessorValues.js +10 -10
  74. package/lib/internal/collectExternalResources.d.ts +1 -11
  75. package/lib/internal/collectExternalResources.js +1 -11
  76. package/lib/internal/collectExternalResources.js.map +1 -1
  77. package/lib/internal/compareCodeUnits.d.ts +1 -11
  78. package/lib/internal/compareCodeUnits.js +1 -11
  79. package/lib/internal/compareCodeUnits.js.map +1 -1
  80. package/lib/internal/composeLocalTransform.d.ts +13 -10
  81. package/lib/internal/composeLocalTransform.js +13 -10
  82. package/lib/internal/composeLocalTransform.js.map +1 -1
  83. package/lib/internal/decodeDataUri.d.ts +4 -9
  84. package/lib/internal/decodeDataUri.js +4 -9
  85. package/lib/internal/decodeDataUri.js.map +1 -1
  86. package/lib/internal/decodeGlb.d.ts +1 -11
  87. package/lib/internal/decodeGlb.js +1 -11
  88. package/lib/internal/decodeGlb.js.map +1 -1
  89. package/lib/internal/decodeJson.d.ts +1 -11
  90. package/lib/internal/decodeJson.js +10 -12
  91. package/lib/internal/decodeJson.js.map +1 -1
  92. package/lib/internal/fileExtension.d.ts +2 -9
  93. package/lib/internal/fileExtension.js +2 -9
  94. package/lib/internal/fileExtension.js.map +1 -1
  95. package/lib/internal/finiteTuple.d.ts +4 -9
  96. package/lib/internal/finiteTuple.js +4 -9
  97. package/lib/internal/finiteTuple.js.map +1 -1
  98. package/lib/internal/gltfHumanoidBones.d.ts +5 -9
  99. package/lib/internal/gltfHumanoidBones.js +5 -9
  100. package/lib/internal/gltfHumanoidBones.js.map +1 -1
  101. package/lib/internal/humanoidBoneOfName.d.ts +7 -9
  102. package/lib/internal/humanoidBoneOfName.js +7 -9
  103. package/lib/internal/humanoidBoneOfName.js.map +1 -1
  104. package/lib/internal/inspectExternalModelHierarchy.d.ts +1 -11
  105. package/lib/internal/inspectExternalModelHierarchy.js +1 -11
  106. package/lib/internal/inspectExternalModelHierarchy.js.map +1 -1
  107. package/lib/internal/inspectExternalMotion.d.ts +8 -9
  108. package/lib/internal/inspectExternalMotion.js +8 -9
  109. package/lib/internal/inspectExternalMotion.js.map +1 -1
  110. package/lib/internal/inspectExternalMotionNodes.d.ts +6 -9
  111. package/lib/internal/inspectExternalMotionNodes.js +6 -9
  112. package/lib/internal/inspectExternalMotionNodes.js.map +1 -1
  113. package/lib/internal/integerIndex.d.ts +1 -11
  114. package/lib/internal/integerIndex.js +1 -11
  115. package/lib/internal/integerIndex.js.map +1 -1
  116. package/lib/internal/integerIndices.d.ts +1 -11
  117. package/lib/internal/integerIndices.js +1 -11
  118. package/lib/internal/integerIndices.js.map +1 -1
  119. package/lib/internal/nonNegativeInteger.d.ts +1 -11
  120. package/lib/internal/nonNegativeInteger.js +1 -11
  121. package/lib/internal/nonNegativeInteger.js.map +1 -1
  122. package/lib/internal/object.d.ts +1 -11
  123. package/lib/internal/object.js +1 -11
  124. package/lib/internal/object.js.map +1 -1
  125. package/lib/internal/optionalArray.d.ts +1 -11
  126. package/lib/internal/optionalArray.js +1 -11
  127. package/lib/internal/optionalArray.js.map +1 -1
  128. package/lib/internal/optionalObject.d.ts +1 -11
  129. package/lib/internal/optionalObject.js +1 -11
  130. package/lib/internal/optionalObject.js.map +1 -1
  131. package/lib/internal/optionalStringArray.d.ts +1 -11
  132. package/lib/internal/optionalStringArray.js +1 -11
  133. package/lib/internal/optionalStringArray.js.map +1 -1
  134. package/lib/internal/positiveInteger.d.ts +1 -11
  135. package/lib/internal/positiveInteger.js +1 -11
  136. package/lib/internal/positiveInteger.js.map +1 -1
  137. package/lib/internal/readMotionAccessor.d.ts +5 -9
  138. package/lib/internal/readMotionAccessor.js +5 -9
  139. package/lib/internal/readMotionAccessor.js.map +1 -1
  140. package/lib/internal/requiredArray.d.ts +1 -11
  141. package/lib/internal/requiredArray.js +1 -11
  142. package/lib/internal/requiredArray.js.map +1 -1
  143. package/lib/internal/uniqueStrings.d.ts +1 -11
  144. package/lib/internal/uniqueStrings.js +1 -11
  145. package/lib/internal/uniqueStrings.js.map +1 -1
  146. package/lib/internal/validNodeIndex.d.ts +1 -11
  147. package/lib/internal/validNodeIndex.js +1 -11
  148. package/lib/internal/validNodeIndex.js.map +1 -1
  149. package/lib/internal/validateAccessorRange.d.ts +6 -9
  150. package/lib/internal/validateAccessorRange.js +6 -9
  151. package/lib/internal/validateAccessorRange.js.map +1 -1
  152. package/lib/internal/validateHumanoidSkinning.d.ts +8 -10
  153. package/lib/internal/validateHumanoidSkinning.js +8 -10
  154. package/lib/internal/validateHumanoidSkinning.js.map +1 -1
  155. package/lib/internal/validatePayloadClosure.d.ts +8 -9
  156. package/lib/internal/validatePayloadClosure.js +8 -9
  157. package/lib/internal/validatePayloadClosure.js.map +1 -1
  158. package/lib/internal/validateSparseAccessor.d.ts +6 -9
  159. package/lib/internal/validateSparseAccessor.js +6 -9
  160. package/lib/internal/validateSparseAccessor.js.map +1 -1
  161. package/lib/internal/vrmHumanoidBones.d.ts +7 -9
  162. package/lib/internal/vrmHumanoidBones.js +12 -10
  163. package/lib/internal/vrmHumanoidBones.js.map +1 -1
  164. package/lib/isAutoMovieExternalModelIngestProfile.d.ts +4 -10
  165. package/lib/isAutoMovieExternalModelIngestProfile.js +4 -10
  166. package/lib/isAutoMovieExternalModelIngestProfile.js.map +1 -1
  167. package/package.json +7 -7
  168. package/src/AUTOMOVIE_GLTF_MOTION_INTERPRETATION_PROFILE.ts +4 -1
  169. package/src/AUTO_MOVIE_EXTERNAL_MODEL_INGEST_PROFILES.ts +4 -1
  170. package/src/adoptAutoMovieExternalMotion.ts +26 -12
  171. package/src/audio/admitProductionTtsReceipt.ts +262 -0
  172. package/src/audio/decodeProductionAudioAsset.ts +54 -39
  173. package/src/audio/index.ts +1 -0
  174. package/src/audio/resampleProductionAudio.ts +114 -0
  175. package/src/decodeAutoMoviePpmImage.ts +10 -18
  176. package/src/font/TrueTypeByteReader.ts +80 -0
  177. package/src/font/decodeAutoMovieTrueTypeFont.ts +217 -0
  178. package/src/font/index.ts +1 -0
  179. package/src/font/readTrueTypeCharacterMap.ts +115 -0
  180. package/src/font/readTrueTypeGlyphOutline.ts +375 -0
  181. package/src/font/readTrueTypeKerning.ts +73 -0
  182. package/src/font/readTrueTypeNames.ts +74 -0
  183. package/src/humanoidSkeleton.ts +28 -15
  184. package/src/index.ts +1 -0
  185. package/src/ingestDocument.ts +25 -12
  186. package/src/inspectAutoMovieExternalModelBytes.ts +24 -12
  187. package/src/internal/IAccessorSource.ts +11 -8
  188. package/src/internal/IExternalModelAccessorReader.ts +1 -8
  189. package/src/internal/IHumanoidSlot.ts +9 -10
  190. package/src/internal/IParsedContainer.ts +10 -8
  191. package/src/internal/SHAPE_COMPONENTS.ts +4 -1
  192. package/src/internal/accessorElementByteLength.ts +1 -11
  193. package/src/internal/accessorReader.ts +5 -9
  194. package/src/internal/accessorValues.ts +10 -10
  195. package/src/internal/collectExternalResources.ts +1 -11
  196. package/src/internal/compareCodeUnits.ts +1 -11
  197. package/src/internal/composeLocalTransform.ts +13 -10
  198. package/src/internal/decodeDataUri.ts +4 -9
  199. package/src/internal/decodeGlb.ts +1 -11
  200. package/src/internal/decodeJson.ts +10 -12
  201. package/src/internal/fileExtension.ts +2 -9
  202. package/src/internal/finiteTuple.ts +4 -9
  203. package/src/internal/gltfHumanoidBones.ts +5 -9
  204. package/src/internal/humanoidBoneOfName.ts +7 -9
  205. package/src/internal/inspectExternalModelHierarchy.ts +1 -11
  206. package/src/internal/inspectExternalMotion.ts +8 -9
  207. package/src/internal/inspectExternalMotionNodes.ts +6 -9
  208. package/src/internal/integerIndex.ts +1 -11
  209. package/src/internal/integerIndices.ts +1 -11
  210. package/src/internal/nonNegativeInteger.ts +1 -11
  211. package/src/internal/object.ts +1 -11
  212. package/src/internal/optionalArray.ts +1 -11
  213. package/src/internal/optionalObject.ts +1 -11
  214. package/src/internal/optionalStringArray.ts +1 -11
  215. package/src/internal/positiveInteger.ts +1 -11
  216. package/src/internal/readMotionAccessor.ts +5 -9
  217. package/src/internal/requiredArray.ts +1 -11
  218. package/src/internal/uniqueStrings.ts +1 -11
  219. package/src/internal/validNodeIndex.ts +1 -11
  220. package/src/internal/validateAccessorRange.ts +6 -9
  221. package/src/internal/validateHumanoidSkinning.ts +8 -10
  222. package/src/internal/validatePayloadClosure.ts +8 -9
  223. package/src/internal/validateSparseAccessor.ts +6 -9
  224. package/src/internal/vrmHumanoidBones.ts +12 -10
  225. package/src/isAutoMovieExternalModelIngestProfile.ts +4 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readTrueTypeGlyphOutline.js","sourceRoot":"","sources":["../../src/font/readTrueTypeGlyphOutline.ts"],"names":[],"mappings":";;;AAOA;;;GAGG;AACH,MAAM,mBAAmB,GAAW,EAAE,CAAC;AAEvC;;;GAGG;AACH,MAAM,qBAAqB,GAAW,MAAM,CAAC;AAE7C,gFAAgF;AAChF,MAAM,kBAAkB,GAAW,MAAM,CAAC;AAE1C,uEAAuE;AACvE,MAAM,eAAe,GAAW,MAAM,CAAC;AAEvC,0DAA0D;AAC1D,MAAM,eAAe,GAAW,MAAM,CAAC;AAEvC,iEAAiE;AACjE,MAAM,wBAAwB,GAAW,MAAM,CAAC;AAEhD,+DAA+D;AAC/D,MAAM,oBAAoB,GAAW,MAAM,CAAC;AAE5C,yEAAyE;AACzE,MAAM,uBAAuB,GAAW,MAAM,CAAC;AAE/C,6EAA6E;AAC7E,MAAM,yBAAyB,GAAW,MAAM,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,kCAAyC,K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table's format 0 subtables, by
4
+ * glyph index (ISO/IEC 14496-22, section 5.7.4).
5
+ *
6
+ * Only subtables that kern horizontally and hold kerning values, not minimum
7
+ * values or cross-stream adjustments, contribute, since those are what advance
8
+ * glyphs along a line. Their values add across subtables, as the format
9
+ * specifies, unless a subtable's override bit replaces the accumulated value.
10
+ * Subtables of other formats are skipped by their declared length.
11
+ *
12
+ * @param reader Bounds-checked reader over the font bytes.
13
+ * @param offset Byte offset of the `kern` table.
14
+ * @returns Adjustment in font units keyed by `left * 65536 + right` glyph
15
+ * indices. An Apple-format table, whose 32-bit version is 1.0, contributes no
16
+ * pairs.
17
+ * @throws {Error} A field lies outside the bytes.
18
+ */
19
+ export declare function readTrueTypeKerning(reader: TrueTypeByteReader, offset: number): Map<number, number>;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readTrueTypeKerning = readTrueTypeKerning;
4
+ /**
5
+ * `kern` subtable coverage bit 0 (ISO/IEC 14496-22, section 5.7.4): set when
6
+ * the subtable holds horizontal data, clear for vertical.
7
+ */
8
+ const HORIZONTAL = 0x01;
9
+ /** Coverage bit 1: set when the subtable holds minimum values, not kerning. */
10
+ const MINIMUM = 0x02;
11
+ /** Coverage bit 2: set when the kerning is perpendicular to the text flow. */
12
+ const CROSS_STREAM = 0x04;
13
+ /**
14
+ * Coverage bit 3: set when the subtable's value replaces the value accumulated
15
+ * so far rather than adding to it.
16
+ */
17
+ const OVERRIDE = 0x08;
18
+ /**
19
+ * Read the horizontal kerning pairs of a `kern` table's format 0 subtables, by
20
+ * glyph index (ISO/IEC 14496-22, section 5.7.4).
21
+ *
22
+ * Only subtables that kern horizontally and hold kerning values, not minimum
23
+ * values or cross-stream adjustments, contribute, since those are what advance
24
+ * glyphs along a line. Their values add across subtables, as the format
25
+ * specifies, unless a subtable's override bit replaces the accumulated value.
26
+ * Subtables of other formats are skipped by their declared length.
27
+ *
28
+ * @param reader Bounds-checked reader over the font bytes.
29
+ * @param offset Byte offset of the `kern` table.
30
+ * @returns Adjustment in font units keyed by `left * 65536 + right` glyph
31
+ * indices. An Apple-format table, whose 32-bit version is 1.0, contributes no
32
+ * pairs.
33
+ * @throws {Error} A field lies outside the bytes.
34
+ */
35
+ function readTrueTypeKerning(reader, offset) {
36
+ // The Apple-format table (a 32-bit version 1.0) is not the OpenType one and
37
+ // contributes no pairs, like a font without kerning.
38
+ if (reader.u16(offset, "kern header") !== 0)
39
+ return new Map();
40
+ const tables = reader.u16(offset + 2, "kern header");
41
+ const pairs = new Map();
42
+ let cursor = offset + 4;
43
+ for (let table = 0; table < tables; ++table) {
44
+ const length = reader.u16(cursor + 2, "kern subtable header");
45
+ const coverage = reader.u16(cursor + 4, "kern subtable header");
46
+ reader.require(cursor, length, "kern subtable");
47
+ if (coverage >> 8 === 0 &&
48
+ (coverage & HORIZONTAL) !== 0 &&
49
+ (coverage & (MINIMUM | CROSS_STREAM)) === 0) {
50
+ const count = reader.u16(cursor + 6, "kern format 0 header");
51
+ reader.require(cursor + 14, count * 6, "kern format 0 pairs");
52
+ for (let pair = 0; pair < count; ++pair) {
53
+ const at = cursor + 14 + pair * 6;
54
+ const key = reader.u16(at, "kern pair") * 65536 + reader.u16(at + 2, "kern pair");
55
+ const value = reader.i16(at + 4, "kern pair");
56
+ pairs.set(key, (coverage & OVERRIDE) !== 0 ? value : (pairs.get(key) ?? 0) + value);
57
+ }
58
+ }
59
+ cursor += length;
60
+ }
61
+ return pairs;
62
+ }
63
+ //# sourceMappingURL=readTrueTypeKerning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readTrueTypeKerning.js","sourceRoot":"","sources":["../../src/font/readTrueTypeKerning.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAM,UAAU,GAAW,IAAI,CAAC;AAEhC,+EAA+E;AAC/E,MAAM,OAAO,GAAW,IAAI,CAAC;AAE7B,8EAA8E;AAC9E,MAAM,YAAY,GAAW,IAAI,CAAC;AAElC;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AI,EAAE,CAAC;gBAChD,MAAM,EAAE,GAAW,MAAM,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC;gBAC1C,MAAM,GAAG,GACP,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,WAAW,CAAC,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC;gBACxE,MAAM,KAAK,GAAW,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC;gBACtD,KAAK,CAAC,GAAG,CACP,GAAG,EACH,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CACpE,CAAC;YACJ,CAAC;QACH,CAAC;QACD,MAAM,IAAI,MAAM,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { IAutoMovieFont } from "@automovie/interface";
2
+ import type { TrueTypeByteReader } from "./TrueTypeByteReader";
3
+ /**
4
+ * Read name IDs 1 (family), 13 (licence description) and 14 (licence URL) from
5
+ * a `name` table (ISO/IEC 14496-22, section 5.2.6).
6
+ *
7
+ * For each ID the Windows Unicode record in US English (platform 3, encoding 1
8
+ * or 10, language 0x0409) is preferred, then any Windows Unicode record, then a
9
+ * Unicode-platform record (platform 0); all three are UTF-16BE. A Macintosh
10
+ * Roman record (platform 1, encoding 0) is used last, and only when every byte
11
+ * is ASCII, because Mac Roman differs from Latin-1 above 0x7F and a guessed
12
+ * decoding would misstate a licence. Records are only described here; no rights
13
+ * are judged.
14
+ *
15
+ * @param reader Bounds-checked reader over the font bytes.
16
+ * @param offset Byte offset of the `name` table.
17
+ * @returns The three names, each `null` when no usable record carries it.
18
+ * @throws {Error} A record or its string lies outside the bytes.
19
+ */
20
+ export declare function readTrueTypeNames(reader: TrueTypeByteReader, offset: number): IAutoMovieFont["names"];
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readTrueTypeNames = readTrueTypeNames;
4
+ /**
5
+ * Read name IDs 1 (family), 13 (licence description) and 14 (licence URL) from
6
+ * a `name` table (ISO/IEC 14496-22, section 5.2.6).
7
+ *
8
+ * For each ID the Windows Unicode record in US English (platform 3, encoding 1
9
+ * or 10, language 0x0409) is preferred, then any Windows Unicode record, then a
10
+ * Unicode-platform record (platform 0); all three are UTF-16BE. A Macintosh
11
+ * Roman record (platform 1, encoding 0) is used last, and only when every byte
12
+ * is ASCII, because Mac Roman differs from Latin-1 above 0x7F and a guessed
13
+ * decoding would misstate a licence. Records are only described here; no rights
14
+ * are judged.
15
+ *
16
+ * @param reader Bounds-checked reader over the font bytes.
17
+ * @param offset Byte offset of the `name` table.
18
+ * @returns The three names, each `null` when no usable record carries it.
19
+ * @throws {Error} A record or its string lies outside the bytes.
20
+ */
21
+ function readTrueTypeNames(reader, offset) {
22
+ const count = reader.u16(offset + 2, "name header");
23
+ const strings = offset + reader.u16(offset + 4, "name header");
24
+ const best = new Map();
25
+ for (let index = 0; index < count; ++index) {
26
+ const record = offset + 6 + index * 12;
27
+ const platform = reader.u16(record, "name record");
28
+ const encoding = reader.u16(record + 2, "name record");
29
+ const language = reader.u16(record + 4, "name record");
30
+ const id = reader.u16(record + 6, "name record");
31
+ if (id !== 1 && id !== 13 && id !== 14)
32
+ continue;
33
+ const length = reader.u16(record + 8, "name record");
34
+ const at = strings + reader.u16(record + 10, "name record");
35
+ reader.require(at, length, "name string");
36
+ let rank;
37
+ let text = null;
38
+ if (platform === 3 && (encoding === 1 || encoding === 10)) {
39
+ rank = language === 0x0409 ? 0 : 1;
40
+ text = utf16(reader, at, length);
41
+ }
42
+ else if (platform === 0) {
43
+ rank = 2;
44
+ text = utf16(reader, at, length);
45
+ }
46
+ else if (platform === 1 && encoding === 0) {
47
+ rank = 3;
48
+ const codes = [];
49
+ for (let byte = 0; byte < length; ++byte)
50
+ codes.push(reader.u8(at + byte, "name string"));
51
+ if (codes.every((code) => code < 0x80))
52
+ text = String.fromCharCode(...codes);
53
+ }
54
+ else
55
+ continue;
56
+ if (text === null)
57
+ continue;
58
+ const previous = best.get(id);
59
+ if (previous === undefined || rank < previous.rank)
60
+ best.set(id, { rank, text });
61
+ }
62
+ return {
63
+ family: best.get(1)?.text ?? null,
64
+ licenseDescription: best.get(13)?.text ?? null,
65
+ licenseUrl: best.get(14)?.text ?? null,
66
+ };
67
+ }
68
+ /** Decode UTF-16BE code units, surrogate pairs included. */
69
+ function utf16(reader, at, length) {
70
+ const units = [];
71
+ for (let unit = 0; unit + 1 < length; unit += 2)
72
+ units.push(reader.u16(at + unit, "name string"));
73
+ return String.fromCharCode(...units);
74
+ }
75
+ //# sourceMappingURL=readTrueTypeNames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readTrueTypeNames.js","sourceRoot":"","sources":["../../src/font/readTrueTypeNames.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;;GAgBG;AACH,2BACE,MAA0B,EAC1B,MAAc;IAEd,MAAM,KAAK,GAAW,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAW,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;IACvE,MAAM,IAAI,GAAgD,IAAI,GAAG,EAAE,CAAC;IACpE,KAAK,IAAI,KAAK,GAAW,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC;QACnD,MAAM,MAAM,GAAW,MAAM,GAAG,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;QAC/C,MAAM,QAAQ,GAAW,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,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IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;IACnD,OAAO,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC;AACvC,CAAC"}
@@ -1,25 +1,38 @@
1
1
  import { IAutoMovieSkeleton } from "@automovie/interface";
2
2
  import type { Document } from "@gltf-transform/core";
3
3
  /**
4
- * Retarget a parsed glTF's skins onto a normalized humanoid {@link IAutoMovieSkeleton} by matching joint names to {@link AutoMovieHumanoidBone} slots.
4
+ * Retarget a parsed glTF's skins onto a normalized humanoid
5
+ * {@link IAutoMovieSkeleton} by matching joint names to
6
+ * {@link AutoMovieHumanoidBone} slots.
5
7
  *
6
- * This naming-based mapper currently has test callers in this repository. Production motion adoption uses an explicit mapping against inspected nodes, so this export does not establish a production rig-inference flow.
8
+ * This naming-based mapper currently has test callers in this repository.
9
+ * Production motion adoption uses an explicit mapping against inspected nodes,
10
+ * so this export does not establish a production rig-inference flow.
7
11
  *
8
- * Every skin is read in document order and the first joint to claim a slot keeps it, because exporters bind clothes, hair and accessories as separate skins in no guaranteed order and the body rig must be found wherever it sits. A joint name maps through the supported Blender-style, Mixamo, VRM-style and Unreal mannequin aliases; fingers, eyes and jaw are not mapped.
12
+ * Every skin is read in document order and the first joint to claim a slot
13
+ * keeps it, because exporters bind clothes, hair and accessories as separate
14
+ * skins in no guaranteed order and the body rig must be found wherever it sits.
15
+ * A joint name maps through the supported Blender-style, Mixamo, VRM-style and
16
+ * Unreal mannequin aliases; fingers, eyes and jaw are not mapped.
9
17
  *
10
- * The hierarchy is rebuilt over mapped joints only: a bone's parent is its nearest mapped ancestor in the node tree, and the local TRS of every skipped helper node between them composes into the bone's rest, because {@link IAutoMovieBone.rest} is relative to `parent` and a dropped helper offset or roll would misplace every bone beneath it. With finite unit-quaternion TRS inputs, composition represents the affine product up to floating-point rounding when each helper scale commutes with its child rotation; otherwise it drops shear. This mapper does not admit or normalize raw node TRS. A root bone keeps its own local TRS, since armature and scene transforms belong to the imported object rather than the skeleton. Bones carry no constraint.
18
+ * The hierarchy is rebuilt over mapped joints only: a bone's parent is its
19
+ * nearest mapped ancestor in the node tree, and the local TRS of every skipped
20
+ * helper node between them composes into the bone's rest, because
21
+ * {@link IAutoMovieBone.rest} is relative to `parent` and a dropped helper
22
+ * offset or roll would misplace every bone beneath it. With finite
23
+ * unit-quaternion TRS inputs, composition represents the affine product up to
24
+ * floating-point rounding when each helper scale commutes with its child
25
+ * rotation; otherwise it drops shear. This mapper does not admit or normalize
26
+ * raw node TRS. A root bone keeps its own local TRS, since armature and scene
27
+ * transforms belong to the imported object rather than the skeleton. Bones
28
+ * carry no constraint.
11
29
  *
12
30
  * @param doc Parsed document; it is only read.
13
- * @param skeletonId Id copied verbatim to the returned skeleton; defaults to "skeleton" and is not validated here.
14
- * @returns The skeleton with bones in first-claim order, or `null` when no skin joint maps to the required `hips` slot.
15
- * @throws {Error} When a mapped joint's ancestors loop, which no glTF node hierarchy may.
16
- *
17
- * @evidence contracts/development/implementation.md#principled-implementation Slots come from a normalized alias table, the hierarchy from a child-to-parent map walked to the nearest mapped ancestor and refusing an ancestor met twice, since a glTF hierarchy is a forest of strict trees, and each rest from composing skipped helper TRS with `composeLocalTransform`; that composition drops the shear a non-uniform helper scale under a rotated child would need, the limitation the documentation states.
18
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The function owns slot claiming and hierarchy rebuilding, while name normalization and transform composition live in internal modules the byte inspector and motion adoption share, so the alias table and the composition formula each exist once.
19
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The alias table is this importer's declared naming vocabulary, not proof of bone anatomy; the table is a `Map`, so a joint named after an `Object.prototype` member such as `constructor` maps to nothing instead of an inherited function, and first-claim order is the documented rule for duplicate slots.
20
- * @evidence contracts/development/common.md#meaningful-documentation The documentation states the every-skin first-claim rule and its reason, the covered naming conventions and unmapped fingers, eyes and jaw, the helper composition and its exactness, the root-bone exception, the null cases, the refused ancestor cycle, and that constraints are left empty.
21
- * @evidence contracts/development/implementation.md#efficient-algorithms Work follows skins and joints, joint-name text normalization, nodes and child links, and each mapped bone's walk to the nearest mapped ancestor; hash lookups have expected constant cost, while each helper walk may revisit ancestors another bone's walk read, and reads each node at most once itself.
22
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Slot and parent maps are call-local; repeated ancestor walks remain bounded by mapped slots and document depth, while mutable Document contents and the requested skeleton id preclude a retained identity-only cache.
23
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The slot and parent maps, the helper arrays and each walk's visited set are local and released on return or throw; the returned skeleton holds new transform objects proportional to the mapped bones, at most the humanoid slot count, owned by the caller.
31
+ * @param skeletonId Id copied verbatim to the returned skeleton; defaults to
32
+ * "skeleton" and is not validated here.
33
+ * @returns The skeleton with bones in first-claim order, or `null` when no skin
34
+ * joint maps to the required `hips` slot.
35
+ * @throws {Error} When a mapped joint's ancestors loop, which no glTF node
36
+ * hierarchy may.
24
37
  */
25
38
  export declare const humanoidSkeleton: (doc: Document, skeletonId?: string) => IAutoMovieSkeleton | null;
@@ -4,26 +4,39 @@ exports.humanoidSkeleton = void 0;
4
4
  const composeLocalTransform_1 = require("./internal/composeLocalTransform");
5
5
  const humanoidBoneOfName_1 = require("./internal/humanoidBoneOfName");
6
6
  /**
7
- * Retarget a parsed glTF's skins onto a normalized humanoid {@link IAutoMovieSkeleton} by matching joint names to {@link AutoMovieHumanoidBone} slots.
7
+ * Retarget a parsed glTF's skins onto a normalized humanoid
8
+ * {@link IAutoMovieSkeleton} by matching joint names to
9
+ * {@link AutoMovieHumanoidBone} slots.
8
10
  *
9
- * This naming-based mapper currently has test callers in this repository. Production motion adoption uses an explicit mapping against inspected nodes, so this export does not establish a production rig-inference flow.
11
+ * This naming-based mapper currently has test callers in this repository.
12
+ * Production motion adoption uses an explicit mapping against inspected nodes,
13
+ * so this export does not establish a production rig-inference flow.
10
14
  *
11
- * Every skin is read in document order and the first joint to claim a slot keeps it, because exporters bind clothes, hair and accessories as separate skins in no guaranteed order and the body rig must be found wherever it sits. A joint name maps through the supported Blender-style, Mixamo, VRM-style and Unreal mannequin aliases; fingers, eyes and jaw are not mapped.
15
+ * Every skin is read in document order and the first joint to claim a slot
16
+ * keeps it, because exporters bind clothes, hair and accessories as separate
17
+ * skins in no guaranteed order and the body rig must be found wherever it sits.
18
+ * A joint name maps through the supported Blender-style, Mixamo, VRM-style and
19
+ * Unreal mannequin aliases; fingers, eyes and jaw are not mapped.
12
20
  *
13
- * The hierarchy is rebuilt over mapped joints only: a bone's parent is its nearest mapped ancestor in the node tree, and the local TRS of every skipped helper node between them composes into the bone's rest, because {@link IAutoMovieBone.rest} is relative to `parent` and a dropped helper offset or roll would misplace every bone beneath it. With finite unit-quaternion TRS inputs, composition represents the affine product up to floating-point rounding when each helper scale commutes with its child rotation; otherwise it drops shear. This mapper does not admit or normalize raw node TRS. A root bone keeps its own local TRS, since armature and scene transforms belong to the imported object rather than the skeleton. Bones carry no constraint.
21
+ * The hierarchy is rebuilt over mapped joints only: a bone's parent is its
22
+ * nearest mapped ancestor in the node tree, and the local TRS of every skipped
23
+ * helper node between them composes into the bone's rest, because
24
+ * {@link IAutoMovieBone.rest} is relative to `parent` and a dropped helper
25
+ * offset or roll would misplace every bone beneath it. With finite
26
+ * unit-quaternion TRS inputs, composition represents the affine product up to
27
+ * floating-point rounding when each helper scale commutes with its child
28
+ * rotation; otherwise it drops shear. This mapper does not admit or normalize
29
+ * raw node TRS. A root bone keeps its own local TRS, since armature and scene
30
+ * transforms belong to the imported object rather than the skeleton. Bones
31
+ * carry no constraint.
14
32
  *
15
33
  * @param doc Parsed document; it is only read.
16
- * @param skeletonId Id copied verbatim to the returned skeleton; defaults to "skeleton" and is not validated here.
17
- * @returns The skeleton with bones in first-claim order, or `null` when no skin joint maps to the required `hips` slot.
18
- * @throws {Error} When a mapped joint's ancestors loop, which no glTF node hierarchy may.
19
- *
20
- * @evidence contracts/development/implementation.md#principled-implementation Slots come from a normalized alias table, the hierarchy from a child-to-parent map walked to the nearest mapped ancestor and refusing an ancestor met twice, since a glTF hierarchy is a forest of strict trees, and each rest from composing skipped helper TRS with `composeLocalTransform`; that composition drops the shear a non-uniform helper scale under a rotated child would need, the limitation the documentation states.
21
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The function owns slot claiming and hierarchy rebuilding, while name normalization and transform composition live in internal modules the byte inspector and motion adoption share, so the alias table and the composition formula each exist once.
22
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The alias table is this importer's declared naming vocabulary, not proof of bone anatomy; the table is a `Map`, so a joint named after an `Object.prototype` member such as `constructor` maps to nothing instead of an inherited function, and first-claim order is the documented rule for duplicate slots.
23
- * @evidence contracts/development/common.md#meaningful-documentation The documentation states the every-skin first-claim rule and its reason, the covered naming conventions and unmapped fingers, eyes and jaw, the helper composition and its exactness, the root-bone exception, the null cases, the refused ancestor cycle, and that constraints are left empty.
24
- * @evidence contracts/development/implementation.md#efficient-algorithms Work follows skins and joints, joint-name text normalization, nodes and child links, and each mapped bone's walk to the nearest mapped ancestor; hash lookups have expected constant cost, while each helper walk may revisit ancestors another bone's walk read, and reads each node at most once itself.
25
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Slot and parent maps are call-local; repeated ancestor walks remain bounded by mapped slots and document depth, while mutable Document contents and the requested skeleton id preclude a retained identity-only cache.
26
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The slot and parent maps, the helper arrays and each walk's visited set are local and released on return or throw; the returned skeleton holds new transform objects proportional to the mapped bones, at most the humanoid slot count, owned by the caller.
34
+ * @param skeletonId Id copied verbatim to the returned skeleton; defaults to
35
+ * "skeleton" and is not validated here.
36
+ * @returns The skeleton with bones in first-claim order, or `null` when no skin
37
+ * joint maps to the required `hips` slot.
38
+ * @throws {Error} When a mapped joint's ancestors loop, which no glTF node
39
+ * hierarchy may.
27
40
  */
28
41
  const humanoidSkeleton = (doc, skeletonId = "skeleton") => {
29
42
  const skins = doc.getRoot().listSkins();
@@ -1 +1 @@
1
- {"version":3,"file":"humanoidSk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CAAC,QAAQ,EAAE,CAAC;IAChC,OAAO;QACL,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;QAC1C,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;QAChD,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;KACrC,CAAC;AACJ,CAAC,CAAC"}
package/lib/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from "./isAutoMovieExternalModelIngestProfile";
7
7
  export * from "./inspectAutoMovieExternalModelBytes";
8
8
  export * from "./adoptAutoMovieExternalMotion";
9
9
  export * from "./decodeAutoMoviePpmImage";
10
+ export * from "./font";
package/lib/index.js CHANGED
@@ -23,4 +23,5 @@ __exportStar(require("./isAutoMovieExternalModelIngestProfile"), exports);
23
23
  __exportStar(require("./inspectAutoMovieExternalModelBytes"), exports);
24
24
  __exportStar(require("./adoptAutoMovieExternalMotion"), exports);
25
25
  __exportStar(require("./decodeAutoMoviePpmImage"), exports);
26
+ __exportStar(require("./font"), exports);
26
27
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,mDAAiC;AACjC,qDAAmC;AACnC,iFAA+D;AAC/D,8EAA4D;AAC5D,0EAAwD;AACxD,uEAAqD;AACrD,iEAA+C;AAC/C,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,mDAAiC;AACjC,qDAAmC;AACnC,iFAA+D;AAC/D,8EAA4D;AAC5D,0EAAwD;AACxD,uEAAqD;AACrD,iEAA+C;AAC/C,4DAA0C;AAC1C,yCAAuB"}
@@ -1,23 +1,36 @@
1
1
  import type { IAutoMovieIngestResult } from "@automovie/interface";
2
2
  import type { Document } from "@gltf-transform/core";
3
3
  /**
4
- * Map a parsed glTF/GLB {@link Document} onto automovie's core node graph and animation clips, with no three.js and no humanoid assumptions.
4
+ * Map a parsed glTF/GLB {@link Document} onto automovie's core node graph and
5
+ * animation clips, with no three.js and no humanoid assumptions.
5
6
  *
6
- * Current repository callers exercise this parsed-document mapper through tests. The production asset inventory uses the separate byte inspector and host loaders; this export does not establish a wired parsed-document runtime import flow.
7
+ * Current repository callers exercise this parsed-document mapper through
8
+ * tests. The production asset inventory uses the separate byte inspector and
9
+ * host loaders; this export does not establish a wired parsed-document runtime
10
+ * import flow.
7
11
  *
8
- * `@gltf-transform/core` parses the bytes headlessly, and this mapper rewrites its structures structurally so props, cameras and characters import the same way. Every node keeps its local TRS, its parent, and the mesh, camera and skin it carries; a skin joint is a `bone` even when it also carries a mesh, then a mesh node is `mesh`, a camera node `camera`, and anything else `group`. Lights are not read. Every animation channel becomes a node track with the glTF sampler's keyframes, its interpolation mapped LINEAR, STEP and CUBICSPLINE to `linear`, `step` and `cubicspline` with an absent one read as LINEAR as glTF specifies, and its values decoded from normalized integers where the accessor declares them. Naming-based humanoid skeleton mapping is the separate {@link humanoidSkeleton} stage.
12
+ * `@gltf-transform/core` parses the bytes headlessly, and this mapper rewrites
13
+ * its structures structurally so props, cameras and characters import the same
14
+ * way. Every node keeps its local TRS, its parent, and the mesh, camera and
15
+ * skin it carries; a skin joint is a `bone` even when it also carries a mesh,
16
+ * then a mesh node is `mesh`, a camera node `camera`, and anything else
17
+ * `group`. Lights are not read. Every animation channel becomes a node track
18
+ * with the glTF sampler's keyframes, its interpolation mapped LINEAR, STEP and
19
+ * CUBICSPLINE to `linear`, `step` and `cubicspline` with an absent one read as
20
+ * LINEAR as glTF specifies, and its values decoded from normalized integers
21
+ * where the accessor declares them. Naming-based humanoid skeleton mapping is
22
+ * the separate {@link humanoidSkeleton} stage.
9
23
  *
10
- * Channel checks refuse no target node, no or unknown target path, no sampler, no input or output data, an unknown interpolation, keyframe times that are not finite, non-negative and strictly increasing, non-finite output values, or an output length that disagrees with the keyframe count, the path's component count and the cubic-spline tangent triple. This is not complete model admission: node TRS, graph/resource membership, duplicate target channels, rotation magnitude and weights against the target morph count are caller premises rather than checks performed here.
24
+ * Channel checks refuse no target node, no or unknown target path, no sampler,
25
+ * no input or output data, an unknown interpolation, keyframe times that are
26
+ * not finite, non-negative and strictly increasing, non-finite output values,
27
+ * or an output length that disagrees with the keyframe count, the path's
28
+ * component count and the cubic-spline tangent triple. This is not complete
29
+ * model admission: node TRS, graph/resource membership, duplicate target
30
+ * channels, rotation magnitude and weights against the target morph count are
31
+ * caller premises rather than checks performed here.
11
32
  *
12
33
  * @param doc Parsed document; it is only read.
13
34
  * @returns New arrays the caller owns, sharing no storage with the document.
14
- *
15
- * @evidence contracts/development/implementation.md#principled-implementation Node and clip structure is mapped one to one with index ids, kinds follow a fixed precedence of joint, mesh, camera, then group, and each channel is checked against glTF's own sampler rules: an allowed path and interpolation, strictly increasing times, finite values, and output arity of keyframes times components times three for cubic splines; normalized accessors decode through `accessorValues`.
16
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The function builds the id, parent, joint and resource-index maps once and maps nodes and animations; `toTrack` owns all channel validation, and the path and interpolation tables enumerate supported sampler vocabulary.
17
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An unknown interpolation or target path throws rather than receiving a fallback interpretation, and no fixture-specific node, path or value is special-cased; lights are documented as not read.
18
- * @evidence contracts/development/common.md#meaningful-documentation The documentation states what each node keeps, the kind precedence, the interpolation mapping, normalized decoding, every refusal, and that the returned arrays share no storage with the document.
19
- * @evidence contracts/development/implementation.md#efficient-algorithms Work follows nodes and child links, meshes, cameras, skins and joints, animations and channels, and all per-track copied keyframe components; resource-index maps are built once and lookups use expected constant-time hash operations.
20
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Maps are reused within one call over a mutable Document; a sampler shared by channels is copied per track so each track owns its arrays, and no cache coordinates separate calls.
21
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The lookup maps are local and released on return or throw; the result retains new node records and per-track copies of keyframe data proportional to the document's animation size, owned by the caller, and no handle or task.
22
35
  */
23
36
  export declare const ingestDocument: (doc: Document) => IAutoMovieIngestResult;
@@ -3,24 +3,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ingestDocument = void 0;
4
4
  const accessorValues_1 = require("./internal/accessorValues");
5
5
  /**
6
- * Map a parsed glTF/GLB {@link Document} onto automovie's core node graph and animation clips, with no three.js and no humanoid assumptions.
6
+ * Map a parsed glTF/GLB {@link Document} onto automovie's core node graph and
7
+ * animation clips, with no three.js and no humanoid assumptions.
7
8
  *
8
- * Current repository callers exercise this parsed-document mapper through tests. The production asset inventory uses the separate byte inspector and host loaders; this export does not establish a wired parsed-document runtime import flow.
9
+ * Current repository callers exercise this parsed-document mapper through
10
+ * tests. The production asset inventory uses the separate byte inspector and
11
+ * host loaders; this export does not establish a wired parsed-document runtime
12
+ * import flow.
9
13
  *
10
- * `@gltf-transform/core` parses the bytes headlessly, and this mapper rewrites its structures structurally so props, cameras and characters import the same way. Every node keeps its local TRS, its parent, and the mesh, camera and skin it carries; a skin joint is a `bone` even when it also carries a mesh, then a mesh node is `mesh`, a camera node `camera`, and anything else `group`. Lights are not read. Every animation channel becomes a node track with the glTF sampler's keyframes, its interpolation mapped LINEAR, STEP and CUBICSPLINE to `linear`, `step` and `cubicspline` with an absent one read as LINEAR as glTF specifies, and its values decoded from normalized integers where the accessor declares them. Naming-based humanoid skeleton mapping is the separate {@link humanoidSkeleton} stage.
14
+ * `@gltf-transform/core` parses the bytes headlessly, and this mapper rewrites
15
+ * its structures structurally so props, cameras and characters import the same
16
+ * way. Every node keeps its local TRS, its parent, and the mesh, camera and
17
+ * skin it carries; a skin joint is a `bone` even when it also carries a mesh,
18
+ * then a mesh node is `mesh`, a camera node `camera`, and anything else
19
+ * `group`. Lights are not read. Every animation channel becomes a node track
20
+ * with the glTF sampler's keyframes, its interpolation mapped LINEAR, STEP and
21
+ * CUBICSPLINE to `linear`, `step` and `cubicspline` with an absent one read as
22
+ * LINEAR as glTF specifies, and its values decoded from normalized integers
23
+ * where the accessor declares them. Naming-based humanoid skeleton mapping is
24
+ * the separate {@link humanoidSkeleton} stage.
11
25
  *
12
- * Channel checks refuse no target node, no or unknown target path, no sampler, no input or output data, an unknown interpolation, keyframe times that are not finite, non-negative and strictly increasing, non-finite output values, or an output length that disagrees with the keyframe count, the path's component count and the cubic-spline tangent triple. This is not complete model admission: node TRS, graph/resource membership, duplicate target channels, rotation magnitude and weights against the target morph count are caller premises rather than checks performed here.
26
+ * Channel checks refuse no target node, no or unknown target path, no sampler,
27
+ * no input or output data, an unknown interpolation, keyframe times that are
28
+ * not finite, non-negative and strictly increasing, non-finite output values,
29
+ * or an output length that disagrees with the keyframe count, the path's
30
+ * component count and the cubic-spline tangent triple. This is not complete
31
+ * model admission: node TRS, graph/resource membership, duplicate target
32
+ * channels, rotation magnitude and weights against the target morph count are
33
+ * caller premises rather than checks performed here.
13
34
  *
14
35
  * @param doc Parsed document; it is only read.
15
36
  * @returns New arrays the caller owns, sharing no storage with the document.
16
- *
17
- * @evidence contracts/development/implementation.md#principled-implementation Node and clip structure is mapped one to one with index ids, kinds follow a fixed precedence of joint, mesh, camera, then group, and each channel is checked against glTF's own sampler rules: an allowed path and interpolation, strictly increasing times, finite values, and output arity of keyframes times components times three for cubic splines; normalized accessors decode through `accessorValues`.
18
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The function builds the id, parent, joint and resource-index maps once and maps nodes and animations; `toTrack` owns all channel validation, and the path and interpolation tables enumerate supported sampler vocabulary.
19
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An unknown interpolation or target path throws rather than receiving a fallback interpretation, and no fixture-specific node, path or value is special-cased; lights are documented as not read.
20
- * @evidence contracts/development/common.md#meaningful-documentation The documentation states what each node keeps, the kind precedence, the interpolation mapping, normalized decoding, every refusal, and that the returned arrays share no storage with the document.
21
- * @evidence contracts/development/implementation.md#efficient-algorithms Work follows nodes and child links, meshes, cameras, skins and joints, animations and channels, and all per-track copied keyframe components; resource-index maps are built once and lookups use expected constant-time hash operations.
22
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Maps are reused within one call over a mutable Document; a sampler shared by channels is copied per track so each track owns its arrays, and no cache coordinates separate calls.
23
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The lookup maps are local and released on return or throw; the result retains new node records and per-track copies of keyframe data proportional to the document's animation size, owned by the caller, and no handle or task.
24
37
  */
25
38
  const ingestDocument = (doc) => {
26
39
  const root = doc.getRoot();
@@ -1 +1 @@
1
- {"version":3,"file":"ingestDocument.js","sourceRoot":"","sources":["../src/ingestDocument.ts"],"names":[],"mappings":";;;AAuBA,8DAA2D;AAE3D;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,cAAc,GAA8C,CACvE,GAAa,EACW,EAAE;IAC1B,MAAM,IAAI,GAAS,GAAG,CAAC,OAAO,EAAE,CAAC;IACjC,MAAM,SAAS,GAAe,IAAI,CAAC,SAAS,EAAE,CAAC;IAE/C,MAAM,QAAQ,GAA0B,IAAI,GAAG,EAAoB,CAAC;IACpE,SAAS,CAAC,OAAO,CAAC,CAAC,IAAc,EAAE,CAAS,EAAQ,EAAE;QACpD,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,MAAM,YAAY,G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OAAO,IAAI,CACT,sDAAsD,gBAAgB,aAAa,MAAM,CAAC,MAAM,EAAE,CACnG,CAAC;IAEJ,OAAO;QACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/C,KAAK;QACL,MAAM;QACN,aAAa;KACd,CAAC;AACJ,CAAC,CAAC"}
@@ -2,22 +2,34 @@ import type { IAutoMovieExternalModelInspection } from "@automovie/interface";
2
2
  /**
3
3
  * Parse and validate exact external model bytes before compilation.
4
4
  *
5
- * The container is chosen by the path suffix: `.gltf` is UTF-8 JSON, `.glb` and `.vrm` are GLB 2.0 with one JSON chunk and at most one BIN chunk. JSON that is not strict UTF-8, does not parse, or repeats a member name after escape decoding is refused, because a last-wins duplicate could hide the value another loader reads. The document must declare asset version 2.0 and a forest of nodes; node mesh/skin/child links, scene roots, skin joints, primitive POSITION/indices and buffer/accessor references read here must resolve; buffers, buffer views, accessors, sparse ranges and images must fit their declared and resident bytes; and every non-data buffer sidecar must come back from `resolveResource` with the declared length, while URI images require nonempty bytes. The selected profile then adds its own requirements, as {@link AutoMovieExternalModelIngestProfile} lists. This is a fixed-profile admission gate, not a complete glTF validator: material/texture links and unconsumed attributes are left to host loaders, sparse payload contents and image media formats are not decoded here, and the skin/motion owners state their additional restrictions. The inspector never guesses a profile or repairs input: the first violation throws with the JSON path it concerns.
5
+ * The container is chosen by the path suffix: `.gltf` is UTF-8 JSON, `.glb` and
6
+ * `.vrm` are GLB 2.0 with one JSON chunk and at most one BIN chunk. JSON that
7
+ * is not strict UTF-8, does not parse, or repeats a member name after escape
8
+ * decoding is refused, because a last-wins duplicate could hide the value
9
+ * another loader reads. The document must declare asset version 2.0 and a
10
+ * forest of nodes; node mesh/skin/child links, scene roots, skin joints,
11
+ * primitive POSITION/indices and buffer/accessor references read here must
12
+ * resolve; buffers, buffer views, accessors, sparse ranges and images must fit
13
+ * their declared and resident bytes; and every non-data buffer sidecar must
14
+ * come back from `resolveResource` with the declared length, while URI images
15
+ * require nonempty bytes. The selected profile then adds its own requirements,
16
+ * as {@link AutoMovieExternalModelIngestProfile} lists. This is a fixed-profile
17
+ * admission gate, not a complete glTF validator: material/texture links and
18
+ * unconsumed attributes are left to host loaders, sparse payload contents and
19
+ * image media formats are not decoded here, and the skin/motion owners state
20
+ * their additional restrictions. The inspector never guesses a profile or
21
+ * repairs input: the first violation throws with the JSON path it concerns.
6
22
  *
7
- * Under `vrm-humanoid-v1`, `VRMC_vrm` is read with VRM 1.0 bone names, so a 1.0-beta file that still writes thumbs the VRM 0.x way is read as 1.0.
23
+ * Under `vrm-humanoid-v1`, `VRMC_vrm` is read with VRM 1.0 bone names, so a
24
+ * 1.0-beta file that still writes thumbs the VRM 0.x way is read as 1.0.
8
25
  *
9
- * @param props.path Project-relative source path; its suffix selects the container.
26
+ * @param props.path Project-relative source path; its suffix selects the
27
+ * container.
10
28
  * @param props.bytes Resident container bytes; they are only read.
11
29
  * @param props.profile Caller-selected profile, refused unless supported.
12
- * @param props.resolveResource Returns a sidecar's bytes for a URI, or `null` when unavailable; it is called once per external buffer and image URI entry, with caller-owned cost and effects.
30
+ * @param props.resolveResource Returns a sidecar's bytes for a URI, or `null`
31
+ * when unavailable; it is called once per external buffer and image URI
32
+ * entry, with caller-owned cost and effects.
13
33
  * @returns New facts that hold no reference to the input bytes.
14
- *
15
- * @evidence contracts/development/implementation.md#principled-implementation The inspector follows the glTF 2.0 and GLB container rules: strict UTF-8 JSON with duplicate members refused by an iterative scan, index validation for the structural and profile fields it reads, forest and cycle checks by iterative parent walks, accessor and sparse ranges from component sizes with matrix column padding, payload lengths against declared buffers, and VRM 0.x thumbs migrated to VRM 1.0 slots by the published rename; the selected profile does not prove complete glTF validity, normalized complete skinning or anatomical correctness, and `VRMC_vrm` 1.0-beta thumb names are read as 1.0.
16
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The exported orchestrator sequences structural, payload and profile owners; source-preserving internal splits keep each concern within the file/export limits, while public result types have independent file-named owners.
17
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Profiles and container suffixes are contract constants, no model or path is special-cased, the alias table is a `Map` so inherited names never resolve, and every refusal is the first violation found rather than a repaired value.
18
- * @evidence contracts/development/common.md#meaningful-documentation The documentation states how the container is chosen, every structural requirement, the duplicate-member reason, the no-guess no-repair rule, the VRM 1.0-beta limitation, each parameter's role and call frequency, and that the result holds no byte reference.
19
- * @evidence contracts/development/implementation.md#efficient-algorithms Work follows container bytes for UTF-8/JSON and duplicate scanning, declared entries and name text, skinned components, motion values and encoded data URIs, plus full caller resolver work per external URI entry; resource/extension sorting uses O(U log U) and O(X log X) prefix-scanning comparisons. Per-accessor readers resolve views/strides once, and the BIN slice borrows container storage.
20
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Within one inspection, a motion accessor is decoded once per accessor and type and shared by every channel that cites it, each track receiving its own copy, and a mesh and skin pair bound on several nodes is weight-checked once; the key is the accessor index or pair, which is valid because the document is immutable during the synchronous call.
21
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The decoded JSON, payload list, readers and caches live only for the call and are released on return or throw; the result retains copies proportional to resources, slots and motion data, and keeps neither the container nor sidecar bytes.
22
34
  */
23
35
  export declare const inspectAutoMovieExternalModelBytes: (props: IAutoMovieExternalModelInspection.IProps) => IAutoMovieExternalModelInspection;