Created
September 25, 2016 03:31
-
-
Save angelaperrone/dd06325fcb16c6defdc739ad209c8052 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var r = new Rune({ | |
container: "#canvas", | |
width: 800, | |
height: 1185, | |
debug: true | |
}); | |
var width = r.width; | |
var height = r.height; | |
//Mars Vars | |
var mX = (width*(1/3)); | |
var mY = (height/2); | |
//Morse Code Var | |
var morseX = (width*.25); | |
var morseY=(height*.25); | |
var morseSize = (height*0.005); | |
var morseDist = (height*.015); | |
var morseRect = (width*.001875); | |
var morseRectHeight = (height*(1/48)); | |
//Star Var | |
var starSize = (width*.0125); | |
var starDegree = 72; | |
//SKY | |
r.rect (0, 0, width, height/2) | |
.fill (0,0,0) | |
.stroke(false) | |
//Mars Outline + M | |
r.ellipse (mX, mY, width*(2/3), height*.20) | |
.fill (255, 255, 255) | |
.stroke (false) | |
r.ellipse (width-mX, mY, width*(2/3), height*.20) | |
.fill (255, 255, 255) | |
.stroke (false) | |
//Crater | |
var craterGroup = r.group ((width-(width*(1/3))), (height*(9/12))) | |
for (i = 0; i<19; i++) { | |
crater = r.ellipse (i, i*3, Rune.random((width*.35),(width*.40)), Rune.random((height*.20),(height*.30)), craterGroup) | |
.fill (false) | |
.rotate (Rune.random(0,45)) | |
} | |
// var craterGroup = r.group ((width-(width*(1/3))), (height*(9/12))) | |
// for (i = 0; i<19; i++) { | |
// if (width <= width-(width*0.15)) { | |
// crater = r.ellipse (i, i*3, Rune.random((width*.35),(width*.40)), Rune.random((height*.20),(height*.30)), craterGroup) | |
// .fill (false) | |
// .rotate (Rune.random(0,45)) | |
// } | |
// console.log(width); | |
// } | |
for (j = 0; j<3; j++) { | |
var morseGroup = r.group ((width*-0.07), (height*0.03), craterGroup); | |
r.circle (-j*morseDist, 0, morseSize, morseGroup) | |
.fill (0,0,0); | |
var myScaledGroup = morseGroup.copy().move((width*.175), 0, true); | |
r.rect (morseRect*(-j*morseDist) + (width*.02),morseRectHeight+morseSize, morseSize*2.5, morseSize*1.5, craterGroup) | |
.fill (0,0,0) | |
} | |
//stars | |
var myStarGroup = r.group (width*.025, height*.025); | |
r.triangle (starSize, 0, starSize*2, starSize*2, 0, starSize*2, myStarGroup) | |
//r.triangle (starSize*1.5, 0, 0, starSize, 0,starSize*2, myStarGroup).rotate(180, 0,0, true) | |
.fill (255, 255, 255) | |
.stroke(false) | |
r.triangle ( 0 , 0, starSize*2,0, starSize, starSize*2, myStarGroup) | |
.fill (255, 255, 255) | |
.stroke (false) | |
var myScaledStar = myStarGroup.copy().move(Rune.random(0, width), Rune.random(0, height*.33), myStarGroup) | |
var myScaledStar = myStarGroup.copy().move(Rune.random(0, width), Rune.random(0, height*.33), myStarGroup) | |
r.draw(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment