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 :) #497

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6b7e6f0
trying to push from local to github
VishwajithP2308 Sep 13, 2022
e2b9a8b
initial commit
VishwajithP2308 Sep 19, 2022
a6d415d
CS460 Assignment 02
VishwajithP2308 Sep 20, 2022
9b3565f
assignment 2 submission
VishwajithP2308 Sep 20, 2022
2d7a42c
Assignment 03
VishwajithP2308 Sep 27, 2022
0af5f5b
Assignment 03
VishwajithP2308 Sep 27, 2022
181af49
Assignment04
VishwajithP2308 Oct 11, 2022
e04c881
Assignment04
VishwajithP2308 Oct 11, 2022
fae6efd
Assignment05
VishwajithP2308 Oct 18, 2022
409a7a6
assignment05
VishwajithP2308 Oct 18, 2022
6ab4d02
Assignment 06
VishwajithP2308 Oct 27, 2022
affa61d
Assignment 06
VishwajithP2308 Oct 27, 2022
dbac13c
adding all files
VishwajithP2308 Oct 27, 2022
0f02eb1
Assignment 06
VishwajithP2308 Oct 27, 2022
a1d3598
Assignment07
VishwajithP2308 Nov 8, 2022
5f94185
Assignment07 pdf
VishwajithP2308 Nov 8, 2022
1698a74
Assignment08
VishwajithP2308 Nov 22, 2022
80eb421
Assignment08
VishwajithP2308 Nov 22, 2022
aeee8cb
Assignment09
VishwajithP2308 Nov 29, 2022
7f89746
Assignment09
VishwajithP2308 Nov 29, 2022
117dec7
Assignment 10
VishwajithP2308 Dec 9, 2022
4b9ef05
Add files via upload
VishwajithP2308 Dec 9, 2022
6c59f10
Create final
VishwajithP2308 Dec 20, 2022
a4ae761
Add files via upload
VishwajithP2308 Dec 20, 2022
464c4d1
Delete final
VishwajithP2308 Dec 20, 2022
8ba7fa1
Add files via upload
VishwajithP2308 Dec 20, 2022
6e551e2
Delete UnityProgress.js
VishwajithP2308 Dec 20, 2022
85015ec
Delete favicon.ico
VishwajithP2308 Dec 20, 2022
a90dc24
Delete fullscreen.png
VishwajithP2308 Dec 20, 2022
272f106
Delete progressEmpty.Dark.png
VishwajithP2308 Dec 20, 2022
b3c5ed9
Delete progressFull.Dark.png
VishwajithP2308 Dec 20, 2022
03f68b4
Delete progressFull.Light.png
VishwajithP2308 Dec 20, 2022
3e1831d
Delete progressLogo.Light.png
VishwajithP2308 Dec 20, 2022
422ab4a
Delete style - Copy.css
VishwajithP2308 Dec 20, 2022
12e1b73
Delete style.css
VishwajithP2308 Dec 20, 2022
7b30ff8
Delete webgl-logo.png
VishwajithP2308 Dec 20, 2022
469f49d
Delete FoxTaleWeb.data.unityweb
VishwajithP2308 Dec 20, 2022
2690921
Delete FoxTaleWeb.json
VishwajithP2308 Dec 20, 2022
ce935ab
Delete project/graphicsfinalProject/build directory
VishwajithP2308 Dec 20, 2022
2f4738a
Delete index.html
VishwajithP2308 Dec 20, 2022
d8858dd
Delete project/graphicsfinalProject directory
VishwajithP2308 Dec 20, 2022
da8d4b4
Create c
VishwajithP2308 Dec 20, 2022
d665592
added final project
VishwajithP2308 Dec 20, 2022
add99cb
Delete finalproject directory
VishwajithP2308 Dec 21, 2022
9c9b057
Create index.html
VishwajithP2308 Dec 21, 2022
46617dc
Add files via upload
VishwajithP2308 Dec 21, 2022
359021b
Add files via upload
VishwajithP2308 Dec 22, 2022
db302a1
Delete CS460_FinalProject
VishwajithP2308 Dec 22, 2022
dc57415
Add files via upload
VishwajithP2308 Dec 22, 2022
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
582 changes: 582 additions & 0 deletions 02/CS460_Assignment02.js

Large diffs are not rendered by default.

Binary file added 02/CS460_Assignment_02.docx
Binary file not shown.
37 changes: 37 additions & 0 deletions 02/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<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="https://get.goXTK.com/xtk_edge.js"></script>


<script type="text/javascript" src="CS460_Assignment02.js"></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___Copy_.pdf
Binary file not shown.
141 changes: 141 additions & 0 deletions 03/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<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>


function getRandomColor() {

function getRandomRGB() {
return Math.floor(Math.random()*256);
}

return {color: `rgb(${getRandomRGB()}, ${getRandomRGB()}, ${getRandomRGB()})`};
}

