@itwin/core-frontend 4.4.0-dev.24 → 4.4.0-dev.25

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.
@@ -173,11 +173,11 @@ export interface GltfNodeBaseProps {
173
173
  /** A 4x4 column-major transformation matrix. Mutually exclusive with [[rotation]], [[scale]], and [[translation]]. */
174
174
  matrix?: number[];
175
175
  /** Unit quaternion as [x, y, z, w], where w is the scalar. */
176
- rotation?: number[];
176
+ rotation?: [number, number, number, number];
177
177
  /** Non-uniform scale as [x, y, z]. */
178
- scale?: number[];
178
+ scale?: [number, number, number];
179
179
  /** Translation as [x, y, z]. */
180
- translation?: number[];
180
+ translation?: [number, number, number];
181
181
  }
182
182
  /** glTF 1.0 representation of a [[GltfNode]]. Unlike a [[Gltf2Node]], a Gltf1Node may refer to any number of [[GltfMesh]]es.
183
183
  * @internal
@@ -203,6 +203,23 @@ export interface Gltf2Node extends GltfChildOfRootProperty, GltfNodeBaseProps {
203
203
  meshes?: never;
204
204
  /** Morph targets - currently ignored. */
205
205
  weights?: number[];
206
+ extensions?: GltfExtensions & {
207
+ /** The [EXT_mesh_gpu_instancing](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md) extension permits multiple
208
+ * instances of the same mesh to be rendered with different translation, rotation, and/or scale.
209
+ * All of the attribute accessors must have the same count (which indicates the number of instances to be drawn).
210
+ * All attributes are optional (though omitting all of them would be silly).
211
+ */
212
+ EXT_mesh_gpu_instancing?: {
213
+ attributes?: {
214
+ /** VEC3; FLOAT */
215
+ TRANSLATION?: GltfId;
216
+ /** VEC4 (quaternion); FLOAT, normalized BYTE, or normalized SHORT */
217
+ ROTATION?: GltfId;
218
+ /** VEC3; FLOAT */
219
+ SCALE?: GltfId;
220
+ };
221
+ };
222
+ };
206
223
  }
