File size: 1,421 Bytes
2b7aae2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
 * Object for keeping track of time.
 *
 * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/Clock.js|src/core/Clock.js}
 */
export class Clock {
	/**
	 * @param [autoStart=true] Automatically start the clock.
	 */
	constructor(autoStart?: boolean);

	/**
	 * If set, starts the clock automatically when the first update is called.
	 * @default true
	 */
	autoStart: boolean;

	/**
	 * When the clock is running, It holds the starttime of the clock.
	 * This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
	 * @default 0
	 */
	startTime: number;

	/**
	 * When the clock is running, It holds the previous time from a update.
	 * This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
	 * @default 0
	 */
	oldTime: number;

	/**
	 * When the clock is running, It holds the time elapsed between the start of the clock to the previous update.
	 * This parameter is in seconds of three decimal places.
	 * @default 0
	 */
	elapsedTime: number;

	/**
	 * This property keeps track whether the clock is running or not.
	 * @default false
	 */
	running: boolean;

	/**
	 * Starts clock.
	 */
	start(): void;

	/**
	 * Stops clock.
	 */
	stop(): void;

	/**
	 * Get the seconds passed since the clock started.
	 */
	getElapsedTime(): number;

	/**
	 * Get the seconds passed since the last call to this method.
	 */
	getDelta(): number;
}