LightningStorm.d.ts 800 字节
Newer Older
1
import {
G
Garrett Johnson 已提交
2 3
	Material,
	Vector3
4 5
} from '../../../src/Three';

Y
yomboprime 已提交
6 7
import { LightningStrike, RayParameters } from '../geometries/LightningStrike';

8
export interface StormParams {
G
Garrett Johnson 已提交
9 10 11 12
	size?: number;
	minHeight?: number;
	maxHeight?: number;
	maxSlope?: number;
13

G
Garrett Johnson 已提交
14
	maxLightnings?: number;
15

G
Garrett Johnson 已提交
16 17 18 19
	lightningMinPeriod?: number;
	lightningMaxPeriod?: number;
	lightningMinDuration?: number;
	lightningMaxDuration?: number;
20

G
Garrett Johnson 已提交
21 22
	lightningParameters?: RayParameters;
	lightningMaterial?: Material;
23

G
Garrett Johnson 已提交
24
	isEternal?: boolean;
25

G
Garrett Johnson 已提交
26 27
	onRayPosition?: ( source: Vector3, dest: Vector3 ) => void;
	onLightningDown?: ( lightning: LightningStrike ) => void;
28 29 30
}

export class LightningStorm {
G
Garrett Johnson 已提交
31 32 33 34 35 36

	constructor( stormParams?: StormParams );
	update( time: number ): void;
	copy( source: LightningStorm ): LightningStorm;
	clone(): LightningStorm;

37
}