ludus/build/p5_test.mjs

18 lines
277 B
JavaScript
Raw Normal View History

2024-08-02 17:56:37 +00:00
import {run, p5} from "./ludus.mjs"
const code = `
2024-10-18 19:18:56 +00:00
print! ("Hello, world!")
2024-08-02 17:56:37 +00:00
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))