Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Computer Graphics with WebGL / Project / Project.html
diff options
context:
space:
mode:
1 files changed, 3 insertions, 2 deletions
-rw-r--r--Year 2/Computer Graphics with WebGL/Project/Project.html5
diff --git a/Year 2/Computer Graphics with WebGL/Project/Project.html b/Year 2/Computer Graphics with WebGL/Project/Project.html
index cacc8bc..1f1ff0e 100644
--- a/Year 2/Computer Graphics with WebGL/Project/Project.html
+++ b/Year 2/Computer Graphics with WebGL/Project/Project.html
@@ -22,9 +22,8 @@ canvas {
}
</style>
- <script>
- </script>
<script src="spaceship.js"></script>
+ <script src="skybox.js"></script>
<script>
/*
* WebGL
@@ -60,6 +59,7 @@ canvas {
gl.uniform3f(uDiffuseColor,1,1,1);
gl.uniform3f(uLightDir,0,0,-1);
+ skybox = new Skybox(10000, [0.1,0.1,0.1], undefined);
planets = [new Sphere([1000,0,1000], 50),
new Sphere([1000,0,-1000], 50),
new Sphere([700,0,1000], 40),
@@ -87,6 +87,7 @@ canvas {
gl.clear(gl.COLOR_BUFFER_BIT+gl.DEPTH_BUFFER_BIT);
lookUpdate();
+ skybox.draw();
planets.forEach((p) => p.draw());
requestAnimationFrame(drawFrame);