aboutsummaryrefslogtreecommitdiffstats
path: root/examples/demo.lua
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2019-11-03 16:23:43 +0000
committers-ol <s-ol@users.noreply.github.com>2019-11-03 16:23:43 +0000
commit157f6c0fdb37e8490c293a44d9ed08cd3dc63291 (patch)
tree4cfbb2899e615c90f033a31aa4019513047d805e /examples/demo.lua
parentadd profiling support (diff)
downloadwatch-cad-157f6c0fdb37e8490c293a44d9ed08cd3dc63291.tar.gz
watch-cad-157f6c0fdb37e8490c293a44d9ed08cd3dc63291.zip
update examples, fixes
Diffstat (limited to 'examples/demo.lua')
-rw-r--r--examples/demo.lua40
1 files changed, 0 insertions, 40 deletions
diff --git a/examples/demo.lua b/examples/demo.lua
deleted file mode 100644
index 22076b9..0000000
--- a/examples/demo.lua
+++ /dev/null
@@ -1,40 +0,0 @@
--- return function (state)
-function place_in_rect(state)
- selection = Select_objs(state.objs, '^led-')
- rect = Select_rect(state.dest)
-
- sx = rect.w / (#selection + 1)
-
- x = sx
- for i, obj in ipairs(selection) do
- Move(obj, rect.x + x - obj.w/2, rect.y)
- x = x + sx
- end
-end
-
-function create_star(state)
- local inner = Select_circle(state.inner)
- local outer = Select_circle(state.outer, inner.cx, inner.cy)
-
- cnt = 20
- step = 2*math.pi/cnt
- lag_x, lag_y = inner.cx + inner.r, inner.cy
- for i = 0, 20 do
- r = (i % 2 == 0) and inner.r or outer.r
- x = inner.cx + math.cos(step * i) * r
- y = inner.cy + math.sin(step * i) * r
- obj = Object("object_"..i, x-10, y-10, 20, 20)
- Add(obj)
-
- love.graphics.line(lag_x, lag_y, obj:center())
- lag_x, lag_y = obj:center()
- end
-end
-
-function test(S)
- rect = input.rectangle(S.rect)
-
- input.circle(S.circle, { center = rect.min, radius = 100 }, { center = true, radius = true })
-end
-
-return test