Update Pixi.
Fix some things so that if errors happen in audio the rest will still run.
This commit is contained in:
parent
9f1efa1225
commit
447eb0b3dd
4 changed files with 30 additions and 21 deletions
10
Js/Audio.js
10
Js/Audio.js
|
@ -3,6 +3,7 @@
|
|||
|
||||
class bufferLoader {
|
||||
constructor(context, soundMap, callback) {
|
||||
debugger;
|
||||
this.context = context;
|
||||
this.soundMap = soundMap;
|
||||
this.onloadUpdate = callback;
|
||||
|
@ -41,7 +42,8 @@ class bufferLoader {
|
|||
}
|
||||
resolve(`${this.loadCount}|${this.soundMap.length}`);
|
||||
},
|
||||
function(error) {
|
||||
(error) => {
|
||||
|
||||
console.log(error);
|
||||
console.log(`url: ${url}, name: ${name}`);
|
||||
if(this.onloadUpdate) {
|
||||
|
@ -52,10 +54,16 @@ class bufferLoader {
|
|||
);
|
||||
});
|
||||
}, (failure) => {
|
||||
if(this.onloadUpdate) {
|
||||
this.onloadUpdate((++this.loadCount / this.soundMap.length) * 100);
|
||||
}
|
||||
console.log(failure);
|
||||
reject(failure);
|
||||
});
|
||||
} catch(error) {
|
||||
if(this.onloadUpdate) {
|
||||
this.onloadUpdate((++this.loadCount / this.soundMap.length) * 100);
|
||||
}
|
||||
console.log(error);
|
||||
reject(error);
|
||||
}
|
||||
|
|
|
@ -133,8 +133,8 @@ function missionDropDownChanged(event) {
|
|||
cont.innerHTML = '' +
|
||||
'<div id="mission-modal" class="modal">' +
|
||||
`<span class="mission-title">Name: ${mis.Name || 'none'}</span>` +
|
||||
`<img id="mission-detail" src="XDUData/Asset/Image/Quest/Snap/Detail/${mis.MstId}.png">` +
|
||||
`<img id="mission-icon" src="XDUData/Asset/Image/Quest/Snap/Icon/${mis.MstId}.png">` +
|
||||
`<img id="mission-detail" src="XDUData/Asset/Image/Quest/Snap/Detail/${mis.MstId}.png"/>` +
|
||||
`<img id="mission-icon" src="XDUData/Asset/Image/Quest/Snap/Icon/${mis.MstId}.png"/>` +
|
||||
`<span>Summary: ${mis.SummaryText || 'none'}</span>` +
|
||||
'<div id="mission-ids">' +
|
||||
`<span>MstId: ${mis.MstId}</span>` +
|
||||
|
|
31
Js/Pixi.min.js
vendored
31
Js/Pixi.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue