@itwin/core-frontend 4.0.0-dev.41 → 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
@@ -26,6 +26,7 @@ export * from "./FrustumAnimator";
26
26
  export * from "./FuzzySearch";
27
27
  export * from "./GeoServices";
28
28
  export * from "./GlobeAnimator";
29
+ export * from "./gltf/GltfSchema";
29
30
  export * from "./GraphicalEditingScope";
30
31
  export * from "./HitDetail";
31
32
  export * from "./ImageUtil";
@@ -1 +1 @@
1
- {"version":3,"file":"core-frontend.d.ts","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":"AAKA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,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ACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,8BAA8B,CAAC;AAEtC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE"}
@@ -42,6 +42,7 @@ __exportStar(require("./FrustumAnimator"), exports);
42
42
  __exportStar(require("./FuzzySearch"), exports);
43
43
  __exportStar(require("./GeoServices"), exports);
44
44
  __exportStar(require("./GlobeAnimator"), exports);
45
+ __exportStar(require("./gltf/GltfSchema"), exports);
45
46
  __exportStar(require("./GraphicalEditingScope"), exports);
46
47
  __exportStar(require("./HitDetail"), exports);
47
48
  __exportStar(require("./ImageUtil"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B;AAC9B,iDAA+B;AAC/B,wDAAsC;AACtC,kDAAgC;AAChC,0DAAwC;AACxC,gDAA8B;AAC9B,yDAAuC;AACvC,6DAA2C;AAC3C,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,sDAAoC;AACpC,gDAA8B;AAC9B,2DAAyC;AACzC,4DAA0C;AAC1C,kDAAgC;AAChC,2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D;AACpD,kDAAgC;AAChC,uDAAqC;AACrC,uDAAqC;AACrC,0DAAwC;AACxC,yDAAuC;AACvC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,+CAA6B;AAC7B,uDAAqC;AACrC,oDAAkC;AAClC,yDAAuC;AACvC,mDAAiC;AACjC,0DAAwC;AACxC,kDAAgC;AAChC,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,sGAAsG;AACtG,wCAAsC;AAEtC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE","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\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendLoggerCategory\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./ImageUtil\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewRect\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicPrimitive\";\r\nexport * from \"./render/InstancedGraphicParams\";\r\nexport * from \"./render/MockRender\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/RealityMeshGraphicParams\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMaterial\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderPlan\";\r\nexport * from \"./render/RenderPlanarClassifier\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTexture\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./render/webgl/PerformanceMetrics\";\r\nexport * from \"./render/webgl/Target\";\r\nexport * from \"./render/webgl/IModelFrameLifecycle\";\r\nexport * from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./RealityDataSource\";\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/\r\n"]}
