@gg-web-engine/core 0.0.39 → 0.0.48
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/README.md +0 -0
- package/blender_exporter/build_blender_scene.py +0 -1
- package/blender_exporter/spherical_to_cube_texture.py +0 -0
- package/dist/2d/components/physics/i-physics-world-2d.component.d.ts +0 -0
- package/dist/2d/components/physics/i-physics-world-2d.component.js +0 -0
- package/dist/2d/components/physics/i-rigid-body-2d.component.d.ts +0 -0
- package/dist/2d/components/physics/i-rigid-body-2d.component.js +0 -0
- package/dist/2d/components/physics/i-trigger-2d.component.d.ts +0 -0
- package/dist/2d/components/physics/i-trigger-2d.component.js +0 -0
- package/dist/2d/components/rendering/i-display-object-2d.component.d.ts +0 -0
- package/dist/2d/components/rendering/i-display-object-2d.component.js +0 -0
- package/dist/2d/components/rendering/i-renderer-2d.component.d.ts +0 -0
- package/dist/2d/components/rendering/i-renderer-2d.component.js +0 -0
- package/dist/2d/components/rendering/i-visual-scene-2d.component.d.ts +1 -1
- package/dist/2d/components/rendering/i-visual-scene-2d.component.js +0 -0
- package/dist/2d/entities/controllers/entity-2d-positioning.animator.d.ts +1 -1
- package/dist/2d/entities/controllers/entity-2d-positioning.animator.js +0 -0
- package/dist/2d/entities/entity-2d.d.ts +0 -0
- package/dist/2d/entities/entity-2d.js +25 -25
- package/dist/2d/entities/i-renderable-2d.entity.d.ts +3 -1
- package/dist/2d/entities/i-renderable-2d.entity.js +7 -0
- package/dist/2d/entities/renderer-2d.entity.d.ts +0 -0
- package/dist/2d/entities/renderer-2d.entity.js +0 -0
- package/dist/2d/entities/trigger-2d.entity.d.ts +0 -0
- package/dist/2d/entities/trigger-2d.entity.js +11 -11
- package/dist/2d/factories.d.ts +1 -1
- package/dist/2d/factories.js +0 -0
- package/dist/2d/gg-2d-world.d.ts +4 -3
- package/dist/2d/gg-2d-world.js +0 -0
- package/dist/2d/index.d.ts +0 -0
- package/dist/2d/index.js +0 -0
- package/dist/2d/interfaces/i-positionable-2d.d.ts +0 -0
- package/dist/2d/interfaces/i-positionable-2d.js +0 -0
- package/dist/2d/models/body-options.d.ts +1 -1
- package/dist/2d/models/body-options.js +0 -0
- package/dist/2d/models/shapes.d.ts +2 -2
- package/dist/2d/models/shapes.js +0 -0
- package/dist/3d/components/physics/i-physics-world-3d.component.d.ts +0 -0
- package/dist/3d/components/physics/i-physics-world-3d.component.js +0 -0
- package/dist/3d/components/physics/i-raycast-vehicle.component.d.ts +2 -2
- package/dist/3d/components/physics/i-raycast-vehicle.component.js +0 -0
- package/dist/3d/components/physics/i-rigid-body-3d.component.d.ts +0 -0
- package/dist/3d/components/physics/i-rigid-body-3d.component.js +0 -0
- package/dist/3d/components/physics/i-trigger-3d.component.d.ts +0 -0
- package/dist/3d/components/physics/i-trigger-3d.component.js +0 -0
- package/dist/3d/components/rendering/i-camera.component.d.ts +0 -0
- package/dist/3d/components/rendering/i-camera.component.js +0 -0
- package/dist/3d/components/rendering/i-display-object-3d.component.d.ts +0 -0
- package/dist/3d/components/rendering/i-display-object-3d.component.js +0 -0
- package/dist/3d/components/rendering/i-renderer-3d.component.d.ts +0 -0
- package/dist/3d/components/rendering/i-renderer-3d.component.js +0 -0
- package/dist/3d/components/rendering/i-visual-scene-3d.component.d.ts +1 -1
- package/dist/3d/components/rendering/i-visual-scene-3d.component.js +0 -0
- package/dist/3d/entities/controllers/animators/camera-3d.animator.d.ts +1 -1
- package/dist/3d/entities/controllers/animators/camera-3d.animator.js +0 -0
- package/dist/3d/entities/controllers/animators/entity-3d-positioning.animator.d.ts +1 -1
- package/dist/3d/entities/controllers/animators/entity-3d-positioning.animator.js +0 -0
- package/dist/3d/entities/controllers/input/car-keyboard-handling.controller.d.ts +2 -2
- package/dist/3d/entities/controllers/input/car-keyboard-handling.controller.js +3 -3
- package/dist/3d/entities/controllers/input/free-camera.controller.d.ts +1 -1
- package/dist/3d/entities/controllers/input/free-camera.controller.js +0 -0
- package/dist/3d/entities/controllers/input/gg-car-keyboard-handling.controller.d.ts +1 -1
- package/dist/3d/entities/controllers/input/gg-car-keyboard-handling.controller.js +0 -0
- package/dist/3d/entities/controllers/input/orbit-camera.controller.d.ts +1 -1
- package/dist/3d/entities/controllers/input/orbit-camera.controller.js +10 -10
- package/dist/3d/entities/entity-3d.d.ts +0 -0
- package/dist/3d/entities/entity-3d.js +25 -25
- package/dist/3d/entities/gg-car/gg-car.entity.d.ts +1 -1
- package/dist/3d/entities/gg-car/gg-car.entity.js +16 -16
- package/dist/3d/entities/i-renderable-3d.entity.d.ts +3 -1
- package/dist/3d/entities/i-renderable-3d.entity.js +7 -0
- package/dist/3d/entities/map-graph-3d.entity.d.ts +9 -6
- package/dist/3d/entities/map-graph-3d.entity.js +70 -26
- package/dist/3d/entities/raycast-vehicle-3d.entity.d.ts +6 -4
- package/dist/3d/entities/raycast-vehicle-3d.entity.js +44 -30
- package/dist/3d/entities/renderer-3d.entity.d.ts +0 -0
- package/dist/3d/entities/renderer-3d.entity.js +0 -0
- package/dist/3d/entities/trigger-3d.entity.d.ts +0 -0
- package/dist/3d/entities/trigger-3d.entity.js +11 -11
- package/dist/3d/factories.d.ts +1 -1
- package/dist/3d/factories.js +0 -0
- package/dist/3d/gg-3d-world.d.ts +4 -3
- package/dist/3d/gg-3d-world.js +0 -0
- package/dist/3d/index.d.ts +0 -0
- package/dist/3d/index.js +0 -0
- package/dist/3d/interfaces/i-positionable-3d.d.ts +0 -0
- package/dist/3d/interfaces/i-positionable-3d.js +0 -0
- package/dist/3d/loader.d.ts +4 -4
- package/dist/3d/loader.js +7 -7
- package/dist/3d/loaders.d.ts +0 -0
- package/dist/3d/loaders.js +0 -0
- package/dist/3d/models/body-options.d.ts +1 -1
- package/dist/3d/models/body-options.js +0 -0
- package/dist/3d/models/gg-meta.d.ts +4 -4
- package/dist/3d/models/gg-meta.js +0 -0
- package/dist/3d/models/shapes.d.ts +3 -3
- package/dist/3d/models/shapes.js +0 -0
- package/dist/base/clock/global-clock.d.ts +0 -0
- package/dist/base/clock/global-clock.js +8 -8
- package/dist/base/clock/i-clock.d.ts +0 -0
- package/dist/base/clock/i-clock.js +0 -0
- package/dist/base/clock/pausable-clock.d.ts +8 -1
- package/dist/base/clock/pausable-clock.js +38 -23
- package/dist/base/components/i-component.d.ts +0 -0
- package/dist/base/components/i-component.js +0 -0
- package/dist/base/components/i-world-component.d.ts +0 -0
- package/dist/base/components/i-world-component.js +0 -0
- package/dist/base/components/physics/i-body.component.d.ts +0 -0
- package/dist/base/components/physics/i-body.component.js +0 -0
- package/dist/base/components/physics/i-physics-world.component.d.ts +0 -0
- package/dist/base/components/physics/i-physics-world.component.js +0 -0
- package/dist/base/components/physics/i-rigid-body.component.d.ts +0 -0
- package/dist/base/components/physics/i-rigid-body.component.js +0 -0
- package/dist/base/components/physics/i-trigger.component.d.ts +0 -0
- package/dist/base/components/physics/i-trigger.component.js +0 -0
- package/dist/base/components/rendering/i-display-object.component.d.ts +0 -0
- package/dist/base/components/rendering/i-display-object.component.js +0 -0
- package/dist/base/components/rendering/i-renderer.component.d.ts +3 -3
- package/dist/base/components/rendering/i-renderer.component.js +0 -0
- package/dist/base/components/rendering/i-visual-scene.component.d.ts +0 -0
- package/dist/base/components/rendering/i-visual-scene.component.js +0 -0
- package/dist/base/data-structures/bitmask.d.ts +0 -0
- package/dist/base/data-structures/bitmask.js +0 -0
- package/dist/base/data-structures/graph.d.ts +0 -0
- package/dist/base/data-structures/graph.js +4 -4
- package/dist/base/entities/controllers/animation-mixer.d.ts +1 -1
- package/dist/base/entities/controllers/animation-mixer.js +27 -27
- package/dist/base/entities/controllers/inline-controller.d.ts +1 -1
- package/dist/base/entities/controllers/inline-controller.js +4 -1
- package/dist/base/entities/i-entity.d.ts +0 -0
- package/dist/base/entities/i-entity.js +0 -0
- package/dist/base/entities/i-renderable.entity.d.ts +0 -0
- package/dist/base/entities/i-renderable.entity.js +0 -0
- package/dist/base/entities/i-renderer.entity.d.ts +0 -0
- package/dist/base/entities/i-renderer.entity.js +15 -15
- package/dist/base/gg-world.d.ts +11 -5
- package/dist/base/gg-world.js +60 -17
- package/dist/base/index.d.ts +0 -0
- package/dist/base/index.js +0 -0
- package/dist/base/inputs/direction.keyboard.input.d.ts +2 -2
- package/dist/base/inputs/direction.keyboard.input.js +6 -6
- package/dist/base/inputs/i-input.d.ts +0 -0
- package/dist/base/inputs/i-input.js +0 -0
- package/dist/base/inputs/keyboard.input.d.ts +0 -0
- package/dist/base/inputs/keyboard.input.js +0 -0
- package/dist/base/inputs/mouse.input.d.ts +1 -1
- package/dist/base/inputs/mouse.input.js +27 -22
- package/dist/base/interfaces/i-positionable.d.ts +0 -0
- package/dist/base/interfaces/i-positionable.js +0 -0
- package/dist/base/math/box.d.ts +0 -0
- package/dist/base/math/box.js +0 -0
- package/dist/base/math/matrix4.d.ts +0 -0
- package/dist/base/math/matrix4.js +0 -0
- package/dist/base/math/numbers.d.ts +0 -0
- package/dist/base/math/numbers.js +0 -0
- package/dist/base/math/point2.d.ts +0 -0
- package/dist/base/math/point2.js +0 -0
- package/dist/base/math/point3.d.ts +0 -0
- package/dist/base/math/point3.js +0 -0
- package/dist/base/math/quaternion.d.ts +6 -0
- package/dist/base/math/quaternion.js +38 -0
- package/dist/base/math/splines.d.ts +0 -0
- package/dist/base/math/splines.js +0 -0
- package/dist/base/models/axis-directions.d.ts +3 -3
- package/dist/base/models/axis-directions.js +0 -0
- package/dist/base/models/body-options.d.ts +2 -2
- package/dist/base/models/body-options.js +0 -0
- package/dist/base/models/geometry-nodes.d.ts +3 -3
- package/dist/base/models/geometry-nodes.js +0 -0
- package/dist/base/models/points.d.ts +5 -5
- package/dist/base/models/points.js +0 -0
- package/dist/dev/gg-console.ui.d.ts +0 -0
- package/dist/dev/gg-console.ui.js +0 -0
- package/dist/dev/gg-debugger.ui.d.ts +5 -0
- package/dist/dev/gg-debugger.ui.js +129 -8
- package/dist/dev/gg-static.d.ts +0 -0
- package/dist/dev/gg-static.js +49 -41
- package/dist/dev/index.d.ts +1 -0
- package/dist/dev/index.js +1 -0
- package/dist/dev/performance-meter.entity.d.ts +21 -0
- package/dist/dev/performance-meter.entity.js +120 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/package.json +7 -7
- package/tsconfig.json +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
2
|
-
import { Graph, IEntity, Point3, Point4, TickOrder } from '../../base';
|
|
2
|
+
import { Graph, IEntity, PausableClock, Point3, Point4, TickOrder } from '../../base';
|
|
3
3
|
import { Gg3dWorld, PhysicsTypeDocRepo3D, VisualTypeDocRepo3D } from '../gg-3d-world';
|
|
4
4
|
import { Entity3d } from './entity-3d';
|
|
5
5
|
import { LoadOptions, LoadResultWithProps } from '../loader';
|
|
6
6
|
import { IPositionable3d } from '../interfaces/i-positionable-3d';
|
|
7
7
|
import { IRenderable3dEntity } from './i-renderable-3d.entity';
|
|
8
|
-
export
|
|
8
|
+
export type MapGraphNodeType = {
|
|
9
9
|
path: string;
|
|
10
10
|
position: Point3;
|
|
11
11
|
rotation?: Point4;
|
|
@@ -33,14 +33,15 @@ export declare class MapGraph extends Graph<MapGraphNodeType> {
|
|
|
33
33
|
getNearestDummy(thisNodes: Graph<MapGraphNodeType>[], cursor: Point3): Graph<MapGraphNodeType>;
|
|
34
34
|
nodes(): MapGraph[];
|
|
35
35
|
}
|
|
36
|
-
export
|
|
36
|
+
export type Gg3dMapGraphEntityOptions = {
|
|
37
37
|
loadDepth: number;
|
|
38
38
|
inertia: number;
|
|
39
|
+
maxNodesLoadingPerTick: number;
|
|
39
40
|
};
|
|
40
41
|
export declare class MapGraph3dEntity<VTypeDoc extends VisualTypeDocRepo3D = VisualTypeDocRepo3D, PTypeDoc extends PhysicsTypeDocRepo3D = PhysicsTypeDocRepo3D> extends IRenderable3dEntity<VTypeDoc, PTypeDoc> {
|
|
41
42
|
readonly mapGraph: MapGraph;
|
|
42
43
|
readonly tickOrder = TickOrder.POST_RENDERING;
|
|
43
|
-
readonly
|
|
44
|
+
readonly loaderCursor$: BehaviorSubject<Point3>;
|
|
44
45
|
readonly loaded: Map<MapGraphNodeType, (IEntity & IPositionable3d)[]>;
|
|
45
46
|
private _initialLoadComplete$;
|
|
46
47
|
get initialLoadComplete$(): Observable<boolean>;
|
|
@@ -60,10 +61,12 @@ export declare class MapGraph3dEntity<VTypeDoc extends VisualTypeDocRepo3D = Vis
|
|
|
60
61
|
rotation: Point4;
|
|
61
62
|
}
|
|
62
63
|
]>;
|
|
63
|
-
get world(): Gg3dWorld<VTypeDoc, PTypeDoc> | null;
|
|
64
|
-
protected _world: Gg3dWorld<VTypeDoc, PTypeDoc> | null;
|
|
65
64
|
protected readonly mapGraphNodes: MapGraph[];
|
|
66
65
|
protected readonly options: Gg3dMapGraphEntityOptions;
|
|
66
|
+
protected loadClock: PausableClock | null;
|
|
67
|
+
private _loadRateLimit;
|
|
68
|
+
get loadRateLimit(): number;
|
|
69
|
+
set loadRateLimit(value: number);
|
|
67
70
|
constructor(mapGraph: MapGraph, options?: Partial<Gg3dMapGraphEntityOptions>);
|
|
68
71
|
onSpawned(world: Gg3dWorld<VTypeDoc, PTypeDoc>): void;
|
|
69
72
|
onRemoved(): void;
|
|
@@ -7,9 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { BehaviorSubject,
|
|
11
|
-
import { distinctUntilChanged, map, tap
|
|
12
|
-
import { Graph, Qtrn, TickOrder } from '../../base';
|
|
10
|
+
import { BehaviorSubject, startWith, Subject, takeUntil } from 'rxjs';
|
|
11
|
+
import { distinctUntilChanged, map, tap } from 'rxjs/operators';
|
|
12
|
+
import { Graph, Pnt3, Qtrn, TickOrder } from '../../base';
|
|
13
13
|
import { IRenderable3dEntity } from './i-renderable-3d.entity';
|
|
14
14
|
export class MapGraph extends Graph {
|
|
15
15
|
/**
|
|
@@ -79,41 +79,49 @@ export class MapGraph extends Graph {
|
|
|
79
79
|
const defaultOptions = {
|
|
80
80
|
loadDepth: 5,
|
|
81
81
|
inertia: 0,
|
|
82
|
+
maxNodesLoadingPerTick: 1,
|
|
82
83
|
};
|
|
83
84
|
export class MapGraph3dEntity extends IRenderable3dEntity {
|
|
85
|
+
get initialLoadComplete$() {
|
|
86
|
+
return this._initialLoadComplete$.asObservable();
|
|
87
|
+
}
|
|
88
|
+
get nearestDummy() {
|
|
89
|
+
return this._nearestDummy$.getValue();
|
|
90
|
+
}
|
|
91
|
+
get chunkLoaded$() {
|
|
92
|
+
return this._chunkLoaded$.asObservable();
|
|
93
|
+
}
|
|
94
|
+
get loadRateLimit() {
|
|
95
|
+
return this._loadRateLimit;
|
|
96
|
+
}
|
|
97
|
+
set loadRateLimit(value) {
|
|
98
|
+
this._loadRateLimit = value;
|
|
99
|
+
if (this.loadClock) {
|
|
100
|
+
this.loadClock.tickRateLimit = value;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
84
103
|
constructor(mapGraph, options = {}) {
|
|
85
104
|
super();
|
|
86
105
|
this.mapGraph = mapGraph;
|
|
87
106
|
this.tickOrder = TickOrder.POST_RENDERING;
|
|
88
|
-
this.
|
|
107
|
+
this.loaderCursor$ = new BehaviorSubject(Pnt3.O);
|
|
89
108
|
this.loaded = new Map();
|
|
90
109
|
this._initialLoadComplete$ = new BehaviorSubject(false);
|
|
91
110
|
this._nearestDummy$ = new BehaviorSubject(null);
|
|
92
111
|
this._chunkLoaded$ = new Subject();
|
|
93
|
-
this.
|
|
112
|
+
this.loadClock = null;
|
|
113
|
+
this._loadRateLimit = 1;
|
|
94
114
|
this.options = Object.assign(Object.assign({}, defaultOptions), options);
|
|
95
115
|
this.mapGraphNodes = mapGraph.nodes();
|
|
96
116
|
}
|
|
97
|
-
get initialLoadComplete$() {
|
|
98
|
-
return this._initialLoadComplete$.asObservable();
|
|
99
|
-
}
|
|
100
|
-
get nearestDummy() {
|
|
101
|
-
return this._nearestDummy$.getValue();
|
|
102
|
-
}
|
|
103
|
-
get chunkLoaded$() {
|
|
104
|
-
return this._chunkLoaded$.asObservable();
|
|
105
|
-
}
|
|
106
|
-
get world() {
|
|
107
|
-
return this._world;
|
|
108
|
-
}
|
|
109
117
|
onSpawned(world) {
|
|
110
118
|
super.onSpawned(world);
|
|
111
|
-
this.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
this.loadClock = world.createClock(true);
|
|
120
|
+
this.loadClock.tickRateLimit = this._loadRateLimit;
|
|
121
|
+
let loadList = [];
|
|
122
|
+
let unloadList = [];
|
|
123
|
+
this.loadClock.tick$.pipe(startWith(null), // map will perform initial loading even if world not started yet. Handy to preload map
|
|
124
|
+
takeUntil(this._onRemoved$), map(() => this.mapGraph.getNearestDummy(this.mapGraphNodes, this.loaderCursor$.getValue())), distinctUntilChanged(), tap(node => this._nearestDummy$.next(node))).subscribe(currentChunk => {
|
|
117
125
|
let haveToBeLoaded = new Set();
|
|
118
126
|
let canBeLoaded;
|
|
119
127
|
if (this.options.inertia > 0) {
|
|
@@ -132,18 +140,54 @@ export class MapGraph3dEntity extends IRenderable3dEntity {
|
|
|
132
140
|
}
|
|
133
141
|
for (const loadedNode of this.loaded.keys()) {
|
|
134
142
|
if (!canBeLoaded.has(loadedNode)) {
|
|
135
|
-
|
|
143
|
+
if (!unloadList.includes(loadedNode)) {
|
|
144
|
+
unloadList.push(loadedNode);
|
|
145
|
+
}
|
|
136
146
|
}
|
|
137
147
|
else {
|
|
138
148
|
haveToBeLoaded.delete(loadedNode);
|
|
139
149
|
}
|
|
140
150
|
}
|
|
141
|
-
|
|
151
|
+
for (let n of Array.from(haveToBeLoaded.keys())) {
|
|
152
|
+
if (!loadList.includes(n)) {
|
|
153
|
+
loadList.push(n);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
this.tick$
|
|
158
|
+
.pipe(startWith(null), // map will perform initial loading even if world not started yet. Handy to preload map
|
|
159
|
+
takeUntil(this._onRemoved$))
|
|
160
|
+
.subscribe(() => {
|
|
161
|
+
if (unloadList.length) {
|
|
162
|
+
for (const n of unloadList) {
|
|
163
|
+
this.disposeChunk(n);
|
|
164
|
+
}
|
|
165
|
+
unloadList = [];
|
|
166
|
+
}
|
|
167
|
+
if (loadList.length) {
|
|
168
|
+
if (this._initialLoadComplete$.value && loadList.length > this.options.maxNodesLoadingPerTick) {
|
|
169
|
+
let loadNow = loadList.slice(0, this.options.maxNodesLoadingPerTick);
|
|
170
|
+
loadList = loadList.slice(this.options.maxNodesLoadingPerTick);
|
|
171
|
+
Promise.all(loadNow.map(n => this.loadChunk(n))).then();
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
Promise.all(loadList.map(n => this.loadChunk(n))).then(() => {
|
|
175
|
+
if (!this._initialLoadComplete$.value) {
|
|
176
|
+
this._initialLoadComplete$.next(true);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
loadList = [];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
142
182
|
});
|
|
143
183
|
}
|
|
144
184
|
onRemoved() {
|
|
145
185
|
super.onRemoved();
|
|
146
|
-
this.
|
|
186
|
+
if (this.loadClock) {
|
|
187
|
+
this.loadClock.stop();
|
|
188
|
+
this.loadClock = null;
|
|
189
|
+
}
|
|
190
|
+
this.loaderCursor$.next(Pnt3.O);
|
|
147
191
|
}
|
|
148
192
|
loadChunk(node) {
|
|
149
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4,12 +4,12 @@ import { IDisplayObject3dComponent } from '../components/rendering/i-display-obj
|
|
|
4
4
|
import { IRaycastVehicleComponent, SuspensionOptions } from '../components/physics/i-raycast-vehicle.component';
|
|
5
5
|
import { IRigidBody3dComponent } from '../components/physics/i-rigid-body-3d.component';
|
|
6
6
|
import { PhysicsTypeDocRepo3D, VisualTypeDocRepo3D } from '../gg-3d-world';
|
|
7
|
-
export
|
|
7
|
+
export type WheelDisplayOptions = {
|
|
8
8
|
displayObject?: IDisplayObject3dComponent;
|
|
9
9
|
wheelObjectDirection?: AxisDirection3;
|
|
10
10
|
autoScaleMesh?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type RVEntitySharedWheelOptions = {
|
|
13
13
|
tyreWidth?: number;
|
|
14
14
|
tyreRadius?: number;
|
|
15
15
|
frictionSlip?: number;
|
|
@@ -17,7 +17,7 @@ export declare type RVEntitySharedWheelOptions = {
|
|
|
17
17
|
maxTravel?: number;
|
|
18
18
|
display?: WheelDisplayOptions;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type RVEntityAxleOptions = {
|
|
21
21
|
halfAxleWidth: number;
|
|
22
22
|
axlePosition: number;
|
|
23
23
|
axleHeight: number;
|
|
@@ -26,7 +26,7 @@ export declare enum RVEntityTractionBias {
|
|
|
26
26
|
FWD = 1,
|
|
27
27
|
RWD = 0
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type RVEntityProperties = {
|
|
30
30
|
tractionBias: RVEntityTractionBias | number;
|
|
31
31
|
suspension: SuspensionOptions;
|
|
32
32
|
} & ({
|
|
@@ -51,6 +51,8 @@ export declare class RaycastVehicle3dEntity<VTypeDoc extends VisualTypeDocRepo3D
|
|
|
51
51
|
protected readonly wheelLocalRotation: (Point4 | null)[];
|
|
52
52
|
protected readonly frontWheelsIndices: number[];
|
|
53
53
|
protected readonly rearWheelsIndices: number[];
|
|
54
|
+
get name(): string;
|
|
55
|
+
set name(value: string);
|
|
54
56
|
getSpeed(): number;
|
|
55
57
|
readonly tractionWheelRadius: number;
|
|
56
58
|
private _steeringAngle;
|
|
@@ -13,6 +13,47 @@ const wheeelDefaults = {
|
|
|
13
13
|
maxTravel: 0.5,
|
|
14
14
|
};
|
|
15
15
|
export class RaycastVehicle3dEntity extends Entity3d {
|
|
16
|
+
get name() {
|
|
17
|
+
return super.name;
|
|
18
|
+
}
|
|
19
|
+
set name(value) {
|
|
20
|
+
const oldName = super.name;
|
|
21
|
+
super.name = value;
|
|
22
|
+
for (const w of this.wheels || []) {
|
|
23
|
+
if (w) {
|
|
24
|
+
w.name = w.name.replace(oldName, value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// m/s
|
|
29
|
+
getSpeed() {
|
|
30
|
+
return this.vehicleComponent.wheelSpeed;
|
|
31
|
+
}
|
|
32
|
+
get steeringAngle() {
|
|
33
|
+
return this._steeringAngle;
|
|
34
|
+
}
|
|
35
|
+
set steeringAngle(value) {
|
|
36
|
+
if (this._steeringAngle != value) {
|
|
37
|
+
this._steeringAngle = value;
|
|
38
|
+
}
|
|
39
|
+
this.frontWheelsIndices.forEach(index => this.vehicleComponent.setSteering(index, value));
|
|
40
|
+
}
|
|
41
|
+
applyTraction(axle, force) {
|
|
42
|
+
if (axle != 'rear') {
|
|
43
|
+
this.frontWheelsIndices.forEach(index => this.vehicleComponent.applyEngineForce(index, force));
|
|
44
|
+
}
|
|
45
|
+
if (axle != 'front') {
|
|
46
|
+
this.rearWheelsIndices.forEach(index => this.vehicleComponent.applyEngineForce(index, force));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
applyBrake(axle, force) {
|
|
50
|
+
if (axle != 'rear') {
|
|
51
|
+
this.frontWheelsIndices.forEach(index => this.vehicleComponent.applyBrake(index, force));
|
|
52
|
+
}
|
|
53
|
+
if (axle != 'front') {
|
|
54
|
+
this.rearWheelsIndices.forEach(index => this.vehicleComponent.applyBrake(index, force));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
16
57
|
/** car mesh and physics body direction has to be pointing: y front, z up*/
|
|
17
58
|
constructor(carProperties, chassis3D, vehicleComponent) {
|
|
18
59
|
super(chassis3D, vehicleComponent);
|
|
@@ -93,40 +134,13 @@ export class RaycastVehicle3dEntity extends Entity3d {
|
|
|
93
134
|
localRotation = { x: 0, y: 0.707107 * (flip ? 1 : -1), z: 0, w: 0.707107 };
|
|
94
135
|
}
|
|
95
136
|
this.wheelLocalRotation.push(localRotation);
|
|
96
|
-
|
|
137
|
+
const wheelEntity = new Entity3d(entity);
|
|
138
|
+
wheelEntity.name = this.name + '__wheel_' + (options.isFront ? 'f' : 'r') + (options.isLeft ? 'l' : 'r');
|
|
139
|
+
this.wheels.push(wheelEntity);
|
|
97
140
|
}
|
|
98
141
|
this.addChildren(...this.wheels.filter(x => !!x));
|
|
99
142
|
this.vehicleComponent.entity = this;
|
|
100
143
|
}
|
|
101
|
-
// m/s
|
|
102
|
-
getSpeed() {
|
|
103
|
-
return this.vehicleComponent.wheelSpeed;
|
|
104
|
-
}
|
|
105
|
-
get steeringAngle() {
|
|
106
|
-
return this._steeringAngle;
|
|
107
|
-
}
|
|
108
|
-
set steeringAngle(value) {
|
|
109
|
-
if (this._steeringAngle != value) {
|
|
110
|
-
this._steeringAngle = value;
|
|
111
|
-
}
|
|
112
|
-
this.frontWheelsIndices.forEach(index => this.vehicleComponent.setSteering(index, value));
|
|
113
|
-
}
|
|
114
|
-
applyTraction(axle, force) {
|
|
115
|
-
if (axle != 'rear') {
|
|
116
|
-
this.frontWheelsIndices.forEach(index => this.vehicleComponent.applyEngineForce(index, force));
|
|
117
|
-
}
|
|
118
|
-
if (axle != 'front') {
|
|
119
|
-
this.rearWheelsIndices.forEach(index => this.vehicleComponent.applyEngineForce(index, force));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
applyBrake(axle, force) {
|
|
123
|
-
if (axle != 'rear') {
|
|
124
|
-
this.frontWheelsIndices.forEach(index => this.vehicleComponent.applyBrake(index, force));
|
|
125
|
-
}
|
|
126
|
-
if (axle != 'front') {
|
|
127
|
-
this.rearWheelsIndices.forEach(index => this.vehicleComponent.applyBrake(index, force));
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
144
|
runTransformBinding(objectBody, object3D) {
|
|
131
145
|
super.runTransformBinding(objectBody, object3D);
|
|
132
146
|
for (const [i, wheel] of (this.wheels || []).entries()) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import { IEntity, Pnt3, Qtrn, TickOrder } from '../../base';
|
|
2
2
|
import { map } from 'rxjs/operators';
|
|
3
3
|
export class Trigger3dEntity extends IEntity {
|
|
4
|
-
constructor(objectBody) {
|
|
5
|
-
super();
|
|
6
|
-
this.objectBody = objectBody;
|
|
7
|
-
this.tickOrder = TickOrder.OBJECTS_BINDING;
|
|
8
|
-
this._position = Pnt3.O;
|
|
9
|
-
this._rotation = Qtrn.O;
|
|
10
|
-
this.tick$.subscribe(() => {
|
|
11
|
-
this.objectBody.checkOverlaps();
|
|
12
|
-
});
|
|
13
|
-
this.addComponents(this.objectBody);
|
|
14
|
-
}
|
|
15
4
|
get onEntityEntered() {
|
|
16
5
|
return this.objectBody.onEntityEntered.pipe(map(c => c.entity));
|
|
17
6
|
}
|
|
@@ -32,4 +21,15 @@ export class Trigger3dEntity extends IEntity {
|
|
|
32
21
|
this.objectBody.rotation = value;
|
|
33
22
|
this._rotation = value;
|
|
34
23
|
}
|
|
24
|
+
constructor(objectBody) {
|
|
25
|
+
super();
|
|
26
|
+
this.objectBody = objectBody;
|
|
27
|
+
this.tickOrder = TickOrder.OBJECTS_BINDING;
|
|
28
|
+
this._position = Pnt3.O;
|
|
29
|
+
this._rotation = Qtrn.O;
|
|
30
|
+
this.tick$.subscribe(() => {
|
|
31
|
+
this.objectBody.checkOverlaps();
|
|
32
|
+
});
|
|
33
|
+
this.addComponents(this.objectBody);
|
|
34
|
+
}
|
|
35
35
|
}
|
package/dist/3d/factories.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BodyShape3DDescriptor, Shape3DDescriptor, Shape3DMeshDescriptor } from './models/shapes';
|
|
2
2
|
import { Point3, Point4 } from '../base';
|
|
3
3
|
import { PhysicsTypeDocRepo3D, VisualTypeDocRepo3D } from './gg-3d-world';
|
|
4
|
-
export
|
|
4
|
+
export type DisplayObject3dOpts<Tex> = {
|
|
5
5
|
color?: number;
|
|
6
6
|
shading?: 'unlit' | 'standart' | 'phong' | 'wireframe';
|
|
7
7
|
diffuse?: Tex;
|
package/dist/3d/factories.js
CHANGED
|
File without changes
|
package/dist/3d/gg-3d-world.d.ts
CHANGED
|
@@ -13,15 +13,16 @@ import { IRaycastVehicleComponent } from './components/physics/i-raycast-vehicle
|
|
|
13
13
|
import { IRigidBody3dComponent } from './components/physics/i-rigid-body-3d.component';
|
|
14
14
|
import { ITrigger3dComponent } from './components/physics/i-trigger-3d.component';
|
|
15
15
|
import { IDisplayObject3dComponentLoader, IPhysicsBody3dComponentLoader } from './loaders';
|
|
16
|
-
export
|
|
16
|
+
export type VisualTypeDocRepo3D = {
|
|
17
17
|
factory: IDisplayObject3dComponentFactory;
|
|
18
18
|
loader: IDisplayObject3dComponentLoader;
|
|
19
19
|
displayObject: IDisplayObject3dComponent;
|
|
20
20
|
renderer: IRenderer3dComponent;
|
|
21
|
+
rendererExtraOpts: {};
|
|
21
22
|
camera: ICameraComponent;
|
|
22
23
|
texture: unknown;
|
|
23
24
|
};
|
|
24
|
-
export
|
|
25
|
+
export type PhysicsTypeDocRepo3D = {
|
|
25
26
|
factory: IPhysicsBody3dComponentFactory;
|
|
26
27
|
loader: IPhysicsBody3dComponentLoader;
|
|
27
28
|
rigidBody: IRigidBody3dComponent;
|
|
@@ -34,5 +35,5 @@ export declare class Gg3dWorld<VTypeDoc extends VisualTypeDocRepo3D = VisualType
|
|
|
34
35
|
readonly loader: Gg3dLoader<VTypeDoc, PTypeDoc>;
|
|
35
36
|
constructor(visualScene: VS, physicsWorld: PW);
|
|
36
37
|
addPrimitiveRigidBody(descr: BodyShape3DDescriptor, position?: Point3, rotation?: Point4, material?: DisplayObject3dOpts<VTypeDoc['texture']>): Entity3d<VTypeDoc, PTypeDoc>;
|
|
37
|
-
addRenderer(camera: VTypeDoc['camera'], canvas?: HTMLCanvasElement, rendererOptions?: Partial<RendererOptions>): Renderer3dEntity<VTypeDoc>;
|
|
38
|
+
addRenderer(camera: VTypeDoc['camera'], canvas?: HTMLCanvasElement, rendererOptions?: Partial<RendererOptions & VTypeDoc['rendererExtraOpts']>): Renderer3dEntity<VTypeDoc>;
|
|
38
39
|
}
|
package/dist/3d/gg-3d-world.js
CHANGED
|
File without changes
|
package/dist/3d/index.d.ts
CHANGED
|
File without changes
|
package/dist/3d/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/3d/loader.d.ts
CHANGED
|
@@ -7,25 +7,25 @@ export declare enum CachingStrategy {
|
|
|
7
7
|
Files = 1,
|
|
8
8
|
Entities = 2
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type LoadOptions = {
|
|
11
11
|
cachingStrategy: CachingStrategy;
|
|
12
12
|
position: Point3;
|
|
13
13
|
rotation: Point4;
|
|
14
14
|
loadProps: boolean;
|
|
15
15
|
propsPath?: string;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type LoadResourcesResult<VTypeDoc extends VisualTypeDocRepo3D = VisualTypeDocRepo3D, PTypeDoc extends PhysicsTypeDocRepo3D = PhysicsTypeDocRepo3D> = {
|
|
18
18
|
resources: {
|
|
19
19
|
object3D: VTypeDoc['displayObject'] | null;
|
|
20
20
|
body: PTypeDoc['rigidBody'] | null;
|
|
21
21
|
}[];
|
|
22
22
|
meta: GgMeta;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type LoadResult<VTypeDoc extends VisualTypeDocRepo3D = VisualTypeDocRepo3D, PTypeDoc extends PhysicsTypeDocRepo3D = PhysicsTypeDocRepo3D> = {
|
|
25
25
|
entities: Entity3d<VTypeDoc, PTypeDoc>[];
|
|
26
26
|
meta: GgMeta;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type LoadResultWithProps<VTypeDoc extends VisualTypeDocRepo3D = VisualTypeDocRepo3D, PTypeDoc extends PhysicsTypeDocRepo3D = PhysicsTypeDocRepo3D> = LoadResult<VTypeDoc, PTypeDoc> & {
|
|
29
29
|
props?: LoadResult<VTypeDoc, PTypeDoc>[];
|
|
30
30
|
};
|
|
31
31
|
export declare class Gg3dLoader<VTypeDoc extends VisualTypeDocRepo3D = VisualTypeDocRepo3D, PTypeDoc extends PhysicsTypeDocRepo3D = PhysicsTypeDocRepo3D> {
|
package/dist/3d/loader.js
CHANGED
|
@@ -22,7 +22,7 @@ const defaultLoadOptions = {
|
|
|
22
22
|
loadProps: true,
|
|
23
23
|
};
|
|
24
24
|
const cloneLoadResourcesResult = (loadResult) => ({
|
|
25
|
-
meta: loadResult.meta,
|
|
25
|
+
meta: loadResult.meta, // TODO deep clone it
|
|
26
26
|
resources: loadResult.resources.map(({ object3D, body }) => ({
|
|
27
27
|
object3D: object3D && object3D.clone(),
|
|
28
28
|
body: body && body.clone(),
|
|
@@ -34,8 +34,8 @@ export class Gg3dLoader {
|
|
|
34
34
|
this.filesCache = new Map();
|
|
35
35
|
this.loadResultCache = new Map();
|
|
36
36
|
}
|
|
37
|
-
loadGgGlbFiles(
|
|
38
|
-
return __awaiter(this,
|
|
37
|
+
loadGgGlbFiles(path_1) {
|
|
38
|
+
return __awaiter(this, arguments, void 0, function* (path, useCache = false) {
|
|
39
39
|
if (useCache && this.filesCache.has(path)) {
|
|
40
40
|
return this.filesCache.get(path);
|
|
41
41
|
}
|
|
@@ -55,8 +55,8 @@ export class Gg3dLoader {
|
|
|
55
55
|
return result;
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
loadGgGlbResources(
|
|
59
|
-
return __awaiter(this,
|
|
58
|
+
loadGgGlbResources(path_1) {
|
|
59
|
+
return __awaiter(this, arguments, void 0, function* (path, cachingStrategy = CachingStrategy.Nothing) {
|
|
60
60
|
if (cachingStrategy == CachingStrategy.Entities && this.loadResultCache.has(path)) {
|
|
61
61
|
const cached = this.loadResultCache.get(path);
|
|
62
62
|
const cachedResult = cached instanceof Promise ? yield cached : cached;
|
|
@@ -94,8 +94,8 @@ export class Gg3dLoader {
|
|
|
94
94
|
return result;
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
loadGgGlb(
|
|
98
|
-
return __awaiter(this,
|
|
97
|
+
loadGgGlb(path_1) {
|
|
98
|
+
return __awaiter(this, arguments, void 0, function* (path, options = defaultLoadOptions) {
|
|
99
99
|
const loadOptions = Object.assign(Object.assign({}, defaultLoadOptions), options);
|
|
100
100
|
const { resources, meta } = yield this.loadGgGlbResources(path, loadOptions.cachingStrategy);
|
|
101
101
|
const result = {
|
package/dist/3d/loaders.d.ts
CHANGED
|
File without changes
|
package/dist/3d/loaders.js
CHANGED
|
File without changes
|
|
@@ -2,6 +2,6 @@ import { BodyOptions, DebugBodySettings } from '../../base';
|
|
|
2
2
|
import { Shape3DDescriptor } from './shapes';
|
|
3
3
|
export interface Body3DOptions extends BodyOptions {
|
|
4
4
|
}
|
|
5
|
-
export
|
|
5
|
+
export type DebugBody3DSettings = DebugBodySettings & {
|
|
6
6
|
shape: Shape3DDescriptor;
|
|
7
7
|
};
|
|
File without changes
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Point3, Point4 } from '../../base';
|
|
2
2
|
import { BodyShape3DDescriptor } from './shapes';
|
|
3
|
-
export
|
|
3
|
+
export type GgDummy = {
|
|
4
4
|
name: string;
|
|
5
5
|
position: Point3;
|
|
6
6
|
rotation: Point4;
|
|
7
7
|
} & any;
|
|
8
|
-
export
|
|
8
|
+
export type GgCurve = {
|
|
9
9
|
name: string;
|
|
10
10
|
cyclic: boolean;
|
|
11
11
|
points: Point3[];
|
|
12
12
|
} & any;
|
|
13
|
-
export
|
|
13
|
+
export type GgRigidBody = {
|
|
14
14
|
name: string;
|
|
15
15
|
position: Point3;
|
|
16
16
|
rotation: Point4;
|
|
17
17
|
} & BodyShape3DDescriptor;
|
|
18
|
-
export
|
|
18
|
+
export type GgMeta = {
|
|
19
19
|
dummies: GgDummy[];
|
|
20
20
|
curves: GgCurve[];
|
|
21
21
|
rigidBodies: GgRigidBody[];
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Point2, Point3, Point4 } from '../../base';
|
|
2
2
|
import { Body3DOptions } from './body-options';
|
|
3
|
-
export
|
|
3
|
+
export type Shape3DDescriptor = {
|
|
4
4
|
shape: 'PLANE';
|
|
5
5
|
} | {
|
|
6
6
|
shape: 'BOX';
|
|
@@ -31,7 +31,7 @@ export declare type Shape3DDescriptor = {
|
|
|
31
31
|
vertices: Point3[];
|
|
32
32
|
faces: [number, number, number][];
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type Shape3DMeshDescriptor = {
|
|
35
35
|
shape: 'PLANE';
|
|
36
36
|
dimensions?: Point2;
|
|
37
37
|
segments?: Point2;
|
|
@@ -71,7 +71,7 @@ export declare type Shape3DMeshDescriptor = {
|
|
|
71
71
|
vertices: Point3[];
|
|
72
72
|
faces: [number, number, number][];
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type BodyShape3DDescriptor = {
|
|
75
75
|
shape: Shape3DDescriptor;
|
|
76
76
|
body: Partial<Body3DOptions>;
|
|
77
77
|
};
|
package/dist/3d/models/shapes.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -6,14 +6,6 @@ import { PausableClock } from './pausable-clock';
|
|
|
6
6
|
* Starts as soon as accessed and counts time from 01/01/1970
|
|
7
7
|
*/
|
|
8
8
|
export class GgGlobalClock {
|
|
9
|
-
constructor() {
|
|
10
|
-
this._tick$ = new Subject();
|
|
11
|
-
let oldRelativeTime = this.elapsedTime;
|
|
12
|
-
of(undefined, animationFrameScheduler)
|
|
13
|
-
.pipe(repeat())
|
|
14
|
-
.pipe(map(() => [oldRelativeTime, this.elapsedTime]), tap(([_, cur]) => (oldRelativeTime = cur)))
|
|
15
|
-
.subscribe(this._tick$);
|
|
16
|
-
}
|
|
17
9
|
static get instance() {
|
|
18
10
|
if (!GgGlobalClock._instance) {
|
|
19
11
|
GgGlobalClock._instance = new GgGlobalClock();
|
|
@@ -29,4 +21,12 @@ export class GgGlobalClock {
|
|
|
29
21
|
createChildClock(autoStart) {
|
|
30
22
|
return new PausableClock(autoStart, this);
|
|
31
23
|
}
|
|
24
|
+
constructor() {
|
|
25
|
+
this._tick$ = new Subject();
|
|
26
|
+
let oldRelativeTime = this.elapsedTime;
|
|
27
|
+
of(undefined, animationFrameScheduler)
|
|
28
|
+
.pipe(repeat())
|
|
29
|
+
.pipe(map(() => [oldRelativeTime, this.elapsedTime]), tap(([_, cur]) => (oldRelativeTime = cur)))
|
|
30
|
+
.subscribe(this._tick$);
|
|
31
|
+
}
|
|
32
32
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
|
2
2
|
import { IClock } from './i-clock';
|
|
3
3
|
/**
|
|
4
4
|
* A class providing the ability to track time, fire ticks, provide time elapsed, and tick delta with the ability to suspend/resume it.
|
|
@@ -6,6 +6,7 @@ import { IClock } from './i-clock';
|
|
|
6
6
|
export declare class PausableClock implements IClock {
|
|
7
7
|
protected readonly parentClock: IClock;
|
|
8
8
|
private tickSub;
|
|
9
|
+
private readonly _internalTick$;
|
|
9
10
|
private readonly _tick$;
|
|
10
11
|
/**
|
|
11
12
|
* Observable stream of ticks, emitting an array containing the current time and the tick delta.
|
|
@@ -35,12 +36,18 @@ export declare class PausableClock implements IClock {
|
|
|
35
36
|
* Gets the elapsed time since the clock started.
|
|
36
37
|
*/
|
|
37
38
|
get elapsedTime(): number;
|
|
39
|
+
/**
|
|
40
|
+
* Tick rate limiter. If set to 0 - tick rate is unlimited, 15 means "allow at most 15 ticks per second"
|
|
41
|
+
*/
|
|
42
|
+
tickRateLimit: number;
|
|
43
|
+
readonly paused$: Subject<boolean>;
|
|
38
44
|
private startedAt;
|
|
39
45
|
private oldRelativeTime;
|
|
40
46
|
private pausedAt;
|
|
41
47
|
private lastStopElapsed;
|
|
42
48
|
private _timeScale;
|
|
43
49
|
private pausedByTimescale;
|
|
50
|
+
private lastFiredTickElapsed;
|
|
44
51
|
/**
|
|
45
52
|
* Constructs a new PausableClock instance.
|
|
46
53
|
* @param autoStart Indicates whether the clock should start automatically upon creation.
|