Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
tentone committed Nov 11, 2022
1 parent ce1f368 commit 9ad8dbc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 28 deletions.
14 changes: 5 additions & 9 deletions build/geo-three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class MapNodeGeometry extends three.BufferGeometry {

class CanvasUtils {
static createOffscreenCanvas(width, height) {
if (OffscreenCanvas) {
if (typeof OffscreenCanvas !== 'undefined') {
return new OffscreenCanvas(width, height);
}
else {
Expand Down Expand Up @@ -320,7 +320,7 @@ class UnitsUtils {
return { latitude: latitude, longitude: longitude };
}
}
UnitsUtils.EARTH_RADIUS = 6378137;
UnitsUtils.EARTH_RADIUS = 6371008;
UnitsUtils.EARTH_PERIMETER = 2 * Math.PI * UnitsUtils.EARTH_RADIUS;
UnitsUtils.EARTH_ORIGIN = UnitsUtils.EARTH_PERIMETER / 2.0;

Expand Down Expand Up @@ -1398,12 +1398,7 @@ class XHRUtils {
if (onProgress !== undefined) {
xhr.onprogress = onProgress;
}
if (body !== undefined) {
xhr.send(body);
}
else {
xhr.send(null);
}
xhr.send(body !== undefined ? body : null);
return xhr;
}
}
Expand All @@ -1420,7 +1415,7 @@ class BingMapsProvider extends MapProvider {
this.maxZoom = 19;
}
getMetaData() {
const address = 'http://dev.virtualearth.net/REST/V1/Imagery/Metadata/RoadOnDemand?output=json&include=ImageryProviders&key=' + this.apiKey;
const address = BingMapsProvider.ADDRESS + '/REST/V1/Imagery/Metadata/RoadOnDemand?output=json&include=ImageryProviders&key=' + this.apiKey;
XHRUtils.get(address, function (data) {
JSON.parse(data);
});
Expand Down Expand Up @@ -1454,6 +1449,7 @@ class BingMapsProvider extends MapProvider {
});
}
}
BingMapsProvider.ADDRESS = "https://dev.virtualearth.net";
BingMapsProvider.AERIAL = 'a';
BingMapsProvider.ROAD = 'r';
BingMapsProvider.AERIAL_LABELS = 'h';
Expand Down
14 changes: 5 additions & 9 deletions build/geo-three.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@

class CanvasUtils {
static createOffscreenCanvas(width, height) {
if (OffscreenCanvas) {
if (typeof OffscreenCanvas !== 'undefined') {
return new OffscreenCanvas(width, height);
}
else {
Expand Down Expand Up @@ -320,7 +320,7 @@
return { latitude: latitude, longitude: longitude };
}
}
UnitsUtils.EARTH_RADIUS = 6378137;
UnitsUtils.EARTH_RADIUS = 6371008;
UnitsUtils.EARTH_PERIMETER = 2 * Math.PI * UnitsUtils.EARTH_RADIUS;
UnitsUtils.EARTH_ORIGIN = UnitsUtils.EARTH_PERIMETER / 2.0;

Expand Down Expand Up @@ -1398,12 +1398,7 @@
if (onProgress !== undefined) {
xhr.onprogress = onProgress;
}
if (body !== undefined) {
xhr.send(body);
}
else {
xhr.send(null);
}
xhr.send(body !== undefined ? body : null);
return xhr;
}
}
Expand All @@ -1420,7 +1415,7 @@
this.maxZoom = 19;
}
getMetaData() {
const address = 'http://dev.virtualearth.net/REST/V1/Imagery/Metadata/RoadOnDemand?output=json&include=ImageryProviders&key=' + this.apiKey;
const address = BingMapsProvider.ADDRESS + '/REST/V1/Imagery/Metadata/RoadOnDemand?output=json&include=ImageryProviders&key=' + this.apiKey;
XHRUtils.get(address, function (data) {
JSON.parse(data);
});
Expand Down Expand Up @@ -1454,6 +1449,7 @@
});
}
}
BingMapsProvider.ADDRESS = "https://dev.virtualearth.net";
BingMapsProvider.AERIAL = 'a';
BingMapsProvider.ROAD = 'r';
BingMapsProvider.AERIAL_LABELS = 'h';
Expand Down
14 changes: 5 additions & 9 deletions build/geo-three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class MapNodeGeometry extends BufferGeometry {

class CanvasUtils {
static createOffscreenCanvas(width, height) {
if (OffscreenCanvas) {
if (typeof OffscreenCanvas !== 'undefined') {
return new OffscreenCanvas(width, height);
}
else {
Expand Down Expand Up @@ -316,7 +316,7 @@ class UnitsUtils {
return { latitude: latitude, longitude: longitude };
}
}
UnitsUtils.EARTH_RADIUS = 6378137;
UnitsUtils.EARTH_RADIUS = 6371008;
UnitsUtils.EARTH_PERIMETER = 2 * Math.PI * UnitsUtils.EARTH_RADIUS;
UnitsUtils.EARTH_ORIGIN = UnitsUtils.EARTH_PERIMETER / 2.0;

Expand Down Expand Up @@ -1394,12 +1394,7 @@ class XHRUtils {
if (onProgress !== undefined) {
xhr.onprogress = onProgress;
}
if (body !== undefined) {
xhr.send(body);
}
else {
xhr.send(null);
}
xhr.send(body !== undefined ? body : null);
return xhr;
}
}
Expand All @@ -1416,7 +1411,7 @@ class BingMapsProvider extends MapProvider {
this.maxZoom = 19;
}
getMetaData() {
const address = 'http://dev.virtualearth.net/REST/V1/Imagery/Metadata/RoadOnDemand?output=json&include=ImageryProviders&key=' + this.apiKey;
const address = BingMapsProvider.ADDRESS + '/REST/V1/Imagery/Metadata/RoadOnDemand?output=json&include=ImageryProviders&key=' + this.apiKey;
XHRUtils.get(address, function (data) {
JSON.parse(data);
});
Expand Down Expand Up @@ -1450,6 +1445,7 @@ class BingMapsProvider extends MapProvider {
});
}
}
BingMapsProvider.ADDRESS = "https://dev.virtualearth.net";
BingMapsProvider.AERIAL = 'a';
BingMapsProvider.ROAD = 'r';
BingMapsProvider.AERIAL_LABELS = 'h';
Expand Down
1 change: 1 addition & 0 deletions build/providers/BingMapsProvider.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MapProvider } from './MapProvider';
export declare class BingMapsProvider extends MapProvider {
static ADDRESS: string;
maxZoom: number;
apiKey: string;
type: string;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "geo-three",
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"description": "geo-three is library for tile based geographic map layers in with three.js supporting selective loading/unloading of real-time generated 3D tiles",
"main": "build/Main.d.ts",
Expand Down

0 comments on commit 9ad8dbc

Please sign in to comment.