@loaders.gl/gltf 4.0.0-alpha.5 → 4.0.0-alpha.7

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 (315) hide show
  1. package/dist/bundle.js +2 -2
  2. package/dist/dist.min.js +3545 -2445
  3. package/dist/es5/bundle.js +6 -0
  4. package/dist/es5/bundle.js.map +1 -0
  5. package/dist/es5/glb-loader.js +56 -0
  6. package/dist/es5/glb-loader.js.map +1 -0
  7. package/dist/es5/glb-writer.js +34 -0
  8. package/dist/es5/glb-writer.js.map +1 -0
  9. package/dist/es5/gltf-loader.js +81 -0
  10. package/dist/es5/gltf-loader.js.map +1 -0
  11. package/dist/es5/gltf-writer.js +35 -0
  12. package/dist/es5/gltf-writer.js.map +1 -0
  13. package/dist/es5/index.js +55 -0
  14. package/dist/es5/index.js.map +1 -0
  15. package/dist/es5/lib/api/gltf-extensions.js +109 -0
  16. package/dist/es5/lib/api/gltf-extensions.js.map +1 -0
  17. package/dist/es5/lib/api/gltf-scenegraph.js +595 -0
  18. package/dist/es5/lib/api/gltf-scenegraph.js.map +1 -0
  19. package/dist/es5/lib/api/normalize-gltf-v1.js +331 -0
  20. package/dist/es5/lib/api/normalize-gltf-v1.js.map +1 -0
  21. package/dist/es5/lib/api/post-process-gltf.js +470 -0
  22. package/dist/es5/lib/api/post-process-gltf.js.map +1 -0
  23. package/dist/es5/lib/encoders/encode-glb.js +61 -0
  24. package/dist/es5/lib/encoders/encode-glb.js.map +1 -0
  25. package/dist/es5/lib/encoders/encode-gltf.js +20 -0
  26. package/dist/es5/lib/encoders/encode-gltf.js.map +1 -0
  27. package/dist/es5/lib/extensions/EXT_meshopt_compression.js +94 -0
  28. package/dist/es5/lib/extensions/EXT_meshopt_compression.js.map +1 -0
  29. package/dist/es5/lib/extensions/EXT_texture_webp.js +43 -0
  30. package/dist/es5/lib/extensions/EXT_texture_webp.js.map +1 -0
  31. package/dist/es5/lib/extensions/KHR_binary_gltf.js +39 -0
  32. package/dist/es5/lib/extensions/KHR_binary_gltf.js.map +1 -0
  33. package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js +247 -0
  34. package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js.map +1 -0
  35. package/dist/es5/lib/extensions/KHR_texture_basisu.js +36 -0
  36. package/dist/es5/lib/extensions/KHR_texture_basisu.js.map +1 -0
  37. package/dist/es5/lib/extensions/KHR_texture_transform.js +230 -0
  38. package/dist/es5/lib/extensions/KHR_texture_transform.js.map +1 -0
  39. package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js +103 -0
  40. package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -0
  41. package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js +99 -0
  42. package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -0
  43. package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js +76 -0
  44. package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -0
  45. package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js +113 -0
  46. package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -0
  47. package/dist/es5/lib/gltf-utils/get-typed-array.js +23 -0
  48. package/dist/es5/lib/gltf-utils/get-typed-array.js.map +1 -0
  49. package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js +68 -0
  50. package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js.map +1 -0
  51. package/dist/es5/lib/gltf-utils/gltf-constants.js +48 -0
  52. package/dist/es5/lib/gltf-utils/gltf-constants.js.map +1 -0
  53. package/dist/es5/lib/gltf-utils/gltf-utils.js +86 -0
  54. package/dist/es5/lib/gltf-utils/gltf-utils.js.map +1 -0
  55. package/dist/es5/lib/gltf-utils/resolve-url.js +18 -0
  56. package/dist/es5/lib/gltf-utils/resolve-url.js.map +1 -0
  57. package/dist/es5/lib/parsers/parse-glb.js +120 -0
  58. package/dist/es5/lib/parsers/parse-glb.js.map +1 -0
  59. package/dist/es5/lib/parsers/parse-gltf.js +283 -0
  60. package/dist/es5/lib/parsers/parse-gltf.js.map +1 -0
  61. package/dist/es5/lib/types/glb-types.js +2 -0
  62. package/dist/es5/lib/types/glb-types.js.map +1 -0
  63. package/dist/es5/lib/types/gltf-json-schema.js +2 -0
  64. package/dist/es5/lib/types/gltf-json-schema.js.map +1 -0
  65. package/dist/es5/lib/types/gltf-postprocessed-schema.js +2 -0
  66. package/dist/es5/lib/types/gltf-postprocessed-schema.js.map +1 -0
  67. package/dist/es5/lib/types/gltf-types.js +2 -0
  68. package/dist/es5/lib/types/gltf-types.js.map +1 -0
  69. package/dist/es5/lib/utils/assert.js +12 -0
  70. package/dist/es5/lib/utils/assert.js.map +1 -0
  71. package/dist/es5/lib/utils/version.js +9 -0
  72. package/dist/es5/lib/utils/version.js.map +1 -0
  73. package/dist/es5/meshopt/meshopt-decoder.js +215 -0
  74. package/dist/es5/meshopt/meshopt-decoder.js.map +1 -0
  75. package/dist/es5/webp/webp.js +83 -0
  76. package/dist/es5/webp/webp.js.map +1 -0
  77. package/dist/esm/bundle.js +4 -0
  78. package/dist/esm/bundle.js.map +1 -0
  79. package/dist/esm/glb-loader.js +31 -0
  80. package/dist/esm/glb-loader.js.map +1 -0
  81. package/dist/esm/glb-writer.js +27 -0
  82. package/dist/esm/glb-writer.js.map +1 -0
  83. package/dist/esm/gltf-loader.js +51 -0
  84. package/dist/esm/gltf-loader.js.map +1 -0
  85. package/dist/esm/gltf-writer.js +28 -0
  86. package/dist/esm/gltf-writer.js.map +1 -0
  87. package/dist/esm/index.js +8 -0
  88. package/dist/esm/index.js.map +1 -0
  89. package/dist/esm/lib/api/gltf-extensions.js +35 -0
  90. package/dist/esm/lib/api/gltf-extensions.js.map +1 -0
  91. package/dist/esm/lib/api/gltf-scenegraph.js +452 -0
  92. package/dist/esm/lib/api/gltf-scenegraph.js.map +1 -0
  93. package/dist/esm/lib/api/normalize-gltf-v1.js +204 -0
  94. package/dist/esm/lib/api/normalize-gltf-v1.js.map +1 -0
  95. package/dist/esm/lib/api/post-process-gltf.js +396 -0
  96. package/dist/esm/lib/api/post-process-gltf.js.map +1 -0
  97. package/dist/esm/lib/encoders/encode-glb.js +54 -0
  98. package/dist/esm/lib/encoders/encode-glb.js.map +1 -0
  99. package/dist/esm/lib/encoders/encode-gltf.js +14 -0
  100. package/dist/esm/lib/encoders/encode-gltf.js.map +1 -0
  101. package/dist/esm/lib/extensions/EXT_meshopt_compression.js +41 -0
  102. package/dist/esm/lib/extensions/EXT_meshopt_compression.js.map +1 -0
  103. package/dist/esm/lib/extensions/EXT_texture_webp.js +25 -0
  104. package/dist/esm/lib/extensions/EXT_texture_webp.js.map +1 -0
  105. package/dist/esm/lib/extensions/KHR_binary_gltf.js +21 -0
  106. package/dist/esm/lib/extensions/KHR_binary_gltf.js.map +1 -0
  107. package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js +111 -0
  108. package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js.map +1 -0
  109. package/dist/esm/lib/extensions/KHR_texture_basisu.js +18 -0
  110. package/dist/esm/lib/extensions/KHR_texture_basisu.js.map +1 -0
  111. package/dist/esm/lib/extensions/KHR_texture_transform.js +182 -0
  112. package/dist/esm/lib/extensions/KHR_texture_transform.js.map +1 -0
  113. package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js +77 -0
  114. package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -0
  115. package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js +42 -0
  116. package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -0
  117. package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js +33 -0
  118. package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -0
  119. package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js +61 -0
  120. package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -0
  121. package/dist/esm/lib/gltf-utils/get-typed-array.js +16 -0
  122. package/dist/esm/lib/gltf-utils/get-typed-array.js.map +1 -0
  123. package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js +62 -0
  124. package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js.map +1 -0
  125. package/dist/esm/lib/gltf-utils/gltf-constants.js +37 -0
  126. package/dist/esm/lib/gltf-utils/gltf-constants.js.map +1 -0
  127. package/dist/esm/lib/gltf-utils/gltf-utils.js +74 -0
  128. package/dist/esm/lib/gltf-utils/gltf-utils.js.map +1 -0
  129. package/dist/esm/lib/gltf-utils/resolve-url.js +12 -0
  130. package/dist/esm/lib/gltf-utils/resolve-url.js.map +1 -0
  131. package/dist/esm/lib/parsers/parse-glb.js +114 -0
  132. package/dist/esm/lib/parsers/parse-glb.js.map +1 -0
  133. package/dist/esm/lib/parsers/parse-gltf.js +155 -0
  134. package/dist/esm/lib/parsers/parse-gltf.js.map +1 -0
  135. package/dist/esm/lib/types/glb-types.js +2 -0
  136. package/dist/esm/lib/types/glb-types.js.map +1 -0
  137. package/dist/esm/lib/types/gltf-json-schema.js +2 -0
  138. package/dist/esm/lib/types/gltf-json-schema.js.map +1 -0
  139. package/dist/esm/lib/types/gltf-postprocessed-schema.js +2 -0
  140. package/dist/esm/lib/types/gltf-postprocessed-schema.js.map +1 -0
  141. package/dist/esm/lib/types/gltf-types.js +2 -0
  142. package/dist/esm/lib/types/gltf-types.js.map +1 -0
  143. package/dist/esm/lib/utils/assert.js +6 -0
  144. package/dist/esm/lib/utils/assert.js.map +1 -0
  145. package/dist/esm/lib/utils/version.js +2 -0
  146. package/dist/esm/lib/utils/version.js.map +1 -0
  147. package/dist/esm/meshopt/meshopt-decoder.js +91 -0
  148. package/dist/esm/meshopt/meshopt-decoder.js.map +1 -0
  149. package/dist/esm/meshopt/meshopt-encoder.ts.disabled +409 -0
  150. package/dist/esm/webp/webp.js +25 -0
  151. package/dist/esm/webp/webp.js.map +1 -0
  152. package/dist/glb-loader.d.ts +5 -4
  153. package/dist/glb-loader.d.ts.map +1 -1
  154. package/dist/glb-loader.js +30 -28
  155. package/dist/glb-writer.d.ts +7 -16
  156. package/dist/glb-writer.d.ts.map +1 -1
  157. package/dist/glb-writer.js +32 -26
  158. package/dist/gltf-loader.d.ts +7 -6
  159. package/dist/gltf-loader.d.ts.map +1 -1
  160. package/dist/gltf-loader.js +46 -43
  161. package/dist/gltf-writer.d.ts +2 -2
  162. package/dist/gltf-writer.d.ts.map +1 -1
  163. package/dist/gltf-writer.js +29 -26
  164. package/dist/index.d.ts +8 -4
  165. package/dist/index.d.ts.map +1 -1
  166. package/dist/index.js +28 -7
  167. package/dist/lib/api/gltf-extensions.d.ts +7 -2
  168. package/dist/lib/api/gltf-extensions.d.ts.map +1 -1
  169. package/dist/lib/api/gltf-extensions.js +79 -31
  170. package/dist/lib/api/gltf-scenegraph.d.ts +10 -14
  171. package/dist/lib/api/gltf-scenegraph.d.ts.map +1 -1
  172. package/dist/lib/api/gltf-scenegraph.js +577 -513
  173. package/dist/lib/api/normalize-gltf-v1.d.ts.map +1 -1
  174. package/dist/lib/api/normalize-gltf-v1.js +278 -229
  175. package/dist/lib/api/post-process-gltf.d.ts +4 -1
  176. package/dist/lib/api/post-process-gltf.d.ts.map +1 -1
  177. package/dist/lib/api/post-process-gltf.js +385 -374
  178. package/dist/lib/encoders/encode-glb.d.ts +14 -1
  179. package/dist/lib/encoders/encode-glb.d.ts.map +1 -1
  180. package/dist/lib/encoders/encode-glb.js +67 -58
  181. package/dist/lib/encoders/encode-gltf.d.ts +18 -0
  182. package/dist/lib/encoders/encode-gltf.d.ts.map +1 -1
  183. package/dist/lib/encoders/encode-gltf.js +30 -12
  184. package/dist/lib/extensions/EXT_meshopt_compression.d.ts +1 -4
  185. package/dist/lib/extensions/EXT_meshopt_compression.d.ts.map +1 -1
  186. package/dist/lib/extensions/EXT_meshopt_compression.js +35 -50
  187. package/dist/lib/extensions/EXT_texture_webp.d.ts +1 -1
  188. package/dist/lib/extensions/EXT_texture_webp.d.ts.map +1 -1
  189. package/dist/lib/extensions/EXT_texture_webp.js +32 -28
  190. package/dist/lib/extensions/KHR_binary_gltf.d.ts +1 -1
  191. package/dist/lib/extensions/KHR_binary_gltf.d.ts.map +1 -1
  192. package/dist/lib/extensions/KHR_binary_gltf.js +36 -23
  193. package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts +1 -1
  194. package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts.map +1 -1
  195. package/dist/lib/extensions/KHR_draco_mesh_compression.js +123 -111
  196. package/dist/lib/extensions/KHR_texture_basisu.d.ts +1 -1
  197. package/dist/lib/extensions/KHR_texture_basisu.d.ts.map +1 -1
  198. package/dist/lib/extensions/KHR_texture_basisu.js +26 -19
  199. package/dist/lib/extensions/KHR_texture_transform.d.ts +13 -0
  200. package/dist/lib/extensions/KHR_texture_transform.d.ts.map +1 -0
  201. package/dist/lib/extensions/KHR_texture_transform.js +227 -0
  202. package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts +6 -0
  203. package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts.map +1 -0
  204. package/dist/lib/extensions/deprecated/EXT_feature_metadata.js +115 -0
  205. package/dist/lib/extensions/deprecated/KHR_lights_punctual.d.ts +1 -1
  206. package/dist/lib/extensions/deprecated/KHR_lights_punctual.d.ts.map +1 -1
  207. package/dist/lib/extensions/deprecated/KHR_lights_punctual.js +54 -44
  208. package/dist/lib/extensions/deprecated/KHR_materials_unlit.d.ts +1 -1
  209. package/dist/lib/extensions/deprecated/KHR_materials_unlit.d.ts.map +1 -1
  210. package/dist/lib/extensions/deprecated/KHR_materials_unlit.js +39 -32
  211. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts +1 -1
  212. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts.map +1 -1
  213. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js +73 -62
  214. package/dist/lib/gltf-utils/get-typed-array.js +39 -14
  215. package/dist/lib/gltf-utils/gltf-attribute-utils.d.ts +1 -1
  216. package/dist/lib/gltf-utils/gltf-attribute-utils.d.ts.map +1 -1
  217. package/dist/lib/gltf-utils/gltf-attribute-utils.js +65 -65
  218. package/dist/lib/gltf-utils/gltf-constants.d.ts +17 -0
  219. package/dist/lib/gltf-utils/gltf-constants.d.ts.map +1 -1
  220. package/dist/lib/gltf-utils/gltf-constants.js +38 -32
  221. package/dist/lib/gltf-utils/gltf-utils.d.ts +7 -0
  222. package/dist/lib/gltf-utils/gltf-utils.d.ts.map +1 -1
  223. package/dist/lib/gltf-utils/gltf-utils.js +79 -45
  224. package/dist/lib/gltf-utils/resolve-url.js +17 -15
  225. package/dist/lib/parsers/parse-glb.d.ts +15 -3
  226. package/dist/lib/parsers/parse-glb.d.ts.map +1 -1
  227. package/dist/lib/parsers/parse-glb.js +143 -105
  228. package/dist/lib/parsers/parse-gltf.d.ts +8 -4
  229. package/dist/lib/parsers/parse-gltf.d.ts.map +1 -1
  230. package/dist/lib/parsers/parse-gltf.js +166 -154
  231. package/dist/lib/types/glb-types.d.ts +3 -3
  232. package/dist/lib/types/glb-types.d.ts.map +1 -1
  233. package/dist/lib/types/glb-types.js +2 -2
  234. package/dist/lib/types/gltf-json-schema.d.ts +530 -132
  235. package/dist/lib/types/gltf-json-schema.d.ts.map +1 -1
  236. package/dist/lib/types/gltf-json-schema.js +4 -2
  237. package/dist/lib/types/gltf-postprocessed-schema.d.ts +175 -210
  238. package/dist/lib/types/gltf-postprocessed-schema.d.ts.map +1 -1
  239. package/dist/lib/types/gltf-postprocessed-schema.js +4 -2
  240. package/dist/lib/types/gltf-types.d.ts +22 -7
  241. package/dist/lib/types/gltf-types.d.ts.map +1 -1
  242. package/dist/lib/types/gltf-types.js +3 -2
  243. package/dist/lib/utils/assert.js +11 -5
  244. package/dist/lib/utils/version.js +7 -2
  245. package/dist/meshopt/meshopt-decoder.js +97 -82
  246. package/dist/webp/webp.d.ts +1 -1
  247. package/dist/webp/webp.d.ts.map +1 -1
  248. package/dist/webp/webp.js +32 -23
  249. package/package.json +9 -8
  250. package/src/glb-loader.ts +4 -4
  251. package/src/glb-writer.ts +11 -3
  252. package/src/gltf-loader.ts +12 -8
  253. package/src/gltf-writer.ts +2 -2
  254. package/src/index.ts +34 -6
  255. package/src/lib/api/gltf-extensions.ts +14 -3
  256. package/src/lib/api/gltf-scenegraph.ts +61 -34
  257. package/src/lib/api/normalize-gltf-v1.ts +2 -1
  258. package/src/lib/api/post-process-gltf.ts +275 -150
  259. package/src/lib/encoders/encode-glb.ts +21 -4
  260. package/src/lib/encoders/encode-gltf.ts +19 -10
  261. package/src/lib/extensions/EXT_meshopt_compression.ts +16 -25
  262. package/src/lib/extensions/EXT_texture_webp.ts +5 -4
  263. package/src/lib/extensions/KHR_binary_gltf.ts +3 -3
  264. package/src/lib/extensions/KHR_draco_mesh_compression.ts +8 -8
  265. package/src/lib/extensions/KHR_texture_basisu.ts +4 -3
  266. package/src/lib/extensions/KHR_texture_transform.ts +308 -0
  267. package/src/lib/extensions/deprecated/EXT_feature_metadata.ts +163 -0
  268. package/src/lib/extensions/deprecated/KHR_lights_punctual.ts +2 -2
  269. package/src/lib/extensions/deprecated/KHR_materials_unlit.ts +5 -5
  270. package/src/lib/extensions/deprecated/KHR_techniques_webgl.ts +3 -2
  271. package/src/lib/gltf-utils/gltf-attribute-utils.ts +1 -1
  272. package/src/lib/gltf-utils/gltf-constants.ts +2 -2
  273. package/src/lib/gltf-utils/gltf-utils.ts +31 -0
  274. package/src/lib/parsers/parse-glb.ts +50 -24
  275. package/src/lib/parsers/parse-gltf.ts +32 -17
  276. package/src/lib/types/glb-types.ts +1 -1
  277. package/src/lib/types/gltf-json-schema.ts +582 -126
  278. package/src/lib/types/gltf-postprocessed-schema.ts +289 -212
  279. package/src/lib/types/gltf-types.ts +41 -44
  280. package/dist/bundle.js.map +0 -1
  281. package/dist/glb-loader.js.map +0 -1
  282. package/dist/glb-writer.js.map +0 -1
  283. package/dist/gltf-loader.js.map +0 -1
  284. package/dist/gltf-writer.js.map +0 -1
  285. package/dist/index.js.map +0 -1
  286. package/dist/lib/api/gltf-extensions.js.map +0 -1
  287. package/dist/lib/api/gltf-scenegraph.js.map +0 -1
  288. package/dist/lib/api/normalize-gltf-v1.js.map +0 -1
  289. package/dist/lib/api/post-process-gltf.js.map +0 -1
  290. package/dist/lib/encoders/encode-glb.js.map +0 -1
  291. package/dist/lib/encoders/encode-gltf.js.map +0 -1
  292. package/dist/lib/extensions/EXT_meshopt_compression.js.map +0 -1
  293. package/dist/lib/extensions/EXT_texture_webp.js.map +0 -1
  294. package/dist/lib/extensions/KHR_binary_gltf.js.map +0 -1
  295. package/dist/lib/extensions/KHR_draco_mesh_compression.js.map +0 -1
  296. package/dist/lib/extensions/KHR_texture_basisu.js.map +0 -1
  297. package/dist/lib/extensions/deprecated/KHR_lights_punctual.js.map +0 -1
  298. package/dist/lib/extensions/deprecated/KHR_materials_unlit.js.map +0 -1
  299. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js.map +0 -1
  300. package/dist/lib/gltf-utils/get-typed-array.js.map +0 -1
  301. package/dist/lib/gltf-utils/gltf-attribute-utils.js.map +0 -1
  302. package/dist/lib/gltf-utils/gltf-constants.js.map +0 -1
  303. package/dist/lib/gltf-utils/gltf-utils.js.map +0 -1
  304. package/dist/lib/gltf-utils/resolve-url.js.map +0 -1
  305. package/dist/lib/parsers/parse-glb.js.map +0 -1
  306. package/dist/lib/parsers/parse-gltf.js.map +0 -1
  307. package/dist/lib/types/glb-types.js.map +0 -1
  308. package/dist/lib/types/gltf-json-schema.js.map +0 -1
  309. package/dist/lib/types/gltf-postprocessed-schema.js.map +0 -1
  310. package/dist/lib/types/gltf-types.js.map +0 -1
  311. package/dist/lib/utils/assert.js.map +0 -1
  312. package/dist/lib/utils/version.js.map +0 -1
  313. package/dist/meshopt/meshopt-decoder.js.map +0 -1
  314. package/dist/webp/webp.js.map +0 -1
  315. /package/dist/{meshopt → es5/meshopt}/meshopt-encoder.ts.disabled +0 -0
