From 267d5672940413f94898ae34e84c81758f629f7b Mon Sep 17 00:00:00 2001 From: kdam0 Date: Tue, 15 Nov 2016 19:06:17 -0500 Subject: added canvas id for cube canvas --- assets/js/global.js | 5 +++-- index.html | 2 +- index.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/js/global.js b/assets/js/global.js index 9780814..e93a1fa 100644 --- a/assets/js/global.js +++ b/assets/js/global.js @@ -1,6 +1,6 @@ window.onload = function () { - window.debug = true; // set to true iff you want console log output + window.debug = false; // set to true iff you want console log output var canvas = document.getElementById("main-canvas"); window.ctx = canvas.getContext("2d"); @@ -73,7 +73,8 @@ function drawCube() { var camera = new THREE.PerspectiveCamera(45, 1, 1, 1000); //renderer - var renderer = new THREE.WebGLRenderer({ alpha: true }); + var canvas = document.getElementById("cube-canvas"); + var renderer = new THREE.WebGLRenderer({ canvas: canvas, alpha: true }); renderer.setSize(200, 200); document.body.appendChild(renderer.domElement); diff --git a/index.html b/index.html index e7cdea0..12290c9 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,6 @@ - + diff --git a/index.php b/index.php index e7cdea0..12290c9 100644 --- a/index.php +++ b/index.php @@ -9,6 +9,6 @@ - + -- cgit v1.2.3