Compare commits

..

No commits in common. "73b2343963698e7aa9cca7606fb37feb3c00f382" and "479e3043575e4bd9a17f524af24baa15a8f40822" have entirely different histories.

6 changed files with 3981 additions and 76 deletions

Binary file not shown.

View File

@ -194,11 +194,11 @@ function rotate (vector, heading) {
} }
function turn_to_rad (heading) { function turn_to_rad (heading) {
return (heading % 1) * 2 * Math.PI return heading * 2 * Math.PI
} }
function turn_to_deg (heading) { function turn_to_deg (heading) {
return ((heading % 1) * 360) return (heading * 360)
} }
function svg_render_line (prev, curr) { function svg_render_line (prev, curr) {

Binary file not shown.

View File

@ -1,16 +0,0 @@
import {run, p5} from "./ludus.mjs"
const code = `
pencolor! (colors :white)
repeat 10 {
repeat 4 {
fd! (500)
rt! (0.25)
}
rt! (0.1)
}`
const result = run(code)
console.log(result.io.stdout.data)
console.log(p5(result.io.turtle.data))

View File

@ -1,15 +1,15 @@
import {run, svg} from "./ludus.mjs" import {run, svg} from "./ludus.mjs"
const code = ` const code = `
pencolor! (colors :white) print! (random ())
repeat 10 { print! (random ())
repeat 4 { print! (random ())
fd! (500) print! (random ())
rt! (0.25) print! (random ())
} print! (random ())
rt! (0.1)
}` `
const result = run(code) const result = run(code)
console.log(svg(result.io.turtle.data)) console.log(result.io.stdout.data)

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 338 KiB