Ndor is an app with which you can draw by codes, for kids and coders~
It contains two drawing modules, each with a gamified tutorial mode, all driven by code in XGo.
- ndor — free drawing with a canvas and a shape/path API (
circle,rectangle,bezier,fill,stroke, colors, text, transforms...). Its tutorial mode adds a level menu, hints, reset and reference solutions. - turtle — turtle graphics on a grid, where a turtle moves with
step,left/right,pen,colorandwidth, and the drawing is animated stroke by stroke. Its tutorial mode is a star-collecting game for kids: guide Gopher through every star to finish a level. XGo is just the teaching language; the goal is to learn programming and engineering ideas.
A native GUI version built with mygo, with both modules in one window. Switch between ndor and turtle using the tabs.
The CLI generates SVG drawings for the ndor module.
Install with Go:
go install github.com/zrcoder/ndor/cmd/ndor@latestRun:
ndor {source file}The argument is the code source file(xxx.xgo or xxx.md), the cli will generate an SVG as xxx.svg or an HTML as xxx.html.
ndor is implemented with Go.
If you want to run ndor on your local machine:
-
Install
git,Goandtask -
Clone the repo
git clone https://github.com/zrcoder/ndor
-
Run
-
gui app:
task gui
-
cli app
task cli -- internal/examples/ndor/rainbow.xgo task cli -- cmd/ndor/examples/hello.md
-

