hot-reloaded graphics scripting with luajit and fragment shaders
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
nonmateria d95a860c29 corrects loading of folders, cleans up check_script() 1 week ago
src corrects loading of folders, cleans up check_script() 1 week ago
.clang-format first draft commit 1 year ago
.gitignore another renaming 12 months ago
LICENSE.md switches to MIT License 7 months ago
Makefile breaking namespace changes 7 months ago
README.md script for updating 3rd party single header libraries 6 months ago
update_single_headers.sh script for updating 3rd party single header libraries 6 months ago

README.md

nsketch

luajit interpreter for livecoding graphics by using shaders, images and minimal 2d graphics. For example, it can do things like this and this. It owns a lot to raylib, that is used for windowing, 2d primitives, text, image loading and shaders. Code is hotreloaded on save by using inotify and webcam is managed with linux v4l2 drivers, so for now this tool is linux-only.

namespace list:

  • args : access cli args listed after the script path
  • audio : connects to JACK to get audio envelope
  • cam : webcam input
  • clock : gets and warps time
  • fn : various functions to shape inputs ( and noise up to 4d )
  • frag : manage shaders
  • gfx : 2d primitives and other various functions
  • key : keyboard input
  • layer : manage different fbo object used as graphical "layers"
  • mouse : mouse input
  • pad : gamepad input
  • png : load images (not just png)
  • rand : various random functions
  • window: manage window size, position, background and title

the code is functional but still a work in progress; for now this is something made by myself for myself.

you can see some examples in the scrapbook (only the .lua files) and scriptsuite.

building

this is a memo for myself ( on debian 10 ):

sudo apt-get install libv4l-0 libv4l-dev liblo7 liblo-dev jackd1 libjack-dev 
git clone https://codeberg.org/nonmateria/nsketch.git
cd nsketch 

mkdir libs
cd libs 

git clone https://github.com/raysan5/raylib
cd raylib/src
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
make 
sudo make install 

cd ..
git clone https://luajit.org/git/luajit-2.0.git
cd luajit-2.0
git checkout v2.1
make

cd ..
make 

many thanks to

license

Nicola Pisanti MIT License 2020-2021