Skip to content

Instantly share code, notes, and snippets.

@runemadsen
Created September 13, 2016 16:45
Show Gist options
  • Save runemadsen/03b92888128d0335bc3001f25e47ac73 to your computer and use it in GitHub Desktop.
Save runemadsen/03b92888128d0335bc3001f25e47ac73 to your computer and use it in GitHub Desktop.
var r = new Rune({
container: "#canvas",
width: 800,
height: 550,
debug: true
});
var bigSize = 300;
var bigX = (r.width/2) - (bigSize/2);
var bigY = (r.height/2) - (bigSize/2);
var smallSize = 100;
var smallX = (r.width/2) + (bigSize/2) - (smallSize/2);
var smallY = (r.height/2) + (bigSize/2) - (smallSize/2);
r.rect(bigX, bigY, bigSize, bigSize);
r.rect(smallX, smallY, smallSize, smallSize)
.rotate(45, smallX + (smallSize/2), smallY + (smallSize/2));
r.draw();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment