I’ve long been a fan of the Lua scripting language due its incredible speed and relative ease that it can be interfaced with a host application. In this screenshot we can see the new LuaNode that is reading a random number from an input pin, modifying that value and setting an output pin.
While this is a relatively pointless example considering the amazing range of things that could be achieved, it works very well and very quickly!
Scripting is an important feature of Fugio as not all stages of code translates well into nodes. For instance, performing simple maths on one or more values would result in having to use lots of nodes, to store values and apply each operation. With scripting we can pass values in, concisely manipulate these values, and output the values, all in one node.
I’ve implemented a basic but extensible way to pass other types of information to and from Lua, such as colours, vec3’s, etc, so there will be no need to split/join these datatypes into their basic components before passing them into/from the LuaNode.