Skip to content

Commit 7da4525

Browse files
committed
Type fix
1 parent 3071734 commit 7da4525

File tree

15 files changed

+47
-40
lines changed

15 files changed

+47
-40
lines changed

build/Main.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ export { HeightDebugProvider } from './providers/HeightDebugProvider';
1616
export { MapNodeGeometry } from './geometries/MapNodeGeometry';
1717
export { MapNodeHeightGeometry } from './geometries/MapNodeHeightGeometry';
1818
export { MapSphereNodeGeometry } from './geometries/MapSphereNodeGeometry';
19-
export { MapHeightNode } from './nodes/MapHeightNode';
2019
export { MapNode } from './nodes/MapNode';
20+
export { MapHeightNode } from './nodes/MapHeightNode';
2121
export { MapPlaneNode } from './nodes/MapPlaneNode';
2222
export { MapSphereNode } from './nodes/MapSphereNode';
2323
export { MapHeightNodeShader } from './nodes/MapHeightNodeShader';
2424
export { UnitsUtils } from './utils/UnitsUtils';
25+
export { CanvasUtils } from './utils/CanvasUtils';
2526
export { Geolocation } from './utils/Geolocation';
2627
export { GeolocationUtils } from './utils/GeolocationUtils';
2728
export { CancelablePromise } from './utils/CancelablePromise';
2829
export { XHRUtils } from './utils/XHRUtils';
30+
export { TextureUtils } from './utils/TextureUtils';

build/examples/providers.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

build/examples/transition.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

build/geo-three.cjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
Object.defineProperty(exports, '__esModule', { value: true });
4-
53
var three = require('three');
64

