@quick-threejs/reactive 0.1.3
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/LICENSE +9 -0
- package/README.md +49 -0
- package/dist/src/common/constants/event.constants.d.ts +2 -0
- package/dist/src/common/constants/event.constants.js +23 -0
- package/dist/src/common/constants/event.constants.js.map +1 -0
- package/dist/src/common/enums/camera.enum.d.ts +4 -0
- package/dist/src/common/enums/camera.enum.js +6 -0
- package/dist/src/common/enums/camera.enum.js.map +1 -0
- package/dist/src/common/enums/lifecycle.enum.d.ts +10 -0
- package/dist/src/common/enums/lifecycle.enum.js +13 -0
- package/dist/src/common/enums/lifecycle.enum.js.map +1 -0
- package/dist/src/common/interfaces/canvas.interface.d.ts +6 -0
- package/dist/src/common/interfaces/canvas.interface.js +2 -0
- package/dist/src/common/interfaces/canvas.interface.js.map +1 -0
- package/dist/src/common/interfaces/core.interface.d.ts +11 -0
- package/dist/src/common/interfaces/core.interface.js +2 -0
- package/dist/src/common/interfaces/core.interface.js.map +1 -0
- package/dist/src/common/interfaces/event.interface.d.ts +4 -0
- package/dist/src/common/interfaces/event.interface.js +2 -0
- package/dist/src/common/interfaces/event.interface.js.map +1 -0
- package/dist/src/common/interfaces/module.interface.d.ts +27 -0
- package/dist/src/common/interfaces/module.interface.js +2 -0
- package/dist/src/common/interfaces/module.interface.js.map +1 -0
- package/dist/src/common/interfaces/resource.interface.d.ts +14 -0
- package/dist/src/common/interfaces/resource.interface.js +2 -0
- package/dist/src/common/interfaces/resource.interface.js.map +1 -0
- package/dist/src/common/models/app-proxy-event-handler.model.d.ts +31 -0
- package/dist/src/common/models/app-proxy-event-handler.model.js +31 -0
- package/dist/src/common/models/app-proxy-event-handler.model.js.map +1 -0
- package/dist/src/common/models/proxy-event-handler.model.d.ts +18 -0
- package/dist/src/common/models/proxy-event-handler.model.js +18 -0
- package/dist/src/common/models/proxy-event-handler.model.js.map +1 -0
- package/dist/src/common/models/proxy-event-observables.model.d.ts +19 -0
- package/dist/src/common/models/proxy-event-observables.model.js +18 -0
- package/dist/src/common/models/proxy-event-observables.model.js.map +1 -0
- package/dist/src/common/models/proxy-event-subjects.models.d.ts +18 -0
- package/dist/src/common/models/proxy-event-subjects.models.js +17 -0
- package/dist/src/common/models/proxy-event-subjects.models.js.map +1 -0
- package/dist/src/common/models/register-props.model.d.ts +75 -0
- package/dist/src/common/models/register-props.model.js +74 -0
- package/dist/src/common/models/register-props.model.js.map +1 -0
- package/dist/src/common/models/register-proxy-event-handler.model.d.ts +17 -0
- package/dist/src/common/models/register-proxy-event-handler.model.js +17 -0
- package/dist/src/common/models/register-proxy-event-handler.model.js.map +1 -0
- package/dist/src/common/serializers/object3d.serializer.d.ts +2 -0
- package/dist/src/common/serializers/object3d.serializer.js +16 -0
- package/dist/src/common/serializers/object3d.serializer.js.map +1 -0
- package/dist/src/common/types/object.type.d.ts +25 -0
- package/dist/src/common/types/object.type.js +2 -0
- package/dist/src/common/types/object.type.js.map +1 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/main.js +20 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/main.worker.d.ts +2 -0
- package/dist/src/main.worker.js +27 -0
- package/dist/src/main.worker.js.map +1 -0
- package/dist/src/modules/app/app.component.d.ts +7 -0
- package/dist/src/modules/app/app.component.js +18 -0
- package/dist/src/modules/app/app.component.js.map +1 -0
- package/dist/src/modules/app/app.controller.d.ts +10 -0
- package/dist/src/modules/app/app.controller.js +44 -0
- package/dist/src/modules/app/app.controller.js.map +1 -0
- package/dist/src/modules/app/app.module-worker.d.ts +6 -0
- package/dist/src/modules/app/app.module-worker.js +27 -0
- package/dist/src/modules/app/app.module-worker.js.map +1 -0
- package/dist/src/modules/app/app.module.d.ts +32 -0
- package/dist/src/modules/app/app.module.js +125 -0
- package/dist/src/modules/app/app.module.js.map +1 -0
- package/dist/src/modules/app/camera/camera.component.d.ts +18 -0
- package/dist/src/modules/app/camera/camera.component.js +81 -0
- package/dist/src/modules/app/camera/camera.component.js.map +1 -0
- package/dist/src/modules/app/camera/camera.controller.d.ts +10 -0
- package/dist/src/modules/app/camera/camera.controller.js +35 -0
- package/dist/src/modules/app/camera/camera.controller.js.map +1 -0
- package/dist/src/modules/app/camera/camera.module.d.ts +12 -0
- package/dist/src/modules/app/camera/camera.module.js +56 -0
- package/dist/src/modules/app/camera/camera.module.js.map +1 -0
- package/dist/src/modules/app/debug/debug.component.d.ts +28 -0
- package/dist/src/modules/app/debug/debug.component.js +119 -0
- package/dist/src/modules/app/debug/debug.component.js.map +1 -0
- package/dist/src/modules/app/debug/debug.controller.d.ts +6 -0
- package/dist/src/modules/app/debug/debug.controller.js +29 -0
- package/dist/src/modules/app/debug/debug.controller.js.map +1 -0
- package/dist/src/modules/app/debug/debug.module.d.ts +10 -0
- package/dist/src/modules/app/debug/debug.module.js +41 -0
- package/dist/src/modules/app/debug/debug.module.js.map +1 -0
- package/dist/src/modules/app/renderer/renderer.component.d.ts +19 -0
- package/dist/src/modules/app/renderer/renderer.component.js +83 -0
- package/dist/src/modules/app/renderer/renderer.component.js.map +1 -0
- package/dist/src/modules/app/renderer/renderer.controller.d.ts +13 -0
- package/dist/src/modules/app/renderer/renderer.controller.js +42 -0
- package/dist/src/modules/app/renderer/renderer.controller.js.map +1 -0
- package/dist/src/modules/app/renderer/renderer.module.d.ts +11 -0
- package/dist/src/modules/app/renderer/renderer.module.js +40 -0
- package/dist/src/modules/app/renderer/renderer.module.js.map +1 -0
- package/dist/src/modules/app/sizes/sizes.component.d.ts +10 -0
- package/dist/src/modules/app/sizes/sizes.component.js +26 -0
- package/dist/src/modules/app/sizes/sizes.component.js.map +1 -0
- package/dist/src/modules/app/sizes/sizes.controller.d.ts +9 -0
- package/dist/src/modules/app/sizes/sizes.controller.js +35 -0
- package/dist/src/modules/app/sizes/sizes.controller.js.map +1 -0
- package/dist/src/modules/app/sizes/sizes.module.d.ts +11 -0
- package/dist/src/modules/app/sizes/sizes.module.js +41 -0
- package/dist/src/modules/app/sizes/sizes.module.js.map +1 -0
- package/dist/src/modules/app/timer/timer.component.d.ts +8 -0
- package/dist/src/modules/app/timer/timer.component.js +20 -0
- package/dist/src/modules/app/timer/timer.component.js.map +1 -0
- package/dist/src/modules/app/timer/timer.controller.d.ts +15 -0
- package/dist/src/modules/app/timer/timer.controller.js +57 -0
- package/dist/src/modules/app/timer/timer.controller.js.map +1 -0
- package/dist/src/modules/app/timer/timer.module.d.ts +17 -0
- package/dist/src/modules/app/timer/timer.module.js +72 -0
- package/dist/src/modules/app/timer/timer.module.js.map +1 -0
- package/dist/src/modules/app/world/world.component.d.ts +4 -0
- package/dist/src/modules/app/world/world.component.js +16 -0
- package/dist/src/modules/app/world/world.component.js.map +1 -0
- package/dist/src/modules/app/world/world.controller.d.ts +2 -0
- package/dist/src/modules/app/world/world.controller.js +14 -0
- package/dist/src/modules/app/world/world.controller.js.map +1 -0
- package/dist/src/modules/app/world/world.module.d.ts +12 -0
- package/dist/src/modules/app/world/world.module.js +41 -0
- package/dist/src/modules/app/world/world.module.js.map +1 -0
- package/dist/src/modules/loader/loader.component.d.ts +25 -0
- package/dist/src/modules/loader/loader.component.js +68 -0
- package/dist/src/modules/loader/loader.component.js.map +1 -0
- package/dist/src/modules/loader/loader.controller.d.ts +9 -0
- package/dist/src/modules/loader/loader.controller.js +21 -0
- package/dist/src/modules/loader/loader.controller.js.map +1 -0
- package/dist/src/modules/loader/loader.module-worker.d.ts +3 -0
- package/dist/src/modules/loader/loader.module-worker.js +17 -0
- package/dist/src/modules/loader/loader.module-worker.js.map +1 -0
- package/dist/src/modules/loader/loader.module.d.ts +35 -0
- package/dist/src/modules/loader/loader.module.js +120 -0
- package/dist/src/modules/loader/loader.module.js.map +1 -0
- package/dist/src/modules/register/register.component.d.ts +13 -0
- package/dist/src/modules/register/register.component.js +35 -0
- package/dist/src/modules/register/register.component.js.map +1 -0
- package/dist/src/modules/register/register.controller.d.ts +40 -0
- package/dist/src/modules/register/register.controller.js +111 -0
- package/dist/src/modules/register/register.controller.js.map +1 -0
- package/dist/src/modules/register/register.module.d.ts +57 -0
- package/dist/src/modules/register/register.module.js +222 -0
- package/dist/src/modules/register/register.module.js.map +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/dist/vite.config.js +53 -0
- package/dist/vite.config.js.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, singleton } from "tsyringe";
|
|
14
|
+
import { OrthographicCamera, PerspectiveCamera } from "three";
|
|
15
|
+
import { CameraComponent } from "./camera.component";
|
|
16
|
+
import { CameraController } from "./camera.controller";
|
|
17
|
+
import { SizesComponent } from "../sizes/sizes.component";
|
|
18
|
+
let CameraModule = class CameraModule {
|
|
19
|
+
component;
|
|
20
|
+
sizesComponent;
|
|
21
|
+
controller;
|
|
22
|
+
constructor(component, sizesComponent, controller) {
|
|
23
|
+
this.component = component;
|
|
24
|
+
this.sizesComponent = sizesComponent;
|
|
25
|
+
this.controller = controller;
|
|
26
|
+
}
|
|
27
|
+
init(withMiniCamera) {
|
|
28
|
+
this.component.setDefaultCamera();
|
|
29
|
+
if (withMiniCamera)
|
|
30
|
+
this.component.setMiniCamera();
|
|
31
|
+
this.controller.step$.subscribe(() => {
|
|
32
|
+
if (!this.component.enabled)
|
|
33
|
+
return;
|
|
34
|
+
this.component.aspectRatio = this.sizesComponent.aspect;
|
|
35
|
+
if (this.component.instance instanceof PerspectiveCamera ||
|
|
36
|
+
this.component.instance instanceof OrthographicCamera)
|
|
37
|
+
this.component.instance?.updateProjectionMatrix();
|
|
38
|
+
this.component.miniCamera?.updateProjectionMatrix();
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
dispose() {
|
|
42
|
+
this.component.removeCamera();
|
|
43
|
+
this.component.removeMiniCamera();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
CameraModule = __decorate([
|
|
47
|
+
singleton(),
|
|
48
|
+
__param(0, inject(CameraComponent)),
|
|
49
|
+
__param(1, inject(SizesComponent)),
|
|
50
|
+
__param(2, inject(CameraController)),
|
|
51
|
+
__metadata("design:paramtypes", [CameraComponent,
|
|
52
|
+
SizesComponent,
|
|
53
|
+
CameraController])
|
|
54
|
+
], CameraModule);
|
|
55
|
+
export { CameraModule };
|
|
56
|
+
//# sourceMappingURL=camera.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera.module.js","sourceRoot":"","sources":["../../../../../src/modules/app/camera/camera.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAInD,IAAM,YAAY,GAAlB,MAA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from "three";
|
|
2
|
+
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
|
|
3
|
+
import { CameraComponent } from "../camera/camera.component";
|
|
4
|
+
import { AppComponent } from "../app.component";
|
|
5
|
+
import { WorldComponent } from "../world/world.component";
|
|
6
|
+
export declare class DebugComponent {
|
|
7
|
+
private readonly appComponent;
|
|
8
|
+
private readonly cameraComponent;
|
|
9
|
+
private readonly worldComponent;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
cameraControls?: OrbitControls;
|
|
12
|
+
miniCameraControls?: OrbitControls;
|
|
13
|
+
cameraHelper?: CameraHelper;
|
|
14
|
+
axesHelper?: AxesHelper;
|
|
15
|
+
gridHelper?: GridHelper;
|
|
16
|
+
constructor(appComponent: AppComponent, cameraComponent: CameraComponent, worldComponent: WorldComponent);
|
|
17
|
+
private _setCameraOrbitControl;
|
|
18
|
+
private _setMiniCameraOrbitControls;
|
|
19
|
+
private _setCameraHelper;
|
|
20
|
+
private _setAxesHelper;
|
|
21
|
+
private _setGridHelper;
|
|
22
|
+
init(props?: {
|
|
23
|
+
axesSizes?: number;
|
|
24
|
+
gridSizes?: number;
|
|
25
|
+
}): void;
|
|
26
|
+
update(): void;
|
|
27
|
+
dispose(): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, singleton } from "tsyringe";
|
|
14
|
+
import { AxesHelper, Camera, CameraHelper, GridHelper } from "three";
|
|
15
|
+
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
|
|
16
|
+
import { CameraComponent } from "../camera/camera.component";
|
|
17
|
+
import { AppComponent } from "../app.component";
|
|
18
|
+
import { WorldComponent } from "../world/world.component";
|
|
19
|
+
let DebugComponent = class DebugComponent {
|
|
20
|
+
appComponent;
|
|
21
|
+
cameraComponent;
|
|
22
|
+
worldComponent;
|
|
23
|
+
enabled = true;
|
|
24
|
+
cameraControls;
|
|
25
|
+
miniCameraControls;
|
|
26
|
+
cameraHelper;
|
|
27
|
+
axesHelper;
|
|
28
|
+
gridHelper;
|
|
29
|
+
constructor(appComponent, cameraComponent, worldComponent) {
|
|
30
|
+
this.appComponent = appComponent;
|
|
31
|
+
this.cameraComponent = cameraComponent;
|
|
32
|
+
this.worldComponent = worldComponent;
|
|
33
|
+
}
|
|
34
|
+
_setCameraOrbitControl() {
|
|
35
|
+
if (this.cameraControls) {
|
|
36
|
+
this.cameraControls?.dispose();
|
|
37
|
+
this.cameraControls = undefined;
|
|
38
|
+
}
|
|
39
|
+
if (!this.enabled || !(this.cameraComponent.instance instanceof Camera))
|
|
40
|
+
return;
|
|
41
|
+
if (this.cameraComponent.instance instanceof Camera) {
|
|
42
|
+
this.cameraControls = new OrbitControls(this.cameraComponent.instance, this.appComponent.proxyReceiver);
|
|
43
|
+
if (this.cameraControls)
|
|
44
|
+
this.cameraControls.enableDamping = true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
_setMiniCameraOrbitControls() {
|
|
48
|
+
if (this.miniCameraControls) {
|
|
49
|
+
this.miniCameraControls.dispose();
|
|
50
|
+
this.miniCameraControls = undefined;
|
|
51
|
+
}
|
|
52
|
+
if (!this.enabled)
|
|
53
|
+
return;
|
|
54
|
+
if (this.cameraComponent.miniCamera) {
|
|
55
|
+
this.miniCameraControls = new OrbitControls(this.cameraComponent.miniCamera, this.appComponent.proxyReceiver);
|
|
56
|
+
this.miniCameraControls.enableDamping = true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
_setCameraHelper() {
|
|
60
|
+
if (this.cameraHelper) {
|
|
61
|
+
this.worldComponent.scene.remove(this.cameraHelper);
|
|
62
|
+
this.cameraHelper = undefined;
|
|
63
|
+
}
|
|
64
|
+
if (!this.enabled)
|
|
65
|
+
return;
|
|
66
|
+
if (this.cameraComponent.instance) {
|
|
67
|
+
this.cameraHelper = new CameraHelper(this.cameraComponent.instance);
|
|
68
|
+
this.worldComponent.scene.add(this.cameraHelper);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
_setAxesHelper(axesSizes) {
|
|
72
|
+
const axesHelper = new AxesHelper(axesSizes);
|
|
73
|
+
this.worldComponent.scene.add(axesHelper);
|
|
74
|
+
}
|
|
75
|
+
_setGridHelper(gridSizes) {
|
|
76
|
+
const axesHelper = new GridHelper(gridSizes, gridSizes);
|
|
77
|
+
this.worldComponent.scene.add(axesHelper);
|
|
78
|
+
}
|
|
79
|
+
init(props) {
|
|
80
|
+
this._setCameraOrbitControl();
|
|
81
|
+
this._setMiniCameraOrbitControls();
|
|
82
|
+
this._setCameraHelper();
|
|
83
|
+
if (typeof props?.axesSizes === "number")
|
|
84
|
+
this._setAxesHelper(props.axesSizes);
|
|
85
|
+
if (typeof props?.gridSizes === "number")
|
|
86
|
+
this._setGridHelper(props.gridSizes);
|
|
87
|
+
}
|
|
88
|
+
update() {
|
|
89
|
+
if (!this.enabled)
|
|
90
|
+
return;
|
|
91
|
+
this.cameraControls?.update();
|
|
92
|
+
this.miniCameraControls?.update();
|
|
93
|
+
}
|
|
94
|
+
dispose() {
|
|
95
|
+
if (this.cameraHelper) {
|
|
96
|
+
this.worldComponent.scene.remove(this.cameraHelper);
|
|
97
|
+
this.cameraHelper = undefined;
|
|
98
|
+
}
|
|
99
|
+
if (this.cameraControls) {
|
|
100
|
+
this.cameraControls.dispose();
|
|
101
|
+
this.cameraControls = undefined;
|
|
102
|
+
}
|
|
103
|
+
if (this.miniCameraControls) {
|
|
104
|
+
this.miniCameraControls.dispose();
|
|
105
|
+
this.miniCameraControls = undefined;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
DebugComponent = __decorate([
|
|
110
|
+
singleton(),
|
|
111
|
+
__param(0, inject(AppComponent)),
|
|
112
|
+
__param(1, inject(CameraComponent)),
|
|
113
|
+
__param(2, inject(WorldComponent)),
|
|
114
|
+
__metadata("design:paramtypes", [AppComponent,
|
|
115
|
+
CameraComponent,
|
|
116
|
+
WorldComponent])
|
|
117
|
+
], DebugComponent);
|
|
118
|
+
export { DebugComponent };
|
|
119
|
+
//# sourceMappingURL=debug.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.component.js","sourceRoot":"","sources":["../../../../../src/modules/app/debug/debug.component.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAGnD,IAAM,cAAc,GAApB,MAAM,cAAc;IASc;IACG;IACD;IAVnC,OAAO,GAAG,IAAI,CAAC;IACf,cAAc,CAAi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AI,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAEM,MAAM;QACZ,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO;QAC1B,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;QAC9B,IAAI,CAAC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IACnC,CAAC;IAEM,OAAO;QACb,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACpD,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAC/B,CAAC;QACD,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;YAC9B,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QACjC,CAAC;QACD,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC7B,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC;YAClC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;QACrC,CAAC;IACF,CAAC;CACD,CAAA;AAxGY,cAAc;IAD1B,SAAS,EAAE;IAUT,WAAA,MAAM,CAAC,YAAY,CAAC,CAAA;IACpB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;IACvB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;qCAF8B,YAAY;QACN,eAAe;QACjB,cAAc;GAX5D,cAAc,CAwG1B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, singleton } from "tsyringe";
|
|
14
|
+
import { TimerController } from "../timer/timer.controller";
|
|
15
|
+
let DebugController = class DebugController {
|
|
16
|
+
timerController;
|
|
17
|
+
step$;
|
|
18
|
+
constructor(timerController) {
|
|
19
|
+
this.timerController = timerController;
|
|
20
|
+
this.step$ = this.timerController.step$;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
DebugController = __decorate([
|
|
24
|
+
singleton(),
|
|
25
|
+
__param(0, inject(TimerController)),
|
|
26
|
+
__metadata("design:paramtypes", [TimerController])
|
|
27
|
+
], DebugController);
|
|
28
|
+
export { DebugController };
|
|
29
|
+
//# sourceMappingURL=debug.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.controller.js","sourceRoot":"","sources":["../../../../../src/modules/app/debug/debug.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGrD,IAAM,eAAe,GAArB,MAAM,eAAe;IAIgB;IAHpC,KAAK,CAA2B;IAEvC,YAC2C,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;QAE1E,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;IACzC,CAAC;CACD,CAAA;AARY,eAAe;IAD3B,SAAS,EAAE;IAKT,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;qCAAmC,eAAe;GAJ/D,eAAe,CAQ3B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DebugComponent } from "./debug.component";
|
|
2
|
+
import { DebugController } from "./debug.controller";
|
|
3
|
+
import { Module } from "../../../common/interfaces/module.interface";
|
|
4
|
+
export declare class DebugModule implements Module {
|
|
5
|
+
readonly component: DebugComponent;
|
|
6
|
+
readonly controller: DebugController;
|
|
7
|
+
constructor(component: DebugComponent, controller: DebugController);
|
|
8
|
+
init(props?: Parameters<DebugComponent["init"]>[0]): void;
|
|
9
|
+
dispose(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, singleton } from "tsyringe";
|
|
14
|
+
import { DebugComponent } from "./debug.component";
|
|
15
|
+
import { DebugController } from "./debug.controller";
|
|
16
|
+
let DebugModule = class DebugModule {
|
|
17
|
+
component;
|
|
18
|
+
controller;
|
|
19
|
+
constructor(component, controller) {
|
|
20
|
+
this.component = component;
|
|
21
|
+
this.controller = controller;
|
|
22
|
+
this.controller.step$.subscribe(() => {
|
|
23
|
+
this.component.update();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
init(props) {
|
|
27
|
+
this.component.init(props);
|
|
28
|
+
}
|
|
29
|
+
dispose() {
|
|
30
|
+
this.component.dispose();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
DebugModule = __decorate([
|
|
34
|
+
singleton(),
|
|
35
|
+
__param(0, inject(DebugComponent)),
|
|
36
|
+
__param(1, inject(DebugController)),
|
|
37
|
+
__metadata("design:paramtypes", [DebugComponent,
|
|
38
|
+
DebugController])
|
|
39
|
+
], DebugModule);
|
|
40
|
+
export { DebugModule };
|
|
41
|
+
//# sourceMappingURL=debug.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.module.js","sourceRoot":"","sources":["../../../../../src/modules/app/debug/debug.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAK9C,IAAM,WAAW,GAAjB,MAAM,WAAW;IAEkB;IACC;IAF1C,YACyC,SAAyB,EACxB,UAA2B;QAD5B,cAAS,GAAT,SAAS,CAAgB;QACxB,eAAU,GAAV,UAAU,CAAiB;QAEpE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YACpC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;IACJ,CAAC;IAEM,IAAI,CAAC,KAA6C;QACxD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAEM,OAAO;QACb,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACD,CAAA;AAjBY,WAAW;IADvB,SAAS,EAAE;IAGT,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;IACtB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;qCAD2B,cAAc;QACZ,eAAe;GAHzD,WAAW,CAiBvB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { WebGLRenderer } from "three";
|
|
2
|
+
import { WorldComponent } from "../world/world.component";
|
|
3
|
+
import { CameraComponent } from "../camera/camera.component";
|
|
4
|
+
import type { OffscreenCanvasWithStyle } from "../../../common/interfaces/canvas.interface";
|
|
5
|
+
import { SizesComponent } from "../sizes/sizes.component";
|
|
6
|
+
import { DebugComponent } from "../debug/debug.component";
|
|
7
|
+
export declare class RendererComponent {
|
|
8
|
+
private readonly worldComponent;
|
|
9
|
+
private readonly cameraComponent;
|
|
10
|
+
private readonly sizesComponent;
|
|
11
|
+
private readonly debugComponent;
|
|
12
|
+
static readonly RENDERER_PIXEL_RATIO: number;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
instance?: WebGLRenderer;
|
|
15
|
+
constructor(worldComponent: WorldComponent, cameraComponent: CameraComponent, sizesComponent: SizesComponent, debugComponent: DebugComponent);
|
|
16
|
+
init(canvas: OffscreenCanvasWithStyle): void;
|
|
17
|
+
setSize(width: number, height: number): void;
|
|
18
|
+
render(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
var RendererComponent_1;
|
|
14
|
+
import { Camera, SRGBColorSpace, WebGLRenderer } from "three";
|
|
15
|
+
import { inject, singleton } from "tsyringe";
|
|
16
|
+
import { WorldComponent } from "../world/world.component";
|
|
17
|
+
import { CameraComponent } from "../camera/camera.component";
|
|
18
|
+
import { SizesComponent } from "../sizes/sizes.component";
|
|
19
|
+
import { DebugComponent } from "../debug/debug.component";
|
|
20
|
+
let RendererComponent = class RendererComponent {
|
|
21
|
+
static { RendererComponent_1 = this; }
|
|
22
|
+
worldComponent;
|
|
23
|
+
cameraComponent;
|
|
24
|
+
sizesComponent;
|
|
25
|
+
debugComponent;
|
|
26
|
+
static RENDERER_PIXEL_RATIO = 1;
|
|
27
|
+
enabled = true;
|
|
28
|
+
instance;
|
|
29
|
+
constructor(worldComponent, cameraComponent, sizesComponent, debugComponent) {
|
|
30
|
+
this.worldComponent = worldComponent;
|
|
31
|
+
this.cameraComponent = cameraComponent;
|
|
32
|
+
this.sizesComponent = sizesComponent;
|
|
33
|
+
this.debugComponent = debugComponent;
|
|
34
|
+
}
|
|
35
|
+
init(canvas) {
|
|
36
|
+
this.instance = new WebGLRenderer({
|
|
37
|
+
canvas,
|
|
38
|
+
context: canvas.getContext("webgl2", {
|
|
39
|
+
stencil: true,
|
|
40
|
+
powerPreference: "high-performance"
|
|
41
|
+
}),
|
|
42
|
+
powerPreference: "high-performance",
|
|
43
|
+
depth: true,
|
|
44
|
+
antialias: true
|
|
45
|
+
});
|
|
46
|
+
this.instance.autoClear = false;
|
|
47
|
+
this.instance.setPixelRatio(RendererComponent_1.RENDERER_PIXEL_RATIO);
|
|
48
|
+
this.instance.setClearColor(0x000000, 0);
|
|
49
|
+
this.instance.shadowMap.enabled = false;
|
|
50
|
+
this.instance.outputColorSpace = SRGBColorSpace;
|
|
51
|
+
}
|
|
52
|
+
setSize(width, height) {
|
|
53
|
+
this.instance?.setSize(width, height);
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
if (!(this.enabled &&
|
|
57
|
+
this.cameraComponent.instance instanceof Camera &&
|
|
58
|
+
this.instance instanceof WebGLRenderer))
|
|
59
|
+
return;
|
|
60
|
+
this.instance.setViewport(0, 0, this.sizesComponent.width, this.sizesComponent.height);
|
|
61
|
+
this.instance.render(this.worldComponent.scene, this.cameraComponent.instance);
|
|
62
|
+
if (this.debugComponent.enabled && this.cameraComponent.miniCamera) {
|
|
63
|
+
this.instance.setScissorTest(true);
|
|
64
|
+
this.instance.setViewport(this.sizesComponent.width - this.sizesComponent.width / 3, this.sizesComponent.height - this.sizesComponent.height / 3, this.sizesComponent.width / 3, this.sizesComponent.height / 3);
|
|
65
|
+
this.instance.setScissor(this.sizesComponent.width - this.sizesComponent.width / 3, this.sizesComponent.height - this.sizesComponent.height / 3, this.sizesComponent.width / 3, this.sizesComponent.height / 3);
|
|
66
|
+
this.instance.render(this.worldComponent.scene, this.cameraComponent.miniCamera);
|
|
67
|
+
this.instance.setScissorTest(false);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
RendererComponent = RendererComponent_1 = __decorate([
|
|
72
|
+
singleton(),
|
|
73
|
+
__param(0, inject(WorldComponent)),
|
|
74
|
+
__param(1, inject(CameraComponent)),
|
|
75
|
+
__param(2, inject(SizesComponent)),
|
|
76
|
+
__param(3, inject(DebugComponent)),
|
|
77
|
+
__metadata("design:paramtypes", [WorldComponent,
|
|
78
|
+
CameraComponent,
|
|
79
|
+
SizesComponent,
|
|
80
|
+
DebugComponent])
|
|
81
|
+
], RendererComponent);
|
|
82
|
+
export { RendererComponent };
|
|
83
|
+
//# sourceMappingURL=renderer.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.component.js","sourceRoot":"","sources":["../../../../../src/modules/app/renderer/renderer.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAGnD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;;IAOa;IACC;IACD;IACA;IATnC,MAAM,CAAU,oBAAoB,GAAW,CAAC,CAAC;IAEjD,OAAO,GAAG,IAAI,CAAC;IACf,QAAQ,CAAiB;IAEhC,YAC0C,cAA8B,EAC7B,eAAgC,EACjC,cAA8B,EAC9B,cAA8B;QAH9B,mBAAc,GAAd,cAAc,CAAgB;QAC7B,oBAAe,GAAf,eAAe,CAAiB;QACjC,mBAAc,GAAd,cAAc,CAAgB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;IACrE,CAAC;IAEG,IAAI,CAAC,MAAgC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,aAAa,CAAC;YACjC,MAAM;YACN,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE;gBACpC,OAAO,EAAE,IAAI;gBACb,eAAe,EAAE,kBAAkB;aACnC,CAA2B;YAC5B,eAAe,EAAE,kBAAkB;YACnC,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,IAAI;SACf,CAAC,CAAC;QACH,IA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,CAAC,EAC3D,IAAI,CAAC,cAAc,CAAC,KAAK,GAAG,CAAC,EAC7B,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAC9B,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,UAAU,CACvB,IAAI,CAAC,cAAc,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,GAAG,CAAC,EACzD,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,EAC3D,IAAI,CAAC,cAAc,CAAC,KAAK,GAAG,CAAC,EAC7B,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAC9B,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,MAAM,CACnB,IAAI,CAAC,cAAc,CAAC,KAAK,EACzB,IAAI,CAAC,eAAe,CAAC,UAAU,CAC/B,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACrC,CAAC;IACF,CAAC;;AA5EW,iBAAiB;IAD7B,SAAS,EAAE;IAQT,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;IACtB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;IACvB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;IACtB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;qCAHkC,cAAc;QACZ,eAAe;QACjB,cAAc;QACd,cAAc;GAV5D,iBAAiB,CA6E7B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { SizesController } from "../sizes/sizes.controller";
|
|
3
|
+
import { TimerController } from "../timer/timer.controller";
|
|
4
|
+
import type { StepPayload } from "../../../common/interfaces/event.interface";
|
|
5
|
+
import { RendererComponent } from "./renderer.component";
|
|
6
|
+
export declare class RendererController {
|
|
7
|
+
private readonly rendererComponent;
|
|
8
|
+
private readonly timerController;
|
|
9
|
+
private readonly sizesController;
|
|
10
|
+
readonly step$: Observable<StepPayload>;
|
|
11
|
+
readonly resize$: Observable<Event>;
|
|
12
|
+
constructor(rendererComponent: RendererComponent, timerController: TimerController, sizesController: SizesController);
|
|
13
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, singleton } from "tsyringe";
|
|
14
|
+
import { filter } from "rxjs";
|
|
15
|
+
import { SizesController } from "../sizes/sizes.controller";
|
|
16
|
+
import { TimerController } from "../timer/timer.controller";
|
|
17
|
+
import { RendererComponent } from "./renderer.component";
|
|
18
|
+
let RendererController = class RendererController {
|
|
19
|
+
rendererComponent;
|
|
20
|
+
timerController;
|
|
21
|
+
sizesController;
|
|
22
|
+
step$;
|
|
23
|
+
resize$;
|
|
24
|
+
constructor(rendererComponent, timerController, sizesController) {
|
|
25
|
+
this.rendererComponent = rendererComponent;
|
|
26
|
+
this.timerController = timerController;
|
|
27
|
+
this.sizesController = sizesController;
|
|
28
|
+
this.step$ = this.timerController.step$.pipe(filter(() => this.rendererComponent.enabled));
|
|
29
|
+
this.resize$ = this.sizesController.resize$.pipe(filter(() => this.rendererComponent.enabled));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
RendererController = __decorate([
|
|
33
|
+
singleton(),
|
|
34
|
+
__param(0, inject(RendererComponent)),
|
|
35
|
+
__param(1, inject(TimerController)),
|
|
36
|
+
__param(2, inject(SizesController)),
|
|
37
|
+
__metadata("design:paramtypes", [RendererComponent,
|
|
38
|
+
TimerController,
|
|
39
|
+
SizesController])
|
|
40
|
+
], RendererController);
|
|
41
|
+
export { RendererController };
|
|
42
|
+
//# sourceMappingURL=renderer.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.controller.js","sourceRoot":"","sources":["../../../../../src/modules/app/renderer/renderer.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAc,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGlD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAMZ;IACyB;IACA;IAP3B,KAAK,CAA0B;IAC/B,OAAO,CAAoB;IAE3C,YAEkB,iBAAoC,EACX,eAAgC,EAChC,eAAgC;QAFzD,sBAAiB,GAAjB,iBAAiB,CAAmB;QACX,oBAAe,GAAf,eAAe,CAAiB;QAChC,oBAAe,GAAf,eAAe,CAAiB;QAE1E,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAC3C,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAC5C,CAAC;QAEF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAC/C,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAC5C,CAAC;IACH,CAAC;CACD,CAAA;AAlBY,kBAAkB;IAD9B,SAAS,EAAE;IAMT,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IAEzB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;IACvB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;qCAFY,iBAAiB;QACM,eAAe;QACf,eAAe;GAR/D,kBAAkB,CAkB9B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RendererComponent } from "./renderer.component";
|
|
2
|
+
import { RendererController } from "./renderer.controller";
|
|
3
|
+
import type { Module } from "../../../common/interfaces/module.interface";
|
|
4
|
+
import type { OffscreenCanvasWithStyle } from "../../../common/interfaces/canvas.interface";
|
|
5
|
+
export declare class RendererModule implements Module {
|
|
6
|
+
private readonly component;
|
|
7
|
+
private readonly controller;
|
|
8
|
+
constructor(component: RendererComponent, controller: RendererController);
|
|
9
|
+
init(canvas: OffscreenCanvasWithStyle): void;
|
|
10
|
+
dispose(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, singleton } from "tsyringe";
|
|
14
|
+
import { RendererComponent } from "./renderer.component";
|
|
15
|
+
import { RendererController } from "./renderer.controller";
|
|
16
|
+
let RendererModule = class RendererModule {
|
|
17
|
+
component;
|
|
18
|
+
controller;
|
|
19
|
+
constructor(component, controller) {
|
|
20
|
+
this.component = component;
|
|
21
|
+
this.controller = controller;
|
|
22
|
+
}
|
|
23
|
+
init(canvas) {
|
|
24
|
+
this.controller.step$.subscribe(() => this.component.render());
|
|
25
|
+
this.controller.resize$.subscribe((size) => this.component.setSize(size.x, size.y));
|
|
26
|
+
this.component.init(canvas);
|
|
27
|
+
}
|
|
28
|
+
dispose() {
|
|
29
|
+
throw new Error("Method not implemented.");
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
RendererModule = __decorate([
|
|
33
|
+
singleton(),
|
|
34
|
+
__param(0, inject(RendererComponent)),
|
|
35
|
+
__param(1, inject(RendererController)),
|
|
36
|
+
__metadata("design:paramtypes", [RendererComponent,
|
|
37
|
+
RendererController])
|
|
38
|
+
], RendererModule);
|
|
39
|
+
export { RendererModule };
|
|
40
|
+
//# sourceMappingURL=renderer.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.module.js","sourceRoot":"","sources":["../../../../../src/modules/app/renderer/renderer.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAKpD,IAAM,cAAc,GAApB,MAAM,cAAc;IAEmB;IACC;IAF9C,YAC6C,SAA4B,EAC3B,UAA8B;QAD/B,cAAS,GAAT,SAAS,CAAmB;QAC3B,eAAU,GAAV,UAAU,CAAoB;IACzE,CAAC;IAEG,IAAI,CAAC,MAAgC;QAC3C,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;QAE/D,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAS,EAAE,EAAE,CAC/C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CACtC,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAEM,OAAO;QACb,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;CACD,CAAA;AAnBY,cAAc;IAD1B,SAAS,EAAE;IAGT,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;qCAD4B,iBAAiB;QACf,kBAAkB;GAHhE,cAAc,CAmB1B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OffscreenCanvasWithStyle } from "../../../common/interfaces/canvas.interface";
|
|
2
|
+
export declare class SizesComponent {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
aspect: number;
|
|
6
|
+
pixelRatio: number;
|
|
7
|
+
frustrum: number;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
init(canvas: OffscreenCanvasWithStyle, enabled?: boolean): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { singleton } from "tsyringe";
|
|
8
|
+
let SizesComponent = class SizesComponent {
|
|
9
|
+
width = 0;
|
|
10
|
+
height = 0;
|
|
11
|
+
aspect = 0;
|
|
12
|
+
pixelRatio = 0;
|
|
13
|
+
frustrum = 5;
|
|
14
|
+
enabled = true;
|
|
15
|
+
init(canvas, enabled) {
|
|
16
|
+
this.height = Number(canvas.height ?? this.height);
|
|
17
|
+
this.width = Number(canvas.width ?? this.width);
|
|
18
|
+
this.aspect = this.width / this.height;
|
|
19
|
+
this.enabled = enabled === undefined ? true : !!enabled;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
SizesComponent = __decorate([
|
|
23
|
+
singleton()
|
|
24
|
+
], SizesComponent);
|
|
25
|
+
export { SizesComponent };
|
|
26
|
+
//# sourceMappingURL=sizes.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sizes.component.js","sourceRoot":"","sources":["../../../../../src/modules/app/sizes/sizes.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAK9B,IAAM,cAAc,GAApB,MAAM,cAAc;IACnB,KAAK,GAAG,CAAC,CAAC;IACV,MAAM,GAAG,CAAC,CAAC;IACX,MAAM,GAAG,CAAC,CAAC;IACX,UAAU,GAAG,CAAC,CAAC;IACf,QAAQ,GAAG,CAAC,CAAC;IACb,OAAO,GAAG,IAAI,CAAC;IAEf,IAAI,CAAC,MAAgC,EAAE,OAAiB;QAC9D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IACzD,CAAC;CACD,CAAA;AAdY,cAAc;IAD1B,SAAS,EAAE;GACC,cAAc,CAc1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { AppController } from "../app.controller";
|
|
3
|
+
import { SizesComponent } from "./sizes.component";
|
|
4
|
+
export declare class SizesController {
|
|
5
|
+
private readonly appController;
|
|
6
|
+
private readonly component;
|
|
7
|
+
readonly resize$: Observable<Event>;
|
|
8
|
+
constructor(appController: AppController, component: SizesComponent);
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, singleton } from "tsyringe";
|
|
14
|
+
import { filter } from "rxjs";
|
|
15
|
+
import { AppController } from "../app.controller";
|
|
16
|
+
import { SizesComponent } from "./sizes.component";
|
|
17
|
+
let SizesController = class SizesController {
|
|
18
|
+
appController;
|
|
19
|
+
component;
|
|
20
|
+
resize$;
|
|
21
|
+
constructor(appController, component) {
|
|
22
|
+
this.appController = appController;
|
|
23
|
+
this.component = component;
|
|
24
|
+
this.resize$ = this.appController.resize$$.pipe(filter(() => this.component.enabled));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
SizesController = __decorate([
|
|
28
|
+
singleton(),
|
|
29
|
+
__param(0, inject(AppController)),
|
|
30
|
+
__param(1, inject(SizesComponent)),
|
|
31
|
+
__metadata("design:paramtypes", [AppController,
|
|
32
|
+
SizesComponent])
|
|
33
|
+
], SizesController);
|
|
34
|
+
export { SizesController };
|
|
35
|
+
//# sourceMappingURL=sizes.controller.js.map
|