Skip to main content
Version: 4.x

Module: @cognite/reveal

Enumerations

Classes

Interfaces

Type Aliases

AddImage360Options

Ƭ AddImage360Options: Object

Type declaration

NameTypeDescription
collectionTransform?THREE.Matrix4An optional transformation which will be applied to all 360 images that are fetched.
preMultipliedRotation?booleanSet this to false if the 360 images' rotation is not pre-multiplied to fit the given model. Default ts true

Defined in

packages/api/src/public/migration/types.ts:203


BeforeSceneRenderedDelegate

Ƭ BeforeSceneRenderedDelegate: (event: { camera: THREE.PerspectiveCamera ; frameNumber: number ; renderer: THREE.WebGLRenderer }) => void

Type declaration

▸ (event): void

Delegate for event triggered when scene is about to be rendered.

Parameters
NameType
eventObject
event.cameraTHREE.PerspectiveCamera
event.frameNumbernumber
event.rendererTHREE.WebGLRenderer
Returns

void

Defined in

packages/utilities/src/events/types.ts:25


CadIntersection

Ƭ CadIntersection: Object

Type declaration

NameTypeDescription
distanceToCameranumberDistance from the camera to the intersection.
modelCogniteCadModelThe model that was intersected.
pointTHREE.Vector3Coordinate of the intersection.
treeIndexnumberTree index of the intersected 3D node.
type"cad"The intersection type.

Defined in

packages/api/src/public/migration/types.ts:215


CadModelBudget

Ƭ CadModelBudget: Object

Represents a measurement of how much geometry can be loaded.

Type declaration

NameTypeDescription
highDetailProximityThresholdnumberSectors 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).
maximumRenderCostnumberMaximum 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
NameType
positionTHREE.Vector3
targetTHREE.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

NameType
positionTHREE.Vector3
targetTHREE.Vector3

Defined in

packages/utilities/src/CameraConfiguration.ts:8


CameraControlsOptions

Ƭ CameraControlsOptions: Object

Type declaration

NameTypeDescription
changeCameraTargetOnClick?booleanEnables 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


CameraEventDelegate

Ƭ CameraEventDelegate: CameraChangeDelegate | CameraStopDelegate

Union type of all camera event delegates

Defined in

packages/camera-manager/src/types.ts:96


CameraManagerEventType

Ƭ CameraManagerEventType: typeof CAMERA_MANAGER_EVENT_TYPE_LIST[number]

Union type of the supported camera manager event types

Defined in

packages/camera-manager/src/types.ts:123


CameraState

Ƭ CameraState: Object

Type declaration

NameTypeDescription
position?THREE.Vector3Camera position in world space.
rotation?THREE.QuaternionCamera local rotation in quaternion form.
target?THREE.Vector3Camera target in world space. *

Defined in

packages/camera-manager/src/types.ts:66


CameraStopDelegate

Ƭ CameraStopDelegate: () => void

Type declaration

▸ (): void

Returns

void

Defined in

packages/camera-manager/src/types.ts:91


ClippingPlanesState

Ƭ ClippingPlanesState: Object

Type declaration

NameType
constantnumber
nxnumber
nynumber
nznumber

Defined in

packages/api/src/utilities/ViewStateHelper.ts:28


CogniteModel

Ƭ CogniteModel: CogniteCadModel | CognitePointCloudModel

Type abstraction for CogniteCadModel or CognitePointCloudModel;.

Defined in

packages/api/src/public/types.ts:11


ComboControlsOptions

Ƭ ComboControlsOptions: Object

Exposed options for Combo Controls

Type declaration

NameTypeDescription
EPSILONnumber-
dampingFactornumber-
dollyFactornumber-
dynamicTargetboolean-
enableDampingboolean-
enableKeyboardNavigationboolean-
firstPersonRotationFactornumber-
keyboardDollySpeednumber-
keyboardPanSpeednumber-
keyboardRotationSpeedAzimuthnumber-
keyboardRotationSpeedPolarnumber-
keyboardSpeedFactornumberHow much quicker keyboard navigation will be with 'shift' pressed
lookAtViewTargetboolean-
maxAzimuthAnglenumberRadians
maxDeltaDownscaleCoefficientnumber-
maxDeltaRationumber-
maxPolarAnglenumberRadians
maxZoomnumber-
minAzimuthAnglenumberRadians
minDeltaDownscaleCoefficientnumber-
minDeltaRationumber-
minDistancenumber-
minPolarAnglenumberRadians
minZoomnumber-
minZoomDistancenumber-
mouseFirstPersonRotationSpeednumber-
orthographicCameraDollyFactornumber-
panDollyMinDistanceFactornumber-
pinchEpsilonnumber-
pinchPanSpeednumber-
pointerRotationSpeedAzimuthnumberRadians per pixel
pointerRotationSpeedPolarnumberRadians per pixel
useScrollTargetboolean-
zoomToCursorboolean-

