Skip to content

Commit

Permalink
#fuckjs
Browse files Browse the repository at this point in the history
  • Loading branch information
travisby committed Oct 30, 2013
1 parent 41420b6 commit 3f169e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
gl_FragColor = lightColor;
}
</script>
<script type="text/javascript" src="js/Color.js"></script>
<script type="text/javascript" src="webgl-utils/shapes/Shape.js"></script>
<script type="text/javascript" src="webgl-utils/Light.js"></script>
<script type="text/javascript" src="webgl-utils/Material.js"></script>
Expand All @@ -74,7 +75,7 @@
<script type="text/javascript" src="webgl-utils/shapes/CubeColors.js"></script>
<script type="text/javascript" src="js/Face.js"></script>
<script type="text/javascript" src="js/Cubie.js"></script>
<script type="text/javascript" src="js/Color.js"></script>

<script type="text/javascript" src="js/utils.js"></script>

<script type="text/javascript" src="webgl-utils/Scene.js"></script>
Expand Down
11 changes: 5 additions & 6 deletions webgl-utils/shapes/CubeColors.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ const CUBE_RIGHT = 3;
const CUBE_BACK = 4;
const CUBE_BOTTOM = 5;

var CubeColors = function() {
this.colors = [];
this.reset();
function CubeColors() {
}

CubeColors.prototype.FACE_CONSTANTS = [CUBE_FRONT, CUBE_LEFT, CUBE_TOP, CUBE_RIGHT, CUBE_BACK, CUBE_BOTTOM];

CubeColors.prototype.set = function(face, color) {
this.colors[face] = color;
}
CubeColors.prototype.colors = [NOCOLOR, NOCOLOR, NOCOLOR, NOCOLOR, NOCOLOR, NOCOLOR];
CubeColors.prototype.getColors = function() {
var myColors = [];
for (var i = 0; i < this.FACE_CONSTANTS.length; i++) {
Expand All @@ -20,9 +22,6 @@ CubeColors.prototype.getColors = function() {
return myColors;
}

CubeColors.prototype.set = function(face, color) {
this.colors[face] = color;
}

CubeColors.prototype.reset = function() {
this.colors = [];
Expand Down

0 comments on commit 3f169e4

Please sign in to comment.