Bent Hose

Developer
Size
2,353 Kb
Views
46,552

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 Previews

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();
Bent Hose - Script Codes
Bent Hose - Script Codes
Home Page Home
Developer Matt Popovich
Username mpopv
Uploaded August 02, 2022
Rating 3
Size 2,353 Kb
Views 46,552
Do you need developer help for Bent Hose?

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!

Matt Popovich (mpopv) Script Codes
Create amazing Facebook ads 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!