@itwin/core-frontend 4.4.0-dev.6 → 4.4.0-dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change Log - @itwin/core-frontend
2
2
 
3
- This log was last generated on Wed, 13 Dec 2023 17:26:56 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 14 Dec 2023 20:24:02 GMT and should not be manually modified.
4
+
5
+ ## 4.3.2
6
+ Thu, 14 Dec 2023 20:23:02 GMT
7
+
8
+ _Version update only_
4
9
 
5
10
  ## 4.3.1
6
11
  Wed, 13 Dec 2023 17:25:55 GMT
@@ -143,6 +143,7 @@ const extensionExports = {
143
143
  OutputMessagePriority: core_frontend_1.OutputMessagePriority,
144
144
  OutputMessageType: core_frontend_1.OutputMessageType,
145
145
  ParseAndRunResult: core_frontend_1.ParseAndRunResult,
146
+ ParticleCollectionBuilder: core_frontend_1.ParticleCollectionBuilder,
146
147
  PerModelCategoryVisibility: core_frontend_1.PerModelCategoryVisibility,
147
148
  PhysicalModelState: core_frontend_1.PhysicalModelState,
148
149
  Pixel: core_frontend_1.Pixel,
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionRuntime.js","sourceRoot":"","sources":["../../../src/extension/ExtensionRuntime.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAEH,yDAAyD;AACzD,sDAAsD;AACtD,iCAAiC;AAEjC,mDAAgD;AAEhD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAC/D,IAAK,UAAkB,CAAC,YAAY,CAAC;IACnC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;AAErE,uBAAuB;AACvB,oDA+L0B;AAE1B,oDAiE4B;AAE5B,MAAM,gBAAgB,GAAG;IACvB,iBAAiB,EAAjB,iCAAiB;IACjB,OAAO,EAAP,uBAAO;IACP,mB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,6CAA6B;IAC7B,qBAAqB,EAArB,qCAAqB;IACrB,oBAAoB,EAApB,oCAAoB;IACpB,gBAAgB,EAAhB,gCAAgB;IAChB,4BAA4B,EAA5B,4CAA4B;IAC5B,2BAA2B,EAA3B,2CAA2B;IAC3B,+BAA+B,EAA/B,+CAA+B;IAC/B,sBAAsB,EAAtB,sCAAsB;IACtB,6BAA6B,EAA7B,6CAA6B;IAC7B,mBAAmB,EAAnB,mCAAmB;IACnB,uBAAuB,EAAvB,uCAAuB;IACvB,2BAA2B,EAA3B,2CAA2B;IAC3B,mBAAmB,EAAnB,mCAAmB;IACnB,2BAA2B,EAA3B,2CAA2B;IAC3B,mBAAmB,EAAnB,mCAAmB;IACnB,gBAAgB,EAAhB,gCAAgB;IAChB,yBAAyB,EAAzB,yCAAyB;IACzB,wBAAwB,EAAxB,wCAAwB;CACzB,CAAC;AAEF,qBAAqB;AAErB,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,OAAO;QACL,OAAO,EAAE;YACP,aAAa;YACb,aAAa,EAAb,6BAAa;YACb,YAAY;YACZ,GAAG,gBAAgB;SACpB;KACF,CAAC;AACJ,CAAC,CAAC;AAED,UAAkB,CAAC,YAAY,CAAC,GAAG;IAClC,eAAe;CAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Extensions\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @itwin/no-internal-barrel-imports */\r\n/* eslint-disable sort-imports */\r\n\r\nimport { ExtensionHost } from \"./ExtensionHost\";\r\n\r\nconst globalSymbol = Symbol.for(\"itwin.core.frontend.globals\");\r\nif ((globalThis as any)[globalSymbol])\r\n throw new Error(\"Multiple @itwin/core-frontend imports detected!\");\r\n\r\n// BEGIN GENERATED CODE\r\nimport {\r\n // @public enum(s) from @itwin/core-frontend\r\n ACSDisplayOptions,\r\n ACSType,\r\n ActivityMessageEndReason,\r\n BeButton,\r\n BeModifierKeys,\r\n ClipEventType,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n EventHandled,\r\n FlashMode,\r\n FrontendLoggerCategory,\r\n GraphicType,\r\n HitDetailType,\r\n HitGeomType,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n InputSource,\r\n KeyinParseError,\r\n LocateAction,\r\n LocateFilterStatus,\r\n ManipulatorToolEvent,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSetEventType,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n StandardViewId,\r\n StartOrResume,\r\n TileBoundingBoxes,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileTreeLoadStatus,\r\n TileVisibility,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n UniformType,\r\n VaryingType,\r\n ViewStatus,\r\n // @public real(s) from @itwin/core-frontend\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n Cluster,\r\n ContextRealityModelState,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n EditManipulator,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n FeatureSymbology,\r\n FlashSettings,\r\n FrustumAnimator,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GlobeAnimator,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n HiliteSet,\r\n HitDetail,\r\n HitList,\r\n IModelConnection,\r\n IconSprites,\r\n InputCollector,\r\n InteractiveTool,\r\n IntersectDetail,\r\n LocateOptions,\r\n LocateResponse,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n ModelSelectorState,\r\n ModelState,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PrimitiveTool,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SelectionSet,\r\n SheetModelState,\r\n SheetViewState,\r\n SnapDetail,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n TentativePoint,\r\n Tile,\r\n TileAdmin,\r\n TileDrawArgs,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n} from \"../core-frontend\";\r\n\r\nimport {\r\n // @public enum(s) from @itwin/core-common\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n CommonLoggerCategory,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n ElementGeometryOpcode,\r\n FeatureOverrideType,\r\n FillDisplay,\r\n FillFlags,\r\n FontType,\r\n GeoCoordStatus,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeMode,\r\n GridOrientationType,\r\n HSVConstants,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n LinePixels,\r\n MassPropertiesOperation,\r\n MonochromeMode,\r\n Npc,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n QueryRowFormat,\r\n Rank,\r\n RenderMode,\r\n SectionType,\r\n SkyBoxImageType,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SyncMode,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n TxnAction,\r\n TypeOfChange,\r\n // @public real(s) from @itwin/core-common\r\n ClipIntersectionStyle,\r\n ColorByName,\r\n ColorDef,\r\n FrustumPlanes,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n} from \"@itwin/core-common\";\r\n\r\nconst extensionExports = {\r\n ACSDisplayOptions,\r\n ACSType,\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n ActivityMessageEndReason,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BeButton,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeModifierKeys,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n ClipEventType,\r\n ClipIntersectionStyle,\r\n Cluster,\r\n ColorByName,\r\n ColorDef,\r\n CommonLoggerCategory,\r\n ContextRealityModelState,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n EditManipulator,\r\n ElementGeometryOpcode,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n EventHandled,\r\n FeatureOverrideType,\r\n FeatureSymbology,\r\n FillDisplay,\r\n FillFlags,\r\n FlashMode,\r\n FlashSettings,\r\n FontType,\r\n FrontendLoggerCategory,\r\n FrustumAnimator,\r\n FrustumPlanes,\r\n GeoCoordStatus,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeAnimator,\r\n GlobeMode,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n GraphicType,\r\n GridOrientationType,\r\n HSVConstants,\r\n HiliteSet,\r\n HitDetail,\r\n HitDetailType,\r\n HitGeomType,\r\n HitList,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n IModelConnection,\r\n IconSprites,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n InputCollector,\r\n InputSource,\r\n InteractiveTool,\r\n IntersectDetail,\r\n KeyinParseError,\r\n LinePixels,\r\n LocateAction,\r\n LocateFilterStatus,\r\n LocateOptions,\r\n LocateResponse,\r\n ManipulatorToolEvent,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n MassPropertiesOperation,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n ModelSelectorState,\r\n ModelState,\r\n MonochromeMode,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n Npc,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n PrimitiveTool,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n QueryRowFormat,\r\n Rank,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderMode,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SectionType,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSet,\r\n SelectionSetEventType,\r\n SheetModelState,\r\n SheetViewState,\r\n SkyBoxImageType,\r\n SnapDetail,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n StandardViewId,\r\n StartOrResume,\r\n SyncMode,\r\n TentativePoint,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n Tile,\r\n TileAdmin,\r\n TileBoundingBoxes,\r\n TileDrawArgs,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeLoadStatus,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n TileVisibility,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n TxnAction,\r\n TypeOfChange,\r\n UniformType,\r\n VaryingType,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewStatus,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n};\r\n\r\n// END GENERATED CODE\r\n\r\nconst getExtensionApi = (_id: string) => {\r\n return {\r\n exports: {\r\n // exceptions\r\n ExtensionHost,\r\n // automated\r\n ...extensionExports,\r\n },\r\n };\r\n};\r\n\r\n(globalThis as any)[globalSymbol] = {\r\n getExtensionApi,\r\n};\r\n"]}
1
+ {"version":3,"file":"ExtensionRuntime.js","sourceRoot":"","sources":["../../../src/extension/ExtensionRuntime.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAEH,yDAAyD;AACzD,sDAAsD;AACtD,iCAAiC;AAEjC,mDAAgD;AAEhD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAC/D,IAAK,UAAkB,CAAC,YAAY,CAAC;IACnC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;AAErE,uBAAuB;AACvB,oDAgM0B;AAE1B,oDAiE4B;AAE5B,MAAM,gBAAgB,GAAG;IACvB,iBAAiB,EAAjB,iCAAiB;IACjB,OAAO,EAAP,uBAAO;IACP,mBAAmB,EAAnB,mCAAmB;IACnB,QAAQ,EAAR,wBAAQ;IACR,sBAAsB,EAAtB,sCAAsB;IACtB,wBAAwB,EAAxB,wCAAwB;IACxB,qBAAqB,EAArB,qCAAqB;IACrB,qBAAqB,EAArB,qCA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C5B,2BAA2B,EAA3B,2CAA2B;IAC3B,+BAA+B,EAA/B,+CAA+B;IAC/B,sBAAsB,EAAtB,sCAAsB;IACtB,6BAA6B,EAA7B,6CAA6B;IAC7B,mBAAmB,EAAnB,mCAAmB;IACnB,uBAAuB,EAAvB,uCAAuB;IACvB,2BAA2B,EAA3B,2CAA2B;IAC3B,mBAAmB,EAAnB,mCAAmB;IACnB,2BAA2B,EAA3B,2CAA2B;IAC3B,mBAAmB,EAAnB,mCAAmB;IACnB,gBAAgB,EAAhB,gCAAgB;IAChB,yBAAyB,EAAzB,yCAAyB;IACzB,wBAAwB,EAAxB,wCAAwB;CACzB,CAAC;AAEF,qBAAqB;AAErB,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,OAAO;QACL,OAAO,EAAE;YACP,aAAa;YACb,aAAa,EAAb,6BAAa;YACb,YAAY;YACZ,GAAG,gBAAgB;SACpB;KACF,CAAC;AACJ,CAAC,CAAC;AAED,UAAkB,CAAC,YAAY,CAAC,GAAG;IAClC,eAAe;CAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Extensions\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @itwin/no-internal-barrel-imports */\r\n/* eslint-disable sort-imports */\r\n\r\nimport { ExtensionHost } from \"./ExtensionHost\";\r\n\r\nconst globalSymbol = Symbol.for(\"itwin.core.frontend.globals\");\r\nif ((globalThis as any)[globalSymbol])\r\n throw new Error(\"Multiple @itwin/core-frontend imports detected!\");\r\n\r\n// BEGIN GENERATED CODE\r\nimport {\r\n // @public enum(s) from @itwin/core-frontend\r\n ACSDisplayOptions,\r\n ACSType,\r\n ActivityMessageEndReason,\r\n BeButton,\r\n BeModifierKeys,\r\n ClipEventType,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n EventHandled,\r\n FlashMode,\r\n FrontendLoggerCategory,\r\n GraphicType,\r\n HitDetailType,\r\n HitGeomType,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n InputSource,\r\n KeyinParseError,\r\n LocateAction,\r\n LocateFilterStatus,\r\n ManipulatorToolEvent,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSetEventType,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n StandardViewId,\r\n StartOrResume,\r\n TileBoundingBoxes,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileTreeLoadStatus,\r\n TileVisibility,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n UniformType,\r\n VaryingType,\r\n ViewStatus,\r\n // @public real(s) from @itwin/core-frontend\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n Cluster,\r\n ContextRealityModelState,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n EditManipulator,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n FeatureSymbology,\r\n FlashSettings,\r\n FrustumAnimator,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GlobeAnimator,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n HiliteSet,\r\n HitDetail,\r\n HitList,\r\n IModelConnection,\r\n IconSprites,\r\n InputCollector,\r\n InteractiveTool,\r\n IntersectDetail,\r\n LocateOptions,\r\n LocateResponse,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n ModelSelectorState,\r\n ModelState,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n ParticleCollectionBuilder,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PrimitiveTool,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SelectionSet,\r\n SheetModelState,\r\n SheetViewState,\r\n SnapDetail,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n TentativePoint,\r\n Tile,\r\n TileAdmin,\r\n TileDrawArgs,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n} from \"../core-frontend\";\r\n\r\nimport {\r\n // @public enum(s) from @itwin/core-common\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n CommonLoggerCategory,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n ElementGeometryOpcode,\r\n FeatureOverrideType,\r\n FillDisplay,\r\n FillFlags,\r\n FontType,\r\n GeoCoordStatus,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeMode,\r\n GridOrientationType,\r\n HSVConstants,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n LinePixels,\r\n MassPropertiesOperation,\r\n MonochromeMode,\r\n Npc,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n QueryRowFormat,\r\n Rank,\r\n RenderMode,\r\n SectionType,\r\n SkyBoxImageType,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SyncMode,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n TxnAction,\r\n TypeOfChange,\r\n // @public real(s) from @itwin/core-common\r\n ClipIntersectionStyle,\r\n ColorByName,\r\n ColorDef,\r\n FrustumPlanes,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n} from \"@itwin/core-common\";\r\n\r\nconst extensionExports = {\r\n ACSDisplayOptions,\r\n ACSType,\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n ActivityMessageEndReason,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BeButton,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeModifierKeys,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n ClipEventType,\r\n ClipIntersectionStyle,\r\n Cluster,\r\n ColorByName,\r\n ColorDef,\r\n CommonLoggerCategory,\r\n ContextRealityModelState,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n EditManipulator,\r\n ElementGeometryOpcode,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n EventHandled,\r\n FeatureOverrideType,\r\n FeatureSymbology,\r\n FillDisplay,\r\n FillFlags,\r\n FlashMode,\r\n FlashSettings,\r\n FontType,\r\n FrontendLoggerCategory,\r\n FrustumAnimator,\r\n FrustumPlanes,\r\n GeoCoordStatus,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeAnimator,\r\n GlobeMode,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n GraphicType,\r\n GridOrientationType,\r\n HSVConstants,\r\n HiliteSet,\r\n HitDetail,\r\n HitDetailType,\r\n HitGeomType,\r\n HitList,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n IModelConnection,\r\n IconSprites,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n InputCollector,\r\n InputSource,\r\n InteractiveTool,\r\n IntersectDetail,\r\n KeyinParseError,\r\n LinePixels,\r\n LocateAction,\r\n LocateFilterStatus,\r\n LocateOptions,\r\n LocateResponse,\r\n ManipulatorToolEvent,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n MassPropertiesOperation,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n ModelSelectorState,\r\n ModelState,\r\n MonochromeMode,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n Npc,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n ParticleCollectionBuilder,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n PrimitiveTool,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n QueryRowFormat,\r\n Rank,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderMode,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SectionType,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSet,\r\n SelectionSetEventType,\r\n SheetModelState,\r\n SheetViewState,\r\n SkyBoxImageType,\r\n SnapDetail,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n StandardViewId,\r\n StartOrResume,\r\n SyncMode,\r\n TentativePoint,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n Tile,\r\n TileAdmin,\r\n TileBoundingBoxes,\r\n TileDrawArgs,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeLoadStatus,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n TileVisibility,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n TxnAction,\r\n TypeOfChange,\r\n UniformType,\r\n VaryingType,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewStatus,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n};\r\n\r\n// END GENERATED CODE\r\n\r\nconst getExtensionApi = (_id: string) => {\r\n return {\r\n exports: {\r\n // exceptions\r\n ExtensionHost,\r\n // automated\r\n ...extensionExports,\r\n },\r\n };\r\n};\r\n\r\n(globalThis as any)[globalSymbol] = {\r\n getExtensionApi,\r\n};\r\n"]}
@@ -83,7 +83,10 @@ export interface ParticleCollectionBuilder {
83
83
  */
84
84
  finish: () => RenderGraphic | undefined;
85
85
  }
86
- /** @public */
86
+ /**
87
+ * @public
88
+ * @extensions
89
+ */
87
90
  export declare namespace ParticleCollectionBuilder {
88
91
  /** Creates a new ParticleCollectionBuilder.
89
92
  * @throws Error if size is not greater than zero.
@@ -1 +1 @@
1
- {"version":3,"file":"ParticleCollectionBuilder.d.ts","sourceRoot":"","sources":["../../../src/render/ParticleCollectionBuilder.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAkD,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC/G,OAAO,EAC8G,aAAa,EACjI,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;OAEG;I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AE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IAErB,uGAAuG;IACvG,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,yDAAyD;IACzD,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEtB,6KAA6K;IAC7K,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sIAAsI;IACtI,cAAc,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB,iIAAiI;IACjI,IAAI,EAAE,KAAK,CAAC;IAEZ;;;;OAIG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IAE/C;;;OAGG;IACH,MAAM,EAAE,MAAM,aAAa,GAAG,SAAS,CAAC;CACzC;AAED;;;GAGG;AACH,yBAAiB,yBAAyB,CAAC;IACzC;;OAEG;IACH,SAAgB,MAAM,CAAC,MAAM,EAAE,+BAA+B,GAAG,yBAAyB,CAEzF;CACF"}
@@ -13,7 +13,10 @@ const core_common_1 = require("@itwin/core-common");
13
13
  const GraphicBranch_1 = require("./GraphicBranch");
14
14
  const DisplayParams_1 = require("../common/render/primitives/DisplayParams");
15
15
  const VertexTableBuilder_1 = require("./primitives/VertexTableBuilder");
16
- /** @public */
16
+ /**
17
+ * @public
18
+ * @extensions
19
+ */
17
20
  var ParticleCollectionBuilder;
18
21
  (function (ParticleCollectionBuilder) {
19
22
  /** Creates a new ParticleCollectionBuilder.
@@ -1 +1 @@
1
- {"version":3,"file":"ParticleCollectionBuilder.js","sourceRoot":"","sources":["../../../src/render/ParticleCollectionBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAA+G;AAC/G,oDAE4B;AAG5B,mDAAgD;AAEhD,6EAA0E;AAE1E,wEAAmE;AA6FnE,cAAc;AACd,IAAiB,yBAAyB,CAOzC;AAPD,WAAiB,yBAAyB;IACxC;;OAEG;IACH,SAAgB,MAAM,CAAC,MAAuC;QAC5D,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAFe,gCAAM,SAErB,CAAA;AACH,CAAC,EAPgB,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAOzC;AAED,MAAM,QAAQ;IAOZ,YAAmB,QAAgB,EAAE,KAAa,EAAE,MAAc,EAAE,YAAoB,EAAE,cAAyB;QACjH,IAAI,CAAC,QAAQ,GAAG,uBAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;CACF;AAED,MAAM,OAAO;IAaX,YAAmB,MAAuC;QANlD,4BAAuB,GAAG,KAAK,CAAC;QAEvB,WAAM,GAAG,uBAAO,CAAC,UAAU,EAAE,CAAC;QACvC,qBAAgB,GAAe,EAAE,CAAC;QAClC,0BAAqB,GAAe,EAAE,CAAC;QAG7C,IAAI,CAAC,SAAS,GAAG,MAAM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CAAC;IACxC,IAAI,YAAY,GAAG,6BAAa,CAAC,eAAe;QAC9C,YAAY,GAAG,CAAC,CAAC;IAEnB,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,YAAY,CAAC,aAAsB,EAAE,MAAe,EAAE,OAAe;IAC5E,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;IACrC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,OAAO,GAAG,GAAG,CAAC;IAC/B,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { Matrix3d, Point2d, Point3d, Range3d, Transform, Vector2d, XAndY, XYAndZ } from \"@itwin/core-geometry\";\r\nimport {\r\n ColorDef, ColorIndex, Feature, FeatureIndex, FeatureTable, FillFlags, PackedFeatureTable, QParams3d, QPoint3dList, RenderTexture,\r\n} from \"@itwin/core-common\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicBranch } from \"./GraphicBranch\";\r\nimport { MeshArgs } from \"./primitives/mesh/MeshPrimitives\";\r\nimport { DisplayParams } from \"../common/render/primitives/DisplayParams\";\r\nimport { MeshParams } from \"../common/render/primitives/MeshParams\";\r\nimport { createMeshParams } from \"./primitives/VertexTableBuilder\";\r\n\r\n/** Parameters used to construct a [[ParticleCollectionBuilder]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilderParams {\r\n /** The image mapped to each particle quad.\r\n * @note The texture should be disposed of when no longer needed to free up WebGL resources. For example, if a [[Decorator]] creates the texture, the\r\n * texture should probably be disposed of when the decorator is removed from the [[ViewManager]].\r\n */\r\n texture: RenderTexture;\r\n\r\n /** The default extents of the particle quad. Individual particles may apply a scale to these extents to produce particles of varying dimensions.\r\n * Must be positive.\r\n */\r\n size: XAndY | number;\r\n\r\n /** The initial transparency of the particles as an integer in [0,255]. Defaults to zero if omitted. */\r\n transparency?: number;\r\n\r\n /** The origin of the particle collection in world coordinates. Defaults to (0, 0, 0). */\r\n origin?: XYAndZ;\r\n\r\n /** If the particles are to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\r\n * @see [[IModelConnection.transientIdSequence]] to obtain an Id that is unique within an iModel.\r\n */\r\n pickableId?: Id64String;\r\n\r\n /** The viewport in which the particles will be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, the finished graphic will be defined in view coordinates, for use as a decoration of type [[GraphicType.ViewBackground]] or [[GraphicType.ViewOverlay]].\r\n * Defaults to false, indicating the graphic will be defined in world coordinates.\r\n * @see [[CoordSystem.View]] and [[CoordSystem.World]].\r\n */\r\n isViewCoords?: boolean;\r\n}\r\n\r\n/** Describes a particle to to add to a particle collection via [[ParticleCollectionBuilder.addParticle]].\r\n * The x, y, and z coordinates represent the centroid of the particle quad in the collection's coordinate space.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleProps extends XYAndZ {\r\n /** The size of the particle, in the collection's coordinate space. If omitted, it defaults to the size supplied to the collection by [[ParticleCollectionBuilderParams.size]].\r\n * Supplying a `number` produces a square; supplying a non-uniform `XAndY` produces a rectangle. Must be positive.\r\n */\r\n size?: XAndY | number;\r\n\r\n /** The transparency with which to draw the particle as an integer in [0,255]. If omitted, it defaults to the current value of [[ParticleCollectionBuilder.transparency]]. */\r\n transparency?: number;\r\n\r\n /** A rotation matrix to orient the particle. If supplied then the particle will not be automatically oriented towards the camera. */\r\n rotationMatrix?: Matrix3d;\r\n}\r\n\r\n/** Interface for producing a collection of particles suitable for use in particle effects.\r\n * Particle effects involve animating hundreds or thousands of small particles to simulate phenomena like smoke, fire, snow, etc.\r\n * A particle collection represents each particle as a quad (rectangle) displaying an image. The position of each particle corresponds to the\r\n * centroid of its quad. The transparency and size of each particle can be specified individually. By default, the quads will always rotate to face the camera\r\n * such that the image is fully visible.\r\n *\r\n * Creating a particle collection using a ParticleCollectionBuilder is far more efficient (in both CPU and GPU usage) than doing so using a [[GraphicBuilder]].\r\n * @see interactive demonstrations of [Snow and Rain](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=snow-rain-sample&imodel=Villa) and\r\n * [Fire and Smoke](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=fire-sample&imodel=Villa) particle effects.\r\n * @see [SnowEffect]($frontend-devtools) for an example of a particle effect.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilder {\r\n /** The default transparency for newly-added particles as an integer in [0,255], used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.transparency]] is omitted.\r\n * Changing this value has no effect on the transparency of previously-added particles.\r\n */\r\n transparency: number;\r\n\r\n /** The default size of each particle, used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.size]] is omitted. */\r\n size: XAndY;\r\n\r\n /** Add a particle to the collection.\r\n * If `size` is omitted, `this.size` is used.\r\n * If `transparency` is omitted, `this.transparency` is used.\r\n * @throws Error if particle size is defined and not greater than zero.\r\n */\r\n addParticle: (particle: ParticleProps) => void;\r\n\r\n /** Produces a finished graphic from the accumulated particles.\r\n * It returns the finished graphic, or `undefined` if the collection contains no particles or the [[RenderSystem]] failed to produce the graphic.\r\n * @note After this method returns, the particle collection is empty.\r\n */\r\n finish: () => RenderGraphic | undefined;\r\n}\r\n\r\n/** @public */\r\nexport namespace ParticleCollectionBuilder {\r\n /** Creates a new ParticleCollectionBuilder.\r\n * @throws Error if size is not greater than zero.\r\n */\r\n export function create(params: ParticleCollectionBuilderParams): ParticleCollectionBuilder {\r\n return new Builder(params);\r\n }\r\n}\r\n\r\nclass Particle {\r\n public readonly centroid: Point3d;\r\n public readonly transparency: number;\r\n public readonly width: number;\r\n public readonly height: number;\r\n public readonly rotationMatrix?: Matrix3d;\r\n\r\n public constructor(centroid: XYAndZ, width: number, height: number, transparency: number, rotationMatrix?: Matrix3d) {\r\n this.centroid = Point3d.fromJSON(centroid);\r\n this.transparency = transparency;\r\n this.width = width;\r\n this.height = height;\r\n this.rotationMatrix = rotationMatrix;\r\n }\r\n}\r\n\r\nclass Builder implements ParticleCollectionBuilder {\r\n private readonly _viewport: Viewport;\r\n private readonly _isViewCoords: boolean;\r\n private readonly _pickableId?: Id64String;\r\n private readonly _texture: RenderTexture;\r\n private readonly _size: Vector2d;\r\n private _transparency: number;\r\n private _hasVaryingTransparency = false;\r\n private readonly _localToWorldTransform: Transform;\r\n private readonly _range = Range3d.createNull();\r\n private _particlesOpaque: Particle[] = [];\r\n private _particlesTranslucent: Particle[] = [];\r\n\r\n public constructor(params: ParticleCollectionBuilderParams) {\r\n this._viewport = params.viewport;\r\n this._isViewCoords = true === params.isViewCoords;\r\n this._pickableId = params.pickableId;\r\n this._texture = params.texture;\r\n this._transparency = undefined !== params.transparency ? clampTransparency(params.transparency) : 0;\r\n this._localToWorldTransform = params.origin ? Transform.createTranslationXYZ(params.origin.x, params.origin.y, params.origin.z) : Transform.createIdentity();\r\n\r\n if (\"number\" === typeof params.size)\r\n this._size = new Vector2d(params.size, params.size);\r\n else\r\n this._size = Vector2d.fromJSON(params.size);\r\n\r\n if (this._size.x <= 0 || this._size.y <= 0)\r\n throw new Error(\"Particle size must be greater than zero\");\r\n }\r\n\r\n public get size(): XAndY {\r\n return this._size;\r\n }\r\n\r\n public get transparency() {\r\n return this._transparency;\r\n }\r\n\r\n public set transparency(transparency: number) {\r\n transparency = clampTransparency(transparency);\r\n if (transparency !== this._transparency) {\r\n this._transparency = transparency;\r\n this._hasVaryingTransparency = this._particlesTranslucent.length > 0;\r\n }\r\n }\r\n\r\n public addParticle(props: ParticleProps): void {\r\n const size = props.size ?? this._size;\r\n let width, height;\r\n if (\"number\" === typeof size) {\r\n width = height = size;\r\n } else {\r\n width = size.x;\r\n height = size.y;\r\n }\r\n\r\n if (width <= 0 || height <= 0)\r\n throw new Error(\"A particle must have a size greater than zero\");\r\n\r\n const transparency = undefined !== props.transparency ? clampTransparency(props.transparency) : this.transparency;\r\n if (transparency !== this.transparency && this._particlesTranslucent.length > 0)\r\n this._hasVaryingTransparency = true;\r\n\r\n const particle = new Particle(props, width, height, transparency, props.rotationMatrix);\r\n if (transparency > 0)\r\n this._particlesTranslucent.push(particle);\r\n else\r\n this._particlesOpaque.push(particle);\r\n this._range.extendPoint(particle.centroid);\r\n }\r\n\r\n public finish(): RenderGraphic | undefined {\r\n if (0 === this._particlesTranslucent.length + this._particlesOpaque.length)\r\n return undefined;\r\n\r\n // Order-independent transparency doesn't work well with opaque geometry - it will look semi-transparent.\r\n // If we have a mix of opaque and transparent particles, put them in separate graphics to be rendered in separate passes.\r\n const opaque = this.createGraphic(this._particlesOpaque, 0);\r\n const transparent = this.createGraphic(this._particlesTranslucent, this._hasVaryingTransparency ? undefined : this._transparency);\r\n\r\n // Empty the collection before any return statements.\r\n const range = this._range.clone();\r\n this._range.setNull();\r\n this._particlesOpaque.length = 0;\r\n this._particlesTranslucent.length = 0;\r\n this._hasVaryingTransparency = false;\r\n\r\n if (!transparent && !opaque)\r\n return undefined;\r\n\r\n // Transform from origin to collection, then to world.\r\n const toCollection = Transform.createTranslation(range.center);\r\n const toWorld = toCollection.multiplyTransformTransform(this._localToWorldTransform);\r\n const branch = new GraphicBranch(true);\r\n if (opaque)\r\n branch.add(opaque);\r\n\r\n if (transparent)\r\n branch.add(transparent);\r\n\r\n let graphic = this._viewport.target.renderSystem.createGraphicBranch(branch, toWorld);\r\n\r\n // If we have a pickable Id, produce a batch.\r\n // NB: We pass this._pickableId as the FeatureTable's modelId so that it will be treated like a reality model or a map -\r\n // specifically, it can be located and display a tooltip, but can't be selected.\r\n const featureTable = this._pickableId ? new FeatureTable(1, this._pickableId) : undefined;\r\n if (featureTable) {\r\n this._localToWorldTransform.multiplyRange(range, range);\r\n featureTable.insert(new Feature(this._pickableId));\r\n graphic = this._viewport.target.renderSystem.createBatch(graphic, PackedFeatureTable.pack(featureTable), range);\r\n }\r\n\r\n return graphic;\r\n }\r\n\r\n private createGraphic(particles: Particle[], uniformTransparency: number | undefined): RenderGraphic | undefined {\r\n const numParticles = particles.length;\r\n if (numParticles <= 0)\r\n return undefined;\r\n\r\n // To keep scale values close to 1, compute mean size to use as size of quad.\r\n const meanSize = new Vector2d();\r\n let maxSize = 0;\r\n for (const particle of particles) {\r\n meanSize.x += particle.width;\r\n meanSize.y += particle.height;\r\n if (particle.width > maxSize)\r\n maxSize = particle.width;\r\n if (particle.height > maxSize)\r\n maxSize = particle.height;\r\n }\r\n meanSize.x /= numParticles;\r\n meanSize.y /= numParticles;\r\n\r\n // Define InstancedGraphicParams for particles.\r\n const rangeCenter = this._range.center;\r\n const floatsPerTransform = 12;\r\n const transforms = new Float32Array(floatsPerTransform * numParticles);\r\n const bytesPerOverride = 8;\r\n const symbologyOverrides = undefined === uniformTransparency ? new Uint8Array(bytesPerOverride * numParticles) : undefined;\r\n\r\n const viewToWorld = this._viewport.view.getRotation().transpose();\r\n let tfIndex = 0;\r\n let ovrIndex = 0;\r\n for (const particle of particles) {\r\n const scaleX = particle.width / meanSize.x;\r\n const scaleY = particle.height / meanSize.y;\r\n if (this._isViewCoords) {\r\n // Particles already face the camera in view coords - just apply the scale.\r\n transforms[tfIndex + 0] = scaleX;\r\n transforms[tfIndex + 5] = scaleY;\r\n transforms[tfIndex + 10] = 1;\r\n } else if (undefined !== particle.rotationMatrix) {\r\n // Scale rotation matrix relative to size of quad.\r\n transforms[tfIndex + 0] = particle.rotationMatrix.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = particle.rotationMatrix.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = particle.rotationMatrix.coffs[2];\r\n transforms[tfIndex + 4] = particle.rotationMatrix.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = particle.rotationMatrix.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = particle.rotationMatrix.coffs[5];\r\n transforms[tfIndex + 8] = particle.rotationMatrix.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = particle.rotationMatrix.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = particle.rotationMatrix.coffs[8];\r\n } else {\r\n // Rotate about origin by inverse view matrix so quads always face the camera and scale relative to size of quad.\r\n transforms[tfIndex + 0] = viewToWorld.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = viewToWorld.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = viewToWorld.coffs[2];\r\n transforms[tfIndex + 4] = viewToWorld.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = viewToWorld.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = viewToWorld.coffs[5];\r\n transforms[tfIndex + 8] = viewToWorld.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = viewToWorld.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = viewToWorld.coffs[8];\r\n }\r\n\r\n // Translate relative to center of particles range.\r\n transforms[tfIndex + 3] = particle.centroid.x - rangeCenter.x;\r\n transforms[tfIndex + 7] = particle.centroid.y - rangeCenter.y;\r\n transforms[tfIndex + 11] = particle.centroid.z - rangeCenter.z;\r\n\r\n tfIndex += floatsPerTransform;\r\n\r\n if (symbologyOverrides) {\r\n // See FeatureOverrides.buildLookupTable() for layout.\r\n symbologyOverrides[ovrIndex + 0] = 1 << 2; // OvrFlags.Alpha\r\n symbologyOverrides[ovrIndex + 7] = 0xff - particle.transparency;\r\n\r\n ovrIndex += bytesPerOverride;\r\n }\r\n }\r\n\r\n // Produce instanced quads.\r\n // Note: We do not need to allocate an array of featureIds. If we have a pickableId, all particles refer to the same Feature, with index 0.\r\n // So we leave the vertex attribute disabled causing the shader to receive the default (0, 0, 0) which happens to correspond to our feature index.\r\n const quad = createQuad(meanSize, this._texture, uniformTransparency ?? 0x7f, this._viewport);\r\n const transformCenter = new Point3d(0, 0, 0);\r\n const range = computeRange(this._range, rangeCenter, maxSize);\r\n const instances = { count: numParticles, transforms, transformCenter, symbologyOverrides, range };\r\n return this._viewport.target.renderSystem.createMesh(quad, instances);\r\n }\r\n}\r\n\r\nfunction createQuad(size: XAndY, texture: RenderTexture, transparency: number, viewport: Viewport): MeshParams {\r\n const halfWidth = size.x / 2;\r\n const halfHeight = size.y / 2;\r\n const corners = [\r\n new Point3d(-halfWidth, -halfHeight, 0), new Point3d(halfWidth, -halfHeight, 0),\r\n new Point3d(-halfWidth, halfHeight, 0), new Point3d(halfWidth, halfHeight, 0),\r\n ];\r\n\r\n const range = new Range3d();\r\n range.low = corners[0];\r\n range.high = corners[3];\r\n\r\n const points = new QPoint3dList(QParams3d.fromRange(range));\r\n for (const corner of corners)\r\n points.add(corner);\r\n\r\n const colors = new ColorIndex();\r\n colors.initUniform(ColorDef.white.withTransparency(transparency));\r\n\r\n const quadArgs: MeshArgs = {\r\n points,\r\n vertIndices: [0, 1, 2, 2, 1, 3],\r\n fillFlags: FillFlags.None,\r\n isPlanar: true,\r\n colors,\r\n features: new FeatureIndex(),\r\n textureMapping: {\r\n texture,\r\n uvParams: [new Point2d(0, 1), new Point2d(1, 1), new Point2d(0, 0), new Point2d(1, 0)],\r\n },\r\n };\r\n\r\n return createMeshParams(quadArgs, viewport.target.renderSystem.maxTextureSize);\r\n}\r\n\r\nfunction clampTransparency(transparency: number): number {\r\n transparency = Math.min(255, transparency, Math.max(0, transparency));\r\n transparency = Math.floor(transparency);\r\n if (transparency < DisplayParams.minTransparency)\r\n transparency = 0;\r\n\r\n return transparency;\r\n}\r\n\r\nfunction computeRange(centroidRange: Range3d, center: Point3d, maxSize: number): Range3d {\r\n const range2 = centroidRange.clone();\r\n range2.low.subtractInPlace(center);\r\n range2.high.subtractInPlace(center);\r\n const halfSize = maxSize * 0.5;\r\n range2.low.x -= halfSize;\r\n range2.low.y -= halfSize;\r\n range2.low.z -= halfSize;\r\n range2.high.x += halfSize;\r\n range2.high.y += halfSize;\r\n range2.high.z += halfSize;\r\n return range2;\r\n}\r\n"]}
1
+ {"version":3,"file":"ParticleCollectionBuilder.js","sourceRoot":"","sources":["../../../src/render/ParticleCollectionBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAA+G;AAC/G,oDAE4B;AAG5B,mDAAgD;AAEhD,6EAA0E;AAE1E,wEAAmE;AA6FnE;;;GAGG;AACH,IAAiB,yBAAyB,CAOzC;AAPD,WAAiB,yBAAyB;IACxC;;OAEG;IACH,SAAgB,MAAM,CAAC,MAAuC;QAC5D,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAFe,gCAAM,SAErB,CAAA;AACH,CAAC,EAPgB,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAOzC;AAED,MAAM,QAAQ;IAOZ,YAAmB,QAAgB,EAAE,KAAa,EAAE,MAAc,EAAE,YAAoB,EAAE,cAAyB;QACjH,IAAI,CAAC,QAAQ,GAAG,uBAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CA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E,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;AACjF,CAAC;AAED,SAAS,iBAAiB,CAAC,YAAoB;IAC7C,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IACtE,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACxC,IAAI,YAAY,GAAG,6BAAa,CAAC,eAAe;QAC9C,YAAY,GAAG,CAAC,CAAC;IAEnB,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,YAAY,CAAC,aAAsB,EAAE,MAAe,EAAE,OAAe;IAC5E,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;IACrC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,OAAO,GAAG,GAAG,CAAC;IAC/B,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { Matrix3d, Point2d, Point3d, Range3d, Transform, Vector2d, XAndY, XYAndZ } from \"@itwin/core-geometry\";\r\nimport {\r\n ColorDef, ColorIndex, Feature, FeatureIndex, FeatureTable, FillFlags, PackedFeatureTable, QParams3d, QPoint3dList, RenderTexture,\r\n} from \"@itwin/core-common\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicBranch } from \"./GraphicBranch\";\r\nimport { MeshArgs } from \"./primitives/mesh/MeshPrimitives\";\r\nimport { DisplayParams } from \"../common/render/primitives/DisplayParams\";\r\nimport { MeshParams } from \"../common/render/primitives/MeshParams\";\r\nimport { createMeshParams } from \"./primitives/VertexTableBuilder\";\r\n\r\n/** Parameters used to construct a [[ParticleCollectionBuilder]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilderParams {\r\n /** The image mapped to each particle quad.\r\n * @note The texture should be disposed of when no longer needed to free up WebGL resources. For example, if a [[Decorator]] creates the texture, the\r\n * texture should probably be disposed of when the decorator is removed from the [[ViewManager]].\r\n */\r\n texture: RenderTexture;\r\n\r\n /** The default extents of the particle quad. Individual particles may apply a scale to these extents to produce particles of varying dimensions.\r\n * Must be positive.\r\n */\r\n size: XAndY | number;\r\n\r\n /** The initial transparency of the particles as an integer in [0,255]. Defaults to zero if omitted. */\r\n transparency?: number;\r\n\r\n /** The origin of the particle collection in world coordinates. Defaults to (0, 0, 0). */\r\n origin?: XYAndZ;\r\n\r\n /** If the particles are to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\r\n * @see [[IModelConnection.transientIdSequence]] to obtain an Id that is unique within an iModel.\r\n */\r\n pickableId?: Id64String;\r\n\r\n /** The viewport in which the particles will be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, the finished graphic will be defined in view coordinates, for use as a decoration of type [[GraphicType.ViewBackground]] or [[GraphicType.ViewOverlay]].\r\n * Defaults to false, indicating the graphic will be defined in world coordinates.\r\n * @see [[CoordSystem.View]] and [[CoordSystem.World]].\r\n */\r\n isViewCoords?: boolean;\r\n}\r\n\r\n/** Describes a particle to to add to a particle collection via [[ParticleCollectionBuilder.addParticle]].\r\n * The x, y, and z coordinates represent the centroid of the particle quad in the collection's coordinate space.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleProps extends XYAndZ {\r\n /** The size of the particle, in the collection's coordinate space. If omitted, it defaults to the size supplied to the collection by [[ParticleCollectionBuilderParams.size]].\r\n * Supplying a `number` produces a square; supplying a non-uniform `XAndY` produces a rectangle. Must be positive.\r\n */\r\n size?: XAndY | number;\r\n\r\n /** The transparency with which to draw the particle as an integer in [0,255]. If omitted, it defaults to the current value of [[ParticleCollectionBuilder.transparency]]. */\r\n transparency?: number;\r\n\r\n /** A rotation matrix to orient the particle. If supplied then the particle will not be automatically oriented towards the camera. */\r\n rotationMatrix?: Matrix3d;\r\n}\r\n\r\n/** Interface for producing a collection of particles suitable for use in particle effects.\r\n * Particle effects involve animating hundreds or thousands of small particles to simulate phenomena like smoke, fire, snow, etc.\r\n * A particle collection represents each particle as a quad (rectangle) displaying an image. The position of each particle corresponds to the\r\n * centroid of its quad. The transparency and size of each particle can be specified individually. By default, the quads will always rotate to face the camera\r\n * such that the image is fully visible.\r\n *\r\n * Creating a particle collection using a ParticleCollectionBuilder is far more efficient (in both CPU and GPU usage) than doing so using a [[GraphicBuilder]].\r\n * @see interactive demonstrations of [Snow and Rain](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=snow-rain-sample&imodel=Villa) and\r\n * [Fire and Smoke](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=fire-sample&imodel=Villa) particle effects.\r\n * @see [SnowEffect]($frontend-devtools) for an example of a particle effect.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilder {\r\n /** The default transparency for newly-added particles as an integer in [0,255], used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.transparency]] is omitted.\r\n * Changing this value has no effect on the transparency of previously-added particles.\r\n */\r\n transparency: number;\r\n\r\n /** The default size of each particle, used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.size]] is omitted. */\r\n size: XAndY;\r\n\r\n /** Add a particle to the collection.\r\n * If `size` is omitted, `this.size` is used.\r\n * If `transparency` is omitted, `this.transparency` is used.\r\n * @throws Error if particle size is defined and not greater than zero.\r\n */\r\n addParticle: (particle: ParticleProps) => void;\r\n\r\n /** Produces a finished graphic from the accumulated particles.\r\n * It returns the finished graphic, or `undefined` if the collection contains no particles or the [[RenderSystem]] failed to produce the graphic.\r\n * @note After this method returns, the particle collection is empty.\r\n */\r\n finish: () => RenderGraphic | undefined;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace ParticleCollectionBuilder {\r\n /** Creates a new ParticleCollectionBuilder.\r\n * @throws Error if size is not greater than zero.\r\n */\r\n export function create(params: ParticleCollectionBuilderParams): ParticleCollectionBuilder {\r\n return new Builder(params);\r\n }\r\n}\r\n\r\nclass Particle {\r\n public readonly centroid: Point3d;\r\n public readonly transparency: number;\r\n public readonly width: number;\r\n public readonly height: number;\r\n public readonly rotationMatrix?: Matrix3d;\r\n\r\n public constructor(centroid: XYAndZ, width: number, height: number, transparency: number, rotationMatrix?: Matrix3d) {\r\n this.centroid = Point3d.fromJSON(centroid);\r\n this.transparency = transparency;\r\n this.width = width;\r\n this.height = height;\r\n this.rotationMatrix = rotationMatrix;\r\n }\r\n}\r\n\r\nclass Builder implements ParticleCollectionBuilder {\r\n private readonly _viewport: Viewport;\r\n private readonly _isViewCoords: boolean;\r\n private readonly _pickableId?: Id64String;\r\n private readonly _texture: RenderTexture;\r\n private readonly _size: Vector2d;\r\n private _transparency: number;\r\n private _hasVaryingTransparency = false;\r\n private readonly _localToWorldTransform: Transform;\r\n private readonly _range = Range3d.createNull();\r\n private _particlesOpaque: Particle[] = [];\r\n private _particlesTranslucent: Particle[] = [];\r\n\r\n public constructor(params: ParticleCollectionBuilderParams) {\r\n this._viewport = params.viewport;\r\n this._isViewCoords = true === params.isViewCoords;\r\n this._pickableId = params.pickableId;\r\n this._texture = params.texture;\r\n this._transparency = undefined !== params.transparency ? clampTransparency(params.transparency) : 0;\r\n this._localToWorldTransform = params.origin ? Transform.createTranslationXYZ(params.origin.x, params.origin.y, params.origin.z) : Transform.createIdentity();\r\n\r\n if (\"number\" === typeof params.size)\r\n this._size = new Vector2d(params.size, params.size);\r\n else\r\n this._size = Vector2d.fromJSON(params.size);\r\n\r\n if (this._size.x <= 0 || this._size.y <= 0)\r\n throw new Error(\"Particle size must be greater than zero\");\r\n }\r\n\r\n public get size(): XAndY {\r\n return this._size;\r\n }\r\n\r\n public get transparency() {\r\n return this._transparency;\r\n }\r\n\r\n public set transparency(transparency: number) {\r\n transparency = clampTransparency(transparency);\r\n if (transparency !== this._transparency) {\r\n this._transparency = transparency;\r\n this._hasVaryingTransparency = this._particlesTranslucent.length > 0;\r\n }\r\n }\r\n\r\n public addParticle(props: ParticleProps): void {\r\n const size = props.size ?? this._size;\r\n let width, height;\r\n if (\"number\" === typeof size) {\r\n width = height = size;\r\n } else {\r\n width = size.x;\r\n height = size.y;\r\n }\r\n\r\n if (width <= 0 || height <= 0)\r\n throw new Error(\"A particle must have a size greater than zero\");\r\n\r\n const transparency = undefined !== props.transparency ? clampTransparency(props.transparency) : this.transparency;\r\n if (transparency !== this.transparency && this._particlesTranslucent.length > 0)\r\n this._hasVaryingTransparency = true;\r\n\r\n const particle = new Particle(props, width, height, transparency, props.rotationMatrix);\r\n if (transparency > 0)\r\n this._particlesTranslucent.push(particle);\r\n else\r\n this._particlesOpaque.push(particle);\r\n this._range.extendPoint(particle.centroid);\r\n }\r\n\r\n public finish(): RenderGraphic | undefined {\r\n if (0 === this._particlesTranslucent.length + this._particlesOpaque.length)\r\n return undefined;\r\n\r\n // Order-independent transparency doesn't work well with opaque geometry - it will look semi-transparent.\r\n // If we have a mix of opaque and transparent particles, put them in separate graphics to be rendered in separate passes.\r\n const opaque = this.createGraphic(this._particlesOpaque, 0);\r\n const transparent = this.createGraphic(this._particlesTranslucent, this._hasVaryingTransparency ? undefined : this._transparency);\r\n\r\n // Empty the collection before any return statements.\r\n const range = this._range.clone();\r\n this._range.setNull();\r\n this._particlesOpaque.length = 0;\r\n this._particlesTranslucent.length = 0;\r\n this._hasVaryingTransparency = false;\r\n\r\n if (!transparent && !opaque)\r\n return undefined;\r\n\r\n // Transform from origin to collection, then to world.\r\n const toCollection = Transform.createTranslation(range.center);\r\n const toWorld = toCollection.multiplyTransformTransform(this._localToWorldTransform);\r\n const branch = new GraphicBranch(true);\r\n if (opaque)\r\n branch.add(opaque);\r\n\r\n if (transparent)\r\n branch.add(transparent);\r\n\r\n let graphic = this._viewport.target.renderSystem.createGraphicBranch(branch, toWorld);\r\n\r\n // If we have a pickable Id, produce a batch.\r\n // NB: We pass this._pickableId as the FeatureTable's modelId so that it will be treated like a reality model or a map -\r\n // specifically, it can be located and display a tooltip, but can't be selected.\r\n const featureTable = this._pickableId ? new FeatureTable(1, this._pickableId) : undefined;\r\n if (featureTable) {\r\n this._localToWorldTransform.multiplyRange(range, range);\r\n featureTable.insert(new Feature(this._pickableId));\r\n graphic = this._viewport.target.renderSystem.createBatch(graphic, PackedFeatureTable.pack(featureTable), range);\r\n }\r\n\r\n return graphic;\r\n }\r\n\r\n private createGraphic(particles: Particle[], uniformTransparency: number | undefined): RenderGraphic | undefined {\r\n const numParticles = particles.length;\r\n if (numParticles <= 0)\r\n return undefined;\r\n\r\n // To keep scale values close to 1, compute mean size to use as size of quad.\r\n const meanSize = new Vector2d();\r\n let maxSize = 0;\r\n for (const particle of particles) {\r\n meanSize.x += particle.width;\r\n meanSize.y += particle.height;\r\n if (particle.width > maxSize)\r\n maxSize = particle.width;\r\n if (particle.height > maxSize)\r\n maxSize = particle.height;\r\n }\r\n meanSize.x /= numParticles;\r\n meanSize.y /= numParticles;\r\n\r\n // Define InstancedGraphicParams for particles.\r\n const rangeCenter = this._range.center;\r\n const floatsPerTransform = 12;\r\n const transforms = new Float32Array(floatsPerTransform * numParticles);\r\n const bytesPerOverride = 8;\r\n const symbologyOverrides = undefined === uniformTransparency ? new Uint8Array(bytesPerOverride * numParticles) : undefined;\r\n\r\n const viewToWorld = this._viewport.view.getRotation().transpose();\r\n let tfIndex = 0;\r\n let ovrIndex = 0;\r\n for (const particle of particles) {\r\n const scaleX = particle.width / meanSize.x;\r\n const scaleY = particle.height / meanSize.y;\r\n if (this._isViewCoords) {\r\n // Particles already face the camera in view coords - just apply the scale.\r\n transforms[tfIndex + 0] = scaleX;\r\n transforms[tfIndex + 5] = scaleY;\r\n transforms[tfIndex + 10] = 1;\r\n } else if (undefined !== particle.rotationMatrix) {\r\n // Scale rotation matrix relative to size of quad.\r\n transforms[tfIndex + 0] = particle.rotationMatrix.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = particle.rotationMatrix.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = particle.rotationMatrix.coffs[2];\r\n transforms[tfIndex + 4] = particle.rotationMatrix.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = particle.rotationMatrix.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = particle.rotationMatrix.coffs[5];\r\n transforms[tfIndex + 8] = particle.rotationMatrix.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = particle.rotationMatrix.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = particle.rotationMatrix.coffs[8];\r\n } else {\r\n // Rotate about origin by inverse view matrix so quads always face the camera and scale relative to size of quad.\r\n transforms[tfIndex + 0] = viewToWorld.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = viewToWorld.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = viewToWorld.coffs[2];\r\n transforms[tfIndex + 4] = viewToWorld.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = viewToWorld.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = viewToWorld.coffs[5];\r\n transforms[tfIndex + 8] = viewToWorld.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = viewToWorld.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = viewToWorld.coffs[8];\r\n }\r\n\r\n // Translate relative to center of particles range.\r\n transforms[tfIndex + 3] = particle.centroid.x - rangeCenter.x;\r\n transforms[tfIndex + 7] = particle.centroid.y - rangeCenter.y;\r\n transforms[tfIndex + 11] = particle.centroid.z - rangeCenter.z;\r\n\r\n tfIndex += floatsPerTransform;\r\n\r\n if (symbologyOverrides) {\r\n // See FeatureOverrides.buildLookupTable() for layout.\r\n symbologyOverrides[ovrIndex + 0] = 1 << 2; // OvrFlags.Alpha\r\n symbologyOverrides[ovrIndex + 7] = 0xff - particle.transparency;\r\n\r\n ovrIndex += bytesPerOverride;\r\n }\r\n }\r\n\r\n // Produce instanced quads.\r\n // Note: We do not need to allocate an array of featureIds. If we have a pickableId, all particles refer to the same Feature, with index 0.\r\n // So we leave the vertex attribute disabled causing the shader to receive the default (0, 0, 0) which happens to correspond to our feature index.\r\n const quad = createQuad(meanSize, this._texture, uniformTransparency ?? 0x7f, this._viewport);\r\n const transformCenter = new Point3d(0, 0, 0);\r\n const range = computeRange(this._range, rangeCenter, maxSize);\r\n const instances = { count: numParticles, transforms, transformCenter, symbologyOverrides, range };\r\n return this._viewport.target.renderSystem.createMesh(quad, instances);\r\n }\r\n}\r\n\r\nfunction createQuad(size: XAndY, texture: RenderTexture, transparency: number, viewport: Viewport): MeshParams {\r\n const halfWidth = size.x / 2;\r\n const halfHeight = size.y / 2;\r\n const corners = [\r\n new Point3d(-halfWidth, -halfHeight, 0), new Point3d(halfWidth, -halfHeight, 0),\r\n new Point3d(-halfWidth, halfHeight, 0), new Point3d(halfWidth, halfHeight, 0),\r\n ];\r\n\r\n const range = new Range3d();\r\n range.low = corners[0];\r\n range.high = corners[3];\r\n\r\n const points = new QPoint3dList(QParams3d.fromRange(range));\r\n for (const corner of corners)\r\n points.add(corner);\r\n\r\n const colors = new ColorIndex();\r\n colors.initUniform(ColorDef.white.withTransparency(transparency));\r\n\r\n const quadArgs: MeshArgs = {\r\n points,\r\n vertIndices: [0, 1, 2, 2, 1, 3],\r\n fillFlags: FillFlags.None,\r\n isPlanar: true,\r\n colors,\r\n features: new FeatureIndex(),\r\n textureMapping: {\r\n texture,\r\n uvParams: [new Point2d(0, 1), new Point2d(1, 1), new Point2d(0, 0), new Point2d(1, 0)],\r\n },\r\n };\r\n\r\n return createMeshParams(quadArgs, viewport.target.renderSystem.maxTextureSize);\r\n}\r\n\r\nfunction clampTransparency(transparency: number): number {\r\n transparency = Math.min(255, transparency, Math.max(0, transparency));\r\n transparency = Math.floor(transparency);\r\n if (transparency < DisplayParams.minTransparency)\r\n transparency = 0;\r\n\r\n return transparency;\r\n}\r\n\r\nfunction computeRange(centroidRange: Range3d, center: Point3d, maxSize: number): Range3d {\r\n const range2 = centroidRange.clone();\r\n range2.low.subtractInPlace(center);\r\n range2.high.subtractInPlace(center);\r\n const halfSize = maxSize * 0.5;\r\n range2.low.x -= halfSize;\r\n range2.low.y -= halfSize;\r\n range2.low.z -= halfSize;\r\n range2.high.x += halfSize;\r\n range2.high.y += halfSize;\r\n range2.high.z += halfSize;\r\n return range2;\r\n}\r\n"]}
@@ -17,7 +17,7 @@ import {
17
17
  // @public enum(s) from @itwin/core-frontend
18
18
  ACSDisplayOptions, ACSType, ActivityMessageEndReason, BeButton, BeModifierKeys, ClipEventType, ContextRotationId, CoordSource, CoordSystem, CoordinateLockOverrides, EventHandled, FlashMode, FrontendLoggerCategory, GraphicType, HitDetailType, HitGeomType, HitParentGeomType, HitPriority, HitSource, InputSource, KeyinParseError, LocateAction, LocateFilterStatus, ManipulatorToolEvent, MessageBoxIconType, MessageBoxType, MessageBoxValue, OutputMessageAlert, OutputMessagePriority, OutputMessageType, ParseAndRunResult, SelectionMethod, SelectionMode, SelectionProcessing, SelectionSetEventType, SnapHeat, SnapMode, SnapStatus, StandardViewId, StartOrResume, TileBoundingBoxes, TileGraphicType, TileLoadPriority, TileLoadStatus, TileTreeLoadStatus, TileVisibility, ToolAssistanceImage, ToolAssistanceInputMethod, UniformType, VaryingType, ViewStatus,
19
19
  // @public real(s) from @itwin/core-frontend
20
- AccuDrawHintBuilder, AccuSnap, ActivityMessageDetails, AuxCoordSystem2dState, AuxCoordSystem3dState, AuxCoordSystemSpatialState, AuxCoordSystemState, BeButtonEvent, BeButtonState, BeTouchEvent, BeWheelEvent, BingElevationProvider, BingLocationProvider, CategorySelectorState, ChangeFlags, Cluster, ContextRealityModelState, DecorateContext, Decorations, DisclosedTileTreeSet, DisplayStyle2dState, DisplayStyle3dState, DisplayStyleState, DrawingModelState, DrawingViewState, EditManipulator, ElementLocateManager, ElementPicker, ElementState, EmphasizeElements, EntityState, EventController, FeatureSymbology, FlashSettings, FrustumAnimator, GeometricModel2dState, GeometricModel3dState, GeometricModelState, GlobeAnimator, GraphicBranch, GraphicBuilder, HiliteSet, HitDetail, HitList, IModelConnection, IconSprites, InputCollector, InteractiveTool, IntersectDetail, LocateOptions, LocateResponse, MarginPercent, Marker, MarkerSet, ModelSelectorState, ModelState, NotificationHandler, NotificationManager, NotifyMessageDetails, OffScreenViewport, OrthographicViewState, PerModelCategoryVisibility, PhysicalModelState, Pixel, PrimitiveTool, RenderClipVolume, RenderContext, RenderGraphic, RenderGraphicOwner, RenderSystem, Scene, ScreenViewport, SectionDrawingModelState, SelectionSet, SheetModelState, SheetViewState, SnapDetail, SpatialLocationModelState, SpatialModelState, SpatialViewState, Sprite, SpriteLocation, TentativePoint, Tile, TileAdmin, TileDrawArgs, TileRequest, TileRequestChannel, TileRequestChannelStatistics, TileRequestChannels, TileTree, TileTreeReference, TileUsageMarker, Tiles, Tool, ToolAdmin, ToolAssistance, ToolSettings, TwoWayViewportFrustumSync, TwoWayViewportSync, ViewClipClearTool, ViewClipDecoration, ViewClipDecorationProvider, ViewClipTool, ViewCreator2d, ViewCreator3d, ViewManager, ViewManip, ViewPose, ViewPose2d, ViewPose3d, ViewRect, ViewState, ViewState2d, ViewState3d, ViewTool, ViewingSpace, Viewport, canvasToImageBuffer, canvasToResizedCanvasWithBars, connectViewportFrusta, connectViewportViews, connectViewports, extractImageSourceDimensions, getCompressedJpegFromCanvas, getImageSourceFormatForMimeType, getImageSourceMimeType, imageBufferToBase64EncodedPng, imageBufferToCanvas, imageBufferToPngDataUrl, imageElementFromImageSource, imageElementFromUrl, queryTerrainElevationOffset, readElementGraphics, readGltfGraphics, synchronizeViewportFrusta, synchronizeViewportViews, } from "../core-frontend";
20
+ AccuDrawHintBuilder, AccuSnap, ActivityMessageDetails, AuxCoordSystem2dState, AuxCoordSystem3dState, AuxCoordSystemSpatialState, AuxCoordSystemState, BeButtonEvent, BeButtonState, BeTouchEvent, BeWheelEvent, BingElevationProvider, BingLocationProvider, CategorySelectorState, ChangeFlags, Cluster, ContextRealityModelState, DecorateContext, Decorations, DisclosedTileTreeSet, DisplayStyle2dState, DisplayStyle3dState, DisplayStyleState, DrawingModelState, DrawingViewState, EditManipulator, ElementLocateManager, ElementPicker, ElementState, EmphasizeElements, EntityState, EventController, FeatureSymbology, FlashSettings, FrustumAnimator, GeometricModel2dState, GeometricModel3dState, GeometricModelState, GlobeAnimator, GraphicBranch, GraphicBuilder, HiliteSet, HitDetail, HitList, IModelConnection, IconSprites, InputCollector, InteractiveTool, IntersectDetail, LocateOptions, LocateResponse, MarginPercent, Marker, MarkerSet, ModelSelectorState, ModelState, NotificationHandler, NotificationManager, NotifyMessageDetails, OffScreenViewport, OrthographicViewState, ParticleCollectionBuilder, PerModelCategoryVisibility, PhysicalModelState, Pixel, PrimitiveTool, RenderClipVolume, RenderContext, RenderGraphic, RenderGraphicOwner, RenderSystem, Scene, ScreenViewport, SectionDrawingModelState, SelectionSet, SheetModelState, SheetViewState, SnapDetail, SpatialLocationModelState, SpatialModelState, SpatialViewState, Sprite, SpriteLocation, TentativePoint, Tile, TileAdmin, TileDrawArgs, TileRequest, TileRequestChannel, TileRequestChannelStatistics, TileRequestChannels, TileTree, TileTreeReference, TileUsageMarker, Tiles, Tool, ToolAdmin, ToolAssistance, ToolSettings, TwoWayViewportFrustumSync, TwoWayViewportSync, ViewClipClearTool, ViewClipDecoration, ViewClipDecorationProvider, ViewClipTool, ViewCreator2d, ViewCreator3d, ViewManager, ViewManip, ViewPose, ViewPose2d, ViewPose3d, ViewRect, ViewState, ViewState2d, ViewState3d, ViewTool, ViewingSpace, Viewport, canvasToImageBuffer, canvasToResizedCanvasWithBars, connectViewportFrusta, connectViewportViews, connectViewports, extractImageSourceDimensions, getCompressedJpegFromCanvas, getImageSourceFormatForMimeType, getImageSourceMimeType, imageBufferToBase64EncodedPng, imageBufferToCanvas, imageBufferToPngDataUrl, imageElementFromImageSource, imageElementFromUrl, queryTerrainElevationOffset, readElementGraphics, readGltfGraphics, synchronizeViewportFrusta, synchronizeViewportViews, } from "../core-frontend";
21
21
  import {
22
22
  // @public enum(s) from @itwin/core-common
23
23
  BackgroundFill, BackgroundMapType, BatchType, BisCodeSpec, BriefcaseIdValue, ChangeOpCode, ChangedValueState, ChangesetType, CommonLoggerCategory, ECSqlSystemProperty, ECSqlValueType, ElementGeometryOpcode, FeatureOverrideType, FillDisplay, FillFlags, FontType, GeoCoordStatus, GeometryClass, GeometryStreamFlags, GeometrySummaryVerbosity, GlobeMode, GridOrientationType, HSVConstants, ImageBufferFormat, ImageSourceFormat, LinePixels, MassPropertiesOperation, MonochromeMode, Npc, PlanarClipMaskMode, PlanarClipMaskPriority, QueryRowFormat, Rank, RenderMode, SectionType, SkyBoxImageType, SpatialClassifierInsideDisplay, SpatialClassifierOutsideDisplay, SyncMode, TerrainHeightOriginMode, TextureMapUnits, ThematicDisplayMode, ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientTransparencyMode, TxnAction, TypeOfChange,
@@ -149,6 +149,7 @@ const extensionExports = {
149
149
  OutputMessagePriority,
150
150
  OutputMessageType,
151
151
  ParseAndRunResult,
152
+ ParticleCollectionBuilder,
152
153
  PerModelCategoryVisibility,
153
154
  PhysicalModelState,
154
155
  Pixel,
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionRuntime.js","sourceRoot":"","sources":["../../../src/extension/ExtensionRuntime.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,yDAAyD;AACzD,sDAAsD;AACtD,iCAAiC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAC/D,IAAK,UAAkB,CAAC,YAAY,CAAC;IACnC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;AAErE,uBAAuB;AACvB,OAAO;AACL,4CAA4C;AAC5C,iBAAiB,EACjB,OAAO,EACP,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,uBAAuB,EACvB,YAAY,EACZ,SAAS,EACT,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,WAAW,EACX,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,yBAAyB,EACzB,WAAW,EACX,WAAW,EACX,UAAU;AACV,4CAA4C;AAC5C,mBAAmB,EACnB,QAAQ,EACR,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,aAAa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AAW;IACX,kBAAkB;IAClB,4BAA4B;IAC5B,mBAAmB;IACnB,QAAQ;IACR,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,KAAK;IACL,IAAI;IACJ,SAAS;IACT,cAAc;IACd,mBAAmB;IACnB,yBAAyB;IACzB,YAAY;IACZ,yBAAyB;IACzB,kBAAkB;IAClB,SAAS;IACT,YAAY;IACZ,WAAW;IACX,WAAW;IACX,iBAAiB;IACjB,kBAAkB;IAClB,0BAA0B;IAC1B,YAAY;IACZ,aAAa;IACb,aAAa;IACb,WAAW;IACX,SAAS;IACT,QAAQ;IACR,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,mBAAmB;IACnB,6BAA6B;IAC7B,qBAAqB;IACrB,oBAAoB;IACpB,gBAAgB;IAChB,4BAA4B;IAC5B,2BAA2B;IAC3B,+BAA+B;IAC/B,sBAAsB;IACtB,6BAA6B;IAC7B,mBAAmB;IACnB,uBAAuB;IACvB,2BAA2B;IAC3B,mBAAmB;IACnB,2BAA2B;IAC3B,mBAAmB;IACnB,gBAAgB;IAChB,yBAAyB;IACzB,wBAAwB;CACzB,CAAC;AAEF,qBAAqB;AAErB,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,OAAO;QACL,OAAO,EAAE;YACP,aAAa;YACb,aAAa;YACb,YAAY;YACZ,GAAG,gBAAgB;SACpB;KACF,CAAC;AACJ,CAAC,CAAC;AAED,UAAkB,CAAC,YAAY,CAAC,GAAG;IAClC,eAAe;CAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Extensions\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @itwin/no-internal-barrel-imports */\r\n/* eslint-disable sort-imports */\r\n\r\nimport { ExtensionHost } from \"./ExtensionHost\";\r\n\r\nconst globalSymbol = Symbol.for(\"itwin.core.frontend.globals\");\r\nif ((globalThis as any)[globalSymbol])\r\n throw new Error(\"Multiple @itwin/core-frontend imports detected!\");\r\n\r\n// BEGIN GENERATED CODE\r\nimport {\r\n // @public enum(s) from @itwin/core-frontend\r\n ACSDisplayOptions,\r\n ACSType,\r\n ActivityMessageEndReason,\r\n BeButton,\r\n BeModifierKeys,\r\n ClipEventType,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n EventHandled,\r\n FlashMode,\r\n FrontendLoggerCategory,\r\n GraphicType,\r\n HitDetailType,\r\n HitGeomType,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n InputSource,\r\n KeyinParseError,\r\n LocateAction,\r\n LocateFilterStatus,\r\n ManipulatorToolEvent,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSetEventType,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n StandardViewId,\r\n StartOrResume,\r\n TileBoundingBoxes,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileTreeLoadStatus,\r\n TileVisibility,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n UniformType,\r\n VaryingType,\r\n ViewStatus,\r\n // @public real(s) from @itwin/core-frontend\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n Cluster,\r\n ContextRealityModelState,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n EditManipulator,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n FeatureSymbology,\r\n FlashSettings,\r\n FrustumAnimator,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GlobeAnimator,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n HiliteSet,\r\n HitDetail,\r\n HitList,\r\n IModelConnection,\r\n IconSprites,\r\n InputCollector,\r\n InteractiveTool,\r\n IntersectDetail,\r\n LocateOptions,\r\n LocateResponse,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n ModelSelectorState,\r\n ModelState,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PrimitiveTool,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SelectionSet,\r\n SheetModelState,\r\n SheetViewState,\r\n SnapDetail,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n TentativePoint,\r\n Tile,\r\n TileAdmin,\r\n TileDrawArgs,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n} from \"../core-frontend\";\r\n\r\nimport {\r\n // @public enum(s) from @itwin/core-common\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n CommonLoggerCategory,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n ElementGeometryOpcode,\r\n FeatureOverrideType,\r\n FillDisplay,\r\n FillFlags,\r\n FontType,\r\n GeoCoordStatus,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeMode,\r\n GridOrientationType,\r\n HSVConstants,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n LinePixels,\r\n MassPropertiesOperation,\r\n MonochromeMode,\r\n Npc,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n QueryRowFormat,\r\n Rank,\r\n RenderMode,\r\n SectionType,\r\n SkyBoxImageType,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SyncMode,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n TxnAction,\r\n TypeOfChange,\r\n // @public real(s) from @itwin/core-common\r\n ClipIntersectionStyle,\r\n ColorByName,\r\n ColorDef,\r\n FrustumPlanes,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n} from \"@itwin/core-common\";\r\n\r\nconst extensionExports = {\r\n ACSDisplayOptions,\r\n ACSType,\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n ActivityMessageEndReason,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BeButton,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeModifierKeys,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n ClipEventType,\r\n ClipIntersectionStyle,\r\n Cluster,\r\n ColorByName,\r\n ColorDef,\r\n CommonLoggerCategory,\r\n ContextRealityModelState,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n EditManipulator,\r\n ElementGeometryOpcode,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n EventHandled,\r\n FeatureOverrideType,\r\n FeatureSymbology,\r\n FillDisplay,\r\n FillFlags,\r\n FlashMode,\r\n FlashSettings,\r\n FontType,\r\n FrontendLoggerCategory,\r\n FrustumAnimator,\r\n FrustumPlanes,\r\n GeoCoordStatus,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeAnimator,\r\n GlobeMode,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n GraphicType,\r\n GridOrientationType,\r\n HSVConstants,\r\n HiliteSet,\r\n HitDetail,\r\n HitDetailType,\r\n HitGeomType,\r\n HitList,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n IModelConnection,\r\n IconSprites,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n InputCollector,\r\n InputSource,\r\n InteractiveTool,\r\n IntersectDetail,\r\n KeyinParseError,\r\n LinePixels,\r\n LocateAction,\r\n LocateFilterStatus,\r\n LocateOptions,\r\n LocateResponse,\r\n ManipulatorToolEvent,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n MassPropertiesOperation,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n ModelSelectorState,\r\n ModelState,\r\n MonochromeMode,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n Npc,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n PrimitiveTool,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n QueryRowFormat,\r\n Rank,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderMode,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SectionType,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSet,\r\n SelectionSetEventType,\r\n SheetModelState,\r\n SheetViewState,\r\n SkyBoxImageType,\r\n SnapDetail,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n StandardViewId,\r\n StartOrResume,\r\n SyncMode,\r\n TentativePoint,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n Tile,\r\n TileAdmin,\r\n TileBoundingBoxes,\r\n TileDrawArgs,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeLoadStatus,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n TileVisibility,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n TxnAction,\r\n TypeOfChange,\r\n UniformType,\r\n VaryingType,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewStatus,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n};\r\n\r\n// END GENERATED CODE\r\n\r\nconst getExtensionApi = (_id: string) => {\r\n return {\r\n exports: {\r\n // exceptions\r\n ExtensionHost,\r\n // automated\r\n ...extensionExports,\r\n },\r\n };\r\n};\r\n\r\n(globalThis as any)[globalSymbol] = {\r\n getExtensionApi,\r\n};\r\n"]}
1
+ {"version":3,"file":"ExtensionRuntime.js","sourceRoot":"","sources":["../../../src/extension/ExtensionRuntime.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,yDAAyD;AACzD,sDAAsD;AACtD,iCAAiC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAC/D,IAAK,UAAkB,CAAC,YAAY,CAAC;IACnC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;AAErE,uBAAuB;AACvB,OAAO;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WAAW;IACX,WAAW;IACX,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,mBAAmB;IACnB,6BAA6B;IAC7B,qBAAqB;IACrB,oBAAoB;IACpB,gBAAgB;IAChB,4BAA4B;IAC5B,2BAA2B;IAC3B,+BAA+B;IAC/B,sBAAsB;IACtB,6BAA6B;IAC7B,mBAAmB;IACnB,uBAAuB;IACvB,2BAA2B;IAC3B,mBAAmB;IACnB,2BAA2B;IAC3B,mBAAmB;IACnB,gBAAgB;IAChB,yBAAyB;IACzB,wBAAwB;CACzB,CAAC;AAEF,qBAAqB;AAErB,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,OAAO;QACL,OAAO,EAAE;YACP,aAAa;YACb,aAAa;YACb,YAAY;YACZ,GAAG,gBAAgB;SACpB;KACF,CAAC;AACJ,CAAC,CAAC;AAED,UAAkB,CAAC,YAAY,CAAC,GAAG;IAClC,eAAe;CAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Extensions\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @itwin/no-internal-barrel-imports */\r\n/* eslint-disable sort-imports */\r\n\r\nimport { ExtensionHost } from \"./ExtensionHost\";\r\n\r\nconst globalSymbol = Symbol.for(\"itwin.core.frontend.globals\");\r\nif ((globalThis as any)[globalSymbol])\r\n throw new Error(\"Multiple @itwin/core-frontend imports detected!\");\r\n\r\n// BEGIN GENERATED CODE\r\nimport {\r\n // @public enum(s) from @itwin/core-frontend\r\n ACSDisplayOptions,\r\n ACSType,\r\n ActivityMessageEndReason,\r\n BeButton,\r\n BeModifierKeys,\r\n ClipEventType,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n EventHandled,\r\n FlashMode,\r\n FrontendLoggerCategory,\r\n GraphicType,\r\n HitDetailType,\r\n HitGeomType,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n InputSource,\r\n KeyinParseError,\r\n LocateAction,\r\n LocateFilterStatus,\r\n ManipulatorToolEvent,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSetEventType,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n StandardViewId,\r\n StartOrResume,\r\n TileBoundingBoxes,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileTreeLoadStatus,\r\n TileVisibility,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n UniformType,\r\n VaryingType,\r\n ViewStatus,\r\n // @public real(s) from @itwin/core-frontend\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n Cluster,\r\n ContextRealityModelState,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n EditManipulator,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n FeatureSymbology,\r\n FlashSettings,\r\n FrustumAnimator,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GlobeAnimator,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n HiliteSet,\r\n HitDetail,\r\n HitList,\r\n IModelConnection,\r\n IconSprites,\r\n InputCollector,\r\n InteractiveTool,\r\n IntersectDetail,\r\n LocateOptions,\r\n LocateResponse,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n ModelSelectorState,\r\n ModelState,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n ParticleCollectionBuilder,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PrimitiveTool,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SelectionSet,\r\n SheetModelState,\r\n SheetViewState,\r\n SnapDetail,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n TentativePoint,\r\n Tile,\r\n TileAdmin,\r\n TileDrawArgs,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n} from \"../core-frontend\";\r\n\r\nimport {\r\n // @public enum(s) from @itwin/core-common\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n CommonLoggerCategory,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n ElementGeometryOpcode,\r\n FeatureOverrideType,\r\n FillDisplay,\r\n FillFlags,\r\n FontType,\r\n GeoCoordStatus,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeMode,\r\n GridOrientationType,\r\n HSVConstants,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n LinePixels,\r\n MassPropertiesOperation,\r\n MonochromeMode,\r\n Npc,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n QueryRowFormat,\r\n Rank,\r\n RenderMode,\r\n SectionType,\r\n SkyBoxImageType,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SyncMode,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n TxnAction,\r\n TypeOfChange,\r\n // @public real(s) from @itwin/core-common\r\n ClipIntersectionStyle,\r\n ColorByName,\r\n ColorDef,\r\n FrustumPlanes,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n} from \"@itwin/core-common\";\r\n\r\nconst extensionExports = {\r\n ACSDisplayOptions,\r\n ACSType,\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n ActivityMessageEndReason,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BeButton,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeModifierKeys,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n ClipEventType,\r\n ClipIntersectionStyle,\r\n Cluster,\r\n ColorByName,\r\n ColorDef,\r\n CommonLoggerCategory,\r\n ContextRealityModelState,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n EditManipulator,\r\n ElementGeometryOpcode,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n EventHandled,\r\n FeatureOverrideType,\r\n FeatureSymbology,\r\n FillDisplay,\r\n FillFlags,\r\n FlashMode,\r\n FlashSettings,\r\n FontType,\r\n FrontendLoggerCategory,\r\n FrustumAnimator,\r\n FrustumPlanes,\r\n GeoCoordStatus,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeAnimator,\r\n GlobeMode,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n GraphicType,\r\n GridOrientationType,\r\n HSVConstants,\r\n HiliteSet,\r\n HitDetail,\r\n HitDetailType,\r\n HitGeomType,\r\n HitList,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n IModelConnection,\r\n IconSprites,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n InputCollector,\r\n InputSource,\r\n InteractiveTool,\r\n IntersectDetail,\r\n KeyinParseError,\r\n LinePixels,\r\n LocateAction,\r\n LocateFilterStatus,\r\n LocateOptions,\r\n LocateResponse,\r\n ManipulatorToolEvent,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n MassPropertiesOperation,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n ModelSelectorState,\r\n ModelState,\r\n MonochromeMode,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n Npc,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n ParticleCollectionBuilder,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n PrimitiveTool,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n QueryRowFormat,\r\n Rank,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderMode,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SectionType,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSet,\r\n SelectionSetEventType,\r\n SheetModelState,\r\n SheetViewState,\r\n SkyBoxImageType,\r\n SnapDetail,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n StandardViewId,\r\n StartOrResume,\r\n SyncMode,\r\n TentativePoint,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n Tile,\r\n TileAdmin,\r\n TileBoundingBoxes,\r\n TileDrawArgs,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeLoadStatus,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n TileVisibility,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n TxnAction,\r\n TypeOfChange,\r\n UniformType,\r\n VaryingType,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewStatus,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n};\r\n\r\n// END GENERATED CODE\r\n\r\nconst getExtensionApi = (_id: string) => {\r\n return {\r\n exports: {\r\n // exceptions\r\n ExtensionHost,\r\n // automated\r\n ...extensionExports,\r\n },\r\n };\r\n};\r\n\r\n(globalThis as any)[globalSymbol] = {\r\n getExtensionApi,\r\n};\r\n"]}
@@ -83,7 +83,10 @@ export interface ParticleCollectionBuilder {
83
83
  */
84
84
  finish: () => RenderGraphic | undefined;
85
85
  }
86
- /** @public */
86
+ /**
87
+ * @public
88
+ * @extensions
89
+ */
87
90
  export declare namespace ParticleCollectionBuilder {
88
91
  /** Creates a new ParticleCollectionBuilder.
89
92
  * @throws Error if size is not greater than zero.
@@ -1 +1 @@
1
- {"version":3,"file":"ParticleCollectionBuilder.d.ts","sourceRoot":"","sources":["../../../src/render/ParticleCollectionBuilder.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAkD,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC/G,OAAO,EAC8G,aAAa,EACjI,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IAErB,uGAAuG;IACvG,YAA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,MAAM,iBAAiB,CAAC;AAOhD;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IAErB,uGAAuG;IACvG,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,yDAAyD;IACzD,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEtB,6KAA6K;IAC7K,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sIAAsI;IACtI,cAAc,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB,iIAAiI;IACjI,IAAI,EAAE,KAAK,CAAC;IAEZ;;;;OAIG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IAE/C;;;OAGG;IACH,MAAM,EAAE,MAAM,aAAa,GAAG,SAAS,CAAC;CACzC;AAED;;;GAGG;AACH,yBAAiB,yBAAyB,CAAC;IACzC;;OAEG;IACH,SAAgB,MAAM,CAAC,MAAM,EAAE,+BAA+B,GAAG,yBAAyB,CAEzF;CACF"}
@@ -10,7 +10,10 @@ import { ColorDef, ColorIndex, Feature, FeatureIndex, FeatureTable, FillFlags, P
10
10
  import { GraphicBranch } from "./GraphicBranch";
11
11
  import { DisplayParams } from "../common/render/primitives/DisplayParams";
12
12
  import { createMeshParams } from "./primitives/VertexTableBuilder";
13
- /** @public */
13
+ /**
14
+ * @public
15
+ * @extensions
16
+ */
14
17
  export var ParticleCollectionBuilder;
15
18
  (function (ParticleCollectionBuilder) {
16
19
  /** Creates a new ParticleCollectionBuilder.
@@ -1 +1 @@
1
- {"version":3,"file":"ParticleCollectionBuilder.js","sourceRoot":"","sources":["../../../src/render/ParticleCollectionBuilder.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAY,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAiB,MAAM,sBAAsB,CAAC;AAC/G,OAAO,EACL,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,GAClH,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AA6FnE,cAAc;AACd,MAAM,KAAW,yBAAyB,CAOzC;AAPD,WAAiB,yBAAyB;IACxC;;OAEG;IACH,SAAgB,MAAM,CAAC,MAAuC;QAC5D,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAFe,gCAAM,SAErB,CAAA;AACH,CAAC,EAPgB,yBAAyB,KAAzB,yBAAyB,QAOzC;AAED,MAAM,QAAQ;IAOZ,YAAmB,QAAgB,EAAE,KAAa,EAAE,MAAc,EAAE,YAAoB,EAAE,cAAyB;QACjH,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAA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,CAAC;AACjF,CAAC;AAED,SAAS,iBAAiB,CAAC,YAAoB;IAC7C,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IACtE,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACxC,IAAI,YAAY,GAAG,aAAa,CAAC,eAAe;QAC9C,YAAY,GAAG,CAAC,CAAC;IAEnB,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,YAAY,CAAC,aAAsB,EAAE,MAAe,EAAE,OAAe;IAC5E,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;IACrC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,OAAO,GAAG,GAAG,CAAC;IAC/B,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { Matrix3d, Point2d, Point3d, Range3d, Transform, Vector2d, XAndY, XYAndZ } from \"@itwin/core-geometry\";\r\nimport {\r\n ColorDef, ColorIndex, Feature, FeatureIndex, FeatureTable, FillFlags, PackedFeatureTable, QParams3d, QPoint3dList, RenderTexture,\r\n} from \"@itwin/core-common\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicBranch } from \"./GraphicBranch\";\r\nimport { MeshArgs } from \"./primitives/mesh/MeshPrimitives\";\r\nimport { DisplayParams } from \"../common/render/primitives/DisplayParams\";\r\nimport { MeshParams } from \"../common/render/primitives/MeshParams\";\r\nimport { createMeshParams } from \"./primitives/VertexTableBuilder\";\r\n\r\n/** Parameters used to construct a [[ParticleCollectionBuilder]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilderParams {\r\n /** The image mapped to each particle quad.\r\n * @note The texture should be disposed of when no longer needed to free up WebGL resources. For example, if a [[Decorator]] creates the texture, the\r\n * texture should probably be disposed of when the decorator is removed from the [[ViewManager]].\r\n */\r\n texture: RenderTexture;\r\n\r\n /** The default extents of the particle quad. Individual particles may apply a scale to these extents to produce particles of varying dimensions.\r\n * Must be positive.\r\n */\r\n size: XAndY | number;\r\n\r\n /** The initial transparency of the particles as an integer in [0,255]. Defaults to zero if omitted. */\r\n transparency?: number;\r\n\r\n /** The origin of the particle collection in world coordinates. Defaults to (0, 0, 0). */\r\n origin?: XYAndZ;\r\n\r\n /** If the particles are to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\r\n * @see [[IModelConnection.transientIdSequence]] to obtain an Id that is unique within an iModel.\r\n */\r\n pickableId?: Id64String;\r\n\r\n /** The viewport in which the particles will be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, the finished graphic will be defined in view coordinates, for use as a decoration of type [[GraphicType.ViewBackground]] or [[GraphicType.ViewOverlay]].\r\n * Defaults to false, indicating the graphic will be defined in world coordinates.\r\n * @see [[CoordSystem.View]] and [[CoordSystem.World]].\r\n */\r\n isViewCoords?: boolean;\r\n}\r\n\r\n/** Describes a particle to to add to a particle collection via [[ParticleCollectionBuilder.addParticle]].\r\n * The x, y, and z coordinates represent the centroid of the particle quad in the collection's coordinate space.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleProps extends XYAndZ {\r\n /** The size of the particle, in the collection's coordinate space. If omitted, it defaults to the size supplied to the collection by [[ParticleCollectionBuilderParams.size]].\r\n * Supplying a `number` produces a square; supplying a non-uniform `XAndY` produces a rectangle. Must be positive.\r\n */\r\n size?: XAndY | number;\r\n\r\n /** The transparency with which to draw the particle as an integer in [0,255]. If omitted, it defaults to the current value of [[ParticleCollectionBuilder.transparency]]. */\r\n transparency?: number;\r\n\r\n /** A rotation matrix to orient the particle. If supplied then the particle will not be automatically oriented towards the camera. */\r\n rotationMatrix?: Matrix3d;\r\n}\r\n\r\n/** Interface for producing a collection of particles suitable for use in particle effects.\r\n * Particle effects involve animating hundreds or thousands of small particles to simulate phenomena like smoke, fire, snow, etc.\r\n * A particle collection represents each particle as a quad (rectangle) displaying an image. The position of each particle corresponds to the\r\n * centroid of its quad. The transparency and size of each particle can be specified individually. By default, the quads will always rotate to face the camera\r\n * such that the image is fully visible.\r\n *\r\n * Creating a particle collection using a ParticleCollectionBuilder is far more efficient (in both CPU and GPU usage) than doing so using a [[GraphicBuilder]].\r\n * @see interactive demonstrations of [Snow and Rain](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=snow-rain-sample&imodel=Villa) and\r\n * [Fire and Smoke](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=fire-sample&imodel=Villa) particle effects.\r\n * @see [SnowEffect]($frontend-devtools) for an example of a particle effect.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilder {\r\n /** The default transparency for newly-added particles as an integer in [0,255], used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.transparency]] is omitted.\r\n * Changing this value has no effect on the transparency of previously-added particles.\r\n */\r\n transparency: number;\r\n\r\n /** The default size of each particle, used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.size]] is omitted. */\r\n size: XAndY;\r\n\r\n /** Add a particle to the collection.\r\n * If `size` is omitted, `this.size` is used.\r\n * If `transparency` is omitted, `this.transparency` is used.\r\n * @throws Error if particle size is defined and not greater than zero.\r\n */\r\n addParticle: (particle: ParticleProps) => void;\r\n\r\n /** Produces a finished graphic from the accumulated particles.\r\n * It returns the finished graphic, or `undefined` if the collection contains no particles or the [[RenderSystem]] failed to produce the graphic.\r\n * @note After this method returns, the particle collection is empty.\r\n */\r\n finish: () => RenderGraphic | undefined;\r\n}\r\n\r\n/** @public */\r\nexport namespace ParticleCollectionBuilder {\r\n /** Creates a new ParticleCollectionBuilder.\r\n * @throws Error if size is not greater than zero.\r\n */\r\n export function create(params: ParticleCollectionBuilderParams): ParticleCollectionBuilder {\r\n return new Builder(params);\r\n }\r\n}\r\n\r\nclass Particle {\r\n public readonly centroid: Point3d;\r\n public readonly transparency: number;\r\n public readonly width: number;\r\n public readonly height: number;\r\n public readonly rotationMatrix?: Matrix3d;\r\n\r\n public constructor(centroid: XYAndZ, width: number, height: number, transparency: number, rotationMatrix?: Matrix3d) {\r\n this.centroid = Point3d.fromJSON(centroid);\r\n this.transparency = transparency;\r\n this.width = width;\r\n this.height = height;\r\n this.rotationMatrix = rotationMatrix;\r\n }\r\n}\r\n\r\nclass Builder implements ParticleCollectionBuilder {\r\n private readonly _viewport: Viewport;\r\n private readonly _isViewCoords: boolean;\r\n private readonly _pickableId?: Id64String;\r\n private readonly _texture: RenderTexture;\r\n private readonly _size: Vector2d;\r\n private _transparency: number;\r\n private _hasVaryingTransparency = false;\r\n private readonly _localToWorldTransform: Transform;\r\n private readonly _range = Range3d.createNull();\r\n private _particlesOpaque: Particle[] = [];\r\n private _particlesTranslucent: Particle[] = [];\r\n\r\n public constructor(params: ParticleCollectionBuilderParams) {\r\n this._viewport = params.viewport;\r\n this._isViewCoords = true === params.isViewCoords;\r\n this._pickableId = params.pickableId;\r\n this._texture = params.texture;\r\n this._transparency = undefined !== params.transparency ? clampTransparency(params.transparency) : 0;\r\n this._localToWorldTransform = params.origin ? Transform.createTranslationXYZ(params.origin.x, params.origin.y, params.origin.z) : Transform.createIdentity();\r\n\r\n if (\"number\" === typeof params.size)\r\n this._size = new Vector2d(params.size, params.size);\r\n else\r\n this._size = Vector2d.fromJSON(params.size);\r\n\r\n if (this._size.x <= 0 || this._size.y <= 0)\r\n throw new Error(\"Particle size must be greater than zero\");\r\n }\r\n\r\n public get size(): XAndY {\r\n return this._size;\r\n }\r\n\r\n public get transparency() {\r\n return this._transparency;\r\n }\r\n\r\n public set transparency(transparency: number) {\r\n transparency = clampTransparency(transparency);\r\n if (transparency !== this._transparency) {\r\n this._transparency = transparency;\r\n this._hasVaryingTransparency = this._particlesTranslucent.length > 0;\r\n }\r\n }\r\n\r\n public addParticle(props: ParticleProps): void {\r\n const size = props.size ?? this._size;\r\n let width, height;\r\n if (\"number\" === typeof size) {\r\n width = height = size;\r\n } else {\r\n width = size.x;\r\n height = size.y;\r\n }\r\n\r\n if (width <= 0 || height <= 0)\r\n throw new Error(\"A particle must have a size greater than zero\");\r\n\r\n const transparency = undefined !== props.transparency ? clampTransparency(props.transparency) : this.transparency;\r\n if (transparency !== this.transparency && this._particlesTranslucent.length > 0)\r\n this._hasVaryingTransparency = true;\r\n\r\n const particle = new Particle(props, width, height, transparency, props.rotationMatrix);\r\n if (transparency > 0)\r\n this._particlesTranslucent.push(particle);\r\n else\r\n this._particlesOpaque.push(particle);\r\n this._range.extendPoint(particle.centroid);\r\n }\r\n\r\n public finish(): RenderGraphic | undefined {\r\n if (0 === this._particlesTranslucent.length + this._particlesOpaque.length)\r\n return undefined;\r\n\r\n // Order-independent transparency doesn't work well with opaque geometry - it will look semi-transparent.\r\n // If we have a mix of opaque and transparent particles, put them in separate graphics to be rendered in separate passes.\r\n const opaque = this.createGraphic(this._particlesOpaque, 0);\r\n const transparent = this.createGraphic(this._particlesTranslucent, this._hasVaryingTransparency ? undefined : this._transparency);\r\n\r\n // Empty the collection before any return statements.\r\n const range = this._range.clone();\r\n this._range.setNull();\r\n this._particlesOpaque.length = 0;\r\n this._particlesTranslucent.length = 0;\r\n this._hasVaryingTransparency = false;\r\n\r\n if (!transparent && !opaque)\r\n return undefined;\r\n\r\n // Transform from origin to collection, then to world.\r\n const toCollection = Transform.createTranslation(range.center);\r\n const toWorld = toCollection.multiplyTransformTransform(this._localToWorldTransform);\r\n const branch = new GraphicBranch(true);\r\n if (opaque)\r\n branch.add(opaque);\r\n\r\n if (transparent)\r\n branch.add(transparent);\r\n\r\n let graphic = this._viewport.target.renderSystem.createGraphicBranch(branch, toWorld);\r\n\r\n // If we have a pickable Id, produce a batch.\r\n // NB: We pass this._pickableId as the FeatureTable's modelId so that it will be treated like a reality model or a map -\r\n // specifically, it can be located and display a tooltip, but can't be selected.\r\n const featureTable = this._pickableId ? new FeatureTable(1, this._pickableId) : undefined;\r\n if (featureTable) {\r\n this._localToWorldTransform.multiplyRange(range, range);\r\n featureTable.insert(new Feature(this._pickableId));\r\n graphic = this._viewport.target.renderSystem.createBatch(graphic, PackedFeatureTable.pack(featureTable), range);\r\n }\r\n\r\n return graphic;\r\n }\r\n\r\n private createGraphic(particles: Particle[], uniformTransparency: number | undefined): RenderGraphic | undefined {\r\n const numParticles = particles.length;\r\n if (numParticles <= 0)\r\n return undefined;\r\n\r\n // To keep scale values close to 1, compute mean size to use as size of quad.\r\n const meanSize = new Vector2d();\r\n let maxSize = 0;\r\n for (const particle of particles) {\r\n meanSize.x += particle.width;\r\n meanSize.y += particle.height;\r\n if (particle.width > maxSize)\r\n maxSize = particle.width;\r\n if (particle.height > maxSize)\r\n maxSize = particle.height;\r\n }\r\n meanSize.x /= numParticles;\r\n meanSize.y /= numParticles;\r\n\r\n // Define InstancedGraphicParams for particles.\r\n const rangeCenter = this._range.center;\r\n const floatsPerTransform = 12;\r\n const transforms = new Float32Array(floatsPerTransform * numParticles);\r\n const bytesPerOverride = 8;\r\n const symbologyOverrides = undefined === uniformTransparency ? new Uint8Array(bytesPerOverride * numParticles) : undefined;\r\n\r\n const viewToWorld = this._viewport.view.getRotation().transpose();\r\n let tfIndex = 0;\r\n let ovrIndex = 0;\r\n for (const particle of particles) {\r\n const scaleX = particle.width / meanSize.x;\r\n const scaleY = particle.height / meanSize.y;\r\n if (this._isViewCoords) {\r\n // Particles already face the camera in view coords - just apply the scale.\r\n transforms[tfIndex + 0] = scaleX;\r\n transforms[tfIndex + 5] = scaleY;\r\n transforms[tfIndex + 10] = 1;\r\n } else if (undefined !== particle.rotationMatrix) {\r\n // Scale rotation matrix relative to size of quad.\r\n transforms[tfIndex + 0] = particle.rotationMatrix.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = particle.rotationMatrix.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = particle.rotationMatrix.coffs[2];\r\n transforms[tfIndex + 4] = particle.rotationMatrix.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = particle.rotationMatrix.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = particle.rotationMatrix.coffs[5];\r\n transforms[tfIndex + 8] = particle.rotationMatrix.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = particle.rotationMatrix.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = particle.rotationMatrix.coffs[8];\r\n } else {\r\n // Rotate about origin by inverse view matrix so quads always face the camera and scale relative to size of quad.\r\n transforms[tfIndex + 0] = viewToWorld.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = viewToWorld.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = viewToWorld.coffs[2];\r\n transforms[tfIndex + 4] = viewToWorld.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = viewToWorld.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = viewToWorld.coffs[5];\r\n transforms[tfIndex + 8] = viewToWorld.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = viewToWorld.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = viewToWorld.coffs[8];\r\n }\r\n\r\n // Translate relative to center of particles range.\r\n transforms[tfIndex + 3] = particle.centroid.x - rangeCenter.x;\r\n transforms[tfIndex + 7] = particle.centroid.y - rangeCenter.y;\r\n transforms[tfIndex + 11] = particle.centroid.z - rangeCenter.z;\r\n\r\n tfIndex += floatsPerTransform;\r\n\r\n if (symbologyOverrides) {\r\n // See FeatureOverrides.buildLookupTable() for layout.\r\n symbologyOverrides[ovrIndex + 0] = 1 << 2; // OvrFlags.Alpha\r\n symbologyOverrides[ovrIndex + 7] = 0xff - particle.transparency;\r\n\r\n ovrIndex += bytesPerOverride;\r\n }\r\n }\r\n\r\n // Produce instanced quads.\r\n // Note: We do not need to allocate an array of featureIds. If we have a pickableId, all particles refer to the same Feature, with index 0.\r\n // So we leave the vertex attribute disabled causing the shader to receive the default (0, 0, 0) which happens to correspond to our feature index.\r\n const quad = createQuad(meanSize, this._texture, uniformTransparency ?? 0x7f, this._viewport);\r\n const transformCenter = new Point3d(0, 0, 0);\r\n const range = computeRange(this._range, rangeCenter, maxSize);\r\n const instances = { count: numParticles, transforms, transformCenter, symbologyOverrides, range };\r\n return this._viewport.target.renderSystem.createMesh(quad, instances);\r\n }\r\n}\r\n\r\nfunction createQuad(size: XAndY, texture: RenderTexture, transparency: number, viewport: Viewport): MeshParams {\r\n const halfWidth = size.x / 2;\r\n const halfHeight = size.y / 2;\r\n const corners = [\r\n new Point3d(-halfWidth, -halfHeight, 0), new Point3d(halfWidth, -halfHeight, 0),\r\n new Point3d(-halfWidth, halfHeight, 0), new Point3d(halfWidth, halfHeight, 0),\r\n ];\r\n\r\n const range = new Range3d();\r\n range.low = corners[0];\r\n range.high = corners[3];\r\n\r\n const points = new QPoint3dList(QParams3d.fromRange(range));\r\n for (const corner of corners)\r\n points.add(corner);\r\n\r\n const colors = new ColorIndex();\r\n colors.initUniform(ColorDef.white.withTransparency(transparency));\r\n\r\n const quadArgs: MeshArgs = {\r\n points,\r\n vertIndices: [0, 1, 2, 2, 1, 3],\r\n fillFlags: FillFlags.None,\r\n isPlanar: true,\r\n colors,\r\n features: new FeatureIndex(),\r\n textureMapping: {\r\n texture,\r\n uvParams: [new Point2d(0, 1), new Point2d(1, 1), new Point2d(0, 0), new Point2d(1, 0)],\r\n },\r\n };\r\n\r\n return createMeshParams(quadArgs, viewport.target.renderSystem.maxTextureSize);\r\n}\r\n\r\nfunction clampTransparency(transparency: number): number {\r\n transparency = Math.min(255, transparency, Math.max(0, transparency));\r\n transparency = Math.floor(transparency);\r\n if (transparency < DisplayParams.minTransparency)\r\n transparency = 0;\r\n\r\n return transparency;\r\n}\r\n\r\nfunction computeRange(centroidRange: Range3d, center: Point3d, maxSize: number): Range3d {\r\n const range2 = centroidRange.clone();\r\n range2.low.subtractInPlace(center);\r\n range2.high.subtractInPlace(center);\r\n const halfSize = maxSize * 0.5;\r\n range2.low.x -= halfSize;\r\n range2.low.y -= halfSize;\r\n range2.low.z -= halfSize;\r\n range2.high.x += halfSize;\r\n range2.high.y += halfSize;\r\n range2.high.z += halfSize;\r\n return range2;\r\n}\r\n"]}
1
+ {"version":3,"file":"ParticleCollectionBuilder.js","sourceRoot":"","sources":["../../../src/render/ParticleCollectionBuilder.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAY,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAiB,MAAM,sBAAsB,CAAC;AAC/G,OAAO,EACL,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,GAClH,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC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AI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { Matrix3d, Point2d, Point3d, Range3d, Transform, Vector2d, XAndY, XYAndZ } from \"@itwin/core-geometry\";\r\nimport {\r\n ColorDef, ColorIndex, Feature, FeatureIndex, FeatureTable, FillFlags, PackedFeatureTable, QParams3d, QPoint3dList, RenderTexture,\r\n} from \"@itwin/core-common\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicBranch } from \"./GraphicBranch\";\r\nimport { MeshArgs } from \"./primitives/mesh/MeshPrimitives\";\r\nimport { DisplayParams } from \"../common/render/primitives/DisplayParams\";\r\nimport { MeshParams } from \"../common/render/primitives/MeshParams\";\r\nimport { createMeshParams } from \"./primitives/VertexTableBuilder\";\r\n\r\n/** Parameters used to construct a [[ParticleCollectionBuilder]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilderParams {\r\n /** The image mapped to each particle quad.\r\n * @note The texture should be disposed of when no longer needed to free up WebGL resources. For example, if a [[Decorator]] creates the texture, the\r\n * texture should probably be disposed of when the decorator is removed from the [[ViewManager]].\r\n */\r\n texture: RenderTexture;\r\n\r\n /** The default extents of the particle quad. Individual particles may apply a scale to these extents to produce particles of varying dimensions.\r\n * Must be positive.\r\n */\r\n size: XAndY | number;\r\n\r\n /** The initial transparency of the particles as an integer in [0,255]. Defaults to zero if omitted. */\r\n transparency?: number;\r\n\r\n /** The origin of the particle collection in world coordinates. Defaults to (0, 0, 0). */\r\n origin?: XYAndZ;\r\n\r\n /** If the particles are to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\r\n * @see [[IModelConnection.transientIdSequence]] to obtain an Id that is unique within an iModel.\r\n */\r\n pickableId?: Id64String;\r\n\r\n /** The viewport in which the particles will be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, the finished graphic will be defined in view coordinates, for use as a decoration of type [[GraphicType.ViewBackground]] or [[GraphicType.ViewOverlay]].\r\n * Defaults to false, indicating the graphic will be defined in world coordinates.\r\n * @see [[CoordSystem.View]] and [[CoordSystem.World]].\r\n */\r\n isViewCoords?: boolean;\r\n}\r\n\r\n/** Describes a particle to to add to a particle collection via [[ParticleCollectionBuilder.addParticle]].\r\n * The x, y, and z coordinates represent the centroid of the particle quad in the collection's coordinate space.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleProps extends XYAndZ {\r\n /** The size of the particle, in the collection's coordinate space. If omitted, it defaults to the size supplied to the collection by [[ParticleCollectionBuilderParams.size]].\r\n * Supplying a `number` produces a square; supplying a non-uniform `XAndY` produces a rectangle. Must be positive.\r\n */\r\n size?: XAndY | number;\r\n\r\n /** The transparency with which to draw the particle as an integer in [0,255]. If omitted, it defaults to the current value of [[ParticleCollectionBuilder.transparency]]. */\r\n transparency?: number;\r\n\r\n /** A rotation matrix to orient the particle. If supplied then the particle will not be automatically oriented towards the camera. */\r\n rotationMatrix?: Matrix3d;\r\n}\r\n\r\n/** Interface for producing a collection of particles suitable for use in particle effects.\r\n * Particle effects involve animating hundreds or thousands of small particles to simulate phenomena like smoke, fire, snow, etc.\r\n * A particle collection represents each particle as a quad (rectangle) displaying an image. The position of each particle corresponds to the\r\n * centroid of its quad. The transparency and size of each particle can be specified individually. By default, the quads will always rotate to face the camera\r\n * such that the image is fully visible.\r\n *\r\n * Creating a particle collection using a ParticleCollectionBuilder is far more efficient (in both CPU and GPU usage) than doing so using a [[GraphicBuilder]].\r\n * @see interactive demonstrations of [Snow and Rain](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=snow-rain-sample&imodel=Villa) and\r\n * [Fire and Smoke](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=fire-sample&imodel=Villa) particle effects.\r\n * @see [SnowEffect]($frontend-devtools) for an example of a particle effect.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilder {\r\n /** The default transparency for newly-added particles as an integer in [0,255], used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.transparency]] is omitted.\r\n * Changing this value has no effect on the transparency of previously-added particles.\r\n */\r\n transparency: number;\r\n\r\n /** The default size of each particle, used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.size]] is omitted. */\r\n size: XAndY;\r\n\r\n /** Add a particle to the collection.\r\n * If `size` is omitted, `this.size` is used.\r\n * If `transparency` is omitted, `this.transparency` is used.\r\n * @throws Error if particle size is defined and not greater than zero.\r\n */\r\n addParticle: (particle: ParticleProps) => void;\r\n\r\n /** Produces a finished graphic from the accumulated particles.\r\n * It returns the finished graphic, or `undefined` if the collection contains no particles or the [[RenderSystem]] failed to produce the graphic.\r\n * @note After this method returns, the particle collection is empty.\r\n */\r\n finish: () => RenderGraphic | undefined;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace ParticleCollectionBuilder {\r\n /** Creates a new ParticleCollectionBuilder.\r\n * @throws Error if size is not greater than zero.\r\n */\r\n export function create(params: ParticleCollectionBuilderParams): ParticleCollectionBuilder {\r\n return new Builder(params);\r\n }\r\n}\r\n\r\nclass Particle {\r\n public readonly centroid: Point3d;\r\n public readonly transparency: number;\r\n public readonly width: number;\r\n public readonly height: number;\r\n public readonly rotationMatrix?: Matrix3d;\r\n\r\n public constructor(centroid: XYAndZ, width: number, height: number, transparency: number, rotationMatrix?: Matrix3d) {\r\n this.centroid = Point3d.fromJSON(centroid);\r\n this.transparency = transparency;\r\n this.width = width;\r\n this.height = height;\r\n this.rotationMatrix = rotationMatrix;\r\n }\r\n}\r\n\r\nclass Builder implements ParticleCollectionBuilder {\r\n private readonly _viewport: Viewport;\r\n private readonly _isViewCoords: boolean;\r\n private readonly _pickableId?: Id64String;\r\n private readonly _texture: RenderTexture;\r\n private readonly _size: Vector2d;\r\n private _transparency: number;\r\n private _hasVaryingTransparency = false;\r\n private readonly _localToWorldTransform: Transform;\r\n private readonly _range = Range3d.createNull();\r\n private _particlesOpaque: Particle[] = [];\r\n private _particlesTranslucent: Particle[] = [];\r\n\r\n public constructor(params: ParticleCollectionBuilderParams) {\r\n this._viewport = params.viewport;\r\n this._isViewCoords = true === params.isViewCoords;\r\n this._pickableId = params.pickableId;\r\n this._texture = params.texture;\r\n this._transparency = undefined !== params.transparency ? clampTransparency(params.transparency) : 0;\r\n this._localToWorldTransform = params.origin ? Transform.createTranslationXYZ(params.origin.x, params.origin.y, params.origin.z) : Transform.createIdentity();\r\n\r\n if (\"number\" === typeof params.size)\r\n this._size = new Vector2d(params.size, params.size);\r\n else\r\n this._size = Vector2d.fromJSON(params.size);\r\n\r\n if (this._size.x <= 0 || this._size.y <= 0)\r\n throw new Error(\"Particle size must be greater than zero\");\r\n }\r\n\r\n public get size(): XAndY {\r\n return this._size;\r\n }\r\n\r\n public get transparency() {\r\n return this._transparency;\r\n }\r\n\r\n public set transparency(transparency: number) {\r\n transparency = clampTransparency(transparency);\r\n if (transparency !== this._transparency) {\r\n this._transparency = transparency;\r\n this._hasVaryingTransparency = this._particlesTranslucent.length > 0;\r\n }\r\n }\r\n\r\n public addParticle(props: ParticleProps): void {\r\n const size = props.size ?? this._size;\r\n let width, height;\r\n if (\"number\" === typeof size) {\r\n width = height = size;\r\n } else {\r\n width = size.x;\r\n height = size.y;\r\n }\r\n\r\n if (width <= 0 || height <= 0)\r\n throw new Error(\"A particle must have a size greater than zero\");\r\n\r\n const transparency = undefined !== props.transparency ? clampTransparency(props.transparency) : this.transparency;\r\n if (transparency !== this.transparency && this._particlesTranslucent.length > 0)\r\n this._hasVaryingTransparency = true;\r\n\r\n const particle = new Particle(props, width, height, transparency, props.rotationMatrix);\r\n if (transparency > 0)\r\n this._particlesTranslucent.push(particle);\r\n else\r\n this._particlesOpaque.push(particle);\r\n this._range.extendPoint(particle.centroid);\r\n }\r\n\r\n public finish(): RenderGraphic | undefined {\r\n if (0 === this._particlesTranslucent.length + this._particlesOpaque.length)\r\n return undefined;\r\n\r\n // Order-independent transparency doesn't work well with opaque geometry - it will look semi-transparent.\r\n // If we have a mix of opaque and transparent particles, put them in separate graphics to be rendered in separate passes.\r\n const opaque = this.createGraphic(this._particlesOpaque, 0);\r\n const transparent = this.createGraphic(this._particlesTranslucent, this._hasVaryingTransparency ? undefined : this._transparency);\r\n\r\n // Empty the collection before any return statements.\r\n const range = this._range.clone();\r\n this._range.setNull();\r\n this._particlesOpaque.length = 0;\r\n this._particlesTranslucent.length = 0;\r\n this._hasVaryingTransparency = false;\r\n\r\n if (!transparent && !opaque)\r\n return undefined;\r\n\r\n // Transform from origin to collection, then to world.\r\n const toCollection = Transform.createTranslation(range.center);\r\n const toWorld = toCollection.multiplyTransformTransform(this._localToWorldTransform);\r\n const branch = new GraphicBranch(true);\r\n if (opaque)\r\n branch.add(opaque);\r\n\r\n if (transparent)\r\n branch.add(transparent);\r\n\r\n let graphic = this._viewport.target.renderSystem.createGraphicBranch(branch, toWorld);\r\n\r\n // If we have a pickable Id, produce a batch.\r\n // NB: We pass this._pickableId as the FeatureTable's modelId so that it will be treated like a reality model or a map -\r\n // specifically, it can be located and display a tooltip, but can't be selected.\r\n const featureTable = this._pickableId ? new FeatureTable(1, this._pickableId) : undefined;\r\n if (featureTable) {\r\n this._localToWorldTransform.multiplyRange(range, range);\r\n featureTable.insert(new Feature(this._pickableId));\r\n graphic = this._viewport.target.renderSystem.createBatch(graphic, PackedFeatureTable.pack(featureTable), range);\r\n }\r\n\r\n return graphic;\r\n }\r\n\r\n private createGraphic(particles: Particle[], uniformTransparency: number | undefined): RenderGraphic | undefined {\r\n const numParticles = particles.length;\r\n if (numParticles <= 0)\r\n return undefined;\r\n\r\n // To keep scale values close to 1, compute mean size to use as size of quad.\r\n const meanSize = new Vector2d();\r\n let maxSize = 0;\r\n for (const particle of particles) {\r\n meanSize.x += particle.width;\r\n meanSize.y += particle.height;\r\n if (particle.width > maxSize)\r\n maxSize = particle.width;\r\n if (particle.height > maxSize)\r\n maxSize = particle.height;\r\n }\r\n meanSize.x /= numParticles;\r\n meanSize.y /= numParticles;\r\n\r\n // Define InstancedGraphicParams for particles.\r\n const rangeCenter = this._range.center;\r\n const floatsPerTransform = 12;\r\n const transforms = new Float32Array(floatsPerTransform * numParticles);\r\n const bytesPerOverride = 8;\r\n const symbologyOverrides = undefined === uniformTransparency ? new Uint8Array(bytesPerOverride * numParticles) : undefined;\r\n\r\n const viewToWorld = this._viewport.view.getRotation().transpose();\r\n let tfIndex = 0;\r\n let ovrIndex = 0;\r\n for (const particle of particles) {\r\n const scaleX = particle.width / meanSize.x;\r\n const scaleY = particle.height / meanSize.y;\r\n if (this._isViewCoords) {\r\n // Particles already face the camera in view coords - just apply the scale.\r\n transforms[tfIndex + 0] = scaleX;\r\n transforms[tfIndex + 5] = scaleY;\r\n transforms[tfIndex + 10] = 1;\r\n } else if (undefined !== particle.rotationMatrix) {\r\n // Scale rotation matrix relative to size of quad.\r\n transforms[tfIndex + 0] = particle.rotationMatrix.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = particle.rotationMatrix.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = particle.rotationMatrix.coffs[2];\r\n transforms[tfIndex + 4] = particle.rotationMatrix.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = particle.rotationMatrix.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = particle.rotationMatrix.coffs[5];\r\n transforms[tfIndex + 8] = particle.rotationMatrix.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = particle.rotationMatrix.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = particle.rotationMatrix.coffs[8];\r\n } else {\r\n // Rotate about origin by inverse view matrix so quads always face the camera and scale relative to size of quad.\r\n transforms[tfIndex + 0] = viewToWorld.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = viewToWorld.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = viewToWorld.coffs[2];\r\n transforms[tfIndex + 4] = viewToWorld.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = viewToWorld.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = viewToWorld.coffs[5];\r\n transforms[tfIndex + 8] = viewToWorld.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = viewToWorld.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = viewToWorld.coffs[8];\r\n }\r\n\r\n // Translate relative to center of particles range.\r\n transforms[tfIndex + 3] = particle.centroid.x - rangeCenter.x;\r\n transforms[tfIndex + 7] = particle.centroid.y - rangeCenter.y;\r\n transforms[tfIndex + 11] = particle.centroid.z - rangeCenter.z;\r\n\r\n tfIndex += floatsPerTransform;\r\n\r\n if (symbologyOverrides) {\r\n // See FeatureOverrides.buildLookupTable() for layout.\r\n symbologyOverrides[ovrIndex + 0] = 1 << 2; // OvrFlags.Alpha\r\n symbologyOverrides[ovrIndex + 7] = 0xff - particle.transparency;\r\n\r\n ovrIndex += bytesPerOverride;\r\n }\r\n }\r\n\r\n // Produce instanced quads.\r\n // Note: We do not need to allocate an array of featureIds. If we have a pickableId, all particles refer to the same Feature, with index 0.\r\n // So we leave the vertex attribute disabled causing the shader to receive the default (0, 0, 0) which happens to correspond to our feature index.\r\n const quad = createQuad(meanSize, this._texture, uniformTransparency ?? 0x7f, this._viewport);\r\n const transformCenter = new Point3d(0, 0, 0);\r\n const range = computeRange(this._range, rangeCenter, maxSize);\r\n const instances = { count: numParticles, transforms, transformCenter, symbologyOverrides, range };\r\n return this._viewport.target.renderSystem.createMesh(quad, instances);\r\n }\r\n}\r\n\r\nfunction createQuad(size: XAndY, texture: RenderTexture, transparency: number, viewport: Viewport): MeshParams {\r\n const halfWidth = size.x / 2;\r\n const halfHeight = size.y / 2;\r\n const corners = [\r\n new Point3d(-halfWidth, -halfHeight, 0), new Point3d(halfWidth, -halfHeight, 0),\r\n new Point3d(-halfWidth, halfHeight, 0), new Point3d(halfWidth, halfHeight, 0),\r\n ];\r\n\r\n const range = new Range3d();\r\n range.low = corners[0];\r\n range.high = corners[3];\r\n\r\n const points = new QPoint3dList(QParams3d.fromRange(range));\r\n for (const corner of corners)\r\n points.add(corner);\r\n\r\n const colors = new ColorIndex();\r\n colors.initUniform(ColorDef.white.withTransparency(transparency));\r\n\r\n const quadArgs: MeshArgs = {\r\n points,\r\n vertIndices: [0, 1, 2, 2, 1, 3],\r\n fillFlags: FillFlags.None,\r\n isPlanar: true,\r\n colors,\r\n features: new FeatureIndex(),\r\n textureMapping: {\r\n texture,\r\n uvParams: [new Point2d(0, 1), new Point2d(1, 1), new Point2d(0, 0), new Point2d(1, 0)],\r\n },\r\n };\r\n\r\n return createMeshParams(quadArgs, viewport.target.renderSystem.maxTextureSize);\r\n}\r\n\r\nfunction clampTransparency(transparency: number): number {\r\n transparency = Math.min(255, transparency, Math.max(0, transparency));\r\n transparency = Math.floor(transparency);\r\n if (transparency < DisplayParams.minTransparency)\r\n transparency = 0;\r\n\r\n return transparency;\r\n}\r\n\r\nfunction computeRange(centroidRange: Range3d, center: Point3d, maxSize: number): Range3d {\r\n const range2 = centroidRange.clone();\r\n range2.low.subtractInPlace(center);\r\n range2.high.subtractInPlace(center);\r\n const halfSize = maxSize * 0.5;\r\n range2.low.x -= halfSize;\r\n range2.low.y -= halfSize;\r\n range2.low.z -= halfSize;\r\n range2.high.x += halfSize;\r\n range2.high.y += halfSize;\r\n range2.high.z += halfSize;\r\n return range2;\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-frontend",
3
- "version": "4.4.0-dev.6",
3
+ "version": "4.4.0-dev.7",
4
4
  "description": "iTwin.js frontend components",
5
5
  "main": "lib/cjs/core-frontend.js",
6
6
  "module": "lib/esm/core-frontend.js",
@@ -23,12 +23,12 @@
23
23
  "url": "http://www.bentley.com"
24
24
  },
25
25
  "peerDependencies": {
26
- "@itwin/appui-abstract": "^4.4.0-dev.6",
27
- "@itwin/core-bentley": "^4.4.0-dev.6",
28
- "@itwin/core-common": "^4.4.0-dev.6",
29
- "@itwin/core-geometry": "^4.4.0-dev.6",
30
- "@itwin/core-orbitgt": "^4.4.0-dev.6",
31
- "@itwin/core-quantity": "^4.4.0-dev.6"
26
+ "@itwin/appui-abstract": "^4.4.0-dev.7",
27
+ "@itwin/core-bentley": "^4.4.0-dev.7",
28
+ "@itwin/core-common": "^4.4.0-dev.7",
29
+ "@itwin/core-geometry": "^4.4.0-dev.7",
30
+ "@itwin/core-orbitgt": "^4.4.0-dev.7",
31
+ "@itwin/core-quantity": "^4.4.0-dev.7"
32
32
  },
33
33
  "//devDependencies": [
34
34
  "NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install",
@@ -55,14 +55,14 @@
55
55
  "typescript": "~5.0.2",
56
56
  "typemoq": "^2.1.0",
57
57
  "webpack": "^5.76.0",
58
- "@itwin/appui-abstract": "4.4.0-dev.6",
59
- "@itwin/core-bentley": "4.4.0-dev.6",
60
- "@itwin/build-tools": "4.4.0-dev.6",
61
- "@itwin/core-common": "4.4.0-dev.6",
62
- "@itwin/core-orbitgt": "4.4.0-dev.6",
63
- "@itwin/core-geometry": "4.4.0-dev.6",
64
- "@itwin/core-quantity": "4.4.0-dev.6",
65
- "@itwin/certa": "4.4.0-dev.6"
58
+ "@itwin/appui-abstract": "4.4.0-dev.7",
59
+ "@itwin/build-tools": "4.4.0-dev.7",
60
+ "@itwin/core-bentley": "4.4.0-dev.7",
61
+ "@itwin/core-common": "4.4.0-dev.7",
62
+ "@itwin/core-orbitgt": "4.4.0-dev.7",
63
+ "@itwin/core-geometry": "4.4.0-dev.7",
64
+ "@itwin/core-quantity": "4.4.0-dev.7",
65
+ "@itwin/certa": "4.4.0-dev.7"
66
66
  },
67
67
  "//dependencies": [
68
68
  "NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API",
@@ -75,9 +75,9 @@
75
75
  "@loaders.gl/draco": "^3.1.6",
76
76
  "fuse.js": "^3.3.0",
77
77
  "wms-capabilities": "0.4.0",
78
- "@itwin/core-i18n": "4.4.0-dev.6",
79
- "@itwin/core-telemetry": "4.4.0-dev.6",
80
- "@itwin/webgl-compatibility": "4.4.0-dev.6"
78
+ "@itwin/core-i18n": "4.4.0-dev.7",
79
+ "@itwin/core-telemetry": "4.4.0-dev.7",
80
+ "@itwin/webgl-compatibility": "4.4.0-dev.7"
81
81
  },
82
82
  "nyc": {
83
83
  "extends": "./node_modules/@itwin/build-tools/.nycrc"