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

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 (292) hide show
  1. package/dist/bundle.js +2 -2
  2. package/dist/dist.min.js +2037 -1013
  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 +35 -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 +49 -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 +578 -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 +422 -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 +21 -0
  26. package/dist/es5/lib/encoders/encode-gltf.js.map +1 -0
  27. package/dist/es5/lib/extensions/EXT_meshopt_compression.js +96 -0
  28. package/dist/es5/lib/extensions/EXT_meshopt_compression.js.map +1 -0
  29. package/dist/es5/lib/extensions/EXT_texture_webp.js +44 -0
  30. package/dist/es5/lib/extensions/EXT_texture_webp.js.map +1 -0
  31. package/dist/es5/lib/extensions/KHR_binary_gltf.js +40 -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 +246 -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 +37 -0
  36. package/dist/es5/lib/extensions/KHR_texture_basisu.js.map +1 -0
  37. package/dist/es5/lib/extensions/KHR_texture_transform.js +229 -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 +62 -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 +287 -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 +7 -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 +441 -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 +341 -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 +42 -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 +110 -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 +181 -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 +54 -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 +156 -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 +3 -2
  153. package/dist/glb-loader.d.ts.map +1 -1
  154. package/dist/glb-loader.js +33 -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 +34 -26
  158. package/dist/gltf-loader.d.ts +3 -2
  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 +2 -1
  165. package/dist/index.d.ts.map +1 -1
  166. package/dist/index.js +21 -7
  167. package/dist/lib/api/gltf-extensions.d.ts +6 -1
  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 +5 -11
  171. package/dist/lib/api/gltf-scenegraph.d.ts.map +1 -1
  172. package/dist/lib/api/gltf-scenegraph.js +563 -512
  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.js +324 -376
  176. package/dist/lib/encoders/encode-glb.d.ts +2 -1
  177. package/dist/lib/encoders/encode-glb.d.ts.map +1 -1
  178. package/dist/lib/encoders/encode-glb.js +56 -58
  179. package/dist/lib/encoders/encode-gltf.d.ts +18 -0
  180. package/dist/lib/encoders/encode-gltf.d.ts.map +1 -1
  181. package/dist/lib/encoders/encode-gltf.js +33 -12
  182. package/dist/lib/extensions/EXT_meshopt_compression.d.ts +0 -3
  183. package/dist/lib/extensions/EXT_meshopt_compression.d.ts.map +1 -1
  184. package/dist/lib/extensions/EXT_meshopt_compression.js +39 -50
  185. package/dist/lib/extensions/EXT_texture_webp.d.ts.map +1 -1
  186. package/dist/lib/extensions/EXT_texture_webp.js +35 -28
  187. package/dist/lib/extensions/KHR_binary_gltf.js +39 -23
  188. package/dist/lib/extensions/KHR_draco_mesh_compression.js +126 -111
  189. package/dist/lib/extensions/KHR_texture_basisu.d.ts.map +1 -1
  190. package/dist/lib/extensions/KHR_texture_basisu.js +29 -19
  191. package/dist/lib/extensions/KHR_texture_transform.d.ts +13 -0
  192. package/dist/lib/extensions/KHR_texture_transform.d.ts.map +1 -0
  193. package/dist/lib/extensions/KHR_texture_transform.js +230 -0
  194. package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts +6 -0
  195. package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts.map +1 -0
  196. package/dist/lib/extensions/deprecated/EXT_feature_metadata.js +118 -0
  197. package/dist/lib/extensions/deprecated/KHR_lights_punctual.js +57 -44
  198. package/dist/lib/extensions/deprecated/KHR_materials_unlit.js +42 -32
  199. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts.map +1 -1
  200. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js +76 -62
  201. package/dist/lib/gltf-utils/get-typed-array.js +39 -14
  202. package/dist/lib/gltf-utils/gltf-attribute-utils.js +65 -65
  203. package/dist/lib/gltf-utils/gltf-constants.d.ts +17 -0
  204. package/dist/lib/gltf-utils/gltf-constants.d.ts.map +1 -1
  205. package/dist/lib/gltf-utils/gltf-constants.js +38 -32
  206. package/dist/lib/gltf-utils/gltf-utils.js +52 -45
  207. package/dist/lib/gltf-utils/resolve-url.js +17 -15
  208. package/dist/lib/parsers/parse-glb.d.ts +1 -1
  209. package/dist/lib/parsers/parse-glb.d.ts.map +1 -1
  210. package/dist/lib/parsers/parse-glb.js +120 -107
  211. package/dist/lib/parsers/parse-gltf.d.ts +2 -2
  212. package/dist/lib/parsers/parse-gltf.d.ts.map +1 -1
  213. package/dist/lib/parsers/parse-gltf.js +187 -154
  214. package/dist/lib/types/glb-types.d.ts +3 -3
  215. package/dist/lib/types/glb-types.d.ts.map +1 -1
  216. package/dist/lib/types/glb-types.js +2 -2
  217. package/dist/lib/types/gltf-json-schema.d.ts +396 -11
  218. package/dist/lib/types/gltf-json-schema.d.ts.map +1 -1
  219. package/dist/lib/types/gltf-json-schema.js +4 -2
  220. package/dist/lib/types/gltf-postprocessed-schema.d.ts +10 -10
  221. package/dist/lib/types/gltf-postprocessed-schema.d.ts.map +1 -1
  222. package/dist/lib/types/gltf-postprocessed-schema.js +4 -2
  223. package/dist/lib/types/gltf-types.d.ts +8 -5
  224. package/dist/lib/types/gltf-types.d.ts.map +1 -1
  225. package/dist/lib/types/gltf-types.js +3 -2
  226. package/dist/lib/utils/assert.js +11 -5
  227. package/dist/lib/utils/version.js +7 -2
  228. package/dist/meshopt/meshopt-decoder.js +97 -82
  229. package/dist/webp/webp.d.ts +1 -1
  230. package/dist/webp/webp.d.ts.map +1 -1
  231. package/dist/webp/webp.js +32 -23
  232. package/package.json +9 -8
  233. package/src/glb-loader.ts +1 -1
  234. package/src/glb-writer.ts +9 -3
  235. package/src/gltf-writer.ts +2 -2
  236. package/src/index.ts +10 -1
  237. package/src/lib/api/gltf-extensions.ts +13 -2
  238. package/src/lib/api/gltf-scenegraph.ts +21 -12
  239. package/src/lib/api/normalize-gltf-v1.ts +2 -1
  240. package/src/lib/encoders/encode-glb.ts +8 -1
  241. package/src/lib/encoders/encode-gltf.ts +18 -9
  242. package/src/lib/extensions/EXT_meshopt_compression.ts +12 -19
  243. package/src/lib/extensions/EXT_texture_webp.ts +3 -2
  244. package/src/lib/extensions/KHR_binary_gltf.ts +1 -1
  245. package/src/lib/extensions/KHR_draco_mesh_compression.ts +1 -1
  246. package/src/lib/extensions/KHR_texture_basisu.ts +1 -0
  247. package/src/lib/extensions/KHR_texture_transform.ts +305 -0
  248. package/src/lib/extensions/deprecated/EXT_feature_metadata.ts +163 -0
  249. package/src/lib/extensions/deprecated/KHR_materials_unlit.ts +3 -3
  250. package/src/lib/extensions/deprecated/KHR_techniques_webgl.ts +1 -0
  251. package/src/lib/gltf-utils/gltf-constants.ts +2 -2
  252. package/src/lib/parsers/parse-gltf.ts +10 -1
  253. package/src/lib/types/glb-types.ts +1 -1
  254. package/src/lib/types/gltf-json-schema.ts +434 -5
  255. package/src/lib/types/gltf-postprocessed-schema.ts +9 -9
  256. package/src/lib/types/gltf-types.ts +24 -3
  257. package/dist/bundle.js.map +0 -1
  258. package/dist/glb-loader.js.map +0 -1
  259. package/dist/glb-writer.js.map +0 -1
  260. package/dist/gltf-loader.js.map +0 -1
  261. package/dist/gltf-writer.js.map +0 -1
  262. package/dist/index.js.map +0 -1
  263. package/dist/lib/api/gltf-extensions.js.map +0 -1
  264. package/dist/lib/api/gltf-scenegraph.js.map +0 -1
  265. package/dist/lib/api/normalize-gltf-v1.js.map +0 -1
  266. package/dist/lib/api/post-process-gltf.js.map +0 -1
  267. package/dist/lib/encoders/encode-glb.js.map +0 -1
  268. package/dist/lib/encoders/encode-gltf.js.map +0 -1
  269. package/dist/lib/extensions/EXT_meshopt_compression.js.map +0 -1
  270. package/dist/lib/extensions/EXT_texture_webp.js.map +0 -1
  271. package/dist/lib/extensions/KHR_binary_gltf.js.map +0 -1
  272. package/dist/lib/extensions/KHR_draco_mesh_compression.js.map +0 -1
  273. package/dist/lib/extensions/KHR_texture_basisu.js.map +0 -1
  274. package/dist/lib/extensions/deprecated/KHR_lights_punctual.js.map +0 -1
  275. package/dist/lib/extensions/deprecated/KHR_materials_unlit.js.map +0 -1
  276. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js.map +0 -1
  277. package/dist/lib/gltf-utils/get-typed-array.js.map +0 -1
  278. package/dist/lib/gltf-utils/gltf-attribute-utils.js.map +0 -1
  279. package/dist/lib/gltf-utils/gltf-constants.js.map +0 -1
  280. package/dist/lib/gltf-utils/gltf-utils.js.map +0 -1
  281. package/dist/lib/gltf-utils/resolve-url.js.map +0 -1
  282. package/dist/lib/parsers/parse-glb.js.map +0 -1
  283. package/dist/lib/parsers/parse-gltf.js.map +0 -1
  284. package/dist/lib/types/glb-types.js.map +0 -1
  285. package/dist/lib/types/gltf-json-schema.js.map +0 -1
  286. package/dist/lib/types/gltf-postprocessed-schema.js.map +0 -1
  287. package/dist/lib/types/gltf-types.js.map +0 -1
  288. package/dist/lib/utils/assert.js.map +0 -1
  289. package/dist/lib/utils/version.js.map +0 -1
  290. package/dist/meshopt/meshopt-decoder.js.map +0 -1
  291. package/dist/webp/webp.js.map +0 -1
  292. /package/dist/{meshopt → es5/meshopt}/meshopt-encoder.ts.disabled +0 -0
