@expofp/renderer 3.37.0 → 3.37.1
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.
|
@@ -60,7 +60,7 @@ export function CameraControls(props) {
|
|
|
60
60
|
setControls((controls) => Object.assign(controls, { camera: explCamera }));
|
|
61
61
|
}
|
|
62
62
|
useFrame((_state, delta) => {
|
|
63
|
-
const updated = controls.update(delta);
|
|
63
|
+
const updated = controls.update(Math.min(delta, MAX_FRAME_DELTA));
|
|
64
64
|
if (updated || gl.info.render.frame == 0) {
|
|
65
65
|
const position = explCamera.position.toArray().map((value) => +value.toFixed(2));
|
|
66
66
|
const target = controls
|
|
@@ -190,5 +190,14 @@ function createControls(camera) {
|
|
|
190
190
|
* tolerates next to a component, and this one never changes.
|
|
191
191
|
*/
|
|
192
192
|
export const CameraControlsAction = CameraControlsImpl.ACTION;
|
|
193
|
+
/**
|
|
194
|
+
* The longest step, in seconds, one frame may advance the controls' easing by.
|
|
195
|
+
*
|
|
196
|
+
* Under a demand frameloop the first frame after an idle spell carries the whole spell as its
|
|
197
|
+
* delta, and camera-controls does not clamp it: a move started by that frame would reach its
|
|
198
|
+
* target in one step. A ceiling rather than a fixed step, so a device drawing at 30 fps still
|
|
199
|
+
* eases in real time and only the idle gap is cut short.
|
|
200
|
+
*/
|
|
201
|
+
const MAX_FRAME_DELTA = 1 / 30;
|
|
193
202
|
const _target = new Vector3();
|
|
194
203
|
const _spherical = new Spherical();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/renderer",
|
|
3
|
-
"version": "3.37.
|
|
3
|
+
"version": "3.37.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"troika-three-text": "^0.52.5",
|
|
43
43
|
"tslib": "^2.3.0",
|
|
44
44
|
"webgl-memory": "^1.1.3",
|
|
45
|
-
"@expofp/geometry": "3.37.
|
|
45
|
+
"@expofp/geometry": "3.37.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@react-three/test-renderer": "^9.1.0",
|