bg2e-js 2.2.7 → 2.2.9
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/bg2e-js.js +21 -12
- package/dist/bg2e-js.js.map +1 -1
- package/package.json +1 -1
- package/src/math/Mat4.ts +4 -0
- package/src/render/SceneAppController.ts +27 -18
package/dist/bg2e-js.js
CHANGED
|
@@ -944,6 +944,9 @@ class w extends Le {
|
|
|
944
944
|
get downVector() {
|
|
945
945
|
return w.TransformDirection(this, new h(0, -1, 0));
|
|
946
946
|
}
|
|
947
|
+
get translation() {
|
|
948
|
+
return new h(this[12], this[13], this[14]);
|
|
949
|
+
}
|
|
947
950
|
row(e) {
|
|
948
951
|
return new h(
|
|
949
952
|
this[e * 4],
|
|
@@ -8961,7 +8964,7 @@ class xe {
|
|
|
8961
8964
|
}
|
|
8962
8965
|
class w0 extends en {
|
|
8963
8966
|
constructor() {
|
|
8964
|
-
super(...arguments), this._sceneRoot = null, this._sceneRenderer = null, this._environment = null, this._selectionManager = null, this._selectionHighlight = null, this._debugRenderer = null;
|
|
8967
|
+
super(...arguments), this._sceneRoot = null, this._sceneRenderer = null, this._environment = null, this._selectionManager = null, this._selectionHighlight = null, this._debugRenderer = null, this._updateInputEventsFrameCount = 60;
|
|
8965
8968
|
}
|
|
8966
8969
|
get sceneRoot() {
|
|
8967
8970
|
return this._sceneRoot;
|
|
@@ -8990,6 +8993,12 @@ class w0 extends en {
|
|
|
8990
8993
|
set updateOnInputEvents(e) {
|
|
8991
8994
|
this._updateOnInputEvents = e;
|
|
8992
8995
|
}
|
|
8996
|
+
get updateInputEventsFrameCount() {
|
|
8997
|
+
return this._updateInputEventsFrameCount;
|
|
8998
|
+
}
|
|
8999
|
+
set updateInputEventsFrameCount(e) {
|
|
9000
|
+
this._updateInputEventsFrameCount = e;
|
|
9001
|
+
}
|
|
8993
9002
|
async loadScene() {
|
|
8994
9003
|
return new Ae("Scene Root");
|
|
8995
9004
|
}
|
|
@@ -9022,37 +9031,37 @@ class w0 extends en {
|
|
|
9022
9031
|
this.sceneRenderer?.destroy(), this.selectionManagerEnabled && this.selectionManager?.destroy();
|
|
9023
9032
|
}
|
|
9024
9033
|
keyDown(e) {
|
|
9025
|
-
this.sceneRoot && this.sceneRenderer?.keyDown(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9034
|
+
this.sceneRoot && this.sceneRenderer?.keyDown(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9026
9035
|
}
|
|
9027
9036
|
keyUp(e) {
|
|
9028
|
-
this.sceneRoot && this.sceneRenderer?.keyUp(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9037
|
+
this.sceneRoot && this.sceneRenderer?.keyUp(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9029
9038
|
}
|
|
9030
9039
|
mouseUp(e) {
|
|
9031
|
-
this.sceneRoot && this.sceneRenderer?.mouseUp(this.sceneRoot, e), this.selectionManager?.mouseUp(e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9040
|
+
this.sceneRoot && this.sceneRenderer?.mouseUp(this.sceneRoot, e), this.selectionManager?.mouseUp(e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9032
9041
|
}
|
|
9033
9042
|
mouseDown(e) {
|
|
9034
|
-
this.sceneRoot && this.sceneRenderer?.mouseDown(this.sceneRoot, e), this.selectionManager?.mouseDown(e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9043
|
+
this.sceneRoot && this.sceneRenderer?.mouseDown(this.sceneRoot, e), this.selectionManager?.mouseDown(e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9035
9044
|
}
|
|
9036
9045
|
mouseMove(e) {
|
|
9037
|
-
this.sceneRoot && this.sceneRenderer?.mouseMove(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9046
|
+
this.sceneRoot && this.sceneRenderer?.mouseMove(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9038
9047
|
}
|
|
9039
9048
|
mouseOut(e) {
|
|
9040
|
-
this.sceneRoot && this.sceneRenderer?.mouseOut(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9049
|
+
this.sceneRoot && this.sceneRenderer?.mouseOut(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9041
9050
|
}
|
|
9042
9051
|
mouseDrag(e) {
|
|
9043
|
-
this.sceneRoot && this.sceneRenderer?.mouseDrag(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9052
|
+
this.sceneRoot && this.sceneRenderer?.mouseDrag(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9044
9053
|
}
|
|
9045
9054
|
mouseWheel(e) {
|
|
9046
|
-
this.sceneRoot && this.sceneRenderer?.mouseWheel(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9055
|
+
this.sceneRoot && this.sceneRenderer?.mouseWheel(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9047
9056
|
}
|
|
9048
9057
|
touchStart(e) {
|
|
9049
|
-
this.sceneRoot && this.sceneRenderer?.touchStart(this.sceneRoot, e), this.selectionManager?.touchStart(e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9058
|
+
this.sceneRoot && this.sceneRenderer?.touchStart(this.sceneRoot, e), this.selectionManager?.touchStart(e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9050
9059
|
}
|
|
9051
9060
|
touchMove(e) {
|
|
9052
|
-
this.sceneRoot && this.sceneRenderer?.touchMove(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9061
|
+
this.sceneRoot && this.sceneRenderer?.touchMove(this.sceneRoot, e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9053
9062
|
}
|
|
9054
9063
|
touchEnd(e) {
|
|
9055
|
-
this.sceneRoot && this.sceneRenderer?.touchEnd(this.sceneRoot, e), this.selectionManager?.touchEnd(e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames:
|
|
9064
|
+
this.sceneRoot && this.sceneRenderer?.touchEnd(this.sceneRoot, e), this.selectionManager?.touchEnd(e), this.updateOnInputEvents && this.mainLoop.postRedisplay({ frames: this._updateInputEventsFrameCount });
|
|
9056
9065
|
}
|
|
9057
9066
|
}
|
|
9058
9067
|
const Vr = {
|