THREE js

Size
1,955 Kb
Views
34,408

How do I make an three js?

What is a three js? How do you make a three js? This script and codes were developed by Nikita Zubarets on 12 September 2022, Monday.

THREE js Previews

THREE js - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>THREE js</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="https://threejs.org/build/three.min.js"></script>
<div id="wrap"></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

THREE js - Script Codes CSS Codes

#wrap{ background: #000; width: 400px; height: 300px;
}

THREE js - Script Codes JS Codes

var width = 400, height = 300;
var view_angle = 45, aspect = width / height, near = 0.1, far = 10000;
var wrap = $("#wrap");
//CAMERA
var renderer = new THREE.WebGLRenderer(), camera = new THREE.PerspectiveCamera(view_angle, aspect, near, far), scene = new THREE.Scene();
camera.position.z = 300;
renderer.setSize(width, height);
wrap.append(renderer.domElement);
//SPHERE
var sphereMaterial = new THREE.MeshLambertMaterial({color: 0xFFFFFF}), radius = 80, segments = 16, rings = 16, sphere = new THREE.Mesh(new THREE.SphereGeometry(radius, segments, rings), sphereMaterial);
scene.add(sphere);
scene.add(camera);
//LIGHT
var pointLight = new THREE.PointLight(0xFADAA0);
pointLight.position.x = 10;
pointLight.position.y = 50;
pointLight.position.z = 150;
scene.add(pointLight);
renderer.render(scene, camera);
THREE js - Script Codes
THREE js - Script Codes
Home Page Home
Developer Nikita Zubarets
Username snapson
Uploaded September 12, 2022
Rating 3
Size 1,955 Kb
Views 34,408
Do you need developer help for THREE js?

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!

Nikita Zubarets (snapson) Script Codes
Create amazing sales emails 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!