This file contains hidden or 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: 600 | |
| }); | |
| var myPoly = r.polygon(400, 200) | |
| .lineTo(0, 0) | |
| .lineTo(200, 50) | |
| .lineTo(250, 60) |
This file contains hidden or 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: 600 | |
| }); | |
| var myPoly = r.polygon(400, 200) | |
| .lineTo(0, 0) | |
| .lineTo(200, 50) | |
| .lineTo(250, 60) |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title> Simon Jensen - Introductory site </title> | |
| <style> | |
| h1 { | |
| position: fixed; | |
| height: 150px; |
This file contains hidden or 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: 600 | |
| }); | |
| function drawTriangle(x, y, s) { | |
| r.triangle(x, y, x+(s/2), y+s, x-(s/2), y+s) | |
| } |
This file contains hidden or 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: 600 | |
| }); | |
| var myPoly = r.polygon(100, 100) | |
| .lineTo(0, 0) | |
| .lineTo(200, 150) | |
| .lineTo(75, 400); |
This file contains hidden or 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: 600, | |
| something: "else" | |
| }); | |
| var w = 130; | |
| var h = 150; | |
| var sm = w * 0.17; |
This file contains hidden or 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: 600 | |
| }); | |
| var w = 130; | |
| var h = 150; | |
| var sm = w * 0.17; | |
| var me = w * 0.25; |
This file contains hidden or 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: 600 | |
| }); | |
| var rad; | |
| var offset; | |
| var angle; | |
| var k; |
This file contains hidden or 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: 550, | |
| debug: true | |
| }); | |
| var bigSize = 300; | |
| var bigX = (r.width/2) - (bigSize/2); | |
| var bigY = (r.height/2) - (bigSize/2); |
This file contains hidden or 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 length = {a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0} | |
| var segment = /([astvzqmhlc])([^astvzqmhlc]*)/ig | |
| function parsePath(path) { | |
| var data = [] | |
| path.replace(segment, function(_, command, args){ | |
| var type = command.toLowerCase() | |
| args = parseValues(args) | |
| // overloaded moveTo |