Skip to content

Commit

Permalink
new file for Star class
Browse files Browse the repository at this point in the history
  • Loading branch information
Miles Shang committed Oct 11, 2014
1 parent 5998f32 commit 6fc0b0b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 5 additions & 0 deletions Star.js
@@ -0,0 +1,5 @@
function Star(worldX, worldY, brightness) {
this.worldX = worldX;
this.worldY = worldY;
this.brightness = brightness;
}
5 changes: 4 additions & 1 deletion index.html
Expand Up @@ -63,8 +63,11 @@
<script src="rrcache.js">
// exports RRCache
</script>
<script src="Star.js">
// exports Star
</script>
<script src="starfield.js">
// depends on RRCache
// depends on RRCache, Star
// exports getStars
</script>
<script src="render.js">
Expand Down
6 changes: 0 additions & 6 deletions starfield.js
Expand Up @@ -8,12 +8,6 @@ var getStars;

var MAX_INT = -1 >>> 1;

function Star(worldX, worldY, brightness) {
this.worldX = worldX;
this.worldY = worldY;
this.brightness = brightness;
}

function hashFnv32a(str) {
var i, l,
hval = 0x811c9dc5;
Expand Down

0 comments on commit 6fc0b0b

Please sign in to comment.