/*! 2018-07-13 */
function init(){camera=new THREE.PerspectiveCamera(40,window.innerWidth/window.innerHeight,1,1e4),camera.position.z=3e3,scene=new THREE.Scene,tableLine_odd=new THREE.Scene,tableLine_even=new THREE.Scene;for(var a=0;a<table.length;a++){var b=document.createElement("div");b.className="element";var c=document.createElement("img");c.src=table[a].src,c.setAttribute("bowtie",""),c.setAttribute("company",""),c.setAttribute("name",table[a].nick_name),c.setAttribute("text",""),c.setAttribute("imgId",""),b.appendChild(c);var d=new THREE.CSS3DObject(b);d.position.x=4e3*Math.random()-2e3,d.position.y=4e3*Math.random()-2e3,d.position.z=4e3*Math.random()-2e3,scene.add(d),objects.push(d);var d=new THREE.Object3D;d.position.z=-3e4,targets.table.push(d)}for(var e=new THREE.Vector3,a=0,f=objects.length;a<f;a++){var d=new THREE.Object3D;d.position.x=1200*Math.cos(-a),d.position.y=1200*Math.sin(-a),d.position.z=200-60*a*1.5,d.rotation.z=.03*-a,d.lookAt(e),targets.torus.push(d)}for(var e=new THREE.Vector3,a=0,f=objects.length;a<f;a++){var g=new THREE.Object3D;g.position.x=a%5*400-800,g.position.y=-Math.floor(a/5)%5*400+800,g.position.z=1e3*Math.floor(a/25)-2e3,e.x=g.position.x,e.y=g.position.y,e.z=g.position.z,g.lookAt(e),targets.grid.push(g)}for(var e=new THREE.Vector3,a=0,f=objects.length;a<f;a++){if(0==a)var h=1.025*Math.acos(2*a/f-1),i=Math.sqrt(f*Math.PI)*h*1.01;else var h=Math.acos(2*a/f-1),i=Math.sqrt(f*Math.PI)*h;var d=new THREE.Object3D;d.position.x=750*Math.cos(i)*Math.sin(h),d.position.y=750*Math.sin(i)*Math.sin(h),d.position.z=750*Math.cos(h),e.copy(d.position).multiplyScalar(2),d.lookAt(e),targets.sphere.push(d)}for(var e=new THREE.Vector3,a=0,f=objects.length;a<f;a++){var h=.175*a+Math.PI,d=new THREE.Object3D;d.position.x=900*Math.sin(h),d.position.y=-8*a+450,d.position.z=900*Math.cos(h),e.x=2*d.position.x,e.y=d.position.y,e.z=2*d.position.z,d.lookAt(e),targets.helix.push(d)}renderer=new THREE.CSS3DRenderer,renderer.setSize(window.innerWidth,window.innerHeight),renderer.domElement.style.position="absolute",renderer.domElement.className="abc",document.getElementById("container").appendChild(renderer.domElement),window.addEventListener("resize",onWindowResize,!1)}function transform(a,b,c,d){TWEEN.removeAll(),scene_init(),animate_start=0;for(var e=0;e<objects.length;e++){var f=objects[e],g=a[e];new TWEEN.Tween(f.position).to({x:g.position.x,y:g.position.y,z:g.position.z},Math.random()*b+b).easing(TWEEN.Easing.Exponential.InOut).start(),"table"==c?new TWEEN.Tween(f.position).to({x:g.position.x,z:-1e4},1e3*Math.random()+2e3).delay(1e3*Math.random()+7800).start():"torus"==c?new TWEEN.Tween(f.position).to({z:-3e5},1e3*Math.random()+3e3).delay(1e3*Math.random()+24500).start():"sphere"==c?new TWEEN.Tween(f.position).to({y:-5e3},1e3*Math.random()+3e3).delay(23500).start():"grid"==c?new TWEEN.Tween(f.position).to({x:g.position.x,y:g.position.y,z:g.position.z},2e3*Math.random()+2e3).delay(1e3*Math.random()+19500).start():"helix"==c&&new TWEEN.Tween(f.position).to({y:3e3,z:g.position.z},1e3*Math.random()+2e3).delay(1e3*Math.random()+18500).start(),new TWEEN.Tween(f.rotation).to({x:g.rotation.x,y:g.rotation.y,z:g.rotation.z},Math.random()*b+b).easing(TWEEN.Easing.Exponential.InOut).start()}new TWEEN.Tween(this).to({},b*d/2).onUpdate(function(){render(c)}).start()}function onWindowResize(){camera.aspect=window.innerWidth/window.innerHeight,camera.updateProjectionMatrix(),renderer.setSize(window.innerWidth,window.innerHeight),render()}function animate(){window.requestAnimationFrame(animate),TWEEN.update()}function scene_init(){scene.position.x=0,scene.position.y=0,scene.position.z=0,scene.rotation.x=0,scene.rotation.y=0,scene.rotation.z=0}function update(){for(var a=0;a<objects.length;a++){var b=objects[a];b.position.z+=20,b.rotation.z+=1*a/1e3,b.position.z>800&&(b.position.z=200-60*(objects.length-1)*1.5)}}function render(a){"torus"==a&&(animate_start+=1,scene.rotation.z+=.008,animate_start>300&&update()),"grid"==a&&(animate_start+=1,scene.rotation.y-=.01,animate_start>600?scene.position.z>0&&(scene.position.z-=7):animate_start>300?scene.position.z=scene.position.z:animate_start>150&&(scene.position.z+=7)),"sphere"==a&&(animate_start+=1,animate_start>1600?scene.position.z>0&&(scene.rotation.y+=.008,scene.position.z-=7):animate_start>550?(scene.rotation.y+=.003,scene.position.z=scene.position.z):animate_start>350?(scene.rotation.y+=.008,scene.position.z+=7):scene.rotation.y+=.008),"helix"==a&&(animate_start+=1,scene.rotation.y-=.01,animate_start>600?scene.position.z>0&&(scene.position.z-=7):animate_start>300?scene.position.z=scene.position.z:animate_start>150&&(scene.position.z+=7)),renderer.render(scene,camera)}var camera,scene,renderer,controls,objects=[],targets={table:[],torus:[],sphere:[],helix:[],grid:[]},style="table",rotationY_add=0,animate_start=0;