Code Monkey home page Code Monkey logo

lu5's Introduction

Lua interpreter for Creative Coding

Provides a similar experience to p5.js with opengl wrappers.

We are not and we do not claim to be affiliated with p5.js or the processing foundation


This sketch draws a circle at position 300, 300.

See API Documentation for more

function setup()
    createWindow(600, 600);
end

function draw()
    background(51);

    circle(300, 300, 32);
end

Build

You can download a built executable for lu5 here, or you can build it yourself assuming you have the right dependencies installed (opengl, glfw, lua, freetype2).

If you encounter any problems with your build or runtime, it is encouraged to submit an issue and steps to reproduce.

GNU/Linux

Build with make

make

you can then install the executable in /usr/bin

sudo make install

Windows

Windows builds are done in an MSYS2 environement with mingw64 installed.

Install dependencies

pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-lua mingw-w64-x86_64-glfw mingw-w64-x86_64-freetype

build

make PLATFORM=win

Running Lua Sketches

Specify the path of the file you want to execute

lu5 file.lua


Preview

x = 100
vx = 7;

function setup()
	createWindow(400, 400);
	
	-- Lock fps
	frameRate(60);
end

function draw()
	background(51);
	
	-- render fps
	text('fps: ' .. frameRate(), 20, 10);

	-- render circle
	circle(x, 200, 32);

	-- bounce
	if (x > width-16 or x < 16) then
		vx = -vx;
	end

	-- move
	x = x + vx;
end



Contributions

Contributions to expand the lu5 api are welcomed.

Read the contribution docs

lu5's People

Contributors

matiasvlevi avatar sharkace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lu5's Issues

What is the license?

The project looks really cool! What is the license of the sources?

I looked in the usual places (README file, LICENSE or COPYING files in the repo root, top comment in src/main.c) but couldn't find any info. It doesn't seem to be in the GitHub project metadata either. If there is no licensing information, could you please add it? Thank you!

(As an example, LuaRocks has licensing info in the README, the COPYING file, and the GitHub sidebar: https://github.com/luarocks/luarocks/ )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.