Vortex in to new world

Size
2,552 Kb
Views
14,168

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 Previews

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);
Vortex in to new world - Script Codes
Vortex in to new world - Script Codes
Home Page Home
Developer Liam Catherine
Username Bigliam
Uploaded October 13, 2022
Rating 3
Size 2,552 Kb
Views 14,168
Do you need developer help for Vortex in to new world?

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!

Liam Catherine (Bigliam) Script Codes
Name
Homework 1
Battle game
My free robux form
NoahCode Scenery
404
Work damon
Rotative Loader
Codepen
Roblox
Free robux
Create amazing captions with AI!

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!