Skip to main content
Version: 3.x

Module: @cognite/reveal/tools

Enumerations

Classes

Type Aliases

AbsolutePosition

Ƭ AbsolutePosition: Object

Absolute position in pixels.

Type declaration

NameType
xAbsolutenumber
yAbsolutenumber

Defined in

packages/tools/src/AxisView/types.ts:47


AxisBoxCompassConfig

Ƭ AxisBoxCompassConfig: Object

Configuration of the compass.

Type declaration

NameTypeDescription
fontColor?THREE.Color-
fontSize?number-
labelDelta?numberOffset in radians of the orientation indicator.
ringLabel?stringLabel of the orientation indicator. Defaults to 'N' for north.
tickColor?THREE.Color-

Defined in

packages/tools/src/AxisView/types.ts:79


AxisBoxConfig

Ƭ AxisBoxConfig: Object

Configuration of AxisViewTool.

Type declaration

NameTypeDescription
animationSpeed?numberHow long the camera animation lasts when clicking a face of the orientation box.
compass?AxisBoxCompassConfigConfiguration of the compass "base" of the tool.
faces?{ xNegativeFace?: AxisBoxFaceConfig ; xPositiveFace?: AxisBoxFaceConfig ; yNegativeFace?: AxisBoxFaceConfig ; yPositiveFace?: AxisBoxFaceConfig ; zNegativeFace?: AxisBoxFaceConfig ; zPositiveFace?: AxisBoxFaceConfig }Configuration for each of the faces of the orientation box. Note that Reveal uses a right-handed Y up coordinate system, which might differ from the original model space. To account for this, you might want to reassign labels of the faces.
faces.xNegativeFace?AxisBoxFaceConfig-
faces.xPositiveFace?AxisBoxFaceConfig-
faces.yNegativeFace?AxisBoxFaceConfig-
faces.yPositiveFace?AxisBoxFaceConfig-
faces.zNegativeFace?AxisBoxFaceConfig-
faces.zPositiveFace?AxisBoxFaceConfig-
position?AbsolutePosition | RelativePositionPosition, either absolute or relative.
size?numberSize in pixels of the axis tool.

Defined in

packages/tools/src/AxisView/types.ts:10


AxisBoxFaceConfig

Ƭ AxisBoxFaceConfig: Object

Configuration of each face of the orientation box.

Type declaration

NameTypeDescription
faceColor?THREE.Color-
fontColor?THREE.Color-
fontSize?number-
label?stringLabel of the respective face, e.g. 'X' or 'Right'.
outlineColor?THREE.Color-
outlineSize?number-

Defined in

packages/tools/src/AxisView/types.ts:64


BingMapConfig

Ƭ BingMapConfig: Object

Type declaration

NameTypeDescription
APIKeystringBing Map API Key
providerBingMap-
type?BingMapTypeThe type of the map used.

Defined in

packages/tools/src/Geomap/MapConfig.ts:121


DebugLoadedSectorsToolOptions

Ƭ DebugLoadedSectorsToolOptions: Object

Type declaration

NameType
colorBy?"depth" | "lod" | "loadedTimestamp" | "drawcalls" | "random"
leafsOnly?boolean
sectorPathFilterRegex?string
showDetailedSectors?boolean
showDiscardedSectors?boolean
showSimpleSectors?boolean

Defined in

packages/tools/src/DebugLoadedSectorsTool.ts:13


HereMapConfig

Ƭ HereMapConfig: Object

Type declaration

NameTypeDescription
APIKeystringHere map API Key
appCode?stringService application code token.
imageFormat?HereMapImageFormatMap image tile format
providerHereMap-
scheme?stringSpecifies the view scheme
size?numberReturned tile map image size. The following sizes are supported: - 256 - 512 - 128 (deprecated, although usage is still accepted)
style?HereMapTypeThe type of maps to be used.

Defined in

packages/tools/src/Geomap/MapConfig.ts:133


HtmlOverlayCreateClusterDelegate

Ƭ HtmlOverlayCreateClusterDelegate: (overlayElements: { htmlElement: HTMLElement ; userData: any }[]) => HTMLElement

Type declaration

▸ (overlayElements): HTMLElement

Callback that is triggered when a set of overlays are clustered together in HtmlOverlayTool.

Parameters
NameType
overlayElements{ htmlElement: HTMLElement ; userData: any }[]
Returns

HTMLElement

Defined in

packages/tools/src/HtmlOverlay/HtmlOverlayTool.ts:32


