1 | import { EventDispatcher } from "../core/EventDispatcher.js";
|
2 | import { Object3D } from "../core/Object3D.js";
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | declare abstract class Controls<TEventMap extends {}> extends EventDispatcher<TEventMap> {
|
8 | |
9 |
|
10 |
|
11 | object: Object3D;
|
12 |
|
13 | |
14 |
|
15 |
|
16 |
|
17 | domElement: HTMLElement | null;
|
18 |
|
19 | |
20 |
|
21 |
|
22 | enabled: boolean;
|
23 |
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 | constructor(object: Object3D, domElement?: HTMLElement | null);
|
30 |
|
31 | /**
|
32 | * Connects the controls to the DOM. This method has so called "side effects" since it adds the module's event
|
33 | * listeners to the DOM.
|
34 | */
|
35 | connect(): void;
|
36 |
|
37 | /**
|
38 | * Disconnects the controls from the DOM.
|
39 | */
|
40 | disconnect(): void;
|
41 |
|
42 | /**
|
43 | * Call this method if you no longer want use to the controls. It frees all internal resources and removes all event
|
44 | * listeners.
|
45 | */
|
46 | dispose(): void;
|
47 |
|
48 | /**
|
49 | * Controls should implement this method if they have to update their internal state per simulation step.
|
50 | */
|
51 | update(delta: number): void;
|
52 | }
|
53 |
|
54 | export { Controls };
|