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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/dist/bundle.js +2 -2
  2. package/dist/dist.min.js +3545 -2445
  3. package/dist/es5/bundle.js +6 -0
  4. package/dist/es5/bundle.js.map +1 -0
  5. package/dist/es5/glb-loader.js +56 -0
  6. package/dist/es5/glb-loader.js.map +1 -0
  7. package/dist/es5/glb-writer.js +34 -0
  8. package/dist/es5/glb-writer.js.map +1 -0
  9. package/dist/es5/gltf-loader.js +81 -0
  10. package/dist/es5/gltf-loader.js.map +1 -0
  11. package/dist/es5/gltf-writer.js +35 -0
  12. package/dist/es5/gltf-writer.js.map +1 -0
  13. package/dist/es5/index.js +55 -0
  14. package/dist/es5/index.js.map +1 -0
  15. package/dist/es5/lib/api/gltf-extensions.js +109 -0
  16. package/dist/es5/lib/api/gltf-extensions.js.map +1 -0
  17. package/dist/es5/lib/api/gltf-scenegraph.js +595 -0
  18. package/dist/es5/lib/api/gltf-scenegraph.js.map +1 -0
  19. package/dist/es5/lib/api/normalize-gltf-v1.js +331 -0
  20. package/dist/es5/lib/api/normalize-gltf-v1.js.map +1 -0
  21. package/dist/es5/lib/api/post-process-gltf.js +470 -0
  22. package/dist/es5/lib/api/post-process-gltf.js.map +1 -0
  23. package/dist/es5/lib/encoders/encode-glb.js +61 -0
  24. package/dist/es5/lib/encoders/encode-glb.js.map +1 -0
  25. package/dist/es5/lib/encoders/encode-gltf.js +20 -0
  26. package/dist/es5/lib/encoders/encode-gltf.js.map +1 -0
  27. package/dist/es5/lib/extensions/EXT_meshopt_compression.js +94 -0
  28. package/dist/es5/lib/extensions/EXT_meshopt_compression.js.map +1 -0
  29. package/dist/es5/lib/extensions/EXT_texture_webp.js +43 -0
  30. package/dist/es5/lib/extensions/EXT_texture_webp.js.map +1 -0
  31. package/dist/es5/lib/extensions/KHR_binary_gltf.js +39 -0
  32. package/dist/es5/lib/extensions/KHR_binary_gltf.js.map +1 -0
  33. package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js +247 -0
  34. package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js.map +1 -0
  35. package/dist/es5/lib/extensions/KHR_texture_basisu.js +36 -0
  36. package/dist/es5/lib/extensions/KHR_texture_basisu.js.map +1 -0
  37. package/dist/es5/lib/extensions/KHR_texture_transform.js +230 -0
  38. package/dist/es5/lib/extensions/KHR_texture_transform.js.map +1 -0
  39. package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js +103 -0
  40. package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -0
  41. package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js +99 -0
  42. package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -0
  43. package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js +76 -0
  44. package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -0
  45. package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js +113 -0
  46. package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -0
  47. package/dist/es5/lib/gltf-utils/get-typed-array.js +23 -0
  48. package/dist/es5/lib/gltf-utils/get-typed-array.js.map +1 -0
  49. package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js +68 -0
  50. package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js.map +1 -0
  51. package/dist/es5/lib/gltf-utils/gltf-constants.js +48 -0
  52. package/dist/es5/lib/gltf-utils/gltf-constants.js.map +1 -0
  53. package/dist/es5/lib/gltf-utils/gltf-utils.js +86 -0
  54. package/dist/es5/lib/gltf-utils/gltf-utils.js.map +1 -0
  55. package/dist/es5/lib/gltf-utils/resolve-url.js +18 -0
  56. package/dist/es5/lib/gltf-utils/resolve-url.js.map +1 -0
  57. package/dist/es5/lib/parsers/parse-glb.js +120 -0
  58. package/dist/es5/lib/parsers/parse-glb.js.map +1 -0
  59. package/dist/es5/lib/parsers/parse-gltf.js +283 -0
  60. package/dist/es5/lib/parsers/parse-gltf.js.map +1 -0
  61. package/dist/es5/lib/types/glb-types.js +2 -0
  62. package/dist/es5/lib/types/glb-types.js.map +1 -0
  63. package/dist/es5/lib/types/gltf-json-schema.js +2 -0
  64. package/dist/es5/lib/types/gltf-json-schema.js.map +1 -0
  65. package/dist/es5/lib/types/gltf-postprocessed-schema.js +2 -0
  66. package/dist/es5/lib/types/gltf-postprocessed-schema.js.map +1 -0
  67. package/dist/es5/lib/types/gltf-types.js +2 -0
  68. package/dist/es5/lib/types/gltf-types.js.map +1 -0
  69. package/dist/es5/lib/utils/assert.js +12 -0
  70. package/dist/es5/lib/utils/assert.js.map +1 -0
  71. package/dist/es5/lib/utils/version.js +9 -0
  72. package/dist/es5/lib/utils/version.js.map +1 -0
  73. package/dist/es5/meshopt/meshopt-decoder.js +215 -0
  74. package/dist/es5/meshopt/meshopt-decoder.js.map +1 -0
  75. package/dist/es5/webp/webp.js +83 -0
  76. package/dist/es5/webp/webp.js.map +1 -0
  77. package/dist/esm/bundle.js +4 -0
  78. package/dist/esm/bundle.js.map +1 -0
  79. package/dist/esm/glb-loader.js +31 -0
  80. package/dist/esm/glb-loader.js.map +1 -0
  81. package/dist/esm/glb-writer.js +27 -0
  82. package/dist/esm/glb-writer.js.map +1 -0
  83. package/dist/esm/gltf-loader.js +51 -0
  84. package/dist/esm/gltf-loader.js.map +1 -0
  85. package/dist/esm/gltf-writer.js +28 -0
  86. package/dist/esm/gltf-writer.js.map +1 -0
  87. package/dist/esm/index.js +8 -0
  88. package/dist/esm/index.js.map +1 -0
  89. package/dist/esm/lib/api/gltf-extensions.js +35 -0
  90. package/dist/esm/lib/api/gltf-extensions.js.map +1 -0
  91. package/dist/esm/lib/api/gltf-scenegraph.js +452 -0
  92. package/dist/esm/lib/api/gltf-scenegraph.js.map +1 -0
  93. package/dist/esm/lib/api/normalize-gltf-v1.js +204 -0
  94. package/dist/esm/lib/api/normalize-gltf-v1.js.map +1 -0
  95. package/dist/esm/lib/api/post-process-gltf.js +396 -0
  96. package/dist/esm/lib/api/post-process-gltf.js.map +1 -0
  97. package/dist/esm/lib/encoders/encode-glb.js +54 -0
  98. package/dist/esm/lib/encoders/encode-glb.js.map +1 -0
  99. package/dist/esm/lib/encoders/encode-gltf.js +14 -0
  100. package/dist/esm/lib/encoders/encode-gltf.js.map +1 -0
  101. package/dist/esm/lib/extensions/EXT_meshopt_compression.js +41 -0
  102. package/dist/esm/lib/extensions/EXT_meshopt_compression.js.map +1 -0
  103. package/dist/esm/lib/extensions/EXT_texture_webp.js +25 -0
  104. package/dist/esm/lib/extensions/EXT_texture_webp.js.map +1 -0
  105. package/dist/esm/lib/extensions/KHR_binary_gltf.js +21 -0
  106. package/dist/esm/lib/extensions/KHR_binary_gltf.js.map +1 -0
  107. package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js +111 -0
  108. package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js.map +1 -0
  109. package/dist/esm/lib/extensions/KHR_texture_basisu.js +18 -0
  110. package/dist/esm/lib/extensions/KHR_texture_basisu.js.map +1 -0
  111. package/dist/esm/lib/extensions/KHR_texture_transform.js +182 -0
  112. package/dist/esm/lib/extensions/KHR_texture_transform.js.map +1 -0
  113. package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js +77 -0
  114. package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -0
  115. package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js +42 -0
  116. package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -0
  117. package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js +33 -0
  118. package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -0
  119. package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js +61 -0
  120. package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -0
  121. package/dist/esm/lib/gltf-utils/get-typed-array.js +16 -0
  122. package/dist/esm/lib/gltf-utils/get-typed-array.js.map +1 -0
  123. package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js +62 -0
  124. package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js.map +1 -0
  125. package/dist/esm/lib/gltf-utils/gltf-constants.js +37 -0
  126. package/dist/esm/lib/gltf-utils/gltf-constants.js.map +1 -0
  127. package/dist/esm/lib/gltf-utils/gltf-utils.js +74 -0
  128. package/dist/esm/lib/gltf-utils/gltf-utils.js.map +1 -0
  129. package/dist/esm/lib/gltf-utils/resolve-url.js +12 -0
  130. package/dist/esm/lib/gltf-utils/resolve-url.js.map +1 -0
  131. package/dist/esm/lib/parsers/parse-glb.js +114 -0
  132. package/dist/esm/lib/parsers/parse-glb.js.map +1 -0
  133. package/dist/esm/lib/parsers/parse-gltf.js +155 -0
  134. package/dist/esm/lib/parsers/parse-gltf.js.map +1 -0
  135. package/dist/esm/lib/types/glb-types.js +2 -0
  136. package/dist/esm/lib/types/glb-types.js.map +1 -0
  137. package/dist/esm/lib/types/gltf-json-schema.js +2 -0
  138. package/dist/esm/lib/types/gltf-json-schema.js.map +1 -0
  139. package/dist/esm/lib/types/gltf-postprocessed-schema.js +2 -0
  140. package/dist/esm/lib/types/gltf-postprocessed-schema.js.map +1 -0
  141. package/dist/esm/lib/types/gltf-types.js +2 -0
  142. package/dist/esm/lib/types/gltf-types.js.map +1 -0
  143. package/dist/esm/lib/utils/assert.js +6 -0
  144. package/dist/esm/lib/utils/assert.js.map +1 -0
  145. package/dist/esm/lib/utils/version.js +2 -0
  146. package/dist/esm/lib/utils/version.js.map +1 -0
  147. package/dist/esm/meshopt/meshopt-decoder.js +91 -0
  148. package/dist/esm/meshopt/meshopt-decoder.js.map +1 -0
  149. package/dist/esm/meshopt/meshopt-encoder.ts.disabled +409 -0
  150. package/dist/esm/webp/webp.js +25 -0
  151. package/dist/esm/webp/webp.js.map +1 -0
  152. package/dist/glb-loader.d.ts +5 -4
  153. package/dist/glb-loader.d.ts.map +1 -1
  154. package/dist/glb-loader.js +30 -28
  155. package/dist/glb-writer.d.ts +7 -16
  156. package/dist/glb-writer.d.ts.map +1 -1
  157. package/dist/glb-writer.js +32 -26
  158. package/dist/gltf-loader.d.ts +7 -6
  159. package/dist/gltf-loader.d.ts.map +1 -1
  160. package/dist/gltf-loader.js +46 -43
  161. package/dist/gltf-writer.d.ts +2 -2
  162. package/dist/gltf-writer.d.ts.map +1 -1
  163. package/dist/gltf-writer.js +29 -26
  164. package/dist/index.d.ts +8 -4
  165. package/dist/index.d.ts.map +1 -1
  166. package/dist/index.js +28 -7
  167. package/dist/lib/api/gltf-extensions.d.ts +7 -2
  168. package/dist/lib/api/gltf-extensions.d.ts.map +1 -1
  169. package/dist/lib/api/gltf-extensions.js +79 -31
  170. package/dist/lib/api/gltf-scenegraph.d.ts +10 -14
  171. package/dist/lib/api/gltf-scenegraph.d.ts.map +1 -1
  172. package/dist/lib/api/gltf-scenegraph.js +577 -513
  173. package/dist/lib/api/normalize-gltf-v1.d.ts.map +1 -1
  174. package/dist/lib/api/normalize-gltf-v1.js +278 -229
  175. package/dist/lib/api/post-process-gltf.d.ts +4 -1
  176. package/dist/lib/api/post-process-gltf.d.ts.map +1 -1
  177. package/dist/lib/api/post-process-gltf.js +385 -374
  178. package/dist/lib/encoders/encode-glb.d.ts +14 -1
  179. package/dist/lib/encoders/encode-glb.d.ts.map +1 -1
  180. package/dist/lib/encoders/encode-glb.js +67 -58
  181. package/dist/lib/encoders/encode-gltf.d.ts +18 -0
  182. package/dist/lib/encoders/encode-gltf.d.ts.map +1 -1
  183. package/dist/lib/encoders/encode-gltf.js +30 -12
  184. package/dist/lib/extensions/EXT_meshopt_compression.d.ts +1 -4
  185. package/dist/lib/extensions/EXT_meshopt_compression.d.ts.map +1 -1
  186. package/dist/lib/extensions/EXT_meshopt_compression.js +35 -50
  187. package/dist/lib/extensions/EXT_texture_webp.d.ts +1 -1
  188. package/dist/lib/extensions/EXT_texture_webp.d.ts.map +1 -1
  189. package/dist/lib/extensions/EXT_texture_webp.js +32 -28
  190. package/dist/lib/extensions/KHR_binary_gltf.d.ts +1 -1
  191. package/dist/lib/extensions/KHR_binary_gltf.d.ts.map +1 -1
  192. package/dist/lib/extensions/KHR_binary_gltf.js +36 -23
  193. package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts +1 -1
  194. package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts.map +1 -1
  195. package/dist/lib/extensions/KHR_draco_mesh_compression.js +123 -111
  196. package/dist/lib/extensions/KHR_texture_basisu.d.ts +1 -1
  197. package/dist/lib/extensions/KHR_texture_basisu.d.ts.map +1 -1
  198. package/dist/lib/extensions/KHR_texture_basisu.js +26 -19
  199. package/dist/lib/extensions/KHR_texture_transform.d.ts +13 -0
  200. package/dist/lib/extensions/KHR_texture_transform.d.ts.map +1 -0
  201. package/dist/lib/extensions/KHR_texture_transform.js +227 -0
  202. package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts +6 -0
  203. package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts.map +1 -0
  204. package/dist/lib/extensions/deprecated/EXT_feature_metadata.js +115 -0
  205. package/dist/lib/extensions/deprecated/KHR_lights_punctual.d.ts +1 -1
  206. package/dist/lib/extensions/deprecated/KHR_lights_punctual.d.ts.map +1 -1
  207. package/dist/lib/extensions/deprecated/KHR_lights_punctual.js +54 -44
  208. package/dist/lib/extensions/deprecated/KHR_materials_unlit.d.ts +1 -1
  209. package/dist/lib/extensions/deprecated/KHR_materials_unlit.d.ts.map +1 -1
  210. package/dist/lib/extensions/deprecated/KHR_materials_unlit.js +39 -32
  211. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts +1 -1
  212. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts.map +1 -1
  213. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js +73 -62
  214. package/dist/lib/gltf-utils/get-typed-array.js +39 -14
  215. package/dist/lib/gltf-utils/gltf-attribute-utils.d.ts +1 -1
  216. package/dist/lib/gltf-utils/gltf-attribute-utils.d.ts.map +1 -1
  217. package/dist/lib/gltf-utils/gltf-attribute-utils.js +65 -65
  218. package/dist/lib/gltf-utils/gltf-constants.d.ts +17 -0
  219. package/dist/lib/gltf-utils/gltf-constants.d.ts.map +1 -1
  220. package/dist/lib/gltf-utils/gltf-constants.js +38 -32
  221. package/dist/lib/gltf-utils/gltf-utils.d.ts +7 -0
  222. package/dist/lib/gltf-utils/gltf-utils.d.ts.map +1 -1
  223. package/dist/lib/gltf-utils/gltf-utils.js +79 -45
  224. package/dist/lib/gltf-utils/resolve-url.js +17 -15
  225. package/dist/lib/parsers/parse-glb.d.ts +15 -3
  226. package/dist/lib/parsers/parse-glb.d.ts.map +1 -1
  227. package/dist/lib/parsers/parse-glb.js +143 -105
  228. package/dist/lib/parsers/parse-gltf.d.ts +8 -4
  229. package/dist/lib/parsers/parse-gltf.d.ts.map +1 -1
  230. package/dist/lib/parsers/parse-gltf.js +166 -154
  231. package/dist/lib/types/glb-types.d.ts +3 -3
  232. package/dist/lib/types/glb-types.d.ts.map +1 -1
  233. package/dist/lib/types/glb-types.js +2 -2
  234. package/dist/lib/types/gltf-json-schema.d.ts +530 -132
  235. package/dist/lib/types/gltf-json-schema.d.ts.map +1 -1
  236. package/dist/lib/types/gltf-json-schema.js +4 -2
  237. package/dist/lib/types/gltf-postprocessed-schema.d.ts +175 -210
  238. package/dist/lib/types/gltf-postprocessed-schema.d.ts.map +1 -1
  239. package/dist/lib/types/gltf-postprocessed-schema.js +4 -2
  240. package/dist/lib/types/gltf-types.d.ts +22 -7
  241. package/dist/lib/types/gltf-types.d.ts.map +1 -1
  242. package/dist/lib/types/gltf-types.js +3 -2
  243. package/dist/lib/utils/assert.js +11 -5
  244. package/dist/lib/utils/version.js +7 -2
  245. package/dist/meshopt/meshopt-decoder.js +97 -82
  246. package/dist/webp/webp.d.ts +1 -1
  247. package/dist/webp/webp.d.ts.map +1 -1
  248. package/dist/webp/webp.js +32 -23
  249. package/package.json +9 -8
  250. package/src/glb-loader.ts +4 -4
  251. package/src/glb-writer.ts +11 -3
  252. package/src/gltf-loader.ts +12 -8
  253. package/src/gltf-writer.ts +2 -2
  254. package/src/index.ts +34 -6
  255. package/src/lib/api/gltf-extensions.ts +14 -3
  256. package/src/lib/api/gltf-scenegraph.ts +61 -34
  257. package/src/lib/api/normalize-gltf-v1.ts +2 -1
  258. package/src/lib/api/post-process-gltf.ts +275 -150
  259. package/src/lib/encoders/encode-glb.ts +21 -4
  260. package/src/lib/encoders/encode-gltf.ts +19 -10
  261. package/src/lib/extensions/EXT_meshopt_compression.ts +16 -25
  262. package/src/lib/extensions/EXT_texture_webp.ts +5 -4
  263. package/src/lib/extensions/KHR_binary_gltf.ts +3 -3
  264. package/src/lib/extensions/KHR_draco_mesh_compression.ts +8 -8
  265. package/src/lib/extensions/KHR_texture_basisu.ts +4 -3
  266. package/src/lib/extensions/KHR_texture_transform.ts +308 -0
  267. package/src/lib/extensions/deprecated/EXT_feature_metadata.ts +163 -0
  268. package/src/lib/extensions/deprecated/KHR_lights_punctual.ts +2 -2
  269. package/src/lib/extensions/deprecated/KHR_materials_unlit.ts +5 -5
  270. package/src/lib/extensions/deprecated/KHR_techniques_webgl.ts +3 -2
  271. package/src/lib/gltf-utils/gltf-attribute-utils.ts +1 -1
  272. package/src/lib/gltf-utils/gltf-constants.ts +2 -2
  273. package/src/lib/gltf-utils/gltf-utils.ts +31 -0
  274. package/src/lib/parsers/parse-glb.ts +50 -24
  275. package/src/lib/parsers/parse-gltf.ts +32 -17
  276. package/src/lib/types/glb-types.ts +1 -1
  277. package/src/lib/types/gltf-json-schema.ts +582 -126
  278. package/src/lib/types/gltf-postprocessed-schema.ts +289 -212
  279. package/src/lib/types/gltf-types.ts +41 -44
  280. package/dist/bundle.js.map +0 -1
  281. package/dist/glb-loader.js.map +0 -1
  282. package/dist/glb-writer.js.map +0 -1
  283. package/dist/gltf-loader.js.map +0 -1
  284. package/dist/gltf-writer.js.map +0 -1
  285. package/dist/index.js.map +0 -1
  286. package/dist/lib/api/gltf-extensions.js.map +0 -1
  287. package/dist/lib/api/gltf-scenegraph.js.map +0 -1
  288. package/dist/lib/api/normalize-gltf-v1.js.map +0 -1
  289. package/dist/lib/api/post-process-gltf.js.map +0 -1
  290. package/dist/lib/encoders/encode-glb.js.map +0 -1
  291. package/dist/lib/encoders/encode-gltf.js.map +0 -1
  292. package/dist/lib/extensions/EXT_meshopt_compression.js.map +0 -1
  293. package/dist/lib/extensions/EXT_texture_webp.js.map +0 -1
  294. package/dist/lib/extensions/KHR_binary_gltf.js.map +0 -1
  295. package/dist/lib/extensions/KHR_draco_mesh_compression.js.map +0 -1
  296. package/dist/lib/extensions/KHR_texture_basisu.js.map +0 -1
  297. package/dist/lib/extensions/deprecated/KHR_lights_punctual.js.map +0 -1
  298. package/dist/lib/extensions/deprecated/KHR_materials_unlit.js.map +0 -1
  299. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js.map +0 -1
  300. package/dist/lib/gltf-utils/get-typed-array.js.map +0 -1
  301. package/dist/lib/gltf-utils/gltf-attribute-utils.js.map +0 -1
  302. package/dist/lib/gltf-utils/gltf-constants.js.map +0 -1
  303. package/dist/lib/gltf-utils/gltf-utils.js.map +0 -1
  304. package/dist/lib/gltf-utils/resolve-url.js.map +0 -1
  305. package/dist/lib/parsers/parse-glb.js.map +0 -1
  306. package/dist/lib/parsers/parse-gltf.js.map +0 -1
  307. package/dist/lib/types/glb-types.js.map +0 -1
  308. package/dist/lib/types/gltf-json-schema.js.map +0 -1
  309. package/dist/lib/types/gltf-postprocessed-schema.js.map +0 -1
  310. package/dist/lib/types/gltf-types.js.map +0 -1
  311. package/dist/lib/utils/assert.js.map +0 -1
  312. package/dist/lib/utils/version.js.map +0 -1
  313. package/dist/meshopt/meshopt-decoder.js.map +0 -1
  314. package/dist/webp/webp.js.map +0 -1
  315. /package/dist/{meshopt → es5/meshopt}/meshopt-encoder.ts.disabled +0 -0
