Module: @cognite/reveal/tools
Enumerations
- BingMapImageFormat
- BingMapType
- Corner
- HereMapImageFormat
- HereMapScheme
- HereMapType
- MapProviders
- MapboxImageFormat
- MapboxMode
- MapboxStyle
Classes
- AxisViewTool
- Cognite3DViewerToolBase
- DebugCameraTool
- DebugLoadedSectorsTool
- ExplodedViewTool
- GeomapTool
- HtmlOverlayTool
- Keyframe
- MeasurementTool
- TimelineTool
Type Aliases
AbsolutePosition
Ƭ AbsolutePosition: Object
Absolute position in pixels.
Type declaration
Name | Type |
---|---|
xAbsolute | number |
yAbsolute | number |
Defined in
packages/tools/src/AxisView/types.ts:47
AxisBoxCompassConfig
Ƭ AxisBoxCompassConfig: Object
Configuration of the compass.
Type declaration
Name | Type | Description |
---|---|---|
fontColor? | THREE.Color | - |
fontSize? | number | - |
labelDelta? | number | Offset in radians of the orientation indicator. |
ringLabel? | string | Label 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
Name | Type | Description |
---|---|---|
animationSpeed? | number | How long the camera animation lasts when clicking a face of the orientation box. |
compass? | AxisBoxCompassConfig | Configuration 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 | RelativePosition | Position, either absolute or relative. |
size? | number | Size 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
Name | Type | Description |
---|---|---|
faceColor? | THREE.Color | - |
fontColor? | THREE.Color | - |
fontSize? | number | - |
label? | string | Label 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
Name | Type | Description |
---|---|---|
APIKey | string | Bing Map API Key |
provider | BingMap | - |
type? | BingMapType | The type of the map used. |
Defined in
packages/tools/src/Geomap/MapConfig.ts:121
DebugLoadedSectorsToolOptions
Ƭ DebugLoadedSectorsToolOptions: Object
Type declaration
Name | Type |
---|---|
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
Name | Type | Description |
---|---|---|
APIKey | string | Here map API Key |
appCode? | string | Service application code token. |
imageFormat? | HereMapImageFormat | Map image tile format |
provider | HereMap | - |
scheme? | string | Specifies the view scheme |
size? | number | Returned tile map image size. The following sizes are supported: - 256 - 512 - 128 (deprecated, although usage is still accepted) |
style? | HereMapType | The 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
Name | Type |
---|---|
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
Name | Type | Description |
---|---|---|
positionUpdatedCallback? | HtmlOverlayPositionUpdatedDelegate | Callback that is triggered whenever the position of the overlay is updated. Optional. |
userData? | any | Optional 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
Name | Type |
---|---|
element | HTMLElement |
position2D | THREE.Vector2 |
position3D | THREE.Vector3 |
distanceToCamera | number |
userData | any |
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
Name | Type | Description |
---|---|---|
APIKey | string | Mapbox API Key |
id | string | Map style or map ID if the mode is set to MAP_ID |
mode? | MapboxMode | Map tile access mode - MapboxMode.STYLE - MapboxMode.MAP_ID |
provider | MapboxMap | - |
tileFormat? | MapboxImageFormat | Map image tile format |
useHDPI? | boolean | Flag to indicate if should use high resolution tiles |
Defined in
packages/tools/src/Geomap/MapConfig.ts:169
Measurement
Ƭ Measurement: Object
Type declaration
Name | Type |
---|---|
distanceInMeters | number |
endPoint | THREE.Vector3 |
measurementId | number |
startPoint | THREE.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
Name | Type |
---|---|
event | Object |
event.distanceInMeters | number |
event.endPoint | THREE.Vector3 |
event.measurementId | number |
event.startPoint | THREE.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
Name | Type | Description |
---|---|---|
color? | THREE.Color | Line color in 32 bit hex. |
distanceToLabelCallback? | DistanceToLabelDelegate | - |
lineWidth? | number | Line 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
Name | Type |
---|---|
corner | Corner |
padding | THREE.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
Name | Type |
---|---|
event | Object |
event.activeKeyframe | Keyframe | undefined |
event.date | Date |
event.endDate | Date |
event.startDate | Date |
Returns
void