ludus/build/p5_test.mjs

14 lines
223 B
JavaScript
Raw Permalink 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)
2024-10-20 18:39:36 +00:00
fd! (50)
2024-10-23 20:44:51 +00:00
pw! (3)
2024-10-20 18:39:36 +00:00
`
2024-08-02 17:56:37 +00:00
const result = run(code)
console.log(result.io.stdout.data)
console.log(p5(result.io.turtle.data))