HtmlOverlayOptions

Ƭ HtmlOverlayOptions: Object

Options for an overlay added using HtmlOverlayTool.add.

Type declaration

NameTypeDescription
positionUpdatedCallback?HtmlOverlayPositionUpdatedDelegateCallback that is triggered whenever the position of the overlay is updated. Optional.
userData?anyOptional user specified data that is provided to the HtmlOverlayCreateClusterDelegate and HtmlOverlayPositionUpdatedDelegate.

Defined in

packages/tools/src/HtmlOverlay/HtmlOverlayTool.ts:42


HtmlOverlayPositionUpdatedDelegate

Ƭ HtmlOverlayPositionUpdatedDelegate: (element: HTMLElement, position2D: THREE.Vector2, position3D: THREE.Vector3, distanceToCamera: number, userData: any) => void

Type declaration

▸ (element, position2D, position3D, distanceToCamera, userData): void

Callback that is triggered whenever the 2D position of an overlay is updated in HtmlOverlayTool.

Parameters
NameType
elementHTMLElement
position2DTHREE.Vector2
position3DTHREE.Vector3
distanceToCameranumber
userDataany
Returns

void

Defined in

packages/tools/src/HtmlOverlay/HtmlOverlayTool.ts:20


MapConfig

Ƭ MapConfig: { latlong: LatLongPosition } & BingMapConfig | HereMapConfig | MapboxConfig | OpenStreetMapConfig

Maps Configuration of GeomapTool.

Defined in

packages/tools/src/Geomap/MapConfig.ts:198


MapboxConfig

Ƭ MapboxConfig: Object

Type declaration

NameTypeDescription
APIKeystringMapbox API Key
idstringMap style or map ID if the mode is set to MAP_ID
mode?MapboxModeMap tile access mode - MapboxMode.STYLE - MapboxMode.MAP_ID
providerMapboxMap-
tileFormat?MapboxImageFormatMap image tile format
useHDPI?booleanFlag to indicate if should use high resolution tiles

Defined in

packages/tools/src/Geomap/MapConfig.ts:169


Measurement

Ƭ Measurement: Object

Type declaration

NameType
distanceInMetersnumber
endPointTHREE.Vector3
measurementIdnumber
startPointTHREE.Vector3

Defined in

packages/tools/src/Measurement/MeasurementManager.ts:11


MeasurementAddedDelegate

Ƭ MeasurementAddedDelegate: (event: { distanceInMeters: number ; endPoint: THREE.Vector3 ; measurementId: number ; startPoint: THREE.Vector3 }) => void

Type declaration

▸ (event): void

Delegate for measurement added events.

Parameters
NameType
eventObject
event.distanceInMetersnumber
event.endPointTHREE.Vector3
event.measurementIdnumber
event.startPointTHREE.Vector3
Returns

void

Defined in

packages/tools/src/Measurement/types.ts:13


MeasurementEndedDelegate

Ƭ MeasurementEndedDelegate: () => void

Type declaration

▸ (): void

Delegate for measurement ended events.

Returns

void

Defined in

packages/tools/src/Measurement/types.ts:28


MeasurementOptions

Ƭ MeasurementOptions: Object

Measurement tool option with user custom callback, line width & color.

Type declaration

NameTypeDescription
color?THREE.ColorLine color in 32 bit hex.
distanceToLabelCallback?DistanceToLabelDelegate-
lineWidth?numberLine width in cm. Note that the minium drawn line will be ~2 pixels.

Defined in

packages/tools/src/Measurement/types.ts:33


MeasurementStartedDelegate

Ƭ MeasurementStartedDelegate: () => void

Type declaration

▸ (): void

Delegate for measurement started events.

Returns

void

Defined in

packages/tools/src/Measurement/types.ts:23


RelativePosition

Ƭ RelativePosition: Object

Relative position from a corner of the viewer and a given padding.

Type declaration

NameType
cornerCorner
paddingTHREE.Vector2

Defined in

packages/tools/src/AxisView/types.ts:56


TimelineDateUpdateDelegate

Ƭ TimelineDateUpdateDelegate: (event: { activeKeyframe: Keyframe | undefined ; date: Date ; endDate: Date ; startDate: Date }) => void

Type declaration

▸ (event): void

Delegate for Timeline Date update

Parameters
NameType
eventObject
event.activeKeyframeKeyframe | undefined
event.dateDate
event.endDateDate
event.startDateDate
Returns

void

Defined in

packages/tools/src/Timeline/types.ts:8