@loaders.gl/gltf 4.0.0-alpha.1 → 4.0.0-alpha.11

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