@@ -394,7 +394,7 @@ export interface MaterialPbrMetallicRoughness {
394
394
  // [k: string]: any;
395
395
  }
396
396
  export interface MaterialNormalTextureInfo {
397
- index?: any;
397
+ index: any;
398
398
  texCoord?: any;
399
399
  /**
400
400
  * The scalar multiplier applied to each normal vector of the normal texture.
@@ -405,7 +405,7 @@ export interface MaterialNormalTextureInfo {
405
405
  // [k: string]: any;
406
406
  }
407
407
  export interface MaterialOcclusionTextureInfo {
408
- index?: any;
408
+ index: any;
409
409
  texCoord?: any;
410
410
  /**
411
411
  * A scalar multiplier controlling the amount of occlusion applied.
@@ -709,9 +709,9 @@ export interface GLTF {
709
709
  * An array of textures.
710
710
  */
711
711
  textures?: Texture[];
712
- extensions?: any;
713
- extras?: any;
714
- // [k: string]: any;
712
+ extensions?: unknown;
713
+ extras?: unknown;
714
+ [k: string]: unknown;
715
715
  }
716
716
 
717
717
  // GLTF Extensions
@@ -783,3 +783,432 @@ export type GLTF_MSFT_texture_dds = {
783
783
  source: GLTFId;
784
784
  extras?: any;
785
785
  };