Defined in

packages/camera-manager/src/ComboControls.ts:47


CompletePointCloudAppearance

Ƭ CompletePointCloudAppearance: Required<PointCloudAppearance>

Defined in

packages/pointcloud-styling/src/PointCloudAppearance.ts:12


DefaultMetadataType

Ƭ DefaultMetadataType: Object

Index signature

[key: string]: string | undefined

Type declaration

NameType
text?string

Defined in

packages/3d-overlays/src/OverlayCollection.ts:6


DisposedDelegate

Ƭ DisposedDelegate: () => void

Type declaration

▸ (): void

Returns

void

Defined in

packages/utilities/src/events/types.ts:20


EdlOptions

Ƭ EdlOptions: Object

Configuration parameters for Eye Dome Lighting (EDL) point cloud post-processing effect.

Type declaration

NameTypeDescription
radiusnumberRadius of sampled points in pixels. Determines thickness of edges addet on top of points.
strengthnumberDetermines how pronounced the effect is. Lower values result in more transparent edges.

Defined in

packages/rendering/src/rendering/types.ts:22


GeometryFilter

Ƭ GeometryFilter: Object

Type declaration

NameTypeDescription
boundingBox?THREE.Box3The 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?booleanWhen set, the geometry filter 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:23


Image360AnnotationAppearance

Ƭ Image360AnnotationAppearance: Object

The appearance of a 360 image annotation

Type declaration

NameTypeDescription
color?ColorThe color of the annotation. Default: Random, based on annotation label
visible?booleanWhether the annotation is visible. Default: true

Defined in

packages/360-images/src/annotation/types.ts:10


Image360AnnotationAssetFilter

Ƭ Image360AnnotationAssetFilter: Object

Filter for finding annotation related to asset

Type declaration

NameType
assetRefIdEither

Defined in

packages/360-images/src/collection/Image360Collection.ts:16


Image360AnnotationAssetQueryResult

Ƭ Image360AnnotationAssetQueryResult: Object

Result item from an asset annotation query

Type declaration

NameTypeDescription
annotationImage360AnnotationThe found annotation
imageImage360The Image360 to which the result annotation belongs
revisionImage360RevisionThe image revision to which the result annotation belongs

Defined in

packages/360-images/src/collection/Image360Collection.ts:23


Image360AnnotationIntersection

Ƭ Image360AnnotationIntersection: Object

Describes an intersection with a 360 image annotation

Type declaration

NameTypeDescription
annotationImage360AnnotationThe intersected annotation
directionVector3The world direction from the camera to the intersection point
type"image360Annotation"The intersection type.

Defined in

packages/360-images/src/annotation/Image360AnnotationIntersection.ts:11


Image360EnteredDelegate

Ƭ Image360EnteredDelegate: (image360: Image360, revision: Image360Revision) => void

Type declaration

▸ (image360, revision): void

Delegate for 360 image mode entered events.

Parameters
NameType
image360Image360
revisionImage360Revision
Returns

void

Defined in

packages/360-images/src/types.ts:11


Image360ExitedDelegate

Ƭ Image360ExitedDelegate: () => void

Type declaration

▸ (): void

Delegate for 360 image mode exited events.

Returns

void

Defined in

packages/360-images/src/types.ts:16


Image360Metadata

Ƭ Image360Metadata: Object

Type declaration

NameType
collectionstring
date?Date
stationstring

Defined in

packages/360-images/src/entity/Image360.ts:8


Intersection

Ƭ Intersection: CadIntersection | PointCloudIntersection

Defined in

packages/api/src/public/migration/types.ts:268


ModelState

Ƭ ModelState: Object

Type declaration

NameType
defaultNodeAppearanceSerializableNodeAppearance
modelIdnumber
revisionIdnumber
styledSets{ appearance: SerializableNodeAppearance ; options?: any ; state: any ; token: string }[]

Defined in

packages/api/src/utilities/ViewStateHelper.ts:35


NodeAppearance

Ƭ NodeAppearance: Object

Type for defining node appearance profiles to style a 3D CAD model.

See

DefaultNodeAppearance

Type declaration

NameTypeDescription
color?ColorOverrides the default color of the node in RGB. Black, or new Color(0, 0, 0) means no override.
outlineColor?NodeOutlineColorWhen set, an outline is drawn around the node to make it stand out.
prioritizedForLoadingHint?numberWhen 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?booleanWhen set to true, the node is rendered ghosted, i.e. transparent with a fixed color. This has no effect if renderInFront is true.
renderInFront?booleanWhen 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?booleanOverrides the visibility of the node.

