diff --git a/README.org b/README.org index 6bd9464..3002e53 100644 --- a/README.org +++ b/README.org @@ -2,15 +2,18 @@ A demonstration of a Turtle interpreter based on the Free monad, with HTML Canvas graphics support. -Example: +[[file:img/two-stars.png]] #+BEGIN_SRC purescript main :: Context2DEff -main = - get2DContext "turtleCanvas" >>= - beginStroke >>= - compileTurtleProg star >>= - endStroke +main = renderTurtleProgOnCanvas "turtleCanvas" $ do + star + penUp + forward 40 + left 100 + penDown + color Red + star star = do right 144 diff --git a/img/two-stars.png b/img/two-stars.png new file mode 100644 index 0000000..bf61049 Binary files /dev/null and b/img/two-stars.png differ