Compare commits

..

No commits in common. "master" and "quest-json" have entirely different histories.

13 changed files with 3169 additions and 1827 deletions

4
.gitignore vendored
View File

@ -3,8 +3,6 @@
web.config
/Js/Typed
/Js/[Pp]ixi.js
/Js/[Pp]ixi.js.map
/Js/[Pp]ixi.min.js.map
/node_modules
/Js/XduPlayer.js
/Js/XduPlayer.min.js.map
@ -12,4 +10,4 @@ web.config
/Dist
/Css/main.min.css
/Js/XduPlayer.min.js
/**/.*.swp
/**/.*.swp

6
.gitmodules vendored
View File

@ -1,8 +1,8 @@
[submodule "Js/Translations"]
path = Js/Translations
url = https://git.poweris.moe/yttt-xdu/xdutranslations.git
branch = master
url = https://git.poweris.moe/xdutranslations.git
branch = .
[submodule "CustomData"]
path = CustomData
url = https://git.poweris.moe/yttt-xdu/customdata.git
url = https://git.poweris.moe/customdata.git
branch = .

View File

@ -34,17 +34,3 @@ DivaMovie
Changed metadata to include quests
Per-language quest enabling
Sort scenes into quests to reduce clutter
Preserve ColorTo tinting properly
urlparam: questSceneMstId
## V1.3.1 (2019-06-09)
Fix MoveCamera macro
## V1.4.0 (2019-09-29)
Updated Pixi.js to v5
## V1.5.0 (2020-07-31)
XDU Global support

View File

