@gamelearn/arcade-components 0.18.5 → 0.18.6
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.
|
@@ -74,7 +74,7 @@ var useCameraPan = function useCameraPan(lookingSide) {
|
|
|
74
74
|
var moveCamera = (0, _react.useCallback)(function (delta) {
|
|
75
75
|
var goal = cameraRotation.current[lookingSide];
|
|
76
76
|
|
|
77
|
-
if (camera.quaternion) {
|
|
77
|
+
if (camera.quaternion && goal) {
|
|
78
78
|
if (!camera.quaternion.equals(goal)) {
|
|
79
79
|
camera.quaternion.rotateTowards(goal, delta * SPEED);
|
|
80
80
|
} else {
|
|
@@ -96,8 +96,10 @@ var useCameraPan = function useCameraPan(lookingSide) {
|
|
|
96
96
|
}
|
|
97
97
|
}, [camera]);
|
|
98
98
|
(0, _react.useEffect)(function () {
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
if (cameraLoaded) {
|
|
100
|
+
movingCamera.current = true;
|
|
101
|
+
}
|
|
102
|
+
}, [lookingSide, cameraLoaded]);
|
|
101
103
|
(0, _react.useEffect)(function () {
|
|
102
104
|
if (cameraLoaded) {
|
|
103
105
|
setCameraRotationView();
|
package/dist/helpers/useGLB.js
CHANGED
|
@@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
// We need this to reuse GLTF and DRACO loaders for Arcade working
|
|
17
17
|
// in Mobile devices, drei.useGLTF instances new loaders every time is
|
|
18
18
|
// used
|
|
19
|
-
var dracoDecoderPath = 'https://www.gstatic.com/draco/
|
|
19
|
+
var dracoDecoderPath = 'https://www.gstatic.com/draco/v1/decoders/'; // TODO: Maybe download those files to statics.gamelearn
|
|
20
20
|
|
|
21
21
|
var whiteImage = new Image();
|
|
22
22
|
whiteImage.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=';
|