Module: @cognite/reveal
Enumerations
- NodeOutlineColor
- PotreePointColorType
- PotreePointShape
- PotreePointSizeType
- WellKnownAsprsPointClassCodes
Classes
- AssetNodeCollection
- BoundingBoxClipper
- CameraManagerHelper
- ClusteredAreaCollection
- Cognite3DModel
- Cognite3DViewer
- CognitePointCloudModel
- ComboControls
- DefaultCameraManager
- IndexSet
- IntersectionNodeCollection
- InvertedNodeCollection
- NodeAppearanceProvider
- NodeCollection
- NumericRange
- PropertyFilterNodeCollection
- SinglePropertyFilterNodeCollection
- TreeIndexNodeCollection
- UnionNodeCollection
Interfaces
- AddModelOptions
- AreaCollection
- CameraManager
- CdfModelNodeCollectionDataProvider
- Cognite3DViewerOptions
- CogniteModelBase
- IntersectionFromPixelOptions
Type Aliases
CadIntersection
Ƭ CadIntersection: Object
Type declaration
Name | Type | Description |
---|---|---|
distanceToCamera | number | Distance from the camera to the intersection. |
model | Cognite3DModel | The model that was intersected. |
point | THREE.Vector3 | Coordinate of the intersection. |
treeIndex | number | Tree index of the intersected 3D node. |
type | "cad" | The intersection type. |
Defined in
packages/api/src/public/migration/types.ts:179
CadModelBudget
Ƭ CadModelBudget: Object
Represents a measurement of how much geometry can be loaded.
Type declaration
Name | Type | Description |
---|---|---|
highDetailProximityThreshold | number | Sectors within this distance from the camera will always be loaded in high details. deprecated This is only used for 3D models processed prior to the Reveal 3.0 release (Q1 2022). |
maximumRenderCost | number | Maximum render cost. This number can be thought of as triangle count, although the number doesn't match this directly. |
Defined in
packages/cad-geometry-loaders/src/CadModelBudget.ts:10
CameraChangeDelegate
Ƭ CameraChangeDelegate: (position
: THREE.Vector3
, target
: THREE.Vector3
) => void
Type declaration
▸ (position
, target
): void
Parameters
Name | Type |
---|---|
position | THREE.Vector3 |
target | THREE.Vector3 |
Returns
void
Defined in
packages/camera-manager/src/types.ts:85
CameraConfiguration
Ƭ CameraConfiguration: Object
Represents a camera configuration, consisting of a camera position and target.
Type declaration
Name | Type |
---|---|
position | THREE.Vector3 |
target | THREE.Vector3 |
Defined in
packages/utilities/src/CameraConfiguration.ts:8
CameraControlsOptions
Ƭ CameraControlsOptions: Object
Type declaration
Name | Type | Description |
---|---|---|
changeCameraTargetOnClick? | boolean | Enables or disables change of camera target on mouse click. New target is then set to the point of the model under current cursor position. Default is false. |
mouseWheelAction? | "zoomToTarget" | "zoomPastCursor" | "zoomToCursor" | Sets mouse wheel initiated action. Modes: 'zoomToTarget' - zooms just to the current target (center of the screen) of the camera. 'zoomPastCursor' - zooms in the direction of the ray coming from camera through cursor screen position, allows going through objects. 'zoomToCursor' - mouse wheel scroll zooms towards the point on the model where cursor is hovering over, doesn't allow going through objects. Default is 'zoomPastCursor'. |
Defined in
packages/camera-manager/src/types.ts:5
CameraState
Ƭ CameraState: Object
Type declaration
Name | Type | Description |
---|---|---|
position? | THREE.Vector3 | Camera position in world space. |
rotation? | THREE.Quaternion | Camera local rotation in quaternion form. |
target? | THREE.Vector3 | Camera target in world space. |
Defined in
packages/camera-manager/src/types.ts:66
DisposedDelegate
Ƭ DisposedDelegate: () => void
Type declaration
▸ (): void
Returns
void
Defined in
packages/utilities/src/events/types.ts:20
GeometryFilter
Ƭ GeometryFilter: Object
Type declaration
Name | Type | Description |
---|---|---|
boundingBox? | THREE.Box3 | The bounds to load geometry within. By default this box is in CDF coordinate space which will be transformed into coordinates relative to the model using the the model transformation which can be specified using the CDF API, or set in Cognite Fusion. see isBoundingBoxInModelCoordinates. |
isBoundingBoxInModelCoordinates? | boolean | When set, the geometry filter {@link boundingBox} will be considered to be in "Reveal/ThreeJS space". Rather than CDF space which is the default. When using Reveal space, the model transformation which can be specified using the CDF API, or set in Cognite Fusion. |
Defined in
packages/cad-model/src/types.ts:21
Intersection
Ƭ Intersection: CadIntersection
| PointCloudIntersection
Defined in
packages/api/src/public/migration/types.ts:206
LoadingStateChangeListener
Ƭ LoadingStateChangeListener: (loadingState
: LoadingState
) => any
Type declaration
▸ (loadingState
): any
Handler for events about data being loaded.
Parameters
Name | Type |
---|---|
loadingState | LoadingState |
Returns
any
Defined in
packages/api/src/public/types.ts:30
ModelState
Ƭ ModelState: Object
Type declaration
Name | Type |
---|---|
defaultNodeAppearance | NodeAppearance |
modelId | number |
revisionId | number |
styledSets | { appearance : NodeAppearance ; options? : any ; state : any ; token : string }[] |
Defined in
packages/api/src/utilities/ViewStateHelper.ts:31
NodeAppearance
Ƭ NodeAppearance: Object
Type for defining node appearance profiles to style a 3D CAD model.
Type declaration
Name | Type | Description |
---|---|---|
color? | [number , number , number ] | Overrides the default color of the node in RGB. Each component is in range [0, 255]. [0, 0, 0] means no override. |
outlineColor? | NodeOutlineColor | When set, an outline is drawn around the node to make it stand out. |
prioritizedForLoadingHint? | number | When provided, this value can be used to prioritize certain areas of the 3D model to be loaded. This can be useful to prioritize key objects in the 3D model to always be loaded. When non-zero, sectors containing geometry in the vicinity of the prioritized sectors are given an extra priority. Recommended values are in range 1 (somewhat higher priority to be loaded) to 10 (very likely to be loaded). Usually values around 4-5 is recommended. Prioritized nodes are loaded at the expense of non-prioritized areas. There are no guarantees that the nodes are actually loaded, and the more prioritized areas/nodes provided, the less likely it is that the hint is obeyed. Extra priority doesn't accumulate when sectors are prioritized because they intersect/contain several nodes. This is an advanced feature and not recommended for most users version Only works with 3D models converted later than Q4 2021. |
renderGhosted? | boolean | When set to true, the node is rendered ghosted, i.e. transparent with a fixed color. This has no effect if renderInFront is true . |
renderInFront? | boolean | When set to true, the node is rendered in front of all other nodes even if it's occluded. Note that this take precedence over renderGhosted. |
visible? | boolean | Overrides the visibility of the node. |
Defined in
packages/cad-styling/src/NodeAppearance.ts:20
NodeCollectionDescriptor
Ƭ NodeCollectionDescriptor: Object
Type declaration
Name | Type |
---|---|
options? | any |
state | any |
token | TypeName |
Defined in
packages/cad-styling/src/NodeCollectionDeserializer.ts:22
NodeCollectionSerializationContext
Ƭ NodeCollectionSerializationContext: Object
Type declaration
Name | Type |
---|---|
client | CogniteClient |
model | CdfModelNodeCollectionDataProvider |
Defined in
packages/cad-styling/src/NodeCollectionDeserializer.ts:21
OnLoadingCallback
Ƭ OnLoadingCallback: (itemsLoaded
: number
, itemsRequested
: number
, itemsCulled
: number
) => void
Type declaration
▸ (itemsLoaded
, itemsRequested
, itemsCulled
): void
Parameters
Name | Type |
---|---|
itemsLoaded | number |
itemsRequested | number |
itemsCulled | number |
Returns
void
Defined in
packages/api/src/public/migration/types.ts:23
PointCloudBudget
Ƭ PointCloudBudget: Object
Represents a budget of how many point from point clouds can be loaded at the same time.
Type declaration
Name | Type | Description |
---|---|---|
numberOfPoints | number | Total number of points that can be loaded for all point clouds models accumulated. |
Defined in
packages/pointclouds/src/PointCloudBudget.ts:10
PointerEventDelegate
Ƭ PointerEventDelegate: (event
: PointerEventData
) => void
Type declaration
▸ (event
): void
Parameters
Name | Type |
---|---|
event | PointerEventData |
Returns
void
Defined in
packages/utilities/src/events/types.ts:9
RevealOptions
Ƭ RevealOptions: Object
property
logMetrics Might be used to disable usage statistics.
property
nodeAppearanceProvider Style node by tree-index.
property
internal Internals are for internal usage only (like unit-testing).
Type declaration
Name | Type |
---|---|
continuousModelStreaming? | boolean |
internal? | { cad? : InternalRevealCadOptions } |
internal.cad? | InternalRevealCadOptions |
logMetrics? | boolean |
outputRenderTarget? | { autoSize? : boolean ; target : THREE.WebGLRenderTarget } |
outputRenderTarget.autoSize? | boolean |
outputRenderTarget.target | THREE.WebGLRenderTarget |
renderOptions? | RenderOptions |
rendererResolutionThreshold? | number |
Defined in
packages/api/src/public/types.ts:16
SceneRenderedDelegate
Ƭ SceneRenderedDelegate: (event
: { camera
: THREE.PerspectiveCamera
; frameNumber
: number
; renderTime
: number
; renderer
: THREE.WebGLRenderer
}) => void
Type declaration
▸ (event
): void
Parameters
Name | Type |
---|---|
event | Object |
event.camera | THREE.PerspectiveCamera |
event.frameNumber | number |
event.renderTime | number |
event.renderer | THREE.WebGLRenderer |
Returns
void
Defined in
packages/utilities/src/events/types.ts:26
SerializedNodeCollection
Ƭ SerializedNodeCollection: Object
Type declaration
Name | Type |
---|---|
options? | any |
state | any |
token | string |
Defined in
packages/cad-styling/src/SerializedNodeCollection.ts:4
SupportedModelTypes
Ƭ SupportedModelTypes: "pointcloud"
| "cad"
Defined in
packages/model-base/src/SupportedModelTypes.ts:4
TypeName
Ƭ TypeName: string
Defined in
packages/cad-styling/src/NodeCollectionDeserializer.ts:20
ViewerState
Ƭ ViewerState: Object
Type declaration
Name | Type |
---|---|
camera? | { position : { x : number ; y : number ; z : number } ; target : { x : number ; y : number ; z : number } } |
camera.position | { x : number ; y : number ; z : number } |
camera.position.x | number |
camera.position.y | number |
camera.position.z | number |
camera.target | { x : number ; y : number ; z : number } |
camera.target.x | number |
camera.target.y | number |
camera.target.z | number |
clippingPlanes? | ClippingPlanesState [] |
models? | ModelState [] |
Defined in
packages/api/src/utilities/ViewStateHelper.ts:15
WellKnownUnit
Ƭ WellKnownUnit: "Meters"
| "Centimeters"
| "Millimeters"
| "Micrometers"
| "Kilometers"
| "Feet"
| "Inches"
| "Yards"
| "Miles"
| "Mils"
| "Microinches"
Units supported by Cognite3DModel.
Defined in
packages/cad-model/src/types.ts:8
Variables
DefaultNodeAppearance
• Const
DefaultNodeAppearance: Object
A set of default node appearances used in Reveal.
Type declaration
Name | Type |
---|---|
Default | NodeAppearance |
Ghosted | NodeAppearance |
Hidden | NodeAppearance |
Highlighted | { color? : [number , number , number ] ; outlineColor? : NodeOutlineColor ; prioritizedForLoadingHint? : number ; renderGhosted? : boolean ; renderInFront? : boolean ; visible? : boolean } |
Highlighted.color? | [number , number , number ] |
Highlighted.outlineColor? | NodeOutlineColor |
Highlighted.prioritizedForLoadingHint? | number |
Highlighted.renderGhosted? | boolean |
Highlighted.renderInFront? | boolean |
Highlighted.visible? | boolean |
InFront | NodeAppearance |
Outlined | NodeAppearance |
Defined in
packages/cad-styling/src/NodeAppearance.ts:109
REVEAL_VERSION
• Const
REVEAL_VERSION: string
= process.env.VERSION
Defined in
revealEnv
• Const
revealEnv: Object
Used to specify custom url for worker/wasm files in cases when you need the latest local files or CDN is blocked by CSP.
Type declaration
Name | Type |
---|---|
publicPath | string |
Defined in
packages/utilities/src/revealEnv.ts:9
Functions
registerCustomNodeCollectionType
▸ registerCustomNodeCollectionType<T
>(nodeCollectionType
, deserializer
): void
Type parameters
Name | Type |
---|---|
T | extends NodeCollection <T > |
Parameters
Name | Type |
---|---|
nodeCollectionType | string |
deserializer | (descriptor : NodeCollectionDescriptor , context : NodeCollectionSerializationContext ) => Promise <T > |
Returns
void