This commit is contained in:
Noah Moroze 2014-05-17 10:43:16 -04:00
parent f910628e27
commit 31ce597c09
3 changed files with 24 additions and 5 deletions

View file

@ -1,3 +1,11 @@
//you can change these to sexier stuff
var colors = [
"black",
"orange",
"red",
"blue",
];
var Clock = function(sides) {
this.sides = sides;
this.blocks = [];
@ -5,7 +13,3 @@ var Clock = function(sides) {
this.blocks.push([]);
}
}
var Block = function(color) {
this.color = color;
};

View file

@ -4,6 +4,11 @@
<title>Wasted Time</title>
</head>
<body>
<canvas id="canvas"></canvas>
<center>
<canvas id="canvas"></canvas>
</center>
<script src="entities.js"></script>
<script src="main.js"></script>
</body>
</html>

10
math.js Normal file
View file

@ -0,0 +1,10 @@
function rotatePoint(x, y, theta) {
var thetaRad = theta * 0.0174532925;
var rotX = Math.cos(thetaRad) * x - Math.sin(thetaRad) * y;
var rotY = Math.sin(thetaRad) * x + Math.cos(thetaRad) * y;
return {
x: rotX,
y: rotY,
};
}