207
224
  /** Describes a node in a [[GltfScene]]. Each node may be associated with zero, one (glTF 2.0), or any number of (glTF 1.0) [[GltfMesh]]es.
208
225
  * Each node may define a transform. Each node may have any number of child nodes. A child node's transform is multiplied by its parent node's transform.
@@ -1 +1 @@
1
- {"version":3,"file":"GltfSchema.d.ts","sourceRoot":"","sources":["../../../../src/common/gltf/GltfSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,oBAAY,YAAY;IACtB,MAAM,IAAI;IACV,KAAK,IAAI;IACT,SAAS,IAAI;IACb,SAAS,IAAI;IACb,+BAA+B;IAC/B,aAAa,IAAI;IACjB,+BAA+B;IAC/B,WAAW,IAAI;CAChB;AAED;;GAEG;AACH,oBAAY,YAAY;IACtB,UAAU,OAAS;IACnB,YAAY,OAAS;IACrB,WAAW,OAAO;IAClB,aAAa,OAAO;IACpB,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,GAAG,OAAO;IACV,IAAI,OAAO;IACX,OAAO,QAAS;IAChB,OAAO,QAAS;IAChB,SAAS,QAAQ;IACjB,SAAS,QAAQ;IACjB,SAAS,QAAQ;IACjB,SAAS,QAAQ;IACjB,SAAS,QAAQ;IACjB,SAAS,QAAQ;CAClB;AAED,gBAAgB;AAChB,oBAAY,aAAa;IACvB,OAAO,OAAO;IACd,MAAM,OAAO;CACd;AAED,gBAAgB;AAChB,oBAAY,aAAa;IACvB,OAAO,OAAwB;IAC/B,MAAM,OAAuB;IAC7B,oBAAoB,OAAO;IAC3B,mBAAmB,OAAO;IAC1B,mBAAmB,OAAO;IAC1B,kBAAkB,OAAO;CAC1B;AAED;;GAEG;AACH,oBAAY,YAAY;IACtB,WAAW,QAAQ;IACnB,cAAc,QAAQ;IACtB,MAAM,QAAQ;CACf;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,WAAW,QAAQ;IACnB,kBAAkB,QAAQ;CAC3B;AAED,4FAA4F;AAC5F,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAC7B,4FAA4F;AAC5F,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAC7B,wEAAwE;AACxE,M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S,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClB,MAAM,IAAI,CAAC;QACX,IAAI,IAAI,CAAC,QAAQ;YACf,KAAK,MAAM,KAAK,IAAI,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC;gBACpE,MAAM,KAAK,CAAC;KACjB;AACH,CAAC;AA+FD;;GAEG;AACH,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,8BAA8B;IAC9B,gEAAY,CAAA;AACd,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAyFD,gBAAgB;AAChB,MAAM,UAAU,eAAe,CAAC,QAAsB;IACpD,MAAM,IAAI,GAAG,QAAyB,CAAC;IACvC,OAAO,SAAS,KAAK,IAAI,CAAC,SAAS,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM,CAAC;AACnE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\n/** Enumerates the types of [[GltfMeshPrimitive]] topologies.\r\n * @internal\r\n */\r\nexport enum GltfMeshMode {\r\n Points = 0,\r\n Lines = 1,\r\n LineStrip = 3,\r\n Triangles = 4,\r\n /** Not currently supported. */\r\n TriangleStrip = 5,\r\n /** Not currently supported. */\r\n TriangleFan = 6,\r\n}\r\n\r\n/** Enumerates the basic data types supported by accessors, material values, technique uniforms, etc.\r\n * @internal\r\n */\r\nexport enum GltfDataType {\r\n SignedByte = 0x1400,\r\n UnsignedByte = 0x1401,\r\n SignedShort = 5122,\r\n UnsignedShort = 5123,\r\n UInt32 = 5125,\r\n Float = 5126,\r\n Rgb = 6407,\r\n Rgba = 6408,\r\n IntVec2 = 0x8b53,\r\n IntVec3 = 0x8b54,\r\n FloatVec2 = 35664,\r\n FloatVec3 = 35665,\r\n FloatVec4 = 35666,\r\n FloatMat3 = 35675,\r\n FloatMat4 = 35676,\r\n Sampler2d = 35678,\r\n}\r\n\r\n/** @internal */\r\nexport enum GltfMagFilter {\r\n Nearest = 9728,\r\n Linear = 9729,\r\n}\r\n\r\n/** @internal */\r\nexport enum GltfMinFilter {\r\n Nearest = GltfMagFilter.Nearest,\r\n Linear = GltfMagFilter.Linear,\r\n NearestMipMapNearest = 9984,\r\n LinearMipMapNearest = 9985,\r\n NearestMipMapLinear = 9986,\r\n LinearMipMapLinear = 9987,\r\n}\r\n\r\n/** Describes how texture coordinates outside of the range [0..1] are handled.\r\n * @internal\r\n */\r\nexport enum GltfWrapMode {\r\n ClampToEdge = 33071,\r\n MirroredRepeat = 33648,\r\n Repeat = 10497,\r\n}\r\n\r\n/** Describes the intended target of a [[GltfBufferViewProps]].\r\n * @internal\r\n */\r\nexport enum GltfBufferTarget {\r\n ArrayBuffer = 34962,\r\n ElementArrayBuffer = 24963,\r\n}\r\n\r\n/** The type used to refer to an entry in a GltfDictionary in a glTF 1.0 asset. @internal */\r\nexport type Gltf1Id = string;\r\n/** The type used to refer to an entry in a GltfDictionary in a glTF 2.0 asset. @internal */\r\nexport type Gltf2Id = number;\r\n/** The type used to refer to an entry in a GltfDictionary. @internal */\r\nexport type GltfId = Gltf1Id | Gltf2Id;\r\n\r\n/** A collection of resources of some type defined at the top-level of a [[GltfDocument]].\r\n * In glTF 1.0, these are defined as objects; each resource is referenced and accessed by its string key.\r\n * In glTF 2.0, these are defined as arrays; each resource is referenced and accessed by its integer array index.\r\n * @internal\r\n */\r\nexport interface GltfDictionary<T extends GltfChildOfRootProperty> {\r\n [key: GltfId]: T | undefined;\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfStringMap<T> {\r\n [key: string]: T | undefined;\r\n}\r\n\r\n/** Iterate the contents of a [[GltfDictionary]].\r\n * @internal\r\n */\r\nexport function * gltfDictionaryIterator<T extends GltfChildOfRootProperty>(dict: GltfDictionary<T>): Iterable<T> {\r\n if (Array.isArray(dict)) {\r\n for (const elem of dict)\r\n yield elem;\r\n } else {\r\n for (const key of Object.keys(dict)) {\r\n const value = dict[key];\r\n if (undefined !== value)\r\n yield value;\r\n }\r\n }\r\n}\r\n\r\n/** Optional extensions applied to a [[GltfProperty]] to enable behavior not defined in the core specification.\r\n * @internal\r\n */\r\nexport type GltfExtensions = GltfStringMap<unknown>;\r\n\r\n/** The base interface provided by most objects in a glTF asset, permitting additional data to be associated with the object.\r\n * @internal\r\n */\r\nexport interface GltfProperty {\r\n extensions?: GltfExtensions;\r\n extras?: any;\r\n}\r\n\r\n/** The base interface provided by top-level properties of a [[GltfDocument]].\r\n * @internal\r\n */\r\nexport interface GltfChildOfRootProperty extends GltfProperty {\r\n /** Optional name, strictly for human consumption. */\r\n name?: string;\r\n}\r\n\r\n/** @internal */\r\nexport interface DracoMeshCompression {\r\n bufferView: GltfId;\r\n // TEXCOORD_0, POSITION, etc\r\n attributes: GltfStringMap<number>;\r\n}\r\n\r\n/** @internal */\r\nexport interface MeshFeature extends GltfProperty {\r\n featureCount: number;\r\n nullFeatureId?: number;\r\n label?: string;\r\n propertyTable?: number;\r\n texture?: unknown;\r\n attribute?: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface MeshFeatures {\r\n featureIds: MeshFeature[];\r\n}\r\n\r\n/** A unit of geometry belonging to a [[GltfMesh]]. @internal */\r\nexport interface GltfMeshPrimitive extends GltfProperty {\r\n /** Maps the name of each mesh attribute semantic to the Id of the [[GltfAccessor]] providing the attribute's data. */\r\n attributes: GltfStringMap<GltfId>;\r\n /** The Id of the [[GltfAccessor]] providing the vertex indices. */\r\n indices?: GltfId;\r\n /** The Id of the [[GltfMaterial]] to apply to the primitive when rendering. */\r\n material?: GltfId;\r\n /** The primitive topology type. */\r\n mode?: GltfMeshMode;\r\n /** Morph targets - currently unsupported. */\r\n targets?: GltfStringMap<GltfId>;\r\n extensions?: GltfExtensions & {\r\n /** The [CESIUM_primitive_outline](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline) extension\r\n * describes how to draw outline edges for a triangle mesh.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n CESIUM_primitive_outline?: {\r\n /** The Id of the [[GltfBufferViewProps]] supplying the endpoints of each edge as indices into the triangle mesh's vertex array.\r\n * The number of indices must be even; each consecutive pair of indices describes one line segment. No connectivity between\r\n * line segments is implied.\r\n */\r\n indices?: GltfId;\r\n };\r\n /** The [KHR_draco_mesh_compression](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md) extension\r\n * allows glTF to support geometry compressed with Draco geometry compression.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_draco_mesh_compression?: DracoMeshCompression;\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n EXT_mesh_features?: MeshFeatures;\r\n };\r\n}\r\n\r\n/** A collection of [[GltfMeshPrimitive]]s to be rendered. Each mesh is referenced by a node. Multiple nodes can refer to the same mesh.\r\n * The node's transform is applied when rendering the mesh.\r\n * @internal\r\n */\r\nexport interface GltfMesh extends GltfChildOfRootProperty {\r\n /** The collection of primitives to be rendered. */\r\n primitives?: GltfMeshPrimitive[];\r\n /** For morph targets - currently unsupported. */\r\n weights?: number[];\r\n}\r\n\r\n/** Properties common to [[Gltf1Node]] and [[Gltf2Node]]. @internal */\r\nexport interface GltfNodeBaseProps {\r\n /** The Ids of the child nodes. @see [[GltfNode]]. */\r\n children?: GltfId[];\r\n /** Currently ignored. */\r\n camera?: GltfId;\r\n /** Currently ignored. */\r\n skin?: GltfId;\r\n /** A 4x4 column-major transformation matrix. Mutually exclusive with [[rotation]], [[scale]], and [[translation]]. */\r\n matrix?: number[];\r\n /** Unit quaternion as [x, y, z, w], where w is the scalar. */\r\n rotation?: number[];\r\n /** Non-uniform scale as [x, y, z]. */\r\n scale?: number[];\r\n /** Translation as [x, y, z]. */\r\n translation?: number[];\r\n}\r\n\r\n/** glTF 1.0 representation of a [[GltfNode]]. Unlike a [[Gltf2Node]], a Gltf1Node may refer to any number of [[GltfMesh]]es.\r\n * @internal\r\n */\r\nexport interface Gltf1Node extends GltfChildOfRootProperty, GltfNodeBaseProps {\r\n /** The Ids of the [[GltfMesh]]es to be rendered by this node.\r\n * @note The spec defines this as an array of strings, but the original implementation of [[GltfReader]] was written to treat it as a string instead.\r\n * In case this was because of non-spec-compliant glTF that placed a string here instead of an array, either is permitted.\r\n */\r\n meshes?: GltfId[] | string;\r\n mesh?: never;\r\n /** Currently ignored. */\r\n jointName?: GltfId;\r\n /** Currently ignored. */\r\n skeletons?: GltfId[];\r\n}\r\n\r\n/** glTF 2.0 representation of a [[GltfNode]]. Unlike a [[Gltf1Node]], a Gltf2Node may refer to at most one [[GltfMesh]].\r\n * @internal\r\n */\r\nexport interface Gltf2Node extends GltfChildOfRootProperty, GltfNodeBaseProps {\r\n /** The Id of the [[GltfMesh]] to be rendered by this node. */\r\n mesh?: GltfId;\r\n meshes?: never;\r\n /** Morph targets - currently ignored. */\r\n weights?: number[];\r\n}\r\n\r\n/** Describes a node in a [[GltfScene]]. Each node may be associated with zero, one (glTF 2.0), or any number of (glTF 1.0) [[GltfMesh]]es.\r\n * Each node may define a transform. Each node may have any number of child nodes. A child node's transform is multiplied by its parent node's transform.\r\n * Some nodes may be associated with other types of data like cameras, skins, lights, etc - these types of data are currently unsupported.\r\n * Rendering a node means rendering its meshes and the meshes of all of its descendants, with transforms applied.\r\n * @internal\r\n */\r\nexport type GltfNode = Gltf1Node | Gltf2Node;\r\n\r\n/** Get the Ids of the meshes associated with a node.\r\n * @internal\r\n */\r\nexport function getGltfNodeMeshIds(node: GltfNode): GltfId[] {\r\n if (undefined !== node.meshes)\r\n return typeof node.meshes === \"string\" ? [node.meshes] : node.meshes;\r\n else if (undefined !== node.mesh)\r\n return [node.mesh];\r\n\r\n return [];\r\n}\r\n\r\n/** @internal */\r\nexport function * traverseGltfNodes(ids: Iterable<GltfId>, nodes: GltfDictionary<GltfNode>, traversed: Set<GltfId>): Iterable<GltfNode> {\r\n for (const id of ids) {\r\n if (traversed.has(id))\r\n throw new Error(\"Cycle detected while traversing glTF nodes\");\r\n\r\n const node = nodes[id];\r\n if (!node)\r\n continue;\r\n\r\n traversed.add(id);\r\n yield node;\r\n if (node.children)\r\n for (const child of traverseGltfNodes(node.children, nodes, traversed))\r\n yield child;\r\n }\r\n}\r\n\r\n/** Describes a scene graph that composes any number of [[GltfNode]]s to produce a rendering of the [[GltfDocument]] asset.\r\n * An asset may define any number of scenes; the default scene is specified by [[Gltf.scene]].\r\n * @internal\r\n */\r\nexport interface GltfScene extends GltfChildOfRootProperty {\r\n /** The Ids of the nodes comprising the scene graph. */\r\n nodes?: GltfId[];\r\n}\r\n\r\n/** Provides metadata about a [[GltfDocument]] asset.\r\n * @internal\r\n */\r\nexport interface GltfAsset extends GltfProperty {\r\n /** A copyright message suitable for display to credit the content creator. */\r\n copyright?: string;\r\n /** The name of the tool that generated the asset. */\r\n generator?: string;\r\n /** The glTF version targeted by the asset, in the form \"major.minor\" where \"major\" and \"minor\" are integers. */\r\n version: string;\r\n /** The minimum glTF version required to properly load this asset, in the same form as [[version]].\r\n * This minimum version must be no greater than [[version]].\r\n */\r\n minVersion?: string;\r\n}\r\n\r\n/** Describes an image such as one used for a [[GltfTexture]]. The image may be referenced by a [[uri]] or a [[bufferView]].\r\n * @internal\r\n */\r\nexport interface GltfImage extends GltfChildOfRootProperty {\r\n /** URI from which the image data can be obtained, either as a base-64-encoded data URI or an external resource.\r\n * Mutually exclusive with [[bufferView]].\r\n */\r\n uri?: string;\r\n /** The image's media type. This property is required if [[bufferView]] is defined. */\r\n mimeType?: \"image/jpeg\" | \"image/png\";\r\n /** The Id of the [[GltfBufferViewProps]] containing the image data. Mutually exclusive with [[uri]]. */\r\n bufferView?: GltfId;\r\n extensions?: GltfExtensions & {\r\n /** The [KHR_binary_glTF](https://github.com/KhronosGroup/glTF/tree/main/extensions/1.0/Khronos/KHR_binary_glTF) allows an image to\r\n * be embedded in a binary chunk appended to the glTF asset's JSON, instead of being referenced by an external URI.\r\n * This is superseded in glTF 2.0 by support for the glb file format specification.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_binary_glTF?: {\r\n /** The Id of the [[GltfBufferViewProps]] that contains the binary image data. */\r\n bufferView?: GltfId;\r\n /** Required - @see [[GltfImage.mimeType]]. */\r\n mimeType?: string;\r\n };\r\n };\r\n}\r\n\r\n/** Describes a reference to a [[GltfTexture]]. @internal */\r\nexport interface GltfTextureInfo extends GltfProperty {\r\n /** The Id of the [[GltfTexture]]. */\r\n index: GltfId;\r\n /** The set index of the texture's TEXCOORD attribute used for texture coordinate mapping.\r\n * For example, if `texCoord` is `2`, an attribute named `TEXCOORD_2` must exist containing the texture coordinates.\r\n * Default: 0.\r\n */\r\n texCoord?: number;\r\n}\r\n\r\n/** Describes a texture and its sampler.\r\n * @internal\r\n */\r\nexport interface GltfTexture extends GltfChildOfRootProperty {\r\n /** The Id of the [[GltfSampler]] used by this texture.\r\n * If undefined, a sampler with repeat wrapping and auto filtering should be used by default.\r\n */\r\n sampler?: GltfId;\r\n /** The Id of the [[GltfImage]] used by this texture.\r\n * If undefined, an extension or other mechanism should supply an alternate image source - otherwise, the behavior is undefined.\r\n */\r\n source?: GltfId;\r\n}\r\n\r\n/** Describes the filtering and wrapping behavior to be applied to a [[GltfTexture]].\r\n * @note The implementation currently does not support MirroredRepeat and does not support different wrapping for U and V;\r\n * effectively, unless `wrapS` or `wrapT` is set to ClampToEdge, the sampler will use GltfWrapMode.Repeat.\r\n * @internal\r\n */\r\nexport interface GltfSampler extends GltfChildOfRootProperty {\r\n /** Magnification filter. */\r\n magFilter?: GltfMagFilter;\r\n /** Minification filter. */\r\n minFilter?: GltfMinFilter;\r\n /** S (U) wrapping mode. Default: Repeat. */\r\n wrapS?: GltfWrapMode;\r\n /** T (V) wrapping mode. Default: Repeat. */\r\n wrapT?: GltfWrapMode;\r\n}\r\n\r\n/** GL states that can be enabled by a [[GltfTechnique]]. Only those queried by this implementation are enumerated.\r\n * @internal\r\n */\r\nexport enum GltfTechniqueState {\r\n /** Enables alpha blending. */\r\n Blend = 3042,\r\n}\r\n\r\n/** For glTF 1.0 only, describes shader programs and shader state associated with a [[Gltf1Material]], used to render meshes associated with the material.\r\n * This implementation uses it strictly to identify techniques that require alpha blending.\r\n * @internal\r\n */\r\nexport interface GltfTechnique extends GltfChildOfRootProperty {\r\n /** GL render states to be applied by the technique. */\r\n states?: {\r\n /** An array of integers corresponding to boolean GL states that should be enabled using GL's `enable` function.\r\n * For example, the value [[GltfTechniqueState.Blend]] (3042) indicates that blending should be enabled.\r\n */\r\n enable?: GltfTechniqueState[];\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport interface Gltf1Material extends GltfChildOfRootProperty {\r\n diffuse?: string;\r\n emission?: number[];\r\n shininess?: number;\r\n specular?: number[];\r\n technique?: GltfId;\r\n values?: {\r\n texStep?: number[];\r\n color?: number[];\r\n tex?: number | string;\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfMaterialPbrMetallicRoughness extends GltfProperty {\r\n // Default [1,1,1,1]\r\n baseColorFactor?: number[];\r\n baseColorTexture?: GltfTextureInfo;\r\n // Default 1\r\n metallicFactor?: number;\r\n // Default 1\r\n roughnessFactor?: number;\r\n metallicRoughnessTexture?: GltfTextureInfo;\r\n}\r\n\r\n/** @internal */\r\nexport type GltfAlphaMode = \"OPAQUE\" | \"MASK\" | \"BLEND\";\r\n\r\n/** @internal */\r\nexport interface Gltf2Material extends GltfChildOfRootProperty {\r\n pbrMetallicRoughness?: GltfMaterialPbrMetallicRoughness;\r\n normalTexture?: GltfTextureInfo;\r\n occlusionTexture?: unknown;\r\n emissiveTexture?: GltfTextureInfo;\r\n emissiveFactor?: number[];\r\n // Default OPAQUE\r\n alphaMode?: GltfAlphaMode;\r\n // Default 0.5. Ignored unless alphaMode=MASK\r\n alphaCutoff?: number;\r\n doubleSided?: boolean;\r\n extensions?: GltfExtensions & {\r\n /** The [KHR_materials_unlit](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_unlit) extension\r\n * indicates that the material should be displayed without lighting. The extension adds no additional properties; it is effectively a boolean flag.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_materials_unlit?: { };\r\n /** The [KHR_techniques_webgl extension](https://github.com/KhronosGroup/glTF/blob/c1c12bd100e88ff468ccef1cb88cfbec56a69af2/extensions/2.0/Khronos/KHR_techniques_webgl/README.md)\r\n * allows \"techniques\" to be associated with [[GltfMaterial]]s. Techniques can supply custom shader programs to render geometry; this was a core feature of glTF 1.0 (see [[GltfTechnique]]).\r\n * Here, it is only used to extract uniform values.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_techniques_webgl?: {\r\n technique?: number;\r\n // An object containing uniform values. Each property name corresponds to a uniform in the material's technique and must conform to that uniform's type and count properties.\r\n // A handful of uniforms referenced in this implementation by name are defined below.\r\n values?: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n u_texStep?: number[];\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n u_color?: number[];\r\n // Diffuse texture.\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n u_diffuse?: { index: number, texCoord: number };\r\n [k: string]: unknown | undefined;\r\n };\r\n };\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport type GltfMaterial = Gltf1Material | Gltf2Material;\r\n\r\n/** @internal */\r\nexport function isGltf1Material(material: GltfMaterial): material is Gltf1Material {\r\n const mat1 = material as Gltf1Material;\r\n return undefined !== mat1.technique || undefined !== mat1.values;\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfBuffer extends GltfChildOfRootProperty {\r\n uri?: string;\r\n byteLength?: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfBufferViewProps extends GltfChildOfRootProperty {\r\n buffer: GltfId;\r\n byteLength?: number;\r\n byteOffset?: number;\r\n byteStride?: number;\r\n target?: GltfBufferTarget;\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfAccessor extends GltfChildOfRootProperty {\r\n bufferView?: GltfId;\r\n byteOffset?: number;\r\n componentType?: GltfDataType.SignedByte | GltfDataType.UnsignedByte | GltfDataType.SignedShort | GltfDataType.UnsignedShort | GltfDataType.UInt32 | GltfDataType.Float;\r\n normalized?: boolean;\r\n count: number;\r\n type: \"SCALAR\" | \"VEC2\" | \"VEC3\" | \"VEC4\" | \"MAT2\" | \"MAT3\" | \"MAT4\";\r\n max?: number[];\r\n min?: number[];\r\n sparse?: unknown; // ###TODO sparse accessors\r\n extensions?: GltfExtensions & {\r\n /** Quantized attributes for glTF 1.0. Superceded by KHR_mesh_quantization. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n WEB3D_quantized_attributes?: {\r\n decodedMin: number[];\r\n decodedMax: number[];\r\n /** Currently ignored. */\r\n decodeMatrix: number[];\r\n };\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport namespace GltfStructuralMetadata {\r\n export type ClassPropertyType = \"SCALAR\" | \"STRING\" | \"BOOLEAN\" | \"ENUM\" | \"VEC2\" | \"VEC3\" | \"VEC4\" | \"MAT2\" | \"MAT3\" | \"MAT4\" | string;\r\n export type ClassPropertyComponentType = \"INT8\" | \"UINT8\" | \"INT16\" | \"UINT16\" | \"INT32\" | \"UINT32\" | \"INT64\" | \"UINT64\" | \"FLOAT32\" | \"FLOAT64\" | string;\r\n\r\n // Ignoring VECN and MATN types because they complicate offset, scale, min, and max, all of which are otherwise only relevant to SCALAR in which case they're all just numbers.\r\n export interface ClassProperty extends GltfProperty {\r\n type: ClassPropertyType;\r\n name?: string;\r\n description?: string;\r\n componentType?: ClassPropertyComponentType;\r\n enumType?: string;\r\n array?: boolean;\r\n count?: number;\r\n normalized?: boolean;\r\n offset?: number;\r\n scale?: number;\r\n min?: number;\r\n max?: number;\r\n required?: boolean;\r\n noData?: unknown;\r\n default?: unknown;\r\n semantic?: string;\r\n }\r\n\r\n export interface EnumValue extends GltfProperty {\r\n name: string;\r\n value: number; // an integer\r\n description?: string;\r\n }\r\n\r\n export interface Enum extends GltfProperty {\r\n values: EnumValue[];\r\n // Default: UINT16\r\n valueType?: \"INT8\" | \"UINT8\" | \"INT16\" | \"UINT16\" | \"INT32\" | \"UINT32\" | \"INT64\" | \"UINT64\" | string;\r\n name?: string;\r\n description?: string;\r\n }\r\n\r\n export interface Class extends GltfProperty {\r\n name?: string;\r\n description?: string;\r\n properties?: {\r\n [propertyId: string]: ClassProperty | undefined;\r\n };\r\n }\r\n\r\n export interface Schema extends GltfProperty {\r\n id: string;\r\n name?: string;\r\n description?: string;\r\n version?: string;\r\n classes?: Class[];\r\n enums?: Enum[];\r\n }\r\n\r\n // Ignoring VECN and MATN types because they complicate offset, scale, min, and max, all of which are otherwise only relevant to SCALAR in which case they're all just numbers.\r\n export interface PropertyTableProperty extends GltfProperty {\r\n values: GltfId;\r\n arrayOffsets?: GltfId;\r\n stringOffsets?: GltfId;\r\n arrayOffsetType?: \"UINT8\" | \"UINT16\" | \"UINT32\" | \"UINT64\" | string;\r\n stringOffsetType?: \"UINT8\" | \"UINT16\" | \"UINT32\" | \"UINT64\" | string;\r\n offset?: number;\r\n scale?: number;\r\n min?: number;\r\n max?: number;\r\n }\r\n\r\n export interface PropertyTable {\r\n class: string;\r\n count: number;\r\n properties?: {\r\n [propertyId: string]: PropertyTableProperty | undefined;\r\n };\r\n }\r\n\r\n export interface Extension extends GltfProperty {\r\n // Exactly one of schema or schemaUri must be present.\r\n schemaUri?: string;\r\n schema?: Schema;\r\n propertyTables?: PropertyTable[];\r\n propertyTextures?: unknown;\r\n propertyAttributes?: unknown;\r\n }\r\n}\r\n\r\n/** Describes the top-level structure of a glTF asset.\r\n * This interface, along with all of the related Gltf* types defined in this file, is primarily based upon the [official glTF 2.0 specification](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html).\r\n * However, it can also represent a [glTF 1.0](https://github.com/KhronosGroup/glTF/tree/main/specification/1.0#reference-node) asset.\r\n * Some types are combined. For example, the top-level dictionaries in glTF 1.0 are objects, while in glTF 2.0 they are arrays; the GltfDictionary interface supports accessing\r\n * items using either strings or numeric indexes represented by [[GltfId]].\r\n * For types that differ significantly between the two specs, Gltf1* and Gltf2* versions are defined (e.g., GltfMaterial is a union of Gltf1Material and Gltf2Material).\r\n * These interfaces also accommodate some deviations from both specs that are known to exist in the wild.\r\n * Most aspects of the specifications that are not implemented here are omitted (e.g., skinning, animations).\r\n * @internal\r\n */\r\nexport interface GltfDocument extends GltfProperty {\r\n /** Metadata about the glTF asset.\r\n * @note This property is required in glTF 2.0, but optional in 1.0.\r\n */\r\n asset?: GltfAsset;\r\n /** The Id of the default [[GltfScene]] in [[scenes]]. */\r\n scene?: GltfId;\r\n extensions?: GltfExtensions & {\r\n /** The [CESIUM_RTC extension](https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/CESIUM_RTC/README.md) defines a centroid\r\n * relative to which all coordinates in the asset are defined, to reduce floating-point precision errors for large coordinates.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n CESIUM_RTC?: {\r\n center?: number[];\r\n };\r\n /** The [KHR_techniques_webgl extension](https://github.com/KhronosGroup/glTF/blob/c1c12bd100e88ff468ccef1cb88cfbec56a69af2/extensions/2.0/Khronos/KHR_techniques_webgl/README.md)\r\n * allows \"techniques\" to be associated with [[GltfMaterial]]s. Techniques can supply custom shader programs to render geometry; this was a core feature of glTF 1.0 (see [[GltfTechnique]]).\r\n * Here, it is only used to extract uniform values.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_techniques_webgl?: {\r\n techniques?: Array<{\r\n uniforms?: {\r\n [key: string]: { type: GltfDataType, value?: any } | undefined;\r\n };\r\n }>;\r\n };\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n EXT_structural_metadata?: GltfStructuralMetadata.Extension;\r\n };\r\n /** Names of glTF extensions used in the asset. */\r\n extensionsUsed?: string[];\r\n /** Names of glTF extensions required to properly load the asset. */\r\n extensionsRequired?: string[];\r\n accessors?: GltfDictionary<GltfAccessor>;\r\n /** Not currently supported. */\r\n animations?: GltfDictionary<any>;\r\n buffers?: GltfDictionary<GltfBuffer>;\r\n bufferViews?: GltfDictionary<GltfBufferViewProps>;\r\n /** Not currently used. */\r\n cameras?: GltfDictionary<any>;\r\n images?: GltfDictionary<GltfImage>;\r\n materials?: GltfDictionary<GltfMaterial>;\r\n meshes?: GltfDictionary<GltfMesh>;\r\n nodes?: GltfDictionary<GltfNode>;\r\n samplers?: GltfDictionary<GltfSampler>;\r\n scenes?: GltfDictionary<GltfScene>;\r\n /** Not currently supported. */\r\n skins?: GltfDictionary<any>;\r\n textures?: GltfDictionary<GltfTexture>;\r\n /** For glTF 1.0 only, techniques associated with [[Gltf1Material]]s. */\r\n techniques?: GltfDictionary<GltfTechnique>;\r\n}\r\n"]}
1
+ {"version":3,"file":"GltfSchema.js","sourceRoot":"","sources":["../../../../src/common/gltf/GltfSchema.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,iDAAS,CAAA;IACT,yDAAa,CAAA;IACb,yDAAa,CAAA;IACb,+BAA+B;IAC/B,iEAAiB,CAAA;IACjB,+BAA+B;IAC/B,6DAAe,CAAA;AACjB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,YAiBX;AAjBD,WAAY,YAAY;IACtB,8DAAmB,CAAA;IACnB,kEAAqB,CAAA;IACrB,gEAAkB,CAAA;IAClB,oEAAoB,CAAA;IACpB,sDAAa,CAAA;IACb,oDAAY,CAAA;IACZ,gDAAU,CAAA;IACV,kDAAW,CAAA;IACX,yDAAgB,CAAA;IAChB,yDAAgB,C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,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM,CAAC;AACnE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\n/** Enumerates the types of [[GltfMeshPrimitive]] topologies.\r\n * @internal\r\n */\r\nexport enum GltfMeshMode {\r\n Points = 0,\r\n Lines = 1,\r\n LineStrip = 3,\r\n Triangles = 4,\r\n /** Not currently supported. */\r\n TriangleStrip = 5,\r\n /** Not currently supported. */\r\n TriangleFan = 6,\r\n}\r\n\r\n/** Enumerates the basic data types supported by accessors, material values, technique uniforms, etc.\r\n * @internal\r\n */\r\nexport enum GltfDataType {\r\n SignedByte = 0x1400,\r\n UnsignedByte = 0x1401,\r\n SignedShort = 5122,\r\n UnsignedShort = 5123,\r\n UInt32 = 5125,\r\n Float = 5126,\r\n Rgb = 6407,\r\n Rgba = 6408,\r\n IntVec2 = 0x8b53,\r\n IntVec3 = 0x8b54,\r\n FloatVec2 = 35664,\r\n FloatVec3 = 35665,\r\n FloatVec4 = 35666,\r\n FloatMat3 = 35675,\r\n FloatMat4 = 35676,\r\n Sampler2d = 35678,\r\n}\r\n\r\n/** @internal */\r\nexport enum GltfMagFilter {\r\n Nearest = 9728,\r\n Linear = 9729,\r\n}\r\n\r\n/** @internal */\r\nexport enum GltfMinFilter {\r\n Nearest = GltfMagFilter.Nearest,\r\n Linear = GltfMagFilter.Linear,\r\n NearestMipMapNearest = 9984,\r\n LinearMipMapNearest = 9985,\r\n NearestMipMapLinear = 9986,\r\n LinearMipMapLinear = 9987,\r\n}\r\n\r\n/** Describes how texture coordinates outside of the range [0..1] are handled.\r\n * @internal\r\n */\r\nexport enum GltfWrapMode {\r\n ClampToEdge = 33071,\r\n MirroredRepeat = 33648,\r\n Repeat = 10497,\r\n}\r\n\r\n/** Describes the intended target of a [[GltfBufferViewProps]].\r\n * @internal\r\n */\r\nexport enum GltfBufferTarget {\r\n ArrayBuffer = 34962,\r\n ElementArrayBuffer = 24963,\r\n}\r\n\r\n/** The type used to refer to an entry in a GltfDictionary in a glTF 1.0 asset. @internal */\r\nexport type Gltf1Id = string;\r\n/** The type used to refer to an entry in a GltfDictionary in a glTF 2.0 asset. @internal */\r\nexport type Gltf2Id = number;\r\n/** The type used to refer to an entry in a GltfDictionary. @internal */\r\nexport type GltfId = Gltf1Id | Gltf2Id;\r\n\r\n/** A collection of resources of some type defined at the top-level of a [[GltfDocument]].\r\n * In glTF 1.0, these are defined as objects; each resource is referenced and accessed by its string key.\r\n * In glTF 2.0, these are defined as arrays; each resource is referenced and accessed by its integer array index.\r\n * @internal\r\n */\r\nexport interface GltfDictionary<T extends GltfChildOfRootProperty> {\r\n [key: GltfId]: T | undefined;\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfStringMap<T> {\r\n [key: string]: T | undefined;\r\n}\r\n\r\n/** Iterate the contents of a [[GltfDictionary]].\r\n * @internal\r\n */\r\nexport function * gltfDictionaryIterator<T extends GltfChildOfRootProperty>(dict: GltfDictionary<T>): Iterable<T> {\r\n if (Array.isArray(dict)) {\r\n for (const elem of dict)\r\n yield elem;\r\n } else {\r\n for (const key of Object.keys(dict)) {\r\n const value = dict[key];\r\n if (undefined !== value)\r\n yield value;\r\n }\r\n }\r\n}\r\n\r\n/** Optional extensions applied to a [[GltfProperty]] to enable behavior not defined in the core specification.\r\n * @internal\r\n */\r\nexport type GltfExtensions = GltfStringMap<unknown>;\r\n\r\n/** The base interface provided by most objects in a glTF asset, permitting additional data to be associated with the object.\r\n * @internal\r\n */\r\nexport interface GltfProperty {\r\n extensions?: GltfExtensions;\r\n extras?: any;\r\n}\r\n\r\n/** The base interface provided by top-level properties of a [[GltfDocument]].\r\n * @internal\r\n */\r\nexport interface GltfChildOfRootProperty extends GltfProperty {\r\n /** Optional name, strictly for human consumption. */\r\n name?: string;\r\n}\r\n\r\n/** @internal */\r\nexport interface DracoMeshCompression {\r\n bufferView: GltfId;\r\n // TEXCOORD_0, POSITION, etc\r\n attributes: GltfStringMap<number>;\r\n}\r\n\r\n/** @internal */\r\nexport interface MeshFeature extends GltfProperty {\r\n featureCount: number;\r\n nullFeatureId?: number;\r\n label?: string;\r\n propertyTable?: number;\r\n texture?: unknown;\r\n attribute?: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface MeshFeatures {\r\n featureIds: MeshFeature[];\r\n}\r\n\r\n/** A unit of geometry belonging to a [[GltfMesh]]. @internal */\r\nexport interface GltfMeshPrimitive extends GltfProperty {\r\n /** Maps the name of each mesh attribute semantic to the Id of the [[GltfAccessor]] providing the attribute's data. */\r\n attributes: GltfStringMap<GltfId>;\r\n /** The Id of the [[GltfAccessor]] providing the vertex indices. */\r\n indices?: GltfId;\r\n /** The Id of the [[GltfMaterial]] to apply to the primitive when rendering. */\r\n material?: GltfId;\r\n /** The primitive topology type. */\r\n mode?: GltfMeshMode;\r\n /** Morph targets - currently unsupported. */\r\n targets?: GltfStringMap<GltfId>;\r\n extensions?: GltfExtensions & {\r\n /** The [CESIUM_primitive_outline](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline) extension\r\n * describes how to draw outline edges for a triangle mesh.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n CESIUM_primitive_outline?: {\r\n /** The Id of the [[GltfBufferViewProps]] supplying the endpoints of each edge as indices into the triangle mesh's vertex array.\r\n * The number of indices must be even; each consecutive pair of indices describes one line segment. No connectivity between\r\n * line segments is implied.\r\n */\r\n indices?: GltfId;\r\n };\r\n /** The [KHR_draco_mesh_compression](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md) extension\r\n * allows glTF to support geometry compressed with Draco geometry compression.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_draco_mesh_compression?: DracoMeshCompression;\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n EXT_mesh_features?: MeshFeatures;\r\n };\r\n}\r\n\r\n/** A collection of [[GltfMeshPrimitive]]s to be rendered. Each mesh is referenced by a node. Multiple nodes can refer to the same mesh.\r\n * The node's transform is applied when rendering the mesh.\r\n * @internal\r\n */\r\nexport interface GltfMesh extends GltfChildOfRootProperty {\r\n /** The collection of primitives to be rendered. */\r\n primitives?: GltfMeshPrimitive[];\r\n /** For morph targets - currently unsupported. */\r\n weights?: number[];\r\n}\r\n\r\n/** Properties common to [[Gltf1Node]] and [[Gltf2Node]]. @internal */\r\nexport interface GltfNodeBaseProps {\r\n /** The Ids of the child nodes. @see [[GltfNode]]. */\r\n children?: GltfId[];\r\n /** Currently ignored. */\r\n camera?: GltfId;\r\n /** Currently ignored. */\r\n skin?: GltfId;\r\n /** A 4x4 column-major transformation matrix. Mutually exclusive with [[rotation]], [[scale]], and [[translation]]. */\r\n matrix?: number[];\r\n /** Unit quaternion as [x, y, z, w], where w is the scalar. */\r\n rotation?: [number, number, number, number];\r\n /** Non-uniform scale as [x, y, z]. */\r\n scale?: [number, number, number];\r\n /** Translation as [x, y, z]. */\r\n translation?: [number, number, number];\r\n}\r\n\r\n/** glTF 1.0 representation of a [[GltfNode]]. Unlike a [[Gltf2Node]], a Gltf1Node may refer to any number of [[GltfMesh]]es.\r\n * @internal\r\n */\r\nexport interface Gltf1Node extends GltfChildOfRootProperty, GltfNodeBaseProps {\r\n /** The Ids of the [[GltfMesh]]es to be rendered by this node.\r\n * @note The spec defines this as an array of strings, but the original implementation of [[GltfReader]] was written to treat it as a string instead.\r\n * In case this was because of non-spec-compliant glTF that placed a string here instead of an array, either is permitted.\r\n */\r\n meshes?: GltfId[] | string;\r\n mesh?: never;\r\n /** Currently ignored. */\r\n jointName?: GltfId;\r\n /** Currently ignored. */\r\n skeletons?: GltfId[];\r\n}\r\n\r\n/** glTF 2.0 representation of a [[GltfNode]]. Unlike a [[Gltf1Node]], a Gltf2Node may refer to at most one [[GltfMesh]].\r\n * @internal\r\n */\r\nexport interface Gltf2Node extends GltfChildOfRootProperty, GltfNodeBaseProps {\r\n /** The Id of the [[GltfMesh]] to be rendered by this node. */\r\n mesh?: GltfId;\r\n meshes?: never;\r\n /** Morph targets - currently ignored. */\r\n weights?: number[];\r\n extensions?: GltfExtensions & {\r\n /** The [EXT_mesh_gpu_instancing](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md) extension permits multiple\r\n * instances of the same mesh to be rendered with different translation, rotation, and/or scale.\r\n * All of the attribute accessors must have the same count (which indicates the number of instances to be drawn).\r\n * All attributes are optional (though omitting all of them would be silly).\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n EXT_mesh_gpu_instancing?: {\r\n attributes?: {\r\n /** VEC3; FLOAT */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n TRANSLATION?: GltfId;\r\n /** VEC4 (quaternion); FLOAT, normalized BYTE, or normalized SHORT */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n ROTATION?: GltfId;\r\n /** VEC3; FLOAT */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n SCALE?: GltfId;\r\n };\r\n };\r\n };\r\n}\r\n\r\n/** Describes a node in a [[GltfScene]]. Each node may be associated with zero, one (glTF 2.0), or any number of (glTF 1.0) [[GltfMesh]]es.\r\n * Each node may define a transform. Each node may have any number of child nodes. A child node's transform is multiplied by its parent node's transform.\r\n * Some nodes may be associated with other types of data like cameras, skins, lights, etc - these types of data are currently unsupported.\r\n * Rendering a node means rendering its meshes and the meshes of all of its descendants, with transforms applied.\r\n * @internal\r\n */\r\nexport type GltfNode = Gltf1Node | Gltf2Node;\r\n\r\n/** Get the Ids of the meshes associated with a node.\r\n * @internal\r\n */\r\nexport function getGltfNodeMeshIds(node: GltfNode): GltfId[] {\r\n if (undefined !== node.meshes)\r\n return typeof node.meshes === \"string\" ? [node.meshes] : node.meshes;\r\n else if (undefined !== node.mesh)\r\n return [node.mesh];\r\n\r\n return [];\r\n}\r\n\r\n/** @internal */\r\nexport function * traverseGltfNodes(ids: Iterable<GltfId>, nodes: GltfDictionary<GltfNode>, traversed: Set<GltfId>): Iterable<GltfNode> {\r\n for (const id of ids) {\r\n if (traversed.has(id))\r\n throw new Error(\"Cycle detected while traversing glTF nodes\");\r\n\r\n const node = nodes[id];\r\n if (!node)\r\n continue;\r\n\r\n traversed.add(id);\r\n yield node;\r\n if (node.children)\r\n for (const child of traverseGltfNodes(node.children, nodes, traversed))\r\n yield child;\r\n }\r\n}\r\n\r\n/** Describes a scene graph that composes any number of [[GltfNode]]s to produce a rendering of the [[GltfDocument]] asset.\r\n * An asset may define any number of scenes; the default scene is specified by [[Gltf.scene]].\r\n * @internal\r\n */\r\nexport interface GltfScene extends GltfChildOfRootProperty {\r\n /** The Ids of the nodes comprising the scene graph. */\r\n nodes?: GltfId[];\r\n}\r\n\r\n/** Provides metadata about a [[GltfDocument]] asset.\r\n * @internal\r\n */\r\nexport interface GltfAsset extends GltfProperty {\r\n /** A copyright message suitable for display to credit the content creator. */\r\n copyright?: string;\r\n /** The name of the tool that generated the asset. */\r\n generator?: string;\r\n /** The glTF version targeted by the asset, in the form \"major.minor\" where \"major\" and \"minor\" are integers. */\r\n version: string;\r\n /** The minimum glTF version required to properly load this asset, in the same form as [[version]].\r\n * This minimum version must be no greater than [[version]].\r\n */\r\n minVersion?: string;\r\n}\r\n\r\n/** Describes an image such as one used for a [[GltfTexture]]. The image may be referenced by a [[uri]] or a [[bufferView]].\r\n * @internal\r\n */\r\nexport interface GltfImage extends GltfChildOfRootProperty {\r\n /** URI from which the image data can be obtained, either as a base-64-encoded data URI or an external resource.\r\n * Mutually exclusive with [[bufferView]].\r\n */\r\n uri?: string;\r\n /** The image's media type. This property is required if [[bufferView]] is defined. */\r\n mimeType?: \"image/jpeg\" | \"image/png\";\r\n /** The Id of the [[GltfBufferViewProps]] containing the image data. Mutually exclusive with [[uri]]. */\r\n bufferView?: GltfId;\r\n extensions?: GltfExtensions & {\r\n /** The [KHR_binary_glTF](https://github.com/KhronosGroup/glTF/tree/main/extensions/1.0/Khronos/KHR_binary_glTF) allows an image to\r\n * be embedded in a binary chunk appended to the glTF asset's JSON, instead of being referenced by an external URI.\r\n * This is superseded in glTF 2.0 by support for the glb file format specification.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_binary_glTF?: {\r\n /** The Id of the [[GltfBufferViewProps]] that contains the binary image data. */\r\n bufferView?: GltfId;\r\n /** Required - @see [[GltfImage.mimeType]]. */\r\n mimeType?: string;\r\n };\r\n };\r\n}\r\n\r\n/** Describes a reference to a [[GltfTexture]]. @internal */\r\nexport interface GltfTextureInfo extends GltfProperty {\r\n /** The Id of the [[GltfTexture]]. */\r\n index: GltfId;\r\n /** The set index of the texture's TEXCOORD attribute used for texture coordinate mapping.\r\n * For example, if `texCoord` is `2`, an attribute named `TEXCOORD_2` must exist containing the texture coordinates.\r\n * Default: 0.\r\n */\r\n texCoord?: number;\r\n}\r\n\r\n/** Describes a texture and its sampler.\r\n * @internal\r\n */\r\nexport interface GltfTexture extends GltfChildOfRootProperty {\r\n /** The Id of the [[GltfSampler]] used by this texture.\r\n * If undefined, a sampler with repeat wrapping and auto filtering should be used by default.\r\n */\r\n sampler?: GltfId;\r\n /** The Id of the [[GltfImage]] used by this texture.\r\n * If undefined, an extension or other mechanism should supply an alternate image source - otherwise, the behavior is undefined.\r\n */\r\n source?: GltfId;\r\n}\r\n\r\n/** Describes the filtering and wrapping behavior to be applied to a [[GltfTexture]].\r\n * @note The implementation currently does not support MirroredRepeat and does not support different wrapping for U and V;\r\n * effectively, unless `wrapS` or `wrapT` is set to ClampToEdge, the sampler will use GltfWrapMode.Repeat.\r\n * @internal\r\n */\r\nexport interface GltfSampler extends GltfChildOfRootProperty {\r\n /** Magnification filter. */\r\n magFilter?: GltfMagFilter;\r\n /** Minification filter. */\r\n minFilter?: GltfMinFilter;\r\n /** S (U) wrapping mode. Default: Repeat. */\r\n wrapS?: GltfWrapMode;\r\n /** T (V) wrapping mode. Default: Repeat. */\r\n wrapT?: GltfWrapMode;\r\n}\r\n\r\n/** GL states that can be enabled by a [[GltfTechnique]]. Only those queried by this implementation are enumerated.\r\n * @internal\r\n */\r\nexport enum GltfTechniqueState {\r\n /** Enables alpha blending. */\r\n Blend = 3042,\r\n}\r\n\r\n/** For glTF 1.0 only, describes shader programs and shader state associated with a [[Gltf1Material]], used to render meshes associated with the material.\r\n * This implementation uses it strictly to identify techniques that require alpha blending.\r\n * @internal\r\n */\r\nexport interface GltfTechnique extends GltfChildOfRootProperty {\r\n /** GL render states to be applied by the technique. */\r\n states?: {\r\n /** An array of integers corresponding to boolean GL states that should be enabled using GL's `enable` function.\r\n * For example, the value [[GltfTechniqueState.Blend]] (3042) indicates that blending should be enabled.\r\n */\r\n enable?: GltfTechniqueState[];\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport interface Gltf1Material extends GltfChildOfRootProperty {\r\n diffuse?: string;\r\n emission?: number[];\r\n shininess?: number;\r\n specular?: number[];\r\n technique?: GltfId;\r\n values?: {\r\n texStep?: number[];\r\n color?: number[];\r\n tex?: number | string;\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfMaterialPbrMetallicRoughness extends GltfProperty {\r\n // Default [1,1,1,1]\r\n baseColorFactor?: number[];\r\n baseColorTexture?: GltfTextureInfo;\r\n // Default 1\r\n metallicFactor?: number;\r\n // Default 1\r\n roughnessFactor?: number;\r\n metallicRoughnessTexture?: GltfTextureInfo;\r\n}\r\n\r\n/** @internal */\r\nexport type GltfAlphaMode = \"OPAQUE\" | \"MASK\" | \"BLEND\";\r\n\r\n/** @internal */\r\nexport interface Gltf2Material extends GltfChildOfRootProperty {\r\n pbrMetallicRoughness?: GltfMaterialPbrMetallicRoughness;\r\n normalTexture?: GltfTextureInfo;\r\n occlusionTexture?: unknown;\r\n emissiveTexture?: GltfTextureInfo;\r\n emissiveFactor?: number[];\r\n // Default OPAQUE\r\n alphaMode?: GltfAlphaMode;\r\n // Default 0.5. Ignored unless alphaMode=MASK\r\n alphaCutoff?: number;\r\n doubleSided?: boolean;\r\n extensions?: GltfExtensions & {\r\n /** The [KHR_materials_unlit](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_unlit) extension\r\n * indicates that the material should be displayed without lighting. The extension adds no additional properties; it is effectively a boolean flag.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_materials_unlit?: { };\r\n /** The [KHR_techniques_webgl extension](https://github.com/KhronosGroup/glTF/blob/c1c12bd100e88ff468ccef1cb88cfbec56a69af2/extensions/2.0/Khronos/KHR_techniques_webgl/README.md)\r\n * allows \"techniques\" to be associated with [[GltfMaterial]]s. Techniques can supply custom shader programs to render geometry; this was a core feature of glTF 1.0 (see [[GltfTechnique]]).\r\n * Here, it is only used to extract uniform values.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_techniques_webgl?: {\r\n technique?: number;\r\n // An object containing uniform values. Each property name corresponds to a uniform in the material's technique and must conform to that uniform's type and count properties.\r\n // A handful of uniforms referenced in this implementation by name are defined below.\r\n values?: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n u_texStep?: number[];\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n u_color?: number[];\r\n // Diffuse texture.\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n u_diffuse?: { index: number, texCoord: number };\r\n [k: string]: unknown | undefined;\r\n };\r\n };\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport type GltfMaterial = Gltf1Material | Gltf2Material;\r\n\r\n/** @internal */\r\nexport function isGltf1Material(material: GltfMaterial): material is Gltf1Material {\r\n const mat1 = material as Gltf1Material;\r\n return undefined !== mat1.technique || undefined !== mat1.values;\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfBuffer extends GltfChildOfRootProperty {\r\n uri?: string;\r\n byteLength?: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfBufferViewProps extends GltfChildOfRootProperty {\r\n buffer: GltfId;\r\n byteLength?: number;\r\n byteOffset?: number;\r\n byteStride?: number;\r\n target?: GltfBufferTarget;\r\n}\r\n\r\n/** @internal */\r\nexport interface GltfAccessor extends GltfChildOfRootProperty {\r\n bufferView?: GltfId;\r\n byteOffset?: number;\r\n componentType?: GltfDataType.SignedByte | GltfDataType.UnsignedByte | GltfDataType.SignedShort | GltfDataType.UnsignedShort | GltfDataType.UInt32 | GltfDataType.Float;\r\n normalized?: boolean;\r\n count: number;\r\n type: \"SCALAR\" | \"VEC2\" | \"VEC3\" | \"VEC4\" | \"MAT2\" | \"MAT3\" | \"MAT4\";\r\n max?: number[];\r\n min?: number[];\r\n sparse?: unknown; // ###TODO sparse accessors\r\n extensions?: GltfExtensions & {\r\n /** Quantized attributes for glTF 1.0. Superceded by KHR_mesh_quantization. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n WEB3D_quantized_attributes?: {\r\n decodedMin: number[];\r\n decodedMax: number[];\r\n /** Currently ignored. */\r\n decodeMatrix: number[];\r\n };\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport namespace GltfStructuralMetadata {\r\n export type ClassPropertyType = \"SCALAR\" | \"STRING\" | \"BOOLEAN\" | \"ENUM\" | \"VEC2\" | \"VEC3\" | \"VEC4\" | \"MAT2\" | \"MAT3\" | \"MAT4\" | string;\r\n export type ClassPropertyComponentType = \"INT8\" | \"UINT8\" | \"INT16\" | \"UINT16\" | \"INT32\" | \"UINT32\" | \"INT64\" | \"UINT64\" | \"FLOAT32\" | \"FLOAT64\" | string;\r\n\r\n // Ignoring VECN and MATN types because they complicate offset, scale, min, and max, all of which are otherwise only relevant to SCALAR in which case they're all just numbers.\r\n export interface ClassProperty extends GltfProperty {\r\n type: ClassPropertyType;\r\n name?: string;\r\n description?: string;\r\n componentType?: ClassPropertyComponentType;\r\n enumType?: string;\r\n array?: boolean;\r\n count?: number;\r\n normalized?: boolean;\r\n offset?: number;\r\n scale?: number;\r\n min?: number;\r\n max?: number;\r\n required?: boolean;\r\n noData?: unknown;\r\n default?: unknown;\r\n semantic?: string;\r\n }\r\n\r\n export interface EnumValue extends GltfProperty {\r\n name: string;\r\n value: number; // an integer\r\n description?: string;\r\n }\r\n\r\n export interface Enum extends GltfProperty {\r\n values: EnumValue[];\r\n // Default: UINT16\r\n valueType?: \"INT8\" | \"UINT8\" | \"INT16\" | \"UINT16\" | \"INT32\" | \"UINT32\" | \"INT64\" | \"UINT64\" | string;\r\n name?: string;\r\n description?: string;\r\n }\r\n\r\n export interface Class extends GltfProperty {\r\n name?: string;\r\n description?: string;\r\n properties?: {\r\n [propertyId: string]: ClassProperty | undefined;\r\n };\r\n }\r\n\r\n export interface Schema extends GltfProperty {\r\n id: string;\r\n name?: string;\r\n description?: string;\r\n version?: string;\r\n classes?: Class[];\r\n enums?: Enum[];\r\n }\r\n\r\n // Ignoring VECN and MATN types because they complicate offset, scale, min, and max, all of which are otherwise only relevant to SCALAR in which case they're all just numbers.\r\n export interface PropertyTableProperty extends GltfProperty {\r\n values: GltfId;\r\n arrayOffsets?: GltfId;\r\n stringOffsets?: GltfId;\r\n arrayOffsetType?: \"UINT8\" | \"UINT16\" | \"UINT32\" | \"UINT64\" | string;\r\n stringOffsetType?: \"UINT8\" | \"UINT16\" | \"UINT32\" | \"UINT64\" | string;\r\n offset?: number;\r\n scale?: number;\r\n min?: number;\r\n max?: number;\r\n }\r\n\r\n export interface PropertyTable {\r\n class: string;\r\n count: number;\r\n properties?: {\r\n [propertyId: string]: PropertyTableProperty | undefined;\r\n };\r\n }\r\n\r\n export interface Extension extends GltfProperty {\r\n // Exactly one of schema or schemaUri must be present.\r\n schemaUri?: string;\r\n schema?: Schema;\r\n propertyTables?: PropertyTable[];\r\n propertyTextures?: unknown;\r\n propertyAttributes?: unknown;\r\n }\r\n}\r\n\r\n/** Describes the top-level structure of a glTF asset.\r\n * This interface, along with all of the related Gltf* types defined in this file, is primarily based upon the [official glTF 2.0 specification](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html).\r\n * However, it can also represent a [glTF 1.0](https://github.com/KhronosGroup/glTF/tree/main/specification/1.0#reference-node) asset.\r\n * Some types are combined. For example, the top-level dictionaries in glTF 1.0 are objects, while in glTF 2.0 they are arrays; the GltfDictionary interface supports accessing\r\n * items using either strings or numeric indexes represented by [[GltfId]].\r\n * For types that differ significantly between the two specs, Gltf1* and Gltf2* versions are defined (e.g., GltfMaterial is a union of Gltf1Material and Gltf2Material).\r\n * These interfaces also accommodate some deviations from both specs that are known to exist in the wild.\r\n * Most aspects of the specifications that are not implemented here are omitted (e.g., skinning, animations).\r\n * @internal\r\n */\r\nexport interface GltfDocument extends GltfProperty {\r\n /** Metadata about the glTF asset.\r\n * @note This property is required in glTF 2.0, but optional in 1.0.\r\n */\r\n asset?: GltfAsset;\r\n /** The Id of the default [[GltfScene]] in [[scenes]]. */\r\n scene?: GltfId;\r\n extensions?: GltfExtensions & {\r\n /** The [CESIUM_RTC extension](https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/CESIUM_RTC/README.md) defines a centroid\r\n * relative to which all coordinates in the asset are defined, to reduce floating-point precision errors for large coordinates.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n CESIUM_RTC?: {\r\n center?: number[];\r\n };\r\n /** The [KHR_techniques_webgl extension](https://github.com/KhronosGroup/glTF/blob/c1c12bd100e88ff468ccef1cb88cfbec56a69af2/extensions/2.0/Khronos/KHR_techniques_webgl/README.md)\r\n * allows \"techniques\" to be associated with [[GltfMaterial]]s. Techniques can supply custom shader programs to render geometry; this was a core feature of glTF 1.0 (see [[GltfTechnique]]).\r\n * Here, it is only used to extract uniform values.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n KHR_techniques_webgl?: {\r\n techniques?: Array<{\r\n uniforms?: {\r\n [key: string]: { type: GltfDataType, value?: any } | undefined;\r\n };\r\n }>;\r\n };\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n EXT_structural_metadata?: GltfStructuralMetadata.Extension;\r\n };\r\n /** Names of glTF extensions used in the asset. */\r\n extensionsUsed?: string[];\r\n /** Names of glTF extensions required to properly load the asset. */\r\n extensionsRequired?: string[];\r\n accessors?: GltfDictionary<GltfAccessor>;\r\n /** Not currently supported. */\r\n animations?: GltfDictionary<any>;\r\n buffers?: GltfDictionary<GltfBuffer>;\r\n bufferViews?: GltfDictionary<GltfBufferViewProps>;\r\n /** Not currently used. */\r\n cameras?: GltfDictionary<any>;\r\n images?: GltfDictionary<GltfImage>;\r\n materials?: GltfDictionary<GltfMaterial>;\r\n meshes?: GltfDictionary<GltfMesh>;\r\n nodes?: GltfDictionary<GltfNode>;\r\n samplers?: GltfDictionary<GltfSampler>;\r\n scenes?: GltfDictionary<GltfScene>;\r\n /** Not currently supported. */\r\n skins?: GltfDictionary<any>;\r\n textures?: GltfDictionary<GltfTexture>;\r\n /** For glTF 1.0 only, techniques associated with [[Gltf1Material]]s. */\r\n techniques?: GltfDictionary<GltfTechnique>;\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Tiles
3
3
  */
4
4
  import { Point3d, Range2d, Range3d, Transform, Vector3d } from "@itwin/core-geometry";
5
- import { AxisAlignedBox3d, BatchType, ElementAlignedBox3d, Feature, FeatureTable, MeshPolylineList, QParams2d, QParams3d, RenderTexture, TextureMapping, TileReadStatus } from "@itwin/core-common";
5
+ import { AxisAlignedBox3d, BatchType, ElementAlignedBox3d, Feature, FeatureTable, MeshPolylineList, QParams2d, QParams3d, RenderTexture, TextureMapping, TileReadStatus, ViewFlagOverrides } from "@itwin/core-common";
6
6
  import { IModelConnection } from "../IModelConnection";
7
7
  import { PickableGraphicOptions } from "../render/GraphicBuilder";
8
8
  import { InstancedGraphicParams } from "../render/InstancedGraphicParams";
@@ -175,10 +175,12 @@ export declare abstract class GltfReader {
175
175
  * @throws Error if a node appears more than once during traversal
176
176
  */
177
177
  traverseScene(): Iterable<GltfNode>;
178
+ protected get viewFlagOverrides(): ViewFlagOverrides | undefined;
178
179
  private getTileTransform;
179
180
  protected readGltfAndCreateGraphics(isLeaf: boolean, featureTable: FeatureTable | undefined, contentRange: ElementAlignedBox3d | undefined, transformToRoot?: Transform, pseudoRtcBias?: Vector3d, instances?: InstancedGraphicParams): GltfReaderResult;
180
181
  readGltfAndCreateGeometry(transformToRoot?: Transform, needNormals?: boolean, needParams?: boolean): RealityTileGeometry;
181
182
  private graphicFromMeshData;
183
+ private readInstanceAttributes;
182
184
  private readNodeAndCreateGraphics;
183
185
  private readNodeAndCreatePolyfaces;
184
186
  private polyfaceFromGltfMesh;
@@ -327,6 +329,7 @@ export declare class GltfGraphicsReader extends GltfReader {
327
329
  private readonly _isLeaf;
328
330
  readonly binaryData?: Uint8Array;
329
331
  constructor(props: GltfReaderProps, args: ReadGltfGraphicsArgs);
332
+ protected get viewFlagOverrides(): ViewFlagOverrides;
330
333
  read(): Promise<GltfReaderResult>;
331
334
  get nodes(): GltfDictionary<GltfNode>;
332
335
  get scenes(): GltfDictionary<GltfScene>;
@@ -1 +1 @@
1
- {"version":3,"file":"GltfReader.d.ts","sourceRoot":"","sources":["../../../src/tile/GltfReader.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EACsC,OAAO,EAAqB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAC7G,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAAE,SAAS,EAAY,mBAAmB,EAAE,OAAO,EAAkC,YAAY,EACxF,gBAAgB,EAAwC,SAAS,EAAE,SAAS,EACzD,aAAa,EAAE,cAAc,EAAmC,cAAc,EAC3H,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,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C,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAGrG;AAED;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAmB3F;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAsB;IACrD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAY;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,SAAgB,UAAU,CAAC,EAAE,UAAU,CAAC;gBAErB,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,oBAAoB;IAmBrE,cAAuB,iBAAiB,IAAI,iBAAiB,CAK5D;IAEY,IAAI,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAK9C,IAAW,KAAK,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAwB;IACpE,IAAW,MAAM,IAAI,cAAc,CAAC,SAAS,CAAC,CAA2C;IACzF,IAAW,UAAU,IAAI,MAAM,EAAE,CAA6B;IAC9D,IAAW,QAAQ,IAAI,cAAc,CAAC,WAAW,CAAC,CAA2B;CAC9E"}
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { assert, ByteStream, compareBooleans, compareNumbers, compareStrings, Dictionary, JsonUtils, Logger, utf8ToString, } from "@itwin/core-bentley";
9
9
  import { Angle, IndexedPolyface, Matrix3d, Point2d, Point3d, Point4d, Range2d, Range3d, Transform, Vector3d, } from "@itwin/core-geometry";
10
- import { BatchType, ColorDef, Feature, FeatureIndex, FeatureIndexType, FeatureTable, FillFlags, GlbHeader, ImageSource, LinePixels, MeshEdge, MeshEdges, MeshPolyline, OctEncodedNormal, PackedFeatureTable, QParams2d, QParams3d, QPoint2dList, QPoint3dList, Quantization, RenderTexture, TextureMapping, TextureTransparency, TileFormat, TileReadStatus, } from "@itwin/core-common";
10
+ import { BatchType, ColorDef, Feature, FeatureIndex, FeatureIndexType, FeatureTable, FillFlags, GlbHeader, ImageSource, LinePixels, MeshEdge, MeshEdges, MeshPolyline, OctEncodedNormal, PackedFeatureTable, QParams2d, QParams3d, QPoint2dList, QPoint3dList, Quantization, RenderMode, RenderTexture, TextureMapping, TextureTransparency, TileFormat, TileReadStatus, } from "@itwin/core-common";
11
11
  import { IModelApp } from "../IModelApp";
12
12
  import { GraphicBranch } from "../render/GraphicBranch";
13
13
  import { RealityMeshParams } from "../render/RealityMeshParams";
@@ -206,6 +206,17 @@ function colorFromMaterial(material, isTransparent) {
206
206
  color = color.withTransparency(0);
207
207
  return color;
208
208
  }
209
+ function trsMatrix(translation, rotation, scale, result) {
210
+ // SPEC: To compose the local transformation matrix, TRS properties MUST be converted to matrices and postmultiplied in the T * R * S order;
211
+ // first the scale is applied to the vertices, then the rotation, and then the translation.
212
+ const scaleTf = Transform.createRefs(undefined, scale ? Matrix3d.createScale(scale[0], scale[1], scale[2]) : Matrix3d.identity);
213
+ const rotTf = Transform.createRefs(undefined, rotation ? Matrix3d.createFromQuaternion(Point4d.create(rotation[0], rotation[1], rotation[2], rotation[3])) : Matrix3d.identity);
214
+ rotTf.matrix.transposeInPlace(); // See comment on Matrix3d.createFromQuaternion
215
+ const transTf = Transform.createTranslation(translation ? new Point3d(translation[0], translation[1], translation[2]) : Point3d.createZero());
216
+ const tf = scaleTf.multiplyTransformTransform(rotTf, result);
217
+ transTf.multiplyTransformTransform(tf, tf);
218
+ return tf;
219
+ }
209
220
  class TransformStack {
210
221
  constructor(transform) {
211
222
  this._stack = [];
@@ -226,14 +237,7 @@ class TransformStack {
226
237
  nodeTransform = Transform.createOriginAndMatrix(origin, matrix);
227
238
  }
228
239
  else if (node.rotation || node.scale || node.translation) {
229
- // SPEC: To compose the local transformation matrix, TRS properties MUST be converted to matrices and postmultiplied in the T * R * S order;
230
- // first the scale is applied to the vertices, then the rotation, and then the translation.
231
- const scale = Transform.createRefs(undefined, node.scale ? Matrix3d.createScale(node.scale[0], node.scale[1], node.scale[2]) : Matrix3d.identity);
232
- const rot = Transform.createRefs(undefined, node.rotation ? Matrix3d.createFromQuaternion(Point4d.create(node.rotation[0], node.rotation[1], node.rotation[2], node.rotation[3])) : Matrix3d.identity);
233
- rot.matrix.transposeInPlace(); // See comment on Matrix3d.createFromQuaternion
234
- const trans = Transform.createTranslation(node.translation ? new Point3d(node.translation[0], node.translation[1], node.translation[2]) : Point3d.createZero());
235
- nodeTransform = scale.multiplyTransformTransform(rot);
236
- trans.multiplyTransformTransform(nodeTransform, nodeTransform);
240
+ nodeTransform = trsMatrix(node.translation, node.rotation, node.scale);
237
241
  }
238
242
  const top = this.transform;
239
243
  if (!top)
@@ -286,6 +290,9 @@ export class GltfReader {
286
290
  traverseScene() {
287
291
  return this.traverseNodes(this._sceneNodes);
288
292
  }
293
+ get viewFlagOverrides() {
294
+ return undefined;
295
+ }
289
296
  getTileTransform(transformToRoot, pseudoRtcBias) {
290
297
  let transform;
291
298
  if (this._returnToCenter || pseudoRtcBias || this._yAxisUp || transformToRoot) {
@@ -329,18 +336,19 @@ export class GltfReader {
329
336
  renderGraphic = renderGraphicList[0];
330
337
  else
331
338
  renderGraphic = this._system.createGraphicList(renderGraphicList);
332
- const transform = this.getTileTransform(transformToRoot, pseudoRtcBias);
333
- let range = contentRange;
334
- const invTransform = transform?.inverse();
335
- if (invTransform)
336
- range = invTransform.multiplyRange(contentRange);
337
339
  if (featureTable)
338
- renderGraphic = this._system.createBatch(renderGraphic, PackedFeatureTable.pack(featureTable), range);
339
- if (transform) {
340
+ renderGraphic = this._system.createBatch(renderGraphic, PackedFeatureTable.pack(featureTable), contentRange);
341
+ const transform = this.getTileTransform(transformToRoot, pseudoRtcBias);
342
+ const viewFlagOverrides = this.viewFlagOverrides;
343
+ if (transform || viewFlagOverrides) {
340
344
  const branch = new GraphicBranch(true);
345
+ if (viewFlagOverrides)
346
+ branch.setViewFlagOverrides(viewFlagOverrides);
341
347
  branch.add(renderGraphic);
342
- renderGraphic = this._system.createBranch(branch, transform);
348
+ renderGraphic = this._system.createBranch(branch, transform ?? Transform.createIdentity());
343
349
  }
350
+ const invTransform = transform?.inverse();
351
+ const range = invTransform ? invTransform.multiplyRange(contentRange) : contentRange;
344
352
  return {
345
353
  readStatus,
346
354
  isLeaf,
@@ -387,12 +395,76 @@ export class GltfReader {
387
395
  mesh.normals.push(new OctEncodedNormal(normal));
388
396
  return mesh.getGraphics(this._system, instances);
389
397
  }
390
- readNodeAndCreateGraphics(renderGraphicList, node, featureTable, transformStack, instances, pseudoRtcBias) {
398
+ readInstanceAttributes(node, featureTable) {
399
+ const ext = node.extensions?.EXT_mesh_gpu_instancing;
400
+ if (!ext || !ext.attributes) {
401
+ return undefined;
402
+ }
403
+ const translationsView = this.getBufferView(ext.attributes, "TRANSLATION");
404
+ const translations = translationsView?.toBufferData(GltfDataType.Float);
405
+ const rotations = this.getBufferView(ext.attributes, "ROTATION")?.toBufferData(GltfDataType.Float);
406
+ const scales = this.getBufferView(ext.attributes, "SCALE")?.toBufferData(GltfDataType.Float);
407
+ // All attributes must specify the same count, count must be greater than zero, and at least one attribute must be specified.
408
+ const count = translations?.count ?? rotations?.count ?? scales?.count;
409
+ if (!count || (rotations && rotations.count !== count) || (scales && scales.count !== count)) {
410
+ return undefined;
411
+ }
412
+ const transformCenter = new Point3d();
413
+ const trMin = translationsView?.accessor.min;
414
+ const trMax = translationsView?.accessor.max;
415
+ if (trMin && trMax) {
416
+ const half = (idx) => trMin[idx] + (trMax[idx] - trMin[idx]) / 2;
417
+ transformCenter.set(half(0), half(1), half(2));
418
+ }
419
+ const getTranslation = (index) => {
420
+ if (!translations) {
421
+ return undefined;
422
+ }
423
+ index *= 3;
424
+ return [
425
+ translations.buffer[index + 0] - transformCenter.x,
426
+ translations.buffer[index + 1] - transformCenter.y,
427
+ translations.buffer[index + 2] - transformCenter.z,
428
+ ];
429
+ };
430
+ const getRotation = (index) => {
431
+ index *= 4;
432
+ return rotations ? [rotations.buffer[index], rotations.buffer[index + 1], rotations.buffer[index + 2], rotations.buffer[index + 3]] : undefined;
433
+ };
434
+ const getScale = (index) => {
435
+ index *= 3;
436
+ return scales ? [scales.buffer[index], scales.buffer[index + 1], scales.buffer[index + 2]] : undefined;
437
+ };
438
+ const transforms = new Float32Array(3 * 4 * count);
439
+ const transform = Transform.createIdentity();
440
+ for (let i = 0; i < count; i++) {
441
+ const tf = trsMatrix(getTranslation(i), getRotation(i), getScale(i), transform);
442
+ const idx = i * 3 * 4;
443
+ transforms[idx + 0] = tf.matrix.coffs[0];
444
+ transforms[idx + 1] = tf.matrix.coffs[1];
445
+ transforms[idx + 2] = tf.matrix.coffs[2];
446
+ transforms[idx + 3] = tf.origin.x;
447
+ transforms[idx + 4] = tf.matrix.coffs[3];
448
+ transforms[idx + 5] = tf.matrix.coffs[4];
449
+ transforms[idx + 6] = tf.matrix.coffs[5];
450
+ transforms[idx + 7] = tf.origin.y;
451
+ transforms[idx + 8] = tf.matrix.coffs[6];
452
+ transforms[idx + 9] = tf.matrix.coffs[7];
453
+ transforms[idx + 10] = tf.matrix.coffs[8];
454
+ transforms[idx + 11] = tf.origin.z;
455
+ }
456
+ // ###TODO? The extension currently provides no way of specifying per-instance feature Ids.
457
+ // For now, assume that if the feature table contains exactly one feature, all the instances belong to that feature.
458
+ const featureIds = featureTable && featureTable.isUniform ? new Uint8Array(3 * count) : undefined;
459
+ return { count, transforms, transformCenter, featureIds };
460
+ }
461
+ readNodeAndCreateGraphics(renderGraphicList, node, featureTable, transformStack, batchInstances, pseudoRtcBias) {
391
462
  if (undefined === node)
392
463
  return TileReadStatus.InvalidTileData;
393
464
  // IMPORTANT: Do not return without popping this node from the stack.
394
465
  transformStack.push(node);
395
466
  const thisTransform = transformStack.transform;
467
+ const nodeInstances = !batchInstances && undefined !== node.mesh ? this.readInstanceAttributes(node, featureTable) : undefined;
396
468
  /**
397
469
  * This is a workaround for tiles generated by
398
470
  * context capture which have a large offset from the tileset origin that exceeds the
@@ -407,16 +479,16 @@ export class GltfReader {
407
479
  for (const meshKey of getGltfNodeMeshIds(node)) {
408
480
  const nodeMesh = this._meshes[meshKey];
409
481
  if (nodeMesh?.primitives) {
410
- const meshes = this.readMeshPrimitives(node, featureTable, thisTransform, thisBias);
482
+ const meshes = this.readMeshPrimitives(node, featureTable, thisTransform, thisBias, nodeInstances);
411
483
  let renderGraphic;
412
484
  if (0 !== meshes.length) {
413
485
  if (1 === meshes.length) {
414
- renderGraphic = this.graphicFromMeshData(meshes[0], instances);
486
+ renderGraphic = this.graphicFromMeshData(meshes[0], batchInstances ?? nodeInstances);
415
487
  }
416
488
  else {
417
489
  const thisList = [];
418
490
  for (const mesh of meshes) {
419
- renderGraphic = this.graphicFromMeshData(mesh, instances);
491
+ renderGraphic = this.graphicFromMeshData(mesh, batchInstances ?? nodeInstances);
420
492
  if (undefined !== renderGraphic)
421
493
  thisList.push(renderGraphic);
422
494
  }
@@ -438,7 +510,7 @@ export class GltfReader {
438
510
  for (const childId of node.children) {
439
511
  const child = this._nodes[childId];
440
512
  if (child)
441
- this.readNodeAndCreateGraphics(renderGraphicList, child, featureTable, transformStack, instances);
513
+ this.readNodeAndCreateGraphics(renderGraphicList, child, featureTable, transformStack, batchInstances ?? nodeInstances);
442
514
  }
443
515
  }
444
516
  transformStack.pop();
@@ -667,9 +739,9 @@ export class GltfReader {
667
739
  // DisplayParams doesn't want a separate texture mapping if the material already has one.
668
740
  textureMapping = undefined;
669
741
  }
670
- return new DisplayParams(DisplayParams.Type.Mesh, color, color, 1, LinePixels.Solid, FillFlags.Always, renderMaterial, undefined, hasBakedLighting, textureMapping);
742
+ return new DisplayParams(DisplayParams.Type.Mesh, color, color, 1, LinePixels.Solid, FillFlags.None, renderMaterial, undefined, hasBakedLighting, textureMapping);
671
743
  }
672
- readMeshPrimitives(node, featureTable, thisTransform, thisBias) {
744
+ readMeshPrimitives(node, featureTable, thisTransform, thisBias, instances) {
673
745
  const meshes = [];
674
746
  for (const meshKey of getGltfNodeMeshIds(node)) {
675
747
  const nodeMesh = this._meshes[meshKey];
@@ -679,9 +751,30 @@ export class GltfReader {
679
751
  if (mesh) {
680
752
  meshes.push(mesh);
681
753
  if (this._computedContentRange && mesh.pointRange) {
682
- const invTransform = thisTransform?.inverse();
683
- const meshRange = invTransform ? invTransform.multiplyRange(mesh.pointRange) : mesh.pointRange;
684
- this._computedContentRange.extendRange(meshRange);
754
+ const meshRange = thisTransform ? thisTransform.multiplyRange(mesh.pointRange) : mesh.pointRange;
755
+ if (!instances) {
756
+ this._computedContentRange.extendRange(meshRange);
757
+ }
758
+ else {
759
+ const tfs = instances.transforms;
760
+ const nodeRange = new Range3d();
761
+ const extendTransformedRange = (i, x, y, z) => {
762
+ nodeRange.extendXYZ(tfs[i + 3] + tfs[i + 0] * x + tfs[i + 1] * y + tfs[i + 2] * z, tfs[i + 7] + tfs[i + 4] * x + tfs[i + 5] * y + tfs[i + 6] * z, tfs[i + 11] + tfs[i + 8] * x + tfs[i + 9] * y + tfs[i + 10] * z);
763
+ };
764
+ for (let i = 0; i < tfs.length; i += 3 * 4) {
765
+ extendTransformedRange(i, meshRange.low.x, meshRange.low.y, meshRange.low.z);
766
+ extendTransformedRange(i, meshRange.low.x, meshRange.low.y, meshRange.high.z);
767
+ extendTransformedRange(i, meshRange.low.x, meshRange.high.y, meshRange.low.z);
768
+ extendTransformedRange(i, meshRange.low.x, meshRange.high.y, meshRange.high.z);
769
+ extendTransformedRange(i, meshRange.high.x, meshRange.low.y, meshRange.low.z);
770
+ extendTransformedRange(i, meshRange.high.x, meshRange.low.y, meshRange.high.z);
771
+ extendTransformedRange(i, meshRange.high.x, meshRange.high.y, meshRange.low.z);
772
+ extendTransformedRange(i, meshRange.high.x, meshRange.high.y, meshRange.high.z);
773
+ }
774
+ nodeRange.low.addInPlace(instances.transformCenter);
775
+ nodeRange.high.addInPlace(instances.transformCenter);
776
+ this._computedContentRange.extendRange(nodeRange);
777
+ }
685
778
  }
686
779
  }
687
780
  }
@@ -1416,6 +1509,12 @@ export class GltfGraphicsReader extends GltfReader {
1416
1509
  this._featureTable.insert(new Feature(pickableId));
1417
1510
  }
1418
1511
  }
1512
+ get viewFlagOverrides() {
1513
+ return {
1514
+ whiteOnWhiteReversal: false,
1515
+ renderMode: RenderMode.SmoothShade,
1516
+ };
1517
+ }
1419
1518
  async read() {
1420
1519
  await this.resolveResources();
1421
1520
  return this.readGltfAndCreateGraphics(this._isLeaf, this._featureTable, this._contentRange, this._transform);