Question
Write a simple THREEJS program that displays lines as shown in class. You should use a minimum of 20 lines and try your best to
Write a simple THREEJS program that displays lines as shown in class. You should use a minimum of 20 lines and try your best to spell a word, draw a picture or make some complex shape using only these vectors and some color assignments. Thank you.
Example from class is down below:
````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
Main.js
var renderer = new THREE.WebGLRenderer(); renderer.setSize( window.innerWidth, window.innerHeight ); document.body.appendChild( renderer.domElement ); var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 500 ); camera.position.set( 0, 0, 100 ); camera.lookAt( 0, 0, 0 ); var scene = new THREE.Scene(); var material = new THREE.LineBasicMaterial( { color: 0x0000ff } ); var points = []; points.push( new THREE.Vector3( - 10, 0, 0 ) ); points.push( new THREE.Vector3( 0, 10, 0 ) ); points.push( new THREE.Vector3( 10, 0, 0 ) ); var geometry = new THREE.BufferGeometry().setFromPoints( points ); var line = new THREE.Line( geometry, material ); scene.add( line ); renderer.render( scene, camera );
`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
Index.html
Basic(Feb 24th)
``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started