@soonspacejs/plugin-effect 2.13.10 → 2.13.11
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/builds/BuildsShader.d.ts +5 -5
- package/dist/circle-wave/index.d.ts +28 -28
- package/dist/contact-shadows/HorizontalBlurShader.d.ts +21 -21
- package/dist/contact-shadows/VerticalBlurShader.d.ts +21 -21
- package/dist/contact-shadows/index.d.ts +2 -2
- package/dist/cylinder-wave/index.d.ts +23 -23
- package/dist/flame/FlameImg.d.ts +2 -2
- package/dist/flame/FlameShader.d.ts +17 -17
- package/dist/index.d.ts +196 -196
- package/dist/index.esm.js +1 -1
- package/dist/points-wave/PointsWaveShader.d.ts +5 -5
- package/dist/sparkles/SparklesShader.d.ts +5 -5
- package/dist/sparkles/SparklesUtils.d.ts +6 -6
- package/dist/water/index.d.ts +52 -52
- package/dist/water/tools.d.ts +3 -3
- package/dist/weather/RainImg.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,196 +1,196 @@
|
|
|
1
|
-
import { Blending } from 'three';
|
|
2
|
-
import SoonSpace, { IVector3, IColor } from 'soonspacejs';
|
|
3
|
-
import type { PluginObject, PluginObjectInfo } from 'soonspacejs';
|
|
4
|
-
import {
|
|
5
|
-
export * from '@three3d/particle';
|
|
6
|
-
import { InnerCircleWaveOptions } from './circle-wave';
|
|
7
|
-
import { InnerCylinderWaveOptions } from './cylinder-wave';
|
|
8
|
-
import { WaterOptions } from './water';
|
|
9
|
-
export interface FlameOptions extends PluginObjectInfo {
|
|
10
|
-
magnitude?: number;
|
|
11
|
-
gain?: number;
|
|
12
|
-
imgUrl?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface SmokeOptions extends PluginObjectInfo {
|
|
15
|
-
imgUrl?: string;
|
|
16
|
-
count?: number;
|
|
17
|
-
maxAge?: number;
|
|
18
|
-
size?: number;
|
|
19
|
-
acceleration?: number;
|
|
20
|
-
velocity?: IVector3;
|
|
21
|
-
color?: IColor[];
|
|
22
|
-
}
|
|
23
|
-
export interface Smoke2Options extends PluginObjectInfo {
|
|
24
|
-
imgUrl?: string;
|
|
25
|
-
radius?: number;
|
|
26
|
-
maxLife?: number;
|
|
27
|
-
maxSize?: number;
|
|
28
|
-
rate?: number;
|
|
29
|
-
colors?: IColor[];
|
|
30
|
-
blending?: Blending;
|
|
31
|
-
}
|
|
32
|
-
export interface SparklesOptions extends PluginObjectInfo {
|
|
33
|
-
count?: number;
|
|
34
|
-
speed?: number | Float32Array;
|
|
35
|
-
opacity?: number | Float32Array;
|
|
36
|
-
color?: IColor | Float32Array;
|
|
37
|
-
size?: number | Float32Array;
|
|
38
|
-
scalar?: number | [number, number, number] | IVector3;
|
|
39
|
-
noise?: number | [number, number, number] | IVector3 | Float32Array;
|
|
40
|
-
}
|
|
41
|
-
export interface CreateWaterOptions extends PluginObjectInfo, Omit<WaterOptions, 'userData'> {
|
|
42
|
-
/**
|
|
43
|
-
* 是否开启水的动画
|
|
44
|
-
* @remarks
|
|
45
|
-
* 如果开启,则会一直触发场景渲染
|
|
46
|
-
* 如果关闭,则不会主动触发场景渲染,但在渲染渲染时仍会有动画效果,只是不会主动触发场景渲染
|
|
47
|
-
*/
|
|
48
|
-
animation?: boolean;
|
|
49
|
-
}
|
|
50
|
-
export interface ContactShadowsOptions extends Omit<PluginObjectInfo, 'scale'> {
|
|
51
|
-
opacity?: number;
|
|
52
|
-
width?: number;
|
|
53
|
-
height?: number;
|
|
54
|
-
blur?: number;
|
|
55
|
-
far?: number;
|
|
56
|
-
resolution?: number;
|
|
57
|
-
frames?: number;
|
|
58
|
-
scale?: number | [x: number, y: number];
|
|
59
|
-
darkness?: number;
|
|
60
|
-
}
|
|
61
|
-
export interface WeatherOptions {
|
|
62
|
-
/**
|
|
63
|
-
* 粒子贴图
|
|
64
|
-
*/
|
|
65
|
-
imgUrl?: string;
|
|
66
|
-
/**
|
|
67
|
-
* 颜色
|
|
68
|
-
*/
|
|
69
|
-
color?: IColor;
|
|
70
|
-
/**
|
|
71
|
-
* 大小
|
|
72
|
-
*/
|
|
73
|
-
size?: number;
|
|
74
|
-
/**
|
|
75
|
-
* 不透明度
|
|
76
|
-
*/
|
|
77
|
-
opacity?: number;
|
|
78
|
-
/**
|
|
79
|
-
* 粒子数量
|
|
80
|
-
*/
|
|
81
|
-
count?: number;
|
|
82
|
-
/**
|
|
83
|
-
* 粒子范围
|
|
84
|
-
*/
|
|
85
|
-
range?: number;
|
|
86
|
-
/**
|
|
87
|
-
* 粒子左右速度的随机范围
|
|
88
|
-
*/
|
|
89
|
-
velocityX?: [number, number];
|
|
90
|
-
/**
|
|
91
|
-
* 粒子上下速度的随机范围
|
|
92
|
-
*/
|
|
93
|
-
velocityY?: [number, number];
|
|
94
|
-
}
|
|
95
|
-
export type CircleWaveOptions = InnerCircleWaveOptions & PluginObjectInfo;
|
|
96
|
-
export type CylinderWaveOptions = InnerCylinderWaveOptions & PluginObjectInfo;
|
|
97
|
-
export interface PointsWaveOptions extends PluginObjectInfo {
|
|
98
|
-
xAxisCount?: number;
|
|
99
|
-
zAxisCount?: number;
|
|
100
|
-
showDistance?: number;
|
|
101
|
-
separation?: number;
|
|
102
|
-
size?: number;
|
|
103
|
-
maxFluctua?: number;
|
|
104
|
-
color?: IColor;
|
|
105
|
-
opacity?: number;
|
|
106
|
-
}
|
|
107
|
-
export interface BuildsOptions extends PluginObjectInfo {
|
|
108
|
-
buildWidth?: number;
|
|
109
|
-
buildHeigh?: number;
|
|
110
|
-
buildDepth?: number;
|
|
111
|
-
count?: number;
|
|
112
|
-
gapX?: number;
|
|
113
|
-
gapZ?: number;
|
|
114
|
-
showDistance?: number;
|
|
115
|
-
randShift?: number;
|
|
116
|
-
color?: IColor;
|
|
117
|
-
}
|
|
118
|
-
declare class EffectPlugin {
|
|
119
|
-
readonly ssp: SoonSpace;
|
|
120
|
-
[x: string]: any;
|
|
121
|
-
/**
|
|
122
|
-
* 天气预设图片
|
|
123
|
-
*/
|
|
124
|
-
readonly weatherPresetImgs: {
|
|
125
|
-
rain: string;
|
|
126
|
-
snow: any;
|
|
127
|
-
};
|
|
128
|
-
private _weatherId;
|
|
129
|
-
constructor(ssp: SoonSpace);
|
|
130
|
-
/**
|
|
131
|
-
* 创建火焰
|
|
132
|
-
* @params params
|
|
133
|
-
* @returns
|
|
134
|
-
*/
|
|
135
|
-
createFlame(params: FlameOptions): PluginObject;
|
|
136
|
-
/**
|
|
137
|
-
* 创建烟雾
|
|
138
|
-
* @param params
|
|
139
|
-
* @returns
|
|
140
|
-
*/
|
|
141
|
-
createSmoke(params: SmokeOptions): PluginObject;
|
|
142
|
-
createSmoke2(params: Smoke2Options): PluginObject;
|
|
143
|
-
/**
|
|
144
|
-
* 创建星星
|
|
145
|
-
* @param params
|
|
146
|
-
* @returns
|
|
147
|
-
*/
|
|
148
|
-
createSparkles(params: SparklesOptions): PluginObject;
|
|
149
|
-
/**
|
|
150
|
-
* 创建接触阴影
|
|
151
|
-
* @params params
|
|
152
|
-
*/
|
|
153
|
-
createContactShadows({ scale, frames, opacity, width, height, blur, darkness, far, resolution, ...props }: ContactShadowsOptions): PluginObject;
|
|
154
|
-
/**
|
|
155
|
-
* 开启天气
|
|
156
|
-
* @param param0
|
|
157
|
-
*/
|
|
158
|
-
openWeather(params?: WeatherOptions): void;
|
|
159
|
-
/**
|
|
160
|
-
* 关闭天气
|
|
161
|
-
*/
|
|
162
|
-
closeWeather(): void;
|
|
163
|
-
/**
|
|
164
|
-
* 创建粒子簇
|
|
165
|
-
* @param options
|
|
166
|
-
* @returns
|
|
167
|
-
*/
|
|
168
|
-
createParticleCluster(options: ParticleClusterOptions):
|
|
169
|
-
/**
|
|
170
|
-
* 创建圆形光波
|
|
171
|
-
* @param options
|
|
172
|
-
* @returns
|
|
173
|
-
*/
|
|
174
|
-
createCircleWave(options: CircleWaveOptions): PluginObject;
|
|
175
|
-
/**
|
|
176
|
-
* 创建立柱光波
|
|
177
|
-
* @param options
|
|
178
|
-
* @returns
|
|
179
|
-
*/
|
|
180
|
-
createCylinderWave(options: CylinderWaveOptions): PluginObject;
|
|
181
|
-
/**
|
|
182
|
-
* 创建粒子波浪
|
|
183
|
-
* @param options
|
|
184
|
-
* @returns
|
|
185
|
-
*/
|
|
186
|
-
createPointsWave(options: PointsWaveOptions): PluginObject;
|
|
187
|
-
/**
|
|
188
|
-
* 创建建筑
|
|
189
|
-
* @param options
|
|
190
|
-
* @returns
|
|
191
|
-
*/
|
|
192
|
-
createBuilds(options: BuildsOptions): PluginObject;
|
|
193
|
-
createWater(options: CreateWaterOptions): PluginObject;
|
|
194
|
-
removeEffect(id: PluginObjectInfo['id']): boolean;
|
|
195
|
-
}
|
|
196
|
-
export default EffectPlugin;
|
|
1
|
+
import { Blending } from 'three';
|
|
2
|
+
import SoonSpace, { IVector3, IColor } from 'soonspacejs';
|
|
3
|
+
import type { PluginObject, PluginObjectInfo } from 'soonspacejs';
|
|
4
|
+
import { ParticleClusterOptions } from '@three3d/particle';
|
|
5
|
+
export * from '@three3d/particle';
|
|
6
|
+
import { InnerCircleWaveOptions } from './circle-wave';
|
|
7
|
+
import { InnerCylinderWaveOptions } from './cylinder-wave';
|
|
8
|
+
import { WaterOptions } from './water';
|
|
9
|
+
export interface FlameOptions extends PluginObjectInfo {
|
|
10
|
+
magnitude?: number;
|
|
11
|
+
gain?: number;
|
|
12
|
+
imgUrl?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SmokeOptions extends PluginObjectInfo {
|
|
15
|
+
imgUrl?: string;
|
|
16
|
+
count?: number;
|
|
17
|
+
maxAge?: number;
|
|
18
|
+
size?: number;
|
|
19
|
+
acceleration?: number;
|
|
20
|
+
velocity?: IVector3;
|
|
21
|
+
color?: IColor[];
|
|
22
|
+
}
|
|
23
|
+
export interface Smoke2Options extends PluginObjectInfo {
|
|
24
|
+
imgUrl?: string;
|
|
25
|
+
radius?: number;
|
|
26
|
+
maxLife?: number;
|
|
27
|
+
maxSize?: number;
|
|
28
|
+
rate?: number;
|
|
29
|
+
colors?: IColor[];
|
|
30
|
+
blending?: Blending;
|
|
31
|
+
}
|
|
32
|
+
export interface SparklesOptions extends PluginObjectInfo {
|
|
33
|
+
count?: number;
|
|
34
|
+
speed?: number | Float32Array;
|
|
35
|
+
opacity?: number | Float32Array;
|
|
36
|
+
color?: IColor | Float32Array;
|
|
37
|
+
size?: number | Float32Array;
|
|
38
|
+
scalar?: number | [number, number, number] | IVector3;
|
|
39
|
+
noise?: number | [number, number, number] | IVector3 | Float32Array;
|
|
40
|
+
}
|
|
41
|
+
export interface CreateWaterOptions extends PluginObjectInfo, Omit<WaterOptions, 'userData'> {
|
|
42
|
+
/**
|
|
43
|
+
* 是否开启水的动画
|
|
44
|
+
* @remarks
|
|
45
|
+
* 如果开启,则会一直触发场景渲染
|
|
46
|
+
* 如果关闭,则不会主动触发场景渲染,但在渲染渲染时仍会有动画效果,只是不会主动触发场景渲染
|
|
47
|
+
*/
|
|
48
|
+
animation?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface ContactShadowsOptions extends Omit<PluginObjectInfo, 'scale'> {
|
|
51
|
+
opacity?: number;
|
|
52
|
+
width?: number;
|
|
53
|
+
height?: number;
|
|
54
|
+
blur?: number;
|
|
55
|
+
far?: number;
|
|
56
|
+
resolution?: number;
|
|
57
|
+
frames?: number;
|
|
58
|
+
scale?: number | [x: number, y: number];
|
|
59
|
+
darkness?: number;
|
|
60
|
+
}
|
|
61
|
+
export interface WeatherOptions {
|
|
62
|
+
/**
|
|
63
|
+
* 粒子贴图
|
|
64
|
+
*/
|
|
65
|
+
imgUrl?: string;
|
|
66
|
+
/**
|
|
67
|
+
* 颜色
|
|
68
|
+
*/
|
|
69
|
+
color?: IColor;
|
|
70
|
+
/**
|
|
71
|
+
* 大小
|
|
72
|
+
*/
|
|
73
|
+
size?: number;
|
|
74
|
+
/**
|
|
75
|
+
* 不透明度
|
|
76
|
+
*/
|
|
77
|
+
opacity?: number;
|
|
78
|
+
/**
|
|
79
|
+
* 粒子数量
|
|
80
|
+
*/
|
|
81
|
+
count?: number;
|
|
82
|
+
/**
|
|
83
|
+
* 粒子范围
|
|
84
|
+
*/
|
|
85
|
+
range?: number;
|
|
86
|
+
/**
|
|
87
|
+
* 粒子左右速度的随机范围
|
|
88
|
+
*/
|
|
89
|
+
velocityX?: [number, number];
|
|
90
|
+
/**
|
|
91
|
+
* 粒子上下速度的随机范围
|
|
92
|
+
*/
|
|
93
|
+
velocityY?: [number, number];
|
|
94
|
+
}
|
|
95
|
+
export type CircleWaveOptions = InnerCircleWaveOptions & PluginObjectInfo;
|
|
96
|
+
export type CylinderWaveOptions = InnerCylinderWaveOptions & PluginObjectInfo;
|
|
97
|
+
export interface PointsWaveOptions extends PluginObjectInfo {
|
|
98
|
+
xAxisCount?: number;
|
|
99
|
+
zAxisCount?: number;
|
|
100
|
+
showDistance?: number;
|
|
101
|
+
separation?: number;
|
|
102
|
+
size?: number;
|
|
103
|
+
maxFluctua?: number;
|
|
104
|
+
color?: IColor;
|
|
105
|
+
opacity?: number;
|
|
106
|
+
}
|
|
107
|
+
export interface BuildsOptions extends PluginObjectInfo {
|
|
108
|
+
buildWidth?: number;
|
|
109
|
+
buildHeigh?: number;
|
|
110
|
+
buildDepth?: number;
|
|
111
|
+
count?: number;
|
|
112
|
+
gapX?: number;
|
|
113
|
+
gapZ?: number;
|
|
114
|
+
showDistance?: number;
|
|
115
|
+
randShift?: number;
|
|
116
|
+
color?: IColor;
|
|
117
|
+
}
|
|
118
|
+
declare class EffectPlugin {
|
|
119
|
+
readonly ssp: SoonSpace;
|
|
120
|
+
[x: string]: any;
|
|
121
|
+
/**
|
|
122
|
+
* 天气预设图片
|
|
123
|
+
*/
|
|
124
|
+
readonly weatherPresetImgs: {
|
|
125
|
+
rain: string;
|
|
126
|
+
snow: any;
|
|
127
|
+
};
|
|
128
|
+
private _weatherId;
|
|
129
|
+
constructor(ssp: SoonSpace);
|
|
130
|
+
/**
|
|
131
|
+
* 创建火焰
|
|
132
|
+
* @params params
|
|
133
|
+
* @returns
|
|
134
|
+
*/
|
|
135
|
+
createFlame(params: FlameOptions): PluginObject;
|
|
136
|
+
/**
|
|
137
|
+
* 创建烟雾
|
|
138
|
+
* @param params
|
|
139
|
+
* @returns
|
|
140
|
+
*/
|
|
141
|
+
createSmoke(params: SmokeOptions): PluginObject;
|
|
142
|
+
createSmoke2(params: Smoke2Options): PluginObject;
|
|
143
|
+
/**
|
|
144
|
+
* 创建星星
|
|
145
|
+
* @param params
|
|
146
|
+
* @returns
|
|
147
|
+
*/
|
|
148
|
+
createSparkles(params: SparklesOptions): PluginObject;
|
|
149
|
+
/**
|
|
150
|
+
* 创建接触阴影
|
|
151
|
+
* @params params
|
|
152
|
+
*/
|
|
153
|
+
createContactShadows({ scale, frames, opacity, width, height, blur, darkness, far, resolution, ...props }: ContactShadowsOptions): PluginObject;
|
|
154
|
+
/**
|
|
155
|
+
* 开启天气
|
|
156
|
+
* @param param0
|
|
157
|
+
*/
|
|
158
|
+
openWeather(params?: WeatherOptions): void;
|
|
159
|
+
/**
|
|
160
|
+
* 关闭天气
|
|
161
|
+
*/
|
|
162
|
+
closeWeather(): void;
|
|
163
|
+
/**
|
|
164
|
+
* 创建粒子簇
|
|
165
|
+
* @param options
|
|
166
|
+
* @returns
|
|
167
|
+
*/
|
|
168
|
+
createParticleCluster(options: ParticleClusterOptions): any;
|
|
169
|
+
/**
|
|
170
|
+
* 创建圆形光波
|
|
171
|
+
* @param options
|
|
172
|
+
* @returns
|
|
173
|
+
*/
|
|
174
|
+
createCircleWave(options: CircleWaveOptions): PluginObject;
|
|
175
|
+
/**
|
|
176
|
+
* 创建立柱光波
|
|
177
|
+
* @param options
|
|
178
|
+
* @returns
|
|
179
|
+
*/
|
|
180
|
+
createCylinderWave(options: CylinderWaveOptions): PluginObject;
|
|
181
|
+
/**
|
|
182
|
+
* 创建粒子波浪
|
|
183
|
+
* @param options
|
|
184
|
+
* @returns
|
|
185
|
+
*/
|
|
186
|
+
createPointsWave(options: PointsWaveOptions): PluginObject;
|
|
187
|
+
/**
|
|
188
|
+
* 创建建筑
|
|
189
|
+
* @param options
|
|
190
|
+
* @returns
|
|
191
|
+
*/
|
|
192
|
+
createBuilds(options: BuildsOptions): PluginObject;
|
|
193
|
+
createWater(options: CreateWaterOptions): PluginObject;
|
|
194
|
+
removeEffect(id: PluginObjectInfo['id']): boolean;
|
|
195
|
+
}
|
|
196
|
+
export default EffectPlugin;
|