Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final project finished. #255

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
ad7ab01
Create CS460_Assignment_01__Copy_.pdf
Sep 9, 2019
38a505c
Merge branch 'master' of https://github.com/bostongfx/cs460student
Sep 9, 2019
35dd565
Add files via upload
nolan123456789 Sep 11, 2019
aafd6fd
assignment 2
nolan123456789 Sep 16, 2019
aec8eb7
Delete CS460_Assignment_02__Copy_.pdf
nolan123456789 Sep 16, 2019
a1d8123
Add files via upload
nolan123456789 Sep 16, 2019
0dbdae7
Update index.html
Sep 16, 2019
e7649ce
Merge branch 'master' of https://github.com/nolan123456789/cs460student
Sep 16, 2019
2ea0d41
Merge branch 'master' of https://github.com/bostongfx/cs460student
Sep 16, 2019
a09a7ef
Merge branch 'master' of https://github.com/bostongfx/cs460student
Sep 16, 2019
8b7fa88
Create index.html
Sep 18, 2019
40672e9
Update index.html
Sep 23, 2019
e730d9e
Update index.html
Sep 23, 2019
128cc09
Merge branch 'master' of https://github.com/bostongfx/cs460student
Sep 23, 2019
2afbcb5
Create index.html
Sep 23, 2019
7eed6c0
Update index.html
Sep 24, 2019
43f74db
Update index.html
Sep 24, 2019
1b43d95
Add files via upload
nolan123456789 Sep 24, 2019
878a89c
Update index.html
Sep 24, 2019
a2e71f7
Merge branch 'master' of https://github.com/nolan123456789/cs460student
Sep 24, 2019
0052041
Merge branch 'master' of https://github.com/nolan123456789/cs460student
Sep 24, 2019
988a40b
Update index.html
Sep 25, 2019
87c84c9
Update index.html
Sep 25, 2019
ecbd26a
Merge branch 'master' of https://github.com/bostongfx/cs460student
Oct 2, 2019
2e43cf9
Add files via upload
nolan123456789 Oct 3, 2019
02c62c0
Add files via upload
nolan123456789 Oct 3, 2019
0007ded
Add files via upload
nolan123456789 Oct 3, 2019
6d86697
Update index.html
Oct 11, 2019
154294e
Update index.html
Oct 11, 2019
3952408
Update README.md
Oct 11, 2019
6b676fb
Create CS460_Assignment_04__Copy_.pdf
Oct 11, 2019
d218773
Update index.html
Oct 11, 2019
e80a049
Create index.html
Oct 11, 2019
c4cfeff
Update index.html
Oct 12, 2019
59ce085
Update index.html
Oct 12, 2019
824d3b1
Update index.html
Oct 12, 2019
5f5ce4e
Add files via upload
nolan123456789 Oct 12, 2019
5d10e63
Merge branch 'master' of https://github.com/bostongfx/cs460student
Oct 21, 2019
e4dccdf
Update index.html
Oct 28, 2019
152f88b
Create rebot.js
Oct 28, 2019
ff30282
Create robot.js
Oct 28, 2019
74e35f2
Update index.html
Oct 28, 2019
014a377
Delete rebot.js
Oct 28, 2019
17874c8
Update robot.js
Oct 29, 2019
b03cc1a
Update index.html
Oct 29, 2019
518a7da
Update robot.js
Oct 29, 2019
4993f06
Update index.html
Oct 29, 2019
60d34e9
Add files via upload
nolan123456789 Oct 29, 2019
26d3aea
Merge branch 'master' of https://github.com/bostongfx/cs460student
Nov 4, 2019
cdf371e
Create robot.js
Nov 12, 2019
33c76c3
Create index.html
Nov 12, 2019
a5097df
Create music1.mp3
Nov 12, 2019
f5530a8
Update index.html
Nov 12, 2019
eff14a0
Add files via upload
nolan123456789 Nov 12, 2019
56bed35
Update index.html
Nov 16, 2019
34e4a8d
Create CS460_Assignment_07__Copy_ (2).pdf
Nov 16, 2019
2c78b6b
Create helper.js
Nov 16, 2019
1cf6671
Create index.html
Nov 16, 2019
b94a163
Create marble.jpg
Nov 16, 2019
7142fa5
Create music1.mp3
Nov 16, 2019
d445325
Create robot.js
Nov 16, 2019
d34f9eb
Create sky.jpg
Nov 16, 2019
98b69b6
Update index.html
Nov 17, 2019
2e364b3
Update robot.js
Nov 17, 2019
c003338
Add files via upload
nolan123456789 Nov 17, 2019
04c398c
Merge branch 'master' of https://github.com/bostongfx/cs460student
Nov 27, 2019
20e2719
Update index.html
Nov 27, 2019
4c055f1
Add files via upload
nolan123456789 Nov 27, 2019
7421c46
Add files via upload
nolan123456789 Nov 27, 2019
7eee951
Delete CS460_Assignment_09__Copy_.pdf
Nov 27, 2019
b03103c
Create dolphim.gltf
Dec 3, 2019
e37f99a
Update gltf.py
Dec 3, 2019
57928b9
Create dolphim123.gltf
Dec 3, 2019
84856dd
Create dolphim.ply
Dec 3, 2019
58e8554
Create CS460_Assignment_10__Copy_.pdf
Dec 3, 2019
53048b5
Add files via upload
nolan123456789 Dec 21, 2019
8a880bc
Add files via upload
nolan123456789 Dec 21, 2019
6685de1
Delete CS460_Final_Project_Report__Copy_.pdf
nolan123456789 Dec 21, 2019
b28ea9a
Delete CS460_Assignment_10__Copy_.pdf
nolan123456789 Dec 21, 2019
a5a5e1f
Delete base64.js
nolan123456789 Dec 21, 2019
580d223
Delete dolphim.ply
nolan123456789 Dec 21, 2019
69e81c4
Add files via upload
nolan123456789 Dec 21, 2019
0f11ae5
Delete index.html
nolan123456789 Dec 21, 2019
2f35d7d
Delete dolphim.gltf
nolan123456789 Dec 21, 2019
cf7abc5
Delete dolphim123.gltf
nolan123456789 Dec 21, 2019
e5ed53a
Delete OrbitControls.js
nolan123456789 Dec 21, 2019
78fed62
Delete gltf.py
nolan123456789 Dec 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 01/CS460_Assignment_01__Copy_.pdf
Binary file not shown.
Binary file added 02/CS460_Assignment_02__Copy_ (1).pdf
Binary file not shown.
126 changes: 126 additions & 0 deletions 02/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>CS460 Assignment 2</title>
<style>
body {
background-color: black;
color: white; /* font color */
font-family: sans-serif;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden !important;
}