Defined in

packages/cad-styling/src/NodeAppearance.ts:22


NodeCollectionSerializationContext

Ƭ NodeCollectionSerializationContext: Object

Type declaration

NameType
clientCogniteClient
modelCdfModelNodeCollectionDataProvider

Defined in

packages/cad-styling/src/NodeCollectionDeserializer.ts:22


OnLoadingCallback

Ƭ OnLoadingCallback: (itemsLoaded: number, itemsRequested: number, itemsCulled: number) => void

Type declaration

▸ (itemsLoaded, itemsRequested, itemsCulled): void

Parameters
NameType
itemsLoadednumber
itemsRequestednumber
itemsCullednumber
Returns

void

Defined in

packages/api/src/public/migration/types.ts:27


OverlayInfo

Ƭ OverlayInfo<MetadataType>: Object

Type parameters

NameType
MetadataTypeDefaultMetadataType

Type declaration

NameType
color?THREE.Color
metadata?MetadataType
positionTHREE.Vector3

Defined in

packages/3d-overlays/src/OverlayCollection.ts:11


PointCloudAppearance

Ƭ PointCloudAppearance: Object

Type declaration

NameType
color?Color
visible?boolean

Defined in

packages/pointcloud-styling/src/PointCloudAppearance.ts:7


PointCloudBudget

Ƭ PointCloudBudget: Object

Represents a budget of how many point from point clouds can be loaded at the same time.

Type declaration

NameTypeDescription
numberOfPointsnumberTotal number of points that can be loaded for all point clouds models accumulated.

Defined in

packages/pointclouds/src/PointCloudBudget.ts:10


PointCloudIntersection

Ƭ PointCloudIntersection: Object

Type declaration

NameTypeDescription
annotationIdnumberAnnotation Id of the intersected object within a pointcloud. (0 if not applicable)
assetRef?AnnotationsAssetRefReference to the asset associated to the intersected point cloud object, if any.
distanceToCameranumberDistance from the camera to the intersection.
modelCognitePointCloudModelThe model that was intersected.
pointTHREE.Vector3Coordinate of the intersection.
pointIndexnumberThe index of the point that was intersected.
type"pointcloud"The intersection type.

Defined in

packages/pointclouds/src/PointCloudIntersection.ts:7


PointCloudObjectMetadata

Ƭ PointCloudObjectMetadata: Object

Metadata for a single point cloud object

Type declaration

NameTypeDescription
annotationIdnumberThe CDF Annotation ID associated with the point cloud object.
assetId?numberThe CDF Asset ID associated with the point cloud object, if any. Deprecated Use assetRef instead.
assetRef?AnnotationsAssetRefAsset identifiers for asset associated with this point cloud object, if any.
boundingBoxBox3The bounding box of this annotation

Defined in

packages/data-providers/src/pointcloud-stylable-object-providers/types.ts:21


PointerEventData

Ƭ PointerEventData: Object

Type declaration

NameType
button?number
offsetXnumber
offsetYnumber

Defined in

packages/utilities/src/events/types.ts:15


PointerEventDelegate

Ƭ PointerEventDelegate: (event: PointerEventData) => void

Type declaration

▸ (event): void

Parameters
NameType
eventPointerEventData
Returns

void

Defined in

packages/utilities/src/events/types.ts:9


PropertyFilterNodeCollectionOptions

Ƭ PropertyFilterNodeCollectionOptions: Object

Options for PropertyFilterNodeCollection.

Type declaration

NameTypeDescription
requestPartitions?numberHow many partitions to split the request into. More partitions can yield better performance for queries with very large result set (in order of magnitude 100.000 plus). Defaults to 1.

Defined in

packages/cad-styling/src/PropertyFilterNodeCollection.ts:18


RenderParameters

Ƭ RenderParameters: Object

Some parameters of THREE.WebGLRenderer initialized with Cognite3DViewer.

Type declaration

NameTypeDescription
renderSizeTHREE.Vector2Current width and height of the renderer's output canvas, in pixels.

Defined in

packages/api/src/public/migration/types.ts:32


ResolutionOptions

Ƭ ResolutionOptions: Object

Type declaration

NameTypeDescription
maxRenderResolution?numberGenerally Reveal will follow the resolution given by the size of the encapsulating DOM element of the Canvas domElement. To ensure managable performance, Reveal will by default set an upper threshold to limit the resolution. The maxRenderResolution option will directly control this upper limit. It corresponds to the number of pixels in the render target.
movingCameraResolutionFactor?numberA factor that will scale down the resolution when moving the camera. This can be used to achieve a better user experience on devices with limited hardware. Values must be greater than 0 and at most 1. This factor is applied to the number of physical pixels of the canvas. A value of e.g. 0.25 will approximately divide the number of pixels rendered on the screen by four.