1
+ {"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B;AAC9B,iDAA+B;AAC/B,wDAAsC;AACtC,kDAAgC;AAChC,0DAAwC;AACxC,gDAA8B;AAC9B,yDAAuC;AACvC,6DAA2C;AAC3C,gDAA8B;AAC9B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DAAsC;AACtC,sDAAoC;AACpC,kEAAgD;AAChD,wDAAsC;AACtC,wDAAsC;AACtC,yDAAuC;AACvC,iDAA+B;AAC/B,oEAAkD;AAClD,0DAAwC;AACxC,oEAAkD;AAClD,wDAAsC;AACtC,sEAAoD;AACpD,kDAAgC;AAChC,uDAAqC;AACrC,uDAAqC;AACrC,0DAAwC;AACxC,yDAAuC;AACvC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,+CAA6B;AAC7B,uDAAqC;AACrC,oDAAkC;AAClC,yDAAuC;AACvC,mDAAiC;AACjC,0DAAwC;AACxC,kDAAgC;AAChC,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,sGAAsG;AACtG,wCAAsC;AAEtC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE","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\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendLoggerCategory\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./gltf/GltfSchema\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./ImageUtil\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewRect\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicPrimitive\";\r\nexport * from \"./render/InstancedGraphicParams\";\r\nexport * from \"./render/MockRender\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/RealityMeshGraphicParams\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMaterial\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderPlan\";\r\nexport * from \"./render/RenderPlanarClassifier\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTexture\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./render/webgl/PerformanceMetrics\";\r\nexport * from \"./render/webgl/Target\";\r\nexport * from \"./render/webgl/IModelFrameLifecycle\";\r\nexport * from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./RealityDataSource\";\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/\r\n"]}
@@ -0,0 +1,91 @@
1
+ /** @packageDocumentation
2
+ * @module Rendering
3
+ */
4
+ import { Transform, XAndY, XYAndZ } from "@itwin/core-geometry";
5
+ import { GltfAlphaMode } from "./GltfSchema";
6
+ /** Types describing the in-memory representation of a glTF model as parsed from a [[GltfDocument]].
7
+ * This API is incomplete.
8
+ * @alpha
9
+ */
10
+ export declare namespace Gltf {
11
+ interface Buffer {
12
+ data: Uint8Array;
13
+ }
14
+ interface PositionQuantization {
15
+ origin: XYAndZ;
16
+ scale: XYAndZ;
17
+ }
18
+ interface Attribute {
19
+ buffer: Buffer;
20
+ byteStride?: number;
21
+ }
22
+ interface PositionAttribute extends Attribute {
23
+ componentType: "f32" | "u8" | "i8" | "u16" | "i16";
24
+ quantization?: PositionQuantization;
25
+ decodedMin: XYAndZ;
26
+ decodedMax: XYAndZ;
27
+ }
28
+ interface ColorAttribute extends Attribute {
29
+ componentType: "f32" | "u8" | "u16";
30
+ }
31
+ interface Indices {
32
+ dataType: "u8" | "u16" | "u32";
33
+ count: number;
34
+ buffer: Buffer;
35
+ }
36
+ type PrimitiveType = "triangles";
37
+ interface Primitive {
38
+ indices: Indices;
39
+ attributeCount: number;
40
+ position: PositionAttribute;
41
+ color?: ColorAttribute;
42
+ }
43
+ interface TextureUVQuantization {
44
+ origin: XAndY;
45
+ scale: XAndY;
46
+ }
47
+ interface NormalAttribute extends Attribute {
48
+ componentType: "f32" | "i8" | "i16";
49
+ }
50
+ interface TextureUVAttribute extends Attribute {
51
+ componentType: "f32" | "u8" | "u16" | "i8" | "i16";
52
+ quantization?: TextureUVQuantization;
53
+ }
54
+ interface Rgba {
55
+ r: number;
56
+ g: number;
57
+ b: number;
58
+ a: number;
59
+ }
60
+ interface MetallicRoughness {
61
+ baseColorFactor: Rgba;
62
+ metallicFactor: number;
63
+ roughnessFactor: number;
64
+ }
65
+ interface Material {
66
+ metallicRoughness: MetallicRoughness;
67
+ alphaMode: GltfAlphaMode;
68
+ alphaCutoff: number;
69
+ doubleSided: boolean;
70
+ unlit: boolean;
71
+ }
72
+ interface TrianglesPrimitive extends Primitive {
73
+ type: "triangles";
74
+ material: Material;
75
+ normal?: NormalAttribute;
76
+ textureUV?: TextureUVAttribute;
77
+ }
78
+ type AnyPrimitive = TrianglesPrimitive;
79
+ interface Node {
80
+ /** Transform from this node's local coordinate system to its parent node's coordinate system (or the model's coordinate system, if no parent node). */
81
+ toParent?: Transform;
82
+ /** The primitives drawn by this node. For glTF 2.0, there is exactly one primitive per node; glTF 1.0 permits any number of primitives per node. */
83
+ primitives: AnyPrimitive[];
84
+ }
85
+ interface Model {
86
+ /** Transform from model coordinates to world coordinates. */
87
+ toWorld?: Transform;
88
+ nodes: Node[];
89
+ }
90
+ }
91
+ //# sourceMappingURL=GltfModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GltfModel.d.ts","sourceRoot":"","sources":["../../../src/gltf/GltfModel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C;;;GAGG;AACH,yBAAiB,IAAI,CAAC;IAIpB,UAAiB,MAAM;QACrB,IAAI,EAAE,UAAU,CAAC;KAClB;IAED,UAAiB,oBAAoB;QACnC,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,SAAS;QACxB,MAAM,EAAE,MAAM,CAAC;QAEf,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;IAED,UAAiB,iBAAkB,SAAQ,SAAS;QAElD,aAAa,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAC;QACnD,YAAY,CAAC,EAAE,oBAAoB,CAAC;QAEpC,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,cAAe,SAAQ,SAAS;QAC/C,aAAa,EAAE,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;KACrC;IAED,UAAiB,O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AAS,CAAC,EAAE,kBAAkB,CAAC;KAChC;IAED,KAAY,YAAY,GAAG,kBAAkB,CAAC;IAE9C,UAAiB,IAAI;QACnB,uJAAuJ;QACvJ,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,oJAAoJ;QACpJ,UAAU,EAAE,YAAY,EAAE,CAAC;KAC5B;IAED,UAAiB,KAAK;QACpB,6DAA6D;QAC7D,OAAO,CAAC,EAAE,SAAS,CAAC;QACpB,KAAK,EAAE,IAAI,EAAE,CAAC;KACf;CACF"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Rendering
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ //# sourceMappingURL=GltfModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GltfModel.js","sourceRoot":"","sources":["../../../src/gltf/GltfModel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 { Transform, XAndY, XYAndZ } from \"@itwin/core-geometry\";\r\nimport { GltfAlphaMode } from \"./GltfSchema\";\r\n\r\n/** Types describing the in-memory representation of a glTF model as parsed from a [[GltfDocument]].\r\n * This API is incomplete.\r\n * @alpha\r\n */\r\nexport namespace Gltf {\r\n // A view into (usually a subset of) a GltfBuffer, used for vertex attributes and indices.\r\n // Attributes may be interleaved in which case they share the same Buffer object and the stride is specified on each Attribute.\r\n // The same Buffer object may also be used by more than one set of attributes or indices.\r\n export interface Buffer {\r\n data: Uint8Array;\r\n }\r\n\r\n export interface PositionQuantization {\r\n origin: XYAndZ;\r\n scale: XYAndZ;\r\n }\r\n\r\n export interface Attribute {\r\n buffer: Buffer;\r\n // Default zero.\r\n byteStride?: number;\r\n }\r\n\r\n export interface PositionAttribute extends Attribute {\r\n // If not \"f32\", the positions are quantized or normalized.\r\n componentType: \"f32\" | \"u8\" | \"i8\" | \"u16\" | \"i16\";\r\n quantization?: PositionQuantization;\r\n // Unquantized if quantization is defined.\r\n decodedMin: XYAndZ;\r\n decodedMax: XYAndZ;\r\n }\r\n\r\n export interface ColorAttribute extends Attribute {\r\n componentType: \"f32\" | \"u8\" | \"u16\";\r\n }\r\n\r\n export interface Indices {\r\n dataType: \"u8\" | \"u16\" | \"u32\";\r\n count: number;\r\n buffer: Buffer;\r\n }\r\n\r\n export type PrimitiveType = \"triangles\";\r\n\r\n export interface Primitive {\r\n indices: Indices;\r\n attributeCount: number;\r\n position: PositionAttribute;\r\n color?: ColorAttribute;\r\n }\r\n\r\n export interface TextureUVQuantization {\r\n origin: XAndY;\r\n scale: XAndY;\r\n }\r\n\r\n export interface NormalAttribute extends Attribute {\r\n // Always normalized.\r\n componentType: \"f32\" | \"i8\" | \"i16\";\r\n }\r\n\r\n export interface TextureUVAttribute extends Attribute {\r\n // If not \"f32\", the components are quantized or normalized.\r\n componentType: \"f32\" | \"u8\" | \"u16\" | \"i8\" | \"i16\";\r\n quantization?: TextureUVQuantization;\r\n }\r\n\r\n export interface Rgba {\r\n r: number;\r\n g: number;\r\n b: number;\r\n a: number;\r\n }\r\n\r\n export interface MetallicRoughness {\r\n baseColorFactor: Rgba;\r\n // ###TODO_GLTF baseColorTexture;\r\n metallicFactor: number;\r\n roughnessFactor: number;\r\n // ###TODO_GLTF metallicRoughnessTexture;\r\n }\r\n\r\n export interface Material {\r\n metallicRoughness: MetallicRoughness;\r\n alphaMode: GltfAlphaMode;\r\n alphaCutoff: number;\r\n doubleSided: boolean;\r\n // NB: a mesh have normals defined but still be intended to be rendered without lighting.\r\n unlit: boolean;\r\n }\r\n\r\n export interface TrianglesPrimitive extends Primitive {\r\n type: \"triangles\";\r\n material: Material;\r\n normal?: NormalAttribute;\r\n textureUV?: TextureUVAttribute;\r\n }\r\n\r\n export type AnyPrimitive = TrianglesPrimitive;\r\n\r\n export interface Node {\r\n /** Transform from this node's local coordinate system to its parent node's coordinate system (or the model's coordinate system, if no parent node). */\r\n toParent?: Transform;\r\n /** The primitives drawn by this node. For glTF 2.0, there is exactly one primitive per node; glTF 1.0 permits any number of primitives per node. */\r\n primitives: AnyPrimitive[];\r\n }\r\n\r\n export interface Model {\r\n /** Transform from model coordinates to world coordinates. */\r\n toWorld?: Transform;\r\n nodes: Node[];\r\n }\r\n}\r\n"]}
@@ -0,0 +1,26 @@
1
+ /** @packageDocumentation
2
+ * @module Rendering
3
+ */
4
+ import { GltfDocument } from "./GltfSchema";
5
+ import { Gltf } from "./GltfModel";
6
+ /** @internal */
7
+ export interface ParseGltfLogger {
8
+ log(message: string, type: "error" | "warning" | "info"): void;
9
+ }
10
+ /** Arguments supplied to [[parseGltf]].
11
+ * @internal
12
+ */
13
+ export interface ParseGltfArgs {
14
+ logger?: ParseGltfLogger;
15
+ gltf: Uint8Array | GltfDocument;
16
+ noCreateImageBitmap?: boolean;
17
+ baseUrl?: string;
18
+ isCanceled?: boolean;
19
+ upAxis?: "y" | "z";
20
+ }
21
+ /** Parse a [[GltfDocument]] or binary representation thereof to produce a [[Gltf.Model]].
22
+ * This implementation is incomplete and not currently used.
23
+ * @internal
24
+ */
25
+ export declare function parseGltf(args: ParseGltfArgs): Promise<Gltf.Model | undefined>;
26
+ //# sourceMappingURL=GltfParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GltfParser.d.ts","sourceRoot":"","sources":["../../../src/gltf/GltfParser.ts"],"names":[],"mappings":"AAIA;;GAEG;AAWH,OAAO,EAC4H,YAAY,EAC9I,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,gBAAgB;AAChB,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;CAChE;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,IAAI,EAAE,UAAU,GAAG,YAAY,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,CA+FpF"}
@@ -0,0 +1,352 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Rendering
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.parseGltf = void 0;
30
+ const core_bentley_1 = require("@itwin/core-bentley");
31
+ const core_geometry_1 = require("@itwin/core-geometry");
32
+ const core_common_1 = require("@itwin/core-common");
33
+ const FrontendLoggerCategory_1 = require("../FrontendLoggerCategory");
34
+ const ImageUtil_1 = require("../ImageUtil");
35
+ const GltfSchema_1 = require("./GltfSchema");
36
+ /** Parse a [[GltfDocument]] or binary representation thereof to produce a [[Gltf.Model]].
37
+ * This implementation is incomplete and not currently used.
38
+ * @internal
39
+ */
40
+ async function parseGltf(args) {
41
+ const source = args.gltf;
42
+ let version;
43
+ let json;
44
+ let binary;
45
+ if (source instanceof Uint8Array) {
46
+ // It may be JSON - check for magic indicating glb.
47
+ const buffer = core_bentley_1.ByteStream.fromUint8Array(source);
48
+ if (core_common_1.TileFormat.Gltf !== buffer.readUint32()) {
49
+ try {
50
+ const utf8Json = (0, core_bentley_1.utf8ToString)(source);
51
+ if (!utf8Json)
52
+ return undefined;
53
+ json = JSON.parse(utf8Json);
54
+ version = 2;
55
+ }
56
+ catch (_) {
57
+ return undefined;
58
+ }
59
+ }
60
+ else {
61
+ buffer.reset();
62
+ const header = new core_common_1.GlbHeader(buffer);
63
+ if (!header.isValid)
64
+ return undefined;
65
+ version = header.version;
66
+ if (header.binaryChunk)
67
+ binary = new Uint8Array(source.buffer, source.byteOffset + header.binaryChunk.offset, header.binaryChunk.length);
68
+ try {
69
+ const jsonBytes = new Uint8Array(source.buffer, source.byteOffset + header.jsonChunk.offset, header.jsonChunk.length);
70
+ const jsonStr = (0, core_bentley_1.utf8ToString)(jsonBytes);
71
+ if (undefined === jsonStr)
72
+ return undefined;
73
+ json = JSON.parse(jsonStr);
74
+ }
75
+ catch (_) {
76
+ return undefined;
77
+ }
78
+ }
79
+ }
80
+ else {
81
+ version = 2; // ###TODO verify against source.asset?.version
82
+ json = source;
83
+ }
84
+ // asset is required in glTF 2, optional in glTF 1
85
+ const asset = core_bentley_1.JsonUtils.asObject(json.asset);
86
+ if (version === 2 && !asset)
87
+ return undefined;
88
+ const document = {
89
+ asset,
90
+ scene: core_bentley_1.JsonUtils.asString(json.scene),
91
+ extensions: core_bentley_1.JsonUtils.asObject(json.extensions),
92
+ extensionsUsed: core_bentley_1.JsonUtils.asArray(json.extensionsUsed),
93
+ extensionsRequired: core_bentley_1.JsonUtils.asArray(json.extensionsRequired),
94
+ accessors: core_bentley_1.JsonUtils.asObject(json.accessors),
95
+ buffers: core_bentley_1.JsonUtils.asObject(json.buffers),
96
+ bufferViews: core_bentley_1.JsonUtils.asObject(json.bufferViews),
97
+ images: core_bentley_1.JsonUtils.asObject(json.images),
98
+ materials: core_bentley_1.JsonUtils.asObject(json.materials),
99
+ meshes: core_bentley_1.JsonUtils.asObject(json.meshes),
100
+ nodes: core_bentley_1.JsonUtils.asObject(json.nodes),
101
+ samplers: core_bentley_1.JsonUtils.asObject(json.samplers),
102
+ scenes: core_bentley_1.JsonUtils.asObject(json.scenes),
103
+ textures: core_bentley_1.JsonUtils.asObject(json.textures),
104
+ techniques: core_bentley_1.JsonUtils.asObject(json.techniques),
105
+ };
106
+ if (!document.meshes)
107
+ return undefined;
108
+ const logger = args.logger ?? {
109
+ log: (message, type) => {
110
+ const category = `${FrontendLoggerCategory_1.FrontendLoggerCategory.Package}.gltf`;
111
+ const fn = type === "error" ? "logError" : (type === "warning" ? "logWarning" : "logInfo");
112
+ core_bentley_1.Logger[fn](category, message);
113
+ },
114
+ };
115
+ const parser = new GltfParser({
116
+ document,
117
+ version,
118
+ upAxis: args.upAxis ?? "y",
119
+ binary,
120
+ baseUrl: args.baseUrl,
121
+ logger,
122
+ isCanceled: () => args.isCanceled ?? false,
123
+ imageFromImageSource: (args.noCreateImageBitmap ?
124
+ async (imgSrc) => (0, ImageUtil_1.imageElementFromImageSource)(imgSrc) :
125
+ async (imgSrc) => (0, ImageUtil_1.imageBitmapFromImageSource)(imgSrc)),
126
+ });
127
+ return parser.parse();
128
+ }
129
+ exports.parseGltf = parseGltf;
130
+ class GltfParser {
131
+ constructor(options) {
132
+ this._dracoMeshes = new Map();
133
+ this._version = options.version;
134
+ this._upAxis = options.upAxis;
135
+ this._baseUrl = options.baseUrl;
136
+ this._logger = options.logger;
137
+ this._isCanceled = options.isCanceled;
138
+ this._imageFromImageSource = options.imageFromImageSource;
139
+ const emptyDict = {};
140
+ const doc = options.document;
141
+ this._buffers = doc.buffers ?? emptyDict;
142
+ this._images = doc.images ?? emptyDict;
143
+ this._nodes = doc.nodes ?? emptyDict;
144
+ this._meshes = doc.meshes ?? emptyDict;
145
+ this._bufferViews = doc.bufferViews ?? emptyDict;
146
+ this._accessors = doc.accessors ?? emptyDict;
147
+ if (options.binary) {
148
+ const buffer = this._buffers[this._version === 2 ? 0 : "binary_glTF"];
149
+ if (buffer && undefined === buffer.uri)
150
+ buffer.resolvedBuffer = { data: options.binary };
151
+ }
152
+ let sceneNodes;
153
+ if (doc.scenes && undefined !== doc.scene)
154
+ sceneNodes = doc.scenes[doc.scene]?.nodes;
155
+ this._sceneNodes = sceneNodes ?? Object.keys(this._nodes);
156
+ }
157
+ async parse() {
158
+ // ###TODO_GLTF RTC_CENTER
159
+ // ###TODO_GLTF pseudo-rtc bias (apply translation to each point at read time, for scalable mesh...)
160
+ const toWorld = undefined;
161
+ await this.resolveResources();
162
+ if (this._isCanceled())
163
+ return undefined;
164
+ // ###TODO_GLTF compute content range (maybe do so elsewhere?)
165
+ // I think spec says POSITION must specify min and max?
166
+ const nodes = [];
167
+ for (const nodeKey of this._sceneNodes) {
168
+ const node = this._nodes[nodeKey];
169
+ if (node)
170
+ nodes.push(this.parseNode(node));
171
+ }
172
+ return {
173
+ toWorld,
174
+ nodes,
175
+ };
176
+ }
177
+ parseNode(node) {
178
+ const primitives = [];
179
+ for (const meshId of (0, GltfSchema_1.getGltfNodeMeshIds)(node)) {
180
+ const mesh = this._meshes[meshId];
181
+ if (!mesh)
182
+ continue;
183
+ const parsedPrimitives = this.parsePrimitives(mesh);
184
+ for (const primitive of parsedPrimitives)
185
+ primitives.push(primitive);
186
+ }
187
+ let toParent;
188
+ if (node.matrix) {
189
+ const origin = core_geometry_1.Point3d.create(node.matrix[12], node.matrix[13], node.matrix[14]);
190
+ const matrix = core_geometry_1.Matrix3d.createRowValues(node.matrix[0], node.matrix[4], node.matrix[8], node.matrix[1], node.matrix[5], node.matrix[9], node.matrix[2], node.matrix[6], node.matrix[10]);
191
+ toParent = core_geometry_1.Transform.createOriginAndMatrix(origin, matrix);
192
+ }
193
+ else if (node.rotation || node.scale || node.translation) {
194
+ // SPEC: To compose the local transformation matrix, TRS properties MUST be converted to matrices and postmultiplied in the T * R * S order;
195
+ // first the scale is applied to the vertices, then the rotation, and then the translation.
196
+ const scale = core_geometry_1.Transform.createRefs(undefined, node.scale ? core_geometry_1.Matrix3d.createScale(node.scale[0], node.scale[1], node.scale[2]) : core_geometry_1.Matrix3d.identity);
197
+ const rot = core_geometry_1.Transform.createRefs(undefined, node.rotation ? core_geometry_1.Matrix3d.createFromQuaternion(core_geometry_1.Point4d.create(node.rotation[0], node.rotation[1], node.rotation[2], node.rotation[3])) : core_geometry_1.Matrix3d.identity);
198
+ rot.matrix.transposeInPlace(); // See comment on Matrix3d.createFromQuaternion
199
+ const trans = core_geometry_1.Transform.createTranslation(node.translation ? new core_geometry_1.Point3d(node.translation[0], node.translation[1], node.translation[2]) : core_geometry_1.Point3d.createZero());
200
+ toParent = scale.multiplyTransformTransform(rot);
201
+ trans.multiplyTransformTransform(toParent, toParent);
202
+ }
203
+ return {
204
+ primitives,
205
+ toParent,
206
+ };
207
+ }
208
+ parsePrimitives(mesh) {
209
+ const primitives = [];
210
+ if (!mesh.primitives)
211
+ return primitives;
212
+ for (const primitive of mesh.primitives) {
213
+ const parsedPrimitive = this.parsePrimitive(primitive);
214
+ if (parsedPrimitive)
215
+ primitives.push(parsedPrimitive);
216
+ }
217
+ return primitives;
218
+ }
219
+ parsePrimitive(primitive) {
220
+ const meshMode = core_bentley_1.JsonUtils.asInt(primitive.mode, GltfSchema_1.GltfMeshMode.Triangles);
221
+ switch (meshMode) {
222
+ case GltfSchema_1.GltfMeshMode.TriangleStrip:
223
+ return this.parseTrianglesPrimitive(primitive);
224
+ default:
225
+ // ###TODO_GLTF Make parser support all primitive types. Consumer can choose to do whatever with them.
226
+ return undefined;
227
+ }
228
+ }
229
+ parseTrianglesPrimitive(primitive) {
230
+ const posId = primitive.attributes.POSITION;
231
+ const pos = undefined !== posId ? this._accessors[posId] : undefined;
232
+ if (!pos)
233
+ return undefined;
234
+ return undefined; // ###TODO_GLTF
235
+ }
236
+ traverseNodes(nodeIds) {
237
+ return (0, GltfSchema_1.traverseGltfNodes)(nodeIds, this._nodes, new Set());
238
+ }
239
+ async resolveResources() {
240
+ // Load any external images and buffers.
241
+ await this._resolveResources();
242
+ // If any meshes are draco-compressed, dynamically load the decoder module and then decode the meshes.
243
+ const dracoMeshes = [];
244
+ for (const node of this.traverseNodes(this._sceneNodes)) {
245
+ for (const meshId of (0, GltfSchema_1.getGltfNodeMeshIds)(node)) {
246
+ const mesh = this._meshes[meshId];
247
+ if (mesh?.primitives)
248
+ for (const primitive of mesh.primitives)
249
+ if (primitive.extensions?.KHR_draco_mesh_compression)
250
+ dracoMeshes.push(primitive.extensions.KHR_draco_mesh_compression);
251
+ }
252
+ }
253
+ if (dracoMeshes.length === 0)
254
+ return;
255
+ try {
256
+ const dracoLoader = (await Promise.resolve().then(() => __importStar(require("@loaders.gl/draco")))).DracoLoader;
257
+ await Promise.all(dracoMeshes.map(async (x) => this.decodeDracoMesh(x, dracoLoader)));
258
+ }
259
+ catch (err) {
260
+ core_bentley_1.Logger.logWarning(FrontendLoggerCategory_1.FrontendLoggerCategory.Render, "Failed to decode draco-encoded glTF mesh");
261
+ core_bentley_1.Logger.logException(FrontendLoggerCategory_1.FrontendLoggerCategory.Render, err);
262
+ }
263
+ }
264
+ async _resolveResources() {
265
+ // ###TODO traverse the scene nodes to find resources referenced by them, instead of resolving everything - some resources may not
266
+ // be required for the scene.
267
+ const promises = [];
268
+ try {
269
+ for (const buffer of (0, GltfSchema_1.gltfDictionaryIterator)(this._buffers))
270
+ if (!buffer.resolvedBuffer)
271
+ promises.push(this.resolveBuffer(buffer));
272
+ await Promise.all(promises);
273
+ if (this._isCanceled())
274
+ return;
275
+ promises.length = 0;
276
+ for (const image of (0, GltfSchema_1.gltfDictionaryIterator)(this._images))
277
+ if (!image.resolvedImage)
278
+ promises.push(this.resolveImage(image));
279
+ await Promise.all(promises);
280
+ }
281
+ catch (_) {
282
+ // ###TODO_GLTF log
283
+ }
284
+ }
285
+ resolveUrl(uri) {
286
+ try {
287
+ return new URL(uri, this._baseUrl).toString();
288
+ }
289
+ catch (_) {
290
+ return undefined;
291
+ }
292
+ }
293
+ async resolveBuffer(buffer) {
294
+ if (buffer.resolvedBuffer || undefined === buffer.uri)
295
+ return;
296
+ try {
297
+ const url = this.resolveUrl(buffer.uri);
298
+ const response = url ? await fetch(url) : undefined;
299
+ if (this._isCanceled())
300
+ return;
301
+ const data = await response?.arrayBuffer();
302
+ if (this._isCanceled())
303
+ return;
304
+ if (data)
305
+ buffer.resolvedBuffer = { data: new Uint8Array(data) };
306
+ }
307
+ catch (_) {
308
+ //
309
+ }
310
+ }
311
+ async resolveImage(image) {
312
+ if (image.resolvedImage)
313
+ return;
314
+ const bvSrc = undefined !== image.bufferView ? image : image.extensions?.KHR_binary_glTF;
315
+ if (undefined !== bvSrc?.bufferView) {
316
+ const format = undefined !== bvSrc.mimeType ? (0, ImageUtil_1.getImageSourceFormatForMimeType)(bvSrc.mimeType) : undefined;
317
+ const bufferView = this._bufferViews[bvSrc.bufferView];
318
+ if (undefined === format || !bufferView || !bufferView.byteLength || bufferView.byteLength < 0)
319
+ return;
320
+ const bufferData = this._buffers[bufferView.buffer]?.resolvedBuffer?.data;
321
+ if (!bufferData)
322
+ return;
323
+ const offset = bufferView.byteOffset ?? 0;
324
+ const bytes = bufferData.subarray(offset, offset + bufferView.byteLength);
325
+ try {
326
+ const imageSource = new core_common_1.ImageSource(bytes, format);
327
+ image.resolvedImage = await this._imageFromImageSource(imageSource);
328
+ }
329
+ catch (_) {
330
+ //
331
+ }
332
+ return;
333
+ }
334
+ const url = undefined !== image.uri ? this.resolveUrl(image.uri) : undefined;
335
+ if (undefined !== url)
336
+ image.resolvedImage = await (0, ImageUtil_1.tryImageElementFromUrl)(url);
337
+ }
338
+ async decodeDracoMesh(ext, loader) {
339
+ const bv = this._bufferViews[ext.bufferView];
340
+ if (!bv || !bv.byteLength)
341
+ return;
342
+ let buf = this._buffers[bv.buffer]?.resolvedBuffer?.data;
343
+ if (!buf)
344
+ return;
345
+ const offset = bv.byteOffset ?? 0;
346
+ buf = buf.subarray(offset, offset + bv.byteLength);
347
+ const mesh = await loader.parse(buf, {}); // NB: `options` argument declared optional but will produce exception if not supplied.
348
+ if (mesh)
349
+ this._dracoMeshes.set(ext, mesh);
350
+ }
351
+ }
352
+ //# sourceMappingURL=GltfParser.js.map