function getRandomGeometry() {
function getRandomCase() {
return Math.floor(Math.random() * 5)
}

switch(getRandomCase()) {
case 0:
return new THREE.RingGeometry(8, 20, 24);

case 1:
return new THREE.ConeGeometry(20, 40);
case 2:
return new THREE.SphereGeometry(20, 40, 40);
case 3:
return new THREE.OctahedronGeometry(20);
case 4:
return new THREE.TorusKnotGeometry(20, 6, 48, 8);
case 5:
return new THREE.BoxGeometry(10, 10, 10);
}
}

var global_counter = 0;
window.onload = function() {



scene = new THREE.Scene();

fov = 75; /degrees corresponds to up and down that constitutes frustrum/
ratio = window.innerWidth / window.innerHeight;
zNear = 1;
zFar = 10000;

camera = new THREE.PerspectiveCamera(fov, ratio, zNear, zFar);
camera.position.set( 0, 0, 500);
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild(renderer.domElement );


geometry = new THREE.PlaneGeometry( 10000, 10000 );


material = new THREE.MeshBasicMaterial( {
visible: false
});
invisible_plane = new THREE.Mesh( geometry, material);
scene.add(invisible_plane);



renderer.domElement.onclick = function( e ){
if(!e.shiftKey) return false;

pixel_coords = new THREE.Vector2( e.clientX, e.clientY);

vp_coords = new THREE.Vector2(
( pixel_coords.x / window.innerWidth ) * 2 - 1,
-( pixel_coords.y / window.innerHeight ) * 2 + 1)


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);
p = intersects[0].point;

geometry = getRandomGeometry();
material = new THREE.MeshStandardMaterial(getRandomColor());
cube = new THREE.Mesh( geometry, material);
scene.add(cube);
cube.position.set(p.x, p.y, p.z);
global_counter++;
console.log(global_counter);

};

ambientLight = new THREE.AmbientLight( 0x404040 );
scene.add( ambientLight );

light = new THREE.DirectionalLight( 0xd2ded2, 5.0);
light.position.set( 20, 100, 20 );
scene.add(light);


geometry = new THREE.BoxGeometry( 40, 40, 40);
material = new THREE.MeshStandardMaterial(getRandomColor());
cube = new THREE.Mesh( geometry, material);
scene.add(cube);


controls = new THREE.TrackballControls( camera, renderer.domElement );

animate();

};

function animate() {

requestAnimationFrame( animate );



controls.update();


renderer.render( scene, camera);

};
</script>
</head>
<body></body>
</html>
141 changes: 141 additions & 0 deletions 03/index03.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<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>


function getRandomColor() {

function getRandomRGB() {
return Math.floor(Math.random()*256);
}

return {color: `rgb(${getRandomRGB()}, ${getRandomRGB()}, ${getRandomRGB()})`};
}

function getRandomGeometry() {
function getRandomCase() {
return Math.floor(Math.random() * 5)
}

switch(getRandomCase()) {
case 0:
return new THREE.RingGeometry(8, 20, 24);

case 1:
return new THREE.ConeGeometry(20, 40);
case 2:
return new THREE.SphereGeometry(20, 40, 40);
case 3:
return new THREE.OctahedronGeometry(20);
case 4:
return new THREE.TorusKnotGeometry(20, 6, 48, 8);
case 5:
return new THREE.BoxGeometry(10, 10, 10);
}
}

var global_counter = 0;
window.onload = function() {



scene = new THREE.Scene();

fov = 75; /degrees corresponds to up and down that constitutes frustrum/
ratio = window.innerWidth / window.innerHeight;
zNear = 1;
zFar = 10000;

camera = new THREE.PerspectiveCamera(fov, ratio, zNear, zFar);
camera.position.set( 0, 0, 500);
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild(renderer.domElement );


geometry = new THREE.PlaneGeometry( 10000, 10000 );


material = new THREE.MeshBasicMaterial( {
visible: false
});
invisible_plane = new THREE.Mesh( geometry, material);
scene.add(invisible_plane);



renderer.domElement.onclick = function( e ){
if(!e.shiftKey) return false;

pixel_coords = new THREE.Vector2( e.clientX, e.clientY);

vp_coords = new THREE.Vector2(
( pixel_coords.x / window.innerWidth ) * 2 - 1,
-( pixel_coords.y / window.innerHeight ) * 2 + 1)


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);
p = intersects[0].point;

geometry = getRandomGeometry();
material = new THREE.MeshStandardMaterial(getRandomColor());
cube = new THREE.Mesh( geometry, material);
scene.add(cube);
cube.position.set(p.x, p.y, p.z);
global_counter++;
console.log(global_counter);

};

ambientLight = new THREE.AmbientLight( 0x404040 );
scene.add( ambientLight );

light = new THREE.DirectionalLight( 0xd2ded2, 5.0);
light.position.set( 20, 100, 20 );
scene.add(light);


geometry = new THREE.BoxGeometry( 40, 40, 40);
material = new THREE.MeshStandardMaterial(getRandomColor());
cube = new THREE.Mesh( geometry, material);
scene.add(cube);


controls = new THREE.TrackballControls( camera, renderer.domElement );

animate();

};

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