Defined in

packages/api/src/public/migration/types.ts:244


SceneRenderedDelegate

Ƭ SceneRenderedDelegate: (event: { camera: THREE.PerspectiveCamera ; frameNumber: number ; renderTime: number ; renderer: THREE.WebGLRenderer }) => void

Type declaration

▸ (event): void

Parameters
NameType
eventObject
event.cameraTHREE.PerspectiveCamera
event.frameNumbernumber
event.renderTimenumber
event.rendererTHREE.WebGLRenderer
Returns

void

Defined in

packages/utilities/src/events/types.ts:35


SerializableNodeAppearance

Ƭ SerializableNodeAppearance: Object

Type that represents a NodeAppearance in a serializable format

Type declaration

NameTypeDescription
color?[number, number, number]Color as an RGB number tuple, with values in the range [0, 255]
outlineColor?NodeOutlineColorOutline color, See NodeAppearance
prioritizedForLoadingHint?numberPrioritized loading hint, See NodeAppearance
renderGhosted?booleanWhether to render ghosted, See NodeAppearance
renderInFront?booleanWhether to render in front, See NodeAppearance
visible?booleanVisibility, See NodeAppearance

Defined in

packages/cad-styling/src/NodeAppearance.ts:77


SerializedNodeCollection

Ƭ SerializedNodeCollection: Object

Type declaration

NameType
options?any
stateany
tokenstring

Defined in

packages/cad-styling/src/SerializedNodeCollection.ts:4


SupportedModelTypes

Ƭ SupportedModelTypes: "pointcloud" | "cad"

Defined in

packages/model-base/src/SupportedModelTypes.ts:4


ViewerState

Ƭ ViewerState: Object

Type declaration

NameType
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.xnumber
camera.position.ynumber
camera.position.znumber
camera.target{ x: number ; y: number ; z: number }
camera.target.xnumber
camera.target.ynumber
camera.target.znumber
clippingPlanes?ClippingPlanesState[]
models?ModelState[]

Defined in

packages/api/src/utilities/ViewStateHelper.ts:19


WellKnownUnit

Ƭ WellKnownUnit: "Meters" | "Centimeters" | "Millimeters" | "Micrometers" | "Kilometers" | "Feet" | "Inches" | "Yards" | "Miles" | "Mils" | "Microinches"

Units supported by CogniteCadModel.

Defined in

packages/cad-model/src/types.ts:10

Variables

CAMERA_MANAGER_EVENT_TYPE_LIST

Const CAMERA_MANAGER_EVENT_TYPE_LIST: readonly ["cameraChange", "cameraStop"]

List of supported event types (adapted from https://stackoverflow.com/questions/44480644/string-union-to-string-array)

Defined in

packages/camera-manager/src/types.ts:118


CDF_TO_VIEWER_TRANSFORMATION

Const CDF_TO_VIEWER_TRANSFORMATION: Matrix4 = cadFromCdfToThreeMatrix

The transformation matrix from CDF coordinates to ThreeJS/Reveal. Note that this is already applied to Reveal models.

Defined in

packages/utilities/src/constants.ts:14


DefaultNodeAppearance

Const DefaultNodeAppearance: Object

A set of default node appearances used in Reveal.

Type declaration

NameType
DefaultNodeAppearance
GhostedNodeAppearance
HiddenNodeAppearance
Highlighted{ color?: Color ; outlineColor?: NodeOutlineColor ; prioritizedForLoadingHint?: number ; renderGhosted?: boolean ; renderInFront?: boolean ; visible?: boolean }
Highlighted.color?Color
Highlighted.outlineColor?NodeOutlineColor
Highlighted.prioritizedForLoadingHint?number
Highlighted.renderGhosted?boolean
Highlighted.renderInFront?boolean
Highlighted.visible?boolean
InFrontNodeAppearance
OutlinedNodeAppearance

Defined in

packages/cad-styling/src/NodeAppearance.ts:142


DefaultPointCloudAppearance

Const DefaultPointCloudAppearance: CompletePointCloudAppearance

Defined in

packages/pointcloud-styling/src/PointCloudAppearance.ts:14


REVEAL_VERSION

Const REVEAL_VERSION: string = process.env.VERSION

Defined in

packages/api/index.ts:11

Functions

registerNodeCollectionType

registerNodeCollectionType<T>(nodeCollectionTypeName, deserializer): void

Type parameters

NameType
Textends NodeCollection<T>

Parameters

NameType
nodeCollectionTypeNamestring
deserializer(descriptor: SerializedNodeCollection, context: NodeCollectionSerializationContext) => Promise<T>

Returns

void

Defined in

packages/cad-styling/src/NodeCollectionDeserializer.ts:156