maplibre-gl-nightlayer 1.0.0-alpha.4 → 1.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/main.d.ts +29 -29
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -45,19 +45,19 @@ class NightLayer implements CustomLayerInterface {
|
|
|
45
45
|
setDate(date: Date | null): void;
|
|
46
46
|
|
|
47
47
|
getOpacity(): number;
|
|
48
|
-
setOpacity(
|
|
48
|
+
setOpacity(opacity: number): void;
|
|
49
49
|
|
|
50
50
|
getColor(): Color;
|
|
51
|
-
setColor(
|
|
51
|
+
setColor(color: Color): void;
|
|
52
52
|
|
|
53
53
|
getTwilightSteps(): number;
|
|
54
|
-
setTwilightSteps(
|
|
54
|
+
setTwilightSteps(steps: number): void;
|
|
55
55
|
|
|
56
56
|
getTwilightStepAngle(): number;
|
|
57
|
-
setTwilightStepAngle(
|
|
57
|
+
setTwilightStepAngle(angle: number): void;
|
|
58
58
|
|
|
59
59
|
getTwilightAttenuation(): number;
|
|
60
|
-
setTwilightAttenuation(
|
|
60
|
+
setTwilightAttenuation(attenuation: number): void;
|
|
61
61
|
|
|
62
62
|
:
|
|
63
63
|
}
|
package/dist/main.d.ts
CHANGED
|
@@ -6,18 +6,18 @@ type Color = [number, number, number];
|
|
|
6
6
|
*/
|
|
7
7
|
type Options = {
|
|
8
8
|
/**
|
|
9
|
-
* Date.
|
|
9
|
+
* Date for the shadow.
|
|
10
10
|
* If null, the current date is used.
|
|
11
11
|
*/
|
|
12
12
|
date?: Date | null;
|
|
13
13
|
/**
|
|
14
|
-
* Opacity.
|
|
14
|
+
* Opacity of the shadow.
|
|
15
15
|
* 0.0 means fully transparent, 1.0 means fully opaque
|
|
16
16
|
*/
|
|
17
17
|
opacity?: number;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
* Each value
|
|
19
|
+
* Color of the shadow.
|
|
20
|
+
* Each value should be in the range [0, 255].
|
|
21
21
|
*/
|
|
22
22
|
color?: Color;
|
|
23
23
|
/**
|
|
@@ -45,77 +45,77 @@ export declare class NightLayer implements CustomLayerInterface {
|
|
|
45
45
|
renderingMode: "2d";
|
|
46
46
|
/**
|
|
47
47
|
* Create a new NightLayer instance. Intended to be passed to `map.addLayer`.
|
|
48
|
-
* @param opts
|
|
48
|
+
* @param opts The options.
|
|
49
49
|
*/
|
|
50
50
|
constructor(opts?: Options);
|
|
51
51
|
/**
|
|
52
52
|
* Get the subsolar point (longitude and latitude) at the given date.
|
|
53
|
-
* @param date
|
|
53
|
+
* @param date If null, the current date is used.
|
|
54
54
|
*/
|
|
55
55
|
getSubsolarPoint(date: Date): {
|
|
56
56
|
subsolarLng: number;
|
|
57
57
|
subsolarLat: number;
|
|
58
58
|
};
|
|
59
59
|
/**
|
|
60
|
-
* Get the date
|
|
61
|
-
* @returns
|
|
60
|
+
* Get the date for the shadow.
|
|
61
|
+
* @returns The date. If null, the current date is used.
|
|
62
62
|
*/
|
|
63
63
|
getDate(): Date | null;
|
|
64
64
|
/**
|
|
65
|
-
* Set the date
|
|
66
|
-
* @param date
|
|
65
|
+
* Set the date for the shadow.
|
|
66
|
+
* @param date If null, the current date is used.
|
|
67
67
|
*/
|
|
68
68
|
setDate(date: Date | null): void;
|
|
69
69
|
/**
|
|
70
|
-
* Get the opacity of the
|
|
71
|
-
* @returns
|
|
70
|
+
* Get the opacity of the shadow.
|
|
71
|
+
* @returns The opacity. 0.0 means fully transparent, 1.0 means fully opaque.
|
|
72
72
|
*/
|
|
73
73
|
getOpacity(): number;
|
|
74
74
|
/**
|
|
75
|
-
* Set the opacity of the
|
|
76
|
-
* @param
|
|
75
|
+
* Set the opacity of the shadow.
|
|
76
|
+
* @param opacity 0.0 means fully transparent, 1.0 means fully opaque.
|
|
77
77
|
*/
|
|
78
|
-
setOpacity(
|
|
78
|
+
setOpacity(opacity: number): void;
|
|
79
79
|
/**
|
|
80
|
-
* Get the color of the
|
|
81
|
-
* @returns
|
|
80
|
+
* Get the color of the shadow.
|
|
81
|
+
* @returns The color. Each value is in the range [0, 255].
|
|
82
82
|
*/
|
|
83
83
|
getColor(): Color;
|
|
84
84
|
/**
|
|
85
|
-
* Set the color of the
|
|
86
|
-
* @param
|
|
85
|
+
* Set the color of the shadow.
|
|
86
|
+
* @param color Each value should be in the range [0, 255].
|
|
87
87
|
*/
|
|
88
|
-
setColor(
|
|
88
|
+
setColor(color: Color): void;
|
|
89
89
|
/**
|
|
90
90
|
* Get the number of twilight steps.
|
|
91
|
-
* @returns 0 means no steps (gradation), 1 means one step (day/night), etc.
|
|
91
|
+
* @returns The steps. 0 means no steps (gradation), 1 means one step (day/night), etc.
|
|
92
92
|
*/
|
|
93
93
|
getTwilightSteps(): number;
|
|
94
94
|
/**
|
|
95
95
|
* Set the number of twilight steps.
|
|
96
|
-
* @param
|
|
96
|
+
* @param steps 0 means no steps (gradation), 1 means one step (day/night), etc.
|
|
97
97
|
*/
|
|
98
|
-
setTwilightSteps(
|
|
98
|
+
setTwilightSteps(steps: number): void;
|
|
99
99
|
/**
|
|
100
100
|
* Get the angle for each twilight step.
|
|
101
|
-
* @returns angle in degrees.
|
|
101
|
+
* @returns The angle in degrees.
|
|
102
102
|
*/
|
|
103
103
|
getTwilightStepAngle(): number;
|
|
104
104
|
/**
|
|
105
105
|
* Set the angle for each twilight step.
|
|
106
|
-
* @param
|
|
106
|
+
* @param angle in degrees.
|
|
107
107
|
*/
|
|
108
|
-
setTwilightStepAngle(
|
|
108
|
+
setTwilightStepAngle(angle: number): void;
|
|
109
109
|
/**
|
|
110
110
|
* Get the attenuation factor for each twilight step.
|
|
111
|
-
* @returns 0.0 means no attenuation, 1.0 means full attenuation.
|
|
111
|
+
* @returns The attenuation. 0.0 means no attenuation, 1.0 means full attenuation.
|
|
112
112
|
*/
|
|
113
113
|
getTwilightAttenuation(): number;
|
|
114
114
|
/**
|
|
115
115
|
* Set the attenuation factor for each twilight step.
|
|
116
|
-
* @param
|
|
116
|
+
* @param attenuation 0.0 means no attenuation, 1.0 means full attenuation.
|
|
117
117
|
*/
|
|
118
|
-
setTwilightAttenuation(
|
|
118
|
+
setTwilightAttenuation(attenuation: number): void;
|
|
119
119
|
onAdd(map: MaplibreMap, gl: WebGLRenderingContext): void;
|
|
120
120
|
onRemove(): void;
|
|
121
121
|
render(gl: WebGLRenderingContext, matrix: mat4): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maplibre-gl-nightlayer",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.5",
|
|
4
4
|
"description": "A Night Layer for MapLibre GL JS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"terminator"
|
|
29
29
|
],
|
|
30
30
|
"author": "kikuchan98@gmail.com",
|
|
31
|
+
"homepage": "https://github.com/kikuchan/maplibre-gl-nightlayer#readme",
|
|
31
32
|
"license": "MIT",
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@biomejs/biome": "^1.9.4",
|