Methods


init_runtime( apiKey ) → {Promise.<any>}

Parameters
Name Type Description
apiKey string
Returns

get_wasm_version() → {string}

Returns

init_gkweb( apiKey ) → {any}

Parameters
Name Type Description
apiKey string
Returns

angleBetweenCoords( a, b ) → {any}

Parameters
Name Type Description
a any
b any
Returns

rotationMatrix( a, b ) → {any}

Parameters
Name Type Description
a any
b any
Returns

radiansToDegrees( radians ) → {number}

Parameters
Name Type Description
radians number
Returns

degreesToRadians( degrees ) → {number}

Parameters
Name Type Description
degrees number
Returns

cartesianToLatLon( x, y, z ) → {any}

Parameters
Name Type Description
x number
y number
z number
Returns

normalize_vec3( vector ) → {any}

Parameters
Name Type Description
vector any
Returns

dot_vec3( vector0, vector1 ) → {any}

Parameters
Name Type Description
vector0 any
vector1 any
Returns

latLonAltToCartesian( lat, lon, alt ) → {any}

Parameters
Name Type Description
lat number
lon number
alt number
Returns

hexColorToVec3( hex ) → {any}

Parameters
Name Type Description
hex string
Returns

hexColorToNormalizedVec3( hex ) → {any}

Parameters
Name Type Description
hex string
Returns

Type Definitions


easeFunction( inValue ) → {number}

Parameters
Name Type Description
inValue number Incoming value, between 0 and 1.
Returns
outValue - Transformed value.

AmbientControllerAnimationOptions

Description
Ambient controller animation options
Properties
Name Type Attributes Description
duration number <nullable>
Duration, in milliseconds.
ease easeFunction <nullable>
Easing function.
onComplete onCompleteCallback <nullable>
onComplete function.

AnimationControllerAnimationOptions

Description
Animation controller animation options
Properties
Name Type Attributes Description
duration number <nullable>
Duration, in milliseconds.
ease easeFunction <nullable>
Easing function.
onComplete onCompleteCallback <nullable>
onComplete function.

onCompleteCallback( finished )

Parameters
Name Type Description
finished boolean Animation finished naturally (as opposed to being stopped early).

onAutoRemoveCallback( calloutDefinition )

Parameters
Name Type Description
calloutDefinition CalloutDefinition

shouldAutoRemoveHandler( calloutDefinition ) → {boolean}

Parameters
Name Type Description
calloutDefinition CalloutDefinition
Returns

onInitCallback()


positionEventCallback( position )

Parameters
Name Type Attributes Description
position PositionObject <nullable>
Position of event, if it happened within the globe. Null if outside globe.

CoordinateObject

Description
Coordinate object
Properties
Name Type Description
lat number Latitude
lon number Longitude
alt number Altitude

ScreenPositionObject

Description
Screen position object
Properties
Name Type Description
x number X position, relative to container
y number Y position, relative to container

WorldPositionObject

Description
World position object
Properties
Name Type Description
x number X position, relative to center of globe
y number Y position, relative to center of globe
similarityToCameraVector number Similarity to the camera view, which projects from the center of the globe. 1 is in globe center, 0 is any globe edge, -1 is the opposite side of the globe.

PositionObject

Description
Position object
Properties
Name Type Description
coord CoordinateObject
screen ScreenPositionObject
world WorldPositionObject