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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!