1var sctop = 0; 2var sctop_sw = false; 3var index_sw = false; 4var sp_sw = false; 5var thisMission = false; 6var str = location.href; 7 8$(function () { 9 resize_int(); 10 $("#container").before('<div id="bg_box"></div>'); 11 if ($(".ttl_svg").hasClass("index_logo")) { 12 $(".index_logo").text(""); 13 $(".index_logo").append( 14 '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 595.28 60.97"><defs><style>.cls-1{fill:red;}</style></defs><g id="ã¬ã¤ã¤ã¼_2" data-name="ã¬ã¤ã¤ã¼ 2"><g id="ã¬ã¤ã¤ã¼_1-2" data-name="ã¬ã¤ã¤ã¼ 1"><polygon class="cls-1" points="0 59.76 45.67 59.76 45.67 48.3 12.71 48.3 12.71 36.01 39.31 36.01 39.31 24.55 12.71 24.55 12.71 12.67 45.67 12.67 45.67 1.21 0 1.21 0 59.76"/><polygon class="cls-1" points="104.89 37.26 77.46 1.21 65.58 1.21 65.58 59.76 78.3 59.76 78.3 22.54 106.65 59.76 117.6 59.76 117.6 1.21 104.89 1.21 104.89 37.26"/><polygon class="cls-1" points="137.63 59.76 183.3 59.76 183.3 48.3 150.35 48.3 150.35 36.01 176.95 36.01 176.95 24.55 150.35 24.55 150.35 12.67 183.3 12.67 183.3 1.21 137.63 1.21 137.63 59.76"/><path class="cls-1" id="c" d="M240.79,30.49A17.76,17.76,0,0,1,210.47,43l-9,9a30.49,30.49,0,1,0,0-43.11l9,9a17.76,17.76,0,0,1,30.32,12.56"/><polygon class="cls-1" points="308.74 24.55 282.14 24.55 282.14 1.21 269.43 1.21 269.43 59.76 282.14 59.76 282.14 36.01 308.74 36.01 308.74 59.76 321.45 59.76 321.45 1.21 308.74 1.21 308.74 24.55"/><path class="cls-1" d="M358.34,1.21,337,59.76h12.71l4.47-12.29h21l4.47,12.29h12.71L371,1.21Zm0,34.79,6.31-17.33L371,36Z"/><polygon class="cls-1" points="447.25 37.26 419.81 1.21 407.94 1.21 407.94 59.76 420.65 59.76 420.65 22.54 449 59.76 459.96 59.76 459.96 1.21 447.25 1.21 447.25 37.26"/><path class="cls-1" d="M506.83,24.55V36H520v6.38a17.74,17.74,0,1,1-.6-24.45l9-9h0a30.49,30.49,0,1,0,4.34,37.61h0v-22Z"/><polygon class="cls-1" points="595.28 12.67 595.28 1.21 549.61 1.21 549.61 59.76 595.28 59.76 595.28 48.3 562.32 48.3 562.32 36.01 588.92 36.01 588.92 24.55 562.32 24.55 562.32 12.67 595.28 12.67"/></g></g></svg>' 15 ); 16 17 if ($(".ttl_svg").hasClass("index_")) { 18 index_sw = true; 19 } else { 20 optime = 0; 21 y_pos = -95; 22 if (winW < 640) { 23 sp_sw = true; 24 y_pos = -90; 25 } 26 } 27 } 28 if (!index_sw && winW < 640) { 29 y_pos = -90; 30 } 31 $(window).load(function () { 32 sctop = $(window).scrollTop(); 33 $(window).scroll(function () { 34 sctop = $(window).scrollTop(); 35 if (sctop > winH / 3) { 36 if (!sctop_sw) $("#bg_box").css({ opacity: 0.5 }); 37 sctop_sw = true; 38 } else { 39 if (sctop_sw) $("#bg_box").css({ opacity: 1 }); 40 sctop_sw = false; 41 } 42 }); 43 resize_int(); 44 45 if ( 46 str.indexOf("recruit") !== -1 || 47 str.indexOf("mission") !== -1 || 48 str.indexOf("story") !== -1 || 49 str.indexOf("business") !== -1 || 50 str.indexOf("sustainability") !== -1 || 51 index_sw 52 ) { 53 intro(); 54 } 55 }); 56}); 57 58var winW, winH; 59var resize_arr = []; 60function resize_int() { 61 resize_arr.push(resize_fun); 62 resize(); 63 $(window).resize(function (event) { 64 resize(); 65 }); 66} 67function resize() { 68 for (var i = 0; i < resize_arr.length; i++) { 69 resize_arr[i](); 70 } 71} 72 73var resize_fun = function () { 74 winW = $(window).width(); 75 winH = $(window).height(); 76 $("#bg_box").height(winH); 77}; 78 79var optime = 2800; 80 81function intro() { 82 var delay = 0.8; 83 84 init3d(); 85 makeParticles(); 86 loop_frame(); 87 88 TweenLite.to($("#logo svg"), 0, { scale: 0.8, x: -55 }); 89 90 $("#logo .cls-1").each(function (index, el) { 91 TweenLite.to($(this), 1.2, { 92 delay: delay + index * 0.05, 93 opacity: 1, 94 ease: Cubic.easenOut, 95 }); 96 }); 97 98 TweenMax.to($("#logo #c"), 0.5, { 99 delay: 1 + delay, 100 ease: Power2.easeIn, 101 scaleX: -1, 102 transformOrigin: "50% 50%", 103 }); 104 TweenMax.to($("#logo #c"), 0.6, { 105 delay: 1.5 + delay, 106 scaleX: 1, 107 ease: Power2.easeOut, 108 transformOrigin: "50% 50%", 109 }); 110 TweenLite.to($("#main .txt"), 1.3, { 111 opacity: 1, 112 delay: 1.5 + delay, 113 ease: Cubic.easenInOut, 114 }); 115 116 setTimeout(function () { 117 TweenLite.to($("canvas"), 4.5, { opacity: 0.99, ease: Cubic.easenInOut }); 118 }, optime); 119} 120 121var particles, 122 particleSystem, 123 camera, 124 scene, 125 renderer, 126 geometry, 127 controls, 128 group_geometry, 129 group_ptcl,
130 group_l, 131 group_s, 132 group_p, 133 group_b; 134 135var camera_2, scene_2, renderer_2; 136 137var width = window.innerWidth; 138var height = window.innerHeight; 139 140var a_vertices = []; 141var a_faces = []; 142 143function init3d() { 144 //ã«ã¡ã©,ã¬ã³ãã¼,ã·ã¼ã³ã®ã»ãã 145 camera = new THREE.PerspectiveCamera(50, width / height, 1, 4000); 146 scene = new THREE.Scene(); 147 148 scene.add(camera); 149 150 TweenMax.ticker.fps(24); 151 TweenLite.ticker.fps(24); 152 153 /* 154camera.position.set( 0, 100, 0); 155camera.rotation.x = -1.5 156*/ 157 camera.position.set(0, 6.123233995736766, 100); 158 if (winW < 640) { 159 camera.position.set(0, 6.123233995736766, 105); 160 } 161 //camera.rotation.x = -0.8 162 163 renderer = new THREE.WebGLRenderer(); 164 renderer.setSize(width, height); 165 renderer.setClearColor(0xffffff, 1.0); 166 167 if (thisMission) { 168 renderer_2 = new THREE.WebGLRenderer(); 169 renderer_2.setSize(width, height); 170 renderer_2.setClearColor(0xffffff, 1.0); 171 renderer_2.setPixelRatio(1); 172 } 173 /* 174if(renderer_gl.indexOf("Intel")){ 175 console.log("????") 176} 177*/ 178 renderer.setPixelRatio(1); 179 if (thisMission) { 180 $(".group .photo1").append(renderer.domElement); 181 $("#bg_box").append(renderer_2.domElement); 182 } else { 183 $("#bg_box").append(renderer.domElement); 184 } 185 186 // 187 188 //ã³ã³ããã¼ã©ã¼ 189 //controls = new THREE.OrbitControls(camera); 190 191 if (index_sw) { 192 camera.rotation.set(6.123233995736766, 0, 0); 193 } else { 194 if (str.indexOf("mission") !== -1) { 195 camera.position.z = 120; 196 camera.position.x = 20; 197 camera.position.y = 10; 198 camera.rotation.set(6.123233995736766, 0, 0.4); 199 } else if (str.indexOf("story") !== -1) { 200 camera.rotation.set(5.523233995736766, 0, 0); 201 camera.position.z = 80; 202 camera.position.y = 50; 203 } else if (str.indexOf("business") !== -1) { 204 camera.rotation.set(6.123233995736766, 6, -1); 205 camera.position.z = 80; 206 camera.position.y = 5; 207 } else { 208 camera.rotation.set(6.123233995736766, 0, 0.4); 209 } 210 } 211 212 group_geometry = new THREE.Group(); 213 group_ptcl = new THREE.Group(); 214 group_l = new THREE.Group(); 215 group_s = new THREE.Group(); 216 group_p = new THREE.Group(); 217 group_b = new THREE.Group(); 218 219 var resize_3d = function (event) { 220 if (thisMission) { 221 var fhw = Math.floor($(".group .photo1").height()); 222 if (winW < 640) { 223 renderer.setSize(fhw * 2, fhw * 2); 224 renderer_2.setSize(winW * 2, winW * 2); 225 camera.aspect = 1; //Math.floor(fhw/ fhw) 226 camera.updateProjectionMatrix(); 227 228 $(".group .photo1 canvas") 229 .attr("width", fhw * 2) 230 .attr("height", fhw * 2) 231 .height(fhw) 232 .width(fhw); 233 $(".group .photo1 canvas").css({ position: "inherit" }); 234 $("#bg_box canvas") 235 .attr("width", winW * 2) 236 .attr("height", winW * 2) 237 .height(winW) 238 .width(winW); 239 } else { 240 renderer.setSize(fhw, fhw); 241 renderer_2.setSize(winW, winW); 242 camera.aspect = 1; //Math.floor(fhw/ fhw) 243 camera.updateProjectionMatrix(); 244 245 $(".group .photo1 canvas") 246 .attr("width", fhw) 247 .attr("height", fhw) 248 .height(fhw) 249 .width(fhw); 250 $(".group .photo1 canvas").css({ position: "inherit" }); 251 $("#bg_box canvas") 252 .attr("width", winW) 253 .attr("height", winW) 254 .height(winW) 255 .width(winW); 256 } 257 } else { 258 if (winW < 640) { 259 renderer.setSize(winW * 2, winH * 2); 260 $("#bg_box canvas") 261 .attr("width", winW * 2) 262 .attr("height", winH * 2) 263 .height(winH) 264 .width(winW); 265 } else { 266 renderer.setSize(winW, winH); 267 $("#bg_box canvas") 268 .attr("width", winW) 269 .attr("height", winH) 270 .height(winH) 271 .width(winW); 272 } 273 274 camera.aspect = winW / winH; 275 camera.updateProjectionMatrix(); 276 } 277 }; 278 279 if (thisMission) { 280 y_pos = 0; 281 camera.rotation.set(0, 0, 0); 282 camera.position.set(0, 0, 170); 283 284 var fhw = Math.floor($(".group .photo1").height()); 285 if (winW < 640) { 286 $(".group .photo1 canvas") 287 .attr("width", fhw * 2) 288 .attr("height", fhw * 2) 289 .height(fhw) 290 .width(fhw); 291 $(".group .photo1 canvas").css({ position: "inherit" }); 292 } else { 293 $(".group .photo1 canvas") 294 .attr("width", fhw) 295 .attr("height", fhw) 296 .height(fhw) 297 .width(fhw); 298 $(".group .photo1 canvas").css({ position: "inherit" }); 299 } 300 } 301 resize_3d(); 302 resize_arr.push(resize_3d); 303} 304 305var mesh; 306var wireMesh; 307var bg_ptcl = []; 308var material; 309var y_pos = -120; 310function makeParticles() { 311 var geometry_s = new THREE.SphereGeometry(110, 40, 40); 312 var material = new THREE.MeshBasicMaterial({ 313 opacity: 0.2, 314 color: 0xcfcfcf, 315 wireframe: true, 316 }); 317 var sphere = new THREE.Mesh(geometry_s, material); 318 319 group_s.position.y = y_pos; 320 //group_s.add(sphere) 321 322 var geometry_l = new THREE.SphereGeometry(111, 40, 40); 323 var material = new THREE.MeshBasicMaterial({ 324 opacity: 0.2, 325 color: 0xcfcfcf, 326 wireframe: true, 327 }); 328 var sphere = new THREE.Mesh(geometry_l, material); 329 330 group_l.position.y = y_pos; 331 // group_l.add(sphere) 332 333 var material_line = new THREE.LineBasicMaterial({ 334 color: 0xff6666, 335 }); 336 337 var material_line_g = new THREE.LineBasicMaterial({ 338 color: 0xcccccc, 339 }); 340 341 var imageData1 = 342 "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAHlBMVEX////4+PnFwsitqLCqpa2SjJaloKiUjpj19PW/u8GvS+GnAAAALUlEQVR4AWNg
342VHYSYBAOS/dgUDU2jmQwM3FOYXADEkCucyWDSFh6BgPHFM8GAJB1CFekZ7zyAAAAAElFTkSuQmCC"; 343 var imageData2 = 344 "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAARklEQVR4AWP4//cvCHV3/9fW/i8n9z8v7/+LF0ARsIS//38GBjgCqXj7luH/okVADhoC6mP47+eHKQE0E6cETqNwWo7TuQBFbWPFJbkrrwAAAABJRU5ErkJggg=="; 345 346 var img_m_g = new THREE.ImageUtils.loadTexture(imageData1); 347 var img_m_r = new THREE.ImageUtils.loadTexture(imageData2); 348 349 var material_g = new THREE.SpriteMaterial({ 350 transparent: true, 351 opacity: 0.5, 352 map: img_m_g, 353 }); 354 355 var material_r = new THREE.SpriteMaterial({ 356 transparent: true, 357 opacity: 0.5, 358 map: img_m_r, 359 }); 360 361 var pnum = 3000; 362 if (thisMission) { 363 pnum = 500; 364 } 365 //çç¶ã®ç¹THREE.ImageUtils.loadTexture('texture.png') 366 //loader.load('red.png', function(texture) {}) 367 var ll = []; 368 var ls = []; 369 var la = []; 370 371 for (var i = 0; i < pnum; i++) { 372 var rad = Math.random() * 10 - 5; 373 var rad2 = Math.random() * 10 - 5; 374 var r = 110; 375 if (thisMission) r = 62; 376 377 var rgr = Math.random(); 378 if (rgr < 0.8) { 379 var mesh = new THREE.Sprite(material_g); 380 } else { 381 var mesh = new THREE.Sprite(material_r); 382 } 383 mesh.scale.set(0.5, 0.5); 384 mesh.position.x = Math.cos(rad) * Math.cos(rad2) * r; 385 mesh.position.y = Math.cos(rad) * Math.sin(rad2) * r; 386 mesh.position.z = Math.sin(rad) * r; 387 ls.push({ 388 x: Math.cos(rad) * Math.cos(rad2) * r, 389 y: Math.cos(rad) * Math.sin(rad2) * r, 390 z: Math.sin(rad) * r, 391 }); 392 ll.push({ 393 x: Math.cos(rad) * Math.cos(rad2) * r + 1, 394 y: Math.cos(rad) * Math.sin(rad2) * r + 1, 395 z: Math.sin(rad) * r + 1, 396 }); 397 398 if (mesh.position.y > 80 || thisMission) { 399 if (Math.random() < 0.15) { 400 //ã°ã©ãç· 401 var geometry_graf = new THREE.Geometry(); 402 var ran_y = 1.05 + Math.random() * 0.15; 403 404 geometry_graf.vertices.push( 405 new THREE.Vector3(ll[i].x * ran_y, ll[i].y * ran_y, ll[i].z * ran_y), 406 new THREE.Vector3(mesh.position.x, mesh.position.y, mesh.position.z) 407 ); 408 409 la.push({ x: ls[i].x, y: ls[i].y, z: ls[i].z }); 410 411 var line = new THREE.Line(geometry_graf, material_line); 412 413 group_ptcl.add(line); 414 } else { 415 //ç¹ã®æå 416 if (mesh.position.y > 60 || thisMission) group_p.add(mesh); 417 } 418 } 419 } 420 group_p.position.y = y_pos; 421 var line_ran = []; 422 //ã°ã©ãç·ã¢ãã¡ã¼ã·ã§ã³ 423 for (var i = 0; i < group_ptcl.children.length; i++) { 424 var x_ = group_ptcl.children[i].geometry.vertices[0].x; 425 var y_ = group_ptcl.children[i].geometry.vertices[0].y; 426 var z_ = group_ptcl.children[i].geometry.vertices[0].z; 427 var x__ = group_ptcl.children[i].geometry.vertices[1].x; 428 var y__ = group_ptcl.children[i].geometry.vertices[1].y; 429 var z__ = group_ptcl.children[i].geometry.vertices[1].z; 430 431 /* var r = 1+((Math.random()*0.1)-0.05); 432 var r2 = 1+((Math.random()*0.1)-0.05); 433*/ 434 435 var r = Math.random() * 5; 436 var r2 = 1 + -(Math.random() * 0.1); 437 line_ran.push(r); 438 TweenLite.to(group_ptcl.children[i].geometry.vertices[0], 0, { 439 x: x__, 440 y: y__, 441 z: z__, 442 }); 443 TweenLite.to(group_ptcl.children[i].geometry.vertices[1], 0.5, { 444 delay: 3.2 + r, 445 x: x_, 446 y: y_, 447 z: z_, 448 }); 449 TweenLite.to(group_ptcl.children[i].geometry.vertices[0], 1, { 450 delay: 2.2 + r, 451 x: x_, 452 y: y_, 453 z: z_, 454 }); 455 TweenLite.to(group_ptcl.children[i].geometry.vertices[1], 0, { 456 delay: 4.2 + r, 457 x: x__, 458 y: y__, 459 z: z__, 460 }); 461 TweenLite.to(group_ptcl.children[i].geometry.vertices[0], 0, { 462 delay: 4.2 + r, 463 x: x__, 464 y: y__, 465 z: z__, 466 }); 467 468 var t = new TimelineMax({ repeat: -1, delay: 3 + r }); 469 t.to(group_ptcl.children[i].geometry.vertices[0], 1, { 470 delay: 3, 471 x: x__ + 0.05, 472 y: y__ + 0.05, 473 z: z__ + 0.05, 474 }); 475 t.to(group_ptcl.children[i].geometry.vertices[0], 1, { 476 delay: 3, 477 x: x_, 478 y: y_,
479 z: z_, 480 }); 481 t.to(group_ptcl.children[i].geometry.vertices[1], 0.5, { 482 x: x_, 483 y: y_, 484 z: z_, 485 }); 486 } 487 488 group_ptcl.position.y = y_pos; 489 //éä¿¡ç· 490 var line_num = []; 491 for (var i = 0; i < ls.length - 1; i++) { 492 var ran = Math.floor(Math.random() * geometry_l.vertices.length - 1); 493 var geometry = new THREE.Geometry(); 494 var ran_y = 1 + Math.random() * 0.2; 495 var x_ = ls[i].x; 496 var y_ = ls[i].y; 497 var z_ = ls[i].z; 498 499 if (y_ > 80 || thisMission) { 500 for (var p = 0; p < la.length - 1; p++) { 501 var x__ = la[p].x; 502 var y__ = la[p].y; 503 var z__ = la[p].z; 504 if ( 505 x_ - x__ < 10 && 506 x_ - x__ > -10 && 507 z_ - z__ < 10 && 508 z_ - z__ > -10 && 509 y_ - y__ < 10 && 510 y_ - y__ > -10 511 ) { 512 geometry.vertices.push( 513 new THREE.Vector3(x_, y_, z_), 514 new THREE.Vector3(x__, y__, z__) 515 ); 516 line_num.push(p); 517 var line = new THREE.Line(geometry, material_line_g); 518 519 group_b.add(line); 520 break; 521 } 522 } 523 } 524 } 525 526 for (var i = 0; i < group_b.children.length; i++) { 527 var x_ = group_b.children[i].geometry.vertices[1].x; 528 var y_ = group_b.children[i].geometry.vertices[1].y; 529 var z_ = group_b.children[i].geometry.vertices[1].z; 530 531 var x__ = group_b.children[i].geometry.vertices[0].x; 532 var y__ = group_b.children[i].geometry.vertices[0].y; 533 var z__ = group_b.children[i].geometry.vertices[0].z; 534 TweenMax.to(group_b.children[i].geometry.vertices[1], 0, { 535 x: x__, 536 y: y__, 537 z: z__, 538 }); 539 // 540 541 var t2 = new TimelineMax({ delay: 1.2 + line_ran[line_num[i]] }); 542 t2.to(group_b.children[i].geometry.vertices[0], 1, { x: x_, y: y_, z: z_ }); 543 t2.to(group_b.children[i].geometry.vertices[1], 1, { x: x_, y: y_, z: z_ }); 544 545 var t = new TimelineMax({ repeat: -1, delay: 3 + line_ran[line_num[i]] }); 546 t.to(group_b.children[i].geometry.vertices[0], 1, { 547 delay: 3, 548 x: x__, 549 y: y__, 550 z: z__, 551 }); 552 t.to(group_b.children[i].geometry.vertices[1], 1, { 553 x: x__, 554 y: y__, 555 z: z__, 556 }); 557 558 t.to(group_b.children[i].geometry.vertices[0], 1, { 559 delay: 1, 560 x: x_, 561 y: y_, 562 z: z_, 563 }); 564 t.to(group_b.children[i].geometry.vertices[1], 1, { x: x_, y: y_, z: z_ }); 565 t.to(group_b.children[i].geometry.vertices[1], 0.5, { 566 x: x_, 567 y: y_, 568 z: z_, 569 }); 570 } 571 572 group_b.position.y = y_pos; 573 574 //å転 575 var group_rotate = function () { 576 group_ptcl.rotation.y += 0.002; 577 group_s.rotation.y += 0.002; 578 group_p.rotation.y += 0.002; 579 group_b.rotation.y += 0.002; 580 //group_l.rotation.y +=0.002 581 for (var i = 0; i < group_b.children.length; i++) { 582 group_b.children[i].geometry.verticesNeedUpdate = true; 583 } 584 for (var i = 0; i < group_ptcl.children.length; i++) { 585 group_ptcl.children[i].geometry.verticesNeedUpdate = true; 586 } 587 }; 588 589 enter_anim.push(group_rotate); 590 scene.add(group_p); 591 scene.add(group_l); 592 scene.add(group_s); 593 scene.add(group_b); 594 scene.add(group_ptcl); 595 scene.fog = new THREE.Fog(0xffffff, 50, 250); 596 //make_para() 597 598 enter_arr.push(render); 599} 600 601let frame = 0; 602 603var render = function () { 604 //controls.update(); 605 frame++; 606 if (frame % 2 == 0) { 607 return; 608 } 609 if (thisMission) renderer_2.render(scene, camera); 610 renderer.render(scene, camera); 611}; 612 613var enter_arr = []; 614var enter_anim = []; 615function loop_frame() { 616 for (var i = 0; i < enter_arr.length; i++) { 617 enter_arr[i](); 618 } 619 for (var i = 0; i < enter_anim.length; i++) { 620 enter_anim[i](); 621 } 622 623 requestAnimationFrame(loop_frame); 624} 625var motion_obj; 626 627function make_para() { 628 // ãã©ã¡ã¼ã¿ã¼è¨ç½® 629 var gui = new dat.GUI(); 630 motion_obj = new motion_ctr(); 631 var folder = gui.addFolder("MotionCtrl"); 632 folder.add(motion_obj, "radius", 1, 20).onChange(set_val); 633 set_val(); 634} 635 636//GUIãã©ã¡ã¼ã¿ã®æºå 637var motion_ctr = function () { 638 this.radius = 5; 639}; 640 641function set_val() {} 642 643/* ---------------------------------------------------------------------------------- 644ã¡ã¤ã³ãã¸ã¥ã¢ã«èæ¯åç» 645---------------------------------------------------------------------------------- */ 646if ($(".js_mainvisVideo").length) { 647 var $mainvisVideoBlock = $(".js_mainvisVideoBlock"); 648 var $mainvisVideo = $(".js_mainvisVideo"); 649 var $headerNav = $(".nav-fixed"); 650 var $mainvisLogo = $(".js_mainvisLogo"); 651 var $mainvisTxt = $(".js_mainvisTxt"); 652 var videoPlayClass = "is_videoPlay"; 653 var videoEndClass = "is_videoEnd"; 654 var video = document.getElementById("js_mainvisVideoId"); 655
656 //ã¦ã£ã³ãã¦ã®å¹ ã®æ¯çã«ãã£ã¦ã¯ã©ã¹ãä»ä¸ 657 function bgSize() { 658 const videoRatio = 1920 / 1080; //åç»ã®ã¢ã¹ãã¯ãæ¯ 659 const bgWidth = $(window).width(); 660 const bgHeight = $(window).height(); 661 if (bgHeight > bgWidth / videoRatio) { 662 $mainvisVideo.addClass("is_height_100per"); 663 } else { 664 $mainvisVideo.addClass("is_width_100per"); 665 } 666 } 667 668 $(function () { 669 //ãã¼ãæã«ã¦ã£ã³ãã¦å¹ ã調ã¹ãã¯ã©ã¹ãä»ä¸ 670 bgSize(); 671 $mainvisVideoBlock.fadeIn(3000); 672 video.play(); 673 }); 674 675 //ãªãµã¤ãºæã«ã¯ã©ã¹ãä¸åº¦åé¤ããã¦ã£ã³ãã¦å¹ ã調ã¹ãã¯ã©ã¹ãä»ä¸ 676 $(window).on("resize", function () { 677 $mainvisVideo.removeClass("is_height_100per is_width_100per"); 678 bgSize(); 679 }); 680 681 //åç»åçä¸ã¯ãããã¼ã«ã¯ã©ã¹ä»ä¸ 682 video.addEventListener("play", function () { 683 $headerNav.addClass(videoPlayClass); 684 }); 685 686 //åç»çµäºããããããã¼ããã¯ã©ã¹åé¤ããããªãã§ã¼ãã¢ã¦ã 687 video.addEventListener("ended", function () { 688 $headerNav.removeClass(videoPlayClass); 689 $mainvisLogo.addClass(videoEndClass); 690 setTimeout(function () { 691 $mainvisTxt.addClass(videoEndClass); 692 }, 1000); 693 $mainvisVideoBlock.fadeOut(3000); 694 }); 695}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.