786
+
787
+ /**
788
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#gltf-extension-1
789
+ */
790
+ export type GLTF_EXT_feature_metadata = {
791
+ /** An object defining classes and enums. */
792
+ schema?: ExtFeatureMetadataSchema;
793
+ /** A uri to an external schema file. */
794
+ schemaUri?: string;
795
+ /** An object containing statistics about features. */
796
+ statistics?: Statistics;
797
+ /** A dictionary, where each key is a feature table ID and each value is an object defining the feature table. */
798
+ featureTables?: {
799
+ [key: string]: EXT_feature_metadata_feature_table;
800
+ };
801
+ /** A dictionary, where each key is a feature texture ID and each value is an object defining the feature texture. */
802
+ featureTextures?: {
803
+ [key: string]: FeatureTexture;
804
+ };
805
+ extensions?: any;
806
+ extras?: any;
807
+ [key: string]: any;
808
+ };
809
+
810
+ /**
811
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#schema
812
+ */
813
+ type ExtFeatureMetadataSchema = {
814
+ /** The name of the schema. */
815
+ name?: string;
816
+ /** The description of the schema. */
817
+ description?: string;
818
+ /** Application-specific version of the schema. */
819
+ version?: string;
820
+ /** A dictionary, where each key is a class ID and each value is an object defining the class. */
821
+ classes?: {
822
+ [key: string]: EXT_feature_metadata_class_object;
823
+ };
824
+ /** A dictionary, where each key is an enum ID and each value is an object defining the values for the enum. */
825
+ enums?: {
826
+ [key: string]: ExtFeatureMetadataEnum;
827
+ };
828
+ extensions?: any;
829
+ extras?: any;
830
+ [key: string]: any;
831
+ };
832
+
833
+ /**
834
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class
835
+ */
836
+ export type EXT_feature_metadata_class_object = {
837
+ /** The name of the class, e.g. for display purposes. */
838
+ name?: string;
839
+ /** The description of the class. */
840
+ description?: string;
841
+ /** A dictionary, where each key is a property ID and each value is an object defining the property. */
842
+ properties: {
843
+ [key: string]: ClassProperty;
844
+ };
845
+ extensions?: any;
846
+ extras?: any;
847
+ [key: string]: any;
848
+ };
849
+
850
+ /**
851
+ * https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-property
852
+ */
853
+ export type ClassProperty = {
854
+ /** The name of the property, e.g. for display purposes. */
855
+ name?: string;
856
+ /** The description of the property. */
857
+ description?: string;
858
+ /**
859
+ * The property type. If ENUM is used, then enumType must also be specified.
860
+ * If ARRAY is used, then componentType must also be specified.
861
+ * ARRAY is a fixed-length array when componentCount is defined, and variable-length otherwise.
862
+ */
863
+ type: ClassPropertyType;
864
+ /**
865
+ * An enum ID as declared in the enums dictionary.
866
+ * This value must be specified when type or componentType is ENUM.
867
+ */
868
+ enumType?: string;
869
+ /**
870
+ * When type is ARRAY this indicates the type of each component of the array.
871
+ * If ENUM is used, then enumType must also be specified.
872
+ */
873
+ componentType?:
874
+ | 'INT8'
875
+ | 'UINT8'
876
+ | 'INT16'
877
+ | 'UINT16'
878
+ | 'INT32'
879
+ | 'UINT32'
880
+ | 'INT64'
881
+ | 'UINT64'
882
+ | 'FLOAT32'
883
+ | 'FLOAT64'
884
+ | 'BOOLEAN'
885
+ | 'STRING'
886
+ | 'ENUM';
887
+ /** The number of components per element for ARRAY elements. */
888
+ componentCount?: number;
889
+ /**
890
+ * Specifies whether integer values are normalized.
891
+ * This applies both when type is an integer type, or when type is ARRAY with a componentType that is an integer type.
892
+ * For unsigned integer types, values are normalized between [0.0, 1.0].
893
+ * For signed integer types, values are normalized between [-1.0, 1.0].
894
+ * For all other types, this property is ignored.
895
+ */
896
+ normalized: boolean;
897
+ /**
898
+ * Maximum allowed values for property values.
899
+ * Only applicable for numeric types and fixed-length arrays of numeric types.
900
+ * For numeric types this is a single number.
901
+ * For fixed-length arrays this is an array with componentCount number of elements.
902
+ * The normalized property has no effect on these values: they always correspond to the integer values.
903
+ */
904
+ max?: number | number[];
905
+ /**
906
+ * Minimum allowed values for property values.
907
+ * Only applicable for numeric types and fixed-length arrays of numeric types.
908
+ * For numeric types this is a single number.
909
+ * For fixed-length arrays this is an array with componentCount number of elements.
910
+ * The normalized property has no effect on these values: they always correspond to the integer values.
911
+ */
912
+ min?: number | number[];
913
+
914
+ /**
915
+ * A default value to use when the property value is not defined.
916
+ * If used, optional must be set to true.
917
+ * The type of the default value must match the property definition: For BOOLEAN use true or false.
918
+ * For STRING use a JSON string. For a numeric type use a JSON number.
919
+ * For ENUM use the enum name, not the integer value.
920
+ * For ARRAY use a JSON array containing values matching the componentType.
921
+ */
922
+ default?: boolean | number | string | number[];
923
+ /** If true, this property is optional. */
924
+ optional?: boolean; // default false;
925
+ /**
926
+ * An identifier that describes how this property should be interpreted.
927
+ * The semantic cannot be used by other properties in the class.
928
+ */
929
+ semantic?: string;
930
+ extensions?: any;
931
+ extras?: any;
932
+ [key: string]: any;
933
+ };
934
+
935
+ /**
936
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#classpropertytype
937
+ */
938
+ type ClassPropertyType =
939
+ | 'INT8'
940
+ | 'UINT8'
941
+ | 'INT16'
942
+ | 'UINT16'
943
+ | 'INT32'
944
+ | 'UINT32'
945
+ | 'INT64'
946
+ | 'UINT64'
947
+ | 'FLOAT32'
948
+ | 'FLOAT64'
949
+ | 'BOOLEAN'
950
+ | 'STRING'
951
+ | 'ENUM'
952
+ | 'ARRAY';
953
+
954
+ /**
955
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum
956
+ */
957
+ type ExtFeatureMetadataEnum = {
958
+ /** The name of the enum, e.g. for display purposes. */
959
+ name?: string;
960
+ /** The description of the enum. */
961
+ description?: string;
962
+ /** The type of the integer enum value. */
963
+ valueType?: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64'; // default: "UINT16"
964
+ /** An array of enum values. Duplicate names or duplicate integer values are not allowed. */
965
+ values: EnumValue[];
966
+ extensions?: any;
967
+ extras?: any;
968
+ [key: string]: any;
969
+ };
970
+
971
+ /**
972
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum-value
973
+ */
974
+ type EnumValue = {
975
+ /** The name of the enum value. */
976
+ name: string;
977
+ /** The description of the enum value. */
978
+ description?: string;
979
+ /** The integer enum value. */
980
+ value: number; // default: "UINT16"
981
+ extensions?: any;
982
+ extras?: any;
983
+ [key: string]: any;
984
+ };
985
+
986
+ /**
987
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table
988
+ */
989
+ export type EXT_feature_metadata_feature_table = {
990
+ featureTable: any;
991
+ /** The class that property values conform to. The value must be a class ID declared in the classes dictionary. */
992
+ class?: string;
993
+ /** The number of features, as well as the number of elements in each property array. */
994
+ count: number;
995
+ /**
996
+ * A dictionary, where each key corresponds to a property ID in the class properties dictionary
997
+ * and each value is an object describing where property values are stored.
998
+ * Optional properties may be excluded from this dictionary.
999
+ */
1000
+ properties?: {
1001
+ [key: string]: FeatureTableProperty;
1002
+ };
1003
+ extensions?: any;
1004
+ extras?: any;
1005
+ [key: string]: any;
1006
+ };
1007
+
1008
+ /**
1009
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table-property
1010
+ */
1011
+ export type FeatureTableProperty = {
1012
+ /**
1013
+ * The index of the buffer view containing property values.
1014
+ * The data type of property values is determined by the property definition:
1015
+ * When type is BOOLEAN values are packed into a bitfield.
1016
+ * When type is STRING values are stored as byte sequences and decoded as UTF-8 strings.
1017
+ * When type is a numeric type values are stored as the provided type.
1018
+ * When type is ENUM values are stored as the enum's valueType.
1019
+ * Each enum value in the buffer must match one of the allowed values in the enum definition.
1020
+ * When type is ARRAY elements are packed tightly together and the data type is based on the componentType following the same rules as above.
1021
+ * arrayOffsetBufferView is required for variable-size arrays
1022
+ * and stringOffsetBufferView is required for strings (for variable-length arrays of strings, both are required)
1023
+ * The buffer view byteOffset must be aligned to a multiple of 8 bytes.
1024
+ * If the buffer view's buffer is the GLB-stored BIN chunk the byte offset is measured relative to the beginning of the GLB.
1025
+ * Otherwise it is measured relative to the beginning of the buffer.
1026
+ */
1027
+ bufferView: number;
1028
+ /** The type of values in arrayOffsetBufferView and stringOffsetBufferView. */
1029
+ offsetType?: string; // default: "UINT32"
1030
+ /**
1031
+ * The index of the buffer view containing offsets for variable-length arrays.
1032
+ * The number of offsets is equal to the feature table count plus one.
1033
+ * The offsets represent the start positions of each array, with the last offset representing the position after the last array.
1034
+ * The array length is computed using the difference between the current offset and the subsequent offset.
1035
+ * If componentType is STRING the offsets index into the string offsets array (stored in stringOffsetBufferView),
1036
+ * otherwise they index into the property array (stored in bufferView).
1037
+ * The data type of these offsets is determined by offsetType.
1038
+ * The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView
1039
+ */
1040
+ arrayOffsetBufferView?: number;
1041
+ /**
1042
+ * The index of the buffer view containing offsets for strings.
1043
+ * The number of offsets is equal to the number of string components plus one.
1044
+ * The offsets represent the byte offsets of each string in the main bufferView,
1045
+ * with the last offset representing the byte offset after the last string.
1046
+ * The string byte length is computed using the difference between the current offset and the subsequent offset.
1047
+ * The data type of these offsets is determined by offsetType.
1048
+ * The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView.
1049
+ */
1050
+ stringOffsetBufferView?: number;
1051
+ extensions?: any;
1052
+ extras?: any;
1053
+ [key: string]: any;
1054
+ };
1055
+
1056
+ /**
1057
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-texture
1058
+ */
1059
+ type FeatureTexture = {
1060
+ /** The class this feature texture conforms to. The value must be a class ID declared in the classes dictionary. */
1061
+ class: string;
1062
+ /**
1063
+ * A dictionary, where each key corresponds to a property ID in the class properties dictionary
1064
+ * and each value describes the texture channels containing property values.
1065
+ */
1066
+ properties: {
1067
+ [key: string]: TextureAccessor;
1068
+ };
1069
+ extensions?: any;
1070
+ extras?: any;
1071
+ [key: string]: any;
1072
+ };
1073
+
1074
+ /**
1075
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#texture-accessor
1076
+ */
1077
+ type TextureAccessor = {
1078
+ /** Texture channels containing property values. Channels are labeled by rgba and are swizzled with a string of 1-4 characters. */
1079
+ channels: string;
1080
+ /** The glTF texture and texture coordinates to use. */
1081
+ texture: TextureInfo;
1082
+ extensions?: any;
1083
+ extras?: any;
1084
+ [key: string]: any;
1085
+ };
1086
+
1087
+ /**
1088
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#statistics-1
1089
+ */
1090
+ type Statistics = {
1091
+ /**
1092
+ * A dictionary, where each key is a class ID declared in the classes dictionary
1093
+ * and each value is an object containing statistics about features that conform to the class.
1094
+ */
1095
+ classes?: {
1096
+ [key: string]: ClassStatistics;
1097
+ };
1098
+ extensions?: any;
1099
+ extras?: any;
1100
+ [key: string]: any;
1101
+ };
1102
+
1103
+ /**
1104
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-statistics
1105
+ */
1106
+ type ClassStatistics = {
1107
+ /** The number of features that conform to the class. */
1108
+ count?: number;
1109
+ /**
1110
+ * A dictionary, where each key is a class ID declared in the classes dictionary
1111
+ * and each value is an object containing statistics about property values.
1112
+ */
1113
+ properties?: {
1114
+ [key: string]: StatisticsClassProperty;
1115
+ };
1116
+ extensions?: any;
1117
+ extras?: any;
1118
+ [key: string]: any;
1119
+ };
1120
+
1121
+ /**
1122
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#property-statistics
1123
+ * min, max, mean, median, standardDeviation, variance, sum are
1124
+ * only applicable for numeric types and fixed-length arrays of numeric types.
1125
+ * For numeric types this is a single number.
1126
+ * For fixed-length arrays this is an array with componentCount number of elements.
1127
+ * The normalized property has no effect on these values.
1128
+ */
1129
+ type StatisticsClassProperty = {
1130
+ /** The minimum property value. */
1131
+ min?: number | number[];
1132
+ /** The maximum property value. */
1133
+ max?: number | number[];
1134
+ /** The arithmetic mean of the property values. */
1135
+ mean?: number | number[];
1136
+ /** The median of the property values. */
1137
+ median?: number | number[];
1138
+ /** The standard deviation of the property values. */
1139
+ standardDeviation?: number | number[];
1140
+ /** The variance of the property values. */
1141
+ variance?: number | number[];
1142
+ /** The sum of the property values. */
1143
+ sum?: number | number[];
1144
+ /**
1145
+ * A dictionary, where each key corresponds to an enum name and each value is the number of occurrences of that enum.
1146
+ * Only applicable when type or componentType is ENUM.
1147
+ * For fixed-length arrays, this is an array with componentCount number of elements.
1148
+ */
1149
+ occurrences: {
1150
+ [key: string]: number | number[];
1151
+ };
1152
+ extensions?: any;
1153
+ extras?: any;
1154
+ [key: string]: any;
1155
+ };
1156
+
1157
+ /**
1158
+ * 3DTilesNext EXT_feature_metadata primitive extension
1159
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#primitive-extension
1160
+ */
1161
+ export type GLTF_EXT_feature_metadata_primitive = {
1162
+ /** Feature ids definition in attributes */
1163
+ featureIdAttributes?: GLTF_EXT_feature_metadata_attribute[];
1164
+ /** Feature ids definition in textures */
1165
+ featureIdTextures?: GLTF_EXT_feature_metadata_attribute[];
1166
+ /** An array of IDs of feature textures from the root EXT_feature_metadata object. */
1167
+ featureTextures?: string[];
1168
+ extensions?: any;
1169
+ extras?: any;
1170
+ [key: string]: any;
1171
+ };
1172
+
1173
+ /**
1174
+ * Attribute which described featureIds definition.
1175
+ */
1176
+ export type GLTF_EXT_feature_metadata_attribute = {
1177
+ /** Name of feature table */
1178
+ featureTable: string;
1179
+ /** Described how feature ids are defined */
1180
+ featureIds: ExtFeatureMetadataFeatureIds;
1181
+ extensions?: any;
1182
+ extras?: any;
1183
+ [key: string]: any;
1184
+ };
1185
+
1186
+ /**
1187
+ * Defining featureIds by attributes or implicitly.
1188
+ */
1189
+ type ExtFeatureMetadataFeatureIds = {
1190
+ /** Name of attribute where featureIds are defined */
1191
+ attribute?: string;
1192
+ /** Sets a constant feature ID for each vertex. The default is 0. */
1193
+ constant?: number;
1194
+ /** Sets the rate at which feature IDs increment.
1195
+ * If divisor is zero then constant is used.
1196
+ * If divisor is greater than zero the feature ID increments once per divisor sets of vertices, starting at constant.
1197
+ * The default is 0
1198
+ */
1199
+ divisor?: number;
1200
+ /** gLTF textureInfo object - https://github.com/CesiumGS/glTF/blob/3d-tiles-next/specification/2.0/schema/textureInfo.schema.json */
1201
+ texture?: ExtFeatureMetadataTexture;
1202
+ /** Must be a single channel ("r", "g", "b", or "a") */
1203
+ channels?: 'r' | 'g' | 'b' | 'a';
1204
+ };
1205
+
1206
+ /**
1207
+ * Reference to a texture.
1208
+ */
1209
+ type ExtFeatureMetadataTexture = {
1210
+ /** The set index of texture's TEXCOORD attribute used for texture coordinate mapping.*/
1211
+ texCoord: number;
1212
+ /** The index of the texture. */
1213
+ index: number;
1214
+ };
@@ -451,16 +451,16 @@ export interface MeshPrimitive {
451
451
  * 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
452
  */
453
453
  attributes: {
454
- [k: string]: GlTfId;
454
+ [k: string]: Accessor;
455
455
  };
456
456
  /**
457
457
  * The index of the accessor that contains the indices.
458
458
  */
459
- indices?: GlTfId;
459
+ indices?: Accessor;
460
460
  /**
461
461
  * The index of the material to apply to this primitive when rendering.
462
462
  */
463
- material?: GlTfId;
463
+ material?: Material;
464
464
  /**
465
465
  * The type of primitives to render.
466
466
  */
@@ -503,7 +503,7 @@ export interface Node {
503
503
  /**
504
504
  * The indices of this node's children.
505
505
  */
506
- children?: GlTfId[];
506
+ children?: Node[];
507
507
  /**
508
508
  * The index of the skin referenced by this node.
509
509
  */
@@ -515,7 +515,7 @@ export interface Node {
515
515
  /**
516
516
  * The index of the mesh in this node.
517
517
  */
518
- mesh?: GlTfId;
518
+ mesh?: Mesh;
519
519
  /**
520
520
  * The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
521
521
  */
@@ -569,7 +569,7 @@ export interface Scene {
569
569
  /**
570
570
  * The indices of each root node.
571
571
  */
572
- nodes?: GlTfId[];
572
+ nodes?: Node[];
573
573
  name?: any;
574
574
  extensions?: any;
575
575
  extras?: any;
@@ -607,7 +607,7 @@ export interface Texture {
607
607
  /**
608
608
  * The index of the image used by this texture.
609
609
  */
610
- source?: GlTfId;
610
+ source?: Image;
611
611
  name?: any;
612
612
  extensions?: any;
613
613
  extras?: any;
@@ -616,7 +616,7 @@ export interface Texture {
616
616
  /**
617
617
  * The root object for a glTF asset.
618
618
  */
619
- export interface GlTf {
619
+ export interface GLTF {
620
620
  /**
621
621
  * Names of glTF extensions used somewhere in this asset.
622
622
  */
@@ -672,7 +672,7 @@ export interface GlTf {
672
672
  /**
673
673
  * The index of the default scene.
674
674
  */
675
- scene?: GlTfId;
675
+ scene?: Scene;
676
676
  /**
677
677
  * An array of scenes.
678
678
  */
@@ -19,10 +19,20 @@ import type {
19
19
  GLTF_KHR_draco_mesh_compression,
20
20
  GLTF_KHR_texture_basisu,
21
21
  GLTF_EXT_meshopt_compression,
22
- GLTF_EXT_texture_webp
22
+ GLTF_EXT_texture_webp,
23
+ GLTF_EXT_feature_metadata
23
24
  } from './gltf-json-schema';
24
25
 
25
- import type {Image as GLTFImagePostprocessed} from './gltf-postprocessed-schema';
26
+ import type {
27
+ GLTF as GLTFPostprocessed,
28
+ Accessor as GLTFAccessorPostprocessed,
29
+ Image as GLTFImagePostprocessed,
30
+ Mesh as GLTFMeshPostprocessed,
31
+ MeshPrimitive as GLTFMeshPrimitivePostprocessed,
32
+ Material as GLTFMaterialPostprocessed,
33
+ Node as GLTFNodePostprocessed,
34
+ Texture as GLTFTexturePostprocessed
35
+ } from './gltf-postprocessed-schema';
26
36
 
27
37
  export type {
28
38
  GLTF,
@@ -43,7 +53,15 @@ export type {
43
53
  GLTF_KHR_texture_basisu,
44
54
  GLTF_EXT_meshopt_compression,
45
55
  GLTF_EXT_texture_webp,
46
- GLTFImagePostprocessed
56
+ GLTFPostprocessed,
57
+ GLTFAccessorPostprocessed,
58
+ GLTFImagePostprocessed,
59
+ GLTFNodePostprocessed,
60
+ GLTFMeshPostprocessed,
61
+ GLTFMeshPrimitivePostprocessed,
62
+ GLTFMaterialPostprocessed,
63
+ GLTFTexturePostprocessed,
64
+ GLTF_EXT_feature_metadata
47
65
  };
48
66
 
49
67
  export type GLTFObject =
@@ -60,6 +78,9 @@ export type GLTFObject =
60
78
  | GLTFTexture
61
79
  | GLTFImage;
62
80
 
81
+ /** GLTFLoader removes processed extensions from `extensionsUsed` and `extensionsUsed`
82
+ * `processedExtensions` is used to track those extensions
83
+ */
63
84
  export type GLTFWithBuffers = {
64
85
  json: GLTF;
65
86
  buffers: any[];
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/bundle.ts"],"names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"mappings":"AACA,MAAMA,aAAa,GAAGC,OAAO,CAAC,SAAD,CAA7B;;AACAC,UAAU,CAACC,OAAX,GAAqBD,UAAU,CAACC,OAAX,IAAsB,EAA3C;AACAC,MAAM,CAACC,OAAP,GAAiBC,MAAM,CAACC,MAAP,CAAcL,UAAU,CAACC,OAAzB,EAAkCH,aAAlC,CAAjB","sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"file":"bundle.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/glb-loader.ts"],"names":["VERSION","parseGLBSync","GLBLoader","name","id","module","version","extensions","mimeTypes","binary","parse","parseSync","options","glb","strict","arrayBuffer","byteOffset","_TypecheckGLBLoader"],"mappings":"AAGA,SAAQA,OAAR,QAAsB,qBAAtB;AACA,OAAOC,YAAP,MAAyB,yBAAzB;AAWA,OAAO,MAAMC,SAA2B,GAAG;AACzCC,EAAAA,IAAI,EAAE,KADmC;AAEzCC,EAAAA,EAAE,EAAE,KAFqC;AAGzCC,EAAAA,MAAM,EAAE,MAHiC;AAIzCC,EAAAA,OAAO,EAAEN,OAJgC;AAKzCO,EAAAA,UAAU,EAAE,CAAC,KAAD,CAL6B;AAMzCC,EAAAA,SAAS,EAAE,CAAC,mBAAD,CAN8B;AAOzCC,EAAAA,MAAM,EAAE,IAPiC;AAQzCC,EAAAA,KARyC;AASzCC,EAAAA,SATyC;AAUzCC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AACHC,MAAAA,MAAM,EAAE;AADL;AADE;AAVgC,CAApC;;AAiBP,eAAeJ,KAAf,CAAqBK,WAArB,EAA+CH,OAA/C,EAAyF;AACvF,SAAOD,SAAS,CAACI,WAAD,EAAcH,OAAd,CAAhB;AACD;;AAED,SAASD,SAAT,CAAmBI,WAAnB,EAA6CH,OAA7C,EAA8E;AAC5E,QAAM;AAACI,IAAAA,UAAU,GAAG;AAAd,MAAmBJ,OAAO,IAAI,EAApC;AACA,QAAMC,GAAQ,GAAG,EAAjB;AACAZ,EAAAA,YAAY,CAACY,GAAD,EAAME,WAAN,EAAmBC,UAAnB,EAA+BJ,OAA/B,aAA+BA,OAA/B,uBAA+BA,OAAO,CAAEC,GAAxC,CAAZ;AACA,SAAOA,GAAP;AACD;;AAGD,OAAO,MAAMI,mBAAqC,GAAGf,SAA9C","sourcesContent":["import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {GLB} from './lib/types/glb-types';\nimport type {GLBParseOptions} from './lib/parsers/parse-glb';\nimport {VERSION} from './lib/utils/version';\nimport parseGLBSync from './lib/parsers/parse-glb';\n\nexport type GLBLoaderOptions = LoaderOptions & {\n glb?: GLBParseOptions;\n byteOffset?: number;\n};\n\n/**\n * GLB Loader -\n * GLB is the binary container format for GLTF\n */\nexport const GLBLoader: LoaderWithParser = {\n name: 'GLB',\n id: 'glb',\n module: 'gltf',\n version: VERSION,\n extensions: ['glb'],\n mimeTypes: ['model/gltf-binary'],\n binary: true,\n parse,\n parseSync,\n options: {\n glb: {\n strict: false // Enables deprecated XVIZ support (illegal CHUNK formats)\n }\n }\n};\n\nasync function parse(arrayBuffer: ArrayBuffer, options?: GLBLoaderOptions): Promise<GLB> {\n return parseSync(arrayBuffer, options);\n}\n\nfunction parseSync(arrayBuffer: ArrayBuffer, options?: GLBLoaderOptions): GLB {\n const {byteOffset = 0} = options || {};\n const glb: GLB = {} as GLB;\n parseGLBSync(glb, arrayBuffer, byteOffset, options?.glb);\n return glb;\n}\n\n// TYPE TESTS - TODO find a better way than exporting junk\nexport const _TypecheckGLBLoader: LoaderWithParser = GLBLoader;\n"],"file":"glb-loader.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/glb-writer.ts"],"names":["VERSION","encodeGLBSync","GLBWriter","name","id","module","version","extensions","mimeTypes","binary","encodeSync","options","glb","byteOffset","byteLength","arrayBuffer","ArrayBuffer","dataView","DataView","_TypecheckGLBLoader"],"mappings":"AACA,SAAQA,OAAR,QAAsB,qBAAtB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AAMA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,EAAE,EAAE,KAFmB;AAGvBC,EAAAA,MAAM,EAAE,MAHe;AAIvBC,EAAAA,OAAO,EAAEN,OAJc;AAMvBO,EAAAA,UAAU,EAAE,CAAC,KAAD,CANW;AAOvBC,EAAAA,SAAS,EAAE,CAAC,mBAAD,CAPY;AAQvBC,EAAAA,MAAM,EAAE,IARe;AAUvBC,EAAAA,UAVuB;AAYvBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AADE;AAZc,CAAlB;;AAiBP,SAASF,UAAT,CAAoBE,GAApB,EAAyBD,OAAzB,EAAkC;AAChC,QAAM;AAACE,IAAAA,UAAU,GAAG;AAAd,MAAmBF,OAAzB;AAGA,QAAMG,UAAU,GAAGb,aAAa,CAACW,GAAD,EAAM,IAAN,EAAYC,UAAZ,EAAwBF,OAAxB,CAAhC;AACA,QAAMI,WAAW,GAAG,IAAIC,WAAJ,CAAgBF,UAAhB,CAApB;AAGA,QAAMG,QAAQ,GAAG,IAAIC,QAAJ,CAAaH,WAAb,CAAjB;AACAd,EAAAA,aAAa,CAACW,GAAD,EAAMK,QAAN,EAAgBJ,UAAhB,EAA4BF,OAA5B,CAAb;AAEA,SAAOI,WAAP;AACD;;AAGD,OAAO,MAAMI,mBAA2B,GAAGjB,SAApC","sourcesContent":["import type {Writer} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\nimport encodeGLBSync from './lib/encoders/encode-glb';\n\n/**\n * GLB exporter\n * GLB is the binary container format for GLTF\n */\nexport const GLBWriter = {\n name: 'GLB',\n id: 'glb',\n module: 'gltf',\n version: VERSION,\n\n extensions: ['glb'],\n mimeTypes: ['model/gltf-binary'],\n binary: true,\n\n encodeSync,\n\n options: {\n glb: {}\n }\n};\n\nfunction encodeSync(glb, options) {\n const {byteOffset = 0} = options;\n\n // Calculate length and allocate buffer\n const byteLength = encodeGLBSync(glb, null, byteOffset, options);\n const arrayBuffer = new ArrayBuffer(byteLength);\n\n // Encode into buffer\n const dataView = new DataView(arrayBuffer);\n encodeGLBSync(glb, dataView, byteOffset, options);\n\n return arrayBuffer;\n}\n\n// TYPE TESTS - TODO find a better way than exporting junk\nexport const _TypecheckGLBLoader: Writer = GLBWriter;\n"],"file":"glb-writer.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/gltf-loader.ts"],"names":["VERSION","parseGLTF","GLTFLoader","name","id","module","version","extensions","mimeTypes","text","binary","tests","parse","options","gltf","normalize","loadBuffers","loadImages","decompressMeshes","postProcess","log","console","deprecatedOptions","fetchImages","createImages","decompress","arrayBuffer","context","byteOffset"],"mappings":"AAEA,SAAQA,OAAR,QAAsB,qBAAtB;AAKA,SAAQC,SAAR,QAAwB,0BAAxB;AAiBA,OAAO,MAAMC,UAA4B,GAAG;AAC1CC,EAAAA,IAAI,EAAE,MADoC;AAE1CC,EAAAA,EAAE,EAAE,MAFsC;AAG1CC,EAAAA,MAAM,EAAE,MAHkC;AAI1CC,EAAAA,OAAO,EAAEN,OAJiC;AAK1CO,EAAAA,UAAU,EAAE,CAAC,MAAD,EAAS,KAAT,CAL8B;AAM1CC,EAAAA,SAAS,EAAE,CAAC,iBAAD,EAAoB,mBAApB,CAN+B;AAQ1CC,EAAAA,IAAI,EAAE,IARoC;AAS1CC,EAAAA,MAAM,EAAE,IATkC;AAU1CC,EAAAA,KAAK,EAAE,CAAC,MAAD,CAVmC;AAW1CC,EAAAA,KAX0C;AAa1CC,EAAAA,OAAO,EAAE;AACPC,IAAAA,IAAI,EAAE;AACJC,MAAAA,SAAS,EAAE,IADP;AAEJC,MAAAA,WAAW,EAAE,IAFT;AAGJC,MAAAA,UAAU,EAAE,IAHR;AAIJC,MAAAA,gBAAgB,EAAE,IAJd;AAKJC,MAAAA,WAAW,EAAE;AALT,KADC;AAUPC,IAAAA,GAAG,EAAEC;AAVE,GAbiC;AAyB1CC,EAAAA,iBAAiB,EAAE;AACjBC,IAAAA,WAAW,EAAE,iBADI;AAEjBC,IAAAA,YAAY,EAAE,iBAFG;AAGjBC,IAAAA,UAAU,EAAE,uBAHK;AAIjBN,IAAAA,WAAW,EAAE,kBAJI;AAKjBL,IAAAA,IAAI,EAAE;AACJW,MAAAA,UAAU,EAAE;AADR;AALW;AAzBuB,CAArC;AAoCP,OAAO,eAAeb,KAAf,CAAqBc,WAArB,EAAkCb,OAA0B,GAAG,EAA/D,EAAmEc,OAAnE,EAA4E;AAEjFd,EAAAA,OAAO,GAAG,EAAC,GAAGX,UAAU,CAACW,OAAf;AAAwB,OAAGA;AAA3B,GAAV;AAEAA,EAAAA,OAAO,CAACC,IAAR,GAAe,EAAC,GAAGZ,UAAU,CAACW,OAAX,CAAmBC,IAAvB;AAA6B,OAAGD,OAAO,CAACC;AAAxC,GAAf;AAEA,QAAM;AAACc,IAAAA,UAAU,GAAG;AAAd,MAAmBf,OAAzB;AACA,QAAMC,IAAI,GAAG,EAAb;AACA,SAAO,MAAMb,SAAS,CAACa,IAAD,EAA0BY,WAA1B,EAAuCE,UAAvC,EAAmDf,OAAnD,EAA4Dc,OAA5D,CAAtB;AACD","sourcesContent":["import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {DracoLoaderOptions} from '@loaders.gl/draco';\nimport {VERSION} from './lib/utils/version';\nimport type {ImageLoaderOptions} from '@loaders.gl/images';\nimport type {TextureLoaderOptions} from '@loaders.gl/textures';\nimport type {GLTFParseOptions} from './lib/parsers/parse-gltf';\nimport type {GLTFWithBuffers} from './lib/types/gltf-types';\nimport {parseGLTF} from './lib/parsers/parse-gltf';\nimport {GLBLoaderOptions} from './glb-loader';\n\n/**\n * GLTF loader options\n */\nexport type GLTFLoaderOptions = LoaderOptions &\n ImageLoaderOptions &\n TextureLoaderOptions &\n GLBLoaderOptions &\n DracoLoaderOptions & {\n gltf?: GLTFParseOptions;\n };\n\n/**\n * GLTF loader\n */\nexport const GLTFLoader: LoaderWithParser = {\n name: 'glTF',\n id: 'gltf',\n module: 'gltf',\n version: VERSION,\n extensions: ['gltf', 'glb'],\n mimeTypes: ['model/gltf+json', 'model/gltf-binary'],\n\n text: true,\n binary: true,\n tests: ['glTF'],\n parse,\n\n options: {\n gltf: {\n normalize: true, // Normalize glTF v1 to glTF v2 format (not yet stable)\n loadBuffers: true, // Fetch any linked .BIN buffers, decode base64\n loadImages: true, // Create image objects\n decompressMeshes: true, // Decompress Draco encoded meshes\n postProcess: true // Postprocess glTF and return json structure directly\n },\n\n // common?\n log: console // eslint-disable-line\n },\n deprecatedOptions: {\n fetchImages: 'gltf.loadImages',\n createImages: 'gltf.loadImages',\n decompress: 'gltf.decompressMeshes',\n postProcess: 'gltf.postProcess',\n gltf: {\n decompress: 'gltf.decompressMeshes'\n }\n }\n};\n\nexport async function parse(arrayBuffer, options: GLTFLoaderOptions = {}, context) {\n // Apps can call the parse method directly, we so apply default options here\n options = {...GLTFLoader.options, ...options};\n // @ts-ignore\n options.gltf = {...GLTFLoader.options.gltf, ...options.gltf};\n\n const {byteOffset = 0} = options;\n const gltf = {};\n return await parseGLTF(gltf as GLTFWithBuffers, arrayBuffer, byteOffset, options, context);\n}\n"],"file":"gltf-loader.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/gltf-writer.ts"],"names":["VERSION","encodeGLTFSync","GLTFWriter","name","id","module","version","extensions","mimeTypes","binary","encodeSync","options","gltf","byteOffset","byteLength","arrayBuffer","ArrayBuffer","dataView","DataView","_TypecheckGLBLoader"],"mappings":"AACA,SAAQA,OAAR,QAAsB,qBAAtB;AACA,SAAQC,cAAR,QAA6B,4BAA7B;AAUA,OAAO,MAAMC,UAAU,GAAG;AACxBC,EAAAA,IAAI,EAAE,MADkB;AAExBC,EAAAA,EAAE,EAAE,MAFoB;AAGxBC,EAAAA,MAAM,EAAE,MAHgB;AAIxBC,EAAAA,OAAO,EAAEN,OAJe;AAMxBO,EAAAA,UAAU,EAAE,CAAC,KAAD,CANY;AAOxBC,EAAAA,SAAS,EAAE,CAAC,mBAAD,CAPa;AAQxBC,EAAAA,MAAM,EAAE,IARgB;AAUxBC,EAAAA,UAVwB;AAYxBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,IAAI,EAAE;AADC;AAZe,CAAnB;;AAiBP,SAASF,UAAT,CAAoBE,IAApB,EAA0BD,OAA0B,GAAG,EAAvD,EAA2D;AACzD,QAAM;AAACE,IAAAA,UAAU,GAAG;AAAd,MAAmBF,OAAzB;AAGA,QAAMG,UAAU,GAAGb,cAAc,CAACW,IAAD,EAAO,IAAP,EAAaC,UAAb,EAAyBF,OAAzB,CAAjC;AACA,QAAMI,WAAW,GAAG,IAAIC,WAAJ,CAAgBF,UAAhB,CAApB;AACA,QAAMG,QAAQ,GAAG,IAAIC,QAAJ,CAAaH,WAAb,CAAjB;AACAd,EAAAA,cAAc,CAACW,IAAD,EAAOK,QAAP,EAAiBJ,UAAjB,EAA6BF,OAA7B,CAAd;AAEA,SAAOI,WAAP;AACD;;AAGD,OAAO,MAAMI,mBAA2B,GAAGjB,UAApC","sourcesContent":["import type {Writer} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\nimport {encodeGLTFSync} from './lib/encoders/encode-gltf';\n\nexport type GLTFWriterOptions = {\n gltf?: {};\n byteOffset?: number;\n};\n\n/**\n * GLTF exporter\n */\nexport const GLTFWriter = {\n name: 'glTF',\n id: 'gltf',\n module: 'gltf',\n version: VERSION,\n\n extensions: ['glb'], // We only support encoding to binary GLB, not to JSON GLTF\n mimeTypes: ['model/gltf-binary'], // 'model/gltf+json',\n binary: true,\n\n encodeSync,\n\n options: {\n gltf: {}\n }\n};\n\nfunction encodeSync(gltf, options: GLTFWriterOptions = {}) {\n const {byteOffset = 0} = options;\n\n // Calculate length, then create arraybuffer and encode\n const byteLength = encodeGLTFSync(gltf, null, byteOffset, options);\n const arrayBuffer = new ArrayBuffer(byteLength);\n const dataView = new DataView(arrayBuffer);\n encodeGLTFSync(gltf, dataView, byteOffset, options);\n\n return arrayBuffer;\n}\n\n// TYPE TESTS - TODO find a better way than exporting junk\nexport const _TypecheckGLBLoader: Writer = GLTFWriter;\n"],"file":"gltf-writer.js"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["GLTFLoader","GLTFWriter","GLBLoader","GLBWriter","default","GLTFScenegraph","postProcessGLTF"],"mappings":"AA0BA,SAAQA,UAAR,QAAyB,eAAzB;AACA,SAAQC,UAAR,QAAyB,eAAzB;AAGA,SAAQC,SAAR,QAAwB,cAAxB;AACA,SAAQC,SAAR,QAAwB,cAAxB;AAGA,SAAQC,OAAO,IAAIC,cAAnB,QAAwC,2BAAxC;AACA,SAAQC,eAAR,QAA8B,6BAA9B","sourcesContent":["/* eslint-disable camelcase, indent */\nexport type {GLB} from './lib/types/glb-types';\nexport type {\n GLTF,\n GLTFAccessor,\n GLTFBuffer,\n GLTFBufferView,\n GLTFMeshPrimitive,\n GLTFMesh,\n GLTFNode,\n GLTFMaterial,\n GLTFSampler,\n GLTFScene,\n GLTFSkin,\n GLTFTexture,\n GLTFImage,\n GLTFImagePostprocessed,\n // The following extensions are handled by the GLTFLoader and removed from the parsed glTF (disable via options.gltf.excludeExtensions)\n GLTF_KHR_binary_glTF,\n GLTF_KHR_draco_mesh_compression,\n GLTF_KHR_texture_basisu,\n GLTF_EXT_meshopt_compression,\n GLTF_EXT_texture_webp\n} from './lib/types/gltf-types';\n\n// glTF loader/writer definition objects\nexport {GLTFLoader} from './gltf-loader';\nexport {GLTFWriter} from './gltf-writer';\n\n// GLB Loader & Writer (for custom formats that want to leverage the GLB binary \"envelope\")\nexport {GLBLoader} from './glb-loader';\nexport {GLBWriter} from './glb-writer';\n\n// glTF Data Access Helper Class\nexport {default as GLTFScenegraph} from './lib/api/gltf-scenegraph';\nexport {postProcessGLTF} from './lib/api/post-process-gltf';\nexport type {Mesh} from './lib/types/gltf-json-schema';\nexport type {GLTFObject} from './lib/types/gltf-types';\n"],"file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/api/gltf-extensions.ts"],"names":["EXT_meshopt_compression","EXT_texture_webp","KHR_texture_basisu","KHR_draco_mesh_compression","KHR_lights_punctual","KHR_materials_unlit","KHR_techniques_webgl","EXTENSIONS","preprocessExtensions","gltf","options","context","extensions","filter","extension","useExtension","name","preprocess","decodeExtensions","decode","extensionName","excludes","excludeExtensions","exclude"],"mappings":"AAQA,OAAO,KAAKA,uBAAZ,MAAyC,uCAAzC;AACA,OAAO,KAAKC,gBAAZ,MAAkC,gCAAlC;AACA,OAAO,KAAKC,kBAAZ,MAAoC,kCAApC;AACA,OAAO,KAAKC,0BAAZ,MAA4C,0CAA5C;AAGA,OAAO,KAAKC,mBAAZ,MAAqC,8CAArC;AACA,OAAO,KAAKC,mBAAZ,MAAqC,8CAArC;AACA,OAAO,KAAKC,oBAAZ,MAAsC,+CAAtC;AAgBA,OAAO,MAAMC,UAAiC,GAAG,CAM/CP,uBAN+C,EAO/CC,gBAP+C,EAS/CC,kBAT+C,EAU/CC,0BAV+C,EAW/CC,mBAX+C,EAY/CC,mBAZ+C,EAa/CC,oBAb+C,CAA1C;AAiBP,OAAO,SAASE,oBAAT,CAA8BC,IAA9B,EAAoCC,OAA0B,GAAG,EAAjE,EAAqEC,OAArE,EAA+E;AACpF,QAAMC,UAAU,GAAGL,UAAU,CAACM,MAAX,CAAmBC,SAAD,IAAeC,YAAY,CAACD,SAAS,CAACE,IAAX,EAAiBN,OAAjB,CAA7C,CAAnB;;AACA,OAAK,MAAMI,SAAX,IAAwBF,UAAxB,EAAoC;AAAA;;AAClC,6BAAAE,SAAS,CAACG,UAAV,qFAAAH,SAAS,EAAcL,IAAd,EAAoBC,OAApB,EAA6BC,OAA7B,CAAT;AACD;AACF;AAGD,OAAO,eAAeO,gBAAf,CAAgCT,IAAhC,EAAsCC,OAA0B,GAAG,EAAnE,EAAuEC,OAAvE,EAAiF;AACtF,QAAMC,UAAU,GAAGL,UAAU,CAACM,MAAX,CAAmBC,SAAD,IAAeC,YAAY,CAACD,SAAS,CAACE,IAAX,EAAiBN,OAAjB,CAA7C,CAAnB;;AACA,OAAK,MAAMI,SAAX,IAAwBF,UAAxB,EAAoC;AAAA;;AAGlC,gCAAME,SAAS,CAACK,MAAhB,sDAAM,uBAAAL,SAAS,EAAUL,IAAV,EAAgBC,OAAhB,EAAyBC,OAAzB,CAAf;AACD;AACF;;AAED,SAASI,YAAT,CAAsBK,aAAtB,EAA6CV,OAA7C,EAAyE;AAAA;;AACvE,QAAMW,QAAQ,GAAG,CAAAX,OAAO,SAAP,IAAAA,OAAO,WAAP,6BAAAA,OAAO,CAAED,IAAT,gEAAea,iBAAf,KAAoC,EAArD;AACA,QAAMC,OAAO,GAAGH,aAAa,IAAIC,QAAjB,IAA6B,CAACA,QAAQ,CAACD,aAAD,CAAtD;AACA,SAAO,CAACG,OAAR;AACD","sourcesContent":["/* eslint-disable camelcase */\nimport {GLTF} from '../types/gltf-types';\nimport type {GLTFLoaderOptions} from '../../gltf-loader';\n\n// GLTF 1.0 extensions (decode only)\n// import * as KHR_binary_gltf from './KHR_draco_mesh_compression';\n\n// GLTF 2.0 Khronos extensions (decode/encode)\nimport * as EXT_meshopt_compression from '../extensions/EXT_meshopt_compression';\nimport * as EXT_texture_webp from '../extensions/EXT_texture_webp';\nimport * as KHR_texture_basisu from '../extensions/KHR_texture_basisu';\nimport * as KHR_draco_mesh_compression from '../extensions/KHR_draco_mesh_compression';\n\n// Deprecated. These should be handled by rendering library (e.g. luma.gl), not the loader.\nimport * as KHR_lights_punctual from '../extensions/deprecated/KHR_lights_punctual';\nimport * as KHR_materials_unlit from '../extensions/deprecated/KHR_materials_unlit';\nimport * as KHR_techniques_webgl from '../extensions/deprecated/KHR_techniques_webgl';\n\n// Vendor extensions\n\ntype GLTFExtensionPlugin = {\n name: string;\n preprocess?: (gltfData: {json: GLTF}, options: GLTFLoaderOptions, context) => void;\n decode?: (gltfData: {json: GLTF}, options: GLTFLoaderOptions, context) => Promise<void>;\n encode?: (gltfData: {json: GLTF}, options: GLTFLoaderOptions) => void;\n};\n\n/**\n * List of extensions processed by the GLTFLoader\n * Note that may extensions can only be handled on the rendering stage and are left out here\n * These are just extensions that can be handled fully or partially during loading.\n */\nexport const EXTENSIONS: GLTFExtensionPlugin[] = [\n // 1.0\n // KHR_binary_gltf is handled separately - must be processed before other parsing starts\n // KHR_binary_gltf,\n\n // 2.0\n EXT_meshopt_compression,\n EXT_texture_webp,\n // Basisu should come after webp, we want basisu to be preferred if both are provided\n KHR_texture_basisu,\n KHR_draco_mesh_compression,\n KHR_lights_punctual,\n KHR_materials_unlit,\n KHR_techniques_webgl\n];\n\n/** Call before any resource loading starts */\nexport function preprocessExtensions(gltf, options: GLTFLoaderOptions = {}, context?) {\n const extensions = EXTENSIONS.filter((extension) => useExtension(extension.name, options));\n for (const extension of extensions) {\n extension.preprocess?.(gltf, options, context);\n }\n}\n\n/** Call after resource loading */\nexport async function decodeExtensions(gltf, options: GLTFLoaderOptions = {}, context?) {\n const extensions = EXTENSIONS.filter((extension) => useExtension(extension.name, options));\n for (const extension of extensions) {\n // Note: We decode async extensions sequentially, this might not be necessary\n // Currently we only have Draco, but when we add Basis we may revisit\n await extension.decode?.(gltf, options, context);\n }\n}\n\nfunction useExtension(extensionName: string, options: GLTFLoaderOptions) {\n const excludes = options?.gltf?.excludeExtensions || {};\n const exclude = extensionName in excludes && !excludes[extensionName];\n return !exclude;\n}\n"],"file":"gltf-extensions.js"}