@loaders.gl/gltf 4.0.0-alpha.9 → 4.0.0-beta.2

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 (152) hide show
  1. package/dist/dist.min.js +3777 -3105
  2. package/dist/es5/glb-loader.js +1 -3
  3. package/dist/es5/glb-loader.js.map +1 -1
  4. package/dist/es5/index.js +33 -0
  5. package/dist/es5/index.js.map +1 -1
  6. package/dist/es5/lib/api/gltf-extensions.js +3 -1
  7. package/dist/es5/lib/api/gltf-extensions.js.map +1 -1
  8. package/dist/es5/lib/extensions/EXT_mesh_features.js +99 -0
  9. package/dist/es5/lib/extensions/EXT_mesh_features.js.map +1 -0
  10. package/dist/es5/lib/extensions/EXT_meshopt_compression.js +2 -2
  11. package/dist/es5/lib/extensions/EXT_meshopt_compression.js.map +1 -1
  12. package/dist/es5/lib/extensions/EXT_structural_metadata.js +375 -0
  13. package/dist/es5/lib/extensions/EXT_structural_metadata.js.map +1 -0
  14. package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js +6 -7
  15. package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js.map +1 -1
  16. package/dist/es5/lib/extensions/KHR_texture_transform.js +2 -1
  17. package/dist/es5/lib/extensions/KHR_texture_transform.js.map +1 -1
  18. package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js +162 -183
  19. package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -1
  20. package/dist/es5/lib/extensions/utils/3d-tiles-utils.js +254 -0
  21. package/dist/es5/lib/extensions/utils/3d-tiles-utils.js.map +1 -0
  22. package/dist/es5/lib/gltf-utils/gltf-utils.js +29 -0
  23. package/dist/es5/lib/gltf-utils/gltf-utils.js.map +1 -1
  24. package/dist/es5/lib/parsers/parse-gltf.js +7 -4
  25. package/dist/es5/lib/parsers/parse-gltf.js.map +1 -1
  26. package/dist/es5/lib/types/gltf-ext-feature-metadata-schema.js +2 -0
  27. package/dist/es5/lib/types/gltf-ext-feature-metadata-schema.js.map +1 -0
  28. package/dist/es5/lib/types/gltf-ext-mesh-features-schema.js +2 -0
  29. package/dist/es5/lib/types/gltf-ext-mesh-features-schema.js.map +1 -0
  30. package/dist/es5/lib/types/gltf-ext-structural-metadata-schema.js +2 -0
  31. package/dist/es5/lib/types/gltf-ext-structural-metadata-schema.js.map +1 -0
  32. package/dist/es5/lib/types/gltf-json-schema.js.map +1 -1
  33. package/dist/es5/lib/types/gltf-types.js.map +1 -1
  34. package/dist/es5/lib/utils/version.js +1 -1
  35. package/dist/es5/lib/utils/version.js.map +1 -1
  36. package/dist/esm/glb-loader.js +0 -1
  37. package/dist/esm/glb-loader.js.map +1 -1
  38. package/dist/esm/index.js +5 -0
  39. package/dist/esm/index.js.map +1 -1
  40. package/dist/esm/lib/api/gltf-extensions.js +3 -1
  41. package/dist/esm/lib/api/gltf-extensions.js.map +1 -1
  42. package/dist/esm/lib/extensions/EXT_mesh_features.js +43 -0
  43. package/dist/esm/lib/extensions/EXT_mesh_features.js.map +1 -0
  44. package/dist/esm/lib/extensions/EXT_meshopt_compression.js +2 -2
  45. package/dist/esm/lib/extensions/EXT_meshopt_compression.js.map +1 -1
  46. package/dist/esm/lib/extensions/EXT_structural_metadata.js +302 -0
  47. package/dist/esm/lib/extensions/EXT_structural_metadata.js.map +1 -0
  48. package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js +2 -5
  49. package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js.map +1 -1
  50. package/dist/esm/lib/extensions/KHR_texture_transform.js +2 -1
  51. package/dist/esm/lib/extensions/KHR_texture_transform.js.map +1 -1
  52. package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js +156 -167
  53. package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -1
  54. package/dist/esm/lib/extensions/utils/3d-tiles-utils.js +215 -0
  55. package/dist/esm/lib/extensions/utils/3d-tiles-utils.js.map +1 -0
  56. package/dist/esm/lib/gltf-utils/gltf-utils.js +30 -0
  57. package/dist/esm/lib/gltf-utils/gltf-utils.js.map +1 -1
  58. package/dist/esm/lib/parsers/parse-gltf.js +6 -6
  59. package/dist/esm/lib/parsers/parse-gltf.js.map +1 -1
  60. package/dist/esm/lib/types/gltf-ext-feature-metadata-schema.js +2 -0
  61. package/dist/esm/lib/types/gltf-ext-feature-metadata-schema.js.map +1 -0
  62. package/dist/esm/lib/types/gltf-ext-mesh-features-schema.js +2 -0
  63. package/dist/esm/lib/types/gltf-ext-mesh-features-schema.js.map +1 -0
  64. package/dist/esm/lib/types/gltf-ext-structural-metadata-schema.js +2 -0
  65. package/dist/esm/lib/types/gltf-ext-structural-metadata-schema.js.map +1 -0
  66. package/dist/esm/lib/types/gltf-json-schema.js.map +1 -1
  67. package/dist/esm/lib/types/gltf-types.js.map +1 -1
  68. package/dist/esm/lib/utils/version.js +1 -1
  69. package/dist/esm/lib/utils/version.js.map +1 -1
  70. package/dist/glb-loader.d.ts +3 -1
  71. package/dist/glb-loader.d.ts.map +1 -1
  72. package/dist/index.d.ts +10 -2
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/lib/api/gltf-extensions.d.ts.map +1 -1
  75. package/dist/lib/extensions/EXT_mesh_features.d.ts +7 -0
  76. package/dist/lib/extensions/EXT_mesh_features.d.ts.map +1 -0
  77. package/dist/lib/extensions/EXT_structural_metadata.d.ts +16 -0
  78. package/dist/lib/extensions/EXT_structural_metadata.d.ts.map +1 -0
  79. package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts +1 -1
  80. package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts.map +1 -1
  81. package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts +9 -0
  82. package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts.map +1 -1
  83. package/dist/lib/extensions/utils/3d-tiles-utils.d.ts +82 -0
  84. package/dist/lib/extensions/utils/3d-tiles-utils.d.ts.map +1 -0
  85. package/dist/lib/gltf-utils/gltf-utils.d.ts +2 -0
  86. package/dist/lib/gltf-utils/gltf-utils.d.ts.map +1 -1
  87. package/dist/lib/parsers/parse-gltf.d.ts.map +1 -1
  88. package/dist/lib/types/gltf-ext-feature-metadata-schema.d.ts +421 -0
  89. package/dist/lib/types/gltf-ext-feature-metadata-schema.d.ts.map +1 -0
  90. package/dist/lib/types/gltf-ext-mesh-features-schema.d.ts +43 -0
  91. package/dist/lib/types/gltf-ext-mesh-features-schema.d.ts.map +1 -0
  92. package/dist/lib/types/gltf-ext-structural-metadata-schema.d.ts +329 -0
  93. package/dist/lib/types/gltf-ext-structural-metadata-schema.d.ts.map +1 -0
  94. package/dist/lib/types/gltf-json-schema.d.ts +12 -404
  95. package/dist/lib/types/gltf-json-schema.d.ts.map +1 -1
  96. package/dist/lib/types/gltf-types.d.ts +4 -1
  97. package/dist/lib/types/gltf-types.d.ts.map +1 -1
  98. package/package.json +6 -6
  99. package/src/glb-loader.ts +3 -3
  100. package/src/index.ts +37 -6
  101. package/src/lib/api/gltf-extensions.ts +6 -2
  102. package/src/lib/extensions/EXT_mesh_features.ts +91 -0
  103. package/src/lib/extensions/EXT_meshopt_compression.ts +1 -1
  104. package/src/lib/extensions/EXT_structural_metadata.ts +750 -0
  105. package/src/lib/extensions/KHR_draco_mesh_compression.ts +7 -7
  106. package/src/lib/extensions/KHR_texture_transform.ts +1 -1
  107. package/src/lib/extensions/deprecated/EXT_feature_metadata.ts +407 -281
  108. package/src/lib/extensions/utils/3d-tiles-utils.ts +430 -0
  109. package/src/lib/gltf-utils/gltf-utils.ts +38 -0
  110. package/src/lib/parsers/parse-gltf.ts +14 -6
  111. package/src/lib/types/gltf-ext-feature-metadata-schema.ts +470 -0
  112. package/src/lib/types/gltf-ext-mesh-features-schema.ts +46 -0
  113. package/src/lib/types/gltf-ext-structural-metadata-schema.ts +378 -0
  114. package/src/lib/types/gltf-json-schema.ts +26 -465
  115. package/src/lib/types/gltf-types.ts +5 -3
  116. package/dist/bundle.js +0 -5
  117. package/dist/glb-loader.js +0 -36
  118. package/dist/glb-writer.js +0 -35
  119. package/dist/gltf-loader.js +0 -50
  120. package/dist/gltf-writer.js +0 -32
  121. package/dist/index.js +0 -28
  122. package/dist/lib/api/gltf-extensions.js +0 -83
  123. package/dist/lib/api/gltf-scenegraph.js +0 -580
  124. package/dist/lib/api/normalize-gltf-v1.js +0 -299
  125. package/dist/lib/api/post-process-gltf.js +0 -433
  126. package/dist/lib/encoders/encode-glb.js +0 -72
  127. package/dist/lib/encoders/encode-gltf.js +0 -32
  128. package/dist/lib/extensions/EXT_meshopt_compression.js +0 -41
  129. package/dist/lib/extensions/EXT_texture_webp.js +0 -36
  130. package/dist/lib/extensions/KHR_binary_gltf.js +0 -39
  131. package/dist/lib/extensions/KHR_draco_mesh_compression.js +0 -138
  132. package/dist/lib/extensions/KHR_texture_basisu.js +0 -29
  133. package/dist/lib/extensions/KHR_texture_transform.js +0 -227
  134. package/dist/lib/extensions/deprecated/EXT_feature_metadata.js +0 -290
  135. package/dist/lib/extensions/deprecated/KHR_lights_punctual.js +0 -59
  136. package/dist/lib/extensions/deprecated/KHR_materials_unlit.js +0 -44
  137. package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js +0 -79
  138. package/dist/lib/gltf-utils/get-typed-array.js +0 -41
  139. package/dist/lib/gltf-utils/gltf-attribute-utils.js +0 -73
  140. package/dist/lib/gltf-utils/gltf-constants.js +0 -43
  141. package/dist/lib/gltf-utils/gltf-utils.js +0 -90
  142. package/dist/lib/gltf-utils/resolve-url.js +0 -18
  143. package/dist/lib/parsers/parse-glb.js +0 -166
  144. package/dist/lib/parsers/parse-gltf.js +0 -179
  145. package/dist/lib/types/glb-types.js +0 -2
  146. package/dist/lib/types/gltf-json-schema.js +0 -4
  147. package/dist/lib/types/gltf-postprocessed-schema.js +0 -4
  148. package/dist/lib/types/gltf-types.js +0 -3
  149. package/dist/lib/utils/assert.js +0 -12
  150. package/dist/lib/utils/version.js +0 -7
  151. package/dist/meshopt/meshopt-decoder.js +0 -118
  152. package/dist/webp/webp.js +0 -38
