@itwin/core-frontend 4.0.0-dev.44 → 4.0.0-dev.46

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 (71) hide show
  1. package/lib/cjs/core-frontend.d.ts +1 -0
  2. package/lib/cjs/core-frontend.d.ts.map +1 -1
  3. package/lib/cjs/core-frontend.js +1 -0
  4. package/lib/cjs/core-frontend.js.map +1 -1
  5. package/lib/cjs/gltf/GltfModel.d.ts +91 -0
  6. package/lib/cjs/gltf/GltfModel.d.ts.map +1 -0
  7. package/lib/cjs/gltf/GltfModel.js +10 -0
  8. package/lib/cjs/gltf/GltfModel.js.map +1 -0
  9. package/lib/cjs/gltf/GltfParser.d.ts +26 -0
  10. package/lib/cjs/gltf/GltfParser.d.ts.map +1 -0
  11. package/lib/cjs/gltf/GltfParser.js +352 -0
  12. package/lib/cjs/gltf/GltfParser.js.map +1 -0
  13. package/lib/cjs/gltf/GltfSchema.d.ts +557 -0
  14. package/lib/cjs/gltf/GltfSchema.d.ts.map +1 -0
  15. package/lib/cjs/gltf/GltfSchema.js +138 -0
  16. package/lib/cjs/gltf/GltfSchema.js.map +1 -0
  17. package/lib/cjs/render/GraphicBuilder.d.ts +5 -2
  18. package/lib/cjs/render/GraphicBuilder.d.ts.map +1 -1
  19. package/lib/cjs/render/GraphicBuilder.js +12 -3
  20. package/lib/cjs/render/GraphicBuilder.js.map +1 -1
  21. package/lib/cjs/tile/B3dmReader.d.ts +2 -1
  22. package/lib/cjs/tile/B3dmReader.d.ts.map +1 -1
  23. package/lib/cjs/tile/B3dmReader.js +2 -1
  24. package/lib/cjs/tile/B3dmReader.js.map +1 -1
  25. package/lib/cjs/tile/GltfReader.d.ts +13 -420
  26. package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
  27. package/lib/cjs/tile/GltfReader.js +118 -192
  28. package/lib/cjs/tile/GltfReader.js.map +1 -1
  29. package/lib/cjs/tile/RealityTileLoader.d.ts.map +1 -1
  30. package/lib/cjs/tile/RealityTileLoader.js +14 -2
  31. package/lib/cjs/tile/RealityTileLoader.js.map +1 -1
  32. package/lib/cjs/tile/Tile.d.ts +10 -1
  33. package/lib/cjs/tile/Tile.d.ts.map +1 -1
  34. package/lib/cjs/tile/Tile.js +22 -2
  35. package/lib/cjs/tile/Tile.js.map +1 -1
  36. package/lib/esm/core-frontend.d.ts +1 -0
  37. package/lib/esm/core-frontend.d.ts.map +1 -1
  38. package/lib/esm/core-frontend.js +1 -0
  39. package/lib/esm/core-frontend.js.map +1 -1
  40. package/lib/esm/gltf/GltfModel.d.ts +91 -0
  41. package/lib/esm/gltf/GltfModel.d.ts.map +1 -0
  42. package/lib/esm/gltf/GltfModel.js +9 -0
  43. package/lib/esm/gltf/GltfModel.js.map +1 -0
  44. package/lib/esm/gltf/GltfParser.d.ts +26 -0
  45. package/lib/esm/gltf/GltfParser.d.ts.map +1 -0
  46. package/lib/esm/gltf/GltfParser.js +329 -0
  47. package/lib/esm/gltf/GltfParser.js.map +1 -0
  48. package/lib/esm/gltf/GltfSchema.d.ts +557 -0
  49. package/lib/esm/gltf/GltfSchema.d.ts.map +1 -0
  50. package/lib/esm/gltf/GltfSchema.js +131 -0
  51. package/lib/esm/gltf/GltfSchema.js.map +1 -0
  52. package/lib/esm/render/GraphicBuilder.d.ts +5 -2
  53. package/lib/esm/render/GraphicBuilder.d.ts.map +1 -1
  54. package/lib/esm/render/GraphicBuilder.js +13 -4
  55. package/lib/esm/render/GraphicBuilder.js.map +1 -1
  56. package/lib/esm/tile/B3dmReader.d.ts +2 -1
  57. package/lib/esm/tile/B3dmReader.d.ts.map +1 -1
  58. package/lib/esm/tile/B3dmReader.js +2 -1
  59. package/lib/esm/tile/B3dmReader.js.map +1 -1
  60. package/lib/esm/tile/GltfReader.d.ts +13 -420
  61. package/lib/esm/tile/GltfReader.d.ts.map +1 -1
  62. package/lib/esm/tile/GltfReader.js +75 -149
  63. package/lib/esm/tile/GltfReader.js.map +1 -1
  64. package/lib/esm/tile/RealityTileLoader.d.ts.map +1 -1
  65. package/lib/esm/tile/RealityTileLoader.js +14 -2
  66. package/lib/esm/tile/RealityTileLoader.js.map +1 -1
  67. package/lib/esm/tile/Tile.d.ts +10 -1
  68. package/lib/esm/tile/Tile.d.ts.map +1 -1
  69. package/lib/esm/tile/Tile.js +22 -2
  70. package/lib/esm/tile/Tile.js.map +1 -1
  71. package/package.json +22 -22
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GltfParser.js","sourceRoot":"","sources":["../../../src/gltf/GltfParser.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,sDAAkF;AAClF,wDAA6E;AAC7E,oDAAwE;AAExE,sEAAmE;AACnE,4CAEsB;AAEtB,6CAEsB;AAoBtB;;;GAGG;AACI,KAAK,UAAU,SAAS,CAAC,IAAmB;IACjD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;IACzB,IAAI,OAAe,CAAC;IACpB,IAAI,IAAkB,CAAC;IACvB,IAAI,MAA8B,CAAC;IAEnC,IAAI,MAAM,YAAY,UAAU,EAAE;QAChC,mDAAmD;QACnD,MAAM,MAAM,GAAG,yBAAU,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACjD,IAAI,wBAAU,CAAC,IAAI,KAAK,MAAM,CAAC,UAAU,EAAE,EAAE;YAC3C,IAAI;gBACF,MAAM,QAAQ,GAAG,IAAA,2BAAY,EAAC,MAAM,CAAC,CAAC;gBACtC,IAAI,CAAC,QAAQ;oBACX,OAAO,SAAS,CAAC;gBAEnB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;gBAC5B,OAAO,GAAG,CAAC,CAAC;aACb;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,SAAS,CAAC;aAClB;SACF;aAAM;YACL,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,MAAM,GAAG,IAAI,uBAAS,CAAC,MA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AAY,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;CACF","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\nimport { ByteStream, JsonUtils, Logger, utf8ToString } from \"@itwin/core-bentley\";\r\nimport { Matrix3d, Point3d, Point4d, Transform } from \"@itwin/core-geometry\";\r\nimport { GlbHeader, ImageSource, TileFormat } from \"@itwin/core-common\";\r\nimport type { DracoLoader, DracoMesh } from \"@loaders.gl/draco\";\r\nimport { FrontendLoggerCategory } from \"../FrontendLoggerCategory\";\r\nimport {\r\n getImageSourceFormatForMimeType, imageBitmapFromImageSource, imageElementFromImageSource, tryImageElementFromUrl,\r\n} from \"../ImageUtil\";\r\nimport { TextureImageSource } from \"../render/RenderTexture\";\r\nimport {\r\n DracoMeshCompression, getGltfNodeMeshIds, GltfAccessor, GltfBuffer, GltfBufferViewProps, GltfDictionary, gltfDictionaryIterator, GltfDocument, GltfId, GltfImage, GltfMesh, GltfMeshMode, GltfMeshPrimitive, GltfNode, traverseGltfNodes,\r\n} from \"./GltfSchema\";\r\nimport { Gltf } from \"./GltfModel\";\r\n\r\n/** @internal */\r\nexport interface ParseGltfLogger {\r\n log(message: string, type: \"error\" | \"warning\" | \"info\"): void;\r\n}\r\n\r\n/** Arguments supplied to [[parseGltf]].\r\n * @internal\r\n */\r\nexport interface ParseGltfArgs {\r\n logger?: ParseGltfLogger;\r\n gltf: Uint8Array | GltfDocument;\r\n noCreateImageBitmap?: boolean;\r\n baseUrl?: string;\r\n isCanceled?: boolean;\r\n upAxis?: \"y\" | \"z\"; // default \"y\"\r\n}\r\n\r\n/** Parse a [[GltfDocument]] or binary representation thereof to produce a [[Gltf.Model]].\r\n * This implementation is incomplete and not currently used.\r\n * @internal\r\n */\r\nexport async function parseGltf(args: ParseGltfArgs): Promise<Gltf.Model | undefined> {\r\n const source = args.gltf;\r\n let version: number;\r\n let json: GltfDocument;\r\n let binary: Uint8Array | undefined;\r\n\r\n if (source instanceof Uint8Array) {\r\n // It may be JSON - check for magic indicating glb.\r\n const buffer = ByteStream.fromUint8Array(source);\r\n if (TileFormat.Gltf !== buffer.readUint32()) {\r\n try {\r\n const utf8Json = utf8ToString(source);\r\n if (!utf8Json)\r\n return undefined;\r\n\r\n json = JSON.parse(utf8Json);\r\n version = 2;\r\n } catch (_) {\r\n return undefined;\r\n }\r\n } else {\r\n buffer.reset();\r\n const header = new GlbHeader(buffer);\r\n if (!header.isValid)\r\n return undefined;\r\n\r\n version = header.version;\r\n if (header.binaryChunk)\r\n binary = new Uint8Array(source.buffer, source.byteOffset + header.binaryChunk.offset, header.binaryChunk.length);\r\n\r\n try {\r\n const jsonBytes = new Uint8Array(source.buffer, source.byteOffset + header.jsonChunk.offset, header.jsonChunk.length);\r\n const jsonStr = utf8ToString(jsonBytes);\r\n if (undefined === jsonStr)\r\n return undefined;\r\n\r\n json = JSON.parse(jsonStr);\r\n } catch (_) {\r\n return undefined;\r\n }\r\n }\r\n } else {\r\n version = 2; // ###TODO verify against source.asset?.version\r\n json = source;\r\n }\r\n\r\n // asset is required in glTF 2, optional in glTF 1\r\n const asset = JsonUtils.asObject(json.asset);\r\n if (version === 2 && !asset)\r\n return undefined;\r\n\r\n const document: GltfDocument = {\r\n asset,\r\n scene: JsonUtils.asString(json.scene),\r\n extensions: JsonUtils.asObject(json.extensions),\r\n extensionsUsed: JsonUtils.asArray(json.extensionsUsed),\r\n extensionsRequired: JsonUtils.asArray(json.extensionsRequired),\r\n accessors: JsonUtils.asObject(json.accessors),\r\n buffers: JsonUtils.asObject(json.buffers),\r\n bufferViews: JsonUtils.asObject(json.bufferViews),\r\n images: JsonUtils.asObject(json.images),\r\n materials: JsonUtils.asObject(json.materials),\r\n meshes: JsonUtils.asObject(json.meshes),\r\n nodes: JsonUtils.asObject(json.nodes),\r\n samplers: JsonUtils.asObject(json.samplers),\r\n scenes: JsonUtils.asObject(json.scenes),\r\n textures: JsonUtils.asObject(json.textures),\r\n techniques: JsonUtils.asObject(json.techniques),\r\n };\r\n\r\n if (!document.meshes)\r\n return undefined;\r\n\r\n const logger = args.logger ?? {\r\n log: (message: string, type: \"error\" | \"warning\" | \"info\") => {\r\n const category = `${FrontendLoggerCategory.Package}.gltf`;\r\n const fn = type === \"error\" ? \"logError\" : (type === \"warning\" ? \"logWarning\" : \"logInfo\");\r\n Logger[fn](category, message);\r\n },\r\n };\r\n\r\n const parser = new GltfParser({\r\n document,\r\n version,\r\n upAxis: args.upAxis ?? \"y\",\r\n binary,\r\n baseUrl: args.baseUrl,\r\n logger,\r\n isCanceled: () => args.isCanceled ?? false,\r\n imageFromImageSource: (args.noCreateImageBitmap ?\r\n async (imgSrc) => imageElementFromImageSource(imgSrc) :\r\n async (imgSrc) => imageBitmapFromImageSource(imgSrc)),\r\n });\r\n\r\n return parser.parse();\r\n}\r\n\r\ninterface GltfParserOptions {\r\n document: GltfDocument;\r\n version: number;\r\n upAxis: \"y\" | \"z\";\r\n binary?: Uint8Array;\r\n baseUrl?: string;\r\n logger: ParseGltfLogger;\r\n imageFromImageSource: (source: ImageSource) => Promise<TextureImageSource>;\r\n isCanceled: () => boolean;\r\n}\r\n\r\ntype ParserBuffer = GltfBuffer & { resolvedBuffer?: Gltf.Buffer };\r\ntype ParserImage = GltfImage & { resolvedImage?: TextureImageSource };\r\n\r\nclass GltfParser {\r\n private readonly _version: number;\r\n private readonly _upAxis: \"y\" | \"z\";\r\n private readonly _baseUrl?: string;\r\n private readonly _logger: ParseGltfLogger;\r\n private readonly _isCanceled: () => boolean;\r\n private readonly _buffers: GltfDictionary<ParserBuffer>;\r\n private readonly _images: GltfDictionary<ParserImage>;\r\n private readonly _nodes: GltfDictionary<GltfNode>;\r\n private readonly _meshes: GltfDictionary<GltfMesh>;\r\n private readonly _accessors: GltfDictionary<GltfAccessor>;\r\n private readonly _sceneNodes: GltfId[];\r\n private readonly _bufferViews: GltfDictionary<GltfBufferViewProps>;\r\n private readonly _imageFromImageSource: (source: ImageSource) => Promise<TextureImageSource>;\r\n private readonly _dracoMeshes = new Map<DracoMeshCompression, DracoMesh>();\r\n\r\n public constructor(options: GltfParserOptions) {\r\n this._version = options.version;\r\n this._upAxis = options.upAxis;\r\n this._baseUrl = options.baseUrl;\r\n this._logger = options.logger;\r\n this._isCanceled = options.isCanceled;\r\n this._imageFromImageSource = options.imageFromImageSource;\r\n\r\n const emptyDict = { };\r\n const doc = options.document;\r\n this._buffers = doc.buffers ?? emptyDict;\r\n this._images = doc.images ?? emptyDict;\r\n this._nodes = doc.nodes ?? emptyDict;\r\n this._meshes = doc.meshes ?? emptyDict;\r\n this._bufferViews = doc.bufferViews ?? emptyDict;\r\n this._accessors = doc.accessors ?? emptyDict;\r\n\r\n if (options.binary) {\r\n const buffer = this._buffers[this._version === 2 ? 0 : \"binary_glTF\"];\r\n if (buffer && undefined === buffer.uri)\r\n buffer.resolvedBuffer = { data: options.binary };\r\n }\r\n\r\n let sceneNodes;\r\n if (doc.scenes && undefined !== doc.scene)\r\n sceneNodes = doc.scenes[doc.scene]?.nodes;\r\n\r\n this._sceneNodes = sceneNodes ?? Object.keys(this._nodes);\r\n }\r\n\r\n public async parse(): Promise<Gltf.Model | undefined> {\r\n // ###TODO_GLTF RTC_CENTER\r\n // ###TODO_GLTF pseudo-rtc bias (apply translation to each point at read time, for scalable mesh...)\r\n const toWorld = undefined;\r\n\r\n await this.resolveResources();\r\n if (this._isCanceled())\r\n return undefined;\r\n\r\n // ###TODO_GLTF compute content range (maybe do so elsewhere?)\r\n // I think spec says POSITION must specify min and max?\r\n\r\n const nodes: Gltf.Node[] = [];\r\n for (const nodeKey of this._sceneNodes) {\r\n const node = this._nodes[nodeKey];\r\n if (node)\r\n nodes.push(this.parseNode(node));\r\n }\r\n\r\n return {\r\n toWorld,\r\n nodes,\r\n };\r\n }\r\n\r\n private parseNode(node: GltfNode): Gltf.Node {\r\n const primitives = [];\r\n for (const meshId of getGltfNodeMeshIds(node)) {\r\n const mesh = this._meshes[meshId];\r\n if (!mesh)\r\n continue;\r\n\r\n const parsedPrimitives = this.parsePrimitives(mesh);\r\n for (const primitive of parsedPrimitives)\r\n primitives.push(primitive);\r\n }\r\n\r\n let toParent;\r\n if (node.matrix) {\r\n const origin = Point3d.create(node.matrix[12], node.matrix[13], node.matrix[14]);\r\n const matrix = Matrix3d.createRowValues(\r\n node.matrix[0], node.matrix[4], node.matrix[8],\r\n node.matrix[1], node.matrix[5], node.matrix[9],\r\n node.matrix[2], node.matrix[6], node.matrix[10],\r\n );\r\n\r\n toParent = Transform.createOriginAndMatrix(origin, matrix);\r\n } else if (node.rotation || node.scale || node.translation) {\r\n // SPEC: To compose the local transformation matrix, TRS properties MUST be converted to matrices and postmultiplied in the T * R * S order;\r\n // first the scale is applied to the vertices, then the rotation, and then the translation.\r\n const scale = Transform.createRefs(undefined, node.scale ? Matrix3d.createScale(node.scale[0], node.scale[1], node.scale[2]) : Matrix3d.identity);\r\n 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);\r\n rot.matrix.transposeInPlace(); // See comment on Matrix3d.createFromQuaternion\r\n const trans = Transform.createTranslation(node.translation ? new Point3d(node.translation[0], node.translation[1], node.translation[2]) : Point3d.createZero());\r\n\r\n toParent = scale.multiplyTransformTransform(rot);\r\n trans.multiplyTransformTransform(toParent, toParent);\r\n }\r\n\r\n return {\r\n primitives,\r\n toParent,\r\n };\r\n }\r\n\r\n private parsePrimitives(mesh: GltfMesh): Gltf.AnyPrimitive[] {\r\n const primitives: Gltf.AnyPrimitive[] = [];\r\n if (!mesh.primitives)\r\n return primitives;\r\n\r\n for (const primitive of mesh.primitives) {\r\n const parsedPrimitive = this.parsePrimitive(primitive);\r\n if (parsedPrimitive)\r\n primitives.push(parsedPrimitive);\r\n }\r\n\r\n return primitives;\r\n }\r\n\r\n private parsePrimitive(primitive: GltfMeshPrimitive): Gltf.AnyPrimitive | undefined {\r\n const meshMode = JsonUtils.asInt(primitive.mode, GltfMeshMode.Triangles);\r\n switch (meshMode) {\r\n case GltfMeshMode.TriangleStrip:\r\n return this.parseTrianglesPrimitive(primitive);\r\n default:\r\n // ###TODO_GLTF Make parser support all primitive types. Consumer can choose to do whatever with them.\r\n return undefined;\r\n }\r\n }\r\n\r\n private parseTrianglesPrimitive(primitive: GltfMeshPrimitive): Gltf.TrianglesPrimitive | undefined {\r\n const posId = primitive.attributes.POSITION;\r\n const pos = undefined !== posId ? this._accessors[posId] : undefined;\r\n if (!pos)\r\n return undefined;\r\n\r\n return undefined; // ###TODO_GLTF\r\n }\r\n\r\n private traverseNodes(nodeIds: Iterable<GltfId>): Iterable<GltfNode> {\r\n return traverseGltfNodes(nodeIds, this._nodes, new Set<GltfId>());\r\n }\r\n\r\n private async resolveResources(): Promise<void> {\r\n // Load any external images and buffers.\r\n await this._resolveResources();\r\n\r\n // If any meshes are draco-compressed, dynamically load the decoder module and then decode the meshes.\r\n const dracoMeshes: DracoMeshCompression[] = [];\r\n\r\n for (const node of this.traverseNodes(this._sceneNodes)) {\r\n for (const meshId of getGltfNodeMeshIds(node)) {\r\n const mesh = this._meshes[meshId];\r\n if (mesh?.primitives)\r\n for (const primitive of mesh.primitives)\r\n if (primitive.extensions?.KHR_draco_mesh_compression)\r\n dracoMeshes.push(primitive.extensions.KHR_draco_mesh_compression);\r\n }\r\n }\r\n\r\n if (dracoMeshes.length === 0)\r\n return;\r\n\r\n try {\r\n const dracoLoader = (await import(\"@loaders.gl/draco\")).DracoLoader;\r\n await Promise.all(dracoMeshes.map(async (x) => this.decodeDracoMesh(x, dracoLoader)));\r\n } catch (err) {\r\n Logger.logWarning(FrontendLoggerCategory.Render, \"Failed to decode draco-encoded glTF mesh\");\r\n Logger.logException(FrontendLoggerCategory.Render, err);\r\n }\r\n }\r\n\r\n private async _resolveResources(): Promise<void> {\r\n // ###TODO traverse the scene nodes to find resources referenced by them, instead of resolving everything - some resources may not\r\n // be required for the scene.\r\n const promises: Array<Promise<void>> = [];\r\n try {\r\n for (const buffer of gltfDictionaryIterator(this._buffers))\r\n if (!buffer.resolvedBuffer)\r\n promises.push(this.resolveBuffer(buffer));\r\n\r\n await Promise.all(promises);\r\n if (this._isCanceled())\r\n return;\r\n\r\n promises.length = 0;\r\n for (const image of gltfDictionaryIterator(this._images))\r\n if (!image.resolvedImage)\r\n promises.push(this.resolveImage(image));\r\n\r\n await Promise.all(promises);\r\n } catch (_) {\r\n // ###TODO_GLTF log\r\n }\r\n }\r\n\r\n private resolveUrl(uri: string): string | undefined {\r\n try {\r\n return new URL(uri, this._baseUrl).toString();\r\n } catch (_) {\r\n return undefined;\r\n }\r\n }\r\n\r\n private async resolveBuffer(buffer: ParserBuffer): Promise<void> {\r\n if (buffer.resolvedBuffer || undefined === buffer.uri)\r\n return;\r\n\r\n try {\r\n const url = this.resolveUrl(buffer.uri);\r\n const response = url ? await fetch(url) : undefined;\r\n if (this._isCanceled())\r\n return;\r\n\r\n const data = await response?.arrayBuffer();\r\n if (this._isCanceled())\r\n return;\r\n\r\n if (data)\r\n buffer.resolvedBuffer = { data: new Uint8Array(data) };\r\n } catch (_) {\r\n //\r\n }\r\n }\r\n\r\n private async resolveImage(image: ParserImage): Promise<void> {\r\n if (image.resolvedImage)\r\n return;\r\n\r\n interface BufferViewSource { bufferView?: GltfId, mimeType?: string }\r\n const bvSrc: BufferViewSource | undefined = undefined !== image.bufferView ? image : image.extensions?.KHR_binary_glTF;\r\n if (undefined !== bvSrc?.bufferView) {\r\n const format = undefined !== bvSrc.mimeType ? getImageSourceFormatForMimeType(bvSrc.mimeType) : undefined;\r\n const bufferView = this._bufferViews[bvSrc.bufferView];\r\n if (undefined === format || !bufferView || !bufferView.byteLength || bufferView.byteLength < 0)\r\n return;\r\n\r\n const bufferData = this._buffers[bufferView.buffer]?.resolvedBuffer?.data;\r\n if (!bufferData)\r\n return;\r\n\r\n const offset = bufferView.byteOffset ?? 0;\r\n const bytes = bufferData.subarray(offset, offset + bufferView.byteLength);\r\n try {\r\n const imageSource = new ImageSource(bytes, format);\r\n image.resolvedImage = await this._imageFromImageSource(imageSource);\r\n } catch (_) {\r\n //\r\n }\r\n\r\n return;\r\n }\r\n\r\n const url = undefined !== image.uri ? this.resolveUrl(image.uri) : undefined;\r\n if (undefined !== url)\r\n image.resolvedImage = await tryImageElementFromUrl(url);\r\n }\r\n\r\n private async decodeDracoMesh(ext: DracoMeshCompression, loader: typeof DracoLoader): Promise<void> {\r\n const bv = this._bufferViews[ext.bufferView];\r\n if (!bv || !bv.byteLength)\r\n return;\r\n\r\n let buf = this._buffers[bv.buffer]?.resolvedBuffer?.data;\r\n if (!buf)\r\n return;\r\n\r\n const offset = bv.byteOffset ?? 0;\r\n buf = buf.subarray(offset, offset + bv.byteLength);\r\n const mesh = await loader.parse(buf, { }); // NB: `options` argument declared optional but will produce exception if not supplied.\r\n if (mesh)\r\n this._dracoMeshes.set(ext, mesh);\r\n }\r\n}\r\n"]}
@@ -0,0 +1,557 @@
1
+ /** @packageDocumentation
2
+ * @module Rendering
3
+ */
4
+ /** Enumerates the types of [[GltfMeshPrimitive]] topologies.
5
+ * @internal
6
+ */
7
+ export declare enum GltfMeshMode {
8
+ Points = 0,
9
+ Lines = 1,
10
+ LineStrip = 3,
11
+ Triangles = 4,
12
+ /** Not currently supported. */
13
+ TriangleStrip = 5,
14
+ /** Not currently supported. */
15
+ TriangleFan = 6
16
+ }
17
+ /** Enumerates the basic data types supported by accessors, material values, technique uniforms, etc.
18
+ * @internal
19
+ */
20
+ export declare enum GltfDataType {
21
+ SignedByte = 5120,
22
+ UnsignedByte = 5121,
23
+ SignedShort = 5122,
24
+ UnsignedShort = 5123,
25
+ UInt32 = 5125,
26
+ Float = 5126,
27
+ Rgb = 6407,
28
+ Rgba = 6408,
29
+ IntVec2 = 35667,
30
+ IntVec3 = 35668,
31
+ FloatVec2 = 35664,
32
+ FloatVec3 = 35665,
33
+ FloatVec4 = 35666,
34
+ FloatMat3 = 35675,
35
+ FloatMat4 = 35676,
36
+ Sampler2d = 35678
37
+ }
38
+ /** @internal */
39
+ export declare enum GltfMagFilter {
40
+ Nearest = 9728,
41
+ Linear = 9729
42
+ }
43
+ /** @internal */
44
+ export declare enum GltfMinFilter {
45
+ Nearest = 9728,
46
+ Linear = 9729,
47
+ NearestMipMapNearest = 9984,
48
+ LinearMipMapNearest = 9985,
49
+ NearestMipMapLinear = 9986,
50
+ LinearMipMapLinear = 9987
51
+ }
52
+ /** Describes how texture coordinates outside of the range [0..1] are handled.
53
+ * @internal
54
+ */
55
+ export declare enum GltfWrapMode {
56
+ ClampToEdge = 33071,
57
+ MirroredRepeat = 33648,
58
+ Repeat = 10497
59
+ }
60
+ /** Describes the intended target of a [[GltfBufferViewProps]].
61
+ * @internal
62
+ */
63
+ export declare enum GltfBufferTarget {
64
+ ArrayBuffer = 34962,
65
+ ElementArrayBuffer = 24963
66
+ }
67
+ /** The type used to refer to an entry in a GltfDictionary in a glTF 1.0 asset. @internal */
68
+ export declare type Gltf1Id = string;
69
+ /** The type used to refer to an entry in a GltfDictionary in a glTF 2.0 asset. @internal */
70
+ export declare type Gltf2Id = number;
71
+ /** The type used to refer to an entry in a GltfDictionary. @internal */
72
+ export declare type GltfId = Gltf1Id | Gltf2Id;
73
+ /** A collection of resources of some type defined at the top-level of a [[GltfDocument]].
74
+ * In glTF 1.0, these are defined as objects; each resource is referenced and accessed by its string key.
75
+ * In glTF 2.0, these are defined as arrays; each resource is referenced and accessed by its integer array index.
76
+ * @internal
77
+ */
78
+ export interface GltfDictionary<T extends GltfChildOfRootProperty> {
79
+ [key: GltfId]: T | undefined;
80
+ }
81
+ /** @internal */
82
+ export interface GltfStringMap<T> {
83
+ [key: string]: T | undefined;
84
+ }
85
+ /** Iterate the contents of a [[GltfDictionary]].
86
+ * @internal
87
+ */
88
+ export declare function gltfDictionaryIterator<T extends GltfChildOfRootProperty>(dict: GltfDictionary<T>): Iterable<T>;
89
+ /** Optional extensions applied to a [[GltfProperty]] to enable behavior not defined in the core specification.
90
+ * @internal
91
+ */
92
+ export declare type GltfExtensions = GltfStringMap<unknown>;
93
+ /** The base interface provided by most objects in a glTF asset, permitting additional data to be associated with the object.
94
+ * @internal
95
+ */
96
+ export interface GltfProperty {
97
+ extensions?: GltfExtensions;
98
+ extras?: any;
99
+ }
100
+ /** The base interface provided by top-level properties of a [[GltfDocument]].
101
+ * @internal
102
+ */
103
+ export interface GltfChildOfRootProperty extends GltfProperty {
104
+ /** Optional name, strictly for human consumption. */
105
+ name?: string;
106
+ }
107
+ /** @internal */
108
+ export interface DracoMeshCompression {
109
+ bufferView: GltfId;
110
+ attributes: GltfStringMap<number>;
111
+ }
112
+ /** @internal */
113
+ export interface MeshFeature extends GltfProperty {
114
+ featureCount: number;
115
+ nullFeatureId?: number;
116
+ label?: string;
117
+ propertyTable?: number;
118
+ texture?: unknown;
119
+ attribute?: number;
120
+ }
121
+ /** @internal */
122
+ export interface MeshFeatures {
123
+ featureIds: MeshFeature[];
124
+ }
125
+ /** A unit of geometry belonging to a [[GltfMesh]]. @internal */
126
+ export interface GltfMeshPrimitive extends GltfProperty {
127
+ /** Maps the name of each mesh attribute semantic to the Id of the [[GltfAccessor]] providing the attribute's data. */
128
+ attributes: GltfStringMap<GltfId>;
129
+ /** The Id of the [[GltfAccessor]] providing the vertex indices. */
130
+ indices?: GltfId;
131
+ /** The Id of the [[GltfMaterial]] to apply to the primitive when rendering. */
132
+ material?: GltfId;
133
+ /** The primitive topology type. */
134
+ mode?: GltfMeshMode;
135
+ /** Morph targets - currently unsupported. */
136
+ targets?: GltfStringMap<GltfId>;
137
+ extensions?: GltfExtensions & {
138
+ /** The [CESIUM_primitive_outline](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline) extension
139
+ * describes how to draw outline edges for a triangle mesh.
140
+ */
141
+ CESIUM_primitive_outline?: {
142
+ /** The Id of the [[GltfBufferViewProps]] supplying the endpoints of each edge as indices into the triangle mesh's vertex array.
143
+ * The number of indices must be even; each consecutive pair of indices describes one line segment. No connectivity between
144
+ * line segments is implied.
145
+ */
146
+ indices?: GltfId;
147
+ };
148
+ /** The [KHR_draco_mesh_compression](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md) extension
149
+ * allows glTF to support geometry compressed with Draco geometry compression.
150
+ */
151
+ KHR_draco_mesh_compression?: DracoMeshCompression;
152
+ EXT_mesh_features?: MeshFeatures;
153
+ };
154
+ }
155
+ /** A collection of [[GltfMeshPrimitive]]s to be rendered. Each mesh is referenced by a node. Multiple nodes can refer to the same mesh.
156
+ * The node's transform is applied when rendering the mesh.
157
+ * @internal
158
+ */
159
+ export interface GltfMesh extends GltfChildOfRootProperty {
160
+ /** The collection of primitives to be rendered. */
161
+ primitives?: GltfMeshPrimitive[];
162
+ /** For morph targets - currently unsupported. */
163
+ weights?: number[];
164
+ }
165
+ /** Properties common to [[Gltf1Node]] and [[Gltf2Node]]. @internal */
166
+ export interface GltfNodeBaseProps {
167
+ /** The Ids of the child nodes. @see [[GltfNode]]. */
168
+ children?: GltfId[];
169
+ /** Currently ignored. */
170
+ camera?: GltfId;
171
+ /** Currently ignored. */
172
+ skin?: GltfId;
173
+ /** A 4x4 column-major transformation matrix. Mutually exclusive with [[rotation]], [[scale]], and [[translation]]. */
174
+ matrix?: number[];
175
+ /** Unit quaternion as [x, y, z, w], where w is the scalar. */
176
+ rotation?: number[];
177
+ /** Non-uniform scale as [x, y, z]. */
178
+ scale?: number[];
179
+ /** Translation as [x, y, z]. */
180
+ translation?: number[];
181
+ }
182
+ /** glTF 1.0 representation of a [[GltfNode]]. Unlike a [[Gltf2Node]], a Gltf1Node may refer to any number of [[GltfMesh]]es.
183
+ * @internal
184
+ */
185
+ export interface Gltf1Node extends GltfChildOfRootProperty, GltfNodeBaseProps {
186
+ /** The Ids of the [[GltfMesh]]es to be rendered by this node.
187
+ * @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.
188
+ * In case this was because of non-spec-compliant glTF that placed a string here instead of an array, either is permitted.
189
+ */
190
+ meshes?: GltfId[] | string;
191
+ mesh?: never;
192
+ /** Currently ignored. */
193
+ jointName?: GltfId;
194
+ /** Currently ignored. */
195
+ skeletons?: GltfId[];
196
+ }
197
+ /** glTF 2.0 representation of a [[GltfNode]]. Unlike a [[Gltf1Node]], a Gltf2Node may refer to at most one [[GltfMesh]].
198
+ * @internal
199
+ */
200
+ export interface Gltf2Node extends GltfChildOfRootProperty, GltfNodeBaseProps {
201
+ /** The Id of the [[GltfMesh]] to be rendered by this node. */
202
+ mesh?: GltfId;
203
+ meshes?: never;
204
+ /** Morph targets - currently ignored. */
205
+ weights?: number[];
206
+ }
207
+ /** 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
+ * 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.
209
+ * Some nodes may be associated with other types of data like cameras, skins, lights, etc - these types of data are currently unsupported.
210
+ * Rendering a node means rendering its meshes and the meshes of all of its descendants, with transforms applied.
211
+ * @internal
212
+ */
213
+ export declare type GltfNode = Gltf1Node | Gltf2Node;
214
+ /** Get the Ids of the meshes associated with a node.
215
+ * @internal
216
+ */
217
+ export declare function getGltfNodeMeshIds(node: GltfNode): GltfId[];
218
+ /** @internal */
219
+ export declare function traverseGltfNodes(ids: Iterable<GltfId>, nodes: GltfDictionary<GltfNode>, traversed: Set<GltfId>): Iterable<GltfNode>;
220
+ /** Describes a scene graph that composes any number of [[GltfNode]]s to produce a rendering of the [[GltfDocument]] asset.
221
+ * An asset may define any number of scenes; the default scene is specified by [[Gltf.scene]].
222
+ * @internal
223
+ */
224
+ export interface GltfScene extends GltfChildOfRootProperty {
225
+ /** The Ids of the nodes comprising the scene graph. */
226
+ nodes?: GltfId[];
227
+ }
228
+ /** Provides metadata about a [[GltfDocument]] asset.
229
+ * @internal
230
+ */
231
+ export interface GltfAsset extends GltfProperty {
232
+ /** A copyright message suitable for display to credit the content creator. */
233
+ copyright?: string;
234
+ /** The name of the tool that generated the asset. */
235
+ generator?: string;
236
+ /** The glTF version targeted by the asset, in the form "major.minor" where "major" and "minor" are integers. */
237
+ version: string;
238
+ /** The minimum glTF version required to properly load this asset, in the same form as [[version]].
239
+ * This minimum version must be no greater than [[version]].
240
+ */
241
+ minVersion?: string;
242
+ }
243
+ /** Describes an image such as one used for a [[GltfTexture]]. The image may be referenced by a [[uri]] or a [[bufferView]].
244
+ * @internal
245
+ */
246
+ export interface GltfImage extends GltfChildOfRootProperty {
247
+ /** URI from which the image data can be obtained, either as a base-64-encoded data URI or an external resource.
248
+ * Mutually exclusive with [[bufferView]].
249
+ */
250
+ uri?: string;
251
+ /** The image's media type. This property is required if [[bufferView]] is defined. */
252
+ mimeType?: "image/jpeg" | "image/png";
253
+ /** The Id of the [[GltfBufferViewProps]] containing the image data. Mutually exclusive with [[uri]]. */
254
+ bufferView?: GltfId;
255
+ extensions?: GltfExtensions & {
256
+ /** The [KHR_binary_glTF](https://github.com/KhronosGroup/glTF/tree/main/extensions/1.0/Khronos/KHR_binary_glTF) allows an image to
257
+ * be embedded in a binary chunk appended to the glTF asset's JSON, instead of being referenced by an external URI.
258
+ * This is superseded in glTF 2.0 by support for the glb file format specification.
259
+ */
260
+ KHR_binary_glTF?: {
261
+ /** The Id of the [[GltfBufferViewProps]] that contains the binary image data. */
262
+ bufferView?: GltfId;
263
+ /** Required - @see [[GltfImage.mimeType]]. */
264
+ mimeType?: string;
265
+ };
266
+ };
267
+ }
268
+ /** Describes a reference to a [[GltfTexture]]. @internal */
269
+ export interface GltfTextureInfo extends GltfProperty {
270
+ /** The Id of the [[GltfTexture]]. */
271
+ index: GltfId;
272
+ /** The set index of the texture's TEXCOORD attribute used for texture coordinate mapping.
273
+ * For example, if `texCoord` is `2`, an attribute named `TEXCOORD_2` must exist containing the texture coordinates.
274
+ * Default: 0.
275
+ */
276
+ texCoord?: number;
277
+ }
278
+ /** Describes a texture and its sampler.
279
+ * @internal
280
+ */
281
+ export interface GltfTexture extends GltfChildOfRootProperty {
282
+ /** The Id of the [[GltfSampler]] used by this texture.
283
+ * If undefined, a sampler with repeat wrapping and auto filtering should be used by default.
284
+ */
285
+ sampler?: GltfId;
286
+ /** The Id of the [[GltfImage]] used by this texture.
287
+ * If undefined, an extension or other mechanism should supply an alternate image source - otherwise, the behavior is undefined.
288
+ */
289
+ source?: GltfId;
290
+ }
291
+ /** Describes the filtering and wrapping behavior to be applied to a [[GltfTexture]].
292
+ * @note The implementation currently does not support MirroredRepeat and does not support different wrapping for U and V;
293
+ * effectively, unless `wrapS` or `wrapT` is set to ClampToEdge, the sampler will use GltfWrapMode.Repeat.
294
+ * @internal
295
+ */
296
+ export interface GltfSampler extends GltfChildOfRootProperty {
297
+ /** Magnification filter. */
298
+ magFilter?: GltfMagFilter;
299
+ /** Minification filter. */
300
+ minFilter?: GltfMinFilter;
301
+ /** S (U) wrapping mode. Default: Repeat. */
302
+ wrapS?: GltfWrapMode;
303
+ /** T (V) wrapping mode. Default: Repeat. */
304
+ wrapT?: GltfWrapMode;
305
+ }
306
+ /** GL states that can be enabled by a [[GltfTechnique]]. Only those queried by this implementation are enumerated.
307
+ * @internal
308
+ */
309
+ export declare enum GltfTechniqueState {
310
+ /** Enables alpha blending. */
311
+ Blend = 3042
312
+ }
313
+ /** For glTF 1.0 only, describes shader programs and shader state associated with a [[Gltf1Material]], used to render meshes associated with the material.
314
+ * This implementation uses it strictly to identify techniques that require alpha blending.
315
+ * @internal
316
+ */
317
+ export interface GltfTechnique extends GltfChildOfRootProperty {
318
+ /** GL render states to be applied by the technique. */
319
+ states?: {
320
+ /** An array of integers corresponding to boolean GL states that should be enabled using GL's `enable` function.
321
+ * For example, the value [[GltfTechniqueState.Blend]] (3042) indicates that blending should be enabled.
322
+ */
323
+ enable?: GltfTechniqueState[];
324
+ };
325
+ }
326
+ /** @internal */
327
+ export interface Gltf1Material extends GltfChildOfRootProperty {
328
+ diffuse?: string;
329
+ emission?: number[];
330
+ shininess?: number;
331
+ specular?: number[];
332
+ technique?: GltfId;
333
+ values?: {
334
+ texStep?: number[];
335
+ color?: number[];
336
+ tex?: number | string;
337
+ };
338
+ }
339
+ /** @internal */
340
+ export interface GltfMaterialPbrMetallicRoughness extends GltfProperty {
341
+ baseColorFactor?: number[];
342
+ baseColorTexture?: GltfTextureInfo;
343
+ metallicFactor?: number;
344
+ roughnessFactor?: number;
345
+ metallicRoughnessTexture?: GltfTextureInfo;
346
+ }
347
+ /** @internal */
348
+ export declare type GltfAlphaMode = "OPAQUE" | "MASK" | "BLEND";
349
+ /** @internal */
350
+ export interface Gltf2Material extends GltfChildOfRootProperty {
351
+ pbrMetallicRoughness?: GltfMaterialPbrMetallicRoughness;
352
+ normalTexture?: GltfTextureInfo;
353
+ occlusionTexture?: unknown;
354
+ emissiveTexture?: GltfTextureInfo;
355
+ emissiveFactor?: number[];
356
+ alphaMode?: GltfAlphaMode;
357
+ alphaCutoff?: number;
358
+ doubleSided?: boolean;
359
+ extensions?: GltfExtensions & {
360
+ /** The [KHR_materials_unlit](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_unlit) extension
361
+ * indicates that the material should be displayed without lighting. The extension adds no additional properties; it is effectively a boolean flag.
362
+ */
363
+ KHR_materials_unlit?: {};
364
+ /** The [KHR_techniques_webgl extension](https://github.com/KhronosGroup/glTF/blob/c1c12bd100e88ff468ccef1cb88cfbec56a69af2/extensions/2.0/Khronos/KHR_techniques_webgl/README.md)
365
+ * 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]]).
366
+ * Here, it is only used to extract uniform values.
367
+ */
368
+ KHR_techniques_webgl?: {
369
+ technique?: number;
370
+ values?: {
371
+ u_texStep?: number[];
372
+ u_color?: number[];
373
+ u_diffuse?: {
374
+ index: number;
375
+ texCoord: number;
376
+ };
377
+ [k: string]: unknown | undefined;
378
+ };
379
+ };
380
+ };
381
+ }
382
+ /** @internal */
383
+ export declare type GltfMaterial = Gltf1Material | Gltf2Material;
384
+ /** @internal */
385
+ export declare function isGltf1Material(material: GltfMaterial): material is Gltf1Material;
386
+ /** @internal */
387
+ export interface GltfBuffer extends GltfChildOfRootProperty {
388
+ uri?: string;
389
+ byteLength?: number;
390
+ }
391
+ /** @internal */
392
+ export interface GltfBufferViewProps extends GltfChildOfRootProperty {
393
+ buffer: GltfId;
394
+ byteLength?: number;
395
+ byteOffset?: number;
396
+ byteStride?: number;
397
+ target?: GltfBufferTarget;
398
+ }
399
+ /** @internal */
400
+ export interface GltfAccessor extends GltfChildOfRootProperty {
401
+ bufferView?: GltfId;
402
+ byteOffset?: number;
403
+ componentType?: GltfDataType.SignedByte | GltfDataType.UnsignedByte | GltfDataType.SignedShort | GltfDataType.UnsignedShort | GltfDataType.UInt32 | GltfDataType.Float;
404
+ normalized?: boolean;
405
+ count: number;
406
+ type: "SCALAR" | "VEC2" | "VEC3" | "VEC4" | "MAT2" | "MAT3" | "MAT4";
407
+ max?: number[];
408
+ min?: number[];
409
+ sparse?: unknown;
410
+ extensions?: GltfExtensions & {
411
+ /** Quantized attributes for glTF 1.0. Superceded by KHR_mesh_quantization. */
412
+ WEB3D_quantized_attributes?: {
413
+ decodedMin: number[];
414
+ decodedMax: number[];
415
+ /** Currently ignored. */
416
+ decodeMatrix: number[];
417
+ };
418
+ };
419
+ }
420
+ /** @internal */
421
+ export declare namespace GltfStructuralMetadata {
422
+ type ClassPropertyType = "SCALAR" | "STRING" | "BOOLEAN" | "ENUM" | "VEC2" | "VEC3" | "VEC4" | "MAT2" | "MAT3" | "MAT4" | string;
423
+ type ClassPropertyComponentType = "INT8" | "UINT8" | "INT16" | "UINT16" | "INT32" | "UINT32" | "INT64" | "UINT64" | "FLOAT32" | "FLOAT64" | string;
424
+ interface ClassProperty extends GltfProperty {
425
+ type: ClassPropertyType;
426
+ name?: string;
427
+ description?: string;
428
+ componentType?: ClassPropertyComponentType;
429
+ enumType?: string;
430
+ array?: boolean;
431
+ count?: number;
432
+ normalized?: boolean;
433
+ offset?: number;
434
+ scale?: number;
435
+ min?: number;
436
+ max?: number;
437
+ required?: boolean;
438
+ noData?: unknown;
439
+ default?: unknown;
440
+ semantic?: string;
441
+ }
442
+ interface EnumValue extends GltfProperty {
443
+ name: string;
444
+ value: number;
445
+ description?: string;
446
+ }
447
+ interface Enum extends GltfProperty {
448
+ values: EnumValue[];
449
+ valueType?: "INT8" | "UINT8" | "INT16" | "UINT16" | "INT32" | "UINT32" | "INT64" | "UINT64" | string;
450
+ name?: string;
451
+ description?: string;
452
+ }
453
+ interface Class extends GltfProperty {
454
+ name?: string;
455
+ description?: string;
456
+ properties?: {
457
+ [propertyId: string]: ClassProperty | undefined;
458
+ };
459
+ }
460
+ interface Schema extends GltfProperty {
461
+ id: string;
462
+ name?: string;
463
+ description?: string;
464
+ version?: string;
465
+ classes?: Class[];
466
+ enums?: Enum[];
467
+ }
468
+ interface PropertyTableProperty extends GltfProperty {
469
+ values: GltfId;
470
+ arrayOffsets?: GltfId;
471
+ stringOffsets?: GltfId;
472
+ arrayOffsetType?: "UINT8" | "UINT16" | "UINT32" | "UINT64" | string;
473
+ stringOffsetType?: "UINT8" | "UINT16" | "UINT32" | "UINT64" | string;
474
+ offset?: number;
475
+ scale?: number;
476
+ min?: number;
477
+ max?: number;
478
+ }
479
+ interface PropertyTable {
480
+ class: string;
481
+ count: number;
482
+ properties?: {
483
+ [propertyId: string]: PropertyTableProperty | undefined;
484
+ };
485
+ }
486
+ interface Extension extends GltfProperty {
487
+ schemaUri?: string;
488
+ schema?: Schema;
489
+ propertyTables?: PropertyTable[];
490
+ propertyTextures?: unknown;
491
+ propertyAttributes?: unknown;
492
+ }
493
+ }
494
+ /** Describes the top-level structure of a glTF asset.
495
+ * 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).
496
+ * However, it can also represent a [glTF 1.0](https://github.com/KhronosGroup/glTF/tree/main/specification/1.0#reference-node) asset.
497
+ * 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
498
+ * items using either strings or numeric indexes represented by [[GltfId]].
499
+ * 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).
500
+ * These interfaces also accommodate some deviations from both specs that are known to exist in the wild.
501
+ * Most aspects of the specifications that are not implemented here are omitted (e.g., skinning, animations).
502
+ * @internal
503
+ */
504
+ export interface GltfDocument extends GltfProperty {
505
+ /** Metadata about the glTF asset.
506
+ * @note This property is required in glTF 2.0, but optional in 1.0.
507
+ */
508
+ asset?: GltfAsset;
509
+ /** The Id of the default [[GltfScene]] in [[scenes]]. */
510
+ scene?: GltfId;
511
+ extensions?: GltfExtensions & {
512
+ /** The [CESIUM_RTC extension](https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/CESIUM_RTC/README.md) defines a centroid
513
+ * relative to which all coordinates in the asset are defined, to reduce floating-point precision errors for large coordinates.
514
+ */
515
+ CESIUM_RTC?: {
516
+ center?: number[];
517
+ };
518
+ /** The [KHR_techniques_webgl extension](https://github.com/KhronosGroup/glTF/blob/c1c12bd100e88ff468ccef1cb88cfbec56a69af2/extensions/2.0/Khronos/KHR_techniques_webgl/README.md)
519
+ * 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]]).
520
+ * Here, it is only used to extract uniform values.
521
+ */
522
+ KHR_techniques_webgl?: {
523
+ techniques?: Array<{
524
+ uniforms?: {
525
+ [key: string]: {
526
+ type: GltfDataType;
527
+ value?: any;
528
+ } | undefined;
529
+ };
530
+ }>;
531
+ };
532
+ EXT_structural_metadata?: GltfStructuralMetadata.Extension;
533
+ };
534
+ /** Names of glTF extensions used in the asset. */
535
+ extensionsUsed?: string[];
536
+ /** Names of glTF extensions required to properly load the asset. */
537
+ extensionsRequired?: string[];
538
+ accessors?: GltfDictionary<GltfAccessor>;
539
+ /** Not currently supported. */
540
+ animations?: GltfDictionary<any>;
541
+ buffers?: GltfDictionary<GltfBuffer>;
542
+ bufferViews?: GltfDictionary<GltfBufferViewProps>;
543
+ /** Not currently used. */
544
+ cameras?: GltfDictionary<any>;
545
+ images?: GltfDictionary<GltfImage>;
546
+ materials?: GltfDictionary<GltfMaterial>;
547
+ meshes?: GltfDictionary<GltfMesh>;
548
+ nodes?: GltfDictionary<GltfNode>;
549
+ samplers?: GltfDictionary<GltfSampler>;
550
+ scenes?: GltfDictionary<GltfScene>;
551
+ /** Not currently supported. */
552
+ skins?: GltfDictionary<any>;
553
+ textures?: GltfDictionary<GltfTexture>;
554
+ /** For glTF 1.0 only, techniques associated with [[Gltf1Material]]s. */
555
+ techniques?: GltfDictionary<GltfTechnique>;
556
+ }
557
+ //# sourceMappingURL=GltfSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GltfSchema.d.ts","sourceRoot":"","sources":["../../../src/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;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