Members
(constant) ARCSECONDS_TO_RADIANS
(constant) AU_TO_METERS
IAU 1976 value
- Source
(constant) COMSIDE
First index is {NW,NE,SW,SE}, another one is {N,E,S,W}
- Source
(constant) DAYS_PER_JULIAN_CENTURY
Days in julian century.
- Source
(constant) DAYS_PER_JULIAN_YEAR
Days in julian year.
- Source
(constant) DEGREES
(constant) DEGREES_DOUBLE
(constant) DEGREES_TO_HOURS
(constant) EARTH_GRAVITATIONAL_PARAMETER
Earth gravitational parameter product of gravitational constant G and the mass M of the Earth.
- Source
(constant) HOURS_PER_DAY
Hours in day.
- Source
(constant) HOURS_TO_DEGREES
(constant) HOURS_TO_RADIANS
(constant) J2000
Julian date of 2000 year. Epoch.
- Source
(constant) J2000_OBLIQUITY
Angle between J2000 mean equator and the ecliptic plane. 23 deg 26' 21".448 (Seidelmann, Explanatory Supplement to the Astronomical Almanac (1992), eqn 3.222-1.
- Source
(constant) LOG2
(constant) MAX
(constant) MAX32
(constant) MAX_LAT :number
Max mercator latitude.
- number
- Source
(constant) MAX_NODES :number
Maximum created nodes count. The more nodes count the more memory usage.
- number
- Default Value
- 200
- Source
(constant) METERS_PER_UNIT :Record.<string, number>
Meters per unit lookup table.
- Record.<string, number>
- Source
(constant) MILLISECONDS_PER_DAY
Milliseconds in day.
- Source
(constant) MILLISECONDS_PER_SECOND
Milliseconds in second.
- Source
(constant) MIN
(constant) MINUTES_PER_DAY
Minutes in day.
- Source
(constant) MINUTES_PER_HOUR
Minutes in hour.
- Source
(constant) MIN_LAT :number
Min mercator latitude.
- number
- Source
(constant) MODIFIED_JULIAN_DATE_DIFFERENCE
Modified julian date difference.
- Source
Mat3
Mat3 factory.
- Source
Mat4
Mat4 factory.
- Source
(constant) NEIGHBOUR
First index is {N,E,S,W} and second is {NW,NE,SW,SE}
- Source
(constant) NOPSORD
Neighbos's opside array order. For example NW node by E side array index is 0, SE node by S side is 1.
- Source
(constant) ONE_BY_HOURS_PER_DAY
One by hours in day.
- Source
(constant) ONE_BY_MILLISECONDS_PER_DAY
One by milliseconds in day.
- Source
(constant) ONE_BY_MINUTES_PER_DAY
One by minutes in day.
- Source
(constant) ONE_BY_POLE_DOUBLE :number
One by mercator double size.
- number
- Source
(constant) ONE_BY_SECONDS_PER_DAY
One by seconds in day.
- Source
(constant) ONE_BY_SECONDS_PER_HOUR
One by seconds in hour.
- Source
(constant) ONE_BY_SECONDS_PER_MINUTE
One by seconds in minute.
- Source
(constant) OPPART
Neighbor's oposite part. For example oposite side on the east neighbor side is: [S][SE] = NE
- Source
(constant) OPSIDE
World opposite side table.
- Source
(constant) PARTOFFSET
Gets segment part left to right or up to downo ffset against neighbour side. Where 0 - no offset 1 - half segment size offset.
- Source
(constant) PICOSECOND
Seconds in picoseconds.
- Source
(constant) PI_TWO
(constant) PLANET_NAME_PREFIX :string
- string
(constant) POLE :number
Mercator size.
- number
- Source
(constant) POLE_DOUBLE :number
Double mercator size.
- number
- Source
(constant) RADIANS
(constant) RADIANS_HALF
(constant) RADIANS_TO_HOURS
(constant) SAFE
Point types
(constant) SECONDS_PER_12_HOURS
Seconds in 12 hours.
- Source
(constant) SECONDS_PER_DAY
Seconds in day.
- Source
(constant) SECONDS_PER_HOUR
Seconds in hour.
- Source
(constant) SECONDS_PER_MILLISECOND
Seconds in millisecond.
- Source
(constant) SECONDS_PER_MINUTE
Seconds in minute.
- Source
(constant) SQRT_HALF
(constant) STR2ALIGN :number
Text align options.
- number
Name | Type | Description |
---|---|---|
left | number | |
right | number | |
center | number |
- Source
(constant) SUN_GRAVITATIONAL_PARAMETER
Sun gravitational parameter product of gravitational constant G and the mass M of the Sun.
- Source
(constant) TDT_TAI
Terrestrial and atomic time difference.
- Source
(constant) TRACK
drawData index names
(constant) TWO_PI
(constant) Units :string
Projection units: 'degrees', 'ft', 'm' or 'km'.
- string
Name | Type | Description |
---|---|---|
DEGREES | string | |
FEET | string | |
METERS | string | |
KILOMETERS | string |
- Source
_currPickingColor :Array.<number>
Stores current picking rgb color.
- Array.<number>
_prevPickingColor :Array.<number>
Stores previous picked rgb color.
- Array.<number>
(constant) mars :Ellipsoid
Mars ellipsoid object.
- Source
(constant) moon :Ellipsoid
Moon ellipsoid object.
- Source
(constant) visibleExtent
- Deprecated
- Yes
(constant) wgs84 :Ellipsoid
WGS84 ellipsoid object.
- Source
Methods
DEG2RAD(degrees) → {number}
Converts degrees value to radians.
Name | Type | Description |
---|---|---|
degrees | number | Degree value. |
- Type:
- number
DateToTAI(date) → {JulianDate}
Converts javascript date to the atomic(TAI) julian date.
Name | Type | Description |
---|---|---|
date | Date | Date. |
- Source
TAI julian date
- Type:
- JulianDate
DateToUTC(date) → {JulianDate}
Converts javascript date to the universal(UTC) julian date.
Name | Type | Description |
---|---|---|
date | Date | Date. |
- Source
UTC julian date
- Type:
- JulianDate
Quat(xopt, yopt, zopt, wopt) → {Quat}
Creates Quat instance.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x | Number | <optional> | 0.0 | The X component. |
y | Number | <optional> | 0.0 | The Y component. |
z | Number | <optional> | 0.0 | The Z component. |
w | Number | <optional> | 0.0 | The W component. |
- Source
- Type:
- Quat
RAD2DEG(angle) → {number}
Converts radians value to degrees.
Name | Type | Description |
---|---|---|
angle | number | Degree value. |
- Type:
- number
T(jd) → {number}
Returns julian days from Epoch.
Name | Type | Description |
---|---|---|
jd | JulianDate | Julian date. |
- Source
Days from epoch
- Type:
- number
TAItoDate(tai) → {Date}
Converts TAI julian date to the javascript date object.
Name | Type | Description |
---|---|---|
tai | JulianDate | TAI julian date. |
- Source
JavaScript Date object
- Type:
- Date
TAItoTDB(tai) → {JulianDate}
Converts atomic time to barycentric dynamical time.
Name | Type | Description |
---|---|---|
tai | JulianDate | Atomic time. |
- Source
- returns barycentric dynamical time.
- Type:
- JulianDate
TAItoUTC(tai) → {JulianDate|undefined}
Converts atomic julian date(TAI) to the coordinated universal(UTC) julian date.
Name | Type | Description |
---|---|---|
tai | JulianDate | TAI julian date. |
- Source
UTC julian date
- Type:
- JulianDate |
undefined
UTCtoDate(utc) → {Date}
Converts UTC julian date to the javascript date object.
Name | Type | Description |
---|---|---|
utc | JulianDate | UTC julian date. |
- Source
JavaScript Date object
- Type:
- Date
UTCtoTAI(jd) → {JulianDate}
Converts coordinated universal(UTC) julian date to atomic(TAI) julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | UTC julian date. |
- Source
TAI julian date
- Type:
- JulianDate
Vec2(xopt, yopt) → {Vec2}
Vector 2d object creator.
Name | Type | Attributes | Description |
---|---|---|---|
x | number | <optional> | First cvalue. |
y | number | <optional> | Second value. |
- Source
- Type:
- Vec2
Vec3(xopt, yopt, zopt) → {Vec3}
Vector 3d object creator.
Name | Type | Attributes | Description |
---|---|---|---|
x | number | <optional> | value X. |
y | number | <optional> | value Y. |
z | number | <optional> | value Z. |
- Source
- Type:
- Vec3
Vec4(xopt, yopt, zopt, wopt) → {Vec4}
Vector 4d object creator.
Name | Type | Attributes | Description |
---|---|---|---|
x | number | <optional> | First value. |
y | number | <optional> | Second value. |
z | number | <optional> | Third value. |
w | number | <optional> | Fourth value. |
- Source
- Type:
- Vec4
_entitiesConstructor(entities) → {Array.<Entity>}
Creates entity instance array.
Name | Type | Description |
---|---|---|
entities | Array.<Entity> | | Entity array. |
- Source
- Entity array.
- Type:
- Array.<Entity>
addDays(jd, days) → {JulianDate}
Adds days to the julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | Julian date. |
days | number | Days to add. |
- Source
Julian date
- Type:
- JulianDate
addHours(jd, hours) → {JulianDate}
Adds hours to the julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | Julian date. |
hours | number | Hours to add. |
- Source
Julian date
- Type:
- JulianDate
addMilliseconds(jd, milliseconds) → {JulianDate}
Adds milliseconds to the julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | Julian date. |
milliseconds | number | Milliseconds to add. |
- Source
Julian date
- Type:
- JulianDate
addMinutes(jd, minutes) → {JulianDate}
Adds minutes to the julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | Julian date. |
minutes | number | Minutes to add. |
- Source
Julian date
- Type:
- JulianDate
addSeconds(jd, seconds) → {JulianDate}
Adds seconds to the julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | Julian date. |
seconds | number | Seconds to add. |
- Source
Julian date
- Type:
- JulianDate
bezier3v(t, p0, p1, p2, p3) → {Vec3}
Performs a 3D bezier interpolation.
Name | Type | Description |
---|---|---|
t | number | Interpolation value. |
p0 | Vec3 | First control point. |
p1 | Vec3 | Second control point. |
p2 | Vec3 | Third control point. |
p3 | Vec3 | Fourth control point. |
- Type:
- Vec3
clamp(value, min, max) → {number}
Clamp the number.
Name | Type | Description |
---|---|---|
value | number | Input number. |
min | number | Minimal edge. |
max | number | Maximal edge. |
- Type:
- number
clamp(12, 1, 5)
//returns 5
daysToSeconds(d) → {number}
Returns seconds in days.
Name | Type | Description |
---|---|---|
d | number | Days. |
- Source
Seconds
- Type:
- number
degToDec(d, m, s, popt) → {number}
Converts degrees value to decimal.
Name | Type | Attributes | Description |
---|---|---|---|
d | number | Degrees. | |
m | number | Minutes. | |
s | number | Seconds. | |
p | boolean | <optional> | Positive flag. False - default. |
- Type:
- number
exp2(n) → {number}
Returns two power of n.
Name | Type | Description |
---|---|---|
n | number | Power value. |
- Type:
- number
forwardArray(lonLatArr) → {Array.<LonLat>}
Converts geodetic coordinate array to mercator coordinate array.
Name | Type | Description |
---|---|---|
lonLatArr | Array.<LonLat> | LonLat array to convert. |
- Source
- Type:
- Array.<LonLat>
forward_lat(lat) → {number}
Converts degrees latitude to mercator coordinate.
Name | Type | Description |
---|---|---|
lat | number | Degrees geodetic latitude. |
- Source
- Type:
- number
forward_lon(lon) → {number}
Converts degrees longitude to mercator coordinate.
Name | Type | Description |
---|---|---|
lon | number | Degrees geodetic longitude. |
- Source
- Type:
- number
frac(x) → {number}
The frac function returns the fractional part of x, i.e. x minus floor(x).
Name | Type | Description |
---|---|---|
x | number | Input value. |
- Type:
- number
getAngleBetweenAzimuths(a, b) → {number}
Returns angle between two azimuths
Name | Type | Description |
---|---|---|
a | number | First azimuth angle |
b | number | Second azimuth angle |
- Type:
- number
getAngleDirection(a, b) → {number}
Name | Type | Description |
---|---|---|
a | First bearing angle | |
b | Second bearing angle |
- Type:
- number
getDayNumber(year, month, day) → {number}
Gets the date's julian day.
Name | Type | Description |
---|---|---|
year | number | Year. |
month | number | Month. |
day | number | Day. |
- Source
Day number
- Type:
- number
getDays(jd) → {number}
Gets days of a julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | julian date. |
- Source
Days
- Type:
- number
getHours(jd) → {number}
Gets hours of a julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | julian date. |
- Source
Hours
- Type:
- number
getMilliseconds(jd) → {number}
Gets milliseconds of a julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | julian date. |
- Source
Milliseconds
- Type:
- number
getMinutes(jd) → {number}
Gets minutes of a julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | julian date. |
- Source
Minutes
- Type:
- number
getSeconds(jd) → {number}
Gets seconds of a julian date.
Name | Type | Description |
---|---|---|
jd | JulianDate | julian date. |
- Source
Seconds
- Type:
- number
getSunPosition(jDate) → {Vec3}
Returns Sun position in the geocentric coordinate system by the time.
Name | Type | Description |
---|---|---|
jDate | JulianDate | Julian date time. |
- Source
- Sun geocentric coordinates.
- Type:
- Vec3
getTileX(lon, zoom) → {number}
Returns mercator map tile grid horizontal coordinate index by geodetic longitude and zoom level. Where top left corner of the grid is 0 coordinate index.
Name | Type | Description |
---|---|---|
lon | number | Geodetic degrees longitude. |
zoom | number | Zoom level. |
- Source
- Type:
- number
getTileY(lat, zoom) → {number}
Returns mercator map tile grid vertical coordinate index by geodetic latitude and zoom level. Where top left corner of the grid is 0 coordinate index.
Name | Type | Description |
---|---|---|
lat | number | Geodetic degrees latitude. |
zoom | number | Zoom level. |
- Source
- Type:
- number
inverse_lat(lon) → {number}
Converts mercator latitude to degrees coordinate.
Name | Type | Description |
---|---|---|
lon | number | Mercator latitude. |
- Source
- Type:
- number
inverse_lon(lon) → {number}
Converts mercator longitude to degrees coordinate.
Name | Type | Description |
---|---|---|
lon | number | Mercator longitude. |
- Source
- Type:
- number
isPowerOfTwo(x) → {boolean}
Check the number is a power of two.
Name | Type | Description |
---|---|---|
x | number | Input value. |
- Type:
- boolean
lerp(t, h1, h0) → {number}
Performs a linear interpolation.
Name | Type | Description |
---|---|---|
t | number | A value that linearly interpolates between the h0 parameter and the h1 parameter. |
h1 | number | End value. |
h0 | number | Start value. |
- Type:
- number
log(n, base) → {number}
The log function returns the power to which the base value has to be raised to produce n.
Name | Type | Description |
---|---|---|
n | number | Produce value. |
base | number | Base value. |
- Type:
- number
log(64, 2)
//returns 6
log2(x) → {number}
Returns Math.log(x) / Math.log(2)
Name | Type | Description |
---|---|---|
x | number | Input value. |
- Type:
- number
mod(m, n) → {number}
The modulo operation that also works for negative dividends.
Name | Type | Description |
---|---|---|
m | number | The dividend. |
n | number | The divisor. |
The remainder.
- Type:
- number
negativePItoPI(a) → {number}
Returns an angle in the range -Pi <= angle <= Pi which is equivalent to the provided angle.
Name | Type | Description |
---|---|---|
a | number | Angle in radians. |
- Type:
- number
nextHighestPowerOfTwo(x, maxValueopt) → {number}
Returns next value that is power of two.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x | number | Input value. | ||
maxValue | number | <optional> | 4096 | Maximal value. |
- Type:
- number
norm_lon(lon) → {number}
Clamp longitude within: -180 to +180 degrees.
Name | Type | Description |
---|---|---|
lon | number | Longitude. |
- Type:
- number
pow2i(n) → {number}
Returns two power of integer n.
Name | Type | Description |
---|---|---|
n | number | Integer power value. |
- Type:
- number
random(minopt, maxopt) → {number}
Returns random number within the bounds.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
min | number | <optional> | 0 | Minimal bound. |
max | number | <optional> | 1 | Maximal bound. |
- Type:
- number
randomi(min, max) → {number}
Returns random integer number within the bounds.
Name | Type | Default | Description |
---|---|---|---|
min | number | 0 | Minimal bound. |
max | number | 1 | Maximal bound. |
- Type:
- number
rev(x) → {number}
Clamp angle value within 360.
Name | Type | Description |
---|---|---|
x | number | Input angle. |
- Type:
- number
secondsToDays(s) → {number}
Returns days in seconds.
Name | Type | Description |
---|---|---|
s | number | Seconds. |
- Source
Days
- Type:
- number
slice(t, h1, h0) → {number}
Returns a slice of linear interpolation t * (h1 - h0)
Name | Type | Description |
---|---|---|
t | number | A value that linearly interpolates between the h0 parameter and the h1 parameter. |
h1 | number | End value. |
h0 | number | Start value. |
- Type:
- number
solve_iteration(f, x0, err, maxIter) → {number}
Solve using iteration; terminate when error is below err or the maximum number of iterations is reached. Used in Euler's equation(see og.orbit) solving.
Name | Type | Default | Description |
---|---|---|---|
f | function | Equation. | |
x0 | number | First approximation. | |
err | number | Maximal accepted error value. | |
maxIter | number | 50 | Maximum iterations. |
- The computed solution.
- Type:
- number
solve_iteration_fixed(f, x0, maxIter) → {number}
Solve using iteration method and a fixed number of steps.
Name | Type | Description |
---|---|---|
f | function | Equation. Used in Euler's equation(see og.orbit) solving. |
x0 | number | First approximation. |
maxIter | number | Maximum iterations. |
- Type:
- number
step(edge, x) → {number}
Returns 0.0 if x is smaller than edge and otherwise 1.0.
Name | Type | Description |
---|---|---|
edge | number | |
x | number | Value to edge. |
- Type:
- number
zeroTwoPI(a) → {number}
Returns an angle in the range 0 <= angle <= 2Pi which is equivalent to the provided angle.
Name | Type | Description |
---|---|---|
a | number | Angle in radians |
- Type:
- number
Type Definitions
ExtentBoundingBox
- Array.<number>
HandlerEventType
- "visibilitychange" |
"resize"
- Source
IEntityParams
Interface for Entity parameters.
- Object
Name | Type | Attributes | Description |
---|---|---|---|
name | string | <optional> | Name of the entity. |
properties | any | <optional> | Additional properties of the entity. |
cartesian | Vec3 | | <optional> | Cartesian position. |
lonlat | LonLat | | <optional> | Geographic coordinates. |
altitude | number | <optional> | Altitude. |
visibility | boolean | <optional> | Visibility flag. |
billboard | Billboard | | <optional> | Billboard object or parameters. |
label | Label | | <optional> | Label object or parameters. |
polyline | Polyline | | <optional> | Polyline object or parameters. |
ray | Ray | | <optional> | Ray object or parameters. |
pointCloud | PointCloud | | <optional> | Point cloud object or parameters. |
geometry | Geometry | | <optional> | Geometry object or parameters. |
geoObject | GeoObject | | <optional> | Geo object or parameters. |
strip | Strip | | <optional> | Strip object or parameters. |
independentPicking | boolean | <optional> | Independent picking flag. |
relativePosition | boolean | <optional> | Parent relative position flag, otherwise position is absolute. |
pitch | number | <optional> | Rotation around local X-axis. |
yaw | number | <optional> | Rotation around local Y-axis. |
roll | number | <optional> | Rotation around local Z-axis. |
scale | number | | <optional> | Scaling factor. |
forceGlobalPosition | boolean | <optional> | Forces global position for entity make the same position as its parent. |
forceGlobalRotation | boolean | <optional> | Forces global rotation for the entity make the same rotation as its parent. |
- Source
IGeoObjectParams
Interface for GeoObject parameters.
- Object
Name | Type | Attributes | Description |
---|---|---|---|
object3d | Object3d | <optional> | 3D object associated with the geo object. |
objSrc | string | <optional> | Source url of the 3D object. |
tag | string | <optional> | Unique instancing drawing identifier tag. |
position | Vec3 | | <optional> | Position in Cartesian coordinates. |
scale | number | | <optional> | Scale of the object. |
translate | Vec3 | | <optional> | Translation offset. |
color | Vec4 | | <optional> | RGBA color or HTML color string. |
visibility | boolean | <optional> | Visibility flag. |
- Source
QuatAxisAngle
- Object
Name | Type | Description |
---|---|---|
axis | Vec3 | The rotation axis. |
angle | number | The rotation angle in radians. |
- Source
equationCallback(x)
Equation function.
Name | Type | Description |
---|---|---|
x | number | Equation variable. |
Events
#load
Triggered when current tile image has loaded before rendering.
- Source
#loadend
Triggered when all tiles have loaded or loading has stopped.
- Source