Merge branch 'master' of git.poweris.moe:xduplayer

This commit is contained in:
louis f 2019-05-13 03:40:32 -04:00
commit 77fc6e4d69
6 changed files with 47 additions and 15 deletions

View File

@ -14,4 +14,21 @@ Added null check for pixi sprite calculateverticies because it sometimes makes a
DPI is now taken into account when resizing. DPI is now taken into account when resizing.
Added credits to mission modal. Added credits to mission modal.
Added ability to go fullscreen. Added ability to go fullscreen.
Missions JSON moved to translations submodule so missions can be added/enabled without disturbing main project. Missions JSON moved to translations submodule so missions can be added/enabled without disturbing main project.
## V1.2.1 (2018-12-29)
Custom asset support
Russian language support
Fix translation fallback
## V1.2.2 (2019-01-20)
Add language url parameter
Fix noise\_disappearance commands
## V1.3.0 (2019-05-13)
Macro support
Webpack distribution
ES6 modules

View File

@ -363,6 +363,19 @@
"seconds": 20.034 "seconds": 20.034
} }
}, },
"music_axia_no_kaze": {
"duration": 227.14678125,
"loop_end": {
"samples_48k": 10902963,
"samples_native": 7268642,
"seconds": 227.1450625
},
"loop_start": {
"samples_48k": 7334256,
"samples_native": 4889504,
"seconds": 152.797
}
},
"music_beyond_the_blade": { "music_beyond_the_blade": {
"duration": 107.07978125, "duration": 107.07978125,
"loop_end": { "loop_end": {

View File

@ -23,7 +23,7 @@ const textFunc = new TextFunctions();
let audio = undefined; //Cant create a audio context without user input. let audio = undefined; //Cant create a audio context without user input.
const player = new Player(pixiApp, utage, textFunc, audio, shaders); const player = new Player(pixiApp, utage, textFunc, audio, shaders);
const languages = ["eng", "jpn", "rus"]; const languages = ["eng", "jpn", "rus"];
const version = "YameteTomete XDUPlayer V1.2.1"; const version = "YameteTomete XDUPlayer V1.3.0";
let bodyLoaded = false; let bodyLoaded = false;
let utageLoaded = false; let utageLoaded = false;
let languagesLoaded = false; let languagesLoaded = false;
@ -72,7 +72,7 @@ function onBodyLoaded() {
(function checkIsLoaded() { (function checkIsLoaded() {
if(bodyLoaded) { if(bodyLoaded) {
document.getElementById('loading-font').style.cssText = "display: none;"; document.getElementById('loading-font').style.cssText = "display: none;";
loadQueryParameters(); checkQueryParameters();
loadLocalStorage(); loadLocalStorage();
} }
if(utageLoaded && languagesLoaded) { if(utageLoaded && languagesLoaded) {
@ -96,6 +96,7 @@ function onAllLoaded(success) {
document.getElementById('parent-container').style.cssText = "opacity: 1;"; document.getElementById('parent-container').style.cssText = "opacity: 1;";
onWindowResize(); onWindowResize();
window.addEventListener("resize", onWindowResize); window.addEventListener("resize", onWindowResize);
checkQueryParameters();
}, 0); }, 0);
} }
@ -171,14 +172,13 @@ function buildLanguageList() {
selectBox.value = selectedLang; selectBox.value = selectedLang;
} }
function loadQueryParameters() { function checkQueryParameters() {
urlParams = commonFunctions.readQueryParameters(); urlParams = commonFunctions.readQueryParameters();
if(urlParams['mstid'] && urlParams['id'] && utage.groupedMissions[urlParams['mstid']] && utage.groupedMissions[urlParams['mstid']].Missions[urlParams['id']]) { if(urlParams['mstid'] && urlParams['id'] && utage.groupedMissions[urlParams['mstid']] && utage.groupedMissions[urlParams['mstid']].Missions[urlParams['id']]) {
document.getElementById('play-from-query').style.cssText = "position: fixed; z-index: 15; text-align: center; top: 50%; left: 50%; display: block;"; document.getElementById('play-from-query').style.cssText = "position: fixed; z-index: 15; text-align: center; top: 50%; left: 50%; display: block;";
} }
} }
function playFromQuery(event) { function playFromQuery(event) {
missionChanged(urlParams['mstid'], urlParams['id']); missionChanged(urlParams['mstid'], urlParams['id']);
document.getElementById('play-from-query').style.cssText = "display: none;"; document.getElementById('play-from-query').style.cssText = "display: none;";

View File

@ -561,7 +561,7 @@ class Player {
this.lerpTargets.push({type: 'alpha', object: sprite, curTime: 0, time: 300, finalV: 1, initV: 0}); this.lerpTargets.push({type: 'alpha', object: sprite, curTime: 0, time: 300, finalV: 1, initV: 0});
this.lerpTargets.push({type: 'alpha', object: sprite, curTime: -(this.waitTime+500), time: 300, finalV: 0, initV: 1, post: "destroy"}); this.lerpTargets.push({type: 'alpha', object: sprite, curTime: -(this.waitTime+500), time: 300, finalV: 0, initV: 1, post: "destroy"});
} catch (error) { } } catch (error) { }
let text = cur.English ? (this.utage.translations[cur.English] || cur.Text) : cur.Text; let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
this.text.titleText(true, text); this.text.titleText(true, text);
break; break;
} }
@ -570,7 +570,7 @@ class Player {
break; break;
case "divaeffect": { case "divaeffect": {
this.waitTime = Number(cur.Arg5) * 1000; this.waitTime = Number(cur.Arg5) * 1000;
let text = cur.English ? (this.utage.translations[cur.English] || cur.Text) : cur.Text; let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
this.text.divaText(true, text); this.text.divaText(true, text);
break; break;
} }
@ -808,7 +808,6 @@ class Player {
} }
break; break;
} }
case "darkaura01": //312000111 case "darkaura01": //312000111
this.audio.stopSound('Se_不幸のオーラ(ヴォォオンン)'); this.audio.stopSound('Se_不幸のオーラ(ヴォォオンン)');
this.audio.playSound('Se_不幸のオーラ(ヴォォオンン)', 'Se'); this.audio.playSound('Se_不幸のオーラ(ヴォォオンン)', 'Se');
@ -1015,7 +1014,7 @@ class Player {
} }
} }
processTryRemoveChar(character) { processTryRemoveChar(character, fadeTime) {
let curChar = undefined; let curChar = undefined;
for(let c of Object.keys(this.currentCharacters)) { for(let c of Object.keys(this.currentCharacters)) {
if(!this.currentCharacters[c]) { continue; } if(!this.currentCharacters[c]) { continue; }
@ -1026,7 +1025,10 @@ class Player {
if(!curChar) { if(!curChar) {
return; return;
} }
this.lerpTargets.push({type: 'alpha', object: curChar.sprite, curTime: 0, time: 500, finalV: 0, initV: 1, post: "destroy" }); if(fadeTime == undefined) {
fadeTime = 500;
}
this.lerpTargets.push({type: 'alpha', object: curChar.sprite, curTime: 0, time: fadeTime, finalV: 0, initV: 1, post: "destroy" });
this.currentCharacters[curChar.layer.info.LayerName] = undefined; this.currentCharacters[curChar.layer.info.LayerName] = undefined;
} }
@ -1036,8 +1038,8 @@ class Player {
this.audio.stopSound(this.playingVoice); this.audio.stopSound(this.playingVoice);
} }
if(!cur.Command && cur.Arg1 && cur.Text) { if(!cur.Command && cur.Arg1 && cur.Text) {
//If its chracter off screen text //If its character off screen text
let text = cur.English ? (this.utage.translations[cur.English] || cur.Text) : cur.Text; let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
text = commonFunctions.convertUtageTextTags(text); text = commonFunctions.convertUtageTextTags(text);
if(cur.Arg2 && cur.Arg2.toLowerCase() === "<off>") { if(cur.Arg2 && cur.Arg2.toLowerCase() === "<off>") {
this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1); this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1);
@ -1074,7 +1076,7 @@ class Player {
this.manualNext = true; this.manualNext = true;
//Sometimes they don't give a Arg1 for the text. //Sometimes they don't give a Arg1 for the text.
} else if(!cur.Command && cur.Arg2.toLowerCase() === "<off>" && cur.Text) { } else if(!cur.Command && cur.Arg2.toLowerCase() === "<off>" && cur.Text) {
let text = cur.English ? (this.utage.translations[cur.English] || cur.Text) : cur.Text; let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
this.text.characterName(true, ""); this.text.characterName(true, "");
this.text.dialogText(true, commonFunctions.convertUtageTextTags(text)); this.text.dialogText(true, commonFunctions.convertUtageTextTags(text));
this.manualNext = true; this.manualNext = true;

@ -1 +1 @@
Subproject commit 533c48371ed01ed7265b6b5f052d1b2c3fce940f Subproject commit dc15df970a33c34dd53654fb77ce775ee9e3f051

View File

@ -1,6 +1,6 @@
{ {
"name": "XduPlayer", "name": "XduPlayer",
"version": "1.0.0", "version": "1.3.0",
"private": true, "private": true,
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {