aboutsummaryrefslogtreecommitdiffstats
path: root/alv/base
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-09-01 13:24:37 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit9d8b68190d36744a8d9f61730a05b1d1e7181edf (patch)
tree9bf5d6f02ba3ef49afded57030b5aee0a4bfb966 /alv/base
parentupdate scm rockspec (diff)
downloadalive-9d8b68190d36744a8d9f61730a05b1d1e7181edf.tar.gz
alive-9d8b68190d36744a8d9f61730a05b1d1e7181edf.zip
support :vis() on builtins
Diffstat (limited to 'alv/base')
-rw-r--r--alv/base/builtin.moon11
1 files changed, 11 insertions, 0 deletions
diff --git a/alv/base/builtin.moon b/alv/base/builtin.moon
index 54f7433..558a65a 100644
--- a/alv/base/builtin.moon
+++ b/alv/base/builtin.moon
@@ -53,6 +53,17 @@ class Builtin
-- @tparam ?Builtin prev the previous Builtin instance
setup: (prev) =>
+ --- collect visualisation data (optional).
+ --
+ -- This may return any simple Lua value, including Lua tables, as long as it
+ -- has no metatables, multiple references/loops, userdata etc.
+ --
+ -- This value is exposed to alv editors in order to render realtime
+ -- visualisations overlaid onto the program text.
+ --
+ -- @treturn table vis
+ vis: => {}
+
--- the `Cell` this Builtin was created for.
-- @tfield Cell cell