@woosh/meep-engine 2.39.21 → 2.39.22
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.
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {PerspectiveCamera, Scene, WebGLRenderer, WebGLRenderTarget} from "three";
|
|
1
|
+
import {Camera, PerspectiveCamera, Scene, WebGLRenderer, WebGLRenderTarget} from "three";
|
|
2
2
|
import {RenderLayerManager} from "./render/layers/RenderLayerManager";
|
|
3
3
|
import Vector3 from "../../core/geom/Vector3";
|
|
4
4
|
import Vector2 from "../../core/geom/Vector2";
|
|
5
5
|
import View from "../../view/View";
|
|
6
|
+
import Signal from "../../core/events/signal/Signal";
|
|
7
|
+
|
|
8
|
+
interface IGraphicsEngineSignals {
|
|
9
|
+
readonly preRender: Signal
|
|
10
|
+
readonly postRender: Signal
|
|
11
|
+
}
|
|
6
12
|
|
|
7
13
|
export class GraphicsEngine {
|
|
8
14
|
readonly scene: Scene
|
|
@@ -15,6 +21,8 @@ export class GraphicsEngine {
|
|
|
15
21
|
*/
|
|
16
22
|
readonly layers: RenderLayerManager
|
|
17
23
|
|
|
24
|
+
readonly on: IGraphicsEngineSignals
|
|
25
|
+
|
|
18
26
|
get domElement(): HTMLCanvasElement
|
|
19
27
|
|
|
20
28
|
public needDraw: boolean
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"productName": "Meep",
|
|
6
6
|
"description": "production-ready JavaScript game engine based on Entity Component System Architecture",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.39.
|
|
8
|
+
"version": "2.39.22",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|
package/view/View.js
CHANGED
|
@@ -590,7 +590,8 @@ class View {
|
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
/**
|
|
593
|
-
*
|
|
593
|
+
* Will create signal binding that is automatically linked/unlinked along with the view
|
|
594
|
+
* Useful for observing state changes when the view is live
|
|
594
595
|
* @param {Signal} signal
|
|
595
596
|
* @param {function} handler
|
|
596
597
|
* @param {*} [context]
|
|
@@ -617,6 +618,7 @@ class View {
|
|
|
617
618
|
unbindSignal(signal, handler, context) {
|
|
618
619
|
const bindings = this.bindings;
|
|
619
620
|
const numBindings = bindings.length;
|
|
621
|
+
|
|
620
622
|
for (let i = 0; i < numBindings; i++) {
|
|
621
623
|
const signalBinding = bindings[i];
|
|
622
624
|
|
|
@@ -633,6 +635,7 @@ class View {
|
|
|
633
635
|
}
|
|
634
636
|
}
|
|
635
637
|
|
|
638
|
+
// no match found
|
|
636
639
|
return false;
|
|
637
640
|
}
|
|
638
641
|
|