Bent Hose
How do I make an bent hose?
Baby's first three.js experiment. What is a bent hose? How do you make a bent hose? This script and codes were developed by Matt Popovich on 02 August 2022, Tuesday.
Bent Hose - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Bent Hose</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src='http://cdnjs.cloudflare.com/ajax/libs/three.js/r70/three.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Bent Hose - Script Codes CSS Codes
body { background-color: skyblue; margin: 0px; overflow: hidden;
}
canvas { display: block; width: 100vw; height: 100vh;
}
Bent Hose - Script Codes JS Codes
numShapes = 179;
function init() { var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000); var renderer = new THREE.WebGLRenderer({ alpha: true }); renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement); var shape = []; geometry = new THREE.SphereGeometry(150,0); material = new THREE.MeshPhongMaterial({ color: "rgb(105,255,105)" }); for (i = -numShapes; i < numShapes+1; i++) { shape[i] = new THREE.Mesh( geometry, material ); shape[i].position.set( i*i-550, i*14, i/i*200 ) scene.add(shape[i]); } var light = new THREE.PointLight(0xfca4c5); light.position.set(50,-50,5000); scene.add(light); camera.position.set(0,0,1000); // x y z function render() { requestAnimationFrame( render ); for (i = -numShapes; i < numShapes+1; i++) { shape[i].rotation.x += 0.025; shape[i].rotation.y -= 0.05; shape[i].rotation.y -= 0.01; } renderer.render(scene, camera); } render();
}
init();
Developer | Matt Popovich |
Username | mpopv |
Uploaded | August 02, 2022 |
Rating | 3 |
Size | 2,353 Kb |
Views | 46,552 |
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 |
Fog city night festival | 2,645 Kb |
Space Mono | 2,189 Kb |
Animated Email Signup Form | 5,083 Kb |
Trump Twitter Cover Generator | 852,899 Kb |
Profile CSS | 3,540 Kb |
Visual GIPHY Search | 4,287 Kb |
MoonJS Hello World | 2,142 Kb |
SCSS Grid System | 2,630 Kb |
Polygon-style gradient pull quote | 2,917 Kb |
A Pen by Matt Popovich | 3,349 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 |
CSSOff 2013 Submission | Codewunder | 14,766 Kb |
Voting App - register | MatheusLima92 | 1,948 Kb |
Clock Face Idea | Chrisburnell | 3,196 Kb |
Wikipedia Viewer | Odylic | 2,333 Kb |
Form Labels | Bartuc | 2,717 Kb |
Practice using Wixel | Emnk | 3,057 Kb |
Wikipedia API | Coderpilot | 2,802 Kb |
Shape Outside - Polygon | Stacy | 3,954 Kb |
Mega menu | DimaZubkov | 5,066 Kb |
Process Accordion | Devilskitchen | 31,432 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!