Compare commits
No commits in common. "73b2343963698e7aa9cca7606fb37feb3c00f382" and "479e3043575e4bd9a17f524af24baa15a8f40822" have entirely different histories.
73b2343963
...
479e304357
Binary file not shown.
|
@ -194,11 +194,11 @@ function rotate (vector, heading) {
|
|||
}
|
||||
|
||||
function turn_to_rad (heading) {
|
||||
return (heading % 1) * 2 * Math.PI
|
||||
return heading * 2 * Math.PI
|
||||
}
|
||||
|
||||
function turn_to_deg (heading) {
|
||||
return ((heading % 1) * 360)
|
||||
return (heading * 360)
|
||||
}
|
||||
|
||||
function svg_render_line (prev, curr) {
|
||||
|
|
BIN
build/out.wasm
BIN
build/out.wasm
Binary file not shown.
|
@ -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))
|
|
@ -1,15 +1,15 @@
|
|||
import {run, svg} from "./ludus.mjs"
|
||||
|
||||
const code = `
|
||||
pencolor! (colors :white)
|
||||
repeat 10 {
|
||||
repeat 4 {
|
||||
fd! (500)
|
||||
rt! (0.25)
|
||||
}
|
||||
rt! (0.1)
|
||||
}`
|
||||
print! (random ())
|
||||
print! (random ())
|
||||
print! (random ())
|
||||
print! (random ())
|
||||
print! (random ())
|
||||
print! (random ())
|
||||
|
||||
`
|
||||
|
||||
const result = run(code)
|
||||
|
||||
console.log(svg(result.io.turtle.data))
|
||||
console.log(result.io.stdout.data)
|
||||
|
|
4019
build/svg_test.svg
4019
build/svg_test.svg
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 338 KiB |
Loading…
Reference in New Issue
Block a user