#logo {
position: absolute;
right: 10px;
top: 10px;
}
</style>

<script type="text/javascript" src="http://get.goXTK.com/xtk_edge.js"></script>

<script type="text/javascript">

window.onload = function() {

// this gets called when the site is ready

// create a new scene and renderer
r = new X.renderer3D();
r.init();

for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 0 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
if (x>1&&x<5)
r.add(c)
}
for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 5 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
if (x==3)
c.color=[255,0,0]
if(x>0&&x<6)
r.add(c)
}
for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 10 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
r.add(c)
}
for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 15 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
r.add(c)
}
for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 20 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
if(x==1||x==2||x==4||x==5)
c.color=[0,0,255]
r.add(c)
}
for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 25 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
r.add(c)
}
for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 30 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
if(x<2||x>4)
r.add(c)
}
for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 35 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
if(x<1||x>5)
r.add(c)
}

setInterval(function(){
for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 20 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
if(x==1||x==2||x==4||x==5)
c.color=[255,255,255]
r.add(c)
}},1000);
setInterval(function(){
for(var x = 0; x < 7; x++){
c = new X.cube();
c.center =[x * 5, 20 , 0];
c.lengthX= c.lengthY = c.lengthZ = 4;
if(x==1||x==2||x==4||x==5)
c.color=[0,0,255]
r.add(c)
}},2000);

// set camera further away!
r.camera.position = [0, 0, 100];

// render everything!
r.render();

};

</script>
</head>
<body>
<h1>CS460 Assignment 2</h1>
<div id="logo"><img style="height:60px" src="gfx/cs460.png"></div>
</body>
</html>
Binary file added 03/CS460_Assignment_03__Copy_.pdf
Binary file not shown.
139 changes: 139 additions & 0 deletions 03/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<html>
<head>
<meta charset="UTF-8" />
<style>
html, body {
background-color:#000;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden !important;
}
</style>
<script src="https://threejs.org/build/three.min.js" type="text/javascript"></script>
<script src="https://threejs.org/examples/js/controls/TrackballControls.js" type="text/javascript"></script>
<script>
window.onload = function() {
scene = new THREE.Scene();
fov = 75;
ratio = window.innerWidth / window.innerHeight;
zNear = 1;
zFar = 10000;
// console.log(ratio);
camera = new THREE.PerspectiveCamera(fov, ratio, zNear, zFar);
camera.position.set( 0, 0, 100);
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );

ambientLight = new THREE.AmbientLight();
scene.add( ambientLight );
light = new THREE.DirectionalLight( 0xffffff, 5.0 );
light.position.set( 10, 100, 10 );
scene.add( light );
// now we add the cube
// geometry = new THREE.BoxBufferGeometry( 20, 20, 20);
// material = new THREE.MeshStandardMaterial({ color: 0xffffff });
// cube = new THREE.Mesh( geometry, material);
// scene.add(cube);
//
// The invisible plane
//
geometry = new THREE.PlaneBufferGeometry( 10000, 10000 );
material = new THREE.MeshBasicMaterial( {
visible: false
});
invisible_plane = new THREE.Mesh( geometry, material );
scene.add( invisible_plane );
//
//
//
controls = new THREE.TrackballControls( camera );
animate();
//
// ACTION!
//
var count = 0;
renderer.domElement.onmousemove = function(e) {
if (!e.shiftKey) {
e.preventDefault();
return false;
}
var a = Math.floor(Math.random()*Math.floor(6));

switch(a){
case 0:
var geometry = new THREE.BoxBufferGeometry( 5, 5, 5 );
var material = new THREE.MeshBasicMaterial( {color: 0x30a9de} );
var cube = new THREE.Mesh( geometry, material );
scene.add( cube );
break;
case 1:
var geometry = new THREE.TorusBufferGeometry( 10, 3, 16, 100 );
var material = new THREE.MeshBasicMaterial( { color: 0x30a9de } );
var cube = new THREE.Mesh( geometry, material );
scene.add( cube );
break;
case 2:
var x = 0, y = 0;
var heartShape = new THREE.Shape();
heartShape.moveTo( x + 5, y + 5 );
heartShape.bezierCurveTo( x + 5, y + 5, x + 4, y, x, y );
heartShape.bezierCurveTo( x - 6, y, x - 6, y + 7,x - 6, y + 7 );
heartShape.bezierCurveTo( x - 6, y + 11, x - 3, y + 15.4, x + 5, y + 19 );
heartShape.bezierCurveTo( x + 12, y + 15.4, x + 16, y + 11, x + 16, y + 7 );
heartShape.bezierCurveTo( x + 16, y + 7, x + 16, y, x + 10, y );
heartShape.bezierCurveTo( x + 7, y, x + 5, y + 5, x + 5, y + 5 );
var geometry = new THREE.ShapeBufferGeometry( heartShape );
var material = new THREE.MeshBasicMaterial( { color: 0xe53a40 } );
var cube = new THREE.Mesh( geometry, material ) ;
scene.add( cube );
break;
case 3:
var geometry = new THREE.ConeBufferGeometry( 5, 20, 32 );
var material = new THREE.MeshBasicMaterial( {color: 0x75d701} );
var cube = new THREE.Mesh( geometry, material );
scene.add( cube );
break;
case 4:
var geometry = new THREE.RingBufferGeometry( 1, 5, 32 );
var material = new THREE.MeshBasicMaterial( { color: 0x5c196b, side: THREE.DoubleSide } );
var cube = new THREE.Mesh( geometry, material );
scene.add( cube );
break;
case 5:
var geometry = new THREE.OctahedronBufferGeometry( 5 );;
var material = new THREE.MeshBasicMaterial( { color: 0xfc913a} );
var cube = new THREE.Mesh( geometry, material );
scene.add( cube );
break;
}
console.log('yes! you clicked!');
pixel_coords = new THREE.Vector2( e.clientX, e.clientY );
console.log('Pixel coordinates', pixel_coords);
vp_coords = new THREE.Vector2( ( pixel_coords.x / window.innerWidth ) * 2 - 1,
-( pixel_coords.y / window.innerHeight ) * 2 + 1);
console.log('Viewport coordinates', vp_coords);
vp_coords_near = new THREE.Vector3( vp_coords.x, vp_coords.y, 0);
raycaster = new THREE.Raycaster();
raycaster.setFromCamera(vp_coords_near, camera);
intersects = raycaster.intersectObject(invisible_plane);
console.log('Ray to Invisible Plane', intersects[0].point);

count = count + 1;
console.log(count);
// update cube position
cube.position.set(intersects[0].point.x, intersects[0].point.y, intersects[0].point.z);

};

};
function animate() {
requestAnimationFrame( animate );
controls.update();
renderer.render( scene, camera );
};
</script>
</head>
<body></body>
</html>
Binary file added 04/CS460_Assignment_04__Copy_.pdf
Binary file not shown.
Loading