@@ -1 +1 @@
1
- {"version":3,"file":"gltf-json-schema.js","names":[],"sources":["../../../../src/lib/types/gltf-json-schema.ts"],"sourcesContent":["// Types forked from https://github.com/bwasty/gltf-loader-ts under MIT license\n// Generated from official JSON schema using `npm run generate-interface` on 2018-02-24\n\nexport type GLTFId = number;\n\n/**\n * Indices of those attributes that deviate from their initialization value.\n */\nexport type GLTFAccessorSparseIndices = {\n /**\n * The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.\n */\n bufferView: GLTFId;\n /**\n * The offset relative to the start of the bufferView in bytes. Must be aligned.\n */\n byteOffset?: number;\n /**\n * The indices data type.\n */\n componentType: 5121 | 5123 | 5125 | number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`.\n */\nexport type GLTFAccessorSparseValues = {\n /**\n * The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.\n */\n bufferView: GLTFId;\n /**\n * The offset relative to the start of the bufferView in bytes. Must be aligned.\n */\n byteOffset?: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Sparse storage of attributes that deviate from their initialization value.\n */\nexport type GLTFAccessorSparse = {\n /**\n * Number of entries stored in the sparse array.\n */\n count: number;\n /**\n * Index array of size `count` that points to those accessor attributes that deviate from their initialization value. Indices must strictly increase.\n */\n indices: GLTFAccessorSparseIndices;\n /**\n * 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.\n */\n values: GLTFAccessorSparseValues;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * 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.\n */\nexport type GLTFAccessor = {\n /**\n * The index of the bufferView.\n */\n bufferView?: GLTFId;\n /**\n * The offset relative to the start of the bufferView in bytes.\n */\n byteOffset?: number;\n /**\n * The datatype of components in the attribute.\n */\n componentType: 5120 | 5121 | 5122 | 5123 | 5125 | 5126 | number;\n /**\n * Specifies whether integer data values should be normalized.\n */\n normalized?: boolean;\n /**\n * The number of attributes referenced by this accessor.\n */\n count: number;\n /**\n * Specifies if the attribute is a scalar, vector, or matrix.\n */\n type: 'SCALAR' | 'VEC2' | 'VEC3' | 'VEC4' | 'MAT2' | 'MAT3' | 'MAT4' | string;\n /**\n * Maximum value of each component in this attribute.\n */\n max?: number[];\n /**\n * Minimum value of each component in this attribute.\n */\n min?: number[];\n /**\n * Sparse storage of attributes that deviate from their initialization value.\n */\n sparse?: GLTFAccessorSparse;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * The index of the node and TRS property that an animation channel targets.\n */\nexport type GLTFAnimationChannelTarget = {\n /**\n * The index of the node to target.\n */\n node?: GLTFId;\n /**\n * 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.\n */\n path: 'translation' | 'rotation' | 'scale' | 'weights' | string;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Targets an animation's sampler at a node's property.\n */\nexport type GLTFAnimationChannel = {\n /**\n * The index of a sampler in this animation used to compute the value for the target.\n */\n sampler: GLTFId;\n /**\n * The index of the node and TRS property to target.\n */\n target: GLTFAnimationChannelTarget;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).\n */\nexport type GLTFAnimationSampler = {\n /**\n * The index of an accessor containing keyframe input values, e.g., time.\n */\n input: GLTFId;\n /**\n * Interpolation algorithm.\n */\n interpolation?: 'LINEAR' | 'STEP' | 'CUBICSPLINE' | string;\n /**\n * The index of an accessor, containing keyframe output values.\n */\n output: GLTFId;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A keyframe animation.\n */\nexport type GLTFAnimation = {\n /**\n * 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.\n */\n channels: GLTFAnimationChannel[];\n /**\n * An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).\n */\n samplers: GLTFAnimationSampler[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Metadata about the glTF asset.\n */\nexport type GLTFAsset = {\n /**\n * A copyright message suitable for display to credit the content creator.\n */\n copyright?: string;\n /**\n * Tool that generated this glTF model. Useful for debugging.\n */\n generator?: string;\n /**\n * The glTF version that this asset targets.\n */\n version: string;\n /**\n * The minimum glTF version that this asset targets.\n */\n minVersion?: string;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A buffer points to binary geometry, animation, or skins.\n */\nexport type GLTFBuffer = {\n /**\n * The uri of the buffer.\n */\n uri?: string;\n /**\n * The length of the buffer in bytes.\n */\n byteLength: number;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A view into a buffer generally representing a subset of the buffer.\n */\nexport type GLTFBufferView = {\n /**\n * The index of the buffer.\n */\n buffer: GLTFId;\n /**\n * The offset into the buffer in bytes.\n */\n byteOffset?: number;\n /**\n * The length of the bufferView in bytes.\n */\n byteLength: number;\n /**\n * The stride, in bytes.\n */\n byteStride?: number;\n /**\n * The target that the GPU buffer should be bound to.\n */\n target?: 34962 | 34963 | number;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * An orthographic camera containing properties to create an orthographic projection matrix.\n */\nexport type GLTFCameraOrthographic = {\n /**\n * The floating-point horizontal magnification of the view. Must not be zero.\n */\n xmag: number;\n /**\n * The floating-point vertical magnification of the view. Must not be zero.\n */\n ymag: number;\n /**\n * The floating-point distance to the far clipping plane. `zfar` must be greater than `znear`.\n */\n zfar: number;\n /**\n * The floating-point distance to the near clipping plane.\n */\n znear: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A perspective camera containing properties to create a perspective projection matrix.\n */\nexport type GLTFCameraPerspective = {\n /**\n * The floating-point aspect ratio of the field of view.\n */\n aspectRatio?: number;\n /**\n * The floating-point vertical field of view in radians.\n */\n yfov: number;\n /**\n * The floating-point distance to the far clipping plane.\n */\n zfar?: number;\n /**\n * The floating-point distance to the near clipping plane.\n */\n znear: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene.\n */\nexport type GLTFCamera = {\n /**\n * An orthographic camera containing properties to create an orthographic projection matrix.\n */\n orthographic?: GLTFCameraOrthographic;\n /**\n * A perspective camera containing properties to create a perspective projection matrix.\n */\n perspective?: GLTFCameraPerspective;\n /**\n * Specifies if the camera uses a perspective or orthographic projection.\n */\n type: 'perspective' | 'orthographic' | string;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Image data used to create a texture. Image can be referenced by URI or `bufferView` index. `mimeType` is required in the latter case.\n */\nexport type GLTFImage = {\n /**\n * The uri of the image.\n */\n uri?: string;\n /**\n * The image's MIME type.\n */\n mimeType?: 'image/jpeg' | 'image/png' | string;\n /**\n * The index of the bufferView that contains the image. Use this instead of the image's uri property.\n */\n bufferView?: GLTFId;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Reference to a texture.\n */\nexport type GLTFTextureInfo = {\n /**\n * The index of the texture.\n */\n index: GLTFId;\n /**\n * The set index of texture's TEXCOORD attribute used for texture coordinate mapping.\n */\n texCoord?: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.\n */\nexport type GLTFMaterialPbrMetallicRoughness = {\n /**\n * The material's base color factor.\n */\n baseColorFactor?: number[];\n /**\n * The base color texture.\n */\n baseColorTexture?: GLTFTextureInfo;\n /**\n * The metalness of the material.\n */\n metallicFactor?: number;\n /**\n * The roughness of the material.\n */\n roughnessFactor?: number;\n /**\n * The metallic-roughness texture.\n */\n metallicRoughnessTexture?: GLTFTextureInfo;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\nexport type GLTFMaterialNormalTextureInfo = {\n index: any;\n texCoord?: any;\n /**\n * The scalar multiplier applied to each normal vector of the normal texture.\n */\n scale?: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\nexport type GLTFMaterialOcclusionTextureInfo = {\n index: any;\n texCoord?: any;\n /**\n * A scalar multiplier controlling the amount of occlusion applied.\n */\n strength?: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * The material appearance of a primitive.\n */\nexport type GLTFMaterial = {\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n /**\n * 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.\n */\n pbrMetallicRoughness?: GLTFMaterialPbrMetallicRoughness;\n /**\n * The normal map texture.\n */\n normalTexture?: GLTFMaterialNormalTextureInfo;\n /**\n * The occlusion map texture.\n */\n occlusionTexture?: GLTFMaterialOcclusionTextureInfo;\n /**\n * The emissive map texture.\n */\n emissiveTexture?: GLTFTextureInfo;\n /**\n * The emissive color of the material.\n */\n emissiveFactor?: number[];\n /**\n * The alpha rendering mode of the material.\n */\n alphaMode?: 'OPAQUE' | 'MASK' | 'BLEND' | string;\n /**\n * The alpha cutoff value of the material.\n */\n alphaCutoff?: number;\n /**\n * Specifies whether the material is double sided.\n */\n doubleSided?: boolean;\n // [k: string]: any;\n};\n\n/**\n * Geometry to be rendered with the given material.\n */\nexport type GLTFMeshPrimitive = {\n /**\n * A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.\n */\n attributes: {\n [k: string]: GLTFId;\n };\n /**\n * The index of the accessor that contains the indices.\n */\n indices?: GLTFId;\n /**\n * The index of the material to apply to this primitive when rendering.\n */\n material?: GLTFId;\n /**\n * The type of primitives to render.\n */\n mode?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | number;\n /**\n * An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target.\n */\n targets?: {\n [k: string]: GLTFId;\n }[];\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene.\n */\n\nexport type GLTFMesh = {\n id?: string;\n /**\n * An array of primitives, each defining geometry to be rendered with a material.\n */\n primitives: GLTFMeshPrimitive[];\n /**\n * Array of weights to be applied to the Morph Targets.\n */\n weights?: number[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * 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.\n */\nexport type GLTFNode = {\n /**\n * The index of the camera referenced by this node.\n */\n camera?: GLTFId;\n /**\n * The indices of this node's children.\n */\n children?: GLTFId[];\n /**\n * The index of the skin referenced by this node.\n */\n skin?: GLTFId;\n /**\n * A floating-point 4x4 transformation matrix stored in column-major order.\n */\n matrix?: number[];\n /**\n * The index of the mesh in this node.\n */\n mesh?: GLTFId;\n /**\n * The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.\n */\n rotation?: number[];\n /**\n * The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.\n */\n scale?: number[];\n /**\n * The node's translation along the x, y, and z axes.\n */\n translation?: number[];\n /**\n * The weights of the instantiated Morph Target. Number of elements must match number of Morph Targets of used mesh.\n */\n weights?: number[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Texture sampler properties for filtering and wrapping modes.\n */\nexport type GLTFSampler = {\n /**\n * Magnification filter.\n */\n magFilter?: 9728 | 9729 | number;\n /**\n * Minification filter.\n */\n minFilter?: 9728 | 9729 | 9984 | 9985 | 9986 | 9987 | number;\n /**\n * s wrapping mode.\n */\n wrapS?: 33071 | 33648 | 10497 | number;\n /**\n * t wrapping mode.\n */\n wrapT?: 33071 | 33648 | 10497 | number;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * The root nodes of a scene.\n */\nexport type GLTFScene = {\n /**\n * The indices of each root node.\n */\n nodes?: GLTFId[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Joints and matrices defining a skin.\n */\nexport type GLTFSkin = {\n id?: string;\n /**\n * 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.\n */\n inverseBindMatrices?: GLTFId;\n /**\n * The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root.\n */\n skeleton?: GLTFId;\n /** Indices of skeleton nodes, used as joints in this skin. */\n joints: GLTFId[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A texture and its sampler.\n */\nexport type GLTFTexture = {\n /** The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used. */\n sampler?: GLTFId;\n /** The index of the image used by this texture. */\n source?: GLTFId;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * The root object for a glTF asset.\n */\nexport type GLTF = {\n /**\n * Names of glTF extensions used somewhere in this asset.\n */\n extensionsUsed?: string[];\n /**\n * Names of glTF extensions required to properly load this asset.\n */\n extensionsRequired?: string[];\n /**\n * An array of accessors.\n */\n accessors?: GLTFAccessor[];\n /**\n * An array of keyframe animations.\n */\n animations?: GLTFAnimation[];\n /**\n * Metadata about the glTF asset.\n */\n asset: GLTFAsset;\n /**\n * An array of buffers.\n */\n buffers?: GLTFBuffer[];\n /**\n * An array of bufferViews.\n */\n bufferViews?: GLTFBufferView[];\n /**\n * An array of cameras.\n */\n cameras?: GLTFCamera[];\n /**\n * An array of images.\n */\n images?: GLTFImage[];\n /**\n * An array of materials.\n */\n materials?: GLTFMaterial[];\n /**\n * An array of meshes.\n */\n meshes?: GLTFMesh[];\n /**\n * An array of nodes.\n */\n nodes?: GLTFNode[];\n /**\n * An array of samplers.\n */\n samplers?: GLTFSampler[];\n /**\n * The index of the default scene.\n */\n scene?: GLTFId;\n /**\n * An array of scenes.\n */\n scenes?: GLTFScene[];\n /**\n * An array of skins.\n */\n skins?: GLTFSkin[];\n /**\n * An array of textures.\n */\n textures?: GLTFTexture[];\n extensions?: Record<string, unknown>;\n extras?: unknown;\n [k: string]: unknown;\n};\n\n// GLTF Extensions\n/* eslint-disable camelcase */\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF\n * TODO - this can be used on both images and shaders\n */\nexport type GLTF_KHR_binary_glTF = {\n bufferView: number;\n // required for images but not shaders\n mimeType?: string;\n height?: number;\n width?: number;\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression\n */\nexport type GLTF_KHR_draco_mesh_compression = {\n bufferView: GLTFId;\n attributes: {[name: string]: number};\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu\n */\nexport type GLTF_KHR_texture_basisu = {\n source: GLTFId;\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression\n * buffer: number; //\tThe index of the buffer with compressed data.\t✅ Required\n * byteOffset\tinteger\tThe offset into the buffer in bytes.\tDefault: 0\n * byteLength\tinteger\tThe length of the compressed data in bytes.\t✅ Required\n * byteStride\tinteger\tThe stride, in bytes.\t✅ Required\n * count\tinteger\tThe number of elements.\t✅ Required\n * mode\tstring\tThe compression mode.\t✅ Required\n * filter\tstring\tThe compression filter.\tDefault: \"NONE\"\n */\nexport type GLTF_EXT_meshopt_compression = {\n buffer: number;\n byteOffset?: number;\n byteLength: number;\n byteStride: number;\n count: number;\n mode: 'ATTRIBUTES' | 'TRIANGLES' | 'INDICES';\n filter?: 'NONE' | 'OCTAHEDRAL' | 'QUATERNION' | 'EXPONENTIAL';\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp\n */\nexport type GLTF_EXT_texture_webp = {\n source: GLTFId;\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_texture_dds\n */\nexport type GLTF_MSFT_texture_dds = {\n source: GLTFId;\n extras?: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#gltf-extension-1\n * @todo belom88 complete typings\n */\nexport type GLTF_EXT_mesh_features = {\n featureIds: {\n featureCount: number;\n nullFeatureId: number;\n label: string;\n attribute: any;\n texture: any;\n propertyTable: number;\n }[];\n extensions?: any;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#gltf-extension-1\n */\nexport type GLTF_EXT_feature_metadata = {\n /** An object defining classes and enums. */\n schema?: ExtFeatureMetadataSchema;\n /** A uri to an external schema file. */\n schemaUri?: string;\n /** An object containing statistics about features. */\n statistics?: Statistics;\n /** A dictionary, where each key is a feature table ID and each value is an object defining the feature table. */\n featureTables?: {\n [key: string]: EXT_feature_metadata_feature_table;\n };\n /** A dictionary, where each key is a feature texture ID and each value is an object defining the feature texture. */\n featureTextures?: {\n [key: string]: FeatureTexture;\n };\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#schema\n */\ntype ExtFeatureMetadataSchema = {\n /** The name of the schema. */\n name?: string;\n /** The description of the schema. */\n description?: string;\n /** Application-specific version of the schema. */\n version?: string;\n /** A dictionary, where each key is a class ID and each value is an object defining the class. */\n classes?: {\n [key: string]: EXT_feature_metadata_class_object;\n };\n /** A dictionary, where each key is an enum ID and each value is an object defining the values for the enum. */\n enums?: {\n [key: string]: ExtFeatureMetadataEnum;\n };\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class\n */\nexport type EXT_feature_metadata_class_object = {\n /** The name of the class, e.g. for display purposes. */\n name?: string;\n /** The description of the class. */\n description?: string;\n /** A dictionary, where each key is a property ID and each value is an object defining the property. */\n properties: {\n [key: string]: ClassProperty;\n };\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-property\n */\nexport type ClassProperty = {\n /** The name of the property, e.g. for display purposes. */\n name?: string;\n /** The description of the property. */\n description?: string;\n /**\n * The property type. If ENUM is used, then enumType must also be specified.\n * If ARRAY is used, then componentType must also be specified.\n * ARRAY is a fixed-length array when componentCount is defined, and variable-length otherwise.\n */\n type: ClassPropertyType;\n /**\n * An enum ID as declared in the enums dictionary.\n * This value must be specified when type or componentType is ENUM.\n */\n enumType?: string;\n /**\n * When type is ARRAY this indicates the type of each component of the array.\n * If ENUM is used, then enumType must also be specified.\n */\n componentType?:\n | 'INT8'\n | 'UINT8'\n | 'INT16'\n | 'UINT16'\n | 'INT32'\n | 'UINT32'\n | 'INT64'\n | 'UINT64'\n | 'FLOAT32'\n | 'FLOAT64'\n | 'BOOLEAN'\n | 'STRING'\n | 'ENUM';\n /** The number of components per element for ARRAY elements. */\n componentCount?: number;\n /**\n * Specifies whether integer values are normalized.\n * This applies both when type is an integer type, or when type is ARRAY with a componentType that is an integer type.\n * For unsigned integer types, values are normalized between [0.0, 1.0].\n * For signed integer types, values are normalized between [-1.0, 1.0].\n * For all other types, this property is ignored.\n */\n normalized: boolean;\n /**\n * Maximum allowed values for property values.\n * Only applicable for numeric types and fixed-length arrays of numeric types.\n * For numeric types this is a single number.\n * For fixed-length arrays this is an array with componentCount number of elements.\n * The normalized property has no effect on these values: they always correspond to the integer values.\n */\n max?: number | number[];\n /**\n * Minimum allowed values for property values.\n * Only applicable for numeric types and fixed-length arrays of numeric types.\n * For numeric types this is a single number.\n * For fixed-length arrays this is an array with componentCount number of elements.\n * The normalized property has no effect on these values: they always correspond to the integer values.\n */\n min?: number | number[];\n\n /**\n * A default value to use when the property value is not defined.\n * If used, optional must be set to true.\n * The type of the default value must match the property definition: For BOOLEAN use true or false.\n * For STRING use a JSON string. For a numeric type use a JSON number.\n * For ENUM use the enum name, not the integer value.\n * For ARRAY use a JSON array containing values matching the componentType.\n */\n default?: boolean | number | string | number[];\n /** If true, this property is optional. */\n optional?: boolean; // default false;\n /**\n * An identifier that describes how this property should be interpreted.\n * The semantic cannot be used by other properties in the class.\n */\n semantic?: string;\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#classpropertytype\n */\ntype ClassPropertyType =\n | 'INT8'\n | 'UINT8'\n | 'INT16'\n | 'UINT16'\n | 'INT32'\n | 'UINT32'\n | 'INT64'\n | 'UINT64'\n | 'FLOAT32'\n | 'FLOAT64'\n | 'BOOLEAN'\n | 'STRING'\n | 'ENUM'\n | 'ARRAY';\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum\n */\ntype ExtFeatureMetadataEnum = {\n /** The name of the enum, e.g. for display purposes. */\n name?: string;\n /** The description of the enum. */\n description?: string;\n /** The type of the integer enum value. */\n valueType?: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64'; // default: \"UINT16\"\n /** An array of enum values. Duplicate names or duplicate integer values are not allowed. */\n values: EnumValue[];\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum-value\n */\ntype EnumValue = {\n /** The name of the enum value. */\n name: string;\n /** The description of the enum value. */\n description?: string;\n /** The integer enum value. */\n value: number; // default: \"UINT16\"\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table\n */\nexport type EXT_feature_metadata_feature_table = {\n featureTable: any;\n /** The class that property values conform to. The value must be a class ID declared in the classes dictionary. */\n class?: string;\n /** The number of features, as well as the number of elements in each property array. */\n count: number;\n /**\n * A dictionary, where each key corresponds to a property ID in the class properties dictionary\n * and each value is an object describing where property values are stored.\n * Optional properties may be excluded from this dictionary.\n */\n properties?: {\n [key: string]: FeatureTableProperty;\n };\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table-property\n */\nexport type FeatureTableProperty = {\n /**\n * The index of the buffer view containing property values.\n * The data type of property values is determined by the property definition:\n * When type is BOOLEAN values are packed into a bitfield.\n * When type is STRING values are stored as byte sequences and decoded as UTF-8 strings.\n * When type is a numeric type values are stored as the provided type.\n * When type is ENUM values are stored as the enum's valueType.\n * Each enum value in the buffer must match one of the allowed values in the enum definition.\n * When type is ARRAY elements are packed tightly together and the data type is based on the componentType following the same rules as above.\n * arrayOffsetBufferView is required for variable-size arrays\n * and stringOffsetBufferView is required for strings (for variable-length arrays of strings, both are required)\n * The buffer view byteOffset must be aligned to a multiple of 8 bytes.\n * If the buffer view's buffer is the GLB-stored BIN chunk the byte offset is measured relative to the beginning of the GLB.\n * Otherwise it is measured relative to the beginning of the buffer.\n */\n bufferView: number;\n\n /** The type of values in arrayOffsetBufferView and stringOffsetBufferView. */\n offsetType?: string; // default: \"UINT32\"\n /**\n * The index of the buffer view containing offsets for variable-length arrays.\n * The number of offsets is equal to the feature table count plus one.\n * The offsets represent the start positions of each array, with the last offset representing the position after the last array.\n * The array length is computed using the difference between the current offset and the subsequent offset.\n * If componentType is STRING the offsets index into the string offsets array (stored in stringOffsetBufferView),\n * otherwise they index into the property array (stored in bufferView).\n * The data type of these offsets is determined by offsetType.\n * The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView\n */\n arrayOffsetBufferView?: number;\n /**\n * The index of the buffer view containing offsets for strings.\n * The number of offsets is equal to the number of string components plus one.\n * The offsets represent the byte offsets of each string in the main bufferView,\n * with the last offset representing the byte offset after the last string.\n * The string byte length is computed using the difference between the current offset and the subsequent offset.\n * The data type of these offsets is determined by offsetType.\n * The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView.\n */\n stringOffsetBufferView?: number;\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-texture\n */\ntype FeatureTexture = {\n /** The class this feature texture conforms to. The value must be a class ID declared in the classes dictionary. */\n class: string;\n /**\n * A dictionary, where each key corresponds to a property ID in the class properties dictionary\n * and each value describes the texture channels containing property values.\n */\n properties: {\n [key: string]: TextureAccessor;\n };\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\nexport type {FeatureTexture as EXT_feature_metadata_feature_texture};\nexport type {TextureAccessor as FeatureTextureProperty};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#texture-accessor\n */\ntype TextureAccessor = {\n /** Texture channels containing property values. Channels are labeled by rgba and are swizzled with a string of 1-4 characters. */\n channels: string;\n /** The glTF texture and texture coordinates to use. */\n texture: GLTFTextureInfo;\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#statistics-1\n */\ntype Statistics = {\n /**\n * A dictionary, where each key is a class ID declared in the classes dictionary\n * and each value is an object containing statistics about features that conform to the class.\n */\n classes?: {\n [key: string]: ClassStatistics;\n };\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-statistics\n */\ntype ClassStatistics = {\n /** The number of features that conform to the class. */\n count?: number;\n /**\n * A dictionary, where each key is a class ID declared in the classes dictionary\n * and each value is an object containing statistics about property values.\n */\n properties?: {\n [key: string]: StatisticsClassProperty;\n };\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#property-statistics\n * min, max, mean, median, standardDeviation, variance, sum are\n * only applicable for numeric types and fixed-length arrays of numeric types.\n * For numeric types this is a single number.\n * For fixed-length arrays this is an array with componentCount number of elements.\n * The normalized property has no effect on these values.\n */\ntype StatisticsClassProperty = {\n /** The minimum property value. */\n min?: number | number[];\n /** The maximum property value. */\n max?: number | number[];\n /** The arithmetic mean of the property values. */\n mean?: number | number[];\n /** The median of the property values. */\n median?: number | number[];\n /** The standard deviation of the property values. */\n standardDeviation?: number | number[];\n /** The variance of the property values. */\n variance?: number | number[];\n /** The sum of the property values. */\n sum?: number | number[];\n /**\n * A dictionary, where each key corresponds to an enum name and each value is the number of occurrences of that enum.\n * Only applicable when type or componentType is ENUM.\n * For fixed-length arrays, this is an array with componentCount number of elements.\n */\n occurrences: {\n [key: string]: number | number[];\n };\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * 3DTilesNext EXT_feature_metadata primitive extension\n * Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#primitive-extension\n */\nexport type GLTF_EXT_feature_metadata_primitive = {\n /** Feature ids definition in attributes */\n featureIdAttributes?: GLTF_EXT_feature_metadata_attribute[];\n /** Feature ids definition in textures */\n featureIdTextures?: GLTF_EXT_feature_metadata_attribute[];\n /** An array of IDs of feature textures from the root EXT_feature_metadata object. */\n featureTextures?: string[];\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Attribute which described featureIds definition.\n */\nexport type GLTF_EXT_feature_metadata_attribute = {\n /** Name of feature table */\n featureTable: string;\n /** Described how feature ids are defined */\n featureIds: ExtFeatureMetadataFeatureIds;\n extensions?: Record<string, any>;\n extras?: any;\n [key: string]: any;\n};\n\n/**\n * Defining featureIds by attributes or implicitly.\n */\ntype ExtFeatureMetadataFeatureIds = {\n /** Name of attribute where featureIds are defined */\n attribute?: string;\n /** Sets a constant feature ID for each vertex. The default is 0. */\n constant?: number;\n /** Sets the rate at which feature IDs increment.\n * If divisor is zero then constant is used.\n * If divisor is greater than zero the feature ID increments once per divisor sets of vertices, starting at constant.\n * The default is 0\n */\n divisor?: number;\n /** gLTF textureInfo object - https://github.com/CesiumGS/glTF/blob/3d-tiles-next/specification/2.0/schema/textureInfo.schema.json */\n texture?: ExtFeatureMetadataTexture;\n /** Must be a single channel (\"r\", \"g\", \"b\", or \"a\") */\n channels?: 'r' | 'g' | 'b' | 'a';\n};\n\n/**\n * Reference to a texture.\n */\ntype ExtFeatureMetadataTexture = {\n /** The set index of texture's TEXCOORD attribute used for texture coordinate mapping.*/\n texCoord: number;\n /** The index of the texture. */\n index: number;\n};\n\nexport type GLTFObject =\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"],"mappings":""}
1
+ {"version":3,"file":"gltf-json-schema.js","names":[],"sources":["../../../../src/lib/types/gltf-json-schema.ts"],"sourcesContent":["// Types forked from https://github.com/bwasty/gltf-loader-ts under MIT license\n// Generated from official JSON schema using `npm run generate-interface` on 2018-02-24\n\nexport type GLTFId = number;\n\n/**\n * Indices of those attributes that deviate from their initialization value.\n */\nexport type GLTFAccessorSparseIndices = {\n /**\n * The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.\n */\n bufferView: GLTFId;\n /**\n * The offset relative to the start of the bufferView in bytes. Must be aligned.\n */\n byteOffset?: number;\n /**\n * The indices data type.\n */\n componentType: 5121 | 5123 | 5125 | number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`.\n */\nexport type GLTFAccessorSparseValues = {\n /**\n * The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.\n */\n bufferView: GLTFId;\n /**\n * The offset relative to the start of the bufferView in bytes. Must be aligned.\n */\n byteOffset?: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Sparse storage of attributes that deviate from their initialization value.\n */\nexport type GLTFAccessorSparse = {\n /**\n * Number of entries stored in the sparse array.\n */\n count: number;\n /**\n * Index array of size `count` that points to those accessor attributes that deviate from their initialization value. Indices must strictly increase.\n */\n indices: GLTFAccessorSparseIndices;\n /**\n * 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.\n */\n values: GLTFAccessorSparseValues;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * 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.\n */\nexport type GLTFAccessor = {\n /**\n * The index of the bufferView.\n */\n bufferView?: GLTFId;\n /**\n * The offset relative to the start of the bufferView in bytes.\n */\n byteOffset?: number;\n /**\n * The datatype of components in the attribute.\n */\n componentType: 5120 | 5121 | 5122 | 5123 | 5125 | 5126 | number;\n /**\n * Specifies whether integer data values should be normalized.\n */\n normalized?: boolean;\n /**\n * The number of attributes referenced by this accessor.\n */\n count: number;\n /**\n * Specifies if the attribute is a scalar, vector, or matrix.\n */\n type: 'SCALAR' | 'VEC2' | 'VEC3' | 'VEC4' | 'MAT2' | 'MAT3' | 'MAT4' | string;\n /**\n * Maximum value of each component in this attribute.\n */\n max?: number[];\n /**\n * Minimum value of each component in this attribute.\n */\n min?: number[];\n /**\n * Sparse storage of attributes that deviate from their initialization value.\n */\n sparse?: GLTFAccessorSparse;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * The index of the node and TRS property that an animation channel targets.\n */\nexport type GLTFAnimationChannelTarget = {\n /**\n * The index of the node to target.\n */\n node?: GLTFId;\n /**\n * 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.\n */\n path: 'translation' | 'rotation' | 'scale' | 'weights' | string;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Targets an animation's sampler at a node's property.\n */\nexport type GLTFAnimationChannel = {\n /**\n * The index of a sampler in this animation used to compute the value for the target.\n */\n sampler: GLTFId;\n /**\n * The index of the node and TRS property to target.\n */\n target: GLTFAnimationChannelTarget;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).\n */\nexport type GLTFAnimationSampler = {\n /**\n * The index of an accessor containing keyframe input values, e.g., time.\n */\n input: GLTFId;\n /**\n * Interpolation algorithm.\n */\n interpolation?: 'LINEAR' | 'STEP' | 'CUBICSPLINE' | string;\n /**\n * The index of an accessor, containing keyframe output values.\n */\n output: GLTFId;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A keyframe animation.\n */\nexport type GLTFAnimation = {\n /**\n * 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.\n */\n channels: GLTFAnimationChannel[];\n /**\n * An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).\n */\n samplers: GLTFAnimationSampler[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Metadata about the glTF asset.\n */\nexport type GLTFAsset = {\n /**\n * A copyright message suitable for display to credit the content creator.\n */\n copyright?: string;\n /**\n * Tool that generated this glTF model. Useful for debugging.\n */\n generator?: string;\n /**\n * The glTF version that this asset targets.\n */\n version: string;\n /**\n * The minimum glTF version that this asset targets.\n */\n minVersion?: string;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A buffer points to binary geometry, animation, or skins.\n */\nexport type GLTFBuffer = {\n /**\n * The uri of the buffer.\n */\n uri?: string;\n /**\n * The length of the buffer in bytes.\n */\n byteLength: number;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A view into a buffer generally representing a subset of the buffer.\n */\nexport type GLTFBufferView = {\n /**\n * The index of the buffer.\n */\n buffer: GLTFId;\n /**\n * The offset into the buffer in bytes.\n */\n byteOffset?: number;\n /**\n * The length of the bufferView in bytes.\n */\n byteLength: number;\n /**\n * The stride, in bytes.\n */\n byteStride?: number;\n /**\n * The target that the GPU buffer should be bound to.\n */\n target?: 34962 | 34963 | number;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * An orthographic camera containing properties to create an orthographic projection matrix.\n */\nexport type GLTFCameraOrthographic = {\n /**\n * The floating-point horizontal magnification of the view. Must not be zero.\n */\n xmag: number;\n /**\n * The floating-point vertical magnification of the view. Must not be zero.\n */\n ymag: number;\n /**\n * The floating-point distance to the far clipping plane. `zfar` must be greater than `znear`.\n */\n zfar: number;\n /**\n * The floating-point distance to the near clipping plane.\n */\n znear: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A perspective camera containing properties to create a perspective projection matrix.\n */\nexport type GLTFCameraPerspective = {\n /**\n * The floating-point aspect ratio of the field of view.\n */\n aspectRatio?: number;\n /**\n * The floating-point vertical field of view in radians.\n */\n yfov: number;\n /**\n * The floating-point distance to the far clipping plane.\n */\n zfar?: number;\n /**\n * The floating-point distance to the near clipping plane.\n */\n znear: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene.\n */\nexport type GLTFCamera = {\n /**\n * An orthographic camera containing properties to create an orthographic projection matrix.\n */\n orthographic?: GLTFCameraOrthographic;\n /**\n * A perspective camera containing properties to create a perspective projection matrix.\n */\n perspective?: GLTFCameraPerspective;\n /**\n * Specifies if the camera uses a perspective or orthographic projection.\n */\n type: 'perspective' | 'orthographic' | string;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Image data used to create a texture. Image can be referenced by URI or `bufferView` index. `mimeType` is required in the latter case.\n */\nexport type GLTFImage = {\n /**\n * The uri of the image.\n */\n uri?: string;\n /**\n * The image's MIME type.\n */\n mimeType?: 'image/jpeg' | 'image/png' | string;\n /**\n * The index of the bufferView that contains the image. Use this instead of the image's uri property.\n */\n bufferView?: GLTFId;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Reference to a texture.\n */\nexport type GLTFTextureInfo = {\n /**\n * The index of the texture.\n */\n index: GLTFId;\n /**\n * The set index of texture's TEXCOORD attribute used for texture coordinate mapping.\n */\n texCoord?: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Extended GLTFTextureInfo that is used in EXT_structural_metadata and EXT_mesh_features\n * https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata\n * https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features\n */\nexport type GLTFTextureInfoMetadata = GLTFTextureInfo & {\n channels: number[] | string;\n /** For internal usage */\n data?: unknown;\n};\n\n/**\n * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.\n */\nexport type GLTFMaterialPbrMetallicRoughness = {\n /**\n * The material's base color factor.\n */\n baseColorFactor?: number[];\n /**\n * The base color texture.\n */\n baseColorTexture?: GLTFTextureInfo;\n /**\n * The metalness of the material.\n */\n metallicFactor?: number;\n /**\n * The roughness of the material.\n */\n roughnessFactor?: number;\n /**\n * The metallic-roughness texture.\n */\n metallicRoughnessTexture?: GLTFTextureInfo;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\nexport type GLTFMaterialNormalTextureInfo = {\n index: any;\n texCoord?: any;\n /**\n * The scalar multiplier applied to each normal vector of the normal texture.\n */\n scale?: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\nexport type GLTFMaterialOcclusionTextureInfo = {\n index: any;\n texCoord?: any;\n /**\n * A scalar multiplier controlling the amount of occlusion applied.\n */\n strength?: number;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * The material appearance of a primitive.\n */\nexport type GLTFMaterial = {\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n /**\n * 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.\n */\n pbrMetallicRoughness?: GLTFMaterialPbrMetallicRoughness;\n /**\n * The normal map texture.\n */\n normalTexture?: GLTFMaterialNormalTextureInfo;\n /**\n * The occlusion map texture.\n */\n occlusionTexture?: GLTFMaterialOcclusionTextureInfo;\n /**\n * The emissive map texture.\n */\n emissiveTexture?: GLTFTextureInfo;\n /**\n * The emissive color of the material.\n */\n emissiveFactor?: number[];\n /**\n * The alpha rendering mode of the material.\n */\n alphaMode?: 'OPAQUE' | 'MASK' | 'BLEND' | string;\n /**\n * The alpha cutoff value of the material.\n */\n alphaCutoff?: number;\n /**\n * Specifies whether the material is double sided.\n */\n doubleSided?: boolean;\n // [k: string]: any;\n};\n\n/**\n * Geometry to be rendered with the given material.\n */\nexport type GLTFMeshPrimitive = {\n /**\n * A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.\n */\n attributes: {\n [k: string]: GLTFId;\n };\n /**\n * The index of the accessor that contains the indices.\n */\n indices?: GLTFId;\n /**\n * The index of the material to apply to this primitive when rendering.\n */\n material?: GLTFId;\n /**\n * The type of primitives to render.\n */\n mode?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | number;\n /**\n * An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target.\n */\n targets?: {\n [k: string]: GLTFId;\n }[];\n extensions?: Record<string, unknown>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene.\n */\n\nexport type GLTFMesh = {\n id?: string;\n /**\n * An array of primitives, each defining geometry to be rendered with a material.\n */\n primitives: GLTFMeshPrimitive[];\n /**\n * Array of weights to be applied to the Morph Targets.\n */\n weights?: number[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * 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.\n */\nexport type GLTFNode = {\n /**\n * The index of the camera referenced by this node.\n */\n camera?: GLTFId;\n /**\n * The indices of this node's children.\n */\n children?: GLTFId[];\n /**\n * The index of the skin referenced by this node.\n */\n skin?: GLTFId;\n /**\n * A floating-point 4x4 transformation matrix stored in column-major order.\n */\n matrix?: number[];\n /**\n * The index of the mesh in this node.\n */\n mesh?: GLTFId;\n /**\n * The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.\n */\n rotation?: number[];\n /**\n * The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.\n */\n scale?: number[];\n /**\n * The node's translation along the x, y, and z axes.\n */\n translation?: number[];\n /**\n * The weights of the instantiated Morph Target. Number of elements must match number of Morph Targets of used mesh.\n */\n weights?: number[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Texture sampler properties for filtering and wrapping modes.\n */\nexport type GLTFSampler = {\n /**\n * Magnification filter.\n */\n magFilter?: 9728 | 9729 | number;\n /**\n * Minification filter.\n */\n minFilter?: 9728 | 9729 | 9984 | 9985 | 9986 | 9987 | number;\n /**\n * s wrapping mode.\n */\n wrapS?: 33071 | 33648 | 10497 | number;\n /**\n * t wrapping mode.\n */\n wrapT?: 33071 | 33648 | 10497 | number;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * The root nodes of a scene.\n */\nexport type GLTFScene = {\n /**\n * The indices of each root node.\n */\n nodes?: GLTFId[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * Joints and matrices defining a skin.\n */\nexport type GLTFSkin = {\n id?: string;\n /**\n * 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.\n */\n inverseBindMatrices?: GLTFId;\n /**\n * The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root.\n */\n skeleton?: GLTFId;\n /** Indices of skeleton nodes, used as joints in this skin. */\n joints: GLTFId[];\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * A texture and its sampler.\n */\nexport type GLTFTexture = {\n /** The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used. */\n sampler?: GLTFId;\n /** The index of the image used by this texture. */\n source?: GLTFId;\n name?: any;\n extensions?: Record<string, any>;\n extras?: any;\n // [k: string]: any;\n};\n\n/**\n * The root object for a glTF asset.\n */\nexport type GLTF = {\n /**\n * Names of glTF extensions used somewhere in this asset.\n */\n extensionsUsed?: string[];\n /**\n * Names of glTF extensions required to properly load this asset.\n */\n extensionsRequired?: string[];\n /**\n * An array of accessors.\n */\n accessors?: GLTFAccessor[];\n /**\n * An array of keyframe animations.\n */\n animations?: GLTFAnimation[];\n /**\n * Metadata about the glTF asset.\n */\n asset: GLTFAsset;\n /**\n * An array of buffers.\n */\n buffers?: GLTFBuffer[];\n /**\n * An array of bufferViews.\n */\n bufferViews?: GLTFBufferView[];\n /**\n * An array of cameras.\n */\n cameras?: GLTFCamera[];\n /**\n * An array of images.\n */\n images?: GLTFImage[];\n /**\n * An array of materials.\n */\n materials?: GLTFMaterial[];\n /**\n * An array of meshes.\n */\n meshes?: GLTFMesh[];\n /**\n * An array of nodes.\n */\n nodes?: GLTFNode[];\n /**\n * An array of samplers.\n */\n samplers?: GLTFSampler[];\n /**\n * The index of the default scene.\n */\n scene?: GLTFId;\n /**\n * An array of scenes.\n */\n scenes?: GLTFScene[];\n /**\n * An array of skins.\n */\n skins?: GLTFSkin[];\n /**\n * An array of textures.\n */\n textures?: GLTFTexture[];\n extensions?: Record<string, unknown>;\n extras?: unknown;\n [k: string]: unknown;\n};\n\nexport type GLTFObject =\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\n// GLTF Extensions\n/* eslint-disable camelcase */\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF\n * TODO - this can be used on both images and shaders\n */\nexport type GLTF_KHR_binary_glTF = {\n bufferView: number;\n // required for images but not shaders\n mimeType?: string;\n height?: number;\n width?: number;\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression\n */\nexport type GLTF_KHR_draco_mesh_compression = {\n bufferView: GLTFId;\n attributes: {[name: string]: number};\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu\n */\nexport type GLTF_KHR_texture_basisu = {\n source: GLTFId;\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression\n * buffer: number; //\tThe index of the buffer with compressed data.\t✅ Required\n * byteOffset\tinteger\tThe offset into the buffer in bytes.\tDefault: 0\n * byteLength\tinteger\tThe length of the compressed data in bytes.\t✅ Required\n * byteStride\tinteger\tThe stride, in bytes.\t✅ Required\n * count\tinteger\tThe number of elements.\t✅ Required\n * mode\tstring\tThe compression mode.\t✅ Required\n * filter\tstring\tThe compression filter.\tDefault: \"NONE\"\n */\nexport type GLTF_EXT_meshopt_compression = {\n buffer: number;\n byteOffset?: number;\n byteLength: number;\n byteStride: number;\n count: number;\n mode: 'ATTRIBUTES' | 'TRIANGLES' | 'INDICES';\n filter?: 'NONE' | 'OCTAHEDRAL' | 'QUATERNION' | 'EXPONENTIAL';\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp\n */\nexport type GLTF_EXT_texture_webp = {\n source: GLTFId;\n extras?: any;\n};\n\n/**\n * @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_texture_dds\n */\nexport type GLTF_MSFT_texture_dds = {\n source: GLTFId;\n extras?: any;\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"gltf-types.js","names":[],"sources":["../../../../src/lib/types/gltf-types.ts"],"sourcesContent":["/* eslint-disable camelcase */\n\nimport {ImageType} from '@loaders.gl/images';\nimport type {GLTF} from './gltf-json-schema';\n\n/** GLTFLoader removes processed extensions from `extensionsUsed` and `extensionsUsed`\n * `processedExtensions` is used to track those extensions\n */\nexport type GLTFWithBuffers = {\n json: GLTF;\n binary?: ArrayBuffer;\n buffers: GLTFExternalBuffer[];\n images?: GLTFExternalImage[];\n};\n\ntype GLTFExternalBuffer = {\n arrayBuffer: ArrayBuffer;\n byteOffset: number;\n byteLength: number;\n};\n\ntype GLTFExternalImage =\n | ImageType\n | {\n compressed: true;\n mipmaps: false;\n width: number;\n height: number;\n data: Uint8Array;\n };\n\nexport type {\n GLTF,\n GLTFAccessor,\n GLTFBuffer,\n GLTFBufferView,\n // GLTFCamera,\n GLTFMeshPrimitive,\n GLTFMesh,\n GLTFNode,\n GLTFMaterial,\n GLTFSampler,\n GLTFScene,\n GLTFSkin,\n GLTFTexture,\n GLTFImage,\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 GLTF_EXT_feature_metadata,\n GLTF_EXT_mesh_features\n} from './gltf-json-schema';\n\nexport type {\n GLTFPostprocessed,\n GLTFAccessorPostprocessed,\n GLTFImagePostprocessed,\n GLTFNodePostprocessed,\n GLTFMeshPostprocessed,\n GLTFMeshPrimitivePostprocessed,\n GLTFMaterialPostprocessed,\n GLTFTexturePostprocessed\n} from './gltf-postprocessed-schema';\n"],"mappings":""}
1
+ {"version":3,"file":"gltf-types.js","names":[],"sources":["../../../../src/lib/types/gltf-types.ts"],"sourcesContent":["/* eslint-disable camelcase */\n\nimport {ImageType} from '@loaders.gl/images';\nimport type {GLTF} from './gltf-json-schema';\n\n/** GLTFLoader removes processed extensions from `extensionsUsed` and `extensionsUsed`\n * `processedExtensions` is used to track those extensions\n */\nexport type GLTFWithBuffers = {\n json: GLTF;\n binary?: ArrayBuffer;\n buffers: GLTFExternalBuffer[];\n images?: GLTFExternalImage[];\n};\n\ntype GLTFExternalBuffer = {\n arrayBuffer: ArrayBuffer;\n byteOffset: number;\n byteLength: number;\n};\n\ntype GLTFExternalImage =\n | ImageType\n | {\n compressed: true;\n mipmaps: false;\n width: number;\n height: number;\n data: Uint8Array;\n };\n\nexport type FeatureTableJson = {\n [key: string]: any[];\n};\n\nexport type {\n GLTF,\n GLTFAccessor,\n GLTFBuffer,\n GLTFBufferView,\n // GLTFCamera,\n GLTFMeshPrimitive,\n GLTFMesh,\n GLTFNode,\n GLTFMaterial,\n GLTFSampler,\n GLTFScene,\n GLTFSkin,\n GLTFTexture,\n GLTFImage,\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 './gltf-json-schema';\n\nexport type {\n GLTFPostprocessed,\n GLTFAccessorPostprocessed,\n GLTFImagePostprocessed,\n GLTFNodePostprocessed,\n GLTFMeshPostprocessed,\n GLTFMeshPrimitivePostprocessed,\n GLTFMaterialPostprocessed,\n GLTFTexturePostprocessed\n} from './gltf-postprocessed-schema';\n"],"mappings":""}
@@ -1,2 +1,2 @@
1
- export const VERSION = typeof "4.0.0-alpha.9" !== 'undefined' ? "4.0.0-alpha.9" : 'latest';
1
+ export const VERSION = typeof "4.0.0-beta.2" !== 'undefined' ? "4.0.0-beta.2" : 'latest';
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":["VERSION"],"sources":["../../../../src/lib/utils/version.ts"],"sourcesContent":["// Version constant cannot be imported, it needs to correspond to the build version of **this** module.\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nexport const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n"],"mappings":"AAGA,OAAO,MAAMA,OAAO,GAAG,sBAAkB,KAAK,WAAW,qBAAiB,QAAQ"}
1
+ {"version":3,"file":"version.js","names":["VERSION"],"sources":["../../../../src/lib/utils/version.ts"],"sourcesContent":["// Version constant cannot be imported, it needs to correspond to the build version of **this** module.\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nexport const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n"],"mappings":"AAGA,OAAO,MAAMA,OAAO,GAAG,qBAAkB,KAAK,WAAW,oBAAiB,QAAQ"}
@@ -1,8 +1,11 @@
1
1
  import type { LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
2
2
  import type { GLB } from './lib/types/glb-types';
3
3
  import type { ParseGLBOptions } from './lib/parsers/parse-glb';
4
+ /** GLB loader options */
4
5
  export type GLBLoaderOptions = LoaderOptions & {
6
+ /** GLB Parser Options */
5
7
  glb?: ParseGLBOptions;
8
+ /** GLB specific: byteOffset to start parsing from */
6
9
  byteOffset?: number;
7
10
  };
8
11
  /**
@@ -10,5 +13,4 @@ export type GLBLoaderOptions = LoaderOptions & {
10
13
  * GLB is the binary container format for GLTF
11
14
  */
12
15
  export declare const GLBLoader: LoaderWithParser<GLB, never, GLBLoaderOptions>;
13
- export declare const _TypecheckGLBLoader: LoaderWithParser;
14
16
  //# sourceMappingURL=glb-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-loader.d.ts","sourceRoot":"","sources":["../src/glb-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,uBAAuB,CAAC;AAC/C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAI7D,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,gBAAgB,CAAC,GAAG,EAAE,KAAK,EAAE,gBAAgB,CAepE,CAAC;AAcF,eAAO,MAAM,mBAAmB,EAAE,gBAA4B,CAAC"}
1
+ {"version":3,"file":"glb-loader.d.ts","sourceRoot":"","sources":["../src/glb-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,uBAAuB,CAAC;AAC/C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAI7D,yBAAyB;AACzB,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,yBAAyB;IACzB,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,gBAAgB,CAAC,GAAG,EAAE,KAAK,EAAE,gBAAgB,CAepE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,15 @@
1
1
  export type { GLB } from './lib/types/glb-types';
2
- export type { GLTF, GLTFAccessor, GLTFBuffer, GLTFBufferView, GLTFMeshPrimitive, GLTFMesh, GLTFNode, GLTFMaterial, GLTFSampler, GLTFScene, GLTFSkin, GLTFTexture, GLTFImage, GLTFObject, GLTF_KHR_binary_glTF, GLTF_KHR_draco_mesh_compression, GLTF_KHR_texture_basisu, GLTF_EXT_meshopt_compression, GLTF_EXT_texture_webp, GLTF_EXT_feature_metadata, GLTF_EXT_feature_metadata_primitive, GLTF_EXT_feature_metadata_attribute, GLTF_EXT_mesh_features } from './lib/types/gltf-json-schema';
2
+ export type { GLTF, GLTFAccessor, GLTFBuffer, GLTFBufferView, GLTFMeshPrimitive, GLTFMesh, GLTFNode, GLTFMaterial, GLTFSampler, GLTFScene, GLTFSkin, GLTFTexture, GLTFImage, GLTFObject, GLTF_KHR_binary_glTF, GLTF_KHR_draco_mesh_compression, GLTF_KHR_texture_basisu, GLTF_EXT_meshopt_compression, GLTF_EXT_texture_webp } from './lib/types/gltf-json-schema';
3
+ export type { GLTF_EXT_feature_metadata_GLTF, GLTF_EXT_feature_metadata_Schema, GLTF_EXT_feature_metadata_Class, GLTF_EXT_feature_metadata_ClassProperty, GLTF_EXT_feature_metadata_Enum, GLTF_EXT_feature_metadata_EnumValue, GLTF_EXT_feature_metadata_FeatureTable, GLTF_EXT_feature_metadata_FeatureTableProperty, GLTF_EXT_feature_metadata_FeatureTexture, GLTF_EXT_feature_metadata_TextureAccessor, GLTF_EXT_feature_metadata_Statistics, GLTF_EXT_feature_metadata_StatisticsClass, GLTF_EXT_feature_metadata_StatisticsClassProperty, GLTF_EXT_feature_metadata_Primitive, GLTF_EXT_feature_metadata_FeatureIdAttribute, GLTF_EXT_feature_metadata_FeatureIdAttributeFeatureIds, GLTF_EXT_feature_metadata_FeatureIdTexture, GLTF_EXT_feature_metadata_FeatureIdTextureAccessor } from './lib/types/gltf-ext-feature-metadata-schema';
4
+ export type { GLTF_EXT_structural_metadata_GLTF } from './lib/types/gltf-ext-structural-metadata-schema';
5
+ export type { GLTF_EXT_mesh_features, GLTF_EXT_mesh_features_featureId } from './lib/types/gltf-ext-mesh-features-schema';
6
+ export { name as EXT_MESH_FEATURES } from './lib/extensions/EXT_mesh_features';
7
+ export { name as EXT_STRUCTURAL_METADATA } from './lib/extensions/EXT_structural_metadata';
8
+ export { name as EXT_FEATURE_METADATA } from './lib/extensions/deprecated/EXT_feature_metadata';
9
+ export { getPropertyTableFromExtFeatureMetadata } from './lib/extensions/deprecated/EXT_feature_metadata';
10
+ export { getPropertyTableFromExtStructuralMetadata } from './lib/extensions/EXT_structural_metadata';
3
11
  export type { GLTFPostprocessed, GLTFAccessorPostprocessed, GLTFNodePostprocessed, GLTFMaterialPostprocessed, GLTFMeshPostprocessed, GLTFMeshPrimitivePostprocessed, GLTFImagePostprocessed, GLTFTexturePostprocessed } from './lib/types/gltf-postprocessed-schema';
4
- export type { GLTFWithBuffers } from './lib/types/gltf-types';
12
+ export type { GLTFWithBuffers, FeatureTableJson } from './lib/types/gltf-types';
5
13
  export { GLTFLoader } from './gltf-loader';
6
14
  export { GLTFWriter } from './gltf-writer';
7
15
  export { GLBLoader } from './glb-loader';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAC,GAAG,EAAC,MAAM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AsB,EAAE,OAAO,CAAC,KAAA,iBAOrF"}
@@ -0,0 +1,7 @@
1
+ import type { GLTF } from '../types/gltf-json-schema';
2
+ import { GLTFLoaderOptions } from '../../gltf-loader';
3
+ export declare const name = "EXT_mesh_features";
4
+ export declare function decode(gltfData: {
5
+ json: GLTF;
6
+ }, options: GLTFLoaderOptions): Promise<void>;
7
+ //# sourceMappingURL=EXT_mesh_features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EXT_mesh_features.d.ts","sourceRoot":"","sources":["../../../src/lib/extensions/EXT_mesh_features.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,IAAI,EAAoB,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAUpD,eAAO,MAAM,IAAI,sBAAyB,CAAC;AAE3C,wBAAsB,MAAM,CAAC,QAAQ,EAAE;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG9F"}
@@ -0,0 +1,16 @@
1
+ import type { GLTF } from '../types/gltf-json-schema';
2
+ import type { GLTF_EXT_structural_metadata_GLTF } from '../types/gltf-ext-structural-metadata-schema';
3
+ import type { GLTFLoaderOptions } from '../../gltf-loader';
4
+ import type { FeatureTableJson } from '../types/gltf-types';
5
+ export declare const name = "EXT_structural_metadata";
6
+ export declare function decode(gltfData: {
7
+ json: GLTF;
8
+ }, options: GLTFLoaderOptions): Promise<void>;
9
+ /**
10
+ * Handles EXT_structural_metadata to get property table.
11
+ * @param extension - Global level of EXT_STRUCTURAL_METADATA extension.
12
+ * @param metadataClass - User selected feature metadata class name.
13
+ * @returns {FeatureTableJson | null} Property table or null if the extension can't be handled properly.
14
+ */
15
+ export declare function getPropertyTableFromExtStructuralMetadata(extension: GLTF_EXT_structural_metadata_GLTF, metadataClass?: string): FeatureTableJson | null;
16
+ //# sourceMappingURL=EXT_structural_metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EXT_structural_metadata.d.ts","sourceRoot":"","sources":["../../../src/lib/extensions/EXT_structural_metadata.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,IAAI,EAA6C,MAAM,2BAA2B,CAAC;AAChG,OAAO,KAAK,EAMV,iCAAiC,EAIlC,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAgB1D,eAAO,MAAM,IAAI,4BAA+B,CAAC;AAEjD,wBAAsB,MAAM,CAAC,QAAQ,EAAE;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG9F;AAED;;;;;GAKG;AACH,wBAAgB,yCAAyC,CACvD,SAAS,EAAE,iCAAiC,EAC5C,aAAa,CAAC,EAAE,MAAM,GACrB,gBAAgB,GAAG,IAAI,CAmCzB"}
@@ -1,6 +1,6 @@
1
+ import type { LoaderContext } from '@loaders.gl/loader-utils';
1
2
  import type { GLTF } from '../types/gltf-json-schema';
2
3
  import type { GLTFLoaderOptions } from '../../gltf-loader';
3
- import type { LoaderContext } from '@loaders.gl/loader-utils';
4
4
  /** Extension name */
5
5
  export declare const name = "KHR_draco_mesh_compression";
6
6
  export declare function preprocess(gltfData: {
@@ -1 +1 @@
1
- {"version":3,"file":"KHR_draco_mesh_compression.d.ts","sourceRoot":"","sources":["../../../src/lib/extensions/KHR_draco_mesh_compression.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,IAAI,EAIL,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAS5D,qBAAqB;AACrB,eAAO,MAAM,IAAI,+BAA6B,CAAC;AAE/C,wBAAgB,UAAU,CACxB,QAAQ,EAAE;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,EACtB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,aAAa,GACrB,IAAI,CAON;AAED,wBAAsB,MAAM,CAC1B,QAAQ,EAAE;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,EACtB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED,wBAAgB,MAAM,CAAC,QAAQ,KAAA,EAAE,OAAO,GAAE,iBAAsB,GAAG,IAAI,CAUtE"}
1
+ {"version":3,"file":"KHR_draco_mesh_compression.d.ts","sourceRoot":"","sources":["../../../src/lib/extensions/KHR_draco_mesh_compression.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAM5D,OAAO,KAAK,EACV,IAAI,EAIL,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAOzD,qBAAqB;AACrB,eAAO,MAAM,IAAI,+BAA6B,CAAC;AAE/C,wBAAgB,UAAU,CACxB,QAAQ,EAAE;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,EACtB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,aAAa,GACrB,IAAI,CAON;AAED,wBAAsB,MAAM,CAC1B,QAAQ,EAAE;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,EACtB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED,wBAAgB,MAAM,CAAC,QAAQ,KAAA,EAAE,OAAO,GAAE,iBAAsB,GAAG,IAAI,CAUtE"}
@@ -1,7 +1,16 @@
1
1
  import type { GLTF } from '../../types/gltf-json-schema';
2
+ import type { GLTF_EXT_feature_metadata_GLTF } from '../../types/gltf-ext-feature-metadata-schema';
3
+ import type { FeatureTableJson } from '../../types/gltf-types';
2
4
  import { GLTFLoaderOptions } from '../../../gltf-loader';
3
5
  export declare const name = "EXT_feature_metadata";
4
6
  export declare function decode(gltfData: {
5
7
  json: GLTF;
6
8
  }, options: GLTFLoaderOptions): Promise<void>;
9
+ /**
10
+ * Handles EXT_feature_metadata to get property table.
11
+ * @param extension - Global level of EXT_FEATURE_METADATA extension.
12
+ * @param metadataClass - User selected feature metadata class name.
13
+ * @returns {FeatureTableJson | null} Property table or null if the extension can't be handled properly.
14
+ */
15
+ export declare function getPropertyTableFromExtFeatureMetadata(extension: GLTF_EXT_feature_metadata_GLTF, metadataClass?: string): FeatureTableJson | null;
7
16
  //# sourceMappingURL=EXT_feature_metadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EXT_feature_metadata.d.ts","sourceRoot":"","sources":["../../../../src/lib/extensions/deprecated/EXT_feature_metadata.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,8BAA8B,CAAC;AAcvD,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAKvD,eAAO,MAAM,IAAI,yBAAuB,CAAC;AAEzC,wBAAsB,MAAM,CAAC,QAAQ,EAAE;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG9F"}
1
+ {"version":3,"file":"EXT_feature_metadata.d.ts","sourceRoot":"","sources":["../../../../src/lib/extensions/deprecated/EXT_feature_metadata.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAA0B,MAAM,8BAA8B,CAAC;AAChF,OAAO,KAAK,EAMV,8BAA8B,EAG/B,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAevD,eAAO,MAAM,IAAI,yBAA4B,CAAC;AAE9C,wBAAsB,MAAM,CAAC,QAAQ,EAAE;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG9F;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CACpD,SAAS,EAAE,8BAA8B,EACzC,aAAa,CAAC,EAAE,MAAM,GACrB,gBAAgB,GAAG,IAAI,CAgDzB"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * loaders.gl, MIT license
3
+ *
4
+ * Shared code for 3DTiles extensions:
5
+ * * EXT_feature_metadata
6
+ * * EXT_mesh_features
7
+ * * EXT_structural_metadata
8
+ */
9
+ import type { GLTFTextureInfoMetadata, GLTFMeshPrimitive } from '../../types/gltf-json-schema';
10
+ import type { BigTypedArray, TypedArray } from '@loaders.gl/schema';
11
+ import { GLTFScenegraph } from '../../api/gltf-scenegraph';
12
+ export type NumericComponentType = 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64' | 'FLOAT32' | 'FLOAT64';
13
+ export declare function getArrayElementByteSize(attributeType: any, componentType: any): number;
14
+ /**
15
+ * Gets offset array from `arrayOffsets` or `stringOffsets`.
16
+ * @param scenegraph - Instance of the class for structured access to GLTF data.
17
+ * @param bufferViewIndex - Buffer view index
18
+ * @param offsetType - The type of values in `arrayOffsets` or `stringOffsets`.
19
+ * @param numberOfElements - The number of elements in each property array.
20
+ * @returns Array of values offsets. The number of offsets in the array is equal to `numberOfElements` plus one.
21
+ */
22
+ export declare function getOffsetsForProperty(scenegraph: GLTFScenegraph, bufferViewIndex: number, offsetType: 'UINT8' | 'UINT16' | 'UINT32' | 'UINT64' | string, numberOfElements: number): TypedArray | null;
23
+ /**
24
+ * Converts raw bytes that are in the buffer to an array of the type defined by the schema.
25
+ * @param data - Raw bytes in the buffer.
26
+ * @param attributeType - SCALAR, VECN, MATN.
27
+ * @param componentType - Type of the component in elements, e.g. 'UINT8' or 'FLOAT32'.
28
+ * @param elementCount - Number of elements in the array. Default value is 1.
29
+ * @returns Data array
30
+ */
31
+ export declare function convertRawBufferToMetadataArray(data: Uint8Array, attributeType: string, componentType: NumericComponentType, elementCount?: number): BigTypedArray;
32
+ /**
33
+ * Processes data encoded in the texture associated with the primitive.
34
+ * @param scenegraph - Instance of the class for structured access to GLTF data.
35
+ * @param textureInfo - Reference to the texture where extension data are stored.
36
+ * @param primitive - Primitive object in the mesh.
37
+ * @returns Array of data taken. Null if data can't be taken from the texture.
38
+ */
39
+ export declare function getPrimitiveTextureData(scenegraph: GLTFScenegraph, textureInfo: GLTFTextureInfoMetadata, primitive: GLTFMeshPrimitive): number[] | null;
40
+ /**
41
+ * Puts property data to attributes.
42
+ * It creates corresponding buffer, bufferView and accessor
43
+ * so the data can be accessed like regular data stored in buffers.
44
+ * @param scenegraph - Scenegraph object.
45
+ * @param attributeName - Name of the attribute.
46
+ * @param propertyData - Property data to store.
47
+ * @param featureTable - Array where unique data from the property data are being stored.
48
+ * @param primitive - Primitive object.
49
+ */
50
+ export declare function primitivePropertyDataToAttributes(scenegraph: GLTFScenegraph, attributeName: string, propertyData: number[], featureTable: number[], primitive: GLTFMeshPrimitive): void;
51
+ /**
52
+ * Parses variable-length array data.
53
+ * In this case every value of the property in the table will be an array
54
+ * of arbitrary length.
55
+ * @param valuesData - Values in a flat typed array.
56
+ * @param numberOfElements - Number of rows in the property table.
57
+ * @param arrayOffsets - Offsets of nested arrays in the flat values array.
58
+ * @param valuesDataBytesLength - Data byte length.
59
+ * @param valueSize - Value size in bytes.
60
+ * @returns Array of typed arrays.
61
+ */
62
+ export declare function parseVariableLengthArrayNumeric(valuesData: BigTypedArray, numberOfElements: number, arrayOffsets: TypedArray, valuesDataBytesLength: number, valueSize: number): BigTypedArray[];
63
+ /**
64
+ * Parses fixed-length array data.
65
+ * In this case every value of the property in the table will be an array
66
+ * of constant length equal to `arrayCount`.
67
+ * @param valuesData - Values in a flat typed array.
68
+ * @param numberOfElements - Number of rows in the property table.
69
+ * @param arrayCount - Nested arrays length.
70
+ * @returns Array of typed arrays.
71
+ */
72
+ export declare function parseFixedLengthArrayNumeric(valuesData: BigTypedArray, numberOfElements: number, arrayCount: number): BigTypedArray[];
73
+ /**
74
+ * Decodes properties of string type from binary source.
75
+ * @param numberOfElements - The number of elements in each property array that propertyTableProperty contains. It's a number of rows in the table.
76
+ * @param valuesDataBytes - Data taken from values property of the property table property.
77
+ * @param arrayOffsets - Offsets for variable-length arrays. It's null for fixed-length arrays or scalar types.
78
+ * @param stringOffsets - Index of the buffer view containing offsets for strings. It should be available for string type.
79
+ * @returns String property values
80
+ */
81
+ export declare function getPropertyDataString(numberOfElements: number, valuesDataBytes: Uint8Array, arrayOffsets: TypedArray | null, stringOffsets: TypedArray | null): string[] | string[][];
82
+ //# sourceMappingURL=3d-tiles-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3d-tiles-utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/extensions/utils/3d-tiles-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAC,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAC7F,OAAO,KAAK,EAAC,aAAa,EAAE,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAGlE,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAKzD,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,OAAO,GACP,OAAO,GACP,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAyCd,wBAAgB,uBAAuB,CAAC,aAAa,KAAA,EAAE,aAAa,KAAA,GAAG,MAAM,CAK5E;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,cAAc,EAC1B,eAAe,EAAE,MA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+ import type { GLTFWithBuffers } from '../types/gltf-types';
1
2
  import type { GLTFPostprocessed } from '../types/gltf-postprocessed-schema';
2
3
  export declare function getAccessorTypeFromSize(size: any): string;
3
4
  export declare function getComponentTypeFromArray(typedArray: any): number;
@@ -6,6 +7,7 @@ export declare function getAccessorArrayTypeAndLength(accessor: any, bufferView:
6
7
  length: number;
7
8
  byteLength: number;
8
9
  };
10
+ export declare function getFloat32ArrayForAccessor(gltfData: GLTFWithBuffers, texCoordAccessor: number): Float32Array | null;
9
11
  /**
10
12
  * Calculate the GPU memory used by a GLTF tile, for both buffer and texture memory
11
13
  * @param gltf - the gltf content of a GLTF tile
@@ -1 +1 @@
1
- {"version":3,"file":"gltf-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/gltf-utils/gltf-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAC;AA+D1E,wBAAgB,uBAAuB,CAAC,IAAI,KAAA,UAG3C;AAED,wBAAgB,yBAAyB,CAAC,UAAU,KAAA,UAMnD;AAED,wBAAgB,6BAA6B,CAAC,QAAQ,KAAA,EAAE,UAAU,KAAA;;;;EAQjE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAiBlE"}
1
+ {"version":3,"file":"gltf-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/gltf-utils/gltf-utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAC;AAgE1E,wBAAgB,uBAAuB,CAAC,IAAI,KAAA,UAG3C;AAED,wBAAgB,yBAAyB,CAAC,UAAU,KAAA,UAMnD;AAED,wBAAgB,6BAA6B,CAAC,QAAQ,KAAA,EAAE,UAAU,KAAA;;;;EAQjE;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,eAAe,EACzB,gBAAgB,EAAE,MAAM,GACvB,YAAY,GAAG,IAAI,CA8BrB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAiBlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"parse-gltf.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-gltf.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAajD,OAAO;AACP,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7B,6FAA6F;IAC7F,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC;AAEF,4DAA4D;AAC5D,wBAAgB,MAAM,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAGpF;AAED,wBAAsB,SAAS,CAC7B,IAAI,EAAE,eAAe,EACrB,mBAAmB,KAAA,EACnB,UAAU,oBAAI,EACd,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,eAAe,CAAC,CAqB1B"}
1
+ {"version":3,"file":"parse-gltf.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-gltf.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC5D,O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