Vortex in to new world
How do I make an vortex in to new world?
What is a vortex in to new world? How do you make a vortex in to new world? This script and codes were developed by Liam Catherine on 13 October 2022, Thursday.
Vortex in to new world - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>vortex in to new world</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <canvas></canvas> <script src='https://cdnjs.cloudflare.com/ajax/libs/three.js/r82/three.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.0/TweenMax.min.js'></script>
<script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/127738/perlin.js'></script> <script src="js/index.js"></script>
</body>
</html>
Vortex in to new world - Script Codes CSS Codes
body{ overflow: hidden; margin: 0;
}
Vortex in to new world - Script Codes JS Codes
var ww = window.innerWidth, wh = window.innerHeight;
var torusRadius = 200;
var torusDiameter = 25;
var rings = 180;
var detail = 30;
var renderer = new THREE.WebGLRenderer({ canvas: document.querySelector("canvas"), antialias : true
});
renderer.setSize(ww, wh);
var scene = new THREE.Scene();
scene.fog = new THREE.Fog(0x000000, torusRadius * 0.8, torusRadius * 1.1);
var camera = new THREE.PerspectiveCamera(60, ww / wh, 1, torusRadius * 1.1);
camera.position.set(Math.cos(0) * torusRadius, 0, Math.sin(0) * torusRadius);
var light = new THREE.PointLight(0xffffff, 2, 150);
light.position.set(Math.cos(-Math.PI * 0.3) * torusRadius, 0, Math.sin(-Math.PI * 0.3) * torusRadius);
scene.add(light);
TweenMax.to(light.position, 6, { x : Math.cos(Math.PI * 0.3) * torusRadius, z : Math.sin(Math.PI * 0.3) * torusRadius, ease: Power2.easeInOut, repeat:-1, yoyo :true
});
window.addEventListener("resize", function() { ww = window.innerWidth; wh = window.innerHeight; camera.aspect = ww / wh; camera.updateProjectionMatrix(); renderer.setSize(ww, wh);
});
var mouse = new THREE.Vector2(0,0);
var torus = new THREE.Object3D();
TweenMax.to(torus.rotation, 90,{ y: Math.PI * 2, ease: Linear.easeNone, repeat: -1
});
scene.add(torus);
function createTorus() { var geometry = new THREE.BoxBufferGeometry(2, 2, 2); for (var i = 0; i < rings; i++) { var u = i / rings * Math.PI * 2; var ring = new THREE.Object3D(); ring.position.x = torusRadius * Math.cos(u); ring.position.z = torusRadius * Math.sin(u); var colorIndex = Math.round(Math.abs(noise.simplex2(Math.cos(u) * 0.5, Math.sin(u) * 0.5)) * 180); var color = new THREE.Color("hsl(" + colorIndex + ",50%,50%)"); var material = new THREE.MeshLambertMaterial({ color: color }); for (var j = 0; j < detail; j++) { var v = j / detail * Math.PI * 2; var x = torusDiameter * Math.cos(v) * Math.cos(u); var y = torusDiameter * Math.sin(v); var z = torusDiameter * Math.cos(v) * Math.sin(u); var size = (Math.random() * 5) + 0.1; var cube = new THREE.Mesh(geometry, material); cube.scale.set(size, size, size); cube.position.set(x, y, z); var rotation = (Math.random()-0.5)*Math.PI*4; cube.rotation.set(rotation, rotation, rotation); ring.add(cube); } torus.add(ring); }
}
function render() { requestAnimationFrame(render); camera.lookAt(light.position); renderer.render(scene, camera);
}
createTorus();
requestAnimationFrame(render);
Developer | Liam Catherine |
Username | Bigliam |
Uploaded | October 13, 2022 |
Rating | 3 |
Size | 2,552 Kb |
Views | 14,168 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Homework 1 | 1,462 Kb |
Battle game | 3,592 Kb |
My free robux form | 1,320 Kb |
NoahCode Scenery | 1,857 Kb |
404 | 2,054 Kb |
Work damon | 1,401 Kb |
Rotative Loader | 2,753 Kb |
Codepen | 23,503 Kb |
Roblox | 13,615 Kb |
Free robux | 1,196 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Animated Donut Chart | Jplhomer | 3,808 Kb |
NeeilTimer | Neeilan | 2,836 Kb |
A Pen by Eka Risyana | Risyana | 3,705 Kb |
A Pen by Alex Bergin | Abergin | 3,347 Kb |
Rain Landing in a Pond | Edball | 3,009 Kb |
Pure CSS albums gallery | Renaudtertrais | 2,978 Kb |
Slide out Menu | Rbiggs | 4,936 Kb |
Hamburger Menu Animation | Salmanraza | 2,580 Kb |
Exploding Text | Jjmartucci | 4,749 Kb |
Minimal Material Design Form Input | Koenigsegg1 | 3,076 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!