larsmoa
released this
22 Jun 12:32
·
3032 commits
to master
since this release
This is a beta release of the next major version of Reveal. Reveal 2.0 comes with ThreeJS embedded so you do not have this as a dependency in your project. If you still want to have it as a direct dependency, it must match the version used by Reveal (r128). You can also use three.js version exported by Reveal as import { THREE } from '@cognite/reveal
.
Migrating from 2.0.0-beta.0
There are some notable changes between beta.0 and this version:
- Cognite3DViewer.getIntersectionFromPixel() is now async
- Renamed a lot of classes in the styling API:
- NodeSet -> NodeCollectionBase
- ByNodePropertyNodeSet -> PropertyFilterNodeCollection
- ByAssetNodeSet -> AssetNodeCollection
- ByTreeIndexNodeSet -> TreeIndexNodeCollection
- InvertedNodeSet -> InvertedNodeCollection
- CombinedNodeSet -> replaced by UnionNodeCollection and IntersectionNodeCollection
- Renamed some functions in Cognite3DModel:
- addStyledNodeSet -> assignStyledNodeCollection
- removeStyledNodeSet -> unassignStyledNodeCollection
- removeAllStyledNodeSets -> removeAllStyledNodeCollections
- Note that assignStyledNodeCollection can be used to assign a new style, or change the styling of an existing "styled node collection"
🚀 Features
- feat: add SinglePropertyNodeCollection for matching on many property values on a single node property (experimental) (#1516)
- feat: Implement save / restore viewer state (#1523)
- feat: ByTreeIndexNodeSet - allow empty constructor (#1524)
- feat: add NodeSet.clear() (#1519)
- feat: add Cognite3DViewer.models to access currently added models (#1506)
🐞 Bug fixes and enhancements
- fix: Bug causing black fade for cad models when resizing screen (#1504)
- fix: remove @internal from Cognite3DViewerToolBase. This should fix an issue where HtmlOverlayTool could not be imported. (#1531)
- fix: add assert as a direct dependency to make sure it's available in client projects (#1544)
- improvement: replace pink and purple outline colors with green and red [REV-171] (#1541)
- improvement: Cognite3DModel.getSubtreeIndices() now returns a range (#1525)
- improvement: improve performance of applying styles by avoiding allocations of arrays (#1527)
- refac: make Cognite3DViewer.getIntersectionFromPixel async [REV-176] (#1540)
- refac: rename NodeSet to NodeCollection (#1539)
- chore: update potree-core, move sdk-core to peerDeps
- chore: replace gl-matrix with ThreeJS (#1513)
- chore: remove Cognite3DModel.loadingHints (#1526)
- chore: upgrade viewer/examples to TypeScript 4.3 (#1508)
- chore: remove sdk-core from dev deps (#1502)
📖 Documentation
- docs: fix example in cad-styling-custom.mdx (#1536)
- doc: update migration documentation to accommodate for migration from version 1 to 2 (#1505)
See installation documentation for details about installing Reveal.