// Cloned by test on 4 Jun 2021 from World "New World" by Stephen ninety eight
// Please leave this clone trail here.
var scene = new THREE.Scene();
var aspectRatio = 400/500;
var camera = new THREE.PerspectiveCamera(75,aspectRatio,1,4000);
var renderer = new THREE.WebGLRenderer({antialias:true});
renderer.setSize(400,500);
renderer.setClearColor("#000000");
document.body.appendChild(renderer.domElement);
camera.position.z = 60;
camera.position.y = 3;
var pointLight = new THREE.PointLight( "#A905FA", 60, 100 );
pointLight.position.set( 0,0, 50 );
scene.add(pointLight);
var pointLight2 = new THREE.PointLight( "#08FAA0", 40, 100 );
pointLight2.position.set( 0,0, -60 );
scene.add(pointLight2);
var cantidad = 60;
var shapes = [];
for (var i = 0; i < cantidad; i++) {
if(Math.random()<0.1){
var geometry = new THREE.RingGeometry( 6, 50, 8 );
}else{
var geometry = new THREE.RingGeometry( 4, 60, 9 );
}
if(i%7===0){
var material = new THREE.MeshPhongMaterial( { color: "#ffgfff"} );
}else if(i%2===0){
var material = new THREE.MeshPhongMaterial( { color: "#666555"} );
}else{
var material = new THREE.MeshPhongMaterial( { color: "#333444"} );
}
var mesh = new THREE.Mesh(geometry,material);
mesh.position.z = -i*2;
mesh.rotation.z=i;
shapes.push(mesh);
scene.add(mesh);
}
var u_time = 0;
var render = function(){
requestAnimationFrame(render);
u_time++;
for (var i = 0; i < cantidad; i++) {
shapes[i].position.z+=0.2;
shapes[i].rotation.z+=0.02;
shapes[i].scale.x=1+Math.sin(i+u_time*0.1)*0.2;
shapes[i].scale.y=1+Math.sin(i+u_time*0.1)*0.337;
var valor = 0.5 + Math.sin(u_time*0.05)*0.5;
if(Math.random()<valor){
shapes[i].material.wireframe = true;
shapes[i].material.wireframeLinewidth = Math.random()*3;
}else{
shapes[i].material.wireframe = false;
}
if(shapes[i].position.z>10){
shapes[i].position.z = -70;
shapes[i].rotation.z=i;
}
}
pointLight.intensity = Math.abs(Math.sin(u_time*1)*2);
pointLight2.intensity = Math.abs(Math.cos(u_time*5)*2);
pointLight.position.z = Math.abs(Math.sin(u_time*0.1)*30);
pointLight2.position.z = Math.abs(Math.cos(u_time*0.3)*30);
renderer.render(scene,camera);
AB.hideRunHeader();
}
render();