75
/*! *****************************************************************************
@@ -388,7 +386,7 @@ class UnitsUtils {
388386
return new three.Vector3(-Math.cos(rotX + Math.PI) * cos, Math.sin(rotY), Math.sin(rotX + Math.PI) * cos);
389387
}
390388
static mapboxAltitude(color) {
391-
return ((color.r * 255.0 * 65536.0 + color.g * 255.0 * 256.0 + color.b * 255.0) * 0.1) - 10000.0;
389+
return (color.r * 255.0 * 65536.0 + color.g * 255.0 * 256.0 + color.b * 255.0) * 0.1 - 10000.0;
392390
}
393391
}
394392
UnitsUtils.EARTH_RADIUS = 6371008;
@@ -1616,14 +1614,14 @@ class GoogleMapsProvider extends MapProvider {
16161614
}
16171615

16181616
class HereMapsProvider extends MapProvider {
1619-
constructor(appId, appCode, style, scheme, format, size) {
1617+
constructor(appId = '', appCode = '', style = 'base', scheme = 'normal.day', format = 'png', size = 512) {
16201618
super();
1621-
this.appId = appId !== undefined ? appId : '';
1622-
this.appCode = appCode !== undefined ? appCode : '';
1623-
this.style = style !== undefined ? style : 'base';
1624-
this.scheme = scheme !== undefined ? scheme : 'normal.day';
1625-
this.format = format !== undefined ? format : 'png';
1626-
this.size = size !== undefined ? size : 512;
1619+
this.appId = appId;
1620+
this.appCode = appCode;
1621+
this.style = style;
1622+
this.scheme = scheme;
1623+
this.format = format;
1624+
this.size = size;
16271625
this.version = 'newest';
16281626
this.server = 1;
16291627
}
@@ -1905,6 +1903,7 @@ class CancelablePromise {
19051903

19061904
exports.BingMapsProvider = BingMapsProvider;
19071905
exports.CancelablePromise = CancelablePromise;
1906+
exports.CanvasUtils = CanvasUtils;
19081907
exports.DebugProvider = DebugProvider;
19091908
exports.Geolocation = Geolocation;
19101909
exports.GeolocationUtils = GeolocationUtils;
@@ -1928,5 +1927,6 @@ exports.MapTilerProvider = MapTilerProvider;
19281927
exports.MapView = MapView;
19291928
exports.OpenMapTilesProvider = OpenMapTilesProvider;
19301929
exports.OpenStreetMapsProvider = OpenStreetMapsProvider;
1930+
exports.TextureUtils = TextureUtils;
19311931
exports.UnitsUtils = UnitsUtils;
19321932
exports.XHRUtils = XHRUtils;

build/geo-three.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388
return new three.Vector3(-Math.cos(rotX + Math.PI) * cos, Math.sin(rotY), Math.sin(rotX + Math.PI) * cos);
389389
}
390390
static mapboxAltitude(color) {
391-
return ((color.r * 255.0 * 65536.0 + color.g * 255.0 * 256.0 + color.b * 255.0) * 0.1) - 10000.0;
391+
return (color.r * 255.0 * 65536.0 + color.g * 255.0 * 256.0 + color.b * 255.0) * 0.1 - 10000.0;
392392
}
393393
}
394394
UnitsUtils.EARTH_RADIUS = 6371008;
@@ -1616,14 +1616,14 @@
16161616
}
16171617

16181618
class HereMapsProvider extends MapProvider {
1619-
constructor(appId, appCode, style, scheme, format, size) {
1619+
constructor(appId = '', appCode = '', style = 'base', scheme = 'normal.day', format = 'png', size = 512) {
16201620
super();
1621-
this.appId = appId !== undefined ? appId : '';
1622-
this.appCode = appCode !== undefined ? appCode : '';
1623-
this.style = style !== undefined ? style : 'base';
1624-
this.scheme = scheme !== undefined ? scheme : 'normal.day';
1625-
this.format = format !== undefined ? format : 'png';
1626-
this.size = size !== undefined ? size : 512;
1621+
this.appId = appId;
1622+
this.appCode = appCode;
1623+
this.style = style;
1624+
this.scheme = scheme;
1625+
this.format = format;
1626+
this.size = size;
16271627
this.version = 'newest';
16281628
this.server = 1;
16291629
}
@@ -1905,6 +1905,7 @@
19051905

19061906
exports.BingMapsProvider = BingMapsProvider;
19071907
exports.CancelablePromise = CancelablePromise;
1908+
exports.CanvasUtils = CanvasUtils;
19081909
exports.DebugProvider = DebugProvider;
19091910
exports.Geolocation = Geolocation;
19101911
exports.GeolocationUtils = GeolocationUtils;
@@ -1928,9 +1929,8 @@
19281929
exports.MapView = MapView;
19291930
exports.OpenMapTilesProvider = OpenMapTilesProvider;
19301931
exports.OpenStreetMapsProvider = OpenStreetMapsProvider;
1932+
exports.TextureUtils = TextureUtils;
19311933
exports.UnitsUtils = UnitsUtils;
19321934
exports.XHRUtils = XHRUtils;
19331935

1934-
Object.defineProperty(exports, '__esModule', { value: true });
1935-
19361936
}));

build/geo-three.module.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ class UnitsUtils {
384384
return new Vector3(-Math.cos(rotX + Math.PI) * cos, Math.sin(rotY), Math.sin(rotX + Math.PI) * cos);
385385
}
386386
static mapboxAltitude(color) {
387-
return ((color.r * 255.0 * 65536.0 + color.g * 255.0 * 256.0 + color.b * 255.0) * 0.1) - 10000.0;
387+
return (color.r * 255.0 * 65536.0 + color.g * 255.0 * 256.0 + color.b * 255.0) * 0.1 - 10000.0;
388388
}
389389
}
390390
UnitsUtils.EARTH_RADIUS = 6371008;
@@ -1612,14 +1612,14 @@ class GoogleMapsProvider extends MapProvider {
16121612
}
16131613

16141614
class HereMapsProvider extends MapProvider {
1615-
constructor(appId, appCode, style, scheme, format, size) {
1615+
constructor(appId = '', appCode = '', style = 'base', scheme = 'normal.day', format = 'png', size = 512) {
16161616
super();
1617-
this.appId = appId !== undefined ? appId : '';
1618-
this.appCode = appCode !== undefined ? appCode : '';
1619-
this.style = style !== undefined ? style : 'base';
1620-
this.scheme = scheme !== undefined ? scheme : 'normal.day';
1621-
this.format = format !== undefined ? format : 'png';
1622-
this.size = size !== undefined ? size : 512;
1617+
this.appId = appId;
1618+
this.appCode = appCode;
1619+
this.style = style;
1620+
this.scheme = scheme;
1621+
this.format = format;
1622+
this.size = size;
16231623
this.version = 'newest';
16241624
this.server = 1;
16251625
}
@@ -1899,4 +1899,4 @@ class CancelablePromise {
18991899
}
19001900
}
19011901

1902-
export { BingMapsProvider, CancelablePromise, DebugProvider, Geolocation, GeolocationUtils, GoogleMapsProvider, HeightDebugProvider, HereMapsProvider, LODFrustum, LODRadial, LODRaycast, MapBoxProvider, MapHeightNode, MapHeightNodeShader, MapNode, MapNodeGeometry, MapNodeHeightGeometry, MapPlaneNode, MapProvider, MapSphereNode, MapSphereNodeGeometry, MapTilerProvider, MapView, OpenMapTilesProvider, OpenStreetMapsProvider, UnitsUtils, XHRUtils };
1902+
export { BingMapsProvider, CancelablePromise, CanvasUtils, DebugProvider, Geolocation, GeolocationUtils, GoogleMapsProvider, HeightDebugProvider, HereMapsProvider, LODFrustum, LODRadial, LODRaycast, MapBoxProvider, MapHeightNode, MapHeightNodeShader, MapNode, MapNodeGeometry, MapNodeHeightGeometry, MapPlaneNode, MapProvider, MapSphereNode, MapSphereNodeGeometry, MapTilerProvider, MapView, OpenMapTilesProvider, OpenStreetMapsProvider, TextureUtils, UnitsUtils, XHRUtils };

build/providers/HereMapsProvider.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export declare class HereMapsProvider extends MapProvider {
99
size: number;
1010
version: string;
1111
server: number;
12-
constructor(appId: string, appCode: string, style: string, scheme: string, format: string, size: number);
12+
constructor(appId?: string, appCode?: string, style?: string, scheme?: string, format?: string, size?: number);
1313
nextServer(): void;
1414
getMetaData(): Promise<void>;
1515
fetchTile(zoom: number, x: number, y: number): Promise<any>;

build/utils/CanvasUtils.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference types="offscreencanvas" />
21
export declare class CanvasUtils {
32
static createOffscreenCanvas(width: number, height: number): (HTMLCanvasElement | OffscreenCanvas);
43
}

rollup.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ import typescript from '@rollup/plugin-typescript';
44
export default [
55
{
66
input: 'source/Main.ts',
7+
78
external: ['three'],
89
plugins: [
9-
typescript({ tsconfig: './tsconfig.json' }),
10+
typescript({
11+
tsconfig: './tsconfig.json'
12+
}),
1013
strip({
1114
functions: ['assert.*', 'debug', 'alert', 'console.*']
1215
})

rollup.example.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default [
2424
resolve(),
2525
typescript({
2626
declaration: false
27+
2728
})
2829
],
2930
output: [

0 commit comments

Comments
 (0)