Compare commits

...

20 Commits

Author SHA1 Message Date
62e702b9fa Merge pull request 'feature/czechlang' (#9) from feature/czechlang into master 2021-02-16 10:14:42 -05:00
428ea1d660 changed czech font to PTSans 2021-02-15 20:00:30 +01:00
0def56d476 added czech 2021-02-15 19:48:57 +01:00
85f2815b6a added player support for new scene images 2020-10-21 23:54:33 +02:00
7b43a86b99
master tracks master
we're just going to rebuild beta off the most recently pushed branch
2020-09-12 16:39:42 -04:00
1dc54f8590
master branch tracks beta translations 2020-09-12 03:03:52 -04:00
d6ac86ed8c
load name variants
global stinx
2020-08-11 12:32:41 -04:00
afd850fbca
make sure translation is supplied when propagating enables 2020-08-11 11:55:19 -04:00
bdc076b664
fixed player supporting global 2020-08-11 11:55:17 -04:00
47e250ba89 support for global languages 2020-05-16 15:39:41 +02:00
14efed32e3 Merge branch 'master' of https://git.poweris.moe/yttt-xdu/XDUPlayer 2020-04-17 14:26:49 -07:00
90236c665d Since we dont have battles we use "divaeffectcontinue" as a fade out but they also sometimes call "fadeout" so set a flag so we don't do fade out again if we are already doing it. 2020-04-17 14:26:12 -07:00
89a93407f1 Update repository links for submodules and player info 2020-02-18 18:18:02 -05:00
2ca5a9e704 js: move bgmloop to data folder
Having xdu-specific data in this repo doesn't make much sense when most of the
data is fairly general to the engine, plus now I don't have to make a commit
every time I want to update the data.
2019-11-12 18:58:42 -05:00
c6c9c99c31 json: update bgmloop 2019-10-25 17:56:09 -04:00
ae90fd1c37 Updated pixi again with fork because im clearly still doing something wrong and still need the sprite hack. 2019-09-29 11:53:12 -07:00
5ca0935ac6 Updated to Pixi v5.
This also fixes a chrome video preload spec change.
2019-09-29 11:19:51 -07:00
0c039b6ed4 1.3.1 version bump 2019-06-09 21:36:52 -04:00
a93978f39d Fix movecamera since its a macro now. 2019-06-01 14:38:39 -07:00
b6821d4157 fix broken links 2019-05-24 10:00:38 -04:00
13 changed files with 1824 additions and 3168 deletions

4
.gitignore vendored
View File

@ -3,6 +3,8 @@
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
@ -10,4 +12,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/xdutranslations.git
branch = .
url = https://git.poweris.moe/yttt-xdu/xdutranslations.git
branch = master
[submodule "CustomData"]
path = CustomData
url = https://git.poweris.moe/customdata.git
url = https://git.poweris.moe/yttt-xdu/customdata.git
branch = .

View File

@ -36,3 +36,15 @@ 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

@ -84,6 +84,8 @@ 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; }

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
loader: PIXI.Loader.shared
};
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"];
const version = "YameteTomete XDUPlayer V1.3.0";
const languages = ["eng", "jpn", "rus", "cze", "enm", "kor", "zho"];
const version = "YameteTomete XDUPlayer V1.5.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");
return;
continue;
}
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");
return;
continue;
}
if (!tl_key.Enabled) {
continue;
@ -285,6 +285,10 @@ 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];
@ -307,8 +311,8 @@ function sceneDropDownChanged(event) {
chapterSelect += `<option value="${p}">${p}</option>`
}
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`;
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`;
chapterSelect += '</select></div>';
cont.innerHTML = `
<div id="mission-modal" class="modal">
@ -536,14 +540,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/xduplayer.git/" target="_blank">Source</a>
<a href="https://git.poweris.moe/yttt-xdu/XDUPlayer" 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,6 +27,7 @@ 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;
@ -504,6 +505,8 @@ 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;
@ -520,6 +523,7 @@ class Player {
}
//FadeFrom
case "fadein": {
this.hasFadedOut = false;
this.waitTime = Number(cur.Arg6) * 1000;
if(!cur.Arg1)
cur.Arg1 = 'white';
@ -609,50 +613,6 @@ 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);
@ -1000,7 +960,12 @@ 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>") {
this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1);
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.dialogText(true, commonFunctions.convertUtageTextTags(text));
} else {
let found = false;
@ -1015,7 +980,12 @@ class Player {
if(cur.Character) {
nameToUse = cur.Arg1;
}
this.text.characterName(true, this.utage.charTranslations[nameToUse] || nameToUse);
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.dialogText(true, text);
//restoreTint is set from a colorTo command.
//We want to maintain the tint change from colorTo during speaking still.
@ -1053,7 +1023,12 @@ class Player {
}
//If we didnt find the character just dump the text anyways with Arg1 as the name
if(!found) {
this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1);
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.dialogText(true, text);
}
}
@ -1076,42 +1051,62 @@ class Player {
this.text.dialogText(false, "");
this.text.characterName(false, "");
let curChar = undefined;
//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;
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;
}
}
}
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: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: props.x, initV: curChar.sprite.position.x, inter: 'quadout' });
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' });
} else {
curChar.sprite.position.x = props.x;
this.cancelLerpOfType()
targetObj.position.x = props.x;
}
}
if(props.y != undefined) {
this.cancelLerpOfType('position.y', targetObj);
if(props.time) {
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' });
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' });
} else {
curChar.sprite.position.y = props.y;
targetObj.position.y = props.y;
}
}
break;
@ -1123,30 +1118,52 @@ class Player {
this.waitTime = props.time + (props.delay || 0);
}
if(props.x != undefined) {
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' });
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' });
}
if(props.y != undefined) {
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' });
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' });
}
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(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(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.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 });
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;
}
}
break;
}
@ -1154,30 +1171,30 @@ class Player {
let props = commonFunctions.getPropertiesFromTweenCommand(cur.Arg3);
curChar.restoreTint = {};
if(props.alpha != undefined) {
this.cancelLerpOfType('alpha', curChar.sprite);
this.cancelLerpOfType('alpha', targetObj);
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: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: props.alpha, initV: curChar.sprite.alpha });
this.lerpTargets.push({type: 'alpha', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: props.alpha, initV: targetObj.alpha });
} else {
//Save this value on the character so it can be restored during speaking.
curChar.restoreTint['alpha'] = props.alpha;
curChar.sprite.alpha = props.alpha;
targetObj.alpha = props.alpha;
}
}
if(props.color != undefined) {
this.cancelLerpOfType('tint', curChar.sprite);
this.cancelLerpOfType('tint', targetObj);
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: curChar.sprite, curTime: 0 - (props.delay || 0), time: props.time,
finalV: color.color, initV: curChar.sprite.tint });
this.lerpTargets.push({type: 'tint', object: targetObj, curTime: 0 - (props.delay || 0), time: props.time,
finalV: color.color, initV: targetObj.tint });
} else {
//Save this value on the character so it can be restored during speaking.
curChar.restoreTint['color'] = color.color;
curChar.sprite.tint = color.color;
targetObj.tint = color.color;
}
}
break;
@ -1380,6 +1397,7 @@ 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,22 +5,16 @@ class Shaders {
this.leftToRightFadeShader = `
precision mediump float;
varying vec2 vTextureCoord;
uniform vec2 dimensions;
uniform vec4 filterArea;
uniform vec4 inputPixel;
uniform highp vec4 outputFrame;
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;
vec2 mappedCoord = mapCoord(uv) / dimensions;
vec2 uv = vTextureCoord * inputPixel.xy / outputFrame.zw;
vec2 mappedCoord = uv;
float step2 = time;
float step3 = time + 0.2;
@ -36,21 +30,16 @@ class Shaders {
this.rightToLeftFadeShader = `
precision mediump float;
varying vec2 vTextureCoord;
uniform vec2 dimensions;
uniform vec4 filterArea;
uniform vec4 inputPixel;
uniform highp vec4 outputFrame;
uniform float time;
uniform vec4 fadeincolor;
uniform vec4 fadeoutcolor;
vec2 mapCoord( vec2 coord ) {
coord *= filterArea.xy;
return coord;
}
void main( void ) {
vec2 uv = vTextureCoord;
vec2 mappedCoord = mapCoord(uv) / dimensions;
vec2 uv = vTextureCoord * inputPixel.xy / outputFrame.zw;
vec2 mappedCoord = uv;
float step2 = (1.0 - time);
float step3 = (1.0 - time) - 0.2;
@ -66,22 +55,16 @@ class Shaders {
this.downToUpFadeShader = `
precision mediump float;
varying vec2 vTextureCoord;
uniform vec2 dimensions;
uniform vec4 filterArea;
uniform vec4 inputPixel;
uniform highp vec4 outputFrame;
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;
vec2 mappedCoord = mapCoord(uv) / dimensions;
vec2 uv = vTextureCoord * inputPixel.xy / outputFrame.zw;
vec2 mappedCoord = uv;
float step2 = (1.0 - time);
float step3 = (1.0 - time) - 0.2;
@ -97,22 +80,16 @@ class Shaders {
this.uptoDownFadeShader = `
precision mediump float;
varying vec2 vTextureCoord;
uniform vec2 dimensions;
uniform vec4 filterArea;
uniform vec4 inputPixel;
uniform highp vec4 outputFrame;
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;
vec2 mappedCoord = mapCoord(uv) / dimensions;
vec2 uv = vTextureCoord * inputPixel.xy / outputFrame.zw;
vec2 mappedCoord = uv;
float step2 = time;
float step3 = time + 0.2;
@ -129,7 +106,6 @@ class Shaders {
precision mediump float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec2 dimensions;
uniform float factor;
vec4 Sepia( in vec4 color )
@ -150,10 +126,11 @@ 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] }
});
@ -162,7 +139,6 @@ 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] }
});
@ -171,7 +147,6 @@ 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] }
});
@ -180,7 +155,6 @@ 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] }
});
@ -188,15 +162,12 @@ class Shaders {
this.shaders['divadowntoupfade'] = divadowntoupfade;
let sepia = new PIXI.Filter(null, this.sepiaShader, {
factor: { type: 'f', value: 0.5 },
dimensions: { type: 'v2', value: [baseDimensions.width, baseDimensions.height] }
factor: { type: 'f', value: 0.5 }
});
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 ba15725d9ce688b106c01cd6d4572e42c7abb0ab
Subproject commit ac0bfbd699431e9befdd843379e7c91ad1014cec

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}Js/BgmLoop.json`), //7
commonFunctions.getFileJson(`${this.rootDirectory}XDUData/Bgm/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,7 +141,12 @@ 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) {
this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true;
// 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;
}
}
}
}

View File

@ -26,9 +26,6 @@ const cssToCopy = [
"Css/main.min.css",
"Css/generic.min.css"
];
const jsonFiles = [
"Js/BgmLoop.json",
];
const translations = [
"Js/Translations/**"
];
@ -50,7 +47,6 @@ gulp.task('dist', gulp.series(
buildCss,
copyCss
),
buildJson,
buildJsonTranslations,
copyHtml,
copyImages,
@ -117,12 +113,6 @@ 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