/*audio ファイル形式取得-------------------------------------------------------------------------------------*/ var audio = new Audio(); var audiotype = audio.canPlayType("audio/mp3")!=""?".mp3": audio.canPlayType("audio/ogg")!=""?".ogg": alert("サンプルボイスが再生できません"); function drawLine(){ var canvas = document.getElementById("myCanvas"); cw =$("#menu").width(); ch =$("#menu").height(); $('#myCanvas').attr('width', cw); $('#myCanvas').attr('height', ch); lsize =$(".link").width()/3; asize =$("#maisyoujyo").width()/2; aip =$('#maisyoujyo').position(); dlp =$('#mdl').position(); map =$('#mmake').position(); hsp =$('#mhs').position(); syp =$('#msystem').position(); hop =$('#mhousing').position(); mop =$('#mmovie').position(); bop =$('#mbou').position(); stp =$('#mstudio').position(); dlcp =$('#mdlc').position(); upp =$('#muploader').position(); if ( ! canvas || ! canvas.getContext ) { return false; } var ctx = canvas.getContext("2d"); ctx.strokeStyle = "#ebe2d7"; ctx.lineWidth = 4; ctx.beginPath(); //ho start ctx.moveTo(hop.left+lsize, hop.top+lsize); //ho to hs ctx.lineTo(hsp.left+lsize, hsp.top+lsize); //hs to mo ctx.lineTo(mop.left+lsize, mop.top+lsize); //mo to bo ctx.lineTo(bop.left+lsize, bop.top+lsize); //bo to dl ctx.lineTo(dlp.left+lsize, dlp.top+lsize); //dl to up ctx.lineTo(upp.left+lsize, upp.top+lsize); //up to ho ctx.lineTo(hop.left+lsize, hop.top+lsize); //ho to sy ctx.lineTo(syp.left+lsize, syp.top+lsize); //sy to dl ctx.lineTo(dlp.left+lsize, dlp.top+lsize); ctx.stroke(); //ai to ctx.beginPath(); ctx.moveTo(aip.left+asize, aip.top+asize); ctx.lineTo(hop.left+lsize, hop.top+lsize); ctx.moveTo(aip.left+asize, aip.top+asize); ctx.lineTo(hsp.left+lsize, hsp.top+lsize); ctx.moveTo(aip.left+asize, aip.top+asize); ctx.lineTo(syp.left+lsize, syp.top+lsize); ctx.moveTo(aip.left+asize, aip.top+asize); ctx.lineTo(dlp.left+lsize, dlp.top+lsize); ctx.moveTo(aip.left+asize, aip.top+asize); ctx.lineTo(mop.left+lsize, mop.top+lsize); ctx.moveTo(aip.left+asize, aip.top+asize); ctx.lineTo(bop.left+lsize, bop.top+lsize); ctx.moveTo(aip.left+asize, aip.top+asize); ctx.lineTo(map.left+lsize, map.top+lsize); ctx.stroke(); //hs to ma sys up ctx.beginPath(); ctx.moveTo(hsp.left+lsize, hsp.top+lsize); ctx.lineTo(map.left+lsize, map.top+lsize); ctx.lineTo(syp.left+lsize, syp.top+lsize); ctx.lineTo(upp.left+lsize, upp.top+lsize); ctx.stroke(); //dl to ctx.beginPath(); ctx.moveTo(dlp.left+lsize, dlp.top+lsize); ctx.lineTo(dlcp.left+lsize, dlcp.top+lsize); ctx.moveTo(dlp.left+lsize, dlp.top+lsize); ctx.lineTo(stp.left+lsize, stp.top+lsize); ctx.stroke(); } $(function(){ /*--------------------------------------------------------------------------------------*/ onload = drawLine; drawLine(); //動作環境 $('#specMenu li b').not('.active').hover( function(){ $(this).fadeTo("slow", 0.9); }, function(){ $(this).fadeTo("slow", 0.75); } ); //ページ内スクロール $('#subtext a').click(function(){ Name=$(this).attr('class'); location.href = "#"+Name; var cclink=$('#'+Name).offset(); if(cclink === void 0){ location.href = "#mainFrame"; Name= "mainFrame"; } position = $('#'+Name).offset().top; $('body,html').animate({scrollTop:position}, 500); }); $('#list ul li:nth-child(1)').css({width:'140px'}); $('#list ul li:nth-child(2)').css({width:'80px'}); $('#list ul li:nth-child(3)').css({width:'120px'}); $('#list ul li:nth-child(4)').css({width:'50px'}); $('#list ul li:nth-child(5)').css({width:'300px'}); $('#list ul li:nth-child(6)').css({width:'100px'}); $('#list ul li:nth-child(7)').css({width:'80px'}); $.fn.flat = function(){ var h = 0; $(this).each(function(){ if( h < $(this).height() ){ h=$(this).height(); } }); $(this).height(h); }; //sample1だけ高さを揃える $('.ResCon li').flat(); $('.ResCon li').hover( function(){ $(this).parent().children().css({backgroundColor:'#512e0e',color: '#fff' }); }, function(){ $(this).parent().children().css({backgroundColor:'#fff',color: '#512e0e' }); } ); $('#specMenub').not('.active').click(function(){ var pass=$(this).attr("alt"); location.href=pass; return false; }); //movie $(document).on("click",".pageMovie", function(){ mid=$(this).data("movie"); dl = new Array(); dl[0] = "dl"; n = Math.floor(Math.random()*dl.length); if(pageAddress == "download2" || pageAddress == "download3"){ pageAddress="download_c" } url ='https://'+dl[n]+'.illusion.rip/preview_contents/aisyoujyo/'+ pageAddress +'/'; if(wsize >= "1100"){ mids= mid; }else{ mids= mid; //mids= mid+"_sp"; } $('.movie').html(``) ; $('#movieFrame').removeClass('dacMovie').addClass('acMovie').delay(600).queue(function() { document.getElementById(mid).currentTime=0; document.getElementById(mid).play(); }); $(".movie video")[0].play(); }); $(document).on("click","#mxCloser , #allCloser",function(){ $("#movieFrame").removeClass('acMovie sss').addClass('dacMovie'); $(".movie video")[0]?.pause(); }); $(document).on("click",".voice",function(){ $(".voice").removeClass("vac"); $(this).addClass("vac"); audio.pause(); charaID = $(this).parents("ul").data("voice"); voiceID = $(this).data("sample"); audio.src='charamake/voice/'+charaID+'/'+voiceID+audiotype; audio.play(); audio.addEventListener("ended", function(e) { $(".voice").removeClass("vac"); }); }); $(document).on("click",".sNex",function(){ page = $('.sImg').data("page"); page++; maxI =$(".sChara").length; if(page >= maxI){ page = 0; } swi = $('.sChara').width(); wsc = page * swi; $('.sImg').animate({scrollLeft:wsc}); $('.sImg').data("page",page); }); $(document).on("click",".sPre",function(){ page = $('.sImg').data("page"); page--; maxI =$(".sChara").length - 1; if(page < 0){ page=maxI; } swi=$('.sChara').width(); wsc=page * swi; $('.sImg').animate({scrollLeft:wsc}); $('.sImg').data("page",page); }); //SS $(document).on("click",".ssList .simg", function(){ imgID=$(this).children("img").data("ino"); $('.movie').html('') ; $('#movieFrame').removeClass('dacMovie').addClass('acMovie sss') }); $(document).on("click","#mNext", function(){ maxiImg = $(".ssList .simg").length; stopID= maxiImg -1; imgID++; if(imgID >= maxiImg){ imgID = 0; } $('.movie').html(``) ; }); $(document).on("click","#mPrev", function(){ maxiImg = $(".ssList .simg").length; maxID= maxiImg -1; imgID--; if(imgID < 0){ imgID=maxID; } $('.movie').html('') ; }); //chart $(document).on("click",".choi b",function(){ page = $(this).data("page"); swi = $('.chaimg').width(); wsc = page * swi; $(this).parents(".chaimg").animate({scrollLeft:wsc}); }); $(document).on("click",".img_top,.img_bot",function(){ $(this).parents(".chaimg").animate({scrollLeft:"0"}); }); $(document).on("click",".dlLink , .dlLinkL", function(){ dlfile = $(this).data("dlid"); location.href ='https://static.illusion.rip/ai_syoujyo/'+ dlfile +'.exe'; }); /*-----------------------------------------------------------------------------------------------------*/ });