◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:AVGplayer”的版本间的差异
(更新) |
|||
第2行: | 第2行: | ||
var dollarray = { | var dollarray = { | ||
− | + | "M16(3)":"http://www.gfwiki.org/images/d/db/M16A1_T.png", | |
− | + | "SOPII(3)":"http://www.gfwiki.org/images/3/3d/Pic_M4_SOPMOD_II.png", | |
− | + | "M4A1(2)":"http://www.gfwiki.org/images/4/41/M4A1_SAD.png", | |
− | + | "AR15(2)":"http://www.gfwiki.org/images/3/39/AR15_T.png", | |
− | + | "M4A1(0)":"http://www.gfwiki.org/images/4/4e/Pic_M4A1.png", | |
− | + | "RO635(0)":"http://www.gfwiki.org/images/a/ae/%E5%B0%91%E5%A5%B3%E5%89%8D%E7%BA%BF-RO635.png", | |
− | + | "RO635(4)":"http://www.gfwiki.org/images/c/c8/Pic_RO635_4.png", | |
− | + | ||
− | + | "M1903(10)":"http://www.gfwiki.org/images/5/5e/AVG_pic_M1903_10.png", | |
− | + | "M1903(11)":"http://www.gfwiki.org/images/b/be/AVG_pic_M1903_11.png", | |
− | + | "M1903(12)":"http://www.gfwiki.org/images/7/7e/AVG_pic_M1903_12.png", | |
− | + | "M1903(13)":"http://www.gfwiki.org/images/a/a8/AVG_pic_M1903_13.png", | |
− | + | "G36Mod(0)":"http://www.gfwiki.org/images/d/d8/Pic_G36Mod.png", | |
− | + | "M4 SOPMOD IIMod(0)":"http://www.gfwiki.org/images/7/70/M4_SOPMOD_IIMod.png", | |
− | + | "NPC-Kalin(0)":"http://www.gfwiki.org/images/2/21/Kalina.png", | |
− | + | "NPC-Kalin(1)":"http://www.gfwiki.org/images/a/a5/Kalina_1.png", | |
− | + | "NPC-Kalin(2)":"http://www.gfwiki.org/images/1/15/Kalina_2.png", | |
− | + | "NPC-Kalin(3)":"http://www.gfwiki.org/images/9/95/Kalina_3.png", | |
− | + | "NPC-Kalin(4)":"http://www.gfwiki.org/images/6/67/Kalina_4.png", | |
− | + | "NPC-Kalin(5)":"http://www.gfwiki.org/images/0/0b/Kalina_5.png", | |
− | + | "NPC-Kalin(6)":"http://www.gfwiki.org/images/0/0c/Kalina_6.png", | |
− | + | "NPC-Kalin(7)":"http://www.gfwiki.org/images/1/11/Kalina_7.png", | |
− | + | "NPC-Kalin(8)":"http://www.gfwiki.org/images/2/29/Kalina_8.png", | |
− | + | "NPC-Jason(0)":"http://www.gfwiki.org/images/e/e5/NPC-Jason.png", | |
− | + | "NPC-Helian(0)":"http://www.gfwiki.org/images/4/4b/NPC-Helian.png", | |
− | + | "P22(0)":"http://www.gfwiki.org/images/7/77/Pic_P22.png", | |
− | + | "Lewis(0)":"http://www.gfwiki.org/images/5/5d/Pic_Lewis.png", | |
− | + | }; | |
var bgmarray = { | var bgmarray = { | ||
− | + | "BGM_Battle":"http://www.gfwiki.org/images/f/fa/BGM_Battle.wav", | |
− | + | "BGM_Empty":"", | |
− | + | "BGM_Truth":"http://www.gfwiki.org/images/b/b3/BGM_Truth.wav", | |
− | + | "BGM_Room":"http://www.gfwiki.org/images/c/c2/BGM_Room.wav", | |
− | + | }; | |
var bgarray = { | var bgarray = { | ||
− | + | "8":"http://www.gfwiki.org/images/9/9a/%E4%BD%9C%E6%88%98%E5%AE%A4avg.png", | |
− | + | "9":"http://www.gfwiki.org/images/4/44/BG-none.png", | |
− | + | "15":"http://www.gfwiki.org/images/a/ab/%E5%AE%A4%E5%86%85%E6%88%98%E6%96%97.png", | |
− | + | "82":"http://www.gfwiki.org/images/6/63/BG-Dorm.png", | |
− | + | "85":"http://www.gfwiki.org/images/b/b8/BG_Inner.png", | |
− | + | "160":"http://www.gfwiki.org/images/a/ac/BG-Sanatorium.png", | |
− | + | "166":"http://www.gfwiki.org/images/7/79/BG-Cybercity.png", | |
− | + | "170":"http://www.gfwiki.org/images/c/c6/19WinterCG1.png", | |
+ | }; | ||
var linepos = 0; | var linepos = 0; | ||
var avgtxt = ""; //avg文本 | var avgtxt = ""; //avg文本 | ||
+ | var avgdoll = {left:0,center:0,right:0}; // 当前立绘 | ||
var avgnextline = ""; //当一个场景有多个+台词时 | var avgnextline = ""; //当一个场景有多个+台词时 | ||
第65行: | 第67行: | ||
var blacksign = 0; //黑幕的标志 | var blacksign = 0; //黑幕的标志 | ||
− | + | var loadingfin = {doll:0, bg:0, bgm:0}; | |
+ | var loadingnow = {doll:0, bg:0, bgm:0}; | ||
function avgcreat(){ | function avgcreat(){ | ||
第73行: | 第76行: | ||
<div class="avgchoice" link="http://www.gfwiki.org/images/0/04/AVG-31-1A2-1.txt">幻影的和平 Ⅱ</div> | <div class="avgchoice" link="http://www.gfwiki.org/images/0/04/AVG-31-1A2-1.txt">幻影的和平 Ⅱ</div> | ||
<div class="avgchoice" link="http://www.gfwiki.org/images/6/6a/AVG-44-B0-1.txt">测试2</div>`; | <div class="avgchoice" link="http://www.gfwiki.org/images/6/6a/AVG-44-B0-1.txt">测试2</div>`; | ||
− | + | ||
$("#avgchosebox").html(output); | $("#avgchosebox").html(output); | ||
$(".avgchoice").css({"border":"1px #8886 solid", "padding":"6px 4px"}); | $(".avgchoice").css({"border":"1px #8886 solid", "padding":"6px 4px"}); | ||
第79行: | 第82行: | ||
var xmlhttp = new XMLHttpRequest(); | var xmlhttp = new XMLHttpRequest(); | ||
xmlhttp.onreadystatechange = function() { | xmlhttp.onreadystatechange = function() { | ||
− | if (this.readyState == 4 && this.status == 200) { avgtxt = (this.responseText); readline(); } | + | if (this.readyState == 4 && this.status == 200) { avgtxt = (this.responseText); readline(); firstloading(); } |
}; | }; | ||
xmlhttp.open("GET", $(this).attr("link"), true); | xmlhttp.open("GET", $(this).attr("link"), true); | ||
第86行: | 第89行: | ||
$("#avgbgm").attr("src", ""); | $("#avgbgm").attr("src", ""); | ||
$("#avgbackground").html(""); | $("#avgbackground").html(""); | ||
− | $(" | + | $(".avgdollpic").remove(); |
− | |||
− | |||
− | |||
− | |||
− | |||
linepos = 0; | linepos = 0; | ||
avgnextline = 0; | avgnextline = 0; | ||
第120行: | 第118行: | ||
<div id="avgtobegin" class="avgpushbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">返回开始</div> | <div id="avgtobegin" class="avgpushbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">返回开始</div> | ||
<div id="avgchose" state="off" class="avgpushbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">选择剧情</div> | <div id="avgchose" state="off" class="avgpushbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">选择剧情</div> | ||
+ | <div id="avgload" style="display:inline-block; border-bottom:1px #eaeaea solid; font-size:12px; vertical-align:bottom; margin-left:12px;">加载进度: PIC[0/0] CG[0/0] BGM[0/0]</div> | ||
</div> | </div> | ||
<div id="avgbox" style="width:1200px; height:675px; user-select:none; background-color:#111; border:1px #8888 solid;"> | <div id="avgbox" style="width:1200px; height:675px; user-select:none; background-color:#111; border:1px #8888 solid;"> | ||
<div id="avgbackground" style="position:absolute; width:1200px; height:675px; overflow:hidden; background-color:#111; z-index:1;"></div> | <div id="avgbackground" style="position:absolute; width:1200px; height:675px; overflow:hidden; background-color:#111; z-index:1;"></div> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div id="avgword" style="width:600px; height:120px; position:absolute; top:584px; left:300px; z-index:7; background-image:url(http://www.gfwiki.org/images/3/3e/Avglinebg.png); background-size:7px; border: 1px #8888 solid; box-shadow: 0px 0px 3px #8888;"> | <div id="avgword" style="width:600px; height:120px; position:absolute; top:584px; left:300px; z-index:7; background-image:url(http://www.gfwiki.org/images/3/3e/Avglinebg.png); background-size:7px; border: 1px #8888 solid; box-shadow: 0px 0px 3px #8888;"> | ||
<div id="avgspeaker" style="margin:2px 8px; font-size:120%;"></div> | <div id="avgspeaker" style="margin:2px 8px; font-size:120%;"></div> | ||
第149行: | 第141行: | ||
$(this).css({"border":"1px #eaeaea solid","padding":"5px 10px"}); | $(this).css({"border":"1px #eaeaea solid","padding":"5px 10px"}); | ||
}); | }); | ||
− | + | ||
$(".avgpushbutton").mousedown(function(){ | $(".avgpushbutton").mousedown(function(){ | ||
$(this).css({"background-color":"#f4c430aa","color":"black"}); | $(this).css({"background-color":"#f4c430aa","color":"black"}); | ||
第246行: | 第238行: | ||
//black | //black | ||
if(thisline.indexOf("<黑屏2>") != -1 && blacksign == 0){ | if(thisline.indexOf("<黑屏2>") != -1 && blacksign == 0){ | ||
− | $(" | + | $(".avgdollpic").remove(); |
− | |||
− | |||
$("#avgspeaker").html(""); $("#avgline").html(""); | $("#avgspeaker").html(""); $("#avgline").html(""); | ||
$("#avgbackground").html(""); $("#avgbgm").attr("src", ""); | $("#avgbackground").html(""); $("#avgbgm").attr("src", ""); | ||
− | |||
$("#avgbackground").fadeOut(1000 / autospeed); $("#avgword").fadeOut(1000 / autospeed); | $("#avgbackground").fadeOut(1000 / autospeed); $("#avgword").fadeOut(1000 / autospeed); | ||
blacksign = 1; | blacksign = 1; | ||
第272行: | 第261行: | ||
if(thisline.indexOf("<Speaker>") != -1){ | if(thisline.indexOf("<Speaker>") != -1){ | ||
var avgpicstr = thisline.slice(0, thisline.indexOf("||")); | var avgpicstr = thisline.slice(0, thisline.indexOf("||")); | ||
+ | var newavgdoll = {left:0,center:0,right:0}; | ||
+ | var the_speaker = "center"; | ||
− | if(avgpicstr.indexOf(";") == -1 && avgpicstr.indexOf("()") == -1) | + | // center |
− | + | if(avgpicstr.indexOf(";") == -1 && avgpicstr.indexOf("()") == -1) | |
− | + | newavgdoll.center = avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>")); | |
− | + | // none | |
− | |||
− | |||
− | |||
− | |||
else if(thisline.indexOf(";") == -1 && thisline.indexOf("()") != -1){} | else if(thisline.indexOf(";") == -1 && thisline.indexOf("()") != -1){} | ||
− | else if | + | // speaker = left |
+ | else if(avgpicstr.indexOf("<Speaker>") < avgpicstr.indexOf(";")){ | ||
+ | the_speaker = "left"; | ||
avgpicleft = avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>")); | avgpicleft = avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>")); | ||
avgpicrigh = avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.length); | avgpicrigh = avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.length); | ||
− | + | newavgdoll = {left: avgpicleft,center:0,right: avgpicrigh}; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
+ | // speaker = right | ||
else if(avgpicstr.indexOf("<Speaker>") > avgpicstr.indexOf(";")){ | else if(avgpicstr.indexOf("<Speaker>") > avgpicstr.indexOf(";")){ | ||
+ | the_speaker = "right"; | ||
avgpicleft = avgpicstr.slice(0, avgpicstr.indexOf(";")); | avgpicleft = avgpicstr.slice(0, avgpicstr.indexOf(";")); | ||
avgpicrigh = avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.indexOf("<Speaker>")); | avgpicrigh = avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.indexOf("<Speaker>")); | ||
− | + | newavgdoll = {left: avgpicleft,center:0,right: avgpicrigh}; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | + | ||
− | + | if(newavgdoll == avgdoll) {} | |
− | $("# | + | else if(newavgdoll == {left:0,center:0,right:0}) { |
− | + | $(".avgdollpic").fadeOut(150); | |
− | + | setTimeout(function(){ $(".avgdollpic").remove();}, 150); | |
− | + | } else { | |
− | + | let telemask = `<div class="telemaskdiv" style="background-image:url(http://www.gfwiki.org/images/3/38/Telephonebg.png); position:absolute; top:37px; left:262px; width:264px; height:382px; background-size:5px; opacity:0.6; border:8px double #eaeaea;"></div>`; | |
+ | let darkmask_a = `<div class="darkmask" style="position:absolute; top:0px; width:800px; height:800px; -webkit-mask-image:url(`; | ||
+ | let darkmask_b = `); overflow:hidden; background-color:#0008; -webkit-mask-size:cover; display:none;"></div>`; | ||
+ | |||
+ | if(newavgdoll.center != 0){ | ||
+ | let target_name = newavgdoll.center.slice(0, newavgdoll.center.indexOf("(")); | ||
+ | let avgdoll_div = document.querySelectorAll(".avgdollpic"); | ||
+ | let cen_sign = 1; | ||
+ | |||
+ | for(let i = 0; i < avgdoll_div.length; i++){ | ||
+ | let this_name = $(avgdoll_div[i]).attr("name-data").slice(0, $(avgdoll_div[i]).attr("name-data").indexOf("(")); | ||
+ | if(target_name == this_name){ | ||
+ | cen_sign = 0; | ||
+ | $(avgdoll_div[i]).css({"z-index":"6"}); | ||
+ | $(avgdoll_div[i]).animate({"left":"200px"}, 300); | ||
+ | if($(avgdoll_div[i]).children(".darkmask")){ | ||
+ | $(avgdoll_div[i]).children(".darkmask").fadeOut(150); | ||
+ | $(avgdoll_div[i]).children(".darkmask").remove(); | ||
+ | } | ||
+ | if($(avgdoll_div[i]).attr("name-data") != newavgdoll.center){ | ||
+ | setTimeout(function(){ | ||
+ | $(avgdoll_div[i]).attr("name-data", newavgdoll.center); | ||
+ | $(avgdoll_div[i]).children("img").attr("src", dollarray[newavgdoll.center]); | ||
+ | }, 300); | ||
+ | } | ||
+ | } else { | ||
+ | $(avgdoll_div[i]).fadeOut(150); | ||
+ | setTimeout(function(){ $(avgdoll_div[i]).remove();}, 150); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | if(cen_sign){ | ||
+ | setTimeout(function(){ | ||
+ | let the_center = `<div class="avgdollpic" name-data="` + newavgdoll.center + `" style="width:800px; height:555px; position:absolute; top:180px; left:200px; overflow:hidden; z-index:6; display:none;">` | ||
+ | the_center += `<img src="` + dollarray[newavgdoll.center] + `" style="width:800px; overflow:hidden; `; | ||
+ | if((avgpicstr.indexOf("<通讯框>") != -1) && (avgpicstr.indexOf("<通讯框>") > avgpicstr.indexOf(";"))){ | ||
+ | the_center += `background-color:#12131d; -webkit-mask-image:url(http://www.gfwiki.org/images/d/d0/Mask.png);"/>` + telemask + `</div>`; | ||
+ | } else the_center += `"/></div>`; | ||
+ | $("#avgbox").append(the_center); | ||
+ | $(".avgdollpic").fadeIn(150); | ||
+ | }, 150); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | if(newavgdoll.left != 0 && newavgdoll.right != 0){ | ||
+ | let left_name = newavgdoll.left.slice(0, newavgdoll.left.indexOf("(")); | ||
+ | let right_name = newavgdoll.right.slice(0, newavgdoll.right.indexOf("(")); | ||
+ | let avgdoll_div = document.querySelectorAll(".avgdollpic"); | ||
+ | let left_sign = 1, right_sign = 1; | ||
+ | |||
+ | for(let i = 0; i < avgdoll_div.length; i++){ | ||
+ | let this_name = $(avgdoll_div[i]).attr("name-data").slice(0, $(avgdoll_div[i]).attr("name-data").indexOf("(")); | ||
+ | if(left_name == this_name){ | ||
+ | left_sign = 0; | ||
+ | $(avgdoll_div[i]).animate({"left":"20px"}, 300); | ||
+ | $(avgdoll_div[i]).css({"z-index":((the_speaker == "left") ? "4" : "2")}); | ||
+ | |||
+ | if($(avgdoll_div[i]).children(".telemaskdiv").length){ | ||
+ | } else if($(avgdoll_div[i]).children(".darkmask") && (the_speaker == "left")){ | ||
+ | $(avgdoll_div[i]).children(".darkmask").fadeOut(150); | ||
+ | $(avgdoll_div[i]).children(".darkmask").remove(); | ||
+ | } else if(!($(avgdoll_div[i]).children(".darkmask").length) && the_speaker == "right"){ | ||
+ | let darkmask = darkmask_a + dollarray[newavgdoll.left] + darkmask_b; | ||
+ | $(avgdoll_div[i]).append(darkmask); | ||
+ | $(".darkmask").fadeIn(300); | ||
+ | } | ||
+ | |||
+ | if($(avgdoll_div[i]).attr("name-data") != newavgdoll.left){ | ||
+ | setTimeout(function(){ | ||
+ | $(avgdoll_div[i]).attr("name-data", newavgdoll.left); | ||
+ | $(avgdoll_div[i]).children("img").attr("src", dollarray[newavgdoll.left]); | ||
+ | }, 150); | ||
+ | } | ||
+ | } else if(right_name == this_name){ | ||
+ | right_sign = 0; | ||
+ | $(avgdoll_div[i]).animate({"left":"380px"}, 300); | ||
+ | $(avgdoll_div[i]).css({"z-index":((the_speaker == "right") ? "4" : "2")}); | ||
+ | |||
+ | if($(avgdoll_div[i]).children(".telemaskdiv").length){ | ||
+ | } else if($(avgdoll_div[i]).children(".darkmask") && (the_speaker == "right")){ | ||
+ | $(avgdoll_div[i]).children(".darkmask").fadeOut(150); | ||
+ | $(avgdoll_div[i]).children(".darkmask").remove(); | ||
+ | } else if(!($(avgdoll_div[i]).children(".darkmask").length) && the_speaker == "left"){ | ||
+ | let darkmask = darkmask_a + dollarray[newavgdoll.right] + darkmask_b; | ||
+ | $(avgdoll_div[i]).append(darkmask); | ||
+ | $(".darkmask").fadeIn(300); | ||
+ | } | ||
+ | |||
+ | if($(avgdoll_div[i]).attr("name-data") != newavgdoll.right){ | ||
+ | setTimeout(function(){ | ||
+ | $(avgdoll_div[i]).attr("name-data", newavgdoll.right); | ||
+ | $(avgdoll_div[i]).children("img").attr("src", dollarray[newavgdoll.right]); | ||
+ | }, 150); | ||
+ | } | ||
+ | } else { | ||
+ | $(avgdoll_div[i]).fadeOut(150); | ||
+ | setTimeout(function(){ $(avgdoll_div[i]).remove();}, 150); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | if(left_sign){ | ||
+ | setTimeout(function(){ | ||
+ | let the_left = `<div class="avgdollpic" name-data="` + newavgdoll.left + `" style="width:800px; height:555px; position:absolute; top:180px; left:20px; overflow:hidden; z-index:` + ((the_speaker == "left") ? "4" : "2") + `;">` | ||
+ | the_left += `<img src="` + dollarray[newavgdoll.left] + `" style="width:800px; overflow:hidden; `; | ||
+ | if((avgpicstr.indexOf("<通讯框>") != -1) && (avgpicstr.indexOf("<通讯框>") < avgpicstr.indexOf(";"))){ | ||
+ | the_left += `background-color:#12131d; -webkit-mask-image:url(http://www.gfwiki.org/images/d/d0/Mask.png);"/>` + telemask + `</div>`; | ||
+ | } else the_left += `"/></div>`; | ||
+ | $("#avgbox").append(the_left); | ||
+ | $(".avgdollpic").fadeIn(150); | ||
+ | }, 150); | ||
+ | } | ||
+ | if(right_sign){ | ||
+ | setTimeout(function(){ | ||
+ | let the_right = `<div class="avgdollpic" name-data="` + newavgdoll.right + `" style="width:800px; height:555px; position:absolute; top:180px; left:380px; overflow:hidden; z-index:` + ((the_speaker == "right") ? "4" : "2") + `;">` | ||
+ | the_right += `<img src="` + dollarray[newavgdoll.right] + `" style="width:800px; overflow:hidden; `; | ||
+ | if((avgpicstr.indexOf("<通讯框>") != -1) && (avgpicstr.indexOf("<通讯框>") > avgpicstr.indexOf(";"))){ | ||
+ | the_right += `background-color:#12131d; -webkit-mask-image:url(http://www.gfwiki.org/images/d/d0/Mask.png);"/>` + telemask + `</div>`; | ||
+ | } else the_right += `"/></div>`; | ||
+ | $("#avgbox").append(the_right); | ||
+ | $(".avgdollpic").fadeIn(150); | ||
+ | }, 150); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | avgdoll = newavgdoll; | ||
+ | } else { | ||
+ | $(".avgdollpic").fadeOut(150); | ||
+ | setTimeout(function(){ $(".avgdollpic").remove();}, 150); | ||
} | } | ||
第316行: | 第423行: | ||
if(thisline.indexOf("<Speaker>") != -1){ | if(thisline.indexOf("<Speaker>") != -1){ | ||
var speaker = thisline.slice(thisline.indexOf("<Speaker>") + ("<Speaker>").length , thisline.indexOf("</Speaker>")); | var speaker = thisline.slice(thisline.indexOf("<Speaker>") + ("<Speaker>").length , thisline.indexOf("</Speaker>")); | ||
− | setTimeout(function(){ $("#avgspeaker").html(speaker); }, | + | setTimeout(function(){ $("#avgspeaker").html(speaker); }, 300); |
} | } | ||
− | else setTimeout(function(){ $("#avgspeaker").html(" "); }, | + | else setTimeout(function(){ $("#avgspeaker").html(" "); }, 300); |
//word line | //word line | ||
第326行: | 第433行: | ||
var fontcolor = (printwordstr.indexOf("color") == -1) ? "#EAEAEA" : printwordstr.slice(7, 14); | var fontcolor = (printwordstr.indexOf("color") == -1) ? "#EAEAEA" : printwordstr.slice(7, 14); | ||
− | $("#avgword").fadeOut( | + | $("#avgword").fadeOut(300); |
− | setTimeout(function(){ $("#avgline").html(""); $("#avgword").fadeIn( | + | setTimeout(function(){ $("#avgline").html(""); $("#avgword").fadeIn(300);}, 300); |
− | setTimeout(function(){ printword(); $("#avgline").css("color", fontcolor);}, | + | setTimeout(function(){ printword(); $("#avgline").css("color", fontcolor);}, 400); |
if(printwordstr.indexOf("color") != -1) printwordstr = printwordstr.slice("<color=#00CCFF>".length, printwordstr.indexOf("</color>")); | if(printwordstr.indexOf("color") != -1) printwordstr = printwordstr.slice("<color=#00CCFF>".length, printwordstr.indexOf("</color>")); | ||
printwordnum = 1; | printwordnum = 1; | ||
第334行: | 第441行: | ||
if((thisline.indexOf("+") != -1)) avgnextline = thisline.slice(thisline.indexOf("+") + 1, thisline.length); | if((thisline.indexOf("+") != -1)) avgnextline = thisline.slice(thisline.indexOf("+") + 1, thisline.length); | ||
} else { | } else { | ||
− | $("#avgword").fadeOut( | + | $("#avgword").fadeOut(300); |
− | setTimeout(function(){ $("#avgline").html(""); $("#avgword").fadeIn( | + | setTimeout(function(){ $("#avgline").html(""); $("#avgword").fadeIn(300);}, 300); |
} | } | ||
if(blacksign == 1){ | if(blacksign == 1){ | ||
− | $(" | + | $(".avgdollpic").fadeIn(3200 / autospeed); $("#avgbackground").fadeIn(2000 / autospeed); $("#avgword").fadeIn(4000 / autospeed); |
− | |||
blacksign = 0; | blacksign = 0; | ||
} | } | ||
第366行: | 第472行: | ||
var logline = 1; | var logline = 1; | ||
var output = ``; | var output = ``; | ||
+ | |||
while(1){ | while(1){ | ||
var thisline = (avgtxt.indexOf("\n", logpos) == -1) ? avgtxt.slice(logpos, avgtxt.length) : avgtxt.slice(logpos, avgtxt.indexOf("\n", logpos)); | var thisline = (avgtxt.indexOf("\n", logpos) == -1) ? avgtxt.slice(logpos, avgtxt.length) : avgtxt.slice(logpos, avgtxt.indexOf("\n", logpos)); | ||
− | output += `<div style="border:1px #8886 solid; padding:6px 4px;"><table style="width:100%;"><tr> | + | output += `<div style="border:1px #8886 solid; padding:6px 4px;"><table style="width:100%;"><tr><td avgpos="` + logpos + `"`; |
− | + | if(thisline.indexOf("<黑屏2>") != -1) output += ` class="avglogtd" style="background-color: #eaeaeaaa; color:black; cursor:alias;`; | |
+ | else output += ` style="background-color: inherit; color:inherit;`; | ||
+ | output += `width:5%; text-align:center; vertical-align:baseline;">` + logline + `</td>`; | ||
output += `<td style="width:15%; text-align:center; vertical-align:baseline;">` + ((thisline.indexOf("<Speaker>") != -1) ? thisline.slice(thisline.indexOf("<Speaker>") + ("<Speaker>").length , thisline.indexOf("</Speaker>")) : ""); | output += `<td style="width:15%; text-align:center; vertical-align:baseline;">` + ((thisline.indexOf("<Speaker>") != -1) ? thisline.slice(thisline.indexOf("<Speaker>") + ("<Speaker>").length , thisline.indexOf("</Speaker>")) : ""); | ||
output += `</td><td style="width:80%; vertical-align:baseline;">` + thisline.slice(thisline.indexOf(":") + 1, thisline.length).replace(/\+/g, "<br>") + `</td></tr></table></div>`; | output += `</td><td style="width:80%; vertical-align:baseline;">` + thisline.slice(thisline.indexOf(":") + 1, thisline.length).replace(/\+/g, "<br>") + `</td></tr></table></div>`; | ||
− | + | ||
if(avgtxt.indexOf("\n", logpos) == -1) break; | if(avgtxt.indexOf("\n", logpos) == -1) break; | ||
logpos = avgtxt.indexOf("\n", logpos) + 1; | logpos = avgtxt.indexOf("\n", logpos) + 1; | ||
第386行: | 第495行: | ||
readline(); | readline(); | ||
}); | }); | ||
− | + | } | |
− | + | ||
− | }); | + | function firstloading(){ |
− | + | loadingfin = {doll:0, bg:0, bgm:0}; | |
− | $( | + | loadingnow = {doll:0, bg:0, bgm:0}; |
− | } | + | |
+ | var logpos = 0; | ||
+ | var loading = {doll:[], bg:[], bgm:[]}; | ||
+ | |||
+ | while(1){ | ||
+ | var thisline = (avgtxt.indexOf("\n", logpos) == -1) ? avgtxt.slice(logpos, avgtxt.length) : avgtxt.slice(logpos, avgtxt.indexOf("\n", logpos)); | ||
+ | |||
+ | if(thisline.indexOf("<Speaker>") != -1){ | ||
+ | let avgpicstr = thisline.slice(0, thisline.indexOf("||")); | ||
+ | let newavgdoll = []; | ||
+ | if(avgpicstr.indexOf(";") == -1 && avgpicstr.indexOf("()") == -1){ | ||
+ | newavgdoll.push(avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>"))); | ||
+ | } else if(thisline.indexOf(";") == -1 && thisline.indexOf("()") != -1){ | ||
+ | } else if(avgpicstr.indexOf("<Speaker>") < avgpicstr.indexOf(";")){ | ||
+ | newavgdoll.push(avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>"))); | ||
+ | newavgdoll.push(avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.length)); | ||
+ | } else if(avgpicstr.indexOf("<Speaker>") > avgpicstr.indexOf(";")){ | ||
+ | newavgdoll.push(avgpicstr.slice(0, avgpicstr.indexOf(";"))); | ||
+ | newavgdoll.push(avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.indexOf("<Speaker>"))); | ||
+ | } | ||
+ | |||
+ | for(let i = 0; i < newavgdoll.length; i++){ | ||
+ | let sign = 1; | ||
+ | for(let j = 0; j < loading.doll.length; j++){ | ||
+ | if(newavgdoll[i] == loading.doll[j]){ sign = 0; break; } | ||
+ | } if(sign) loading.doll.push(newavgdoll[i]); | ||
+ | } | ||
+ | } | ||
+ | if(thisline.indexOf("<BGM>") != -1){ | ||
+ | let sign = 1; | ||
+ | let a = thisline.slice(thisline.indexOf("<BGM>") + ("<BGM>").length, thisline.indexOf("</BGM>")); | ||
+ | for(let i = 0; i < loading.bgm.length; i++){ | ||
+ | if(a == loading.bgm[i]){ sign = 0; break; } | ||
+ | } if(sign) loading.bgm.push(a); | ||
+ | } | ||
+ | if(thisline.indexOf("<BIN>") != -1){ | ||
+ | let sign = 1; | ||
+ | let a = thisline.slice(thisline.indexOf("<BIN>") + ("<BIN>").length, thisline.indexOf("</BIN>")); | ||
+ | for(let i = 0; i < loading.bg.length; i++){ | ||
+ | if(a == loading.bg[i]){ sign = 0; break; } | ||
+ | } if(sign) loading.bg.push(a); | ||
+ | } | ||
+ | |||
+ | if(avgtxt.indexOf("\n", logpos) == -1) break; | ||
+ | logpos = avgtxt.indexOf("\n", logpos) + 1; | ||
+ | } | ||
+ | |||
+ | console.log(loading); | ||
+ | loadingfin.doll = loading.doll.length; | ||
+ | loadingfin.bg = loading.bg.length; | ||
+ | loadingfin.bgm = loading.bgm.length; | ||
+ | $("#avgload").html("加载进度: PIC[" + loadingnow.doll + "/" + loadingfin.doll + "] CG[" + loadingnow.bg + "/" + loadingfin.bg + "] BGM[" + loadingnow.bgm + "/" + loadingfin.bgm + "]"); | ||
+ | |||
+ | for(i in loading.doll){ | ||
+ | var img = new Image(); | ||
+ | $(img).load(function(){ | ||
+ | loadingnow.doll ++; | ||
+ | $("#avgload").html("加载进度: PIC[" + loadingnow.doll + "/" + loadingfin.doll + "] CG[" + loadingnow.bg + "/" + loadingfin.bg + "] BGM[" + loadingnow.bgm + "/" + loadingfin.bgm + "]"); | ||
+ | $(this).remove(); | ||
+ | }); | ||
+ | $(img).attr("src", dollarray[loading.doll[i]]); | ||
+ | } | ||
+ | for(i in loading.bg){ | ||
+ | var img = new Image(); | ||
+ | $(img).load(function(){ | ||
+ | loadingnow.bg ++; | ||
+ | $("#avgload").html("加载进度: PIC[" + loadingnow.doll + "/" + loadingfin.doll + "] CG[" + loadingnow.bg + "/" + loadingfin.bg + "] BGM[" + loadingnow.bgm + "/" + loadingfin.bgm + "]"); | ||
+ | $(this).remove(); | ||
+ | }); | ||
+ | $(img).attr("src", bgarray[loading.bg[i]]); | ||
+ | } | ||
+ | for(i in loading.bgm){ | ||
+ | var audio = new Audio(); | ||
+ | $(audio).load(function(){ | ||
+ | loadingnow.bgm ++; | ||
+ | $("#avgload").html("加载进度: PIC[" + loadingnow.doll + "/" + loadingfin.doll + "] CG[" + loadingnow.bg + "/" + loadingfin.bg + "] BGM[" + loadingnow.bgm + "/" + loadingfin.bgm + "]"); | ||
+ | $(this).remove(); | ||
+ | }); | ||
+ | $(audio).attr({"src":bgmarray[loading.bgm[i]], "preload":"preload", "controls":"controls"}); | ||
+ | } | ||
} | } | ||
})</script></includeonly><noinclude>{{#Widget:AVGplayer}}</noinclude> | })</script></includeonly><noinclude>{{#Widget:AVGplayer}}</noinclude> |
2021年2月17日 (三) 01:12的版本
{{剧情模拟器剧情导航}} {{#Widget:AssembledPlotOptions|title=七周年祝贺|json=AVG_Anniversary_7}} {{#Widget:AVGplayer/css}} {{#Widget:AVGplayer/js}} {{#Widget:AssembledPlotOptions/common}}