@gamelearn/arcade-components 0.18.4 → 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();
|
|
@@ -82,7 +82,7 @@ var ConversationalComponent = function ConversationalComponent(_ref) {
|
|
|
82
82
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
83
83
|
className: "conversation--layer"
|
|
84
84
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
-
className: "conversation",
|
|
85
|
+
className: "conversation arcade-conversation",
|
|
86
86
|
style: backgroundImage ? {
|
|
87
87
|
backgroundImage: "url(\"".concat(backgroundImage, "\")")
|
|
88
88
|
} : {}
|
|
@@ -98,7 +98,7 @@ var ConversationalComponent = function ConversationalComponent(_ref) {
|
|
|
98
98
|
current: currentMessage,
|
|
99
99
|
voiceOver: currentMessage.emotion === null
|
|
100
100
|
}) : /*#__PURE__*/_react.default.createElement("div", null), /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
-
className: "conversation--controls"
|
|
101
|
+
className: "conversation--controls arcade-conversation--controls"
|
|
102
102
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
103
103
|
className: "gat--btn__round ".concat(messageIndex > 0 ? '' : 'visibility--hidden'),
|
|
104
104
|
type: "button",
|
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=';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamelearn/arcade-components",
|
|
3
3
|
"license": "Gamelearn",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.6",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -76,4 +76,4 @@
|
|
|
76
76
|
"^react-pdf$": "react-pdf/dist/umd/entry.jest"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|