@canvasengine/presets 2.0.0-beta.51 → 2.0.0-beta.53
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/dist/FogOfWar.d.ts +38 -0
- package/dist/FogOfWar.d.ts.map +1 -0
- package/dist/NightAmbiant.d.ts +140 -2
- package/dist/NightAmbiant.d.ts.map +1 -1
- package/dist/Weathers/fog.d.ts.map +1 -1
- package/dist/Weathers/index.d.ts +376 -0
- package/dist/Weathers/index.d.ts.map +1 -1
- package/dist/Weathers/rain.d.ts.map +1 -1
- package/dist/Weathers/snow.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.global.js +310 -116
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2848 -2275
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
type FogColor = [number, number, number, number];
|
|
2
|
+
type FogVisibilityState = "visible" | "explored" | "unknown";
|
|
3
|
+
type VisionSource = {
|
|
4
|
+
x: number | (() => number);
|
|
5
|
+
y: number | (() => number);
|
|
6
|
+
radius: number | (() => number);
|
|
7
|
+
enabled?: boolean | (() => boolean);
|
|
8
|
+
};
|
|
9
|
+
type FogOfWarColors = {
|
|
10
|
+
unknown?: FogColor;
|
|
11
|
+
explored?: FogColor;
|
|
12
|
+
};
|
|
13
|
+
type FogOfWarProps = {
|
|
14
|
+
mapWidth: number | (() => number);
|
|
15
|
+
mapHeight: number | (() => number);
|
|
16
|
+
tileSize?: number | (() => number);
|
|
17
|
+
smooth?: boolean | (() => boolean);
|
|
18
|
+
renderScale?: number | (() => number);
|
|
19
|
+
edgeSoftness?: number | (() => number);
|
|
20
|
+
visionSources?: VisionSource[] | (() => VisionSource[]);
|
|
21
|
+
colors?: FogOfWarColors | (() => FogOfWarColors);
|
|
22
|
+
updateHz?: number | (() => number);
|
|
23
|
+
initialExplored?: boolean | (() => boolean);
|
|
24
|
+
controller?: FogOfWarController | (() => FogOfWarController);
|
|
25
|
+
obstacleMap?: unknown;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
export type FogOfWarController = {
|
|
29
|
+
version: () => number;
|
|
30
|
+
clarityAt: (x: number, y: number) => number;
|
|
31
|
+
isVisibleAt: (x: number, y: number, threshold?: number) => boolean;
|
|
32
|
+
isExploredAt: (x: number, y: number) => boolean;
|
|
33
|
+
stateAt: (x: number, y: number, clearThreshold?: number) => FogVisibilityState;
|
|
34
|
+
};
|
|
35
|
+
export declare function createFogOfWarController(): FogOfWarController;
|
|
36
|
+
export declare function FogOfWar(options: FogOfWarProps): import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance> | Promise<import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance>>;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=FogOfWar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FogOfWar.d.ts","sourceRoot":"","sources":["../src/FogOfWar.ts"],"names":[],"mappings":"AAGA,KAAK,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACjD,KAAK,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7D,KAAK,YAAY,GAAG;IAClB,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAC3B,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAC;CACrC,CAAC;AASF,KAAK,cAAc,GAAG;IACpB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB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EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,kBAAkB,CAAC;CAChF,CAAC;AAsBF,wBAAgB,wBAAwB,IAAI,kBAAkB,CAqC7D;AAwBD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,aAAa,gKA+U9C"}
|
package/dist/NightAmbiant.d.ts
CHANGED
|
@@ -1,3 +1,141 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Filter } from 'pixi.js';
|
|
2
|
+
type PointLike = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
type BoundsLike = {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
type ScreenPointLike = {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
type ReactiveValue<T> = T | (() => T);
|
|
17
|
+
type ViewportLike = {
|
|
18
|
+
getVisibleBounds?: () => BoundsLike | null | undefined;
|
|
19
|
+
toScreen?: (x: number, y: number) => ScreenPointLike;
|
|
20
|
+
};
|
|
21
|
+
export type NightSpot = PointLike & {
|
|
22
|
+
radius?: number;
|
|
23
|
+
intensity?: number;
|
|
24
|
+
flicker?: boolean;
|
|
25
|
+
flickerSpeed?: number;
|
|
26
|
+
pulse?: boolean;
|
|
27
|
+
pulseSpeed?: number;
|
|
28
|
+
phase?: number;
|
|
29
|
+
};
|
|
30
|
+
export type NightSpotInput = {
|
|
31
|
+
x: ReactiveValue<number>;
|
|
32
|
+
y: ReactiveValue<number>;
|
|
33
|
+
radius?: ReactiveValue<number>;
|
|
34
|
+
intensity?: ReactiveValue<number>;
|
|
35
|
+
flicker?: ReactiveValue<boolean>;
|
|
36
|
+
flickerSpeed?: ReactiveValue<number>;
|
|
37
|
+
pulse?: ReactiveValue<boolean>;
|
|
38
|
+
pulseSpeed?: ReactiveValue<number>;
|
|
39
|
+
phase?: ReactiveValue<number>;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Color input type supporting hex string, number, or RGB array.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* // Hex string
|
|
47
|
+
* const color1: ColorInput = "#0a1020";
|
|
48
|
+
* // Number
|
|
49
|
+
* const color2: ColorInput = 0x0a1020;
|
|
50
|
+
* // RGB tuple (0-255)
|
|
51
|
+
* const color3: ColorInput = [10, 16, 32];
|
|
52
|
+
* // Normalized RGB (0-1)
|
|
53
|
+
* const color4: ColorInput = [0.04, 0.06, 0.12];
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export type ColorInput = string | number | [number, number, number];
|
|
57
|
+
export type NightAmbiantProps = {
|
|
58
|
+
/** Main reactive list of light spots. */
|
|
59
|
+
lightSpots?: ReactiveValue<Array<NightSpotInput | NightSpot>>;
|
|
60
|
+
/** Alias for `lightSpots` for compatibility. */
|
|
61
|
+
spots?: ReactiveValue<Array<NightSpotInput | NightSpot>>;
|
|
62
|
+
/** Darkness intensity outside light spots (0 = no darkening, 1 = full black). Default: 0.75 */
|
|
63
|
+
darkness?: ReactiveValue<number>;
|
|
64
|
+
/** Tint color applied in dark zones. Default: "#000000" */
|
|
65
|
+
darkColor?: ReactiveValue<ColorInput>;
|
|
66
|
+
/** Fog color around light spots. Default: "#141424" */
|
|
67
|
+
fogColor?: ReactiveValue<ColorInput>;
|
|
68
|
+
/** Distance from light center where fog starts (0-1). Default: 0.5 */
|
|
69
|
+
fogRadius?: ReactiveValue<number>;
|
|
70
|
+
/** Width of the fog transition. Default: 0.35 */
|
|
71
|
+
fogSoftness?: ReactiveValue<number>;
|
|
72
|
+
};
|
|
73
|
+
export type NightFilter = Filter & {
|
|
74
|
+
setLightWorldPosition: (position: PointLike | null) => void;
|
|
75
|
+
getLightWorldPosition: () => PointLike | null;
|
|
76
|
+
setSpots: (spots: NightSpot[]) => void;
|
|
77
|
+
getSpots: () => NightSpot[];
|
|
78
|
+
syncLightToViewport: () => void;
|
|
79
|
+
setDarkness: (value: number) => void;
|
|
80
|
+
setDarkColor: (color: ColorInput) => void;
|
|
81
|
+
setFogColor: (color: ColorInput) => void;
|
|
82
|
+
setFogRadius: (value: number) => void;
|
|
83
|
+
setFogSoftness: (value: number) => void;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Creates a night filter with configurable light spots, darkness, and fog effects.
|
|
87
|
+
*
|
|
88
|
+
* The filter renders a dark overlay with circular light spots that illuminate areas.
|
|
89
|
+
* It supports multiple spots with individual intensity, radius, flicker, and pulse effects.
|
|
90
|
+
*
|
|
91
|
+
* @param viewport - Optional viewport for world-to-screen coordinate conversion
|
|
92
|
+
* @param options - Configuration options for the filter
|
|
93
|
+
* @returns A NightFilter instance with methods to control the effect
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* const filter = createNightFilter(viewport, {
|
|
98
|
+
* spots: [{ x: 100, y: 100, radius: 200, intensity: 1.0 }],
|
|
99
|
+
* darkness: 0.8,
|
|
100
|
+
* darkColor: "#0a1020",
|
|
101
|
+
* fogColor: "#141a2a",
|
|
102
|
+
* });
|
|
103
|
+
* container.filters = [filter];
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
export declare function createNightFilter(viewport?: ViewportLike, options?: {
|
|
107
|
+
lightWorldPosition?: PointLike | null;
|
|
108
|
+
spots?: NightSpot[];
|
|
109
|
+
getBounds?: () => BoundsLike | null | undefined;
|
|
110
|
+
darkness?: number;
|
|
111
|
+
darkColor?: ColorInput;
|
|
112
|
+
fogColor?: ColorInput;
|
|
113
|
+
fogRadius?: number;
|
|
114
|
+
fogSoftness?: number;
|
|
115
|
+
}): NightFilter;
|
|
116
|
+
/**
|
|
117
|
+
* Night ambiance component that adds a dark overlay with dynamic light spots.
|
|
118
|
+
*
|
|
119
|
+
* This component creates a night-time atmosphere with configurable darkness,
|
|
120
|
+
* fog effects, and multiple light sources. It automatically attaches to a
|
|
121
|
+
* Viewport if present in context, otherwise to the parent container.
|
|
122
|
+
*
|
|
123
|
+
* All props are reactive and support signal/function values.
|
|
124
|
+
*
|
|
125
|
+
* @param options - Configuration options for the night ambiance effect
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```html
|
|
129
|
+
* <Viewport worldWidth={2048} worldHeight={2048} screen>
|
|
130
|
+
* <NightAmbiant
|
|
131
|
+
* lightSpots={lightSpots}
|
|
132
|
+
* darkness={0.8}
|
|
133
|
+
* darkColor="#0a1020"
|
|
134
|
+
* fogColor="#141a2a"
|
|
135
|
+
* />
|
|
136
|
+
* </Viewport>
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
export declare function NightAmbiant(options?: NightAmbiantProps): import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance> | Promise<import('../packages/core/src/index.ts').Element<import('../packages/core/src/index.ts').ComponentInstance>>;
|
|
140
|
+
export {};
|
|
3
141
|
//# sourceMappingURL=NightAmbiant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NightAmbiant.d.ts","sourceRoot":"","sources":["../src/NightAmbiant.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NightAmbiant.d.ts","sourceRoot":"","sources":["../src/NightAmbiant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAgBjC,KAAK,SAAS,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1C,KAAK,UAAU,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1E,KAAK,eAAe,GAAG;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,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AA+CF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,CAAC,EAAE,YAAY,EACvB,OAAO,CAAC,EAAE;IACR,kBAAkB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GACA,WAAW,CAqIb;AA6DD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,iBAAsB,gKAmG3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fog.d.ts","sourceRoot":"","sources":["../../src/Weathers/fog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,wBAAgB,eAAe,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"fog.d.ts","sourceRoot":"","sources":["../../src/Weathers/fog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,wBAAgB,eAAe,IAAI,SAAS,CAqH3C;AAED,wBAAgB,iBAAiB,IAAI,SAAS,CAiJ7C"}
|
package/dist/Weathers/index.d.ts
CHANGED
|
@@ -1,3 +1,379 @@
|
|
|
1
|
+
export declare const RAIN_PRESETS: {
|
|
2
|
+
readonly lightRain: {
|
|
3
|
+
readonly effect: "rain";
|
|
4
|
+
readonly speed: 0.35;
|
|
5
|
+
readonly windDirection: 0.1;
|
|
6
|
+
readonly windStrength: 0.15;
|
|
7
|
+
readonly density: 110;
|
|
8
|
+
readonly maxDrops: 90;
|
|
9
|
+
};
|
|
10
|
+
readonly steadyRain: {
|
|
11
|
+
readonly effect: "rain";
|
|
12
|
+
readonly speed: 0.6;
|
|
13
|
+
readonly windDirection: 0.2;
|
|
14
|
+
readonly windStrength: 0.3;
|
|
15
|
+
readonly density: 180;
|
|
16
|
+
readonly maxDrops: 120;
|
|
17
|
+
};
|
|
18
|
+
readonly stormRain: {
|
|
19
|
+
readonly effect: "rain";
|
|
20
|
+
readonly speed: 1.4;
|
|
21
|
+
readonly windDirection: 0.7;
|
|
22
|
+
readonly windStrength: 0.75;
|
|
23
|
+
readonly density: 300;
|
|
24
|
+
readonly maxDrops: 150;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const SNOW_PRESETS: {
|
|
28
|
+
readonly lightSnow: {
|
|
29
|
+
readonly effect: "snow";
|
|
30
|
+
readonly speed: 0.35;
|
|
31
|
+
readonly windDirection: 0.1;
|
|
32
|
+
readonly windStrength: 0.18;
|
|
33
|
+
readonly density: 90;
|
|
34
|
+
readonly maxDrops: 100;
|
|
35
|
+
};
|
|
36
|
+
readonly winterSnow: {
|
|
37
|
+
readonly effect: "snow";
|
|
38
|
+
readonly speed: 0.5;
|
|
39
|
+
readonly windDirection: 0.2;
|
|
40
|
+
readonly windStrength: 0.28;
|
|
41
|
+
readonly density: 150;
|
|
42
|
+
readonly maxDrops: 130;
|
|
43
|
+
};
|
|
44
|
+
readonly blizzardSnow: {
|
|
45
|
+
readonly effect: "snow";
|
|
46
|
+
readonly speed: 1.1;
|
|
47
|
+
readonly windDirection: 0.8;
|
|
48
|
+
readonly windStrength: 0.75;
|
|
49
|
+
readonly density: 290;
|
|
50
|
+
readonly maxDrops: 160;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export declare const FOG_PRESETS: {
|
|
54
|
+
readonly rpgMorningMist: {
|
|
55
|
+
readonly effect: "fog";
|
|
56
|
+
readonly speed: 0.16;
|
|
57
|
+
readonly density: 0.75;
|
|
58
|
+
readonly height: 0.45;
|
|
59
|
+
readonly scale: 1.35;
|
|
60
|
+
};
|
|
61
|
+
readonly rpgForestFog: {
|
|
62
|
+
readonly effect: "fog";
|
|
63
|
+
readonly speed: 0.22;
|
|
64
|
+
readonly density: 1;
|
|
65
|
+
readonly height: 0.62;
|
|
66
|
+
readonly scale: 1.75;
|
|
67
|
+
};
|
|
68
|
+
readonly rpgSwampFog: {
|
|
69
|
+
readonly effect: "fog";
|
|
70
|
+
readonly speed: 0.14;
|
|
71
|
+
readonly density: 1.3;
|
|
72
|
+
readonly height: 0.55;
|
|
73
|
+
readonly scale: 2.1;
|
|
74
|
+
};
|
|
75
|
+
readonly rpgNightFog: {
|
|
76
|
+
readonly effect: "fog";
|
|
77
|
+
readonly speed: 0.12;
|
|
78
|
+
readonly density: 1.15;
|
|
79
|
+
readonly height: 0.58;
|
|
80
|
+
readonly scale: 1.9;
|
|
81
|
+
};
|
|
82
|
+
readonly rpgHeavyFog: {
|
|
83
|
+
readonly effect: "fog";
|
|
84
|
+
readonly speed: 0.1;
|
|
85
|
+
readonly density: 1.7;
|
|
86
|
+
readonly height: 0.72;
|
|
87
|
+
readonly scale: 2.3;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export declare const CLOUD_PRESETS: {
|
|
91
|
+
readonly lightClouds: {
|
|
92
|
+
readonly effect: "cloud";
|
|
93
|
+
readonly speed: 0.16;
|
|
94
|
+
readonly density: 0.55;
|
|
95
|
+
readonly height: 0.72;
|
|
96
|
+
readonly scale: 1.35;
|
|
97
|
+
readonly sunIntensity: 1;
|
|
98
|
+
readonly sunAngle: 0.84;
|
|
99
|
+
readonly raySpread: 0.92;
|
|
100
|
+
readonly rayTwinkle: 0.25;
|
|
101
|
+
readonly rayTwinkleSpeed: 0.9;
|
|
102
|
+
};
|
|
103
|
+
readonly overcastClouds: {
|
|
104
|
+
readonly effect: "cloud";
|
|
105
|
+
readonly speed: 0.12;
|
|
106
|
+
readonly density: 0.95;
|
|
107
|
+
readonly height: 0.86;
|
|
108
|
+
readonly scale: 1.85;
|
|
109
|
+
readonly sunIntensity: 0.4;
|
|
110
|
+
readonly sunAngle: 0.95;
|
|
111
|
+
readonly raySpread: 1.15;
|
|
112
|
+
readonly rayTwinkle: 0.18;
|
|
113
|
+
readonly rayTwinkleSpeed: 0.7;
|
|
114
|
+
};
|
|
115
|
+
readonly stormClouds: {
|
|
116
|
+
readonly effect: "cloud";
|
|
117
|
+
readonly speed: 0.2;
|
|
118
|
+
readonly density: 1.25;
|
|
119
|
+
readonly height: 0.94;
|
|
120
|
+
readonly scale: 2.2;
|
|
121
|
+
readonly sunIntensity: 0.12;
|
|
122
|
+
readonly sunAngle: 1.08;
|
|
123
|
+
readonly raySpread: 1.35;
|
|
124
|
+
readonly rayTwinkle: 0.12;
|
|
125
|
+
readonly rayTwinkleSpeed: 0.6;
|
|
126
|
+
};
|
|
127
|
+
readonly goldenHourRays: {
|
|
128
|
+
readonly effect: "cloud";
|
|
129
|
+
readonly speed: 0.14;
|
|
130
|
+
readonly density: 0.72;
|
|
131
|
+
readonly height: 0.82;
|
|
132
|
+
readonly scale: 1.5;
|
|
133
|
+
readonly sunIntensity: 1.3;
|
|
134
|
+
readonly sunAngle: 0.72;
|
|
135
|
+
readonly raySpread: 0.78;
|
|
136
|
+
readonly rayTwinkle: 0.78;
|
|
137
|
+
readonly rayTwinkleSpeed: 1.4;
|
|
138
|
+
};
|
|
139
|
+
readonly sunnySoftRays: {
|
|
140
|
+
readonly effect: "cloud";
|
|
141
|
+
readonly speed: 0.13;
|
|
142
|
+
readonly density: 0.62;
|
|
143
|
+
readonly height: 0.76;
|
|
144
|
+
readonly scale: 1.4;
|
|
145
|
+
readonly sunIntensity: 1.05;
|
|
146
|
+
readonly sunAngle: 0.8;
|
|
147
|
+
readonly raySpread: 0.95;
|
|
148
|
+
readonly rayTwinkle: 0.35;
|
|
149
|
+
readonly rayTwinkleSpeed: 0.95;
|
|
150
|
+
};
|
|
151
|
+
readonly sunsetTwinkleRays: {
|
|
152
|
+
readonly effect: "cloud";
|
|
153
|
+
readonly speed: 0.1;
|
|
154
|
+
readonly density: 0.74;
|
|
155
|
+
readonly height: 0.84;
|
|
156
|
+
readonly scale: 1.55;
|
|
157
|
+
readonly sunIntensity: 1.35;
|
|
158
|
+
readonly sunAngle: 0.64;
|
|
159
|
+
readonly raySpread: 0.8;
|
|
160
|
+
readonly rayTwinkle: 1;
|
|
161
|
+
readonly rayTwinkleSpeed: 1.6;
|
|
162
|
+
};
|
|
163
|
+
readonly dramaticCrepuscularRays: {
|
|
164
|
+
readonly effect: "cloud";
|
|
165
|
+
readonly speed: 0.11;
|
|
166
|
+
readonly density: 0.9;
|
|
167
|
+
readonly height: 0.9;
|
|
168
|
+
readonly scale: 1.9;
|
|
169
|
+
readonly sunIntensity: 1.5;
|
|
170
|
+
readonly sunAngle: 0.7;
|
|
171
|
+
readonly raySpread: 0.68;
|
|
172
|
+
readonly rayTwinkle: 0.6;
|
|
173
|
+
readonly rayTwinkleSpeed: 1.2;
|
|
174
|
+
};
|
|
175
|
+
readonly morningHazeRays: {
|
|
176
|
+
readonly effect: "cloud";
|
|
177
|
+
readonly speed: 0.09;
|
|
178
|
+
readonly density: 0.52;
|
|
179
|
+
readonly height: 0.7;
|
|
180
|
+
readonly scale: 1.3;
|
|
181
|
+
readonly sunIntensity: 0.9;
|
|
182
|
+
readonly sunAngle: 0.9;
|
|
183
|
+
readonly raySpread: 1.05;
|
|
184
|
+
readonly rayTwinkle: 0.42;
|
|
185
|
+
readonly rayTwinkleSpeed: 0.8;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
export declare const WEATHER_PRESETS: {
|
|
189
|
+
readonly rain: {
|
|
190
|
+
readonly lightRain: {
|
|
191
|
+
readonly effect: "rain";
|
|
192
|
+
readonly speed: 0.35;
|
|
193
|
+
readonly windDirection: 0.1;
|
|
194
|
+
readonly windStrength: 0.15;
|
|
195
|
+
readonly density: 110;
|
|
196
|
+
readonly maxDrops: 90;
|
|
197
|
+
};
|
|
198
|
+
readonly steadyRain: {
|
|
199
|
+
readonly effect: "rain";
|
|
200
|
+
readonly speed: 0.6;
|
|
201
|
+
readonly windDirection: 0.2;
|
|
202
|
+
readonly windStrength: 0.3;
|
|
203
|
+
readonly density: 180;
|
|
204
|
+
readonly maxDrops: 120;
|
|
205
|
+
};
|
|
206
|
+
readonly stormRain: {
|
|
207
|
+
readonly effect: "rain";
|
|
208
|
+
readonly speed: 1.4;
|
|
209
|
+
readonly windDirection: 0.7;
|
|
210
|
+
readonly windStrength: 0.75;
|
|
211
|
+
readonly density: 300;
|
|
212
|
+
readonly maxDrops: 150;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
readonly snow: {
|
|
216
|
+
readonly lightSnow: {
|
|
217
|
+
readonly effect: "snow";
|
|
218
|
+
readonly speed: 0.35;
|
|
219
|
+
readonly windDirection: 0.1;
|
|
220
|
+
readonly windStrength: 0.18;
|
|
221
|
+
readonly density: 90;
|
|
222
|
+
readonly maxDrops: 100;
|
|
223
|
+
};
|
|
224
|
+
readonly winterSnow: {
|
|
225
|
+
readonly effect: "snow";
|
|
226
|
+
readonly speed: 0.5;
|
|
227
|
+
readonly windDirection: 0.2;
|
|
228
|
+
readonly windStrength: 0.28;
|
|
229
|
+
readonly density: 150;
|
|
230
|
+
readonly maxDrops: 130;
|
|
231
|
+
};
|
|
232
|
+
readonly blizzardSnow: {
|
|
233
|
+
readonly effect: "snow";
|
|
234
|
+
readonly speed: 1.1;
|
|
235
|
+
readonly windDirection: 0.8;
|
|
236
|
+
readonly windStrength: 0.75;
|
|
237
|
+
readonly density: 290;
|
|
238
|
+
readonly maxDrops: 160;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
readonly fog: {
|
|
242
|
+
readonly rpgMorningMist: {
|
|
243
|
+
readonly effect: "fog";
|
|
244
|
+
readonly speed: 0.16;
|
|
245
|
+
readonly density: 0.75;
|
|
246
|
+
readonly height: 0.45;
|
|
247
|
+
readonly scale: 1.35;
|
|
248
|
+
};
|
|
249
|
+
readonly rpgForestFog: {
|
|
250
|
+
readonly effect: "fog";
|
|
251
|
+
readonly speed: 0.22;
|
|
252
|
+
readonly density: 1;
|
|
253
|
+
readonly height: 0.62;
|
|
254
|
+
readonly scale: 1.75;
|
|
255
|
+
};
|
|
256
|
+
readonly rpgSwampFog: {
|
|
257
|
+
readonly effect: "fog";
|
|
258
|
+
readonly speed: 0.14;
|
|
259
|
+
readonly density: 1.3;
|
|
260
|
+
readonly height: 0.55;
|
|
261
|
+
readonly scale: 2.1;
|
|
262
|
+
};
|
|
263
|
+
readonly rpgNightFog: {
|
|
264
|
+
readonly effect: "fog";
|
|
265
|
+
readonly speed: 0.12;
|
|
266
|
+
readonly density: 1.15;
|
|
267
|
+
readonly height: 0.58;
|
|
268
|
+
readonly scale: 1.9;
|
|
269
|
+
};
|
|
270
|
+
readonly rpgHeavyFog: {
|
|
271
|
+
readonly effect: "fog";
|
|
272
|
+
readonly speed: 0.1;
|
|
273
|
+
readonly density: 1.7;
|
|
274
|
+
readonly height: 0.72;
|
|
275
|
+
readonly scale: 2.3;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
readonly cloud: {
|
|
279
|
+
readonly lightClouds: {
|
|
280
|
+
readonly effect: "cloud";
|
|
281
|
+
readonly speed: 0.16;
|
|
282
|
+
readonly density: 0.55;
|
|
283
|
+
readonly height: 0.72;
|
|
284
|
+
readonly scale: 1.35;
|
|
285
|
+
readonly sunIntensity: 1;
|
|
286
|
+
readonly sunAngle: 0.84;
|
|
287
|
+
readonly raySpread: 0.92;
|
|
288
|
+
readonly rayTwinkle: 0.25;
|
|
289
|
+
readonly rayTwinkleSpeed: 0.9;
|
|
290
|
+
};
|
|
291
|
+
readonly overcastClouds: {
|
|
292
|
+
readonly effect: "cloud";
|
|
293
|
+
readonly speed: 0.12;
|
|
294
|
+
readonly density: 0.95;
|
|
295
|
+
readonly height: 0.86;
|
|
296
|
+
readonly scale: 1.85;
|
|
297
|
+
readonly sunIntensity: 0.4;
|
|
298
|
+
readonly sunAngle: 0.95;
|
|
299
|
+
readonly raySpread: 1.15;
|
|
300
|
+
readonly rayTwinkle: 0.18;
|
|
301
|
+
readonly rayTwinkleSpeed: 0.7;
|
|
302
|
+
};
|
|
303
|
+
readonly stormClouds: {
|
|
304
|
+
readonly effect: "cloud";
|
|
305
|
+
readonly speed: 0.2;
|
|
306
|
+
readonly density: 1.25;
|
|
307
|
+
readonly height: 0.94;
|
|
308
|
+
readonly scale: 2.2;
|
|
309
|
+
readonly sunIntensity: 0.12;
|
|
310
|
+
readonly sunAngle: 1.08;
|
|
311
|
+
readonly raySpread: 1.35;
|
|
312
|
+
readonly rayTwinkle: 0.12;
|
|
313
|
+
readonly rayTwinkleSpeed: 0.6;
|
|
314
|
+
};
|
|
315
|
+
readonly goldenHourRays: {
|
|
316
|
+
readonly effect: "cloud";
|
|
317
|
+
readonly speed: 0.14;
|
|
318
|
+
readonly density: 0.72;
|
|
319
|
+
readonly height: 0.82;
|
|
320
|
+
readonly scale: 1.5;
|
|
321
|
+
readonly sunIntensity: 1.3;
|
|
322
|
+
readonly sunAngle: 0.72;
|
|
323
|
+
readonly raySpread: 0.78;
|
|
324
|
+
readonly rayTwinkle: 0.78;
|
|
325
|
+
readonly rayTwinkleSpeed: 1.4;
|
|
326
|
+
};
|
|
327
|
+
readonly sunnySoftRays: {
|
|
328
|
+
readonly effect: "cloud";
|
|
329
|
+
readonly speed: 0.13;
|
|
330
|
+
readonly density: 0.62;
|
|
331
|
+
readonly height: 0.76;
|
|
332
|
+
readonly scale: 1.4;
|
|
333
|
+
readonly sunIntensity: 1.05;
|
|
334
|
+
readonly sunAngle: 0.8;
|
|
335
|
+
readonly raySpread: 0.95;
|
|
336
|
+
readonly rayTwinkle: 0.35;
|
|
337
|
+
readonly rayTwinkleSpeed: 0.95;
|
|
338
|
+
};
|
|
339
|
+
readonly sunsetTwinkleRays: {
|
|
340
|
+
readonly effect: "cloud";
|
|
341
|
+
readonly speed: 0.1;
|
|
342
|
+
readonly density: 0.74;
|
|
343
|
+
readonly height: 0.84;
|
|
344
|
+
readonly scale: 1.55;
|
|
345
|
+
readonly sunIntensity: 1.35;
|
|
346
|
+
readonly sunAngle: 0.64;
|
|
347
|
+
readonly raySpread: 0.8;
|
|
348
|
+
readonly rayTwinkle: 1;
|
|
349
|
+
readonly rayTwinkleSpeed: 1.6;
|
|
350
|
+
};
|
|
351
|
+
readonly dramaticCrepuscularRays: {
|
|
352
|
+
readonly effect: "cloud";
|
|
353
|
+
readonly speed: 0.11;
|
|
354
|
+
readonly density: 0.9;
|
|
355
|
+
readonly height: 0.9;
|
|
356
|
+
readonly scale: 1.9;
|
|
357
|
+
readonly sunIntensity: 1.5;
|
|
358
|
+
readonly sunAngle: 0.7;
|
|
359
|
+
readonly raySpread: 0.68;
|
|
360
|
+
readonly rayTwinkle: 0.6;
|
|
361
|
+
readonly rayTwinkleSpeed: 1.2;
|
|
362
|
+
};
|
|
363
|
+
readonly morningHazeRays: {
|
|
364
|
+
readonly effect: "cloud";
|
|
365
|
+
readonly speed: 0.09;
|
|
366
|
+
readonly density: 0.52;
|
|
367
|
+
readonly height: 0.7;
|
|
368
|
+
readonly scale: 1.3;
|
|
369
|
+
readonly sunIntensity: 0.9;
|
|
370
|
+
readonly sunAngle: 0.9;
|
|
371
|
+
readonly raySpread: 1.05;
|
|
372
|
+
readonly rayTwinkle: 0.42;
|
|
373
|
+
readonly rayTwinkleSpeed: 0.8;
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
};
|
|
1
377
|
/**
|
|
2
378
|
* Weather Effect Component (optimized)
|
|
3
379
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Weathers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Weathers/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;CAIf,CAAC;AAEX,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;CAIf,CAAC;AAEX,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMd,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAShB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKlB,CAAC;AAGX;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,YAAO,iKAwXpC,CAAC;AAEF,eAAO,MAAM,OAAO,gLAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rain.d.ts","sourceRoot":"","sources":["../../src/Weathers/rain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,wBAAgB,gBAAgB,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"rain.d.ts","sourceRoot":"","sources":["../../src/Weathers/rain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,wBAAgB,gBAAgB,IAAI,SAAS,CAoG5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow.d.ts","sourceRoot":"","sources":["../../src/Weathers/snow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"snow.d.ts","sourceRoot":"","sources":["../../src/Weathers/snow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,CA2G5C"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA"}
|