From 5334a4e3114cba8f748269fc871268fdc68fe0e3 Mon Sep 17 00:00:00 2001 From: Tentone Date: Sat, 17 Dec 2022 15:29:55 +0000 Subject: [PATCH] Updated build --- build/geo-three.js | 3 -- docs/classes/BingMapsProvider.html | 40 +++++++------- docs/classes/CancelablePromise.html | 22 ++++---- docs/classes/DebugProvider.html | 16 +++--- docs/classes/Geolocation.html | 4 +- docs/classes/GeolocationUtils.html | 2 +- docs/classes/GoogleMapsProvider.html | 28 +++++----- docs/classes/HeightDebugProvider.html | 20 +++---- docs/classes/HereMapsProvider.html | 36 ++++++------- docs/classes/LODFrustum.html | 10 ++-- docs/classes/LODRadial.html | 6 +-- docs/classes/LODRaycast.html | 16 +++--- docs/classes/MapBoxProvider.html | 36 ++++++------- docs/classes/MapHeightNode.html | 62 ++++++++++----------- docs/classes/MapHeightNodeShader.html | 68 ++++++++++++------------ docs/classes/MapNode.html | 46 ++++++++-------- docs/classes/MapNodeGeometry.html | 4 +- docs/classes/MapNodeHeightGeometry.html | 4 +- docs/classes/MapPlaneNode.html | 50 ++++++++--------- docs/classes/MapProvider.html | 14 ++--- docs/classes/MapSphereNode.html | 58 ++++++++++---------- docs/classes/MapSphereNodeGeometry.html | 2 +- docs/classes/MapTilerProvider.html | 22 ++++---- docs/classes/MapView.html | 44 +++++++-------- docs/classes/OpenMapTilesProvider.html | 20 +++---- docs/classes/OpenStreetMapsProvider.html | 18 +++---- docs/classes/UnitsUtils.html | 22 ++++---- docs/classes/XHRUtils.html | 6 +-- docs/index.html | 13 ++++- docs/interfaces/LODControl.html | 2 +- 30 files changed, 351 insertions(+), 343 deletions(-) diff --git a/build/geo-three.js b/build/geo-three.js index 8774284..a0917d8 100644 --- a/build/geo-three.js +++ b/build/geo-three.js @@ -1,5 +1,3 @@ - -(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document); (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('three')) : typeof define === 'function' && define.amd ? define(['exports', 'three'], factory) : @@ -1930,4 +1928,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); })); -//# sourceMappingURL=geo-three.js.map diff --git a/docs/classes/BingMapsProvider.html b/docs/classes/BingMapsProvider.html index 06e86ae..011cd87 100644 --- a/docs/classes/BingMapsProvider.html +++ b/docs/classes/BingMapsProvider.html @@ -6,55 +6,55 @@
  • https://msdn.microsoft.com/en-us/library/mt823633.aspx (Directly accessing the Bing Maps tiles)
  • https://www.bingmapsportal.com/
  • -

    Hierarchy

    Index

    Constructors

    Hierarchy

    Index

    Constructors

    Properties

    apiKey: string
    +

    Returns BingMapsProvider

    Properties

    apiKey: string

    Server API access token.

    -
    bounds: number[] = []
    +
    bounds: number[] = []

    Map bounds.

    -
    center: number[] = []
    +
    center: number[] = []

    Map center point.

    -
    format: string = 'jpeg'
    +
    format: string = 'jpeg'

    Map image tile format, the formats available are:

    • gif: Use GIF image format.
    • jpeg: Use JPEG image format. JPEG format is the default for Road, Aerial and AerialWithLabels imagery.
    • png: Use PNG image format. PNG is the default format for OrdnanceSurvey imagery.
    -
    mapSize: number = 512
    +
    mapSize: number = 512

    Size of the map tiles.

    -
    maxZoom: number = 19
    +
    maxZoom: number = 19

    Maximum zoom level allowed by the provider.

    -
    minZoom: number = 1
    +
    minZoom: number = 1

    Minimum zoom level allowed by the provider.

    -
    name: string = ''
    +
    name: string = ''

    Name of the map provider

    -
    subdomain: string = 't1'
    +
    subdomain: string = 't1'

    Tile server subdomain.

    -
    type: string
    +
    type: string

    The type of the map used.

    -
    ADDRESS: string = 'https://dev.virtualearth.net'
    +
    ADDRESS: string = 'https://dev.virtualearth.net'

    Base address of the bing map provider.

    -
    AERIAL: string = 'a'
    +
    AERIAL: string = 'a'

    Display an aerial view of the map.

    -
    AERIAL_LABELS: string = 'h'
    +
    AERIAL_LABELS: string = 'h'

    Display an aerial view of the map with labels.

    -
    OBLIQUE: string = 'o'
    +
    OBLIQUE: string = 'o'

    Use this value to display a bird's eye (oblique) view of the map.

    -
    OBLIQUE_LABELS: string = 'b'
    +
    OBLIQUE_LABELS: string = 'b'

    Display a bird's eye (oblique) with labels view of the map.

    -
    ROAD: string = 'r'
    +
    ROAD: string = 'r'

    Display a road view of the map.

    -

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>
    • Get a tile for the x, y, zoom based on the provider configuration.

      The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

      -

      Parameters

      • zoom: number
      • x: number
      • y: number

      Returns Promise<any>

    • getMetaData(): void
    • getMetaData(): void
    • quadKey(zoom: number, x: number, y: number): string
    • quadKey(zoom: number, x: number, y: number): string

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/CancelablePromise.html b/docs/classes/CancelablePromise.html index 24a31fc..b155115 100644 --- a/docs/classes/CancelablePromise.html +++ b/docs/classes/CancelablePromise.html @@ -1,48 +1,48 @@ CancelablePromise | geo-three
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class CancelablePromise<T>

    Cancelable promises extend base promises and provide a cancel functionality than can be used to cancel the execution or task of the promise.

    These type of promises can be used to prevent additional processing when the data is not longer required (e.g. HTTP request for data that is not longer necessary)

    -

    Type Parameters

    • T

    Hierarchy

    • CancelablePromise

    Index

    Constructors

    • new CancelablePromise<T>(executor: ((resolve: ((value: T | PromiseLike<T>) => void), reject: ((reason?: any) => void)) => void)): CancelablePromise<T>
    • Type Parameters

      • T

      Parameters

      • executor: ((resolve: ((value: T | PromiseLike<T>) => void), reject: ((reason?: any) => void)) => void)
          • (resolve: ((value: T | PromiseLike<T>) => void), reject: ((reason?: any) => void)): void
          • Parameters

            • resolve: ((value: T | PromiseLike<T>) => void)
                • (value: T | PromiseLike<T>): void
                • Parameters

                  • value: T | PromiseLike<T>

                  Returns void

            • reject: ((reason?: any) => void)
                • (reason?: any): void
                • Parameters

                  • Optional reason: any

                  Returns void

            Returns void

      Returns CancelablePromise<T>

    Properties

    called: boolean = false
    +

    Type Parameters

    • T

    Hierarchy

    • CancelablePromise

    Index

    Constructors

    • new CancelablePromise<T>(executor: ((resolve: ((value: T | PromiseLike<T>) => void), reject: ((reason?: any) => void)) => void)): CancelablePromise<T>
    • Type Parameters

      • T

      Parameters

      • executor: ((resolve: ((value: T | PromiseLike<T>) => void), reject: ((reason?: any) => void)) => void)
          • (resolve: ((value: T | PromiseLike<T>) => void), reject: ((reason?: any) => void)): void
          • Parameters

            • resolve: ((value: T | PromiseLike<T>) => void)
                • (value: T | PromiseLike<T>): void
                • Parameters

                  • value: T | PromiseLike<T>

                  Returns void

            • reject: ((reason?: any) => void)
                • (reason?: any): void
                • Parameters

                  • Optional reason: any

                  Returns void

            Returns void

      Returns CancelablePromise<T>

    Properties

    called: boolean = false

    Flag set true when the resolve or reject method are called.

    -
    fulfilled: boolean = false
    +
    fulfilled: boolean = false

    Flag to indicate if the promise has been fulfilled.

    Promise has ben fulfilled when value/error is set.

    -
    onCancel: (() => void)

    Type declaration

      • (): void
      • Returns void

    onReject: ((error: any) => void)

    Type declaration

      • (error: any): void
      • Parameters

        • error: any

        Returns void

    onResolve: ((value: any) => void)

    Type declaration

      • (value: any): void
      • Parameters

        • value: any

        Returns void

    rejected: boolean = false
    +
    onCancel: (() => void)

    Type declaration

      • (): void
      • Returns void

    onReject: ((error: any) => void)

    Type declaration

      • (error: any): void
      • Parameters

        • error: any

        Returns void

    onResolve: ((value: any) => void)

    Type declaration

      • (value: any): void
      • Parameters

        • value: any

        Returns void

    rejected: boolean = false

    Flag to indicate if the promise was rejected.

    Only set when the promise is fulfilled.

    -
    value: T
    +
    value: T

    Output value of the promise.

    Set with the output value if promise was fulfilled and not rejected.

    Stores the error value if the promise was rejected.

    -

    Methods

    • cancel(): boolean

    Methods

    • cancel(): boolean
    • Executed after the promise is fulfilled.

      Parameters

      • callback: ((value: any) => void)

        Callback to receive the value.

          • (value: any): void
          • Parameters

            • value: any

            Returns void

      Returns CancelablePromise<T>

      Promise for chainning.

      -
    • Wait for a set of promises to finish, creates a promise that waits for all running promises.

      If any of the promises fail it will reject altough some of them may have been completed with success.

      Parameters

      Returns CancelablePromise<any>

      Promise that will resolve when all of the running promises are fullfilled.

      -

    Hierarchy

    Index

    Constructors

    Properties

    apiToken: string
    +

    Hierarchy

    Index

    Constructors

    Properties

    apiToken: string

    Server API access token.

    -
    bounds: number[] = []
    +
    bounds: number[] = []

    Map bounds.

    -
    center: number[] = []
    +
    center: number[] = []

    Map center point.

    -
    format: string = 'png'
    +
    format: string = 'png'

    Map image tile format, the formats available are:

    • png PNG
    • jpg JPG
    -
    mapType: string = 'roadmap'
    +
    mapType: string = 'roadmap'

    The type of base map. This can be one of the following:

    • roadmap: The standard Google Maps painted map tiles.
    • @@ -26,27 +26,27 @@
    • terrain: Shaded relief maps of 3D terrain. When selecting terrain as the map type, you must also include the layerRoadmap layer type (described in the Optional fields section below).
    • streetview: Street View panoramas. See the Street View guide.
    -
    maxZoom: number = 20
    +
    maxZoom: number = 20

    Maximum tile level.

    -
    minZoom: number = 0
    +
    minZoom: number = 0

    Minimum tile level.

    -
    name: string = ''
    +
    name: string = ''

    Name of the map provider

    -
    orientation: number = 0
    +
    orientation: number = 0

    The map orientation in degrees.

    Can be 0, 90, 180 or 270.

    -
    overlay: boolean = false
    +
    overlay: boolean = false

    If true overlays are shown.

    -
    sessionToken: string = null
    +
    sessionToken: string = null

    After the first call a session token is stored.

    The session token is required for subsequent requests for tile and viewport information.

    -

    Methods

    • createSession(): void

    Methods

    • createSession(): void
    • fetchTile(zoom: number, x: number, y: number): Promise<any>
    • fetchTile(zoom: number, x: number, y: number): Promise<any>
    • Get a tile for the x, y, zoom based on the provider configuration.

      The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

      -

      Parameters

      • zoom: number
      • x: number
      • y: number

      Returns Promise<any>

    • getMetaData(): void
    • getMetaData(): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/HeightDebugProvider.html b/docs/classes/HeightDebugProvider.html index 91e8791..40b8b7a 100644 --- a/docs/classes/HeightDebugProvider.html +++ b/docs/classes/HeightDebugProvider.html @@ -1,27 +1,27 @@ HeightDebugProvider | geo-three
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class HeightDebugProvider

    Height debug provider takes a RGB encoded height map from another provider and converts it to a gradient for preview.

    Usefull to preview and compare height of different providers. Can also be usefull to generate grayscale maps to be feed into other libraries (e.g. physics engine).

    -

    Hierarchy

    Index

    Constructors

    Properties

    bounds: number[] = []
    +

    Hierarchy

    Index

    Constructors

    Properties

    bounds: number[] = []

    Map bounds.

    -
    center: number[] = []
    +
    center: number[] = []

    Map center point.

    -
    fromColor: Color = ...
    +
    fromColor: Color = ...

    Initial color to be used for lower values.

    -
    maxZoom: number = 20
    +
    maxZoom: number = 20

    Maximum tile level.

    -
    minZoom: number = 0
    +
    minZoom: number = 0

    Minimum tile level.

    -
    name: string = ''
    +
    name: string = ''

    Name of the map provider

    -
    provider: MapProvider
    +
    provider: MapProvider

    The provider used to retrieve the base RGB information to be debugged.

    -
    toColor: Color = ...
    +
    toColor: Color = ...

    Final color to be used for higher values.

    -

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>
    • Get a tile for the x, y, zoom based on the provider configuration.

      The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

      Parameters

      • zoom: number
      • x: number
      • y: number

      Returns Promise<any>

      Promise with the image obtained for the tile ready to use.

      -
    • getMetaData(): void
    • getMetaData(): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/HereMapsProvider.html b/docs/classes/HereMapsProvider.html index f938e6e..f16f0e1 100644 --- a/docs/classes/HereMapsProvider.html +++ b/docs/classes/HereMapsProvider.html @@ -4,7 +4,7 @@ -

    Hierarchy

    Index

    Constructors

    • new HereMapsProvider(appId: string, appCode: string, style: string, scheme: string, format: string, size: number): HereMapsProvider

    Hierarchy

    Index

    Constructors

    • new HereMapsProvider(appId: string, appCode: string, style: string, scheme: string, format: string, size: number): HereMapsProvider

    Properties

    appCode: string
    +

    Returns HereMapsProvider

    Properties

    appCode: string

    Service application code token.

    -
    appId: string
    +
    appId: string

    Service application access token.

    -
    bounds: number[] = []
    +
    bounds: number[] = []

    Map bounds.

    -
    center: number[] = []
    +
    center: number[] = []

    Map center point.

    -
    format: string
    +
    format: string

    Map image tile format, the formats available are:

    • png True color PNG
    • png8 8 bit indexed PNG
    • jpg JPG at 90% quality
    -
    maxZoom: number = 20
    +
    maxZoom: number = 20

    Maximum tile level.

    -
    minZoom: number = 0
    +
    minZoom: number = 0

    Minimum tile level.

    -
    name: string = ''
    +
    name: string = ''

    Name of the map provider

    -
    scheme: string
    +
    scheme: string

    Specifies the view scheme. A complete list of the supported schemes may be obtained by using the Info resouce.

    • normal.day
    • @@ -49,11 +49,11 @@

    Check the scheme list at https://developer.here.com/documentation/map-tile/topics/resource-info.html

    Be aware that invalid combinations of schemes and tiles are rejected. For all satellite, hybrid and terrain schemes, you need to use the Aerial Tiles base URL instead of the normal one.

    -
    server: number
    +
    server: number

    Server to be used next.

    There are 4 server available in here maps.

    On each request this number is updated.

    -
    size: number
    +
    size: number

    Returned tile map image size.

    The following sizes are supported:

      @@ -61,7 +61,7 @@
    • 512
    • 128 (deprecated, although usage is still accepted)
    -
    style: string
    +
    style: string

    The type of maps to be used.

    • aerial
    • @@ -76,18 +76,18 @@
    • Pano Tiles https://{1-4}.pano.maps.api.here.com
    • Traffic Tiles https://{1-4}.traffic.maps.api.here.com
    -
    version: string
    +
    version: string

    Specifies the map version, either newest or with a hash value.

    -
    PATH: string = '/maptile/2.1/'
    +
    PATH: string = '/maptile/2.1/'

    Path to map tile API.

    Version of the api is fixed 2.1.

    -

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>
    • Get a tile for the x, y, zoom based on the provider configuration.

      The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

      -

      Parameters

      • zoom: number
      • x: number
      • y: number

      Returns Promise<any>

    • getMetaData(): void
    • getMetaData(): void
    • nextServer(): void
    • nextServer(): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/LODFrustum.html b/docs/classes/LODFrustum.html index c268d7e..bf2c8b8 100644 --- a/docs/classes/LODFrustum.html +++ b/docs/classes/LODFrustum.html @@ -1,16 +1,16 @@ LODFrustum | geo-three
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class LODFrustum

    Check the planar distance between the nodes center and the view position.

    Only subdivides elements inside of the camera frustum.

    -

    Hierarchy

    Index

    Constructors

    • new LODFrustum(subdivideDistance?: number, simplifyDistance?: number): LODFrustum

    Properties

    pointOnly: boolean = false
    +

    Hierarchy

    Index

    Constructors

    • new LODFrustum(subdivideDistance?: number, simplifyDistance?: number): LODFrustum

    Properties

    pointOnly: boolean = false

    If set true only the center point of the object is considered.

    Otherwise the full bouding box of the objects are considered.

    -
    simplifyDistance: number
    +
    simplifyDistance: number

    Distance to simplify the tiles.

    -
    subdivideDistance: number
    +
    subdivideDistance: number

    Distance to subdivide the tiles.

    -
    testCenter: boolean = true
    +
    testCenter: boolean = true

    If true only the central point of the plane geometry will be used

    Otherwise the object bouding sphere will be tested, providing better results for nodes on frustum edge but will lower performance.

    -

    Methods

    • updateLOD(view: MapView, camera: Camera, renderer: WebGLRenderer, scene: Object3D<Event>): void

    Methods

    • updateLOD(view: MapView, camera: Camera, renderer: WebGLRenderer, scene: Object3D<Event>): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/LODRadial.html b/docs/classes/LODRadial.html index e559dd1..50a3cab 100644 --- a/docs/classes/LODRadial.html +++ b/docs/classes/LODRadial.html @@ -1,10 +1,10 @@ LODRadial | geo-three
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class LODRadial

    Check the planar distance between the nodes center and the view position.

    Distance is adjusted with the node level, more consistent results since every node is considered.

    -

    Hierarchy

    Implements

    Index

    Constructors

    • new LODRadial(subdivideDistance?: number, simplifyDistance?: number): LODRadial

    Properties

    simplifyDistance: number
    +

    Hierarchy

    Implements

    Index

    Constructors

    • new LODRadial(subdivideDistance?: number, simplifyDistance?: number): LODRadial

    Properties

    simplifyDistance: number

    Minimum ditance to simplify far away nodes that are subdivided.

    -
    subdivideDistance: number
    +
    subdivideDistance: number

    Minimum ditance to subdivide nodes.

    -

    Methods

    • updateLOD(view: MapView, camera: Camera, renderer: WebGLRenderer, scene: Object3D<Event>): void

    Methods

    • updateLOD(view: MapView, camera: Camera, renderer: WebGLRenderer, scene: Object3D<Event>): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/LODRaycast.html b/docs/classes/LODRaycast.html index 4333b17..02eff88 100644 --- a/docs/classes/LODRaycast.html +++ b/docs/classes/LODRaycast.html @@ -1,24 +1,24 @@ LODRaycast | geo-three
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class LODRaycast

    Use random raycasting to randomly pick n objects to be tested on screen space.

    Overall the fastest solution but does not include out of screen objects.

    -

    Hierarchy

    • LODRaycast

    Implements

    Index

    Constructors

    Properties

    mouse: Vector2 = ...
    +

    Hierarchy

    • LODRaycast

    Implements

    Index

    Constructors

    Properties

    mouse: Vector2 = ...

    Normalized mouse coordinates.

    -
    powerDistance: boolean = false
    +
    powerDistance: boolean = false

    Consider the distance powered to level of the node.

    -
    raycaster: Raycaster = ...
    +
    raycaster: Raycaster = ...

    Raycaster object used to cast rays into the world and check for hits.

    -
    scaleDistance: boolean = true
    +
    scaleDistance: boolean = true

    Consider the scale of the node when calculating the distance.

    If distance is not considered threshold values should be absolute distances.

    -
    subdivisionRays: number = 1
    +
    subdivisionRays: number = 1

    Number of rays used to test nodes and subdivide the map.

    N rays are cast each frame dependeing on this value to check distance to the visible map nodes. A single ray should be enough for must scenarios.

    -
    thresholdDown: number = 0.15
    +
    thresholdDown: number = 0.15

    Threshold to simplify the map tiles.

    Higher value will simplify earlier.

    -
    thresholdUp: number = 0.6
    +
    thresholdUp: number = 0.6

    Threshold to subdivide the map tiles.

    Lower value will subdivide earlier (less zoom required to subdivide).

    -

    Methods

    • updateLOD(view: MapView, camera: Camera, renderer: WebGLRenderer, scene: Object3D<Event>): void

    Methods

    • updateLOD(view: MapView, camera: Camera, renderer: WebGLRenderer, scene: Object3D<Event>): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/MapBoxProvider.html b/docs/classes/MapBoxProvider.html index eba9a3b..44fbc02 100644 --- a/docs/classes/MapBoxProvider.html +++ b/docs/classes/MapBoxProvider.html @@ -4,7 +4,7 @@ -

    Hierarchy

    Index

    Constructors

    • new MapBoxProvider(apiToken?: string, id?: string, mode?: number, format?: string, useHDPI?: boolean, version?: string): MapBoxProvider

    Hierarchy

    Index

    Constructors

    • new MapBoxProvider(apiToken?: string, id?: string, mode?: number, format?: string, useHDPI?: boolean, version?: string): MapBoxProvider

    Properties

    apiToken: string
    +
  • version: string = 'v4'
  • Returns MapBoxProvider

    Properties

    apiToken: string

    Server API access token.

    -
    bounds: number[] = []
    +
    bounds: number[] = []

    Map bounds.

    -
    center: number[] = []
    +
    center: number[] = []

    Map center point.

    -
    format: string
    +
    format: string

    Map image tile format, the formats available are:

    • png True color PNG
    • @@ -33,7 +33,7 @@
    • jpg90 90% quality JPG
    • pngraw Raw png (no interpolation)
    -
    mapId: string
    +
    mapId: string

    Map identifier composed of {username}.{style}

    Some examples of the public mapbox identifiers:

      @@ -43,19 +43,19 @@
    • mapbox.mapbox-traffic-v1
    • mapbox.terrain-rgb
    -
    maxZoom: number = 20
    +
    maxZoom: number = 20

    Maximum tile level.

    -
    minZoom: number = 0
    +
    minZoom: number = 0

    Minimum tile level.

    -
    mode: number
    +
    mode: number

    Map tile access mode

    • MapBoxProvider.STYLE
    • MapBoxProvider.MAP_ID
    -
    name: string = ''
    +
    name: string = ''

    Name of the map provider

    -
    style: string
    +
    style: string

    Map style to be used composed of {username}/{style_id}

    Some example of the syles available:

      @@ -70,23 +70,23 @@
    • mapbox/navigation-guidance-day-v4
    • mapbox/navigation-guidance-night-v4
    -
    useHDPI: boolean
    +
    useHDPI: boolean

    Flag to indicate if should use high resolution tiles

    -
    version: string
    +
    version: string

    Mapbox api version

    • mapbox/navigation-guidance-night-v4
    -
    ADDRESS: string = 'https://api.mapbox.com/'
    +
    ADDRESS: string = 'https://api.mapbox.com/'

    Base adress of the mapbox service.

    -
    MAP_ID: number = 101
    +
    MAP_ID: number = 101

    Access the map data using a map id.

    -
    STYLE: number = 100
    +
    STYLE: number = 100

    Access the map data using a map style.

    -

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>
    • Get a tile for the x, y, zoom based on the provider configuration.

      The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

      -

      Parameters

      • zoom: number
      • x: number
      • y: number

      Returns Promise<any>

    • getMetaData(): void
    • getMetaData(): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/MapHeightNode.html b/docs/classes/MapHeightNode.html index 9ca701b..51e070d 100644 --- a/docs/classes/MapHeightNode.html +++ b/docs/classes/MapHeightNode.html @@ -2,7 +2,7 @@

    Represents a height map tile node that can be subdivided into other height nodes.

    Its important to update match the height of the tile with the neighbors nodes edge heights to ensure proper continuity of the surface.

    The height node is designed to use MapBox elevation tile encoded data as described in https://www.mapbox.com/help/access-elevation-data/

    -

    Hierarchy

    Index

    Constructors

    • new MapHeightNode(parentNode?: MapHeightNode, mapView?: MapView, location?: number, level?: number, x?: number, y?: number, geometry?: BufferGeometry, material?: Material): MapHeightNode

    Hierarchy

    Index

    Constructors

    • new MapHeightNode(parentNode?: MapHeightNode, mapView?: MapView, location?: number, level?: number, x?: number, y?: number, geometry?: BufferGeometry, material?: Material): MapHeightNode
    children: Object3D<Event>[]

    Array with object's children.

    default

    []

    -
    childrenCache: Object3D<Event>[] = null
    +
    childrenCache: Object3D<Event>[] = null

    Cache with the children objects created from subdivision.

    Used to avoid recreate object after simplification and subdivision.

    The default value is null. Only used if "cacheTiles" is set to true.

    @@ -40,34 +40,34 @@ transparent texture with alphaTest, you must specify a customDepthMaterial for proper shadows.

    customDistanceMaterial: Material

    Same as customDepthMaterial, but used with PointLight.

    -
    disposed: boolean = false
    +
    disposed: boolean = false

    Flag to indicate if the map node was disposed.

    When a map node is disposed its resources are dealocated to save memory.

    frustumCulled: boolean

    When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. If set to false the object gets rendered every frame even if it is not in the frustum of the camera.

    default

    true

    -
    geometry: BufferGeometry
    geometryNormals: boolean = false
    +
    geometry: BufferGeometry
    geometryNormals: boolean = false

    If true the tiles will compute their normals.

    -
    geometrySize: number = 16
    +
    geometrySize: number = 16

    Size of the grid of the geometry displayed on the scene for each tile.

    -
    heightLoaded: boolean = false
    +
    heightLoaded: boolean = false

    Flag indicating if the tile height data was loaded.

    id: number

    Unique number of this object instance.

    -
    isMesh: boolean = true
    +
    isMesh: true = true

    Flag to check if the node is a mesh by the renderer.

    Used to toggle the visibility of the node. The renderer skips the node rendering if this is set false.

    isObject3D: true

    Used to check whether this or derived classes are Object3Ds. Default is true. You should not change this, as it is used internally for optimisation.

    layers: Layers
    default

    new THREE.Layers()

    -
    level: number
    +
    level: number

    Tile level of this node.

    -
    location: number
    +
    location: number

    Index of the map node in the quad-tree parent node.

    Position in the tree parent, can be topLeft, topRight, bottomLeft or bottomRight.

    -
    mapView: MapView = null
    +
    mapView: MapView = null

    The map view object where the node is placed.

    material: Material | Material[]
    matrix: Matrix4

    Local transform.

    @@ -90,7 +90,7 @@
    morphTargetDictionary?: {}

    Type declaration

    • [key: string]: number
    morphTargetInfluences?: number[]
    name: string

    Optional name of the object (doesn't need to be unique).

    default

    ''

    -
    nodesLoaded: number = 0
    +
    nodesLoaded: number = 0

    Indicates how many children nodes are loaded.

    The child on become visible once all of them are loaded.

    normalMatrix: Matrix3
    default

    new THREE.Matrix3()

    @@ -105,7 +105,7 @@

    Parameters

    • renderer: WebGLRenderer
    • scene: Scene
    • camera: Camera
    • geometry: BufferGeometry
    • material: Material
    • group: Group

    Returns void

    parent: Object3D<Event>

    Object's parent in the scene graph.

    default

    null

    -
    parentNode: MapNode = null
    +
    parentNode: MapNode = null

    Parent node (from an upper tile level).

    position: Vector3

    Object's local position.

    @@ -127,10 +127,10 @@
    scale: Vector3

    Object's local scale.

    default

    new THREE.Vector3()

    -
    subdivided: boolean = false
    +
    subdivided: boolean = false

    Variable to check if the node is subdivided.

    To avoid bad visibility changes on node load.

    -
    textureLoaded: boolean = false
    +
    textureLoaded: boolean = false

    Flag indicating if the tile texture was loaded.

    type: string
    up: Vector3

    Up direction.

    @@ -141,22 +141,22 @@

    Type declaration

    • [key: string]: any
    uuid: string
    visible: boolean

    Object gets rendered if true.

    default

    true

    -
    x: number
    +
    x: number

    Tile x position.

    -
    y: number
    +
    y: number

    Tile y position.

    -
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = MapPlaneNode.geometry
    +
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = MapPlaneNode.geometry

    Base geometry shared across all the nodes.

    -
    baseScale: Vector3 = ...
    +
    baseScale: Vector3 = ...

    Scale to apply to each node.

    -
    childrens: number = 4
    +
    childrens: number = 4

    How many children each branch of the tree has.

    For a quad-tree this value is 4.

    -
    defaultTexture: Texture = ...
    +
    defaultTexture: Texture = ...

    Default texture used when texture fails to load.

    -
    geometry: BufferGeometry = ...
    +
    geometry: BufferGeometry = ...

    Map node plane geometry.

    -
    tileSize: number = 256
    +
    tileSize: number = 256

    Original tile size of the images retrieved from the height provider.

    Methods

    • Adds object as child of this object.

      @@ -175,12 +175,12 @@

      Parameters

      • object: Object3D<Event>

      Returns MapHeightNode

    • Removes all child objects.

      Returns MapHeightNode

    • Parameters

      • Optional recursive: boolean

      Returns MapHeightNode

    • createChildNodes(): void

    Returns MapHeightNode

    • createChildNodes(): void
    • dispatchEvent(event: Event): void
    • Fire an event type.

      -

      Parameters

      • event: Event

      Returns void

    • dispose(): void
    • dispose(): void
    • getObjectById(id: number): Object3D<Event>
    • @@ -197,13 +197,13 @@

      The type of event to listen to.

    • listener: EventListener<Event, T, MapHeightNode>

      The function that gets called when the event is fired.

      -

    Returns boolean

    • initialize(): Promise<void>

    Returns boolean

    • initialize(): Promise<void>
    • Initialize resources that require access to data from the MapView.

      Called automatically by the constructor for child nodes and MapView when a root node is attached to it.

      -

      Returns Promise<void>

    • loadData(): Promise<void>
    • loadData(): Promise<void>
    • Load tile texture from the server.

      Aditionally in this height node it loads elevation data from the height provider and generate the appropiate maps.

      -

      Returns Promise<void>

    • loadHeightGeometry(): Promise<any>
    • loadHeightGeometry(): Promise<any>
    • Load height texture from the server and create a geometry to match it.

      Returns Promise<any>

      Returns a promise indicating when the geometry generation has finished.

    • localToWorld(vector: Vector3): Vector3
    • @@ -216,10 +216,10 @@ This method does not support objects having non-uniformly-scaled parent(s).

      Parameters

      • vector: Vector3

        A world vector to look at.

        -

      Returns void

    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

    • nodeReady(): void

    Returns void

  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

    • nodeReady(): void
    • raycast(raycaster: Raycaster, intersects: Intersection<Object3D<Event>>[]): void
    • raycast(raycaster: Raycaster, intersects: Intersection<Object3D<Event>>[]): void
    • Removes object as child of this object.

      @@ -275,11 +275,11 @@

      Copy the given quaternion into .quaternion.

      Parameters

      • q: Quaternion

        normalized Quaternion

        -

      Returns void

    • simplify(): void

    Returns void

    • simplify(): void
    • Simplify node, remove all children from node, store them in cache.

      Reset the subdivided flag and restore the visibility.

      This base method assumes that the node implementation is based off Mesh and that the isMesh property is used to toggle visibility.

      -

      Returns void

    • subdivide(): void
    • subdivide(): void
    • Subdivide node,check the maximum depth allowed for the tile provider.

      Uses the createChildNodes() method to actually create the child nodes that represent the next tree level.

      Returns void

    • toJSON(meta?: { geometries: any; images: any; materials: any; textures: any }): any
    • Parameters

      • Optional meta: { geometries: any; images: any; materials: any; textures: any }
        • geometries: any
        • images: any
        • materials: any
        • textures: any

      Returns any

    • diff --git a/docs/classes/MapHeightNodeShader.html b/docs/classes/MapHeightNodeShader.html index 93af81f..e626df3 100644 --- a/docs/classes/MapHeightNodeShader.html +++ b/docs/classes/MapHeightNodeShader.html @@ -7,7 +7,7 @@
      param level

      Zoom level in the tile tree of the node.

      param x

      X position of the node in the tile tree.

      param y

      Y position of the node in the tile tree.

      -

    Hierarchy

    Index

    Constructors

    Hierarchy

    Index

    Constructors

    Properties

    animations: AnimationClip[]

    Array with animation clips.

    @@ -18,7 +18,7 @@
    children: Object3D<Event>[]

    Array with object's children.

    default

    []

    -
    childrenCache: Object3D<Event>[] = null
    +
    childrenCache: Object3D<Event>[] = null

    Cache with the children objects created from subdivision.

    Used to avoid recreate object after simplification and subdivision.

    The default value is null. Only used if "cacheTiles" is set to true.

    @@ -29,34 +29,34 @@ transparent texture with alphaTest, you must specify a customDepthMaterial for proper shadows.

    customDistanceMaterial: Material

    Same as customDepthMaterial, but used with PointLight.

    -
    disposed: boolean = false
    +
    disposed: boolean = false

    Flag to indicate if the map node was disposed.

    When a map node is disposed its resources are dealocated to save memory.

    frustumCulled: boolean

    When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. If set to false the object gets rendered every frame even if it is not in the frustum of the camera.

    default

    true

    -
    geometry: BufferGeometry
    geometryNormals: boolean = false
    +
    geometry: BufferGeometry
    geometryNormals: boolean = false

    If true the tiles will compute their normals.

    -
    geometrySize: number = 16
    +
    geometrySize: number = 16

    Size of the grid of the geometry displayed on the scene for each tile.

    -
    heightLoaded: boolean = false
    +
    heightLoaded: boolean = false

    Flag indicating if the tile height data was loaded.

    id: number

    Unique number of this object instance.

    -
    isMesh: boolean = true
    +
    isMesh: true = true

    Flag to check if the node is a mesh by the renderer.

    Used to toggle the visibility of the node. The renderer skips the node rendering if this is set false.

    isObject3D: true

    Used to check whether this or derived classes are Object3Ds. Default is true. You should not change this, as it is used internally for optimisation.

    layers: Layers
    default

    new THREE.Layers()

    -
    level: number
    +
    level: number

    Tile level of this node.

    -
    location: number
    +
    location: number

    Index of the map node in the quad-tree parent node.

    Position in the tree parent, can be topLeft, topRight, bottomLeft or bottomRight.

    -
    mapView: MapView = null
    +
    mapView: MapView = null

    The map view object where the node is placed.

    material: Material | Material[]
    matrix: Matrix4

    Local transform.

    @@ -79,7 +79,7 @@
    morphTargetDictionary?: {}

    Type declaration

    • [key: string]: number
    morphTargetInfluences?: number[]
    name: string

    Optional name of the object (doesn't need to be unique).

    default

    ''

    -
    nodesLoaded: number = 0
    +
    nodesLoaded: number = 0

    Indicates how many children nodes are loaded.

    The child on become visible once all of them are loaded.

    normalMatrix: Matrix3
    default

    new THREE.Matrix3()

    @@ -90,7 +90,7 @@

    Parameters

    • renderer: WebGLRenderer
    • scene: Scene
    • camera: Camera
    • geometry: BufferGeometry
    • material: Material
    • group: Group

    Returns void

    parent: Object3D<Event>

    Object's parent in the scene graph.

    default

    null

    -
    parentNode: MapNode = null
    +
    parentNode: MapNode = null

    Parent node (from an upper tile level).

    position: Vector3

    Object's local position.

    @@ -112,10 +112,10 @@
    scale: Vector3

    Object's local scale.

    default

    new THREE.Vector3()

    -
    subdivided: boolean = false
    +
    subdivided: boolean = false

    Variable to check if the node is subdivided.

    To avoid bad visibility changes on node load.

    -
    textureLoaded: boolean = false
    +
    textureLoaded: boolean = false

    Flag indicating if the tile texture was loaded.

    type: string
    up: Vector3

    Up direction.

    @@ -126,27 +126,27 @@

    Type declaration

    • [key: string]: any
    uuid: string
    visible: boolean

    Object gets rendered if true.

    default

    true

    -
    x: number
    +
    x: number

    Tile x position.

    -
    y: number
    +
    y: number

    Tile y position.

    -
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = MapPlaneNode.geometry
    +
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = MapPlaneNode.geometry

    Base geometry of the map node.

    -
    baseScale: Vector3 = ...
    +
    baseScale: Vector3 = ...

    Base scale of the map node.

    -
    childrens: number = 4
    +
    childrens: number = 4

    How many children each branch of the tree has.

    For a quad-tree this value is 4.

    -
    defaultHeightTexture: Texture = ...
    +
    defaultHeightTexture: Texture = ...

    Default height texture applied when tile load fails.

    This tile sets the height to sea level where it is common for the data sources to be missing height data.

    -
    defaultTexture: Texture = ...
    +
    defaultTexture: Texture = ...

    Default texture used when texture fails to load.

    -
    geometry: BufferGeometry = ...
    +
    geometry: BufferGeometry = ...

    Map node plane geometry.

    -
    geometrySize: number = 256
    +
    geometrySize: number = 256

    Size of the grid of the geometry displayed on the scene for each tile.

    -
    tileSize: number = 256
    +
    tileSize: number = 256

    Original tile size of the images retrieved from the height provider.

    Methods

    • Adds object as child of this object.

      @@ -165,12 +165,12 @@

      Parameters

      • object: Object3D<Event>

      Returns MapHeightNodeShader

    • createChildNodes(): void

    Returns MapHeightNodeShader

    • createChildNodes(): void
    • dispatchEvent(event: Event): void
    • Fire an event type.

      -

      Parameters

      • event: Event

      Returns void

    • dispose(): void
    • dispose(): void
    • getObjectById(id: number): Object3D<Event>
    • @@ -187,13 +187,13 @@

      The type of event to listen to.

    • listener: EventListener<Event, T, MapHeightNodeShader>

      The function that gets called when the event is fired.

      -

    Returns boolean

    • initialize(): Promise<void>

    Returns boolean

    • initialize(): Promise<void>
    • Initialize resources that require access to data from the MapView.

      Called automatically by the constructor for child nodes and MapView when a root node is attached to it.

      -

      Returns Promise<void>

    • loadData(): Promise<void>
    • loadData(): Promise<void>
    • loadHeightGeometry(): Promise<void>
    • loadHeightGeometry(): Promise<void>
    • localToWorld(vector: Vector3): Vector3
    • @@ -206,10 +206,10 @@ This method does not support objects having non-uniformly-scaled parent(s).

      Parameters

      • vector: Vector3

        A world vector to look at.

        -

      Returns void

    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

    • nodeReady(): void

    Returns void

  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

    • nodeReady(): void
    • raycast(raycaster: Raycaster, intersects: Intersection<Object3D<Event>>[]): void
    • raycast(raycaster: Raycaster, intersects: Intersection<Object3D<Event>>[]): void
    • Overrides normal raycasting, to avoid raycasting when isMesh is set to false.

      Switches the geometry for a simpler one for faster raycasting.

      Parameters

      • raycaster: Raycaster
      • intersects: Intersection<Object3D<Event>>[]

      Returns void

    • @@ -266,11 +266,11 @@

      Copy the given quaternion into .quaternion.

      Parameters

      • q: Quaternion

        normalized Quaternion

        -

      Returns void

    • simplify(): void

    Returns void

    • simplify(): void
    • Simplify node, remove all children from node, store them in cache.

      Reset the subdivided flag and restore the visibility.

      This base method assumes that the node implementation is based off Mesh and that the isMesh property is used to toggle visibility.

      -

      Returns void

    • subdivide(): void
    • subdivide(): void
    • Subdivide node,check the maximum depth allowed for the tile provider.

      Uses the createChildNodes() method to actually create the child nodes that represent the next tree level.

      Returns void

    • toJSON(meta?: { geometries: any; images: any; materials: any; textures: any }): any
    • Parameters

      • Optional meta: { geometries: any; images: any; materials: any; textures: any }
        • geometries: any
        • images: any
        • materials: any
        • textures: any

      Returns any

    • @@ -305,7 +305,7 @@

      Updates the vector from world space to local space.

      Parameters

      • vector: Vector3

        A world vector.

        -

      Returns Vector3

    • prepareMaterial(material: Material): Material

    Returns Vector3

    • prepareMaterial(material: Material): Material
    • Prepare the three.js material to be used in the map tile.

      Parameters

      • material: Material

        Material to be transformed.

        diff --git a/docs/classes/MapNode.html b/docs/classes/MapNode.html index 80a2d96..c964b5d 100644 --- a/docs/classes/MapNode.html +++ b/docs/classes/MapNode.html @@ -2,7 +2,7 @@

        Represents a map tile node inside of the tiles quad-tree

        Each map node can be subdivided into other nodes.

        It is intended to be used as a base class for other map node implementations.

        -

    Hierarchy

    Index

    Constructors

    • new MapNode(parentNode?: MapNode, mapView?: MapView, location?: number, level?: number, x?: number, y?: number, geometry?: BufferGeometry, material?: Material): MapNode
    • Parameters

      • parentNode: MapNode = null
      • mapView: MapView = null
      • location: number = QuadTreePosition.root
      • level: number = 0
      • x: number = 0
      • y: number = 0
      • geometry: BufferGeometry = null
      • material: Material = null

      Returns MapNode

    Properties

    animations: AnimationClip[]
    +

    Hierarchy

    Index

    Constructors

    • new MapNode(parentNode?: MapNode, mapView?: MapView, location?: number, level?: number, x?: number, y?: number, geometry?: BufferGeometry, material?: Material): MapNode
    • Parameters

      • parentNode: MapNode = null
      • mapView: MapView = null
      • location: number = QuadTreePosition.root
      • level: number = 0
      • x: number = 0
      • y: number = 0
      • geometry: BufferGeometry = null
      • material: Material = null

      Returns MapNode

    Properties

    animations: AnimationClip[]

    Array with animation clips.

    default

    []

    castShadow: boolean
    @@ -11,7 +11,7 @@
    children: Object3D<Event>[]

    Array with object's children.

    default

    []

    -
    childrenCache: Object3D<Event>[] = null
    +
    childrenCache: Object3D<Event>[] = null

    Cache with the children objects created from subdivision.

    Used to avoid recreate object after simplification and subdivision.

    The default value is null. Only used if "cacheTiles" is set to true.

    @@ -22,7 +22,7 @@ transparent texture with alphaTest, you must specify a customDepthMaterial for proper shadows.

    customDistanceMaterial: Material

    Same as customDepthMaterial, but used with PointLight.

    -
    disposed: boolean = false
    +
    disposed: boolean = false

    Flag to indicate if the map node was disposed.

    When a map node is disposed its resources are dealocated to save memory.

    frustumCulled: boolean
    @@ -31,19 +31,19 @@
    default

    true

    geometry: BufferGeometry
    id: number

    Unique number of this object instance.

    -
    isMesh: boolean = true
    +
    isMesh: true = true

    Flag to check if the node is a mesh by the renderer.

    Used to toggle the visibility of the node. The renderer skips the node rendering if this is set false.

    isObject3D: true

    Used to check whether this or derived classes are Object3Ds. Default is true. You should not change this, as it is used internally for optimisation.

    layers: Layers
    default

    new THREE.Layers()

    -
    level: number
    +
    level: number

    Tile level of this node.

    -
    location: number
    +
    location: number

    Index of the map node in the quad-tree parent node.

    Position in the tree parent, can be topLeft, topRight, bottomLeft or bottomRight.

    -
    mapView: MapView = null
    +
    mapView: MapView = null

    The map view object where the node is placed.

    material: Material | Material[]
    matrix: Matrix4

    Local transform.

    @@ -66,7 +66,7 @@
    morphTargetDictionary?: {}

    Type declaration

    • [key: string]: number
    morphTargetInfluences?: number[]
    name: string

    Optional name of the object (doesn't need to be unique).

    default

    ''

    -
    nodesLoaded: number = 0
    +
    nodesLoaded: number = 0

    Indicates how many children nodes are loaded.

    The child on become visible once all of them are loaded.

    normalMatrix: Matrix3
    default

    new THREE.Matrix3()

    @@ -77,7 +77,7 @@

    Parameters

    • renderer: WebGLRenderer
    • scene: Scene
    • camera: Camera
    • geometry: BufferGeometry
    • material: Material
    • group: Group

    Returns void

    parent: Object3D<Event>

    Object's parent in the scene graph.

    default

    null

    -
    parentNode: MapNode = null
    +
    parentNode: MapNode = null

    Parent node (from an upper tile level).

    position: Vector3

    Object's local position.

    @@ -99,7 +99,7 @@
    scale: Vector3

    Object's local scale.

    default

    new THREE.Vector3()

    -
    subdivided: boolean = false
    +
    subdivided: boolean = false

    Variable to check if the node is subdivided.

    To avoid bad visibility changes on node load.

    type: string
    up: Vector3
    @@ -111,19 +111,19 @@

    Type declaration

    • [key: string]: any
    uuid: string
    visible: boolean

    Object gets rendered if true.

    default

    true

    -
    x: number
    +
    x: number

    Tile x position.

    -
    y: number
    +
    y: number

    Tile y position.

    -
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = null
    +
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = null

    Base geometry is attached to the map viewer object.

    It should have the full size of the world so that operations over the MapView bounding box/sphere work correctly.

    -
    baseScale: Vector3 = null
    +
    baseScale: Vector3 = null

    Base scale applied to the map viewer object.

    -
    childrens: number = 4
    +
    childrens: number = 4

    How many children each branch of the tree has.

    For a quad-tree this value is 4.

    -
    defaultTexture: Texture = ...
    +
    defaultTexture: Texture = ...

    Default texture used when texture fails to load.

    Methods

    • add(...object: Object3D<Event>[]): MapNode
    • Adds object as child of this object.

      @@ -142,12 +142,12 @@

      Parameters

      • object: Object3D<Event>

      Returns MapNode

    • Removes all child objects.

      Returns MapNode

    • clone(recursive?: boolean): MapNode
    • Parameters

      • Optional recursive: boolean

      Returns MapNode

    • Parameters

      • source: MapNode
      • Optional recursive: boolean
        -

      Returns MapNode

    • createChildNodes(): void

    Returns MapNode

    • createChildNodes(): void
    • Create the child nodes to represent the next tree level.

      These nodes should be added to the object, and their transformations matrix should be updated.

      Returns void

    • dispatchEvent(event: Event): void
    • Fire an event type.

      -

      Parameters

      • event: Event

      Returns void

    • dispose(): void
    • dispose(): void
    • Dispose the map node and its resources.

      Should cancel all pending processing for the node.

      Returns void

    • getObjectById(id: number): Object3D<Event>
    • @@ -164,10 +164,10 @@

      The type of event to listen to.

    • listener: EventListener<Event, T, MapNode>

      The function that gets called when the event is fired.

      -

    Returns boolean

    • initialize(): Promise<void>

    Returns boolean

    • initialize(): Promise<void>
    • Initialize resources that require access to data from the MapView.

      Called automatically by the constructor for child nodes and MapView when a root node is attached to it.

      -

      Returns Promise<void>

    • loadData(): Promise<void>
    • loadData(): Promise<void>
    • Load tile texture from the server.

      This base method assumes the existence of a material attribute with a map texture.

      Returns Promise<void>

    • localToWorld(vector: Vector3): Vector3
    • @@ -180,7 +180,7 @@ This method does not support objects having non-uniformly-scaled parent(s).

      Parameters

      • vector: Vector3

        A world vector to look at.

        -

      Returns void

    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

    • nodeReady(): void

    Returns void

  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

    • nodeReady(): void
    • Increment the child loaded counter.

      Should be called after a map node is ready for display.

      Returns void

    • raycast(raycaster: Raycaster, intersects: Intersection<Object3D<Event>>[]): void
    • Parameters

      • raycaster: Raycaster
      • intersects: Intersection<Object3D<Event>>[]

      Returns void

    • remove(...object: Object3D<Event>[]): MapNode
    • @@ -237,11 +237,11 @@

      Copy the given quaternion into .quaternion.

      Parameters

      • q: Quaternion

        normalized Quaternion

        -

      Returns void

    • simplify(): void

    Returns void

    • simplify(): void
    • Simplify node, remove all children from node, store them in cache.

      Reset the subdivided flag and restore the visibility.

      This base method assumes that the node implementation is based off Mesh and that the isMesh property is used to toggle visibility.

      -

      Returns void

    • subdivide(): void
    • subdivide(): void
    • Subdivide node,check the maximum depth allowed for the tile provider.

      Uses the createChildNodes() method to actually create the child nodes that represent the next tree level.

      Returns void

    • toJSON(meta?: { geometries: any; images: any; materials: any; textures: any }): any
    • Parameters

      • Optional meta: { geometries: any; images: any; materials: any; textures: any }
        • geometries: any
        • images: any
        • materials: any
        • textures: any

      Returns any

    • translateOnAxis(axis: Vector3, distance: number): MapNode
    • diff --git a/docs/classes/MapNodeGeometry.html b/docs/classes/MapNodeGeometry.html index c5a1b91..b25cf17 100644 --- a/docs/classes/MapNodeGeometry.html +++ b/docs/classes/MapNodeGeometry.html @@ -3,7 +3,7 @@

      Consists of a XZ plane with normals facing +Y.

      The geometry points start in XZ plane that can be manipulated for example for height adjustment.

      Geometry can also include skirts to mask off missalignments between tiles.

      -

    Hierarchy

    • BufferGeometry
      • MapNodeGeometry

    Index

    Constructors

    • new MapNodeGeometry(width?: number, height?: number, widthSegments?: number, heightSegments?: number, skirt?: boolean, skirtDepth?: number): MapNodeGeometry

    Hierarchy

    • BufferGeometry
      • MapNodeGeometry

    Index

    Constructors

    • new MapNodeGeometry(width?: number, height?: number, widthSegments?: number, heightSegments?: number, skirt?: boolean, skirtDepth?: number): MapNodeGeometry
    • Map node geometry constructor.

      Parameters

      • width: number = 1.0

        Width of the node.

        @@ -70,4 +70,4 @@

        The type of the listener that gets removed.

      • listener: EventListener<Event, T, MapNodeGeometry>

        The listener function that gets removed.

        -

      Returns void

    • rotateX(angle: number): BufferGeometry
    • Parameters

      • angle: number

      Returns BufferGeometry

    • rotateY(angle: number): BufferGeometry
    • Parameters

      • angle: number

      Returns BufferGeometry

    • rotateZ(angle: number): BufferGeometry
    • Parameters

      • angle: number

      Returns BufferGeometry

    • scale(x: number, y: number, z: number): BufferGeometry
    • Parameters

      • x: number
      • y: number
      • z: number

      Returns BufferGeometry

    • setAttribute(name: BuiltinShaderAttributeName | string & {}, attribute: BufferAttribute | InterleavedBufferAttribute): BufferGeometry
    • Parameters

      • name: BuiltinShaderAttributeName | string & {}
      • attribute: BufferAttribute | InterleavedBufferAttribute

      Returns BufferGeometry

    • setDrawRange(start: number, count: number): void
    • Parameters

      • start: number
      • count: number

      Returns void

    • setFromPoints(points: Vector3[] | Vector2[]): BufferGeometry
    • Parameters

      • points: Vector3[] | Vector2[]

      Returns BufferGeometry

    • setIndex(index: number[] | BufferAttribute): BufferGeometry
    • Parameters

      • index: number[] | BufferAttribute

      Returns BufferGeometry

    • toJSON(): any
    • Returns any

    • toNonIndexed(): BufferGeometry
    • Returns BufferGeometry

    • translate(x: number, y: number, z: number): BufferGeometry
    • Parameters

      • x: number
      • y: number
      • z: number

      Returns BufferGeometry

    • buildPlane(width?: number, height?: number, widthSegments?: number, heightSegments?: number, indices: number[], vertices: number[], normals: number[], uvs: number[]): void
    • Parameters

      • width: number = 1.0
      • height: number = 1.0
      • widthSegments: number = 1.0
      • heightSegments: number = 1.0
      • indices: number[]
      • vertices: number[]
      • normals: number[]
      • uvs: number[]

      Returns void

    • buildSkirt(width?: number, height?: number, widthSegments?: number, heightSegments?: number, skirtDepth: number, indices: number[], vertices: number[], normals: number[], uvs: number[]): void
    • Parameters

      • width: number = 1.0
      • height: number = 1.0
      • widthSegments: number = 1.0
      • heightSegments: number = 1.0
      • skirtDepth: number
      • indices: number[]
      • vertices: number[]
      • normals: number[]
      • uvs: number[]

      Returns void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +

    Returns void

    • rotateX(angle: number): BufferGeometry
    • Parameters

      • angle: number

      Returns BufferGeometry

    • rotateY(angle: number): BufferGeometry
    • Parameters

      • angle: number

      Returns BufferGeometry

    • rotateZ(angle: number): BufferGeometry
    • Parameters

      • angle: number

      Returns BufferGeometry

    • scale(x: number, y: number, z: number): BufferGeometry
    • Parameters

      • x: number
      • y: number
      • z: number

      Returns BufferGeometry

    • setAttribute(name: BuiltinShaderAttributeName | string & {}, attribute: BufferAttribute | InterleavedBufferAttribute): BufferGeometry
    • Parameters

      • name: BuiltinShaderAttributeName | string & {}
      • attribute: BufferAttribute | InterleavedBufferAttribute

      Returns BufferGeometry

    • setDrawRange(start: number, count: number): void
    • Parameters

      • start: number
      • count: number

      Returns void

    • setFromPoints(points: Vector3[] | Vector2[]): BufferGeometry
    • Parameters

      • points: Vector3[] | Vector2[]

      Returns BufferGeometry

    • setIndex(index: number[] | BufferAttribute): BufferGeometry
    • Parameters

      • index: number[] | BufferAttribute

      Returns BufferGeometry

    • toJSON(): any
    • Returns any

    • toNonIndexed(): BufferGeometry
    • Returns BufferGeometry

    • translate(x: number, y: number, z: number): BufferGeometry
    • Parameters

      • x: number
      • y: number
      • z: number

      Returns BufferGeometry

    • buildPlane(width?: number, height?: number, widthSegments?: number, heightSegments?: number, indices: number[], vertices: number[], normals: number[], uvs: number[]): void
    • Parameters

      • width: number = 1.0
      • height: number = 1.0
      • widthSegments: number = 1.0
      • heightSegments: number = 1.0
      • indices: number[]
      • vertices: number[]
      • normals: number[]
      • uvs: number[]

      Returns void

    • buildSkirt(width?: number, height?: number, widthSegments?: number, heightSegments?: number, skirtDepth: number, indices: number[], vertices: number[], normals: number[], uvs: number[]): void
    • Parameters

      • width: number = 1.0
      • height: number = 1.0
      • widthSegments: number = 1.0
      • heightSegments: number = 1.0
      • skirtDepth: number
      • indices: number[]
      • vertices: number[]
      • normals: number[]
      • uvs: number[]

      Returns void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/MapNodeHeightGeometry.html b/docs/classes/MapNodeHeightGeometry.html index a97eb40..e339fb1 100644 --- a/docs/classes/MapNodeHeightGeometry.html +++ b/docs/classes/MapNodeHeightGeometry.html @@ -1,4 +1,4 @@ -MapNodeHeightGeometry | geo-three
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class MapNodeHeightGeometry

    Hierarchy

    • BufferGeometry
      • MapNodeHeightGeometry

    Index

    Constructors

    • new MapNodeHeightGeometry(width?: number, height?: number, widthSegments?: number, heightSegments?: number, skirt?: boolean, skirtDepth?: number, imageData?: ImageData, calculateNormals?: boolean): MapNodeHeightGeometry
    parent: Object3D<Event>

    Object's parent in the scene graph.

    default

    null

    -
    parentNode: MapNode = null
    +
    parentNode: MapNode = null

    Parent node (from an upper tile level).

    position: Vector3

    Object's local position.

    @@ -97,7 +97,7 @@
    scale: Vector3

    Object's local scale.

    default

    new THREE.Vector3()

    -
    subdivided: boolean = false
    +
    subdivided: boolean = false

    Variable to check if the node is subdivided.

    To avoid bad visibility changes on node load.

    type: string
    up: Vector3
    @@ -109,21 +109,21 @@

    Type declaration

    • [key: string]: any
    uuid: string
    visible: boolean

    Object gets rendered if true.

    default

    true

    -
    x: number
    +
    x: number

    Tile x position.

    -
    y: number
    +
    y: number

    Tile y position.

    -
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = MapPlaneNode.geometry
    +
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = MapPlaneNode.geometry

    Base geometry is attached to the map viewer object.

    It should have the full size of the world so that operations over the MapView bounding box/sphere work correctly.

    -
    baseScale: Vector3 = ...
    +
    baseScale: Vector3 = ...

    Base scale applied to the map viewer object.

    -
    childrens: number = 4
    +
    childrens: number = 4

    How many children each branch of the tree has.

    For a quad-tree this value is 4.

    -
    defaultTexture: Texture = ...
    +
    defaultTexture: Texture = ...

    Default texture used when texture fails to load.

    -
    geometry: BufferGeometry = ...
    +
    geometry: BufferGeometry = ...

    Map node plane geometry.

    Methods

    • Adds object as child of this object.

      @@ -142,12 +142,12 @@

      Parameters

      • object: Object3D<Event>

      Returns MapPlaneNode

    • Removes all child objects.

      Returns MapPlaneNode

    • Parameters

      • Optional recursive: boolean

      Returns MapPlaneNode

    • createChildNodes(): void

    Returns MapPlaneNode

    • createChildNodes(): void
    • dispatchEvent(event: Event): void
    • Fire an event type.

      -

      Parameters

      • event: Event

      Returns void

    • dispose(): void
    • dispose(): void
    • getObjectById(id: number): Object3D<Event>
    • @@ -164,10 +164,10 @@

      The type of event to listen to.

    • listener: EventListener<Event, T, MapPlaneNode>

      The function that gets called when the event is fired.

      -

    Returns boolean

    • initialize(): Promise<void>

    Returns boolean

    • initialize(): Promise<void>
    • Initialize resources that require access to data from the MapView.

      Called automatically by the constructor for child nodes and MapView when a root node is attached to it.

      -

      Returns Promise<void>

    • loadData(): Promise<void>
    • loadData(): Promise<void>
    • localToWorld(vector: Vector3): Vector3
    • @@ -180,10 +180,10 @@ This method does not support objects having non-uniformly-scaled parent(s).

      Parameters

      • vector: Vector3

        A world vector to look at.

        -

      Returns void

    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

    • nodeReady(): void

    Returns void

  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

    • nodeReady(): void
    • raycast(raycaster: Raycaster, intersects: Intersection<Object3D<Event>>[]): void
    • raycast(raycaster: Raycaster, intersects: Intersection<Object3D<Event>>[]): void
    • Overrides normal raycasting, to avoid raycasting when isMesh is set to false.

      Parameters

      • raycaster: Raycaster
      • intersects: Intersection<Object3D<Event>>[]

      Returns void

    • Removes object as child of this object.

      @@ -239,11 +239,11 @@

      Copy the given quaternion into .quaternion.

      Parameters

      • q: Quaternion

        normalized Quaternion

        -

      Returns void

    • simplify(): void

    Returns void

    • simplify(): void
    • Simplify node, remove all children from node, store them in cache.

      Reset the subdivided flag and restore the visibility.

      This base method assumes that the node implementation is based off Mesh and that the isMesh property is used to toggle visibility.

      -

      Returns void

    • subdivide(): void
    • subdivide(): void
    • Subdivide node,check the maximum depth allowed for the tile provider.

      Uses the createChildNodes() method to actually create the child nodes that represent the next tree level.

      Returns void

    • toJSON(meta?: { geometries: any; images: any; materials: any; textures: any }): any
    • Parameters

      • Optional meta: { geometries: any; images: any; materials: any; textures: any }
        • geometries: any
        • images: any
        • materials: any
        • textures: any

      Returns any

    • translateOnAxis(axis: Vector3, distance: number): MapPlaneNode
    • diff --git a/docs/classes/MapProvider.html b/docs/classes/MapProvider.html index 06c58d7..5e0277f 100644 --- a/docs/classes/MapProvider.html +++ b/docs/classes/MapProvider.html @@ -2,17 +2,17 @@

      A map provider is a object that handles the access to map tiles of a specific service.

      They contain the access configuration and are responsible for handling the map theme size etc.

      MapProvider should be used as a base for all the providers.

      -

    Hierarchy

    Index

    Constructors

    Properties

    bounds: number[] = []
    +

    Hierarchy

    Index

    Constructors

    Properties

    bounds: number[] = []

    Map bounds.

    -
    center: number[] = []
    +
    center: number[] = []

    Map center point.

    -
    maxZoom: number = 20
    +
    maxZoom: number = 20

    Maximum tile level.

    -
    minZoom: number = 0
    +
    minZoom: number = 0

    Minimum tile level.

    -
    name: string = ''
    +
    name: string = ''

    Name of the map provider

    -

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>
    • Get a tile for the x, y, zoom based on the provider configuration.

      The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

      Parameters

      • zoom: number
        @@ -22,7 +22,7 @@
      • y: number

        Tile y.

      Returns Promise<any>

      Promise with the image obtained for the tile ready to use.

      -
    • getMetaData(): void
    • getMetaData(): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/MapSphereNode.html b/docs/classes/MapSphereNode.html index ff76322..a375dd0 100644 --- a/docs/classes/MapSphereNode.html +++ b/docs/classes/MapSphereNode.html @@ -1,7 +1,7 @@ MapSphereNode | geo-three
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class MapSphereNode

    Represents a map tile node.

    A map node can be subdivided into other nodes (Quadtree).

    -

    Hierarchy

    Index

    Constructors

    • new MapSphereNode(parentNode?: any, mapView?: any, location?: number, level?: number, x?: number, y?: number): MapSphereNode

    Properties

    animations: AnimationClip[]
    +

    Hierarchy

    Index

    Constructors

    • new MapSphereNode(parentNode?: any, mapView?: any, location?: number, level?: number, x?: number, y?: number): MapSphereNode

    Properties

    animations: AnimationClip[]

    Array with animation clips.

    default

    []

    castShadow: boolean
    @@ -10,7 +10,7 @@
    children: Object3D<Event>[]

    Array with object's children.

    default

    []

    -
    childrenCache: Object3D<Event>[] = null
    +
    childrenCache: Object3D<Event>[] = null

    Cache with the children objects created from subdivision.

    Used to avoid recreate object after simplification and subdivision.

    The default value is null. Only used if "cacheTiles" is set to true.

    @@ -21,7 +21,7 @@ transparent texture with alphaTest, you must specify a customDepthMaterial for proper shadows.

    customDistanceMaterial: Material

    Same as customDepthMaterial, but used with PointLight.

    -
    disposed: boolean = false
    +
    disposed: boolean = false

    Flag to indicate if the map node was disposed.

    When a map node is disposed its resources are dealocated to save memory.

    frustumCulled: boolean
    @@ -30,19 +30,19 @@
    default

    true

    geometry: BufferGeometry
    id: number

    Unique number of this object instance.

    -
    isMesh: boolean = true
    +
    isMesh: true = true

    Flag to check if the node is a mesh by the renderer.

    Used to toggle the visibility of the node. The renderer skips the node rendering if this is set false.

    isObject3D: true

    Used to check whether this or derived classes are Object3Ds. Default is true. You should not change this, as it is used internally for optimisation.

    layers: Layers
    default

    new THREE.Layers()

    -
    level: number
    +
    level: number

    Tile level of this node.

    -
    location: number
    +
    location: number

    Index of the map node in the quad-tree parent node.

    Position in the tree parent, can be topLeft, topRight, bottomLeft or bottomRight.

    -
    mapView: MapView = null
    +
    mapView: MapView = null

    The map view object where the node is placed.

    material: Material | Material[]
    matrix: Matrix4

    Local transform.

    @@ -65,7 +65,7 @@
    morphTargetDictionary?: {}

    Type declaration

    • [key: string]: number
    morphTargetInfluences?: number[]
    name: string

    Optional name of the object (doesn't need to be unique).

    default

    ''

    -
    nodesLoaded: number = 0
    +
    nodesLoaded: number = 0

    Indicates how many children nodes are loaded.

    The child on become visible once all of them are loaded.

    normalMatrix: Matrix3
    default

    new THREE.Matrix3()

    @@ -76,7 +76,7 @@

    Parameters

    • renderer: WebGLRenderer
    • scene: Scene
    • camera: Camera
    • geometry: BufferGeometry
    • material: Material
    • group: Group

    Returns void

    parent: Object3D<Event>

    Object's parent in the scene graph.

    default

    null

    -
    parentNode: MapNode = null
    +
    parentNode: MapNode = null

    Parent node (from an upper tile level).

    position: Vector3

    Object's local position.

    @@ -98,7 +98,7 @@
    scale: Vector3

    Object's local scale.

    default

    new THREE.Vector3()

    -
    subdivided: boolean = false
    +
    subdivided: boolean = false

    Variable to check if the node is subdivided.

    To avoid bad visibility changes on node load.

    type: string
    up: Vector3
    @@ -110,23 +110,23 @@

    Type declaration

    • [key: string]: any
    uuid: string
    visible: boolean

    Object gets rendered if true.

    default

    true

    -
    x: number
    +
    x: number

    Tile x position.

    -
    y: number
    +
    y: number

    Tile y position.

    -
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = ...
    +
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    baseGeometry: BufferGeometry = ...

    Base geometry contains the entire globe.

    Individual geometries generated for the sphere nodes are not based on this base geometry.

    Applied to the map view on initialization.

    -
    baseScale: Vector3 = ...
    +
    baseScale: Vector3 = ...

    Base scale of the node.

    Applied to the map view on initialization.

    -
    childrens: number = 4
    +
    childrens: number = 4

    How many children each branch of the tree has.

    For a quad-tree this value is 4.

    -
    defaultTexture: Texture = ...
    +
    defaultTexture: Texture = ...

    Default texture used when texture fails to load.

    -
    segments: number = 80
    +
    segments: number = 80

    Number of segments per node geometry.

    Can be configured globally and is applied to all nodes.

    Methods

    • @@ -141,19 +141,19 @@

      Applies the matrix transform to the object and updates the object's position, rotation and scale.

      Parameters

      • matrix: Matrix4

      Returns void

    • Applies the rotation represented by the quaternion to the object.

      -

      Parameters

      • quaternion: Quaternion

      Returns MapSphereNode

    • applyScaleNode(): void
    • applyScaleNode(): void
    • Adds object as a child of this, while maintaining the object's world transform.

      Parameters

      • object: Object3D<Event>

      Returns MapSphereNode

    • Removes all child objects.

      Returns MapSphereNode

    • Parameters

      • Optional recursive: boolean

      Returns MapSphereNode

    • createChildNodes(): void

    Returns MapSphereNode

    • createChildNodes(): void
    • dispatchEvent(event: Event): void
    • Fire an event type.

      -

      Parameters

      • event: Event

      Returns void

    • dispose(): void
    • dispose(): void
    • getObjectById(id: number): Object3D<Event>
    • @@ -170,10 +170,10 @@

      The type of event to listen to.

    • listener: EventListener<Event, T, MapSphereNode>

      The function that gets called when the event is fired.

      -

    Returns boolean

    • initialize(): Promise<void>

    Returns boolean

    • initialize(): Promise<void>
    • Initialize resources that require access to data from the MapView.

      Called automatically by the constructor for child nodes and MapView when a root node is attached to it.

      -

      Returns Promise<void>

    • loadData(): Promise<void>
    • loadData(): Promise<void>
    • localToWorld(vector: Vector3): Vector3
    • @@ -186,10 +186,10 @@ This method does not support objects having non-uniformly-scaled parent(s).

      Parameters

      • vector: Vector3

        A world vector to look at.

        -

      Returns void

    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

    • nodeReady(): void

    Returns void

  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

    • nodeReady(): void
    • raycast(raycaster: Raycaster, intersects: Intersection<Object3D<Event>>[]): void
    • raycast(raycaster: Raycaster, intersects: Intersection<Object3D<Event>>[]): void
    • Removes object as child of this object.

      @@ -245,11 +245,11 @@

      Copy the given quaternion into .quaternion.

      Parameters

      • q: Quaternion

        normalized Quaternion

        -

      Returns void

    • simplify(): void

    Returns void

    • simplify(): void
    • Simplify node, remove all children from node, store them in cache.

      Reset the subdivided flag and restore the visibility.

      This base method assumes that the node implementation is based off Mesh and that the isMesh property is used to toggle visibility.

      -

      Returns void

    • subdivide(): void
    • subdivide(): void
    • Subdivide node,check the maximum depth allowed for the tile provider.

      Uses the createChildNodes() method to actually create the child nodes that represent the next tree level.

      Returns void

    • toJSON(meta?: { geometries: any; images: any; materials: any; textures: any }): any
    • Parameters

      • Optional meta: { geometries: any; images: any; materials: any; textures: any }
        • geometries: any
        • images: any
        • materials: any
        • textures: any

      Returns any

    • @@ -270,9 +270,9 @@

      Translates object along z axis by distance.

      Parameters

      • distance: number

        Distance.

        -

      Returns MapSphereNode

    • traverse(callback: ((object: Object3D<Event>) => any)): void
    • Parameters

      • callback: ((object: Object3D<Event>) => any)
          • (object: Object3D<Event>): any
          • Parameters

            • object: Object3D<Event>

            Returns any

      Returns void

    • traverseAncestors(callback: ((object: Object3D<Event>) => any)): void
    • Parameters

      • callback: ((object: Object3D<Event>) => any)
          • (object: Object3D<Event>): any
          • Parameters

            • object: Object3D<Event>

            Returns any

      Returns void

    • traverseVisible(callback: ((object: Object3D<Event>) => any)): void
    • Parameters

      • callback: ((object: Object3D<Event>) => any)
          • (object: Object3D<Event>): any
          • Parameters

            • object: Object3D<Event>

            Returns any

      Returns void

    • updateMatrix(): void

    Returns MapSphereNode

    • traverse(callback: ((object: Object3D<Event>) => any)): void
    • Parameters

      • callback: ((object: Object3D<Event>) => any)
          • (object: Object3D<Event>): any
          • Parameters

            • object: Object3D<Event>

            Returns any

      Returns void

    • traverseAncestors(callback: ((object: Object3D<Event>) => any)): void
    • Parameters

      • callback: ((object: Object3D<Event>) => any)
          • (object: Object3D<Event>): any
          • Parameters

            • object: Object3D<Event>

            Returns any

      Returns void

    • traverseVisible(callback: ((object: Object3D<Event>) => any)): void
    • Parameters

      • callback: ((object: Object3D<Event>) => any)
          • (object: Object3D<Event>): any
          • Parameters

            • object: Object3D<Event>

            Returns any

      Returns void

    • updateMatrix(): void
    • updateMatrixWorld(force?: boolean): void
    • updateMatrixWorld(force?: boolean): void
    • updateMorphTargets(): void
    • updateWorldMatrix(updateParents: boolean, updateChildren: boolean): void
    • Updates the global transform of the object.

      @@ -284,7 +284,7 @@

      Updates the vector from world space to local space.

      Parameters

      • vector: Vector3

        A world vector.

        -

      Returns Vector3

    Returns Vector3

    Hierarchy

    • Mesh
      • MapView

    Index

    Constructors

    Hierarchy

    • Mesh
      • MapView

    Index

    Constructors

    • Constructor for the map view objects.

      Parameters

      • root: number | MapNode = MapView.PLANAR

        Map view node modes can be SPHERICAL, HEIGHT or PLANAR. PLANAR is used by default. Can also be a custom MapNode instance.

        @@ -13,7 +13,7 @@

      Returns MapView

    Properties

    animations: AnimationClip[]

    Array with animation clips.

    default

    []

    -
    cacheTiles: boolean = false
    +
    cacheTiles: boolean = false

    Indicate if the nodes should cache its children when it is simplified. Nodes that are no longer in use should be kept in memory.

    Usefull for fast moving scenarios to prevent reparsing data in fast moving scenes.

    Should only be used if the child generation process is time consuming. Should be kept off unless required.

    @@ -34,7 +34,7 @@

    When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. If set to false the object gets rendered every frame even if it is not in the frustum of the camera.

    default

    true

    -
    geometry: BufferGeometry
    heightProvider: MapProvider = null
    +
    geometry: BufferGeometry
    heightProvider: MapProvider = null

    Map height (terrain elevation) layer provider.

    Only used for HEIGHT, HEIGHT_SHADER and MARTINI map modes.

    id: number
    @@ -43,7 +43,7 @@

    Used to check whether this or derived classes are Object3Ds. Default is true. You should not change this, as it is used internally for optimisation.

    layers: Layers
    default

    new THREE.Layers()

    -
    lod: LODControl = null
    +
    lod: LODControl = null

    LOD control object used to defined how tiles are loaded in and out of memory.

    material: Material | Material[]
    matrix: Matrix4

    Local transform.

    @@ -69,7 +69,7 @@
    normalMatrix: Matrix3
    default

    new THREE.Matrix3()

    onAfterRender: ((renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Group) => void)

    Type declaration

      • (renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Group): void
      • Calls after rendering object

        -

        Parameters

        • renderer: WebGLRenderer
        • scene: Scene
        • camera: Camera
        • geometry: BufferGeometry
        • material: Material
        • group: Group

        Returns void

    onBeforeRender: ((renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Group) => void) = ...

    Type declaration

      • (renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Group): void
      • +

        Parameters

        • renderer: WebGLRenderer
        • scene: Scene
        • camera: Camera
        • geometry: BufferGeometry
        • material: Material
        • group: Group

        Returns void

    onBeforeRender: ((renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Group) => void) = ...

    Type declaration

      • (renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Group): void
      • Ajust node configuration depending on the camera distance.

        Called everytime automatically before render by the renderer.

        Parameters

        • renderer: WebGLRenderer
        • scene: Scene
        • camera: Camera
        • geometry: BufferGeometry
        • material: Material
        • group: Group

        Returns void

    parent: Object3D<Event>
    @@ -78,7 +78,7 @@
    position: Vector3

    Object's local position.

    default

    new THREE.Vector3()

    -
    provider: MapProvider = null
    +
    provider: MapProvider = null

    Map tile color layer provider.

    quaternion: Quaternion

    Object's local rotation as a Quaternion.

    @@ -91,7 +91,7 @@ Opaque and transparent objects remain sorted independently though. When this property is set for an instance of Group, all descendants objects will be sorted and rendered together.

    default

    0

    -
    root: MapNode = null
    +
    root: MapNode = null

    Define the type of map node in use, defined how the map is presented.

    Should only be set on creation.

    rotation: Euler
    @@ -109,17 +109,17 @@

    Type declaration

    • [key: string]: any
    uuid: string
    visible: boolean

    Object gets rendered if true.

    default

    true

    -
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    HEIGHT: number = 202
    +
    DefaultMatrixAutoUpdate: boolean
    DefaultMatrixWorldAutoUpdate: boolean
    DefaultUp: Vector3
    HEIGHT: number = 202

    Planar map projection with height deformation.

    -
    HEIGHT_SHADER: number = 203
    +
    HEIGHT_SHADER: number = 203

    Planar map projection with height deformation using the GPU for height generation.

    -
    MARTINI: number = 204
    +
    MARTINI: number = 204

    RTIN map mode.

    -
    PLANAR: number = 200
    +
    PLANAR: number = 200

    Planar map projection.

    -
    SPHERICAL: number = 201
    +
    SPHERICAL: number = 201

    Spherical map projection.

    -
    mapModes: Map<number, any> = ...
    +
    mapModes: Map<number, any> = ...

    Map of the map node types available.

    Methods

    • add(...object: Object3D<Event>[]): MapView
    • Adds object as child of this object.

      @@ -135,13 +135,13 @@

      Applies the rotation represented by the quaternion to the object.

      Parameters

      • quaternion: Quaternion

      Returns MapView

    • attach(object: Object3D<Event>): MapView
    • Adds object as a child of this, while maintaining the object's world transform.

      -

      Parameters

      • object: Object3D<Event>

      Returns MapView

    • clear(): any
    • clear(): any
    • Clears all tiles from memory and reloads data. Used when changing the provider.

      Should be called manually if any changed to the provider are made without setting the provider.

      Returns any

    • clone(recursive?: boolean): MapView
    • Parameters

      • Optional recursive: boolean

      Returns MapView

    • Parameters

      • source: MapView
      • Optional recursive: boolean

      Returns MapView

    • dispatchEvent(event: Event): void
    • Fire an event type.

      -

      Parameters

      • event: Event

      Returns void

    • getMetaData(): void
    • getMetaData(): void
    • getObjectById(id: number): Object3D<Event>
    • Searches through the object's children and returns the first with a matching id.

      @@ -167,16 +167,16 @@ This method does not support objects having non-uniformly-scaled parent(s).

      Parameters

      • vector: Vector3

        A world vector to look at.

        -

      Returns void

    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

    • maxZoom(): number

    Returns void

  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

    • maxZoom(): number
    • Get the maximum zoom level available in the providers attached to the map view.

      Returns number

      Maximum zoom level available.

      -
    • minZoom(): number
    • minZoom(): number
    • Get the minimum zoom level available in the providers attached to the map view.

      Returns number

      Minimum zoom level available.

      -
    • preSubdivide(): void
    • preSubdivide(): void
    • Pre-subdivide map tree to create nodes of levels not available in the provider.

      Checks for the minimum zoom level in the providers attached to the map view.

      -

      Returns void

    • raycast(raycaster: Raycaster, intersects: any[]): boolean
    • Parameters

      • raycaster: Raycaster
      • intersects: any[]

      Returns boolean

    • remove(...object: Object3D<Event>[]): MapView
    • +

      Returns void

    • raycast(raycaster: Raycaster, intersects: any[]): boolean
    • Parameters

      • raycaster: Raycaster
      • intersects: any[]

      Returns boolean

    • remove(...object: Object3D<Event>[]): MapView
    • Removes object as child of this object.

      Parameters

      • Rest ...object: Object3D<Event>[]

      Returns MapView

    • removeEventListener<T>(type: T, listener: EventListener<Event, T, MapView>): void
    • Removes a listener from an event type.

      @@ -210,13 +210,13 @@

      Rotates the object around z axis in local space.

      Parameters

      • angle: number

        the angle to rotate in radians.

        -

      Returns MapView

    Returns MapView

    • Change the map height provider of this map view.

      Will discard all the tiles already loaded using the old provider.

      -

      Parameters

      Returns void

    • Change the map provider of this map view.

      Will discard all the tiles already loaded using the old provider.

      -

      Parameters

      Returns void

    • setRoot(root: number | MapNode): void
    • setRoot(root: number | MapNode): void
    • Set the root of the map view.

      Is set by the constructor by default, can be changed in runtime.

      Parameters

      • root: number | MapNode
        diff --git a/docs/classes/OpenMapTilesProvider.html b/docs/classes/OpenMapTilesProvider.html index e9a424b..b296fe1 100644 --- a/docs/classes/OpenMapTilesProvider.html +++ b/docs/classes/OpenMapTilesProvider.html @@ -4,22 +4,22 @@ -

    Hierarchy

    Index

    Constructors

    Properties

    address: string
    +

    Hierarchy

    Index

    Constructors

    Properties

    address: string

    Map server address.

    By default the open OSM tile server is used.

    -
    bounds: number[] = []
    +
    bounds: number[] = []

    Map bounds.

    -
    center: number[] = []
    +
    center: number[] = []

    Map center point.

    -
    format: string
    +
    format: string

    Map image tile format.

    -
    maxZoom: number = 20
    +
    maxZoom: number = 20

    Maximum tile level.

    -
    minZoom: number = 0
    +
    minZoom: number = 0

    Minimum tile level.

    -
    name: string = ''
    +
    name: string = ''

    Name of the map provider

    -
    theme: string
    +
    theme: string

    Map tile theme, some of the styles available.

    • dark-matter
    • @@ -27,11 +27,11 @@
    • osm-bright
    • positron
    -

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>
    • Get a tile for the x, y, zoom based on the provider configuration.

      The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

      Parameters

      • zoom: number
      • x: number
      • y: number

      Returns Promise<any>

      Promise with the image obtained for the tile ready to use.

      -
    • getMetaData(): void
    • getMetaData(): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/OpenStreetMapsProvider.html b/docs/classes/OpenStreetMapsProvider.html index b63c0d0..bfc2e55 100644 --- a/docs/classes/OpenStreetMapsProvider.html +++ b/docs/classes/OpenStreetMapsProvider.html @@ -1,26 +1,26 @@ OpenStreetMapsProvider | geo-three
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class OpenStreetMapsProvider

    Open street maps tile server.

    Works with any service that uses a address/zoom/x/y.format URL for tile access.

    -

    Hierarchy

    Index

    Constructors

    Properties

    address: string
    +

    Hierarchy

    Index

    Constructors

    Properties

    address: string

    Map server address.

    By default the open OSM tile server is used.

    -
    bounds: number[] = []
    +
    bounds: number[] = []

    Map bounds.

    -
    center: number[] = []
    +
    center: number[] = []

    Map center point.

    -
    format: string
    +
    format: string

    Map image tile format.

    -
    maxZoom: number = 20
    +
    maxZoom: number = 20

    Maximum tile level.

    -
    minZoom: number = 0
    +
    minZoom: number = 0

    Minimum tile level.

    -
    name: string = ''
    +
    name: string = ''

    Name of the map provider

    -

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>

    Methods

    • fetchTile(zoom: number, x: number, y: number): Promise<any>
    • Get a tile for the x, y, zoom based on the provider configuration.

      The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

      Parameters

      • zoom: number
      • x: number
      • y: number

      Returns Promise<any>

      Promise with the image obtained for the tile ready to use.

      -
    • getMetaData(): void
    • getMetaData(): void

    Legend

    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method
    • Method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/UnitsUtils.html b/docs/classes/UnitsUtils.html index 52bc870..df6fec8 100644 --- a/docs/classes/UnitsUtils.html +++ b/docs/classes/UnitsUtils.html @@ -3,23 +3,23 @@

    Multiple methods are used to reprent world coordinates based on the type of data being presented.

    WGS84 is the most commonly used representation with (latitude, longitude, altitude).

    EPSG:900913 is used for planar coordinates in (X, Y, Z)

    -

    Hierarchy

    • UnitsUtils

    Index

    Constructors

    Properties

    EARTH_ORIGIN: number = ...
    +

    Hierarchy

    • UnitsUtils

    Index

    Constructors

    Properties

    EARTH_ORIGIN: number = ...

    Earth equator perimeter in meters.

    -
    EARTH_PERIMETER: number = ...
    +
    EARTH_PERIMETER: number = ...

    Earth equator perimeter in meters.

    -
    EARTH_RADIUS: number = 6371008
    +
    EARTH_RADIUS: number = 6371008

    Average radius of earth in meters.

    -
    EARTH_RADIUS_A: number = 6378137.0
    +
    EARTH_RADIUS_A: number = 6378137.0

    Earth radius in semi-major axis A as defined in WGS84.

    -
    EARTH_RADIUS_B: number = 6356752.314245
    +
    EARTH_RADIUS_B: number = 6356752.314245

    Earth radius in semi-minor axis B as defined in WGS84.

    -

    Methods

    • datumsToSpherical(latitude: number, longitude: number): Vector2

    Methods

    • datumsToSpherical(latitude: number, longitude: number): Vector2
    • Converts coordinates from WGS84 Datum to XY in Spherical Mercator EPSG:900913.

      Parameters

      • latitude: number

        Latitude value in degrees.

      • longitude: number

        Longitude value in degrees.

        -

      Returns Vector2

    • datumsToVector(latitude: number, longitude: number): Vector3

    Returns Vector2

    • datumsToVector(latitude: number, longitude: number): Vector3
    • Get a direction vector from WGS84 coordinates.

      The vector obtained will be normalized.

      Parameters

      • latitude: number
        @@ -27,13 +27,13 @@
      • longitude: number

        Longitude value in degrees.

      Returns Vector3

      Direction vector normalized.

      -
    • mapboxAltitude(color: Color): number
    • mapboxAltitude(color: Color): number
    • quadtreeToDatums(zoom: number, x: number, y: number): Geolocation
    • quadtreeToDatums(zoom: number, x: number, y: number): Geolocation
    • Converts quad tree zoom/x/y to lat/lon in WGS84 Datum.

      The X and Y start from 0 from the top/left corner of the quadtree up to (4^zoom - 1)

      Parameters

      • zoom: number
        @@ -42,13 +42,13 @@

        X coordinate.

      • y: number

        Y coordinate.

        -

      Returns Geolocation

    Returns Geolocation

    Returns Geolocation

    • Direction vector to WGS84 coordinates.

      Can be used to transform surface points of world sphere to coordinates.

      Parameters

      • dir: Vector3
        diff --git a/docs/classes/XHRUtils.html b/docs/classes/XHRUtils.html index 62f7ea6..2dc5c8b 100644 --- a/docs/classes/XHRUtils.html +++ b/docs/classes/XHRUtils.html @@ -1,6 +1,6 @@ XHRUtils | geo-three
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class XHRUtils

        XHR utils contains public static methods to allow easy access to services via XHR.

        -

        Hierarchy

        • XHRUtils

        Index

        Constructors

        Methods

        Constructors

        Methods

        • get(url: string, onLoad?: Function, onError?: Function): XMLHttpRequest

        Hierarchy

        • XHRUtils

        Index

        Constructors

        Methods

        Constructors

        Methods

        • get(url: string, onLoad?: Function, onError?: Function): XMLHttpRequest
        • Get file data from URL as text, using a XHR call.

          Parameters

          • url: string

            Target for the request.

            @@ -8,7 +8,7 @@

            On load callback.

          • Optional onError: Function

            On progress callback.

            -

          Returns XMLHttpRequest

        • getRaw(url: string, onLoad?: Function, onError?: Function): XMLHttpRequest

        Returns XMLHttpRequest

    • getRaw(url: string, onLoad?: Function, onError?: Function): XMLHttpRequest
    • Get raw file data from URL, using a XHR call.

      Parameters

      • url: string

        Target for the request.

        @@ -16,7 +16,7 @@

        On load callback.

      • Optional onError: Function

        On progress callback.

        -

      Returns XMLHttpRequest

    • request(url: string, type: string, header?: any, body?: any, onLoad?: Function, onError?: Function, onProgress?: Function): XMLHttpRequest

    Returns XMLHttpRequest

    • request(url: string, type: string, header?: any, body?: any, onLoad?: Function, onError?: Function, onProgress?: Function): XMLHttpRequest
    • Perform a request with the specified configuration.

      Syncronous request should be avoided unless they are strictly necessary.

      Parameters

      • url: string
        diff --git a/docs/index.html b/docs/index.html index 5f14604..b7ee6db 100644 --- a/docs/index.html +++ b/docs/index.html @@ -13,10 +13,21 @@

        Geo-Three

      • Providers should have a tile based map system to be supported by the library.
    • -
    • You can test the live demo of the library running from the project page.

    + +

    Example

    +
    +
      +
    • You can test some live demos of the library running from the project page.
    • +
    • Some of these examples might require API keys for the map services used. +
    • +
    +

    Usage

    diff --git a/docs/interfaces/LODControl.html b/docs/interfaces/LODControl.html index 719990d..8cea28b 100644 --- a/docs/interfaces/LODControl.html +++ b/docs/interfaces/LODControl.html @@ -1,6 +1,6 @@ LODControl | geo-three
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Interface LODControl

    LOD control objects define how the map tiles are subsivided or simplified.

    -

    Hierarchy

    • LODControl

    Implemented by

    Index

    Methods

    Methods

    • updateLOD(view: MapView, camera: Camera, renderer: WebGLRenderer, scene: Object3D<Event>): void

    Hierarchy

    • LODControl

    Implemented by

    Index

    Methods

    Methods

    • updateLOD(view: MapView, camera: Camera, renderer: WebGLRenderer, scene: Object3D<Event>): void