Removed webpack for gulp again because its simpler for a project this size.

This commit is contained in:
firebingo 2019-05-13 13:16:40 -07:00
parent 77fc6e4d69
commit d4e96c66a8
15 changed files with 9062 additions and 14328 deletions

View file

@ -1,7 +1,5 @@
//(Math.exp(x)-1)/(Math.E-1)
import bgmLoopData from './BgmLoop.json';
class bufferLoader {
constructor(context, soundMap, callback) {
this.context = context;
@ -96,8 +94,8 @@ class audioController {
source.buffer = this.loader.bufferList[sound];
source.loop = false;
if(type === "bgm") {
if(bgmLoopData[this.utage.soundInfo[sound].origFileName]) {
let loop = bgmLoopData[this.utage.soundInfo[sound].origFileName];
if(this.utage.bgmLoopData[this.utage.soundInfo[sound].origFileName]) {
let loop = this.utage.bgmLoopData[this.utage.soundInfo[sound].origFileName];
source.loopStart = loop["loop_start"]["seconds"];
source.loopEnd = loop["loop_end"]["seconds"];
source.loop = true;
@ -184,5 +182,3 @@ class audioController {
this.sources = {};
}
}
export { audioController };

View file

@ -334,10 +334,7 @@ class commonFunctions {
if(props[i] == " ") { break; }
retval.color += props[i];
}
//retval.color = retval.color;
}
return retval;
}
}
export { rootUrl, baseDimensions, screenRatio, commonFunctions };

View file

@ -1,17 +1,5 @@
'use strict';
/* global PIXI */
import 'Pixi';
import { Player } from './Player.js';
import { audioController } from './Audio.js';
import { baseDimensions, commonFunctions } from './Common.js';
import { UtageInfo } from './UtageParse.js';
import { TextFunctions } from './TextFunctions.js';
import { Shaders } from './Shaders.js';
import '../Css/generic.min.css';
import '../Css/main.css';
const pixiApp = {
app: new PIXI.Application(baseDimensions),
loader: PIXI.loader
@ -227,9 +215,9 @@ function missionDropDownChanged(event) {
${chapterSelect}
</div>
<div id="modal-buttons">
<button onclick="XduPlayer.closeMissionModal(event, false)">Close</button>
<button onclick="closeMissionModal(event, false)">Close</button>
<span>MstId: ${mis.MstId}</span>
<button onclick="XduPlayer.missionChanged(${mis.MstId})">Play</button>
<button onclick="missionChanged(${mis.MstId})">Play</button>
</div>
</div>`;
document.getElementById("click-catcher").style.cssText = 'display: flex;';
@ -436,7 +424,7 @@ function openHelpModal(event) {
<a style="margin-top: auto; text-align: center; "href="https://discord.gg/fpQZQ8g">YameteTomete Discord</a>
<div style="margin-top: auto; text-align: center;">All Symphogear content belongs to its respective owners</div>
<div id="modal-buttons">
<button onclick="XduPlayer.closeModal(event)">Close</button>
<button onclick="closeModal(event)">Close</button>
<a href="https://git.poweris.moe/xduplayer.git/" target="_blank">Source</a>
</div>
</div>`;
@ -511,24 +499,4 @@ function onWindowResize(event, delay = 400) {
player.updateResolution(res);
document.getElementById('app-container').style.cssText = `width: ${res.width}px; height: ${res.height}px;`;
}, delay);
}
export {
onBodyLoaded,
onBodyKey,
toggleMute,
onVolumeChange,
missionDropDownChanged,
languageChanged,
toggleFullscreen,
onMainClick,
openHelpModal,
playFromQuery,
skipClicked,
hideUiClicked,
dialogScrollUp,
dialogScrollDown,
closeMissionModal,
missionChanged,
closeModal
};
}

View file

@ -1,9 +1,5 @@
'use strict';
/* global PIXI */
import 'Pixi';
import { baseDimensions, commonFunctions } from './Common.js';
class Player {
constructor(pixi, utage, text, audio, shaderscript) {
this.pixi = pixi;
@ -1401,5 +1397,3 @@ class Player {
});
}
}
export { Player };

View file

@ -1,9 +1,5 @@
//http://glslsandbox.com/e#39992.0
/* global PIXI */
import 'Pixi';
import { baseDimensions } from './Common.js';
class Shaders {
constructor() {
this.leftToRightFadeShader = `
@ -205,5 +201,3 @@ class Shaders {
}
}
}
export { Shaders };

View file

@ -191,5 +191,3 @@ class TextFunctions {
this.lineHeight = -1;
}
}
export { TextFunctions };

@ -1 +1 @@
Subproject commit dc15df970a33c34dd53654fb77ce775ee9e3f051
Subproject commit c472de2e64186cbd4b802dafbdd171efb7985d78

View file

@ -1,8 +1,6 @@
//http://madnesslabo.net/utage/?page_id=4448&lang=en
'use strict';
import { commonFunctions } from './Common.js';
class UtageInfo {
constructor() {
this.currentPlayingFile = [];
@ -34,16 +32,16 @@ class UtageInfo {
//commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Scenario.tsv`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Sound.tsv`), //4
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Texture.tsv`), //5
//commonFunctions.getFileJson(`${this.rootDirectory}Js/BgmLoop.json`),
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduMissionsCustom.json`), //6
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomCharacter.tsv`), //7
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomSound.tsv`), //8
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomTexture.tsv`), //9
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Scenario/Macro.tsv`), //10
commonFunctions.getFileJson(`${this.rootDirectory}Js/BgmLoop.json`), //6
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduMissionsCustom.json`), //7
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomCharacter.tsv`), //8
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomSound.tsv`), //9
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomTexture.tsv`), //10
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Scenario/Macro.tsv`), //11
];
Promise.all(promises)
.then((success) => {
this.groupMissions(success[0], success[6]);
this.groupMissions(success[0], success[7]);
this.missionsList = Object.keys(this.groupedMissions).map((k) => {
return {Name: this.groupedMissions[k].Name, MstId: this.groupedMissions[k].MstId};
});
@ -54,11 +52,11 @@ class UtageInfo {
//this.parseParamInfo(success[4]);
this.parseSoundInfo(success[4]);
this.parseTextureInfo(success[5]);
//this.bgmLoopData = success[6];
this.parseCharacterInfo(success[7], true);
this.parseSoundInfo(success[8], true);
this.parseTextureInfo(success[9], true);
this.parseMacroFile(success[10]);
this.bgmLoopData = success[6];
this.parseCharacterInfo(success[8], true);
this.parseSoundInfo(success[9], true);
this.parseTextureInfo(success[10], true);
this.parseMacroFile(success[11]);
resolve();
}, (failure) => {
reject(failure);
@ -395,5 +393,3 @@ class UtageInfo {
this.translationsInner = {};
}
}
export { UtageInfo };