Change History > 2 15 0 Edit this page 2.15.0 Change Notes Clipping enhancements The contents of a ViewState can be clipped by applying a ClipVector to the view via ViewState.setViewClip. Several enhancements have been made to this feature: Colorization ClipStyle.insideColor and ClipStyle.outsideColor can be used to colorize geometry based on whether it is inside or outside of the clip volume. If the outside color is defined, then that geometry will be drawn in the specified color instead of being clipped. These properties replace the beta Viewport methods setInsideColor and setOutsideColor and are saved in the DisplayStyle. Model clip groups ModelClipGroups can be used to apply additional clip volumes to groups of models. Try it out with an interactive demo. Note that ViewFlags.clipVolume applies only to the view clip - model clips apply regardless of view flags. Nested clip volumes Clip volumes now nest. For example, if you define a view clip, a model clip group, and a schedule script that applies its own clip volume, then geometry will be clipped by the intersection of all three clip volumes. Previously, only one clip volume could be active at a time. Txn monitoring TxnManager now has additional events for monitoring changes to the iModel resulting from Txns, including: TxnManager.onModelsChanged for changes to the properties of Models and TxnManager.onModelGeometryChanged for changes to the geometry contained within GeometricModels. BriefcaseConnection.txns now exposes the same events provided by TxnManager, but on the frontend, via BriefcaseTxns. New settings UI features Add settings tabs and pages to UI Quantity formatting settings The QuantityFormatSettingsPage component has been added to provide the UI to set both the PresentationUnitSystem and formatting overrides in the QuantityFormatter. This component can be used in the new SettingsContainer UI component. The function getQuantityFormatsSettingsManagerEntry will return a SettingsTabEntry for use by the SettingsManager. User Interface Settings The UiSettingsPage component has been to provide the UI to set general UI settings that effect the look and feel of the App UI user interface. This component can be used in the new SettingsContainer UI component. The function getUiSettingsManagerEntry will return a SettingsTabEntry for use by the SettingsManager. Registering settings Below is an example of registering the QuantityFormatSettingsPage with the SettingsManager. // Sample settings provider that dynamically adds settings into the setting stage export class AppSettingsTabsProvider implements SettingsTabsProvider { public readonly id = "AppSettingsTabsProvider"; public getSettingEntries(_stageId: string, _stageUsage: string): ReadonlyArray<SettingsTabEntry> | undefined { return [ getQuantityFormatsSettingsManagerEntry(10, {availableUnitSystems:new Set(["metric","imperial","usSurvey"])}), getUiSettingsManagerEntry(30, true), ]; } public static initializeAppSettingProvider() { UiFramework.settingsManager.addSettingsProvider(new AppSettingsTabsProvider()); } } The QuantityFormatSettingsPage is marked as alpha in this release and is subject to minor modifications in future releases. @bentley/imodeljs-quantity The alpha classes, interfaces, and definitions in the package @bentley/imodeljs-quantity have been updated to beta. Added NativeHost.settingsStore for storing user-level settings for native applications The @beta class NativeHost now has a member NativeHost.settingsStore that may be used by native applications to store user-level data in a file in the [NativeHost.appSettingsCacheDir directory. It uses the NativeAppStorage api to store and load key/value pairs. Note that these settings are stored in a local file that may be deleted by the user, so it should only be used for a local cache of values that may be restored elsewhere. NativeApp is now @beta The class NativeApp has been promoted from @alpha to @beta. NativeApp is relevant for both Electron and mobile applications. Please provide feedback if you have issues or concerns on its use. Properly declare changeSetId There were a number of places where changeSetId variables/parameters were incorrectly typed as GuidString instead of string. A changeSetId is a string hash value based on the ChangeSet contents and parent. It is not a GUID. This is not a breaking change because GuidString is just a type alias for string. It was, however, confusing from a usage and documentation perspective and needed to be corrected. Promoted APIs The following APIs have been promoted to public. Public APIs are guaranteed to remain stable for the duration of the current major version of a package. @bentley/bentleyjs-core assert for asserting logic invariants. ProcessDetector for querying the type of executing JavaScript process. ObservableSet for a Set that emits events when its contents are modified. ByteStream for extracting data from binary streams. Types related to collections of Id64Strings OrderedId64Iterable and OrderedId64Array CompressedId64Set and MutableCompressedId64Set @bentley/hypermodeling-frontend All hyper-modeling APIs are now public. This interactive sample demonstrates how to use hyper-modeling features. @bentley/imodeljs-common ThematicDisplay for colorizing a Viewport's scene based on aspects of the rendered geometry. This interactive sample demonstrates the usage of thematic display. Tween for smooth interpolation of values (based on Tween.js) @bentley/imodeljs-frontend ViewGlobeSatelliteTool, ViewGlobeBirdTool, ViewGlobeLocationTool, ViewGlobeIModelTool for viewing the iModel in a global context. MeasureLengthTool, MeasureAreaTool, MeasureVolumeTool for reporting element mass properties. MeasureLocationTool, MeasureDistanceTool, MeasureAreaByPointsTool for reporting point coordinates, point to point distance, and area defined by points. SetupWalkCameraTool to establish the starting position for the walk tool by identifying a point on the floor and look direction. ViewClipByPlaneTool, ViewClipByRangeTool, ViewClipByShapeTool, ViewClipByElementTool, ViewClipClearTool to section a view by a set of clip planes or clip volume. @bentley/imodeljs-backend StandaloneDb for opening Standalone iModels Breaking API changes @bentley/imodeljs-frontend The beta class InteractiveEditingSession was renamed to GraphicalEditingScope, resulting in renaming of several related APIs: GraphicalEditingScope.exit replaces end. GraphicalEditingScope.onEnter, GraphicalEditingScope.onExiting, and GraphicalEditingScope.onExited replace onBegin, onEnding, and onEnded respectively. BriefcaseConnection.editingScope and BriefcaseConnection.enterEditingScope replace editingSession and beginEditingSession. BriefcaseConnection.supportsGraphicalEditing replaces supportsInteractiveEditing. @bentley/ui-core The beta class SettingsProvider was renamed to SettingsTabsProvider. @bentley/ui-framework The beta class QuantityFormatSettingsPanel was renamed to QuantityFormatSettingsPage. @bentley/imodeljs-quantity UnitProps property name change The interface UnitProps property unitFamily has been renamed to phenomenon to be consistent with naming in ecschema-metadata package. @bentley/presentation-components Return value of usePresentationTreeNodeLoader hook was changed from PagedTreeNodeLoader<IPresentationTreeDataProvider> to { nodeLoader: PagedTreeNodeLoader<IPresentationTreeDataProvider>; onItemsRendered: (items: RenderedItemsRange) => void; } Callback onItemsRendered returned from usePresentationTreeNodeLoader hook should be passed to ControlledTree when property enableHierarchyAutoUpdate on PresentationTreeNodeLoaderProps is set to true. If hierarchy auto update is not enabled replace: const nodeLoader = usePresentationTreeNodeLoader(props); With: const { nodeLoader } = usePresentationTreeNodeLoader(props); If hierarchy auto update is enabled replace: const nodeLoader = usePresentationTreeNodeLoader(props); With: const { nodeLoader, onItemsRendered } = usePresentationTreeNodeLoader(props); return <ControlledTree onItemsRendered={onItemsRendered} />; Last Updated: 11 June, 2024