@@ -1,8 +1,8 @@
1
- export declare type GLTFId = number;
1
+ export type GLTFId = number;
2
2
  /**
3
3
  * Indices of those attributes that deviate from their initialization value.
4
4
  */
5
- export interface AccessorSparseIndices {
5
+ export type GLTFAccessorSparseIndices = {
6
6
  /**
7
7
  * The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
8
8
  */
@@ -15,13 +15,13 @@ export interface AccessorSparseIndices {
15
15
  * The indices data type.
16
16
  */
17
17
  componentType: 5121 | 5123 | 5125 | number;
18
- extensions?: any;
18
+ extensions?: Record<string, any>;
19
19
  extras?: any;
20
- }
20
+ };
21
21
  /**
22
22
  * Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`.
23
23
  */
24
- export interface AccessorSparseValues {
24
+ export type GLTFAccessorSparseValues = {
25
25
  /**
26
26
  * The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
27
27
  */
@@ -30,13 +30,13 @@ export interface AccessorSparseValues {
30
30
  * The offset relative to the start of the bufferView in bytes. Must be aligned.
31
31
  */
32
32
  byteOffset?: number;
33
- extensions?: any;
33
+ extensions?: Record<string, any>;
34
34
  extras?: any;
35
- }
35
+ };
36
36
  /**
37
37
  * Sparse storage of attributes that deviate from their initialization value.
38
38
  */
39
- export interface AccessorSparse {
39
+ export type GLTFAccessorSparse = {
40
40
  /**
41
41
  * Number of entries stored in the sparse array.
42
42
  */
@@ -44,18 +44,18 @@ export interface AccessorSparse {
44
44
  /**
45
45
  * Index array of size `count` that points to those accessor attributes that deviate from their initialization value. Indices must strictly increase.
46
46
  */
47
- indices: AccessorSparseIndices;
47
+ indices: GLTFAccessorSparseIndices;
48
48
  /**
49
49
  * Array of size `count` times number of components, storing the displaced accessor attributes pointed by `indices`. Substituted values must have the same `componentType` and number of components as the base accessor.
50
50
  */
51
- values: AccessorSparseValues;
52
- extensions?: any;
51
+ values: GLTFAccessorSparseValues;
52
+ extensions?: Record<string, any>;
53
53
  extras?: any;
54
- }
54
+ };
55
55
  /**
56
56
  * 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.
57
57
  */
58
- export interface Accessor {
58
+ export type GLTFAccessor = {
59
59
  /**
60
60
  * The index of the bufferView.
61
61
  */
@@ -91,15 +91,15 @@ export interface Accessor {
91
91
  /**
92
92
  * Sparse storage of attributes that deviate from their initialization value.
93
93
  */
94
- sparse?: AccessorSparse;
94
+ sparse?: GLTFAccessorSparse;
95
95
  name?: any;
96
- extensions?: any;
96
+ extensions?: Record<string, any>;
97
97
  extras?: any;
98
- }
98
+ };
99
99
  /**
100
100
  * The index of the node and TRS property that an animation channel targets.
101
101
  */
102
- export interface AnimationChannelTarget {
102
+ export type GLTFAnimationChannelTarget = {
103
103
  /**
104
104
  * The index of the node to target.
105
105
  */
@@ -108,13 +108,13 @@ export interface AnimationChannelTarget {
108
108
  * The name of the node's TRS property to modify, or the "weights" of the Morph Targets it instantiates. For the "translation" property, the values that are provided by the sampler are the translation along the x, y, and z axes. For the "rotation" property, the values are a quaternion in the order (x, y, z, w), where w is the scalar. For the "scale" property, the values are the scaling factors along the x, y, and z axes.
109
109
  */
110
110
  path: 'translation' | 'rotation' | 'scale' | 'weights' | string;
111
- extensions?: any;
111
+ extensions?: Record<string, any>;
112
112
  extras?: any;
113
- }
113
+ };
114
114
  /**
115
115
  * Targets an animation's sampler at a node's property.
116
116
  */
117
- export interface AnimationChannel {
117
+ export type GLTFAnimationChannel = {
118
118
  /**
119
119
  * The index of a sampler in this animation used to compute the value for the target.
120
120
  */
@@ -122,14 +122,14 @@ export interface AnimationChannel {
122
122
  /**
123
123
  * The index of the node and TRS property to target.
124
124
  */
125
- target: AnimationChannelTarget;
126
- extensions?: any;
125
+ target: GLTFAnimationChannelTarget;
126
+ extensions?: Record<string, any>;
127
127
  extras?: any;
128
- }
128
+ };
129
129
  /**
130
130
  * Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
131
131
  */
132
- export interface AnimationSampler {
132
+ export type GLTFAnimationSampler = {
133
133
  /**
134
134
  * The index of an accessor containing keyframe input values, e.g., time.
135
135
  */
@@ -142,29 +142,29 @@ export interface AnimationSampler {
142
142
  * The index of an accessor, containing keyframe output values.
143
143
  */
144
144
  output: GLTFId;
145
- extensions?: any;
145
+ extensions?: Record<string, any>;
146
146
  extras?: any;
147
- }
147
+ };
148
148
  /**
149
149
  * A keyframe animation.
150
150
  */
151
- export interface Animation {
151
+ export type GLTFAnimation = {
152
152
  /**
153
153
  * 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.
154
154
  */
155
- channels: AnimationChannel[];
155
+ channels: GLTFAnimationChannel[];
156
156
  /**
157
157
  * An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
158
158
  */
159
- samplers: AnimationSampler[];
159
+ samplers: GLTFAnimationSampler[];
160
160
  name?: any;
161
- extensions?: any;
161
+ extensions?: Record<string, any>;
162
162
  extras?: any;
163
- }
163
+ };
164
164
  /**
165
165
  * Metadata about the glTF asset.
166
166
  */
167
- export interface Asset {
167
+ export type GLTFAsset = {
168
168
  /**
169
169
  * A copyright message suitable for display to credit the content creator.
170
170
  */
@@ -181,13 +181,13 @@ export interface Asset {
181
181
  * The minimum glTF version that this asset targets.
182
182
  */
183
183
  minVersion?: string;
184
- extensions?: any;
184
+ extensions?: Record<string, any>;
185
185
  extras?: any;
186
- }
186
+ };
187
187
  /**
188
188
  * A buffer points to binary geometry, animation, or skins.
189
189
  */
190
- export interface Buffer {
190
+ export type GLTFBuffer = {
191
191
  /**
192
192
  * The uri of the buffer.
193
193
  */
@@ -197,13 +197,13 @@ export interface Buffer {
197
197
  */
198
198
  byteLength: number;
199
199
  name?: any;
200
- extensions?: any;
200
+ extensions?: Record<string, any>;
201
201
  extras?: any;
202
- }
202
+ };
203
203
  /**
204
204
  * A view into a buffer generally representing a subset of the buffer.
205
205
  */
206
- export interface BufferView {
206
+ export type GLTFBufferView = {
207
207
  /**
208
208
  * The index of the buffer.
209
209
  */
@@ -225,13 +225,13 @@ export interface BufferView {
225
225
  */
226
226
  target?: 34962 | 34963 | number;
227
227
  name?: any;
228
- extensions?: any;
228
+ extensions?: Record<string, any>;
229
229
  extras?: any;
230
- }
230
+ };
231
231
  /**
232
232
  * An orthographic camera containing properties to create an orthographic projection matrix.
233
233
  */
234
- export interface CameraOrthographic {
234
+ export type GLTFCameraOrthographic = {
235
235
  /**
236
236
  * The floating-point horizontal magnification of the view. Must not be zero.
237
237
  */
@@ -248,13 +248,13 @@ export interface CameraOrthographic {
248
248
  * The floating-point distance to the near clipping plane.
249
249
  */
250
250
  znear: number;
251
- extensions?: any;
251
+ extensions?: Record<string, any>;
252
252
  extras?: any;
253
- }
253
+ };
254
254
  /**
255
255
  * A perspective camera containing properties to create a perspective projection matrix.
256
256
  */
257
- export interface CameraPerspective {
257
+ export type GLTFCameraPerspective = {
258
258
  /**
259
259
  * The floating-point aspect ratio of the field of view.
260
260
  */
@@ -271,33 +271,33 @@ export interface CameraPerspective {
271
271
  * The floating-point distance to the near clipping plane.
272
272
  */
273
273
  znear: number;
274
- extensions?: any;
274
+ extensions?: Record<string, any>;
275
275
  extras?: any;
276
- }
276
+ };
277
277
  /**
278
278
  * A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene.
279
279
  */
280
- export interface Camera {
280
+ export type GLTFCamera = {
281
281
  /**
282
282
  * An orthographic camera containing properties to create an orthographic projection matrix.
283
283
  */
284
- orthographic?: CameraOrthographic;
284
+ orthographic?: GLTFCameraOrthographic;
285
285
  /**
286
286
  * A perspective camera containing properties to create a perspective projection matrix.
287
287
  */
288
- perspective?: CameraPerspective;
288
+ perspective?: GLTFCameraPerspective;
289
289
  /**
290
290
  * Specifies if the camera uses a perspective or orthographic projection.
291
291
  */
292
292
  type: 'perspective' | 'orthographic' | string;
293
293
  name?: any;
294
- extensions?: any;
294
+ extensions?: Record<string, any>;
295
295
  extras?: any;
296
- }
296
+ };
297
297
  /**
298
298
  * Image data used to create a texture. Image can be referenced by URI or `bufferView` index. `mimeType` is required in the latter case.
299
299
  */
300
- export interface Image {
300
+ export type GLTFImage = {
301
301
  /**
302
302
  * The uri of the image.
303
303
  */
@@ -311,13 +311,13 @@ export interface Image {
311
311
  */
312
312
  bufferView?: GLTFId;
313
313
  name?: any;
314
- extensions?: any;
314
+ extensions?: Record<string, any>;
315
315
  extras?: any;
316
- }
316
+ };
317
317
  /**
318
318
  * Reference to a texture.
319
319
  */
320
- export interface TextureInfo {
320
+ export type GLTFTextureInfo = {
321
321
  /**
322
322
  * The index of the texture.
323
323
  */
@@ -326,13 +326,13 @@ export interface TextureInfo {
326
326
  * The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
327
327
  */
328
328
  texCoord?: number;
329
- extensions?: any;
329
+ extensions?: Record<string, any>;
330
330
  extras?: any;
331
- }
331
+ };
332
332
  /**
333
333
  * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
334
334
  */
335
- export interface MaterialPbrMetallicRoughness {
335
+ export type GLTFMaterialPbrMetallicRoughness = {
336
336
  /**
337
337
  * The material's base color factor.
338
338
  */
@@ -340,7 +340,7 @@ export interface MaterialPbrMetallicRoughness {
340
340
  /**
341
341
  * The base color texture.
342
342
  */
343
- baseColorTexture?: TextureInfo;
343
+ baseColorTexture?: GLTFTextureInfo;
344
344
  /**
345
345
  * The metalness of the material.
346
346
  */
@@ -352,53 +352,53 @@ export interface MaterialPbrMetallicRoughness {
352
352
  /**
353
353
  * The metallic-roughness texture.
354
354
  */
355
- metallicRoughnessTexture?: TextureInfo;
356
- extensions?: any;
355
+ metallicRoughnessTexture?: GLTFTextureInfo;
356
+ extensions?: Record<string, any>;
357
357
  extras?: any;
358
- }
359
- export interface MaterialNormalTextureInfo {
360
- index?: any;
358
+ };
359
+ export type GLTFMaterialNormalTextureInfo = {
360
+ index: any;
361
361
  texCoord?: any;
362
362
  /**
363
363
  * The scalar multiplier applied to each normal vector of the normal texture.
364
364
  */
365
365
  scale?: number;
366
- extensions?: any;
366
+ extensions?: Record<string, any>;
367
367
  extras?: any;
368
- }
369
- export interface MaterialOcclusionTextureInfo {
370
- index?: any;
368
+ };
369
+ export type GLTFMaterialOcclusionTextureInfo = {
370
+ index: any;
371
371
  texCoord?: any;
372
372
  /**
373
373
  * A scalar multiplier controlling the amount of occlusion applied.
374
374
  */
375
375
  strength?: number;
376
- extensions?: any;
376
+ extensions?: Record<string, any>;
377
377
  extras?: any;
378
- }
378
+ };
379
379
  /**
380
380
  * The material appearance of a primitive.
381
381
  */
382
- export interface Material {
382
+ export type GLTFMaterial = {
383
383
  name?: any;
384
- extensions?: any;
384
+ extensions?: Record<string, any>;
385
385
  extras?: any;
386
386
  /**
387
387
  * 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.
388
388
  */
389
- pbrMetallicRoughness?: MaterialPbrMetallicRoughness;
389
+ pbrMetallicRoughness?: GLTFMaterialPbrMetallicRoughness;
390
390
  /**
391
391
  * The normal map texture.
392
392
  */
393
- normalTexture?: MaterialNormalTextureInfo;
393
+ normalTexture?: GLTFMaterialNormalTextureInfo;
394
394
  /**
395
395
  * The occlusion map texture.
396
396
  */
397
- occlusionTexture?: MaterialOcclusionTextureInfo;
397
+ occlusionTexture?: GLTFMaterialOcclusionTextureInfo;
398
398
  /**
399
399
  * The emissive map texture.
400
400
  */
401
- emissiveTexture?: TextureInfo;
401
+ emissiveTexture?: GLTFTextureInfo;
402
402
  /**
403
403
  * The emissive color of the material.
404
404
  */
@@ -415,11 +415,11 @@ export interface Material {
415
415
  * Specifies whether the material is double sided.
416
416
  */
417
417
  doubleSided?: boolean;
418
- }
418
+ };
419
419
  /**
420
420
  * Geometry to be rendered with the given material.
421
421
  */
422
- export interface MeshPrimitive {
422
+ export type GLTFMeshPrimitive = {
423
423
  /**
424
424
  * A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.
425
425
  */
@@ -444,30 +444,30 @@ export interface MeshPrimitive {
444
444
  targets?: {
445
445
  [k: string]: GLTFId;
446
446
  }[];
447
- extensions?: any;
447
+ extensions?: Record<string, any>;
448
448
  extras?: any;
449
- }
449
+ };
450
450
  /**
451
451
  * A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene.
452
452
  */
453
- export interface Mesh {
453
+ export type GLTFMesh = {
454
454
  id?: string;
455
455
  /**
456
456
  * An array of primitives, each defining geometry to be rendered with a material.
457
457
  */
458
- primitives: MeshPrimitive[];
458
+ primitives: GLTFMeshPrimitive[];
459
459
  /**
460
460
  * Array of weights to be applied to the Morph Targets.
461
461
  */
462
462
  weights?: number[];
463
463
  name?: any;
464
- extensions?: any;
464
+ extensions?: Record<string, any>;
465
465
  extras?: any;
466
- }
466
+ };
467
467
  /**
468
468
  * 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.
469
469
  */
470
- export interface Node {
470
+ export type GLTFNode = {
471
471
  /**
472
472
  * The index of the camera referenced by this node.
473
473
  */
@@ -505,13 +505,13 @@ export interface Node {
505
505
  */
506
506
  weights?: number[];
507
507
  name?: any;
508
- extensions?: any;
508
+ extensions?: Record<string, any>;
509
509
  extras?: any;
510
- }
510
+ };
511
511
  /**
512
512
  * Texture sampler properties for filtering and wrapping modes.
513
513
  */
514
- export interface Sampler {
514
+ export type GLTFSampler = {
515
515
  /**
516
516
  * Magnification filter.
517
517
  */
@@ -529,25 +529,26 @@ export interface Sampler {
529
529
  */
530
530
  wrapT?: 33071 | 33648 | 10497 | number;
531
531
  name?: any;
532
- extensions?: any;
532
+ extensions?: Record<string, any>;
533
533
  extras?: any;
534
- }
534
+ };
535
535
  /**
536
536
  * The root nodes of a scene.
537
537
  */
538
- export interface Scene {
538
+ export type GLTFScene = {
539
539
  /**
540
540
  * The indices of each root node.
541
541
  */
542
542
  nodes?: GLTFId[];
543
543
  name?: any;
544
- extensions?: any;
544
+ extensions?: Record<string, any>;
545
545
  extras?: any;
546
- }
546
+ };
547
547
  /**
548
548
  * Joints and matrices defining a skin.
549
549
  */
550
- export interface Skin {
550
+ export type GLTFSkin = {
551
+ id?: string;
551
552
  /**
552
553
  * 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.
553
554
  */
@@ -556,34 +557,28 @@ export interface Skin {
556
557
  * The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root.
557
558
  */
558
559
  skeleton?: GLTFId;
559
- /**
560
- * Indices of skeleton nodes, used as joints in this skin.
561
- */
560
+ /** Indices of skeleton nodes, used as joints in this skin. */
562
561
  joints: GLTFId[];
563
562
  name?: any;
564
- extensions?: any;
563
+ extensions?: Record<string, any>;
565
564
  extras?: any;
566
- }
565
+ };
567
566
  /**
568
567
  * A texture and its sampler.
569
568
  */
570
- export interface Texture {
571
- /**
572
- * The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used.
573
- */
569
+ export type GLTFTexture = {
570
+ /** The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used. */
574
571
  sampler?: GLTFId;
575
- /**
576
- * The index of the image used by this texture.
577
- */
572
+ /** The index of the image used by this texture. */
578
573
  source?: GLTFId;
579
574
  name?: any;
580
- extensions?: any;
575
+ extensions?: Record<string, any>;
581
576
  extras?: any;
582
- }
577
+ };
583
578
  /**
584
579
  * The root object for a glTF asset.
585
580
  */
586
- export interface GLTF {
581
+ export type GLTF = {
587
582
  /**
588
583
  * Names of glTF extensions used somewhere in this asset.
589
584
  */
@@ -595,47 +590,47 @@ export interface GLTF {
595
590
  /**
596
591
  * An array of accessors.
597
592
  */
598
- accessors?: Accessor[];
593
+ accessors?: GLTFAccessor[];
599
594
  /**
600
595
  * An array of keyframe animations.
601
596
  */
602
- animations?: Animation[];
597
+ animations?: GLTFAnimation[];
603
598
  /**
604
599
  * Metadata about the glTF asset.
605
600
  */
606
- asset: Asset;
601
+ asset: GLTFAsset;
607
602
  /**
608
603
  * An array of buffers.
609
604
  */
610
- buffers?: Buffer[];
605
+ buffers?: GLTFBuffer[];
611
606
  /**
612
607
  * An array of bufferViews.
613
608
  */
614
- bufferViews?: BufferView[];
609
+ bufferViews?: GLTFBufferView[];
615
610
  /**
616
611
  * An array of cameras.
617
612
  */
618
- cameras?: Camera[];
613
+ cameras?: GLTFCamera[];
619
614
  /**
620
615
  * An array of images.
621
616
  */
622
- images?: Image[];
617
+ images?: GLTFImage[];
623
618
  /**
624
619
  * An array of materials.
625
620
  */
626
- materials?: Material[];
621
+ materials?: GLTFMaterial[];
627
622
  /**
628
623
  * An array of meshes.
629
624
  */
630
- meshes?: Mesh[];
625
+ meshes?: GLTFMesh[];
631
626
  /**
632
627
  * An array of nodes.
633
628
  */
634
- nodes?: Node[];
629
+ nodes?: GLTFNode[];
635
630
  /**
636
631
  * An array of samplers.
637
632
  */
638
- samplers?: Sampler[];
633
+ samplers?: GLTFSampler[];
639
634
  /**
640
635
  * The index of the default scene.
641
636
  */
@@ -643,23 +638,24 @@ export interface GLTF {
643
638
  /**
644
639
  * An array of scenes.
645
640
  */
646
- scenes?: Scene[];
641
+ scenes?: GLTFScene[];
647
642
  /**
648
643
  * An array of skins.
649
644
  */
650
- skins?: Skin[];
645
+ skins?: GLTFSkin[];
651
646
  /**
652
647
  * An array of textures.
653
648
  */
654
- textures?: Texture[];
655
- extensions?: any;
656
- extras?: any;
657
- }
649
+ textures?: GLTFTexture[];
650
+ extensions?: Record<string, unknown>;
651
+ extras?: unknown;
652
+ [k: string]: unknown;
653
+ };
658
654
  /**
659
655
  * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF
660
656
  * TODO - this can be used on both images and shaders
661
657
  */
662
- export declare type GLTF_KHR_binary_glTF = {
658
+ export type GLTF_KHR_binary_glTF = {
663
659
  bufferView: number;
664
660
  mimeType?: string;
665
661
  height?: number;
@@ -669,7 +665,7 @@ export declare type GLTF_KHR_binary_glTF = {
669
665
  /**
670
666
  * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression
671
667
  */
672
- export declare type GLTF_KHR_draco_mesh_compression = {
668
+ export type GLTF_KHR_draco_mesh_compression = {
673
669
  bufferView: GLTFId;
674
670
  attributes: {
675
671
  [name: string]: number;
@@ -679,7 +675,7 @@ export declare type GLTF_KHR_draco_mesh_compression = {
679
675
  /**
680
676
  * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu
681
677
  */
682
- export declare type GLTF_KHR_texture_basisu = {
678
+ export type GLTF_KHR_texture_basisu = {
683
679
  source: GLTFId;
684
680
  extras?: any;
685
681
  };
@@ -693,7 +689,7 @@ export declare type GLTF_KHR_texture_basisu = {
693
689
  * mode string The compression mode. ✅ Required
694
690
  * filter string The compression filter. Default: "NONE"
695
691
  */
696
- export declare type GLTF_EXT_meshopt_compression = {
692
+ export type GLTF_EXT_meshopt_compression = {
697
693
  buffer: number;
698
694
  byteOffset?: number;
699
695
  byteLength: number;
@@ -706,15 +702,417 @@ export declare type GLTF_EXT_meshopt_compression = {
706
702
  /**
707
703
  * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp
708
704
  */
709
- export declare type GLTF_EXT_texture_webp = {
705
+ export type GLTF_EXT_texture_webp = {
710
706
  source: GLTFId;
711
707
  extras?: any;
712
708
  };
713
709
  /**
714
710
  * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_texture_dds
715
711
  */
716
- export declare type GLTF_MSFT_texture_dds = {
712
+ export type GLTF_MSFT_texture_dds = {
717
713
  source: GLTFId;
718
714
  extras?: any;
719
715
  };
716
+ /**
717
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#gltf-extension-1
718
+ * @todo belom88 complete typings
719
+ */
720
+ export type GLTF_EXT_mesh_features = {
721
+ featureIds: {
722
+ featureCount: number;
723
+ nullFeatureId: number;
724
+ label: string;
725
+ attribute: any;
726
+ texture: any;
727
+ propertyTable: number;
728
+ }[];
729
+ extensions?: any;
730
+ extras?: any;
731
+ [key: string]: any;
732
+ };
733
+ /**
734
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#gltf-extension-1
735
+ */
736
+ export type GLTF_EXT_feature_metadata = {
737
+ /** An object defining classes and enums. */
738
+ schema?: ExtFeatureMetadataSchema;
739
+ /** A uri to an external schema file. */
740
+ schemaUri?: string;
741
+ /** An object containing statistics about features. */
742
+ statistics?: Statistics;
743
+ /** A dictionary, where each key is a feature table ID and each value is an object defining the feature table. */
744
+ featureTables?: {
745
+ [key: string]: EXT_feature_metadata_feature_table;
746
+ };
747
+ /** A dictionary, where each key is a feature texture ID and each value is an object defining the feature texture. */
748
+ featureTextures?: {
749
+ [key: string]: FeatureTexture;
750
+ };
751
+ extensions?: Record<string, any>;
752
+ extras?: any;
753
+ [key: string]: any;
754
+ };
755
+ /**
756
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#schema
757
+ */
758
+ type ExtFeatureMetadataSchema = {
759
+ /** The name of the schema. */
760
+ name?: string;
761
+ /** The description of the schema. */
762
+ description?: string;
763
+ /** Application-specific version of the schema. */
764
+ version?: string;
765
+ /** A dictionary, where each key is a class ID and each value is an object defining the class. */
766
+ classes?: {
767
+ [key: string]: EXT_feature_metadata_class_object;
768
+ };
769
+ /** A dictionary, where each key is an enum ID and each value is an object defining the values for the enum. */
770
+ enums?: {
771
+ [key: string]: ExtFeatureMetadataEnum;
772
+ };
773
+ extensions?: Record<string, any>;
774
+ extras?: any;
775
+ [key: string]: any;
776
+ };
777
+ /**
778
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class
779
+ */
780
+ export type EXT_feature_metadata_class_object = {
781
+ /** The name of the class, e.g. for display purposes. */
782
+ name?: string;
783
+ /** The description of the class. */
784
+ description?: string;
785
+ /** A dictionary, where each key is a property ID and each value is an object defining the property. */
786
+ properties: {
787
+ [key: string]: ClassProperty;
788
+ };
789
+ extensions?: Record<string, any>;
790
+ extras?: any;
791
+ [key: string]: any;
792
+ };
793
+ /**
794
+ * https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-property
795
+ */
796
+ export type ClassProperty = {
797
+ /** The name of the property, e.g. for display purposes. */
798
+ name?: string;
799
+ /** The description of the property. */
800
+ description?: string;
801
+ /**
802
+ * The property type. If ENUM is used, then enumType must also be specified.
803
+ * If ARRAY is used, then componentType must also be specified.
804
+ * ARRAY is a fixed-length array when componentCount is defined, and variable-length otherwise.
805
+ */
806
+ type: ClassPropertyType;
807
+ /**
808
+ * An enum ID as declared in the enums dictionary.
809
+ * This value must be specified when type or componentType is ENUM.
810
+ */
811
+ enumType?: string;
812
+ /**
813
+ * When type is ARRAY this indicates the type of each component of the array.
814
+ * If ENUM is used, then enumType must also be specified.
815
+ */
816
+ componentType?: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64' | 'FLOAT32' | 'FLOAT64' | 'BOOLEAN' | 'STRING' | 'ENUM';
817
+ /** The number of components per element for ARRAY elements. */
818
+ componentCount?: number;
819
+ /**
820
+ * Specifies whether integer values are normalized.
821
+ * This applies both when type is an integer type, or when type is ARRAY with a componentType that is an integer type.
822
+ * For unsigned integer types, values are normalized between [0.0, 1.0].
823
+ * For signed integer types, values are normalized between [-1.0, 1.0].
824
+ * For all other types, this property is ignored.
825
+ */
826
+ normalized: boolean;
827
+ /**
828
+ * Maximum allowed values for property values.
829
+ * Only applicable for numeric types and fixed-length arrays of numeric types.
830
+ * For numeric types this is a single number.
831
+ * For fixed-length arrays this is an array with componentCount number of elements.
832
+ * The normalized property has no effect on these values: they always correspond to the integer values.
833
+ */
834
+ max?: number | number[];
835
+ /**
836
+ * Minimum allowed values for property values.
837
+ * Only applicable for numeric types and fixed-length arrays of numeric types.
838
+ * For numeric types this is a single number.
839
+ * For fixed-length arrays this is an array with componentCount number of elements.
840
+ * The normalized property has no effect on these values: they always correspond to the integer values.
841
+ */
842
+ min?: number | number[];
843
+ /**
844
+ * A default value to use when the property value is not defined.
845
+ * If used, optional must be set to true.
846
+ * The type of the default value must match the property definition: For BOOLEAN use true or false.
847
+ * For STRING use a JSON string. For a numeric type use a JSON number.
848
+ * For ENUM use the enum name, not the integer value.
849
+ * For ARRAY use a JSON array containing values matching the componentType.
850
+ */
851
+ default?: boolean | number | string | number[];
852
+ /** If true, this property is optional. */
853
+ optional?: boolean;
854
+ /**
855
+ * An identifier that describes how this property should be interpreted.
856
+ * The semantic cannot be used by other properties in the class.
857
+ */
858
+ semantic?: string;
859
+ extensions?: Record<string, any>;
860
+ extras?: any;
861
+ [key: string]: any;
862
+ };
863
+ /**
864
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#classpropertytype
865
+ */
866
+ type ClassPropertyType = 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64' | 'FLOAT32' | 'FLOAT64' | 'BOOLEAN' | 'STRING' | 'ENUM' | 'ARRAY';
867
+ /**
868
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum
869
+ */
870
+ type ExtFeatureMetadataEnum = {
871
+ /** The name of the enum, e.g. for display purposes. */
872
+ name?: string;
873
+ /** The description of the enum. */
874
+ description?: string;
875
+ /** The type of the integer enum value. */
876
+ valueType?: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64';
877
+ /** An array of enum values. Duplicate names or duplicate integer values are not allowed. */
878
+ values: EnumValue[];
879
+ extensions?: Record<string, any>;
880
+ extras?: any;
881
+ [key: string]: any;
882
+ };
883
+ /**
884
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum-value
885
+ */
886
+ type EnumValue = {
887
+ /** The name of the enum value. */
888
+ name: string;
889
+ /** The description of the enum value. */
890
+ description?: string;
891
+ /** The integer enum value. */
892
+ value: number;
893
+ extensions?: Record<string, any>;
894
+ extras?: any;
895
+ [key: string]: any;
896
+ };
897
+ /**
898
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table
899
+ */
900
+ export type EXT_feature_metadata_feature_table = {
901
+ featureTable: any;
902
+ /** The class that property values conform to. The value must be a class ID declared in the classes dictionary. */
903
+ class?: string;
904
+ /** The number of features, as well as the number of elements in each property array. */
905
+ count: number;
906
+ /**
907
+ * A dictionary, where each key corresponds to a property ID in the class properties dictionary
908
+ * and each value is an object describing where property values are stored.
909
+ * Optional properties may be excluded from this dictionary.
910
+ */
911
+ properties?: {
912
+ [key: string]: FeatureTableProperty;
913
+ };
914
+ extensions?: Record<string, any>;
915
+ extras?: any;
916
+ [key: string]: any;
917
+ };
918
+ /**
919
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table-property
920
+ */
921
+ export type FeatureTableProperty = {
922
+ /**
923
+ * The index of the buffer view containing property values.
924
+ * The data type of property values is determined by the property definition:
925
+ * When type is BOOLEAN values are packed into a bitfield.
926
+ * When type is STRING values are stored as byte sequences and decoded as UTF-8 strings.
927
+ * When type is a numeric type values are stored as the provided type.
928
+ * When type is ENUM values are stored as the enum's valueType.
929
+ * Each enum value in the buffer must match one of the allowed values in the enum definition.
930
+ * When type is ARRAY elements are packed tightly together and the data type is based on the componentType following the same rules as above.
931
+ * arrayOffsetBufferView is required for variable-size arrays
932
+ * and stringOffsetBufferView is required for strings (for variable-length arrays of strings, both are required)
933
+ * The buffer view byteOffset must be aligned to a multiple of 8 bytes.
934
+ * If the buffer view's buffer is the GLB-stored BIN chunk the byte offset is measured relative to the beginning of the GLB.
935
+ * Otherwise it is measured relative to the beginning of the buffer.
936
+ */
937
+ bufferView: number;
938
+ /** The type of values in arrayOffsetBufferView and stringOffsetBufferView. */
939
+ offsetType?: string;
940
+ /**
941
+ * The index of the buffer view containing offsets for variable-length arrays.
942
+ * The number of offsets is equal to the feature table count plus one.
943
+ * The offsets represent the start positions of each array, with the last offset representing the position after the last array.
944
+ * The array length is computed using the difference between the current offset and the subsequent offset.
945
+ * If componentType is STRING the offsets index into the string offsets array (stored in stringOffsetBufferView),
946
+ * otherwise they index into the property array (stored in bufferView).
947
+ * The data type of these offsets is determined by offsetType.
948
+ * The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView
949
+ */
950
+ arrayOffsetBufferView?: number;
951
+ /**
952
+ * The index of the buffer view containing offsets for strings.
953
+ * The number of offsets is equal to the number of string components plus one.
954
+ * The offsets represent the byte offsets of each string in the main bufferView,
955
+ * with the last offset representing the byte offset after the last string.
956
+ * The string byte length is computed using the difference between the current offset and the subsequent offset.
957
+ * The data type of these offsets is determined by offsetType.
958
+ * The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView.
959
+ */
960
+ stringOffsetBufferView?: number;
961
+ extensions?: Record<string, any>;
962
+ extras?: any;
963
+ [key: string]: any;
964
+ };
965
+ /**
966
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-texture
967
+ */
968
+ type FeatureTexture = {
969
+ /** The class this feature texture conforms to. The value must be a class ID declared in the classes dictionary. */
970
+ class: string;
971
+ /**
972
+ * A dictionary, where each key corresponds to a property ID in the class properties dictionary
973
+ * and each value describes the texture channels containing property values.
974
+ */
975
+ properties: {
976
+ [key: string]: TextureAccessor;
977
+ };
978
+ extensions?: Record<string, any>;
979
+ extras?: any;
980
+ [key: string]: any;
981
+ };
982
+ /**
983
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#texture-accessor
984
+ */
985
+ type TextureAccessor = {
986
+ /** Texture channels containing property values. Channels are labeled by rgba and are swizzled with a string of 1-4 characters. */
987
+ channels: string;
988
+ /** The glTF texture and texture coordinates to use. */
989
+ texture: GLTFTextureInfo;
990
+ extensions?: Record<string, any>;
991
+ extras?: any;
992
+ [key: string]: any;
993
+ };
994
+ /**
995
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#statistics-1
996
+ */
997
+ type Statistics = {
998
+ /**
999
+ * A dictionary, where each key is a class ID declared in the classes dictionary
1000
+ * and each value is an object containing statistics about features that conform to the class.
1001
+ */
1002
+ classes?: {
1003
+ [key: string]: ClassStatistics;
1004
+ };
1005
+ extensions?: Record<string, any>;
1006
+ extras?: any;
1007
+ [key: string]: any;
1008
+ };
1009
+ /**
1010
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-statistics
1011
+ */
1012
+ type ClassStatistics = {
1013
+ /** The number of features that conform to the class. */
1014
+ count?: number;
1015
+ /**
1016
+ * A dictionary, where each key is a class ID declared in the classes dictionary
1017
+ * and each value is an object containing statistics about property values.
1018
+ */
1019
+ properties?: {
1020
+ [key: string]: StatisticsClassProperty;
1021
+ };
1022
+ extensions?: Record<string, any>;
1023
+ extras?: any;
1024
+ [key: string]: any;
1025
+ };
1026
+ /**
1027
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#property-statistics
1028
+ * min, max, mean, median, standardDeviation, variance, sum are
1029
+ * only applicable for numeric types and fixed-length arrays of numeric types.
1030
+ * For numeric types this is a single number.
1031
+ * For fixed-length arrays this is an array with componentCount number of elements.
1032
+ * The normalized property has no effect on these values.
1033
+ */
1034
+ type StatisticsClassProperty = {
1035
+ /** The minimum property value. */
1036
+ min?: number | number[];
1037
+ /** The maximum property value. */
1038
+ max?: number | number[];
1039
+ /** The arithmetic mean of the property values. */
1040
+ mean?: number | number[];
1041
+ /** The median of the property values. */
1042
+ median?: number | number[];
1043
+ /** The standard deviation of the property values. */
1044
+ standardDeviation?: number | number[];
1045
+ /** The variance of the property values. */
1046
+ variance?: number | number[];
1047
+ /** The sum of the property values. */
1048
+ sum?: number | number[];
1049
+ /**
1050
+ * A dictionary, where each key corresponds to an enum name and each value is the number of occurrences of that enum.
1051
+ * Only applicable when type or componentType is ENUM.
1052
+ * For fixed-length arrays, this is an array with componentCount number of elements.
1053
+ */
1054
+ occurrences: {
1055
+ [key: string]: number | number[];
1056
+ };
1057
+ extensions?: Record<string, any>;
1058
+ extras?: any;
1059
+ [key: string]: any;
1060
+ };
1061
+ /**
1062
+ * 3DTilesNext EXT_feature_metadata primitive extension
1063
+ * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#primitive-extension
1064
+ */
1065
+ export type GLTF_EXT_feature_metadata_primitive = {
1066
+ /** Feature ids definition in attributes */
1067
+ featureIdAttributes?: GLTF_EXT_feature_metadata_attribute[];
1068
+ /** Feature ids definition in textures */
1069
+ featureIdTextures?: GLTF_EXT_feature_metadata_attribute[];
1070
+ /** An array of IDs of feature textures from the root EXT_feature_metadata object. */
1071
+ featureTextures?: string[];
1072
+ extensions?: Record<string, any>;
1073
+ extras?: any;
1074
+ [key: string]: any;
1075
+ };
1076
+ /**
1077
+ * Attribute which described featureIds definition.
1078
+ */
1079
+ export type GLTF_EXT_feature_metadata_attribute = {
1080
+ /** Name of feature table */
1081
+ featureTable: string;
1082
+ /** Described how feature ids are defined */
1083
+ featureIds: ExtFeatureMetadataFeatureIds;
1084
+ extensions?: Record<string, any>;
1085
+ extras?: any;
1086
+ [key: string]: any;
1087
+ };
1088
+ /**
1089
+ * Defining featureIds by attributes or implicitly.
1090
+ */
1091
+ type ExtFeatureMetadataFeatureIds = {
1092
+ /** Name of attribute where featureIds are defined */
1093
+ attribute?: string;
1094
+ /** Sets a constant feature ID for each vertex. The default is 0. */
1095
+ constant?: number;
1096
+ /** Sets the rate at which feature IDs increment.
1097
+ * If divisor is zero then constant is used.
1098
+ * If divisor is greater than zero the feature ID increments once per divisor sets of vertices, starting at constant.
1099
+ * The default is 0
1100
+ */
1101
+ divisor?: number;
1102
+ /** gLTF textureInfo object - https://github.com/CesiumGS/glTF/blob/3d-tiles-next/specification/2.0/schema/textureInfo.schema.json */
1103
+ texture?: ExtFeatureMetadataTexture;
1104
+ /** Must be a single channel ("r", "g", "b", or "a") */
1105
+ channels?: 'r' | 'g' | 'b' | 'a';
1106
+ };
1107
+ /**
1108
+ * Reference to a texture.
1109
+ */
1110
+ type ExtFeatureMetadataTexture = {
1111
+ /** The set index of texture's TEXCOORD attribute used for texture coordinate mapping.*/
1112
+ texCoord: number;
1113
+ /** The index of the texture. */
1114
+ index: number;
1115
+ };
1116
+ export type GLTFObject = GLTFAccessor | GLTFBuffer | GLTFBufferView | GLTFMeshPrimitive | GLTFMesh | GLTFNode | GLTFMaterial | GLTFSampler | GLTFScene | GLTFSkin | GLTFTexture | GLTFImage;
1117
+ export {};
720
1118
  //# sourceMappingURL=gltf-json-schema.d.ts.map