diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2019-11-03 16:23:43 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2019-11-03 16:23:43 +0000 |
| commit | 157f6c0fdb37e8490c293a44d9ed08cd3dc63291 (patch) | |
| tree | 4cfbb2899e615c90f033a31aa4019513047d805e /examples/capsule.moon | |
| parent | add profiling support (diff) | |
| download | watch-cad-157f6c0fdb37e8490c293a44d9ed08cd3dc63291.tar.gz watch-cad-157f6c0fdb37e8490c293a44d9ed08cd3dc63291.zip | |
update examples, fixes
Diffstat (limited to 'examples/capsule.moon')
| -rw-r--r-- | examples/capsule.moon | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/capsule.moon b/examples/capsule.moon new file mode 100644 index 0000000..2a9033c --- /dev/null +++ b/examples/capsule.moon @@ -0,0 +1,25 @@ +-- let's load a vector library for doing some +-- more interesting transformations + +import vec2 from require 'cpml' + +=> + -- let's try to construct a pill-shape + input.rectangle @rect + rect = @rect! + hsize = (rect.max - rect.min) / 2 + + input.circle @left, { + center: rect.min + vec2 0, hsize.y + radius: hsize.y + } + input.circle @left, { + center: rect.min + vec2 hsize.x*2, hsize.y + radius: hsize.y + } + + -- right, so that's that.... + -- kinda forgetting whether there was something + -- else I wanted to show. + -- does this seem interesting to you? + -- let me know :) |
