@gamelearn/arcade-components 1.29.2 → 1.29.3-fix-tooltip-inventory
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/components/cartel-component/components/CartelComponent.js +4 -2
- package/dist/components/comic-component/components/ComicComponent.js +2 -1
- package/dist/components/conversational-pro-component/components/ConversationalProComponent.js +1 -0
- package/dist/components/decision-component/components/DecisionComponent.js +1 -5
- package/dist/components/dialog-component/components/DialogComponent.js +1 -0
- package/dist/components/test-component/components/TestComponent.js +1 -1
- package/dist/helpers/useEkho.js +4 -2
- package/package.json +2 -2
|
@@ -36,7 +36,8 @@ var CartelComponent = function CartelComponent(_ref) {
|
|
|
36
36
|
audioType = _ref.audioType,
|
|
37
37
|
voice = _ref.voice,
|
|
38
38
|
emitEvent = _ref.emitEvent,
|
|
39
|
-
soundActions = _ref.soundActions
|
|
39
|
+
soundActions = _ref.soundActions,
|
|
40
|
+
audioVolume = _ref.audioVolume;
|
|
40
41
|
var resourceUrl = (img === null || img === void 0 ? void 0 : img.url) || 'https://min.gamelearn.io/css-resources/gamelearn/resources/conversation.jpg';
|
|
41
42
|
var textBox = (0, _react.useRef)();
|
|
42
43
|
var picture = (0, _react.useRef)();
|
|
@@ -50,7 +51,8 @@ var CartelComponent = function CartelComponent(_ref) {
|
|
|
50
51
|
text: text,
|
|
51
52
|
audio: audio,
|
|
52
53
|
soundActions: soundActions,
|
|
53
|
-
emitEvent: emitEvent
|
|
54
|
+
emitEvent: emitEvent,
|
|
55
|
+
volume: audioVolume
|
|
54
56
|
});
|
|
55
57
|
|
|
56
58
|
var close = function close() {
|
|
@@ -38,7 +38,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
38
38
|
var characterMs = 75;
|
|
39
39
|
|
|
40
40
|
var ComicComponent = function ComicComponent(_ref) {
|
|
41
|
-
var _slides$slideCount, _slides$slideCount2, _slides$slideCount3, _slides$slideCount3$v, _slides$slideCount4;
|
|
41
|
+
var _slides$slideCount, _slides$slideCount2, _slides$slideCount3, _slides$slideCount3$v, _slides$slideCount4, _slides$slideCount5, _slides$slideCount6, _slides$slideCount7;
|
|
42
42
|
|
|
43
43
|
var slides = _ref.slides,
|
|
44
44
|
emitEvent = _ref.emitEvent,
|
|
@@ -129,6 +129,7 @@ var ComicComponent = function ComicComponent(_ref) {
|
|
|
129
129
|
started: started,
|
|
130
130
|
soundActions: soundActions,
|
|
131
131
|
emitEvent: emitEvent,
|
|
132
|
+
volume: slides !== null && slides !== void 0 && (_slides$slideCount5 = slides[slideCount]) !== null && _slides$slideCount5 !== void 0 && _slides$slideCount5.audioVolume || (slides === null || slides === void 0 ? void 0 : (_slides$slideCount6 = slides[slideCount]) === null || _slides$slideCount6 === void 0 ? void 0 : _slides$slideCount6.audioVolume) === 0 ? slides === null || slides === void 0 ? void 0 : (_slides$slideCount7 = slides[slideCount]) === null || _slides$slideCount7 === void 0 ? void 0 : _slides$slideCount7.audioVolume : 0.5,
|
|
132
133
|
onError: function onError() {
|
|
133
134
|
setAudioFailed(true);
|
|
134
135
|
},
|
package/dist/components/conversational-pro-component/components/ConversationalProComponent.js
CHANGED
|
@@ -319,6 +319,7 @@ var ConversationProViewer = function ConversationProViewer(_ref) {
|
|
|
319
319
|
var disableBackButton = currentLine === 0 || previousLineWasDecision || currentLine > 0 && (lastLine === null || lastLine === void 0 ? void 0 : lastLine.decision);
|
|
320
320
|
(0, _useEkho.default)({
|
|
321
321
|
audioType: currentLineData === null || currentLineData === void 0 ? void 0 : currentLineData.audioType,
|
|
322
|
+
volume: currentLineData === null || currentLineData === void 0 ? void 0 : currentLineData.audioVolume,
|
|
322
323
|
voice: currentLineData === null || currentLineData === void 0 ? void 0 : currentLineData.voice,
|
|
323
324
|
started: started,
|
|
324
325
|
text: currentMessage === null || currentMessage === void 0 ? void 0 : currentMessage.text,
|
|
@@ -79,7 +79,7 @@ var DecisionComponent = function DecisionComponent(_ref) {
|
|
|
79
79
|
var _option$audio;
|
|
80
80
|
|
|
81
81
|
if ((_option$audio = option.audio) !== null && _option$audio !== void 0 && _option$audio.url) {
|
|
82
|
-
playSound(option.audio.url);
|
|
82
|
+
playSound(option.audio.url, 'audio_file', false, option.audioVolume);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
|
|
@@ -211,10 +211,6 @@ var DecisionComponent = function DecisionComponent(_ref) {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
|
-
// onExit: () => {
|
|
215
|
-
// playSound('click-ui');
|
|
216
|
-
// emitEvent({ type: 'success' });
|
|
217
|
-
// },
|
|
218
214
|
translate: function translate(id) {
|
|
219
215
|
return emitEvent({
|
|
220
216
|
type: 'translate',
|
|
@@ -534,6 +534,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
534
534
|
|
|
535
535
|
var stopEkho = (0, _useEkho.default)({
|
|
536
536
|
audioType: currentLine === null || currentLine === void 0 ? void 0 : currentLine.audioType,
|
|
537
|
+
volume: currentLine === null || currentLine === void 0 ? void 0 : currentLine.audioVolume,
|
|
537
538
|
voice: currentLine === null || currentLine === void 0 ? void 0 : currentLine.voice,
|
|
538
539
|
started: currentMessage.show,
|
|
539
540
|
text: currentMessage === null || currentMessage === void 0 ? void 0 : currentMessage.text,
|
package/dist/helpers/useEkho.js
CHANGED
|
@@ -38,6 +38,8 @@ var useEkho = function useEkho(_ref) {
|
|
|
38
38
|
audio = _ref.audio,
|
|
39
39
|
soundActions = _ref.soundActions,
|
|
40
40
|
emitEvent = _ref.emitEvent,
|
|
41
|
+
_ref$volume = _ref.volume,
|
|
42
|
+
volume = _ref$volume === void 0 ? 0.5 : _ref$volume,
|
|
41
43
|
_ref$onFinish = _ref.onFinish,
|
|
42
44
|
onFinish = _ref$onFinish === void 0 ? noop : _ref$onFinish,
|
|
43
45
|
_ref$onError = _ref.onError,
|
|
@@ -101,8 +103,8 @@ var useEkho = function useEkho(_ref) {
|
|
|
101
103
|
url: url,
|
|
102
104
|
cc: cc
|
|
103
105
|
});
|
|
104
|
-
playSound(url, cc, loop,
|
|
105
|
-
}, [onStart, playSound, loop, onFinish]);
|
|
106
|
+
playSound(url, cc, loop, volume, onFinish);
|
|
107
|
+
}, [onStart, playSound, loop, onFinish, volume]);
|
|
106
108
|
var playSpeech = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
107
109
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(payload) {
|
|
108
110
|
var url;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@gamelearn/arcade-components",
|
|
3
3
|
"author": "Gamelearn",
|
|
4
4
|
"license": "unlicense",
|
|
5
|
-
"version": "1.29.
|
|
5
|
+
"version": "1.29.3-fix-tooltip-inventory",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "https://github.com/gamelearn/arcade-components"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@gamelearn/arcade-styles": "0.
|
|
16
|
+
"@gamelearn/arcade-styles": "0.15.0",
|
|
17
17
|
"@gamelearn/arcade-three-core": "1.14.5",
|
|
18
18
|
"@react-three/drei": "9.4.3",
|
|
19
19
|
"@react-three/fiber": "8.0.17",
|