@@ -1,14 +1,19 @@
1
1
  // Types forked from https://github.com/bwasty/gltf-loader-ts under MIT license
2
- // Generated from official JSON schema using `npm run generate-interface` on 2018-02-24
2
+ // Generated from official JSON schema using `npm run generate-type` = on 2018-02-24
3
3
 
4
- // tslint:disable:quotemark
5
- // tslint:disable:max-line-length
4
+ import type {TypedArray} from '@loaders.gl/loader-utils';
6
5
 
7
6
  export type GlTfId = number;
7
+
8
+ // GLTF attributes (possibly overridden)
9
+
8
10
  /**
9
11
  * Indices of those attributes that deviate from their initialization value.
10
12
  */
11
- export interface AccessorSparseIndices {
13
+ export type AccessorSparseIndices = {
14
+ id: string;
15
+
16
+ // GLTF attributes (possibly overridden)
12
17
  /**
13
18
  * The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
14
19
  */
@@ -23,12 +28,16 @@ export interface AccessorSparseIndices {
23
28
  componentType: 5121 | 5123 | 5125 | number;
24
29
  extensions?: any;
25
30
  extras?: any;
26
- [k: string]: any;
27
- }
31
+ // [k: string]: any;
32
+ };
33
+
28
34
  /**
29
35
  * Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`.
30
36
  */
31
- export interface AccessorSparseValues {
37
+ export type AccessorSparseValues = {
38
+ id: string;
39
+
40
+ // GLTF attributes (possibly overridden)
32
41
  /**
33
42
  * The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
34
43
  */
@@ -39,12 +48,16 @@ export interface AccessorSparseValues {
39
48
  byteOffset?: number;
40
49
  extensions?: any;
41
50
  extras?: any;
42
- [k: string]: any;
43
- }
51
+ // [k: string]: any;
52
+ };
53
+
44
54
  /**
45
55
  * Sparse storage of attributes that deviate from their initialization value.
46
56
  */
47
- export interface AccessorSparse {
57
+ export type AccessorSparse = {
58
+ id: string;
59
+
60
+ // GLTF attributes (possibly overridden)
48
61
  /**
49
62
  * Number of entries stored in the sparse array.
50
63
  */
@@ -59,16 +72,24 @@ export interface AccessorSparse {
59
72
  values: AccessorSparseValues;
60
73
  extensions?: any;
61
74
  extras?: any;
62
- [k: string]: any;
63
- }
75
+ // [k: string]: any;
76
+ };
77
+
64
78
  /**
65
79
  * A typed view into a bufferView. A bufferView contains raw binary data. An accessor provides a typed view into a bufferView or a subset of a bufferView similar to how WebGL's `vertexAttribPointer()` defines an attribute in a buffer.
66
80
  */
67
- export interface Accessor {
81
+ export type GLTFAccessorPostprocessed = {
82
+ id: string;
83
+ components: number;
84
+ bytesPerComponent: number;
85
+ bytesPerElement: number;
86
+ value: TypedArray;
87
+
88
+ // GLTF attributes (possibly overridden)
68
89
  /**
69
90
  * The index of the bufferView.
70
91
  */
71
- bufferView?: GlTfId;
92
+ bufferView?: GLTFBufferViewPostprocessed;
72
93
  /**
73
94
  * The offset relative to the start of the bufferView in bytes.
74
95
  */
@@ -104,12 +125,16 @@ export interface Accessor {
104
125
  name?: any;
105
126
  extensions?: any;
106
127
  extras?: any;
107
- [k: string]: any;
108
- }
128
+ // [k: string]: any;
129
+ };
130
+
109
131
  /**
110
132
  * The index of the node and TRS property that an animation channel targets.
111
133
  */
112
- export interface AnimationChannelTarget {
134
+ export type AnimationChannelTarget = {
135
+ id: string;
136
+
137
+ // GLTF attributes (possibly overridden)
113
138
  /**
114
139
  * The index of the node to target.
115
140
  */
@@ -120,12 +145,16 @@ export interface AnimationChannelTarget {
120
145
  path: 'translation' | 'rotation' | 'scale' | 'weights' | string;
121
146
  extensions?: any;
122
147
  extras?: any;
123
- [k: string]: any;
124
- }
148
+ // [k: string]: any;
149
+ };
150
+
125
151
  /**
126
152
  * Targets an animation's sampler at a node's property.
127
153
  */
128
- export interface AnimationChannel {
154
+ export type AnimationChannel = {
155
+ id: string;
156
+
157
+ // GLTF attributes (possibly overridden)
129
158
  /**
130
159
  * The index of a sampler in this animation used to compute the value for the target.
131
160
  */
@@ -136,12 +165,16 @@ export interface AnimationChannel {
136
165
  target: AnimationChannelTarget;
137
166
  extensions?: any;
138
167
  extras?: any;
139
- [k: string]: any;
140
- }
168
+ // [k: string]: any;
169
+ };
170
+
141
171
  /**
142
172
  * Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
143
173
  */
144
- export interface AnimationSampler {
174
+ export type AnimationSampler = {
175
+ id: string;
176
+
177
+ // GLTF attributes (possibly overridden)
145
178
  /**
146
179
  * The index of an accessor containing keyframe input values, e.g., time.
147
180
  */
@@ -156,29 +189,31 @@ export interface AnimationSampler {
156
189
  output: GlTfId;
157
190
  extensions?: any;
158
191
  extras?: any;
159
- [k: string]: any;
160
- }
192
+ // [k: string]: any;
193
+ };
194
+
161
195
  /**
162
196
  * A keyframe animation.
163
197
  */
164
- export interface Animation {
165
- /**
166
- * An array of channels, each of which targets an animation's sampler at a node's property. Different channels of the same animation can't have equal targets.
167
- */
198
+ export type GLTFAnimationPostprocessed = {
199
+ id: string;
200
+
201
+ // GLTF attributes (possibly overridden)
202
+ /** An array of channels, each of which targets an animation's sampler at a node's property. Different channels of the same animation can't have equal targets. */
168
203
  channels: AnimationChannel[];
169
- /**
170
- * An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
171
- */
204
+ /** An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target). */
172
205
  samplers: AnimationSampler[];
173
206
  name?: any;
174
207
  extensions?: any;
175
208
  extras?: any;
176
- [k: string]: any;
177
- }
209
+ // [k: string]: any;
210
+ };
211
+
178
212
  /**
179
213
  * Metadata about the glTF asset.
180
214
  */
181
- export interface Asset {
215
+ export type Asset = {
216
+ // GLTF attributes (possibly overridden)
182
217
  /**
183
218
  * A copyright message suitable for display to credit the content creator.
184
219
  */
@@ -197,34 +232,41 @@ export interface Asset {
197
232
  minVersion?: string;
198
233
  extensions?: any;
199
234
  extras?: any;
200
- [k: string]: any;
201
- }
235
+ // [k: string]: any;
236
+ };
237
+
202
238
  /**
203
239
  * A buffer points to binary geometry, animation, or skins.
204
240
  */
205
- export interface Buffer {
206
- /**
207
- * The uri of the buffer.
208
- */
209
- uri?: string;
210
- /**
211
- * The length of the buffer in bytes.
212
- */
241
+ export type GLTFBufferPostprocessed = {
242
+ id?: string;
243
+ arrayBuffer: ArrayBuffer;
244
+ byteOffset: number;
245
+
246
+ // GLTF attributes (possibly overridden)
247
+ /** The length of the buffer in bytes. */
213
248
  byteLength: number;
249
+
250
+ /** The uri of the buffer. */
251
+ uri?: string;
214
252
  name?: any;
215
253
  extensions?: any;
216
254
  extras?: any;
217
- [k: string]: any;
218
- }
255
+ // [k: string]: any;
256
+ };
257
+
219
258
  /**
220
259
  * A view into a buffer generally representing a subset of the buffer.
221
260
  */
222
- export interface BufferView {
261
+ export type GLTFBufferViewPostprocessed = {
223
262
  id: string;
263
+ data: Uint8Array;
264
+
265
+ // GLTF attributes (possibly overridden)
224
266
  /**
225
267
  * The index of the buffer.
226
268
  */
227
- buffer: ArrayBuffer;
269
+ buffer: GLTFBufferPostprocessed;
228
270
  /**
229
271
  * The offset into the buffer in bytes.
230
272
  */
@@ -244,12 +286,16 @@ export interface BufferView {
244
286
  name?: any;
245
287
  extensions?: any;
246
288
  extras?: any;
247
- [k: string]: any;
248
- }
289
+ // [k: string]: any;
290
+ };
291
+
249
292
  /**
250
293
  * An orthographic camera containing properties to create an orthographic projection matrix.
251
294
  */
252
- export interface CameraOrthographic {
295
+ export type CameraOrthographic = {
296
+ id: string;
297
+
298
+ // GLTF attributes (possibly overridden)
253
299
  /**
254
300
  * The floating-point horizontal magnification of the view. Must not be zero.
255
301
  */
@@ -268,12 +314,16 @@ export interface CameraOrthographic {
268
314
  znear: number;
269
315
  extensions?: any;
270
316
  extras?: any;
271
- [k: string]: any;
272
- }
317
+ // [k: string]: any;
318
+ };
319
+
273
320
  /**
274
321
  * A perspective camera containing properties to create a perspective projection matrix.
275
322
  */
276
- export interface CameraPerspective {
323
+ export type CameraPerspective = {
324
+ id: string;
325
+
326
+ // GLTF attributes (possibly overridden)
277
327
  /**
278
328
  * The floating-point aspect ratio of the field of view.
279
329
  */
@@ -292,12 +342,14 @@ export interface CameraPerspective {
292
342
  znear: number;
293
343
  extensions?: any;
294
344
  extras?: any;
295
- [k: string]: any;
296
- }
345
+ // [k: string]: any;
346
+ };
347
+
297
348
  /**
298
349
  * A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene.
299
350
  */
300
- export interface Camera {
351
+ export type GLTFCameraPostprocessed = {
352
+ // GLTF attributes (possibly overridden)
301
353
  /**
302
354
  * An orthographic camera containing properties to create an orthographic projection matrix.
303
355
  */
@@ -313,12 +365,30 @@ export interface Camera {
313
365
  name?: any;
314
366
  extensions?: any;
315
367
  extras?: any;
316
- [k: string]: any;
317
- }
368
+ // [k: string]: any;
369
+ };
370
+
318
371
  /**
319
- * Image data used to create a texture. Image can be referenced by URI or `bufferView` index. `mimeType` is required in the latter case.
372
+ * GLTFImagePostprocessed data used to create a texture.
373
+ * GLTFImagePostprocessed can be referenced by URI or `bufferView` index.
374
+ * `mimeType` is required in the latter case.
375
+ * @todo GLTF image postprocessing
320
376
  */
321
- export interface Image {
377
+ export type GLTFImagePostprocessed = {
378
+ id: string;
379
+ // TODO - extend
380
+ image: {
381
+ data: Uint8Array;
382
+ compressed?: boolean;
383
+ height?: number;
384
+ width?: number;
385
+ components?: number;
386
+ mimeType?: string;
387
+ };
388
+
389
+ compressed?: boolean;
390
+
391
+ // GLTF attributes (possibly overridden)
322
392
  /**
323
393
  * The uri of the image.
324
394
  */
@@ -330,16 +400,21 @@ export interface Image {
330
400
  /**
331
401
  * The index of the bufferView that contains the image. Use this instead of the image's uri property.
332
402
  */
333
- bufferView?: BufferView;
403
+ bufferView?: GLTFBufferViewPostprocessed;
334
404
  name?: any;
335
405
  extensions?: any;
336
406
  extras?: any;
337
- [k: string]: any;
338
- }
407
+ // [k: string]: any;
408
+ };
409
+
339
410
  /**
340
411
  * Reference to a texture.
341
412
  */
342
- export interface TextureInfo {
413
+ export type GLTFTextureInfoPostprocessed = {
414
+ id: string;
415
+ texture: GLTFTexturePostprocessed;
416
+
417
+ // GLTF attributes (possibly overridden)
343
418
  /**
344
419
  * The index of the texture.
345
420
  */
@@ -350,12 +425,16 @@ export interface TextureInfo {
350
425
  texCoord?: number;
351
426
  extensions?: any;
352
427
  extras?: any;
353
- [k: string]: any;
354
- }
428
+ // [k: string]: any;
429
+ };
430
+
355
431
  /**
356
432
  * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
357
433
  */
358
- export interface MaterialPbrMetallicRoughness {
434
+ export type MaterialPbrMetallicRoughnessPostprocessed = {
435
+ id: string;
436
+
437
+ // GLTF attributes (possibly overridden)
359
438
  /**
360
439
  * The material's base color factor.
361
440
  */
@@ -363,7 +442,7 @@ export interface MaterialPbrMetallicRoughness {
363
442
  /**
364
443
  * The base color texture.
365
444
  */
366
- baseColorTexture?: TextureInfo;
445
+ baseColorTexture?: GLTFTextureInfoPostprocessed;
367
446
  /**
368
447
  * The metalness of the material.
369
448
  */
@@ -375,12 +454,17 @@ export interface MaterialPbrMetallicRoughness {
375
454
  /**
376
455
  * The metallic-roughness texture.
377
456
  */
378
- metallicRoughnessTexture?: TextureInfo;
457
+ metallicRoughnessTexture?: GLTFTextureInfoPostprocessed;
379
458
  extensions?: any;
380
459
  extras?: any;
381
- [k: string]: any;
382
- }
383
- export interface MaterialNormalTextureInfo {
460
+ // [k: string]: any;
461
+ };
462
+
463
+ export type MaterialNormalTextureInfoPostprocessed = {
464
+ id: string;
465
+ texture: GLTFTexturePostprocessed;
466
+
467
+ // GLTF attributes (possibly overridden)
384
468
  index?: any;
385
469
  texCoord?: any;
386
470
  /**
@@ -389,9 +473,14 @@ export interface MaterialNormalTextureInfo {
389
473
  scale?: number;
390
474
  extensions?: any;
391
475
  extras?: any;
392
- [k: string]: any;
393
- }
394
- export interface MaterialOcclusionTextureInfo {
476
+ // [k: string]: any;
477
+ };
478
+
479
+ export type MaterialOcclusionTextureInfoPostprocessed = {
480
+ id: string;
481
+ texture: GLTFTexturePostprocessed;
482
+
483
+ // GLTF attributes (possibly overridden)
395
484
  index?: any;
396
485
  texCoord?: any;
397
486
  /**
@@ -400,31 +489,35 @@ export interface MaterialOcclusionTextureInfo {
400
489
  strength?: number;
401
490
  extensions?: any;
402
491
  extras?: any;
403
- [k: string]: any;
404
- }
492
+ // [k: string]: any;
493
+ };
494
+
405
495
  /**
406
496
  * The material appearance of a primitive.
407
497
  */
408
- export interface Material {
498
+ export type GLTFMaterialPostprocessed = {
499
+ id: string;
500
+
501
+ // GLTF attributes (possibly overridden)
409
502
  name?: any;
410
503
  extensions?: any;
411
504
  extras?: any;
412
505
  /**
413
506
  * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of `pbrMetallicRoughness` apply.
414
507
  */
415
- pbrMetallicRoughness?: MaterialPbrMetallicRoughness;
508
+ pbrMetallicRoughness?: MaterialPbrMetallicRoughnessPostprocessed;
416
509
  /**
417
510
  * The normal map texture.
418
511
  */
419
- normalTexture?: MaterialNormalTextureInfo;
512
+ normalTexture?: MaterialNormalTextureInfoPostprocessed;
420
513
  /**
421
514
  * The occlusion map texture.
422
515
  */
423
- occlusionTexture?: MaterialOcclusionTextureInfo;
516
+ occlusionTexture?: MaterialOcclusionTextureInfoPostprocessed;
424
517
  /**
425
518
  * The emissive map texture.
426
519
  */
427
- emissiveTexture?: TextureInfo;
520
+ emissiveTexture?: GLTFTextureInfoPostprocessed;
428
521
  /**
429
522
  * The emissive color of the material.
430
523
  */
@@ -441,48 +534,50 @@ export interface Material {
441
534
  * Specifies whether the material is double sided.
442
535
  */
443
536
  doubleSided?: boolean;
444
- [k: string]: any;
445
- }
537
+ // [k: string]: any;
538
+ };
539
+
446
540
  /**
447
541
  * Geometry to be rendered with the given material.
448
542
  */
449
- export interface MeshPrimitive {
543
+ export type GLTFMeshPrimitivePostprocessed = {
544
+ // GLTF attributes (possibly overridden)
450
545
  /**
451
546
  * A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.
452
547
  */
453
548
  attributes: {
454
- [k: string]: GlTfId;
549
+ [k: string]: GLTFAccessorPostprocessed;
455
550
  };
456
551
  /**
457
552
  * The index of the accessor that contains the indices.
458
553
  */
459
- indices?: GlTfId;
554
+ indices?: GLTFAccessorPostprocessed;
460
555
  /**
461
556
  * The index of the material to apply to this primitive when rendering.
462
557
  */
463
- material?: GlTfId;
558
+ material?: GLTFMaterialPostprocessed;
464
559
  /**
465
560
  * The type of primitives to render.
466
561
  */
467
562
  mode?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | number;
468
- /**
469
- * An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target.
470
- */
563
+ /** An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target. */
471
564
  targets?: {
472
565
  [k: string]: GlTfId;
473
566
  }[];
474
567
  extensions?: any;
475
568
  extras?: any;
476
- [k: string]: any;
477
- }
569
+ // [k: string]: any;
570
+ };
571
+
478
572
  /**
479
573
  * A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene.
480
574
  */
481
- export interface Mesh {
482
- /**
483
- * An array of primitives, each defining geometry to be rendered with a material.
484
- */
485
- primitives: MeshPrimitive[];
575
+ export type GLTFMeshPostprocessed = {
576
+ id: string;
577
+
578
+ // GLTF attributes (possibly overridden)
579
+ /** An array of primitives, each defining geometry to be rendered with a material. */
580
+ primitives: GLTFMeshPrimitivePostprocessed[];
486
581
  /**
487
582
  * Array of weights to be applied to the Morph Targets.
488
583
  */
@@ -490,24 +585,28 @@ export interface Mesh {
490
585
  name?: any;
491
586
  extensions?: any;
492
587
  extras?: any;
493
- [k: string]: any;
494
- }
588
+ // [k: string]: any;
589
+ };
590
+
495
591
  /**
496
592
  * A node in the node hierarchy. When the node contains `skin`, all `mesh.primitives` must contain `JOINTS_0` and `WEIGHTS_0` attributes. A node can have either a `matrix` or any combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are converted to matrices and postmultiplied in the `T * R * S` order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), only TRS properties may be present; `matrix` will not be present.
497
593
  */
498
- export interface Node {
594
+ export type GLTFNodePostprocessed = {
595
+ id: string;
596
+
597
+ // GLTF attributes (possibly overridden)
499
598
  /**
500
599
  * The index of the camera referenced by this node.
501
600
  */
502
- camera?: GlTfId;
601
+ camera?: GLTFCameraPostprocessed;
503
602
  /**
504
603
  * The indices of this node's children.
505
604
  */
506
- children?: GlTfId[];
605
+ children?: GLTFNodePostprocessed[];
507
606
  /**
508
607
  * The index of the skin referenced by this node.
509
608
  */
510
- skin?: GlTfId;
609
+ skin?: GLTFSkinPostprocessed;
511
610
  /**
512
611
  * A floating-point 4x4 transformation matrix stored in column-major order.
513
612
  */
@@ -515,7 +614,7 @@ export interface Node {
515
614
  /**
516
615
  * The index of the mesh in this node.
517
616
  */
518
- mesh?: GlTfId;
617
+ mesh?: GLTFMeshPostprocessed;
519
618
  /**
520
619
  * The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
521
620
  */
@@ -535,54 +634,58 @@ export interface Node {
535
634
  name?: any;
536
635
  extensions?: any;
537
636
  extras?: any;
538
- [k: string]: any;
539
- }
637
+ // [k: string]: any;
638
+ };
639
+
540
640
  /**
541
- * Texture sampler properties for filtering and wrapping modes.
641
+ * GLTFTexturePostprocessed sampler properties for filtering and wrapping modes.
542
642
  */
543
- export interface Sampler {
544
- /**
545
- * Magnification filter.
546
- */
643
+ export type GLTFSamplerPostprocessed = {
644
+ id: string;
645
+ /** WebGL parameters */
646
+ parameters: Record<string, number>;
647
+
648
+ // GLTF attributes (possibly overridden)
649
+ /** Magnification filter. */
547
650
  magFilter?: 9728 | 9729 | number;
548
- /**
549
- * Minification filter.
550
- */
651
+ /** Minification filter. */
551
652
  minFilter?: 9728 | 9729 | 9984 | 9985 | 9986 | 9987 | number;
552
- /**
553
- * s wrapping mode.
554
- */
653
+ /** s wrapping mode. */
555
654
  wrapS?: 33071 | 33648 | 10497 | number;
556
- /**
557
- * t wrapping mode.
558
- */
655
+ /** t wrapping mode. */
559
656
  wrapT?: 33071 | 33648 | 10497 | number;
560
657
  name?: any;
561
658
  extensions?: any;
562
659
  extras?: any;
563
- [k: string]: any;
564
- }
660
+ // [k: string]: any;
661
+ };
662
+
565
663
  /**
566
664
  * The root nodes of a scene.
567
665
  */
568
- export interface Scene {
569
- /**
570
- * The indices of each root node.
571
- */
572
- nodes?: GlTfId[];
666
+ export type GLTFScenePostprocessed = {
667
+ id: string;
668
+
669
+ // GLTF attributes (possibly overridden)
670
+ /** The indices of each root node. */
671
+ nodes?: GLTFNodePostprocessed[];
573
672
  name?: any;
574
673
  extensions?: any;
575
674
  extras?: any;
576
- [k: string]: any;
577
- }
675
+ // [k: string]: any;
676
+ };
677
+
578
678
  /**
579
679
  * Joints and matrices defining a skin.
580
680
  */
581
- export interface Skin {
681
+ export type GLTFSkinPostprocessed = {
682
+ id: string;
683
+
684
+ // GLTF attributes (possibly overridden)
582
685
  /**
583
686
  * The index of the accessor containing the floating-point 4x4 inverse-bind matrices. The default is that each matrix is a 4x4 identity matrix, which implies that inverse-bind matrices were pre-applied.
584
687
  */
585
- inverseBindMatrices?: GlTfId;
688
+ inverseBindMatrices?: GLTFAccessorPostprocessed;
586
689
  /**
587
690
  * The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root.
588
691
  */
@@ -594,98 +697,72 @@ export interface Skin {
594
697
  name?: any;
595
698
  extensions?: any;
596
699
  extras?: any;
597
- [k: string]: any;
598
- }
700
+ // [k: string]: any;
701
+ };
702
+
599
703
  /**
600
704
  * A texture and its sampler.
601
705
  */
602
- export interface Texture {
706
+ export type GLTFTexturePostprocessed = {
707
+ id: string;
708
+
709
+ // GLTF attributes (possibly overridden)
603
710
  /**
604
711
  * The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used.
605
712
  */
606
- sampler?: GlTfId;
713
+ sampler?: GLTFSamplerPostprocessed;
607
714
  /**
608
715
  * The index of the image used by this texture.
609
716
  */
610
- source?: GlTfId;
717
+ source?: GLTFImagePostprocessed;
611
718
  name?: any;
612
719
  extensions?: any;
613
720
  extras?: any;
614
- [k: string]: any;
615
- }
721
+ // [k: string]: any;
722
+ };
723
+
616
724
  /**
617
725
  * The root object for a glTF asset.
618
726
  */
619
- export interface GlTf {
620
- /**
621
- * Names of glTF extensions used somewhere in this asset.
622
- */
623
- extensionsUsed?: string[];
624
- /**
625
- * Names of glTF extensions required to properly load this asset.
626
- */
627
- extensionsRequired?: string[];
628
- /**
629
- * An array of accessors.
630
- */
631
- accessors?: Accessor[];
632
- /**
633
- * An array of keyframe animations.
634
- */
635
- animations?: Animation[];
636
- /**
637
- * Metadata about the glTF asset.
638
- */
727
+ export type GLTFPostprocessed = {
728
+ id: string;
729
+
730
+ // GLTF attributes (possibly overridden)
731
+ /** Names of glTF extensions used somewhere in this asset. */
732
+ extensionsUsed: string[];
733
+ /** Names of glTF extensions required to properly load this asset. */
734
+ extensionsRequired: string[];
735
+ /** An array of accessors. */
736
+ accessors: GLTFAccessorPostprocessed[];
737
+ /** An array of keyframe animations. */
738
+ animations: GLTFAnimationPostprocessed[];
739
+ /** Metadata about the glTF asset. */
639
740
  asset: Asset;
640
- /**
641
- * An array of buffers.
642
- */
643
- buffers?: Buffer[];
644
- /**
645
- * An array of bufferViews.
646
- */
647
- bufferViews?: BufferView[];
648
- /**
649
- * An array of cameras.
650
- */
651
- cameras?: Camera[];
652
- /**
653
- * An array of images.
654
- */
655
- images?: Image[];
656
- /**
657
- * An array of materials.
658
- */
659
- materials?: Material[];
660
- /**
661
- * An array of meshes.
662
- */
663
- meshes?: Mesh[];
664
- /**
665
- * An array of nodes.
666
- */
667
- nodes?: Node[];
668
- /**
669
- * An array of samplers.
670
- */
671
- samplers?: Sampler[];
672
- /**
673
- * The index of the default scene.
674
- */
675
- scene?: GlTfId;
676
- /**
677
- * An array of scenes.
678
- */
679
- scenes?: Scene[];
680
- /**
681
- * An array of skins.
682
- */
683
- skins?: Skin[];
684
- /**
685
- * An array of textures.
686
- */
687
- textures?: Texture[];
688
- extensions?: any;
741
+ /** An array of buffers. */
742
+ buffers: GLTFBufferPostprocessed[];
743
+ /** An array of bufferViews. */
744
+ bufferViews: GLTFBufferViewPostprocessed[];
745
+ /** An array of cameras. */
746
+ cameras: GLTFCameraPostprocessed[];
747
+ /** An array of images. */
748
+ images: GLTFImagePostprocessed[];
749
+ /** An array of materials. */
750
+ materials: GLTFMaterialPostprocessed[];
751
+ /** An array of meshes. */
752
+ meshes: GLTFMeshPostprocessed[];
753
+ /** An array of nodes. */
754
+ nodes: GLTFNodePostprocessed[];
755
+ /** An array of samplers. */
756
+ samplers: GLTFSamplerPostprocessed[];
757
+ /** The index of the default scene. */
758
+ scene?: GLTFScenePostprocessed;
759
+ /** An array of scenes. */
760
+ scenes: GLTFScenePostprocessed[];
761
+ /** An array of skins. */
762
+ skins: GLTFSkinPostprocessed[];
763
+ /** An array of textures. */
764
+ textures: GLTFTexturePostprocessed[];
765
+ extensions?: Record<string, Record<string, any>>;
689
766
  extras?: any;
690
- [k: string]: any;
691
- }
767
+ // [k: string]: any;
768
+ };