@terra.gl/core 0.0.1-alpha.62 → 0.0.1-alpha.63
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/index.d.ts +37 -0
- package/dist/index.js +4229 -4061
- package/dist/index.umd.cjs +60 -39
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3277,6 +3277,37 @@ declare type LayerOptions = {
|
|
|
3277
3277
|
depthOffset?: number;
|
|
3278
3278
|
};
|
|
3279
3279
|
|
|
3280
|
+
/** 闪电系统 */
|
|
3281
|
+
declare class LightningSystem {
|
|
3282
|
+
private readonly _scene;
|
|
3283
|
+
private _hw;
|
|
3284
|
+
private _hh;
|
|
3285
|
+
private _bolts;
|
|
3286
|
+
private _flashMesh;
|
|
3287
|
+
private _flashOpacity;
|
|
3288
|
+
private _flickerLeft;
|
|
3289
|
+
private _flickerTick;
|
|
3290
|
+
private _intervalMin;
|
|
3291
|
+
private _intervalMax;
|
|
3292
|
+
private _lastTriggerTime;
|
|
3293
|
+
private _nextInterval;
|
|
3294
|
+
constructor(scene: Scene);
|
|
3295
|
+
/** 设置闪电间隔范围(毫秒) */
|
|
3296
|
+
setTriggerInterval(min: number, max: number): void;
|
|
3297
|
+
/** 获取当前间隔设置 */
|
|
3298
|
+
getTriggerInterval(): [number, number];
|
|
3299
|
+
trigger(): void;
|
|
3300
|
+
/** 内部用:重置下次触发间隔 */
|
|
3301
|
+
private _resetNextInterval;
|
|
3302
|
+
/**
|
|
3303
|
+
* 每帧调用,自动触发闪电
|
|
3304
|
+
* @param delta 帧间隔(秒)
|
|
3305
|
+
*/
|
|
3306
|
+
update(delta: number, now?: number): void;
|
|
3307
|
+
resize(hw: number, hh: number): void;
|
|
3308
|
+
dispose(): void;
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3280
3311
|
export declare interface LightStyle extends BaseStyle {
|
|
3281
3312
|
type: 'light';
|
|
3282
3313
|
/** 点颜色 */
|
|
@@ -8160,6 +8191,8 @@ export declare class WeatherEffect {
|
|
|
8160
8191
|
readonly snowMaterial: ShaderMaterial;
|
|
8161
8192
|
/** 雾材质 */
|
|
8162
8193
|
readonly fogMaterial: ShaderMaterial;
|
|
8194
|
+
/** 闪电系统 */
|
|
8195
|
+
readonly lightningSystem: LightningSystem;
|
|
8163
8196
|
/** 当前天气类型 */
|
|
8164
8197
|
private _type;
|
|
8165
8198
|
/** 当前激活的材质 */
|
|
@@ -8198,6 +8231,10 @@ export declare class WeatherEffect {
|
|
|
8198
8231
|
* @param intensity 雨强值,值越大雨滴越多/越密
|
|
8199
8232
|
*/
|
|
8200
8233
|
setRainIntensity(intensity: number): this;
|
|
8234
|
+
/**
|
|
8235
|
+
* 触发一次闪电(可随时调用,常配合雷暴天气使用)
|
|
8236
|
+
*/
|
|
8237
|
+
triggerLightning(): void;
|
|
8201
8238
|
/**
|
|
8202
8239
|
* 每帧调用,更新 iTime uniform
|
|
8203
8240
|
* @param delta 帧间隔时间(秒)
|