@ -39,7 +39,7 @@
src: url(../Fonts/Orbitron Medium.woff2) format('woff');
}
@font-face {
/*@font-face {
font-family: PTSans;
src: url(../Fonts/PTSans.woff2) format('woff');
}
@ -84,8 +84,6 @@ body { margin: 0; height: 100%; }
#text-container.rus { font-family: 'PTSans'; }
#text-container.cze { font-family: 'PTSans'; }
#text-container #fullscreen-button { position: absolute; top: 0.5rem; left: 0.5rem; font-size: 30px; line-height: 30px; opacity: 0.35; z-index: 11; }
#text-container #title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 20px; transition: opacity 0.3s; cursor: default; user-select: none; }

1354
Js/BgmLoop.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
const pixiApp = {
app: new PIXI.Application(baseDimensions),
loader: PIXI.Loader.shared
loader: PIXI.loader
};
const utage = new UtageInfo();
@ -10,8 +10,8 @@ const shaders = new Shaders();
const textFunc = new TextFunctions();
let audio = undefined; //Cant create a audio context without user input.
const player = new Player(pixiApp, utage, textFunc, audio, shaders);
const languages = ["eng", "jpn", "rus", "cze", "enm", "kor", "zho"];
const version = "YameteTomete XDUPlayer V1.5.0";
const languages = ["eng", "jpn", "rus"];
const version = "YameteTomete XDUPlayer V1.3.0";
let bodyLoaded = false;
let utageLoaded = false;
let languagesLoaded = false;
@ -142,7 +142,7 @@ function buildQuestSelectList() {
let tl_key = utage.questTranslations[cust][q.QuestMstId];
if (!tl_key) {
console.log("Failed to build quest list: missing translations");
continue;
return;
}
if (!tl_key.Enabled && !utage.quests[cust][q.QuestMstId].Scenes.some((s) => { return utage.sceneTranslations[cust][s].Enabled === true })) {
continue;
@ -191,7 +191,7 @@ function buildSceneSelectList() {
let tl_key = utage.sceneTranslations[cust][questSceneMstId];
if (!tl_key) {
console.log("Failed to build scene list: missing translations");
continue;
return;
}
if (!tl_key.Enabled) {
continue;
@ -285,10 +285,6 @@ function sceneDropDownChanged(event) {
let name = scene.Name;
let summary = scene.SummaryText;
let image = questSceneMstId;
if ("Image" in scene) {
image = scene.Image;
}
let credits = "";
let tl_key = utage.sceneTranslations[cust][questSceneMstId];
@ -311,8 +307,8 @@ function sceneDropDownChanged(event) {
chapterSelect += `<option value="${p}">${p}</option>`
}
let detailSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Detail/${image}.png`;
let iconSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Icon/${image}.png`;
let detailSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Detail/${questSceneMstId}.png`;
let iconSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Icon/${questSceneMstId}.png`;
chapterSelect += '</select></div>';
cont.innerHTML = `
<div id="mission-modal" class="modal">
@ -540,14 +536,14 @@ function openHelpModal(event) {
<div class="follow-links">
<div class="follow-links-header">Follow YameteTomete</div>
<div class="follow-links-links">
<a href="https://discord.gg/fpQZQ8g" target="_blank" >Discord</a>
<a href="https://twitter.com/YameteTomete" target="_blank">Twitter</a>
<a "href="https://discord.gg/fpQZQ8g" target="_blank" >Discord</a>
<a "href="https://twitter.com/YameteTomete" target="_blank">Twitter</a>
</div>
</div>
<div style="margin-top: auto; text-align: center;">All Symphogear content belongs to its respective owners</div>
<div id="modal-buttons">
<button onclick="closeModal(event)">Close</button>
<a href="https://git.poweris.moe/yttt-xdu/XDUPlayer" target="_blank">Source</a>
<a href="https://git.poweris.moe/xduplayer.git/" target="_blank">Source</a>
</div>
</div>`;
document.getElementById("click-catcher").style.cssText = 'display: flex;';

19
Js/Pixi.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,6 @@ class Player {
this.waitTime = 0;
this.manualNext = false;
this.hasMoreText = false;
this.hasFadedOut = false;
this.uiHidden = false;
this.center = {x: ((baseDimensions.width / 2) * this.resolutionScale), y: ((baseDimensions.height / 2) * this.resolutionScale) };
this.assetLoadPercent = 0;
@ -505,8 +504,6 @@ class Player {
//FadeTo
case "divaeffectcontinue":
case "fadeout": {
if(this.hasFadedOut) { break; }
this.hasFadedOut = true;
if(cur.Command.toLowerCase() === "divaeffectcontinue") {
cur.Arg1 = 'black';
cur.Arg6 = 1;
@ -523,7 +520,6 @@ class Player {
}
//FadeFrom
case "fadein": {
this.hasFadedOut = false;
this.waitTime = Number(cur.Arg6) * 1000;
if(!cur.Arg1)
cur.Arg1 = 'white';
@ -613,6 +609,50 @@ class Player {
}
break;
}
case "movecamera": {
let time = Number(cur.Arg4);
let scale = 1 + (1 - Number(cur.Arg3));
let cont = this.layers["bg|mainparent"].container;
let x = this.center.x + -(Number(cur.Arg1));
//y in xdu is flipped
let y = this.center.y - -(Number(cur.Arg2));
if(time) {
this.waitTime = time * 1000;
if(cont.scale.x !== scale) {
this.cancelLerpOfType('scale.x', cont);
this.lerpTargets.push({type: 'scale.x', object: cont, curTime: 0,
time: this.waitTime, finalV: scale, initV: cont.scale.x, inter: 'quadout' });
}
if(cont.scale.y !== scale) {
this.cancelLerpOfType('scale.y', cont);
this.lerpTargets.push({type: 'scale.y', object: cont, curTime: 0,
time: this.waitTime, finalV: scale, initV: cont.scale.y, inter: 'quadout' });
}
if(cont.position.x !== x) {
this.cancelLerpOfType('position.x', cont);
this.lerpTargets.push({type: 'position.x', object: cont, curTime: 0,
time: this.waitTime, finalV: x, initV: cont.position.x, inter: 'quadout' });
}
if(cont.position.y !== y) {
this.cancelLerpOfType('position.y', cont);
this.lerpTargets.push({type: 'position.y', object: cont, curTime: 0,
time: this.waitTime, finalV: y, initV: cont.position.y, inter: 'quadout' });
}
if(cur.Arg6 && cur.Arg6.toLowerCase() === "nowait") {
this.waitTime = 0;
}
} else {
this.cancelLerpOfType('scale.x', cont);
this.cancelLerpOfType('scale.y', cont);
this.cancelLerpOfType('position.x', cont);
this.cancelLerpOfType('position.y', cont);
cont.scale.set(scale, scale);
cont.position.set(x, y);
}
break;
}
case "characteroff": {
if(cur.Text) {
this.checkPutText(cur);
@ -960,12 +1000,7 @@ class Player {
let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
text = commonFunctions.convertUtageTextTags(text);
if(cur.Arg2 && cur.Arg2.toLowerCase() === "<off>") {
let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);});
let nameHalfWidth = cur.Arg1.replace(/[---]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)});
this.text.characterName(true, this.utage.charTranslations[cur.Arg1]
|| this.utage.charTranslations[nameFullWidth]
|| this.utage.charTranslations[nameHalfWidth]
|| cur.Arg1);
this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1);
this.text.dialogText(true, commonFunctions.convertUtageTextTags(text));
} else {
let found = false;
@ -980,12 +1015,7 @@ class Player {
if(cur.Character) {
nameToUse = cur.Arg1;
}
let nameFullWidth = nameToUse.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);});
let nameHalfWidth = nameToUse.replace(/[---]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)});
this.text.characterName(true, this.utage.charTranslations[nameToUse]
|| this.utage.charTranslations[nameFullWidth]
|| this.utage.charTranslations[nameHalfWidth]
|| nameToUse);
this.text.characterName(true, this.utage.charTranslations[nameToUse] || nameToUse);
this.text.dialogText(true, text);
//restoreTint is set from a colorTo command.
//We want to maintain the tint change from colorTo during speaking still.
@ -1023,12 +1053,7 @@ class Player {
}
//If we didnt find the character just dump the text anyways with Arg1 as the name
if(!found) {
let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);});
let nameHalfWidth = cur.Arg1.replace(/[---]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)});
this.text.characterName(true, this.utage.charTranslations[cur.Arg1]
|| this.utage.charTranslations[nameFullWidth]
|| this.utage.charTranslations[nameHalfWidth]
|| cur.Arg1);
this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1);
this.text.dialogText(true, text);
}
}
@ -1051,62 +1076,42 @@ class Player {
this.text.dialogText(false, "");
this.text.characterName(false, "");
let curChar = undefined;
let targetObj = undefined;
//If the target is SpriteCamera tween the main parent instead.
if(cur.Arg1.toLowerCase() === "spritecamera"){
curChar = this.layers["bg|mainparent"].container;
targetObj = curChar;
} else {
//Find the character for the tween.
for(const c of Object.keys(this.currentCharacters)) {
if(!this.currentCharacters[c]) { continue; }
if(this.currentCharacters[c].charName === cur.Arg1) {
curChar = this.currentCharacters[c];
this.currentCharacters[c].sprite.tint = 0xFFFFFF;
continue;
}
//while were here set other characters tint to background shade
if(this.currentCharacters[c].sprite) {
this.currentCharacters[c].sprite.tint = this.backCharTint;
}
//Find the character for the tween.
for(const c of Object.keys(this.currentCharacters)) {
if(!this.currentCharacters[c]) { continue; }
if(this.currentCharacters[c].charName === cur.Arg1) {
curChar = this.currentCharacters[c];
this.currentCharacters[c].sprite.tint = 0xFFFFFF;
continue;
}
//while were here set other characters tint to background shade
if(this.currentCharacters[c].sprite) {
this.currentCharacters[c].sprite.tint = this.backCharTint;
}
}
if(!curChar) { return; }
if(!targetObj) { targetObj = curChar.sprite; }
switch(cur.Arg2.toLowerCase()) {
case "moveto": {
let props = commonFunctions.getPropertiesFromTweenCommand(cur.Arg3);
//If we are moving spritecamera it is centered differntly
if(cur.Arg1.toLowerCase() === "spritecamera") {
if(props.x != undefined) {
props.x = this.center.x + -(Number(props.x));
}
if(props.y != undefined) {
props.y = this.center.y + -(Number(props.y));
}
}
//moveto has a islocal value that im just assuming is true until I run into a case it actually isint.
//note that islocal is local to the layer's position not the characters current position so the final pos will be 0 + what the command says
if(!cur.Arg6 || cur.Arg6 !== "NoWait") {
this.waitTime = props.time + (props.delay || 0);
}
if(props.x != undefined) {
this.cancelLerpOfType('position.x', targetObj);
if(props.time) {
this.lerpTargets.push({type: 'position.x', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: props.x, initV: targetObj.position.x, inter: 'quadout' });
this.lerpTargets.push({type: 'position.x', object: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: props.x, initV: curChar.sprite.position.x, inter: 'quadout' });
} else {
this.cancelLerpOfType()
targetObj.position.x = props.x;
curChar.sprite.position.x = props.x;
}
}
if(props.y != undefined) {
this.cancelLerpOfType('position.y', targetObj);
if(props.time) {
this.lerpTargets.push({type: 'position.y', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: props.y, initV: targetObj.position.y, inter: 'quadout' });
this.lerpTargets.push({type: 'position.y', object: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: props.y, initV: curChar.sprite.position.y, inter: 'quadout' });
} else {
targetObj.position.y = props.y;
curChar.sprite.position.y = props.y;
}
}
break;
@ -1118,52 +1123,30 @@ class Player {
this.waitTime = props.time + (props.delay || 0);
}
if(props.x != undefined) {
this.lerpTargets.push({type: 'position.x', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: targetObj.position.x + props.x, initV: targetObj.position.x, inter: 'punch' });
this.lerpTargets.push({type: 'position.x', object: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: curChar.sprite.position.x + props.x, initV: curChar.sprite.position.x, inter: 'punch' });
}
if(props.y != undefined) {
this.lerpTargets.push({type: 'position.y', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: targetObj.position.y + props.y, initV: targetObj.position.y, inter: 'punch' });
this.lerpTargets.push({type: 'position.y', object: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: curChar.sprite.position.y + props.y, initV: curChar.sprite.position.y, inter: 'punch' });
}
break;
}
case "scaleto": {
let props = commonFunctions.getPropertiesFromTweenCommand(cur.Arg3, false);
let finalx = props.x != undefined ? targetObj.scale.x * props.x : undefined;
let finaly = props.y != undefined ? targetObj.scale.y * props.y : undefined;
//If we are moving spritecamera it scales differntly than sprites
if(cur.Arg1.toLowerCase() === "spritecamera") {
//For some reason they only set y to scale for this but it scales both.
if(props.y != undefined) {
props.y = 1 / Number(props.y);//1 + (1 - Number(props.y));
finaly = props.y;
finalx = props.y;
}
}
if(props.time == undefined) { props.time = 500; }
//cuz I don't care about their values that make no sense when everything else uses time.
if(props.speed) { props.time = props.speed * 1000; }
if(!cur.Arg6 || cur.Arg6 !== "NoWait") {
this.waitTime = props.time + (props.delay || 0);
}
if(finalx != undefined) {
this.cancelLerpOfType('scale.x', targetObj);
if(props.time) {
this.lerpTargets.push({type: 'scale.x', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: finalx, initV: targetObj.scale.x });
} else {
targetObj.scale.x = finalx;
}
if(props.x != undefined) {
this.lerpTargets.push({type: 'scale.x', object: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: curChar.sprite.scale.x * props.x, initV: curChar.sprite.scale.x });
}
if(finaly != undefined) {
this.cancelLerpOfType('scale.y', targetObj);
if(props.time) {
this.lerpTargets.push({type: 'scale.y', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: finaly, initV: targetObj.scale.y });
} else {
targetObj.scale.y = finaly;
}
if(props.y != undefined) {
this.lerpTargets.push({type: 'scale.y', object: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: curChar.sprite.scale.y * props.y, initV: curChar.sprite.scale.y });
}
break;
}
@ -1171,30 +1154,30 @@ class Player {
let props = commonFunctions.getPropertiesFromTweenCommand(cur.Arg3);
curChar.restoreTint = {};
if(props.alpha != undefined) {
this.cancelLerpOfType('alpha', targetObj);
this.cancelLerpOfType('alpha', curChar.sprite);
if(props.time) {
//Save this value on the character so it can be restored during speaking.
curChar.restoreTint['alpha'] = props.alpha;
this.lerpTargets.push({type: 'alpha', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: props.alpha, initV: targetObj.alpha });
this.lerpTargets.push({type: 'alpha', object: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: props.alpha, initV: curChar.sprite.alpha });
} else {
//Save this value on the character so it can be restored during speaking.
curChar.restoreTint['alpha'] = props.alpha;
targetObj.alpha = props.alpha;
curChar.sprite.alpha = props.alpha;
}
}
if(props.color != undefined) {
this.cancelLerpOfType('tint', targetObj);
this.cancelLerpOfType('tint', curChar.sprite);
let color = commonFunctions.getColorFromName(props.color);
if(props.time) {
//Save this value on the character so it can be restored during speaking.
curChar.restoreTint['color'] = color.color;
this.lerpTargets.push({type: 'tint', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: color.color, initV: targetObj.tint });
this.lerpTargets.push({type: 'tint', object: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: color.color, initV: curChar.sprite.tint });
} else {
//Save this value on the character so it can be restored during speaking.
curChar.restoreTint['color'] = color.color;
targetObj.tint = color.color;
curChar.sprite.tint = color.color;
}
}
break;
@ -1397,7 +1380,6 @@ class Player {
this.lerpTargets = [];
this.manualNext = false;
this.hasMoreText = false;
this.hasFadedOut = false;
this.audioLoadPercent = 0;
this.assetLoadPercent = 0;
this.playingVoice = undefined;

View File

@ -5,16 +5,22 @@ class Shaders {
this.leftToRightFadeShader = `
precision mediump float;
varying vec2 vTextureCoord;
uniform vec4 inputPixel;
uniform highp vec4 outputFrame;
uniform vec2 dimensions;
uniform vec4 filterArea;
uniform float time;
uniform vec4 fadeincolor;
uniform vec4 fadeoutcolor;
vec2 mapCoord( vec2 coord ) {
coord *= filterArea.xy;
coord += filterArea.zw;
return coord;
}
void main( void ) {
vec2 uv = vTextureCoord * inputPixel.xy / outputFrame.zw;
vec2 mappedCoord = uv;
vec2 uv = vTextureCoord;
vec2 mappedCoord = mapCoord(uv) / dimensions;
float step2 = time;
float step3 = time + 0.2;
@ -30,16 +36,21 @@ class Shaders {
this.rightToLeftFadeShader = `
precision mediump float;
varying vec2 vTextureCoord;
uniform vec4 inputPixel;
uniform highp vec4 outputFrame;
uniform vec2 dimensions;
uniform vec4 filterArea;
uniform float time;
uniform vec4 fadeincolor;
uniform vec4 fadeoutcolor;
vec2 mapCoord( vec2 coord ) {
coord *= filterArea.xy;
return coord;
}
void main( void ) {
vec2 uv = vTextureCoord * inputPixel.xy / outputFrame.zw;
vec2 mappedCoord = uv;
vec2 uv = vTextureCoord;
vec2 mappedCoord = mapCoord(uv) / dimensions;
float step2 = (1.0 - time);
float step3 = (1.0 - time) - 0.2;
@ -55,16 +66,22 @@ class Shaders {
this.downToUpFadeShader = `
precision mediump float;
varying vec2 vTextureCoord;
uniform vec4 inputPixel;
uniform highp vec4 outputFrame;
uniform vec2 dimensions;
uniform vec4 filterArea;
uniform float time;
uniform vec4 fadeincolor;
uniform vec4 fadeoutcolor;
vec2 mapCoord( vec2 coord ) {
coord *= filterArea.xy;
coord += filterArea.zw;
return coord;
}
void main( void ) {
vec2 uv = vTextureCoord * inputPixel.xy / outputFrame.zw;
vec2 mappedCoord = uv;
vec2 uv = vTextureCoord;
vec2 mappedCoord = mapCoord(uv) / dimensions;
float step2 = (1.0 - time);
float step3 = (1.0 - time) - 0.2;
@ -80,16 +97,22 @@ class Shaders {
this.uptoDownFadeShader = `
precision mediump float;
varying vec2 vTextureCoord;
uniform vec4 inputPixel;
uniform highp vec4 outputFrame;
uniform vec2 dimensions;
uniform vec4 filterArea;
uniform float time;
uniform vec4 fadeincolor;
uniform vec4 fadeoutcolor;
vec2 mapCoord( vec2 coord ) {
coord *= filterArea.xy;
coord += filterArea.zw;
return coord;
}
void main( void ) {
vec2 uv = vTextureCoord * inputPixel.xy / outputFrame.zw;
vec2 mappedCoord = uv;
vec2 uv = vTextureCoord;
vec2 mappedCoord = mapCoord(uv) / dimensions;
float step2 = time;
float step3 = time + 0.2;
@ -106,6 +129,7 @@ class Shaders {
precision mediump float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec2 dimensions;
uniform float factor;
vec4 Sepia( in vec4 color )
@ -126,11 +150,10 @@ class Shaders {
}
//https://jsfiddle.net/60e5pp8d/1/
//v5 changes to shaders, https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters
// https://www.html5gamedevs.com/topic/42235-how-to-get-correct-fragment-shader-uv-in-pixi-50-rc0/
buildShaders() {
let divalefttorightfade = new PIXI.Filter(null, this.leftToRightFadeShader, {
time: { type: 'f', value: 0 },
dimensions: { type: 'v2', value: [baseDimensions.width, baseDimensions.height] },
fadeincolor: { type: 'v4', value: [0.0,0.0,0.0,1.0] },
fadeoutcolor: { type: 'v4', value: [0.0,0.0,0.0,0.0] }
});
@ -139,6 +162,7 @@ class Shaders {
let divarighttoleftfade = new PIXI.Filter(null, this.rightToLeftFadeShader, {
time: { type: 'f', value: 0 },
dimensions: { type: 'v2', value: [baseDimensions.width, baseDimensions.height] },
fadeincolor: { type: 'v4', value: [0.0,0.0,0.0,1.0] },
fadeoutcolor: { type: 'v4', value: [0.0,0.0,0.0,0.0] }
});
@ -147,6 +171,7 @@ class Shaders {
let divauptodownfade = new PIXI.Filter(null, this.uptoDownFadeShader, {
time: { type: 'f', value: 0 },
dimensions: { type: 'v2', value: [baseDimensions.width, baseDimensions.height] },
fadeincolor: { type: 'v4', value: [0.0,0.0,0.0,1.0] },
fadeoutcolor: { type: 'v4', value: [0.0,0.0,0.0,0.0] }
});
@ -155,6 +180,7 @@ class Shaders {
let divadowntoupfade = new PIXI.Filter(null, this.downToUpFadeShader, {
time: { type: 'f', value: 0 },
dimensions: { type: 'v2', value: [baseDimensions.width, baseDimensions.height] },
fadeincolor: { type: 'v4', value: [0.0,0.0,0.0,1.0] },
fadeoutcolor: { type: 'v4', value: [0.0,0.0,0.0,0.0] }
});
@ -162,12 +188,15 @@ class Shaders {
this.shaders['divadowntoupfade'] = divadowntoupfade;
let sepia = new PIXI.Filter(null, this.sepiaShader, {
factor: { type: 'f', value: 0.5 }
factor: { type: 'f', value: 0.5 },
dimensions: { type: 'v2', value: [baseDimensions.width, baseDimensions.height] }
});
sepia.apply = baseShaderApply;
this.shaders['sepia'] = sepia;
function baseShaderApply(filterManager, input, output) {
this.uniforms.dimensions[0] = input.sourceFrame.width;
this.uniforms.dimensions[1] = input.sourceFrame.height;
filterManager.applyFilter(this, input, output);
}
}

@ -1 +1 @@
Subproject commit ac0bfbd699431e9befdd843379e7c91ad1014cec
Subproject commit ba15725d9ce688b106c01cd6d4572e42c7abb0ab

View File

@ -36,7 +36,7 @@ class UtageInfo {
//commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Scenario.tsv`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Sound.tsv`), //5
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Texture.tsv`), //6
commonFunctions.getFileJson(`${this.rootDirectory}XDUData/Bgm/BgmLoop.json`), //7
commonFunctions.getFileJson(`${this.rootDirectory}Js/BgmLoop.json`), //7
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduQuestCustom.json`), //8
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduSceneCustom.json`), //9
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomCharacter.tsv`), //10
@ -141,12 +141,7 @@ class UtageInfo {
for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) {
if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) {
for (const s of this.quests[c][k].Scenes) {
// only propagate if exists in translation file (THANKS GLOBAL) and translated name is supplied
if (c in this.sceneTranslationsInner[this.currentTranslation]
&& s in this.sceneTranslationsInner[this.currentTranslation][c]
&& this.sceneTranslationsInner[this.currentTranslation][c][s].Name != "") {
this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true;
}
this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true;
}
}
}

View File

@ -26,6 +26,9 @@ const cssToCopy = [
"Css/main.min.css",
"Css/generic.min.css"
];
const jsonFiles = [
"Js/BgmLoop.json",
];
const translations = [
"Js/Translations/**"
];
@ -47,6 +50,7 @@ gulp.task('dist', gulp.series(
buildCss,
copyCss
),
buildJson,
buildJsonTranslations,
copyHtml,
copyImages,
@ -113,6 +117,12 @@ function copyCustomData() {
.pipe(gulp.dest('Dist/CustomData'));
}
function buildJson() {
return gulp.src(jsonFiles)
.pipe(jsonmin())
.pipe(gulp.dest('Dist/Js'));
}
function buildJsonTranslations() {
return gulp.src(translations)
.pipe(jsonmin())

3301
package-lock.json generated

File diff suppressed because it is too large Load Diff