@terra.gl/core 0.0.1-alpha.62 → 0.0.1-alpha.64
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 +41 -0
- package/dist/index.js +4254 -4081
- package/dist/index.umd.cjs +60 -39
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3277,6 +3277,41 @@ 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
|
+
/** 是否启用自动闪电(仅在下雨时启用) */
|
|
3295
|
+
private _enabled;
|
|
3296
|
+
constructor(scene: Scene);
|
|
3297
|
+
/** 设置是否启用自动闪电 */
|
|
3298
|
+
setEnabled(enabled: boolean): void;
|
|
3299
|
+
/** 设置闪电间隔范围(毫秒) */
|
|
3300
|
+
setTriggerInterval(min: number, max: number): void;
|
|
3301
|
+
/** 获取当前间隔设置 */
|
|
3302
|
+
getTriggerInterval(): [number, number];
|
|
3303
|
+
trigger(): void;
|
|
3304
|
+
/** 内部用:重置下次触发间隔 */
|
|
3305
|
+
private _resetNextInterval;
|
|
3306
|
+
/**
|
|
3307
|
+
* 每帧调用,自动触发闪电
|
|
3308
|
+
* @param delta 帧间隔(秒)
|
|
3309
|
+
*/
|
|
3310
|
+
update(delta: number, now?: number): void;
|
|
3311
|
+
resize(hw: number, hh: number): void;
|
|
3312
|
+
dispose(): void;
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3280
3315
|
export declare interface LightStyle extends BaseStyle {
|
|
3281
3316
|
type: 'light';
|
|
3282
3317
|
/** 点颜色 */
|
|
@@ -8160,6 +8195,8 @@ export declare class WeatherEffect {
|
|
|
8160
8195
|
readonly snowMaterial: ShaderMaterial;
|
|
8161
8196
|
/** 雾材质 */
|
|
8162
8197
|
readonly fogMaterial: ShaderMaterial;
|
|
8198
|
+
/** 闪电系统 */
|
|
8199
|
+
readonly lightningSystem: LightningSystem;
|
|
8163
8200
|
/** 当前天气类型 */
|
|
8164
8201
|
private _type;
|
|
8165
8202
|
/** 当前激活的材质 */
|
|
@@ -8198,6 +8235,10 @@ export declare class WeatherEffect {
|
|
|
8198
8235
|
* @param intensity 雨强值,值越大雨滴越多/越密
|
|
8199
8236
|
*/
|
|
8200
8237
|
setRainIntensity(intensity: number): this;
|
|
8238
|
+
/**
|
|
8239
|
+
* 触发一次闪电(可随时调用,常配合雷暴天气使用)
|
|
8240
|
+
*/
|
|
8241
|
+
triggerLightning(): void;
|
|
8201
8242
|
/**
|
|
8202
8243
|
* 每帧调用,更新 iTime uniform
|
|
8203
8244
|
* @param delta 帧间隔时间(秒)
|