@configura/babylon-view 2.0.0-alpha.15 → 2.0.0-alpha.18
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.
|
@@ -55,7 +55,7 @@ export declare class CfgOrbitalCamera extends WorkaroundCfgOrbitalCamera {
|
|
|
55
55
|
set radius(r: number);
|
|
56
56
|
get radius(): number;
|
|
57
57
|
private get _orbitalCameraControlProps();
|
|
58
|
-
private
|
|
58
|
+
private _boundCameraListener;
|
|
59
59
|
private _pointerUpDownCallback;
|
|
60
60
|
frameRenderNeeded(): boolean;
|
|
61
61
|
private get _isMoving();
|
|
@@ -39,7 +39,12 @@ export class CfgOrbitalCamera extends WorkaroundCfgOrbitalCamera {
|
|
|
39
39
|
this.disableZoom = false;
|
|
40
40
|
this._externalControlHasHappened = false;
|
|
41
41
|
this._radius = 0;
|
|
42
|
-
this.
|
|
42
|
+
this._boundCameraListener = () => {
|
|
43
|
+
// This is a cheap operation, so it's acceptable to do it
|
|
44
|
+
// for every update (even if no radius-change has happened)
|
|
45
|
+
this._applyNoSneakPeeking();
|
|
46
|
+
this._notifyCameraControlListeners();
|
|
47
|
+
};
|
|
43
48
|
this._pointerUpDownCallback = (p, s) => {
|
|
44
49
|
if (p.type === PointerEventTypes.POINTERUP) {
|
|
45
50
|
this._pointerDown = false;
|
|
@@ -70,11 +75,11 @@ export class CfgOrbitalCamera extends WorkaroundCfgOrbitalCamera {
|
|
|
70
75
|
this.inertia = this._config.inertia;
|
|
71
76
|
this.angularSensibilityX = this.angularSensibilityY = this._config.pointerSpeedFactor;
|
|
72
77
|
scene.onPointerObservable.add(this._pointerUpDownCallback, PointerEventTypes.POINTERUP | PointerEventTypes.POINTERDOWN);
|
|
73
|
-
this.onViewMatrixChangedObservable.add(this.
|
|
78
|
+
this.onViewMatrixChangedObservable.add(this._boundCameraListener);
|
|
74
79
|
}
|
|
75
80
|
dispose() {
|
|
76
81
|
this.detachControl(this._canvas);
|
|
77
|
-
this.onViewMatrixChangedObservable.removeCallback(this.
|
|
82
|
+
this.onViewMatrixChangedObservable.removeCallback(this._boundCameraListener);
|
|
78
83
|
this._scene.onPointerObservable.removeCallback(this._pointerUpDownCallback);
|
|
79
84
|
super.dispose();
|
|
80
85
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/babylon-view",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.18",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babylonjs/core": "4.2.0",
|
|
19
|
-
"@configura/web-core": "2.0.0-alpha.
|
|
20
|
-
"@configura/web-utilities": "2.0.0-alpha.
|
|
19
|
+
"@configura/web-core": "2.0.0-alpha.18",
|
|
20
|
+
"@configura/web-utilities": "2.0.0-alpha.18"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@configura/web-api": "2.0.0-alpha.
|
|
23
|
+
"@configura/web-api": "2.0.0-alpha.18",
|
|
24
24
|
"del-cli": "^3.0.0",
|
|
25
25
|
"typescript": "4.2"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "6771998ca63444a51edc9eb35f31bf2f767a356a"
|
|
31
31
|
}
|