# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

## [17.2.0] 2024-12-13

### Fixed

- ([#1417](https://github.com/procore/bim-webviewer/pull/1417)) The distance labels no longer impede the user's ability to zoom in and out and or rotate around the measurement midpoint.
- ([#1418](https://github.com/procore/bim-webviewer/pull/1418)) When `featureFlags.enableMeshDataOnOPFS` was enabled and a partitioned model was loaded, subsequent partitioned models in separate tabs would fail to load until the first one was closed. This has been fixed so that multiple partitioned models can be loaded in separate tabs.

### Changed

- ([#1433](https://github.com/procore/bim-webviewer/pull/1433)) Large model loading screen message is changed

## [17.1.0] 2024-12-09

### Fixed

- Hotfix global offset is not correct in floorplan component.

## [17.0.0] 2024-12-03

### Added

- ([#1394](https://github.com/procore/bim-webviewer/pull/1394)) Automatic conversion of angle properties from radian to degrees (°) and correct formatting for angles in degrees.
- ([#1398](https://github.com/procore/bim-webviewer/pull/1398)) Add `featureFlags.enableMeshDataOnOPFS` to `Webviewer(options)`, defaulting to `false`.
  - This option enables writing mesh data to disk using OPFS for partitioned models, which allows users to use features that use mesh data, notably Point to Point Measurement.
  - To use Point to Point Measurement on a partitioned model, this flag and `enablePointToPoint` must both be `true`.

### Changed

- ([#1386](https://github.com/procore/bim-webviewer/pull/1386)) The Shortest Distance Measurement tool's cursor tooltip now displays "Select first object" then "Select second object" rather than just "Select two objects". This is to match behavior with the new Point to Point Measurement tool.
- ([#1382](https://github.com/procore/bim-webviewer/pull/1382)) [Breaking Change] Refactoring global offset to a type of vector3 and SDK method name change from `getGlobalOffset` to `getGlobalOffsetDoNotUse` to avoid 3rd party use.
- ([#1388](https://github.com/procore/bim-webviewer/pull/1388)) Escape key, when pressed, will now reset measurements that are either in progress or have been completed. If the measurement is enabled and in the initial state, pressing escape will disable the measurement tool.
- ([#1379](https://github.com/procore/bim-webviewer/pull/1379)) Fix the point to point crosshair size to 40px and align in the center.
- ([#1400](https://github.com/procore/bim-webviewer/pull/1400)) Cursor tooltip for Measurement tool now uses clientX and clientY to position the tooltip. This is to prevent the tooltip from being positioned incorrectly when users mouse is over a child element of the bim main container.
- ([#1405](https://github.com/procore/bim-webviewer/pull/1405)) Updated SDK method `setMeasurement` to allow for setting the measurement tool to a specific mode, in addition to enabling or disabling it.
- ([#1408](https://github.com/procore/bim-webviewer/pull/1408)) Fix the jerk in the camera for point to point and shortest distance measurement tool when a measurement is active.
- ([#1412](https://github.com/procore/bim-webviewer/pull/1412)) Fixed the bug that was causing the outline of normal meshes to not clear when a complex mesh is hovered in point to point measurement tool, leading to confusion.

### Fixed

- ([#1399](https://github.com/procore/bim-webviewer/pull/1399)) When zooming in and/or out while the point to point measurement tool is active, the mouse cursor and intersection snap results now automatically update and the temporary distance label stays in the midpoint of the measuring line.
- ([#1419](https://github.com/procore/bim-webviewer/pull/1419)) Fixed erroneous test mock data that was causing the whole test suite to fail.

## [16.5.0] 2024-11-08

### Added

- ([#1371](https://github.com/procore/bim-webviewer/pull/1371)) The zoom in gets limited and blocked when the camera gets really close to the Point to Point measurement midpoint (distance label's pivot point).
- ([#1378](https://github.com/procore/bim-webviewer/pull/1378)) Point to Point is disabled if the model loaded is a partitioned model.
- ([#1376](https://github.com/procore/bim-webviewer/pull/1376)) The zoom functionality gets limited when a shortest distance measurement is created. The user is able to zoom in really close to the midpoint of the measurement but not zoom past it.

## [16.4.0] 2024-10-25

### Added

- ([#1355](https://github.com/procore/bim-webviewer/pull/1355)) Measurement-related object properties are now automatically updated when the display units change (e.g. changed through settings), no need to reselect an object for it to update. Only applies for properties that have a typed-value.
- ([#1346](https://github.com/procore/bim-webviewer/pull/1346)) Point To Point now displays two tooltips, One that follows the mouse cursor and one that displays the name of a snap feature.
- ([#1363](https://github.com/procore/bim-webviewer/pull/1363)) When Point to Point is enabled, the bottom toolbar will now display a split button that allows the user to switch between different measurement modes for the Measure Tool.
- ([#1362](https://github.com/procore/bim-webviewer/pull/1362)) Point To Point distance labels now dynamically disappear or appear when they are positioned behind or in front of the camera, respectively.
- ([#1375](https://github.com/procore/bim-webviewer/pull/1375)) Tooltip has been added to the new split button for Measurement Tool.

## [16.3.0] 2024-10-11

### Added

- ([#1331](https://github.com/procore/bim-webviewer/pull/1331)) Distance labels for measurement tool will now stack vertically when they overlap.
- ([#1347](https://github.com/procore/bim-webviewer/pull/1347)) Display units are automatically determined based on the locale.
  - For locale='en', locale='en-US', or locale=undefined, the display units will be set to 'ft in' (feet inches). For any other value of locale the display units will be set to 'm' (meters).
  - Changes to the display units settings will be saved local to the browser per project id. This saved settings supersedes the locale-based ones.

### Changed

- ([#1350](https://github.com/procore/bim-webviewer/pull/1350)) When the "Measurement Unit" set in the Settings window (also known as `displayUnit` when queried via `gui.getSettings`) is set to Ft' In", properties with linear values will now be formatted with foot/inch tickmarks and inch fractions, e.g. 48’ 8¼”.
  - Also, `gui.getSettings().displayUnit` is returns type `DisplayUnit` instead of `string`. Actual return values are unchanged.
- ([#1344](https://github.com/procore/bim-webviewer/pull/1344)) Update toolbar button tooltips to share styles with tooltips on custom coachmarks
- ([#1353](https://github.com/procore/bim-webviewer/pull/1353)) Remove beta pill on large models loading screen.

## [16.2.0] 2024-09-27

### Added

- Add `gui.showCoachmark` and `gui.hideCoachmark` to allow for showing and hiding custom coachmarks.
- Add new methods for converting and formatting values with units
  - Add `gui.getEquivalentUnitForDisplayUnit(unit: Uom, displayUnit: displayUnit): Uom`
    - gets the equivalent unit (either the length, area, or volume version) based on the display unit
    - example: `getEquivalentUnitForDisplayUnit('ft²', 'mm')` returns `'mm²'`
    - example: `getEquivalentUnitForDisplayUnit('ft²', 'ftin')` returns `'ft²'`
  - Add `gui.convertUnit(value: number, from: Uom, to: Uom): number`
    - converts a value from one unit to another
    - example: `convertUnit(1, 'ft', 'm')` returns `0.3048`
  - Add `gui.formatUnit(value: number, unit: Uom): string`
    - formats a value with the correct unit and locale
    - example: `formatUnit(1000.12345, 'ft')` when Webviewer is initialized with `options.locale` as `de-DE` returns `'1.000,1235 ft'`
    - example: `formatUnit(1000.12345, 'ft')` when Webviewer is not initialized with a locale (defaults to `'en'`) returns `'1,000.1235 ft'`

### Changed

- Improved formatting of properties data that has a unit of measure in the Properties window.
  - Properties data will now be displayed in a unit that matches the "Measurement Unit" set in the Settings window. Also known as `displayUnit` when queried via `gui.getSettings`
  - Properties data will now include thousands and decimals separators that are based on the locale provided to `Webviewer` on instantiation
  - For example, when the configured `displayUnit` is `'m'` and the locale is `'de-DE'`, the value `'1,000.1234 mi'` would display as `'1.609.542,6844 m'`

### Fixed

- Fixes issues w/ Bootstrapper
  - The"steps counts" was off by one, impacting the proper behavior of the Loading screen
  - Fixes potential issue w/ the order of NodeServices and MeshnodeServices in Bootstrapper
- Fix svg render display not correct issue when the anchor point is behind camera.
- Fix the issue when window is resized, the svg render not update with correct aspect ratio.

## [16.1.0] 2024-09-13

### Fixed

- Fix issue where `model.getViewpoint().perspective_camera.camera_view_point` was returning values that were not in "world coordinates". It now returns them in world coordinates.
- Fixed issue with `intersectPointClick` event returning the farthest intersection on an object rather than the closest.
- Fixing global bounding box returning world coordinating box instead of internal coordinating box.
  - Applied rotation to the user defined bounding box.
- Fixing loading partition model warning message is overlapping when opening in models tool.
- Fixes loading issue reported by a customer where a model would take a very long time to load due to a large number of vertex array objects being instantiated.

## [16.0.0] 2024-08-16

### Added

- Added beta feature flag `enablePointToPoint` to enable the Point to Point mode as an optional measurement mode for the Measure Tool.

### Changed

- Color override methods now accept an optional `resourceId` parameter, which allows color overriding objects on multiple loaded models. If no `resourceId` is provided then the object ids will be assumed to reference the first model.

### Removed

- [Breaking Change] Removed `enableObjectTreeSearch` feature flag as it is now always enabled and cannot be disabled.

## [15.5.0] - 2024-08-02

### Added

- When `Webviewer` is initialized with multiple `resources`, they are now all rendered. Most functionality is not yet working for any resource but the first, but rendering is!

### Fixed

- `camera.setPose` now sets the camera based on the "refined global bounding box", which is the global bounding box with "space junk" eliminated, rather than the raw global bounding box.
  - This was a problem because `setPose` could set the camera extremely far from the actual model--to the point where you couldn't see anything--if there was some random object out in the void (i.e. "space junk").
- The space junk removal algorithm has been improved for models where there is space junk at various distances away. For example, one space junk at 50_000 feet away and one at 10_000 feet away for a model that is only 1000 feet across. The one at 10_000 feet should now be correctly identified as space junk.

## [15.4.0] - 2024-07-19

### Fixed

- Measurement Tool tooltip label is no longer a fixed width and will resize with the text content.

### Changed

- Loading screen message is re-arranged.

## [15.3.0] - 2024-06-21

### Changed

- Loading progress bar will not show percentage number.

### Added

- Added ability to instantiate Webviewer with new `resources` option. Multiple models is not yet implemented so passing two models in as resources will not work in this ticket. However, you should be able to pass in a single model as an array of one `Resource` either as just a `fileExtractionId`, `fileExtractionId` with url overrides, or `modelId` + `modelRevisionId` with urls for local development
- Added `options.resource` argument to address multiple models with `model.setObjectColor`, `model.clearObjectColor`, and `model.clearAllObjectColor`.
- Added `ErrorLogger` namespace to the SDK. The `ErrorLogger` currently only supports Bugsnag configurations and will log errors to Bugsnag if the `bugsnagConfig` key is found in the params object of `ErrorLogger.init`. The `bugsnagConfig` object requires an `apiKey` key to be set, and optionally a `releaseStage` key.
- Added `defaultVisibilityAlwaysTrue` argument to `model.getVisibility` and `model.getViewpoint`
  - When either method is called with `{ defaultVisibilityAlwaysTrue: true }` they will return a `visibility` object with `default_visibility: true` regardless of the number of hidden objects.
  - When either method is called with `{ defaultVisibilityAlwaysTrue: false }` or not provided they will return a `visibility` object whose `default_visibility` field varies based on the amount of hidden objects.

## [15.2.0] - 2024-05-24

### Changed

- Changed `model.getViewpoint` and `model.setViewpoint` to include `visibility` and `render_mode`.
- Viewpoints selected in the Views tool now respect visibility and render mode if the views contain them.
- Some enums and types for them are now exposed
  - `TOOL` and its type `Tool`. Used to enable tools when instantiating the `Webviewer`.
  - `TOOL_BAR_TOOLS` and its type `ToolBarTools`. Used for enabling tools within the toolbar and for some events.
  - `ACTION` and its type `Action`. Used in some events to describe type of camera movement.

### Fixed

- Fixed `initialization` event will always set `success` to true even loading partition model is failed.

## [15.1.0] - 2024-05-13

### Added

- Add `model.getVisibility` and `model.setVisibility` methods.
  - These methods interact with the visibility portion of the viewpoints schema defined by the `bim_viewpoints` endpoint (https://developers.procore.com/reference/rest/v1/bim-viewpoints?version=1.0)
  - `Viewpoint`s now include `visibility`, but `model.get/setViewpoint` do not yet do anything with it. It will behave as if you had called `model.get/setVisibility` in a future release.
- Added `model.getRenderMode` and `model.setRenderMode` methods.
- Exposed more types used as params or return types for the SDK

## [15.0.0] - 2024-04-29

### Added

- `model.getSnapshot` and `model.getSnapshotDataUrl` now take an optional `aspectRatio` parameter, e.g. `model.getSnapshot({ aspectRatio: { width: 640, height: 480 } })`
  - When no `aspectRatio` parameter is present, it will return an image with the dimensions of the canvas
  - When a `aspectRatio` parameter is present, it will return an image with the maximum dimensions that fit in the current canvas that match the aspect ratio. This may be smaller or larger than the values passed depending on the size of the canvas.
- Added a Beta pill in loading screen when model is a large partitioned model.

### Changed

- [Breaking Change] `model.getSnapshot` now expects a params object instead of individual params. It only had one optional argument so there is just one change:
  - `model.getSnapshot('#aabbcc')` must now be called as `model.getSnapshot({ color: '#aabbcc' })`

### Fixed

- Fixes issues affecting the "Loading Screen" for Large Models:
  - The progress bar was inaccurate when loading partitions files (first download only, w/ empty cache) - particularly on slow networks;
  - The percentage left would indicate 100% just before the progress was reached the end;
  - The "time left" estimates were completely wrong - indicating that there was less than 1 minute left for a solid 15 minutes for example.

## [14.1.0] - 2024-04-15

### Fixed

- Fixes the loading of partitioned models when on `production`.
- Fixes the inconsistencies of the ShortestDistanceComponent when operating on partitioned models.

### Added

- Add `model.getViewpoint` and `model.setViewpoint` methods.
  - These methods interact with the viewpoints schema defined by the `bim_viewpoints` endpoint (https://developers.procore.com/reference/rest/v1/bim-viewpoints?version=1.0)
  - Calls to `camera.get/setBcfCamera`, `model.getSections/setSectionsData`, `markup.setRedlines` (or its deprecated alias `camera.setMarkup`) for the purpose of constructing viewpoints can be replaced with calls to `model.get/setViewpoint`
- public events `initializationComplete` and `initializationComplete` have their payloads updated to include `step_failed`, and `error_descriptions` properties. Should an error occur during initialization, the `step_failed` property will be set to the step failed while bootstrapping the model and the `error_descriptions` will be set to the error message.

### Changed

- Removed some development-only checks from renderer in the production build for a minor performance improvement.
- Minor reduction in build size

### Removed

- "Could not find node with id" console warning that some models would generate a lot of. It's not really a problem and there's no need to clog the console with it.

## [14.0.0] - 2024-04-01

### Fixed

- Fixed the issue of downloads of partitioned models being halted when the user activated/moved to a different browser tab.
- Addresses an issue encountered when loading large models on Windows machines that caused the Web Viewer to crash.

### Added

- [Breaking Change] Some type declarations are now included in the package. This means that you can now use TypeScript with the Web Viewer SDK.

## [13.1.0] - 2024-03-18

### Added

- New SDK method `camera.setPose` which sets the camera's position and look at point in one call. Alternatively, you can pass in a reference pose to `camera.setPose` to set the camera to a specific position and look at point relative to the model's global bounding box. Finally, an optional key `cameraUp` can be passed in to set the camera's up vector along with the pose.
  - `camera.setPose({ pose: { position: { x: 0, y: 0, z: 0 }, lookAt: { x: 0, y: 0, z: 0 } } })` will set the camera to the origin of the model.
  - `camera.setPose({ pose: 'top' })` will set the camera to the top of the model looking down.
  - `camera.setPose({ pose: 'bottom', cameraUp: { x: 0.1, y: 0, z: 0} })` will set the camera position to the bottom of the model looking up and will set the camera up to a normalized version of the passed in `cameraUp` argument.

### Fixed

- The `intersectPointClick` event now returns `null` in some edge cases (literally) where the click is very close to the edge, but does not actually intersect. Previously it would return the center of the object in this case even though there was no actual intersection. This was most reproducible when clicking on the edges of objects that are very far away where a single pixel could partially contain an object.

## [13.0.1] - 2024-03-06

### Fixed

- Fix the issue of partition model is not working.

## [13.0.0] - 2024-03-04

### Changed

- [Breaking Change] `companyId` is now a required property of the common Web Viewer options object. This is a breaking change because it was previously optional. The company id is used to set the `Procore-Company-Id` header to be in compliance with the MPR Request Header Requirement. See more info here: https://developers.procore.com/documentation/mpz-headers. Options will now validate against the existence of a company id and throw and error if one does not exist in the options object.
- [Breaking Change] `projectId` is now a required property of the common Web Viewer options object. Project id was not explicitly stated as being required but many Web Viewer features require the project id to hit API endpoints. Options will now validate against the existence of a project id and throw and error if one does not exist in the options object.

### Fixed

- Fixed crash when calling terminate while the Web Viewer is downloading a model.
- Fixed bug that caused Web Viewer to continue to download models even after terminate was called.
- Fixed bug that when sections_data has 6 planes will cause create section box return [Infinity] box
- Fixed bug with Model Objects `Hide All` and `Select All` on a filtered Object Tree that would hide and select all the objects rather than the objects contained by the filtered object tree.

## [12.0.0] - 2024-02-20

### Changed

- [Breaking Change] Several methods that returned model objects with a `bbox` property were in local coordinates. The following methods now return the `bbox` property in world coordinates:
  - `model.getObject`
  - `model.getObjects`
  - `model.getRootObject`
- [Breaking Change] Several events that returned model objects as part of the event payload had `bbox` properties in local coordinates. The following events now the `bbox` property in world coordinates:
  - 'objectSingleClick`
  - `objectSelect`
- Changes the Loading Screen by switching to a single progress bar that goes from 0 to 100 once, before opening the fully rendered modeled.
- `model.configureSectionBoxDisplay` now takes a new new option `overrideSectionBoxSetup` that determines whether or not `model.toggleSectionBoxDisplay` will apply or clear the section box applied to the model. This configuration affects all following calls to `model.toggleSectionBoxDisplay`.
  - `model.configureSectionBoxDisplay({ overrideSectionBoxSetup: true })` will prevent `model.toggleSectionBoxDisplay` from applying or clearing the section box, requiring callers to set the section box themselves.
  - `model.configureSectionBoxDisplay({ overrideSectionBoxSetup: false })` will allow `model.toggleSectionBoxDisplay` to apply or clear the section box. This is the default behavior.
- `model.toggleSectionBoxDisplay` now conditionally applies or clears the section box based on an `overrideSectionBoxSetup` value.
  - `overrideSectionBoxSetup` can be set globally from `model.configureSectionBoxDisplay`
  - `overrideSectionBoxSetup` can be applied to a specific call: `model.toggleSectionBoxDisplay(true, { overrideSectionBoxSetup: true })`. This will take precedence over any values set by `model.configureSectionBoxDisplay`.
- [Breaking Change] The default behavior of `model.toggleSectionBoxDisplay` has changed to set up the section box following the same logic as the "Section Box" toolbar button. The previous default behavior would throw an error when called without a section box set.
  - To get the old behavior of `model.toggleSectionBoxDisplay(true/false)` you must now call `model.toggleSectionBoxDisplay(true/false, { overrideSectionBoxSetup: true })`

### Fixed

- Fix issue where camera would jump around dramatically when it was looking straight up or down and was moved.
- Fix issue where resizes of the Web Viewer's `parentElement` (passed in as an option to `Webviewer` constructor) that were not the result of a `window` resize would not cause the Web Viewer to be resized.
- Fix issue where the Sectioning Coachmark would show up if the Home Viewpoint did not have sections but a default section was applied from the `min_boundary` and `max_boundary` options.

### Added

- Added `model.getNumObjectsHidden` which returns number of hidden objects.
- Added new SDK method `model.resetSectionBox`, which sets section box to either the user-defined bounding box (passed in through `Webviewer` options), the refined global bounding box (the global bounding box with "space junk" removed), or the global bounding box in that order of precedence based on what's available.
- Added new SDK method `model.getSectionBoxDisplay`, which returns meta data about the section box display (i.e. the orange box widget for adjusting the section box). It includes the current `enabled` status, the `bbox`, and the `configuration` of the current section box display.

## [11.1.0] - 2024-02-05

### Added

- Add new "survey" navigation mode to be used for a 2d to 3d mapping flow in which the camera can be zoomed, panned, and moved with WASDEQ. No rotation occurs in this mode. It has no UI associated with it and can currently only be activated through an SDK call: `model.setNavigationMode(6)`.
- Add new `markup.drawAnchored` method for drawing markup that is "anchored" to 3d positions.
- Added new SDK method `gui.setToolbarHidden` that allows you to set the visibility of the bottom toolbar.
  - `gui.setToolbarHidden(true)` will hide the toolbar if the toolbar is not already hidden.
  - `gui.setToolbarHidden(false)` will show the toolbar if the toolbar is not already shown.
  - `gui.setToolbarHidden` will throw an error if the bottom toolbar is not enabled.

### Changed

- [Internal] `npm run benchmark:branchCompare` now detects release vs feature mode from current branch and has new messaging describing this. Also remove the now obsolete `npm run benchmark:branchCompare:release`.
- Changes the Loading screen:
  - Relies on messages posted from the new Bootstrapper class;
  - Goes from 0 to 100 in a single run, instead of resetting itself multiple times for various phases of the initialization process;
  - This new behavior applies to both standard and large models.
- Added new SDK method `gui.setHotkeysEnabled` that allows you to enable or disable hotkeys.
  - `gui.setHotkeysEnabled(true)` will enable hotkeys if they are not already enabled.
  - `gui.setHotkeysEnabled(false)` will disable hotkeys if they are not already disabled.

## [11.0.2] - 2024-01-22

### Added

- Add new `markup` namespace with methods for drawing markup
  - `markup.setRedlines` - Same as `camera.setMarkup`. Plan is to remove `camera.setMarkup` in a later breaking change.
  - `markup.draw` - new method that allows for drawing in px coords
  - `markup.clear` - clears markup
- Added new SDK method `gui.getSettings` to get the current settings for the browser session. Currently this only contains the display units.

### Changed

- [Breaking Change] `projectSettingsUpdated` and `projectSettingsLoaded` events have payload changes:
  - `projectSettingsUpdated` - payload changed from `{ units: string }` to `{ displayUnits: string }`
  - `projectSettingsLoaded` - payload changed from `{ units: string }` to `{ displayUnits: string }`

## [10.1.0] - 2024-01-08

### Changed

- If `options.bcfCamera` is not specified and the model is loaded with a `modelId` and `modelRevisionId`, the camera will default to the Home Viewpoint. The Home Viewpoint represents the primary viewpoint for the model revision, if available. In the absence of a Home Viewpoint, the camera will automatically zoom to fit the entire model, and the Home button will perform the same action.
- Markup (set with `camera.setMarkup`) is now included in snapshots taken with `camera.getSnapshot` and `camera.getSnapshotDataUrl`.

## [10.0.0] - 2023-12-11

### Changed

- `camera.getSnapshot` and `camera.getSnapshotDataUrl` now have a default background color of light blue (#ecf2f6) instead of transparent.
- [Breaking Change] The `intersectPointClick` event's payload has changed:
  - The `intersectPointClick` payload is now in world coordinates, meaning it has the result of `model.getGlobalOffset` added to it.
  - The `intersectPointClick` payload is now `null` when empty space is clicked. Previously the payload would be `{ x: 0, y: 0, z: 0 }`, which was a workable way to test that nothing was clicked, but a bit confusing.
- Remove subtext from "Model Downloading" and "Properties Loading" loading screens. The subtext was making promises about caching that we weren't keeping and don't have plans to tackle at the moment. No actual changes to the downloading of the model or the loading of the properties though, just the informational subtext on the loading screens.

## [9.1.1] - 2023-11-27

### Changed

- `camera.getSnapshot` and `camera.getSnapshotDataUrl` now produce images that do not contain the section box display (orange box) if it is enabled when the snapshot is taken. The clipping planes it represents are still enabled.

## [9.1.0] - 2023-11-13

### Added

- Add new SDK methods and events to control the section box display
  - new method: `model.configureSectionBoxDisplay` - sets state for how the section box display will appear
  - new method: `model.toggleSectionBoxDisplay` - turns on/off the section box display feature, respecting the configuration set by `configureSectionBoxDisplay`
  - changed method: `model.setSectionBox` - now takes a fourth argument `showCoachmark` which is a boolean that determines whether the "Sectioning Applied" coachmark is shown when the section box is set. Defaults to true, which was was the behavior before when it was not exposed as an argument.
    - Full signature now looks like: `model.setSectionBox(min: Vector3, max: Vector3, rotation: Vector3, showCoachmark?: boolean)`
    - Where `Vector3 = { x: number, y: number, z: number }`
  - new event: `sectionBoxDisplayConfigured` - fired when the section box display configuration changes
  - new event: `sectionBoxDisplayToggled` - fired when the section box display is toggled
  - new event: `globalBoundingBoxInitialized` - fired when the global bounding box of the model has been determined. This is used to implement the Sectioning dropdown's Reset Planes button.
  - new payload for event: `sectionBoxSet` - now includes the box that was set in its payload.

## [9.0.0] - 2023-10-30

### Added

- Added alerting policy to SLO

### Changed

- [Breaking Change] SDK methods `camera.getSnapshot` and `camera.getSnapshotDataUrl` now returns a promise which resolves to a data url. Previously it returned a data url directly.
- SDK method `camera.getSnapshotDataUrl` now captures the measurement tool's measurement lines in the snapshot.
- Improved selecting/hiding performance when done at the root node id.

## [8.2.0] - 2023-10-16

### Changed

- Isolate objects will reset the section box only based on isolated objects's bounding box.

### Fixed

- Fix lighting issue cause by three js original shader.
- Fixed bug causing the section box to not be reset when closing the model.

## [8.1.0] - 2023-10-02

### Changed

- The following SDK methods now optionally take a `objectTreeName` parameter which defaults to `default` if not specified. This parameter is used to specify which `ObjectTree` to use when the Web Viewer has multiple `ObjectTree` instances such as when a filter has been applied.
  - `model.getObject`
  - `model.getObjects`
  - `model.getRootObject`
  - `model.hideObjects`
  - `model.hideAllObjects`
  - `model.unhideObjects`
  - `model.selectObjects`
  - `model.deselectObjects`
  - `model.selectAllObjects`

### Added

- Added new SDK methods to construct and clear a filtered Object Tree.
  - `api.filterObjects` takes an `ObjectFilter` object and returns a `Promise` that resolves to a standard response object.
  - `model.filterObjectTree` takes an array of object ids and returns a Promise<void>.
    - When the filtered object tree is active, the following methods can operate on the filtered object tree when you pass in `filtered` as the `objectTreeName` parameter.
      - `model.hideObject`
      - `model.hideAllObjects`
      - `model.unhideObjects`
      - `model.selectObjects`
      - `model.selectAllObjects`
      - `model.deselectObjects`
      - `model.getObject`
      - `model.getObjects`
      - `model.getRootObject`
  - `model.clearObjectTreeFilter` that clears the filtered object tree and returns a Promise<void>.
- Added new event `objectTreeUpdated` that gets published when you filter and or clear the filtered object tree.

## [8.0.0] - 2023-09-05

### Added

- Add support for Safari and Safari-based browsers.
- Add ability to isolate in section box to context menu.

### Changed

- [BREAKING CHANGE] `model.getSections` now requires a `format` param of either `'autodesk'` or `'bcf'`. Both of these return data formatted differently than in prior versions.
  - `'bcf'` returns an array of planes as described by the BCF format https://github.com/buildingSMART/BCF-API#3526-clipping-plane
  - `'autodesk'` returns a format based on the viewpoints from Autodesk Navisworks
- [BREAKING CHANGE] Several methods were returning/expecting to receive coordinates that were not consistent with the model coordinates from the source file. Prior to this change, to get the correct coordinates you would need to add the result of `model.getGlobalOffset` to them. This would affect models that are significantly offset from the origin, which we refer to as being in "world coordinates". As of this change, most instances of not returning "world coordinates" have been fixed.
  - `camera.getPosition` now returns a point in world coordinates.
  - `camera.setPosition` now expects a point in world coordinates.
  - `camera.getLookAt` now returns a point in world coordinates.
  - `camera.setLookAt` now expects a point in world coordinates.
    - NOTE: this method has a return value that is still NOT in world coordinates. Prefer using `camera.getPosition/getLookAt/getBcfCamera` if you want the resulting position after a set.
  - `camera.getBcfCamera`'s return value's `camera_view_point` is now in world coordinates.
  - `camera.setBcfCamera` took a second boolean argument that defaulted to receiving local coordinates. If you were passing `false` or nothing here it will no longer be consistent with the coordinates from other methods. If you were passing `true` then no change required.
  - `model.ModelToMapSpace` now expects a `point` parameter in world coordinates.

## [7.9.0] - 2023-08-22

### Added

- Add hotkey for Section Box tool: Alt+S (Windows), Opt+S (Mac). If the tool is not enabled the hotkey is ignored.

### Fixed

- Fixed issue where drag cursor for Section Box tool is not correct on back facing arrows when planes are hidden.
- Fixed issue where inside the section box hover on arrow still show hover effects.
- Fixed issue a user could see outside of the default section (applied through Web Viewer options `min_boundary`, `max_boundary`, `rotation`) by resizing the Section Box Display to be outside of the default section. The default section is now correctly also applied in addition to the Section Box Display's sectioning.
- Fixed issue backface cut fill is not showing in some model.

### Changed

- Reduce memory footprint while running Web Viewer at the cost of some runtime performance.

## [7.8.0] - 2023-08-07

### Added

- Added global collapse chevron to the Object Tree to collapse all objects at once.

### Fixed

- Fixed issue where whole model was orange when section box was enabled for some Mac hardware.

## [7.7.0] - 2023-07-17

### Added

- Added search bar to the Object Tree to filter down the list of objects.
- Add Section Box tool. Turn on by passing `ProcoreBim.Webviewer.tools.SECTION_BOX` to `options.tools`

### Fixed

- SDK method `model.getObjects` will filter out object id's that are not in the model instead of throwing an error.

## [7.6.0] - 2023-06-20

### Added

- Work-in-progress feature work.

### Changed

- Object Tree refactoring. No behavioral changes.

## [7.5.1] - 2023-06-07

### Added

- Add `ProcoreBim.version` attribute that contains the current version of the module.
- Added new SDK method `camera.getSnapshotDataUrl()` that returns a data URL of the current canvas snapshot.

## [7.5.0] - 2023-05-22

### Changed

- Minor styling and html structuring updates to Window based tools.
- Make camera movement with orbit from Default, Fly, and Measure tools independent of framerate.
  - This is the same change that was made to the Orbit tool in 6.6.0 but has now been extended to the other tools.

### Fixed

- Made click to select object less finnicky. Clicking on an object even if your camera moved a little in doing so should now still count as a click. However, long clicks will not register (mousedown and mouseup must occur quickly).
- Clicking inside the Web Viewer canvas and dragging to the outside then releasing no longer causes the click+drag camera controls to get out of sync. Releasing outside of the canvas will now properly end the drag event. However, mouse movement outside the canvas still does not register.
- You can now do more combinations of WASDEQ and Arrow Keys all at once without them overriding each other.
- Add missing translation for "Object Actions" label in Object Tree Actions Menu.

## [7.4.0] - 2023-05-08

### Changed

- Minor updates to the bottom toolbar
  - CSS updates to increase the height of the tool bar and allow the text of the tool to grow the button
  - Updated tool name `X Ray` to `X Ray Mode` to match design.

## [7.3.0] - 2023-04-24

### Added

- Added an empty state to the Properties window for objects that do not have properties.
- [Internal] Added boilerplate code to introduce Section Box as a new bottom toolbar tool.

### Fixed

- Fixed selected object count when selecting/deselecting objects while holding the shift key.
- Fixed Right Click Context Menu that would not hide when you left mouse clicked on another object.

## [7.2.0] - 2023-04-10

### Added

- Add `model.setObjectColor` api for changing object color in selected, default, and xray mode
- Add `model.clearObjectColor` api for clearing object color set by `model.setObjectColor`
- Add `model.clearAllObjectColor` api for clearing all object color set by `model.setObjectColor`

### Changed

- Default option for undocumented `sceneGraph` option has been changed. If you were using this option, please remove it for a more stable and better-performing app!

### Fixed

- Fix error that occurred when `sceneGraph` was not set to `wasmtree` and `Webviewer.terminate` was called.
- Fix error that occurred when `wasmtree` is empty and trying to build or cull an empty tree.
- `Hide Similar` and `Select Similar` will now skip over invalid object id's and proceed to hide or select similar objects.

## [7.1.0] - 2023-03-27

### Added

- Added payload to the `animate` event. The payload object contains one property `stage` that can be one of the following values: `renderIdle`, `renderStart`, `renderProgress`, or `renderComplete`.
- Added new event `windowOpen` that is published when any tool that uses a Window component is opened.
- Added new event `windowClose` that is published when any tool that uses a Window component is hidden.

### Fixed

- Bottom toolbar tool tip is now correctly positioned using positions relative to the parent.
- Fixed bug that prevented the canvas from resizing automatically.

## [7.0.1] - 2023-03-22

### Fixed

- Fix issue where a 500 or `[]` response from the property service would cause an infinite request loop

## [7.0.0] - 2023-03-13

### Added

- Added `model.hideAllObjects` which hides all objects.
- Added `model.setMeasurement` which takes a boolean parameter. If true, the measurement tool is enabled. If false, the measurement tool is disabled and navigation mode will be set to Default.

### Changed

- [BREAKING CHANGE] The payloads of `objectSelect` and `objectSingleClick` events have changed from a meshnode index to a structure based on object ids

### Fixed

- Fixed issue where the properties window would always be empty when filtering by a search term with multiple special characters, e.g. "(("
- Toggling between Normal and X-Ray modes no longer clears the hidden set.

## [6.8.0] - 2023-02-27

### Added

- Added `api.getNamesForObjects` which takes array of object ids as a parameter and returns the array of names with each ids.
- Added ability to select similar objects from the context menu.
- Added `model.getObjects` which takes an array of object ids as a parameter and returns an array of objects.

## [6.7.0] - 2022-02-13

### Added

- Added a new `gui` namespace:
  - `gui.addContextMenuItem(...)`: Appends a new entry in the Context Menu;
  - `gui.removeContextMenuItems(...)`: Removes a set of entries from the Context Menu;
- Added `model.getObject` which takes a object id as a parameter and returns a node object.
- Added Hidden Objects api to the Web Viewer SDK and adds the following
  - `model.hideObjects` to hide objects by id
  - `model.unhideAllObjects` to unhide all objects
  - `model.unhideObjects` to unhide objects by id
  - `model.getHiddenObjects` to get an array of object ids that are hidden
- Added Selected Objects api to the Web Viewer SDK and adds the following
  - `model.selectObjects` to select objects by id
  - `model.selectAllObjects` to select all objects
  - `model.deselectObjects` to deselect objects by id
  - `model.deselectAllObjects` to deselect all objects
  - `model.getSelectedObjects` to get an array of object ids that are selected
- Added `model.getNumObjectsSelected` which returns number of selected objects. The number is determined by the selection method passed in (defaulting to `FirstObject`)
  - `getNumObjectsSelected("FirstObject")` => number of first objects
  - `getNumObjectsSelected("Object")` => number of objects
  - getNumObjectsSelected("Geometry")` => number of geometries
- Added `model.getRootObject` which returns the root object.
- Added `objectDeselect` event that includes object ids of all objects that were deselected

### Changed

- Changed `selectedUpdated` event to include the object ids of the currently selected objects

### Fixed

- `camera.getBcfCamera` was returning a wonky `camera_up_vector` value. It now returns the correct value.

## [6.6.0] - 2022-01-23

### Changed

- Coachmarks have new design and will now be located in the lower left hand corner of the canvas.
- Make camera movement with Orbit Tool independent of framerate. A mouse movement halfway across your screen should mean the same amount of rotation on both the smallest and largest models (i.e. regardless of how laggy/low framerate).
  - A consequence of this is that orbiting should feel "faster" on larger models.
  - A caveat to this is that the improvement is only currently implemented for orbiting in the Orbit Tool. Orbiting in Fly, Default, or after taking a measurement with Measure are still using the old implementation for now.

### Fixed

- Fixed various issues where we could not find intersection points for objects that were very small on the screen (i.e. actually small or just very far away).
  - Selection of small/far away objects would sometimes fail in Default, Fly, Orbit, and Measure modes. This should no longer happen.
  - Orbiting in Orbit mode would sometimes fail to find an orbit point on small/far away objects and would subsequently not move the camera. This should no longer happen.
  - The context menu would sometimes fail to appear when a small/far away object was right-clicked. This should no longer happen.
  - Scrolling to zoom uses the distance from the camera to the object the mouse is over to adjust the zoom speed but would sometimes fail to find an intersect point and would zoom at the default (slow) speed until you got close enough for it to find an intersection and would then suddenly speed up. It should now always find an intersection point if your mouse is over an object.
  - Panning could sometimes fail to find a point to lock the pan to and would default to the model center. It should now always find a point.

## [6.5.0] - 2022-01-09

### Added

- Added schema validation to values passed into `setBcfCamera`.

### Fixed

- Fixed inaccessible Context Menu on the Object Tree and Object Tree Actions if the Context Menu appeared in the model and was outside the view of the camera.
- Partially selected objects in the object tree are now correctly deselected when another object not in their ancestry is single clicked.

## [6.4.0] - 2022-12-12

### Added

- Added X-Ray rendering mode
  - Makes all objects transparent except for the ones that are selected, which is helpful for selecting objects from the object tree and being able to see where they are in the building.
  - Accessible from the toolbar and contextual menus when turned on
  - Activated when `ProcoreBim.Webviewer.tools.XRAY_MODE` is passed to the `tools` option.

### Fixed

- Object Tree no longer creates duplicate row elements that was causing rows to appear more bold.
- Bottom row of Object Tree is no longer cutoff when extending beyond the window size.
- Long words in the Properties tool will now word break.

## [6.3.0] - 2022-11-29

### Changed

- ProcoreBim.Webviewer.tools.LOADING will now show a loading spinner while waiting for a response from the properties service.
- Object Tree will now process click events on the entire row rather than the object name of the row.
- Unlocking the full power of All Properties by enabling fetching and displaying of properties for any node selected in the Object Tree.

## [6.2.0] - 2022-11-14

### Changed

- Internal only changes

## [6.1.2] - 2022-11-10

### Fixed

- Fixed issue where junk objects(only one dot or no geometry in the meshnode) causing webassembly loading throw exception.

## [6.1.1] - 2022-10-26

- Fixed shift+space+drag to orbit in default navigation mode. However, this undoes an attempt we made to improve UX around click and drag in default navigation mode we had made. Default navigation drag operations will no longer cancel when the mouse leaves the Web Viewer canvas. If the mouse up occurs outside of the canvas the drag operation may be in a weird state when returning to the canvas.

## [6.1.0] - 2022-10-17

### Changed

- Minor performance improvements
- Replaced the spinner by progress bars on model initialization on the `Webviewer.tools.LOADING` tool.

### Fixed

- Fixed issue where clicking the home button would move to the wrong location when the model was in world coordinates.

## [6.0.1] - 2022-10-03

### Changed

- Improved framerate by disabling picking while in motion.
- Implemented more tactically aggressive realtime culling techniques that aim to reduce dropout of objects that should be visible while moving on larger models while maintaining or improving framerate.

### Fixed

- Fixed issue where minimap would scroll with the page. It now holds its location in the Webviewer window.
- Solved the web viewer's transparency issues.

## [6.0.0] - 2022-09-19

### Changed

- [BREAKING CHANGE] Methods in the model namespace have been renamed to better match what they return and what type of parameters they expect. Primarily this has meant clarifying that the particular type of "id" that these methods expect is a "meshnode index". To be clear: there is no behavior change of these methods, they have only been renamed and will continue to work as they have been.
  - Renamed methods:
    - model.getObject => model.getMeshnode
    - model.getObjectFromPropertyId => model.getMeshnodeFromObjectId
    - model.getHiddenGeoIds => model.getHiddenMeshnodeIndices
    - model.addHiddenGeoIds => model.addHiddenMeshnodeIndices
    - model.hasHiddenGeoIds => model.hasHiddenMeshnodeIndices
    - model.clearHiddenIds => model.clearHiddenMeshnodeIndices
    - model.getSelectedGeoIds => model.getSelectedMeshnodeIndices
    - model.addSelectedIds => model.addSelectedMeshnodeIndices
    - model.hasSelectedIds => model.hasSelectedMeshnodeIndices
    - model.clearSelectedIds => model.clearSelectedMeshnodeIndices
    - model.setObjectColor => model.setMeshnodeColor
  - Deleted methods:
    - model.getModelItemBoundary(meshnodeIndex). You can instead call model.getMeshnode(meshnodeIndex).bbox
  - Reasoning: These methods referred to object, objectId, propertyId, geoId, and simply id. There are two issues with this: (1) There are multiple names for the same thing. As it currently stands, most things are actually referring to a meshnodeIndex or a meshnode. (2) What we referred to as an object, e.g. what’s returned from the old getObject, is not what the BIM Rest API refers to as an object. We believe these method renames will bring more clarity to how to use them in your own code.
  - Future plans: We intend to release another set of methods that operate on objects (of which meshnodes are a subtype) and object ids rather than directly on meshnodes and meshnode indices. These object methods will be released in a non-breaking way and the meshnode methods will continue to work. However, the meshnode methods may eventually be deprecated and become considered internal and possibly not adhering to semver.
- Make camera movement with Fly Tool independent of framerate. Less “getting bogged down” when in a model and less “blasting off” when moving outside of it.

## [5.2.0] - 2022-09-06

### Fixed

- Fix `ProcoreBim.model.getObject` and `ProcoreBim.model.getObjectFromPropertyId` when `enableWebWorker: true`. Previously they incorrectly threw an error.

### Changed

- Camera movement with E and Q now moves absolutely up and down instead of up and down relative to the camera.
- Make camera movement with WASDEQ and arrow keys independent of framerate. Less “getting bogged down” when in a model and less “blasting off” when moving outside of it.
- Minor framerate improvements

## [5.1.0] - 2022-08-22

### Added

- `Isolate` in the Context Menu is now enabled when multiple objects are selected.

### Changed

- Decreased load time, especially for larger models, by optimizing the way we construct object bounding boxes.
- Improves mouse control:
  - Eliminates the drift when clicking and dragging on the default tool;
  - Improves handling of the mouse leaving the browser and coming back in, by terminating the interaction.
- Eliminate "space junk" when zooming to global view
  - This change only occurs in some situations depending on whether a `bcfCamera` option was provided. More specifically:
  - When a home viewpoint is defined (i.e. a `bcfCamera` option is passed)
    - The model is loaded with the camera at the home viewpoint
    - Clicking the Home button zooms to the home viewpoint
    - `ProcoreBim.camera.zoomToGlobal()` zooms to the refined global bounding box, which is calculated the first time and cached in JS memory for the remainder of the browser session (i.e. it is lost on page reload).
  - When a home viewpoint is NOT defined (i.e. no `bcfCamera` option is passed)
    - The model loads with the camera with the refined global bounding box in view. The refined global bounding box is calculated here, adding to the load time of the model, and then cached in JS memory for the remainder of the browser session (i.e. it is lost on page reload).
    - Clicking the Home button zooms to have the refined global bounding box in view. The refined global bounding box will be cached from when the model was opened.
    - `ProcoreBim.camera.zoomToGlobal()` zooms to the refined global bounding box, which will be cached from when the model was opened.
  - Performance Note: the execution time for eliminating space junk scales with the number of meshnodes in the model. Mostly this cost is incurred at load time, but will be incurred the first time `ProcoreBim.camera.zoomToGlobal()` is called if a `bcfCamera` option was provided.

### Fixed

- The loading tool (`ProcoreBim.Webviewer.tools.LOADING`) now shows an error message when a model is too large instead of crashing silently.
- Fixed an issue where Markup, Views, and Home Viewpoints could be incorrectly rotated 90 degrees when the camera direction was straight up or down.

## [5.0.0] - 2022-08-08

### Removed

- [BREAKING CHANGE] removes `camera.zoomExtents` method.
  - You can safely replace this with `camera.zoomToBoundingBox` which has the same signature and behavior.

### Fixed

- Fixed click behaviours for the Model Tree.
  - Right click to display the context menu now works for the entire object row instead of just the div containing the text.
  - Right click on a child of a selected parents keeps the selected rows intact.
- Fixed Isolate object.

### Added

- Updated payloads for the `selectTool`, `objectHide`, and `modelTreeParentInteracted` events to cover new functionality with Model Tree, Context Menu, and Object Actions.
- Count used for the Hidden Objects coachmark now uses objects hidden rather than a count of the geometry hidden. Objects hidden and selected should now have a matching count.
- Selected objects count label now displays in the Object Tree.
- Add `camera.zoomTo*` methods to fit objects in view in various ways.
  - `camera.zoomToSelection = () => { ... }`
  - `camera.zoomToObjects = (objectIds) => { ... }`
  - `camera.zoomToBoundingBox = (bbox) => { ... }`
  - `camera.zoomToGlobal = () => { ... }`
- Add "Zoom to Selection" to context menu.
  - Right-click an object directly then select "Zoom to Selection" to move the camera in front of that object.
  - Right-click an object from the Object Tree then select "Zoom to Selection" to move the camera in front of that object.
  - Select an object, click the "Object Actions" dropdown in the Object Tree, and then select "Zoom to Selection" to move the camera in front of that object.

## [4.0.0] - 2022-07-21

### Changed

- Improved rendering performance by using Bounding Volume Hierarchy Tree as the scene graph.

## [3.3.0] - 2022-06-27

- [Internal] Add `devEnvironmentConfig.cypress.js` for always having the same config when running the Cypress suite.

### Added

- New empty state for View Properties window to indicate when a selection does not contain properties to display.
- A right click on a row in the Object Tree will now display the selected objects context menu. Additionally, an `Object Actions` button has also been added to the Object Tree footer that will display the same context menu.
  - For single selected objects, this context menu allows you to Hide Object, Hide Similar, Isolate, and View Properties.
  - For multiple selected objects, this context menu allow you to Hide Object.

### Changed

- Changed when first object doesn't exist, fallback to select the parent node of current geometry

## [3.2.1] - 2022-06-22

### Fixed

- Fix the quick property name in contextmenu is not showing correct when first object doesn't exist
- Fix hide similar always hide only one object when open model in document tool

## [3.2.0] - 2022-05-31

### Added

- New design for the Object Tree that allows you to select multiple objects or layers of objects using checkboxes. This also includes a master checkbox to select or unselect all objects in the model easily.
- Ability to select multiple and unselect objects in the Object Tree by clicking with modifier keys
  - Click to select one and then Shift + Click to select the range of objects between the two clicked objects.
  - On Windows, Ctrl + Click to multi-select/unselect individual objects
  - On Mac, Command + Click to multi-select/unselect individual objects

### Changed

- Changed Object Tree visibility slider to a visibility eye icon.

## [3.1.0] - 2022-05-16

### Changed

- When no `options.bcfCamera` is provided, the camera will zoom to the extents of the model and the Home button will do the same.

### Added

- Added `ProcoreBim.camera.zoomExtents(bbox)` method.
  - This method places the camera such that it is looking at and fully captures the provided bounding box.
- Objects are now selectable from the Object Tree
  - Single click on objects that are not already selected will select object
  - Single click on already selected objects will deselect the object
  - Double click on an object will expand children and select the object
  - Double click an already expanded object will collapse the object
  - Selected objects in the model will reflect in the Object Tree
  - Select an object in the model will select, expand, and scroll to that object in the Object Tree
  - Hover states for mouse over
  - Selected state for objects selected in the model

### Fixed

- Model Object's Tree window master visibility slider has been fixed in some edge cases of hiding child nodes.
- Model Object's Tree window will now correctly display all leaf nodes.

## [3.0.0] - 2022-05-05

### Changed

- [BREAKING CHANGE] Static method Cache.removeModel use to return false if a model could not be removed from cache. It will now throw an error.

### Added

- Added mechanism to only cache the most recently viewed version of a model when the model was loaded with a `fileExtractionId`.
  - This behavior already existed for models loaded with a `modelId` and `modelRevisionId`.
- `Cache.removeModel(options)` now removes models loaded with a `fileExtractionId` when `options` contains that `fileExtractionId`.
  - This behavior already existed for models loaded with a `modelId` and `modelRevisionId` when `options` contains `modelId`.

## [2.1.1] - 2022-04-28

### Fixed

- Transparent objects are once again selectable. Improving transparency accuracy once at rest in 2.1.0 broke selection of transparent objects.

## [2.1.0] - 2022-04-18

### Changed

- Improve accuracy of transparency once at rest

### Added

- Added loading states out of the box. These can be enabled by adding the `LOADING` tool to the `tools` array when initializing the Webviewer. For example: `tools: [Webviewer.tools.LOADING]`.

### Fixed

- Fixed CSS issue in Model Objects tree window involving alignment of the show/hide toggles.

## [2.0.0] - 2022-03-25

### Added

- Caching is now handled internally by the Webviewer SDK. Prior to this release, the only way we allowed for cached models was through a Service Worker provided separately from this npm package (or implementing one yourself). If you were using a service worker in this way, it will no longer be registered by the SDK and from the SDK's perspective is useless and can be deleted.

### Changed

- [BREAKING CHANGE] Change `enableWebWorker` option default to true. If you were not declaring this option before and want to maintain the old behavior then you must set `enableWebWorker: false`. We will still check if Web Workers are supported by the environment even if this is unset or set to true and gracefully fallback if they are not supported.

### Removed

- [BREAKING CHANGE] Removed `improved_raytest` option and always use the Improved Raytest codepath. If you were using `improved_raytest: false` or not defining it then you will see different behavior on this version.
- [BREAKING CHANGE] Removed `rest_version` option. If you were previously using the `/vapid/` endpoints specifically with this option, you will now be using the `rest/v1.0` endpoints. This option defaulted to use the `rest/v1.0` endpoints so no change necessary if you were not using it.
- Removed `improved_modeltree` option. This was unused as we were already always using the Improved Modeltree
- Removed `enableClipping` option. This was not doing anything.
- Removed Service Worker options: `swEnable`, `swScope`, and `swUrl`. This is not a breaking change and caching will continue to work. See note on caching changes in 'Added' section of this release

## [1.10.0] - 2022-03-11

### Changed

- Refactored Mesh and Meshnode into true primitives implementing lazy evaluation of their attributes, along with caching of Meshnodes.
- Allow Webviewer to be initialized with File Extraction ID
- Refactored Performance Benchmark to promises so that each sample takes exactly as long as it needs. This is faster than before where we just waited long enough (500ms) for things to finish.

### Fixed

- Model Tree will now render for objects with non-sequential property ID's

## [1.9.0] - 2022-02-28

### Fixed

- Fixed issue where moving into low-density zones would cause performance in high-density zones to suffer.

### Changed

- Updated Style of keyboard shortcuts and tooltips

### Added

- Added translations for search empty state in Properties window

## [1.8.1] - 2022-02-11

### Added

- Add ability to filter properties in the Properties window
- Webgl2 support

## [1.7.0] - 2022-01-28

### Added

- Add GUI for rendering parameters behind debug initialization

### Changed

- Improved transparency accuracy at rest

## [1.6.0] - 2022-01-07

### Changed

- Improved rendering performance for a more cinematic experience:
  - Reduced flashing of objects while moving
  - Made framerate more consistent between frames
  - Prioritize rendering objects closer to camera while moving
- Upgraded threejs to r111

### Fixed

- Event for `View Properties` using the context menu now uses `context_menu` for the origin key
- New frozen object `ToolOrigin` is used when publishing `selectTool` events on origin key
- `Hide Similar` now uses the current node name when querying for similar objects
- While in Fly mode, keyboard shortcuts for pan, orbit, and rotate have corrected behaviour.
- While in Orbit mode, keyboard shortcuts for pan and rotate have corrected behaviour.
- Panning navigation improved
- Corrected shortest distance results in some cases:
  - when measuring objects that intersect or contain each other
  - when measuring objects composed of disconnected geometries, for example a wall represented by an inner and outer plane but no thickness that connects them

## [v1.5.1] - 2021-12-16

### Fixed

- Small and far objects are now correctly culled

## [v1.5.0] - 2021-12-10

### Added

- Added culling of small and far objects to improve rendering performance
- Added translations for View Properties

## [v1.4.0] - 2021-11-19

### Added

- Added new events `hideSimilarCompleted` and `isolateCompleted`, which are invoked from the right click context menu.
- Added `Properties` tool

## [v1.3.4] - 2021-11-12

### Fixed

- Section Data from published Viewpoints will now display correctly.
- Fixed mouse scroll to zoom on the 2D Plan map modal.

## [v1.3.3] - 2021-11-09

### Fixed

- Fixed window components from getting stuck outside the browser window when switching from different window sizes.
- Fixed keyboard shortcut for `Shift + Left Click` to select objects while in Fly/Orbit Navigation.

## [v1.3.2]

### Changed

- Feature neutral - no changes.

### Fixed

- On Chrome, navigating via the planmap doesn't work. Choosing position correctly moves your avatar on the planmap, but after choosing a direction, the avatar in 3d space does not move. Works on Firefox.
- On Firefox, Alt + O does not open the objects window and produces an error in the console
- Going to the location of another user does not work and produces a error
- Position and size of modal windows (e.g. the Model Views window opened with Alt+V) is not persisted across page loads. It should be in the same position and size across page loads.
- In Chrome, when using the Measure tool to measure the shortest distance between two objects, the camera should center on the midpoint between the two selected objects, but it does not move and throws an error involving `setLookAt`.

## [v1.3.1]

### Changed

- Updated labels when Mac is detected for right click context menu.

### Fixed

- Fixes incorrect behaviour with `Hide Similar` that disables the menu item if the Property Service is down and shows a tooltip on hover.

## [v1.3.0]

### Added

- Added `Isolate` to the right click context menu that hides all other objects in the model except for the currently active object.

## [v1.2.0]

### Fixed

- Added `Hide Similar` to the right click context menu, a functionality that will hide similar objects in the model that have the same property name as the currently inspected object.

## [v1.1.1]

### Fixed

- Fixed issue with ellipse data max < min in Markup tool

## [v1.1.0]

### Added

- Added header to the right click context menu that displays the object name that has been selected

## [v1.0.0]

### Added

- Added Procore.Bim.Webviewer.js for the initial release
