@gg-web-engine/core 0.0.3 → 0.0.5
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/2d/entities/controllers/entity-2d-positioning.animator.js +1 -1
- package/dist/2d/entities/gg-2d-entity.d.ts +3 -5
- package/dist/2d/entities/gg-2d-entity.js +2 -4
- package/dist/3d/entities/controllers/animators/camera-3d.animator.d.ts +17 -0
- package/dist/3d/entities/controllers/animators/camera-3d.animator.js +32 -0
- package/dist/3d/entities/controllers/animators/entity-3d-positioning.animator.d.ts +16 -0
- package/dist/3d/entities/controllers/animators/entity-3d-positioning.animator.js +26 -0
- package/dist/3d/entities/controllers/input/car-keyboard-handling.controller.d.ts +25 -0
- package/dist/3d/entities/controllers/input/car-keyboard-handling.controller.js +105 -0
- package/dist/3d/entities/controllers/input/free-camera.controller.d.ts +54 -0
- package/dist/3d/entities/controllers/input/free-camera.controller.js +102 -0
- package/dist/3d/entities/gg-3d-entity.d.ts +3 -5
- package/dist/3d/entities/gg-3d-entity.js +2 -4
- package/dist/3d/entities/gg-3d-map-graph.entity.d.ts +20 -6
- package/dist/3d/entities/gg-3d-map-graph.entity.js +21 -3
- package/dist/3d/inputs/car-keyboard.input.d.ts +25 -0
- package/dist/3d/inputs/car-keyboard.input.js +100 -0
- package/dist/3d/inputs/free-camera.input.d.ts +22 -0
- package/dist/3d/inputs/free-camera.input.js +80 -0
- package/dist/base/clock/global-clock.d.ts +4 -3
- package/dist/base/clock/global-clock.js +2 -2
- package/dist/base/clock/i-clock.d.ts +7 -0
- package/dist/base/clock/i-clock.js +2 -0
- package/dist/base/clock/pausable-clock.d.ts +25 -0
- package/dist/base/clock/pausable-clock.js +79 -0
- package/dist/base/data-structures/graph.d.ts +17 -1
- package/dist/base/data-structures/graph.js +20 -1
- package/dist/base/entities/base-gg-renderer.d.ts +8 -16
- package/dist/base/entities/base-gg-renderer.js +16 -32
- package/dist/base/entities/controllers/animation-mixer.d.ts +1 -8
- package/dist/base/entities/controllers/animation-mixer.js +2 -11
- package/dist/base/entities/gg-entity.d.ts +30 -0
- package/dist/base/entities/gg-entity.js +37 -2
- package/dist/base/entities/inline-controller.js +1 -6
- package/dist/base/entities/interfaces/i-tick-listener.d.ts +25 -1
- package/dist/base/entities/interfaces/i-tick-listener.js +17 -1
- package/dist/base/gg-viewport-manager.d.ts +1 -0
- package/dist/base/gg-viewport-manager.js +10 -0
- package/dist/base/gg-world.d.ts +9 -6
- package/dist/base/gg-world.js +45 -29
- package/dist/base/inputs/direction.keyboard-input.d.ts +41 -0
- package/dist/base/inputs/direction.keyboard-input.js +85 -0
- package/dist/base/inputs/input.d.ts +50 -0
- package/dist/base/inputs/input.js +80 -0
- package/dist/base/inputs/keyboard.input.d.ts +45 -0
- package/dist/base/inputs/keyboard.input.js +130 -0
- package/dist/base/inputs/mouse.input.d.ts +57 -0
- package/dist/base/inputs/mouse.input.js +81 -0
- package/dist/base/math/point2.d.ts +2 -0
- package/dist/base/math/point2.js +6 -0
- package/dist/base/math/point3.d.ts +2 -0
- package/dist/base/math/point3.js +6 -0
- package/dist/index.d.ts +10 -10
- package/dist/index.js +10 -10
- package/package.json +1 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.KeyboardInput = void 0;
|
|
13
|
+
const input_1 = require("./input");
|
|
14
|
+
const rxjs_1 = require("rxjs");
|
|
15
|
+
const operators_1 = require("rxjs/operators");
|
|
16
|
+
/**
|
|
17
|
+
* A main keyboard input: it does not have own key bindings, but provides an API to bind keys.
|
|
18
|
+
* It is responsible for listening key up/down events (when running!) and emit the events to subscribers.
|
|
19
|
+
* Every World entity has its own dedicated instance of Keyboard input, which is running only when the world is running
|
|
20
|
+
*/
|
|
21
|
+
class KeyboardInput extends input_1.Input {
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new instance of the `KeyboardInput` class.
|
|
24
|
+
*/
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
this.bindings = {};
|
|
28
|
+
this.handleKeys = this.handleKeys.bind(this);
|
|
29
|
+
}
|
|
30
|
+
startInternal() {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
window.addEventListener('keydown', this.handleKeys);
|
|
33
|
+
window.addEventListener('keyup', this.handleKeys);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
stopInternal() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
window.removeEventListener('keydown', this.handleKeys);
|
|
39
|
+
window.removeEventListener('keyup', this.handleKeys);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Creates an observable that emits a boolean whenever a key with the given code is pressed or released
|
|
44
|
+
* @param code The key code to bind the observable to
|
|
45
|
+
* @returns An observable that emits true when the key is pressed and false when it's released
|
|
46
|
+
*/
|
|
47
|
+
bind(code) {
|
|
48
|
+
if (!this.bindings[code]) {
|
|
49
|
+
this.bindings[code] = [];
|
|
50
|
+
}
|
|
51
|
+
const subj = new rxjs_1.BehaviorSubject(false);
|
|
52
|
+
this.bindings[code].push(subj);
|
|
53
|
+
return subj.pipe((0, rxjs_1.finalize)(() => {
|
|
54
|
+
this.bindings[code].splice(this.bindings[code].indexOf(subj), 1);
|
|
55
|
+
subj.complete();
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Creates an observable that emits a boolean indicating whether any of the keys with the given codes are pressed or released.
|
|
60
|
+
* Should be used when you have more than one keys, responsible for the same action.
|
|
61
|
+
* @param codes The key codes to bind the observable to
|
|
62
|
+
* @returns An observable that emits true when any of the keys are pressed and false when they're all released
|
|
63
|
+
*/
|
|
64
|
+
bindMany(...codes) {
|
|
65
|
+
if (codes.length == 0) {
|
|
66
|
+
console.warn('[KeyboardController] bindMany called without any key code');
|
|
67
|
+
return rxjs_1.NEVER;
|
|
68
|
+
}
|
|
69
|
+
if (codes.length == 1) {
|
|
70
|
+
return this.bind(codes[0]);
|
|
71
|
+
}
|
|
72
|
+
const subjects = [];
|
|
73
|
+
for (const code of codes) {
|
|
74
|
+
if (!this.bindings[code]) {
|
|
75
|
+
this.bindings[code] = [];
|
|
76
|
+
}
|
|
77
|
+
const subj = new rxjs_1.BehaviorSubject(false);
|
|
78
|
+
this.bindings[code].push(subj);
|
|
79
|
+
subjects.push(subj);
|
|
80
|
+
}
|
|
81
|
+
return (0, rxjs_1.combineLatest)(subjects).pipe((0, rxjs_1.finalize)(() => {
|
|
82
|
+
for (let i = 0; i < codes.length; i++) {
|
|
83
|
+
this.bindings[codes[i]].splice(this.bindings[codes[i]].indexOf(subjects[i]), 1);
|
|
84
|
+
subjects[i].complete();
|
|
85
|
+
}
|
|
86
|
+
}), (0, operators_1.map)(values => values.includes(true)));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Emulates a key down event for the given key code
|
|
90
|
+
* @param code The key code to emulate
|
|
91
|
+
*/
|
|
92
|
+
emulateKeyDown(code) {
|
|
93
|
+
if (!this.running) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
for (const subj of this.bindings[code] || []) {
|
|
97
|
+
subj.next(true);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Emulates a key up event for the given key code
|
|
102
|
+
* @param code The key code to emulate
|
|
103
|
+
*/
|
|
104
|
+
emulateKeyUp(code) {
|
|
105
|
+
if (!this.running) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
for (const subj of this.bindings[code] || []) {
|
|
109
|
+
subj.next(false);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Emulates a key press event (down and up) for the given key code
|
|
114
|
+
* @param code The key code to emulate
|
|
115
|
+
*/
|
|
116
|
+
emulateKeyPress(code) {
|
|
117
|
+
this.emulateKeyDown(code);
|
|
118
|
+
this.emulateKeyUp(code);
|
|
119
|
+
}
|
|
120
|
+
handleKeys(e) {
|
|
121
|
+
if (e.type != 'keydown' && e.type != 'keyup') {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const pressed = e.type == 'keydown';
|
|
125
|
+
for (const subj of this.bindings[e.code] || []) {
|
|
126
|
+
subj.next(pressed);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.KeyboardInput = KeyboardInput;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Input } from './input';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Point2 } from '../models/points';
|
|
4
|
+
/**
|
|
5
|
+
* Options for pointer lock in a MouseInput.
|
|
6
|
+
*
|
|
7
|
+
* ignoreMovementWhenNotLocked: Whether to ignore mouse movement when pointer lock is not active.
|
|
8
|
+
*
|
|
9
|
+
* canvas: The canvas element to request pointer lock on.
|
|
10
|
+
*/
|
|
11
|
+
export declare type MouseInputPointLockOptions = {
|
|
12
|
+
ignoreMovementWhenNotLocked: boolean;
|
|
13
|
+
canvas: HTMLCanvasElement;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Options for a MouseInput.
|
|
17
|
+
*
|
|
18
|
+
* pointerLock: The options for pointer lock. Do not provide it to disable pointer lock functionality
|
|
19
|
+
*/
|
|
20
|
+
export declare type MouseInputOptions = {
|
|
21
|
+
pointerLock?: MouseInputPointLockOptions;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A class representing mouse input.
|
|
25
|
+
*/
|
|
26
|
+
export declare class MouseInput extends Input<[], [unlockPointer?: boolean]> {
|
|
27
|
+
private readonly options;
|
|
28
|
+
/**
|
|
29
|
+
* An observable of the change in the x position of the mouse.
|
|
30
|
+
*/
|
|
31
|
+
get deltaX$(): Observable<number>;
|
|
32
|
+
/**
|
|
33
|
+
* An observable of the change in the y position of the mouse.
|
|
34
|
+
*/
|
|
35
|
+
get deltaY$(): Observable<number>;
|
|
36
|
+
/**
|
|
37
|
+
An observable of the change in the position of the mouse.
|
|
38
|
+
*/
|
|
39
|
+
get delta$(): Observable<Point2>;
|
|
40
|
+
private _delta$;
|
|
41
|
+
private stopped$;
|
|
42
|
+
/**
|
|
43
|
+
Creates an instance of MouseInput.
|
|
44
|
+
@param {MouseInputOptions} options - The options for the MouseInput.
|
|
45
|
+
*/
|
|
46
|
+
constructor(options?: MouseInputOptions);
|
|
47
|
+
protected startInternal(): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
Stop listening for mouse movement events.
|
|
50
|
+
@param {boolean} [unlockPointer=true] - Whether to exit pointer lock.
|
|
51
|
+
*/
|
|
52
|
+
protected stopInternal(unlockPointer?: boolean): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
Request pointer lock on the canvas element.
|
|
55
|
+
*/
|
|
56
|
+
private canvasClickListener;
|
|
57
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MouseInput = void 0;
|
|
13
|
+
const input_1 = require("./input");
|
|
14
|
+
const rxjs_1 = require("rxjs");
|
|
15
|
+
const operators_1 = require("rxjs/operators");
|
|
16
|
+
/**
|
|
17
|
+
* A class representing mouse input.
|
|
18
|
+
*/
|
|
19
|
+
class MouseInput extends input_1.Input {
|
|
20
|
+
/**
|
|
21
|
+
Creates an instance of MouseInput.
|
|
22
|
+
@param {MouseInputOptions} options - The options for the MouseInput.
|
|
23
|
+
*/
|
|
24
|
+
constructor(options = {}) {
|
|
25
|
+
super();
|
|
26
|
+
this.options = options;
|
|
27
|
+
this._delta$ = new rxjs_1.Subject();
|
|
28
|
+
this.stopped$ = new rxjs_1.Subject();
|
|
29
|
+
this.canvasClickListener = this.canvasClickListener.bind(this);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* An observable of the change in the x position of the mouse.
|
|
33
|
+
*/
|
|
34
|
+
get deltaX$() {
|
|
35
|
+
return this._delta$.pipe((0, operators_1.map)(d => d.x));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* An observable of the change in the y position of the mouse.
|
|
39
|
+
*/
|
|
40
|
+
get deltaY$() {
|
|
41
|
+
return this._delta$.pipe((0, operators_1.map)(d => d.y));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
An observable of the change in the position of the mouse.
|
|
45
|
+
*/
|
|
46
|
+
get delta$() {
|
|
47
|
+
return this._delta$.asObservable();
|
|
48
|
+
}
|
|
49
|
+
startInternal() {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
(0, rxjs_1.fromEvent)(window, 'mousemove')
|
|
52
|
+
.pipe((0, rxjs_1.takeUntil)(this.stopped$), (0, rxjs_1.filter)(() => !this.options.pointerLock ||
|
|
53
|
+
!this.options.pointerLock.ignoreMovementWhenNotLocked ||
|
|
54
|
+
!!document.pointerLockElement), (0, operators_1.map)((e) => ({ x: e.movementX, y: e.movementY })))
|
|
55
|
+
.subscribe(v => this._delta$.next(v));
|
|
56
|
+
if (!!this.options.pointerLock) {
|
|
57
|
+
this.options.pointerLock.canvas.addEventListener('click', this.canvasClickListener);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
Stop listening for mouse movement events.
|
|
63
|
+
@param {boolean} [unlockPointer=true] - Whether to exit pointer lock.
|
|
64
|
+
*/
|
|
65
|
+
stopInternal(unlockPointer = true) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
this.stopped$.next();
|
|
68
|
+
if (unlockPointer && !!this.options.pointerLock) {
|
|
69
|
+
this.options.pointerLock.canvas.removeEventListener('click', this.canvasClickListener);
|
|
70
|
+
document.exitPointerLock();
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
Request pointer lock on the canvas element.
|
|
76
|
+
*/
|
|
77
|
+
canvasClickListener() {
|
|
78
|
+
this.options.pointerLock.canvas.requestPointerLock();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.MouseInput = MouseInput;
|
package/dist/base/math/point2.js
CHANGED
|
@@ -36,5 +36,11 @@ class Pnt2 {
|
|
|
36
36
|
y: a.y + t * (b.y - a.y),
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
+
/** angle between vectors in radians */
|
|
40
|
+
static angle(a, b) {
|
|
41
|
+
const dotProduct = a.x * b.x + a.y * b.y;
|
|
42
|
+
const magnitudeProduct = Math.sqrt(a.x ** 2 + a.y ** 2) * Math.sqrt(b.x ** 2 + b.y ** 2);
|
|
43
|
+
return Math.acos(dotProduct / magnitudeProduct);
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
exports.Pnt2 = Pnt2;
|
|
@@ -18,6 +18,8 @@ export declare class Pnt3 {
|
|
|
18
18
|
static scalarMult(p: Point3, m: number): Point3;
|
|
19
19
|
/** linear interpolation */
|
|
20
20
|
static lerp(a: Point3, b: Point3, t: number): Point3;
|
|
21
|
+
/** angle between vectors in radians */
|
|
22
|
+
static angle(a: Point3, b: Point3): number;
|
|
21
23
|
/** rotate point a with quaternion q */
|
|
22
24
|
static rot(p: Point3, q: Point4): Point3;
|
|
23
25
|
/** rotate point around axis a (normalized vector) */
|
package/dist/base/math/point3.js
CHANGED
|
@@ -61,6 +61,12 @@ class Pnt3 {
|
|
|
61
61
|
z: a.z + t * (b.z - a.z),
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
+
/** angle between vectors in radians */
|
|
65
|
+
static angle(a, b) {
|
|
66
|
+
const dotProduct = a.x * b.x + a.y * b.y + a.z * b.z;
|
|
67
|
+
const magnitudeProduct = Math.sqrt(a.x ** 2 + a.y ** 2 + a.z ** 2) * Math.sqrt(b.x ** 2 + b.y ** 2 + b.z ** 2);
|
|
68
|
+
return Math.acos(dotProduct / magnitudeProduct);
|
|
69
|
+
}
|
|
64
70
|
/** rotate point a with quaternion q */
|
|
65
71
|
static rot(p, q) {
|
|
66
72
|
// faster version of:
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
export * from './base/clock/clock';
|
|
1
|
+
export * from './base/clock/i-clock';
|
|
2
|
+
export * from './base/clock/pausable-clock';
|
|
2
3
|
export * from './base/clock/global-clock';
|
|
3
4
|
export * from './base/gg-viewport';
|
|
4
5
|
export * from './base/gg-viewport-manager';
|
|
5
6
|
export * from './base/entities/controllers/animation-mixer';
|
|
6
|
-
export * from './base/entities/interfaces/i-tick-listener';
|
|
7
7
|
export * from './base/entities/gg-entity';
|
|
8
8
|
export * from './base/entities/base-gg-renderer';
|
|
9
9
|
export * from './base/entities/inline-controller';
|
|
10
|
+
export * from './base/inputs/direction.keyboard-input';
|
|
11
|
+
export * from './base/inputs/input';
|
|
12
|
+
export * from './base/inputs/keyboard.input';
|
|
13
|
+
export * from './base/inputs/mouse.input';
|
|
10
14
|
export * from './base/interfaces/gg-body';
|
|
11
15
|
export * from './base/interfaces/gg-debug-physics-drawer';
|
|
12
16
|
export * from './base/interfaces/gg-object';
|
|
@@ -23,10 +27,6 @@ export * from './base/math/point3';
|
|
|
23
27
|
export * from './base/math/quaternion';
|
|
24
28
|
export * from './base/math/numbers';
|
|
25
29
|
export * from './base/math/matrix4';
|
|
26
|
-
export * from './base/controllers/common';
|
|
27
|
-
export * from './base/controllers/i-controller';
|
|
28
|
-
export * from './base/controllers/keyboard.controller';
|
|
29
|
-
export * from './base/controllers/mouse.controller';
|
|
30
30
|
export * from './2d/entities/controllers/entity-2d-positioning.animator';
|
|
31
31
|
export * from './2d/entities/gg-2d-entity';
|
|
32
32
|
export * from './2d/entities/gg-positionable-2d-entity';
|
|
@@ -36,16 +36,16 @@ export * from './2d/models/shapes';
|
|
|
36
36
|
export * from './2d/interfaces';
|
|
37
37
|
export * from './2d/factories';
|
|
38
38
|
export * from './2d/gg-2d-world';
|
|
39
|
-
export * from './3d/controllers/
|
|
40
|
-
export * from './3d/controllers/
|
|
41
|
-
export * from './3d/entities/controllers/camera-3d.animator';
|
|
42
|
-
export * from './3d/entities/controllers/entity-3d-positioning.animator';
|
|
39
|
+
export * from './3d/entities/controllers/animators/camera-3d.animator';
|
|
40
|
+
export * from './3d/entities/controllers/animators/entity-3d-positioning.animator';
|
|
43
41
|
export * from './3d/entities/gg-3d-entity';
|
|
44
42
|
export * from './3d/entities/gg-positionable-3d-entity';
|
|
45
43
|
export * from './3d/entities/gg-3d-camera.entity';
|
|
46
44
|
export * from './3d/entities/gg-3d-map-graph.entity';
|
|
47
45
|
export * from './3d/entities/gg-3d-raycast-vehicle.entity';
|
|
48
46
|
export * from './3d/entities/gg-3d-trigger.entity';
|
|
47
|
+
export * from './3d/entities/controllers/input/car-keyboard-handling.controller';
|
|
48
|
+
export * from './3d/entities/controllers/input/free-camera.controller';
|
|
49
49
|
export * from './3d/models/body-options';
|
|
50
50
|
export * from './3d/models/gg-meta';
|
|
51
51
|
export * from './3d/models/shapes';
|
package/dist/index.js
CHANGED
|
@@ -14,15 +14,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./base/clock/clock"), exports);
|
|
17
|
+
__exportStar(require("./base/clock/i-clock"), exports);
|
|
18
|
+
__exportStar(require("./base/clock/pausable-clock"), exports);
|
|
18
19
|
__exportStar(require("./base/clock/global-clock"), exports);
|
|
19
20
|
__exportStar(require("./base/gg-viewport"), exports);
|
|
20
21
|
__exportStar(require("./base/gg-viewport-manager"), exports);
|
|
21
22
|
__exportStar(require("./base/entities/controllers/animation-mixer"), exports);
|
|
22
|
-
__exportStar(require("./base/entities/interfaces/i-tick-listener"), exports);
|
|
23
23
|
__exportStar(require("./base/entities/gg-entity"), exports);
|
|
24
24
|
__exportStar(require("./base/entities/base-gg-renderer"), exports);
|
|
25
25
|
__exportStar(require("./base/entities/inline-controller"), exports);
|
|
26
|
+
__exportStar(require("./base/inputs/direction.keyboard-input"), exports);
|
|
27
|
+
__exportStar(require("./base/inputs/input"), exports);
|
|
28
|
+
__exportStar(require("./base/inputs/keyboard.input"), exports);
|
|
29
|
+
__exportStar(require("./base/inputs/mouse.input"), exports);
|
|
26
30
|
__exportStar(require("./base/interfaces/gg-body"), exports);
|
|
27
31
|
__exportStar(require("./base/interfaces/gg-debug-physics-drawer"), exports);
|
|
28
32
|
__exportStar(require("./base/interfaces/gg-object"), exports);
|
|
@@ -39,10 +43,6 @@ __exportStar(require("./base/math/point3"), exports);
|
|
|
39
43
|
__exportStar(require("./base/math/quaternion"), exports);
|
|
40
44
|
__exportStar(require("./base/math/numbers"), exports);
|
|
41
45
|
__exportStar(require("./base/math/matrix4"), exports);
|
|
42
|
-
__exportStar(require("./base/controllers/common"), exports);
|
|
43
|
-
__exportStar(require("./base/controllers/i-controller"), exports);
|
|
44
|
-
__exportStar(require("./base/controllers/keyboard.controller"), exports);
|
|
45
|
-
__exportStar(require("./base/controllers/mouse.controller"), exports);
|
|
46
46
|
__exportStar(require("./2d/entities/controllers/entity-2d-positioning.animator"), exports);
|
|
47
47
|
__exportStar(require("./2d/entities/gg-2d-entity"), exports);
|
|
48
48
|
__exportStar(require("./2d/entities/gg-positionable-2d-entity"), exports);
|
|
@@ -52,16 +52,16 @@ __exportStar(require("./2d/models/shapes"), exports);
|
|
|
52
52
|
__exportStar(require("./2d/interfaces"), exports);
|
|
53
53
|
__exportStar(require("./2d/factories"), exports);
|
|
54
54
|
__exportStar(require("./2d/gg-2d-world"), exports);
|
|
55
|
-
__exportStar(require("./3d/controllers/
|
|
56
|
-
__exportStar(require("./3d/controllers/
|
|
57
|
-
__exportStar(require("./3d/entities/controllers/camera-3d.animator"), exports);
|
|
58
|
-
__exportStar(require("./3d/entities/controllers/entity-3d-positioning.animator"), exports);
|
|
55
|
+
__exportStar(require("./3d/entities/controllers/animators/camera-3d.animator"), exports);
|
|
56
|
+
__exportStar(require("./3d/entities/controllers/animators/entity-3d-positioning.animator"), exports);
|
|
59
57
|
__exportStar(require("./3d/entities/gg-3d-entity"), exports);
|
|
60
58
|
__exportStar(require("./3d/entities/gg-positionable-3d-entity"), exports);
|
|
61
59
|
__exportStar(require("./3d/entities/gg-3d-camera.entity"), exports);
|
|
62
60
|
__exportStar(require("./3d/entities/gg-3d-map-graph.entity"), exports);
|
|
63
61
|
__exportStar(require("./3d/entities/gg-3d-raycast-vehicle.entity"), exports);
|
|
64
62
|
__exportStar(require("./3d/entities/gg-3d-trigger.entity"), exports);
|
|
63
|
+
__exportStar(require("./3d/entities/controllers/input/car-keyboard-handling.controller"), exports);
|
|
64
|
+
__exportStar(require("./3d/entities/controllers/input/free-camera.controller"), exports);
|
|
65
65
|
__exportStar(require("./3d/models/body-options"), exports);
|
|
66
66
|
__exportStar(require("./3d/models/gg-meta"), exports);
|
|
67
67
|
__exportStar(require("./3d/models/shapes"), exports);
|