Interpreter for Creative Coding
Lu5 is a free and open-source Lua interpreter for Creative Coding.
diff --git a/docs/index.html b/docs/index.html index 99da0c62..230c256a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -
Lu5 is a free and open-source Lua interpreter for Creative Coding.
Lu5 is a free and open-source Lua interpreter for Creative Coding.
class(name);
Create a class.
if a class implements a print
method, it can be used in the print
function
name
The class name local Player = class('Player');
+lu5 | classes classes
v0.0.6class(name);
Create a class.
if a class implements a print
method, it can be used in the print
function
Arguments
name
The class name local Player = class('Player');
function Player:init(x, y)
self.x = x;
diff --git a/docs/latest/image/index.html b/docs/latest/image/index.html
index 33e8b792..035b06a3 100644
--- a/docs/latest/image/index.html
+++ b/docs/latest/image/index.html
@@ -1,4 +1,4 @@
-lu5 | image image
v0.0.6loadImage(path);
Load a png or jpeg image
Arguments
path
The local image pathReturns
img
The image reference function setup()
+lu5 | image image
v0.0.6loadImage(path);
Load a png or jpeg image
Arguments
path
The local image pathReturns
img
The image reference function setup()
createWindow(600, 600);
img = loadImage('/path/to/mypic.png');
end
diff --git a/docs/latest/index.html b/docs/latest/index.html
index dee8fb81..a2532b11 100644
--- a/docs/latest/index.html
+++ b/docs/latest/index.html
@@ -1 +1 @@
-lu5 | Reference Reference
v0.0.6classes
\ No newline at end of file
+lu5 | Reference Reference
v0.0.6classes
\ No newline at end of file
diff --git a/docs/latest/io/index.html b/docs/latest/io/index.html
index 1ba8b630..5fe0c564 100644
--- a/docs/latest/io/index.html
+++ b/docs/latest/io/index.html
@@ -1,4 +1,4 @@
-lu5 | io io
v0.0.6print(value);
Printing utility, can take any lua type.
Arguments
value
The value to print to stdout print(42);
+lu5 | io io
v0.0.6print(value);
Printing utility, can take any lua type.
Arguments
value
The value to print to stdout print(42);
print(1, 2, 3);
diff --git a/docs/latest/keyboard/index.html b/docs/latest/keyboard/index.html
index e4063c6a..9881e201 100644
--- a/docs/latest/keyboard/index.html
+++ b/docs/latest/keyboard/index.html
@@ -1,4 +1,4 @@
-lu5 | keyboard keyboard
v0.0.6keyIsDown(k);
Check if a keyboard key is pressed, returns true
if key is down and returns false
if it's not
Arguments
k
The keyboard key to check as a key global, or a stringReturns
boolean
Whether or not the key is down -- Use a string
+lu5 | keyboard keyboard
v0.0.6keyIsDown(k);
Check if a keyboard key is pressed, returns true
if key is down and returns false
if it's not
Arguments
k
The keyboard key to check as a key global, or a stringReturns
boolean
Whether or not the key is down -- Use a string
if (keyIsDown('a')) then
-- key 'a' is down
end
diff --git a/docs/latest/math/index.html b/docs/latest/math/index.html
index 869ad59d..00383dcb 100644
--- a/docs/latest/math/index.html
+++ b/docs/latest/math/index.html
@@ -1,4 +1,4 @@
-lu5 | math math
v0.0.6randomSeed(seed);
Set a random seed
Arguments
seed
The seed valueReturns
number
The random value
random(min, max);
Get a random number
Arguments
min
The minimum of the rangemax
The maximum of the rangeReturns
number
The random value random() -- random number between 0 and 1
+lu5 | math math
v0.0.6randomSeed(seed);
Set a random seed
Arguments
seed
The seed valueReturns
number
The random value
random(min, max);
Get a random number
Arguments
min
The minimum of the rangemax
The maximum of the rangeReturns
number
The random value random() -- random number between 0 and 1
random(3) -- random number between 0 and 3
random(3, 12) -- random number between 3 and 12
diff --git a/docs/latest/mouse/index.html b/docs/latest/mouse/index.html
index b6516f6b..dbf5a0f0 100644
--- a/docs/latest/mouse/index.html
+++ b/docs/latest/mouse/index.html
@@ -1,4 +1,4 @@
-lu5 | mouse mouse
v0.0.6mouseX
GlobalThe x mouse coordinate
createWindow(400, 400);
+lu5 | mouse mouse
v0.0.6mouseX
GlobalThe x mouse coordinate
createWindow(400, 400);
function draw()
background(51);
diff --git a/docs/latest/setting/index.html b/docs/latest/setting/index.html
index 65006cd3..df686648 100644
--- a/docs/latest/setting/index.html
+++ b/docs/latest/setting/index.html
@@ -1,3 +1,3 @@
-lu5 | setting setting
v0.0.6background(r, g, b, a);
Clear a background with a color
Arguments
r
The red byteg
The green byteb
The blue bytea
The alpha byte
fill(r, g, b, [a]);
Set the fill color for shapes
Arguments
r
The red byteg
The green byteb
The blue byte[a]
The alpha byteCan also accept a hexadecimal or color name as string
fill(255, 150, 40);
+lu5 | setting setting
v0.0.6background(r, g, b, a);
Clear a background with a color
Arguments
r
The red byteg
The green byteb
The blue bytea
The alpha byte
fill(r, g, b, [a]);
Set the fill color for shapes
Arguments
r
The red byteg
The green byteb
The blue byte[a]
The alpha byteCan also accept a hexadecimal or color name as string
fill(255, 150, 40);
square(200, 200, 64);
strokeWeight(weight);
No description
Arguments
weight
The line width in pixels strokeWeight(8);
line(200, 200, mouseX, mouseY);
noFill();
Disable fill
stroke(r, g, b, a);
Set the stroke color for shapes
Arguments
r
The red byteg
The green byteb
The blue bytea
The alpha byteOnly implemented for line
and circle
noStroke();
Disable stroke
Only implemented for line
and circle
push();
Save the style settings
pop();
Restore the style settings
\ No newline at end of file
diff --git a/docs/latest/shapes/index.html b/docs/latest/shapes/index.html
index 3555fd91..3fd488d4 100644
--- a/docs/latest/shapes/index.html
+++ b/docs/latest/shapes/index.html
@@ -1,4 +1,4 @@
-lu5 | shapes shapes
v0.0.6circle(x, y, d);
Draw a circle to the opengl context
Arguments
x
The x position of the circley
The y position of the circled
The diameter of the circle
rect(x, y, w, h);
Draw a rectangle to the opengl context
Arguments
x
The x position of the reactangley
The y position of the reactanglew
The widthh
The height
square(x, y, s);
Draw a square to the opengl context
Arguments
x
The x position of the squarey
The y position of the squares
The size of the square
line(x1, y1, x2, y2);
Draw a line to the opengl context
Arguments
x1
The x position of the first pointy1
The y position of the first pointx2
The x position of the second pointy2
The y position of the second point
quad(x1, y1, x2, y2, x3, y3, x4, y4);
Draw a quad on the screen
Arguments
x1
The x position of the first pointy1
The y position of the first pointx2
The x position of the second pointy2
The y position of the second pointx3
The x position of the third pointy3
The y position of the third pointx4
The x position of the fourth pointy4
The y position of the fourth point
point();
Draw a point on the screen
arc();
Draw an arc on the screen
ellipse();
Draw an ellipse on the screen
triangle();
Draw a triangle on the screen
beginShape(mode);
Begin adding vertices to a custom shape
Arguments
mode
The opengl shape mode LINES
, POINTS
, QUADS
, TRIANGLES
, TRIANGLE_FAN
The following would draw a 100 by 100 square at position 100, 100
+
lu5 | shapes shapes
v0.0.6circle(x, y, d);
Draw a circle to the opengl context
Arguments
x
The x position of the circley
The y position of the circled
The diameter of the circle
rect(x, y, w, h);
Draw a rectangle to the opengl context
Arguments
x
The x position of the reactangley
The y position of the reactanglew
The widthh
The height
square(x, y, s);
Draw a square to the opengl context
Arguments
x
The x position of the squarey
The y position of the squares
The size of the square
line(x1, y1, x2, y2);
Draw a line to the opengl context
Arguments
x1
The x position of the first pointy1
The y position of the first pointx2
The x position of the second pointy2
The y position of the second point
quad(x1, y1, x2, y2, x3, y3, x4, y4);
Draw a quad on the screen
Arguments
x1
The x position of the first pointy1
The y position of the first pointx2
The x position of the second pointy2
The y position of the second pointx3
The x position of the third pointy3
The y position of the third pointx4
The x position of the fourth pointy4
The y position of the fourth point
point();
Draw a point on the screen
arc();
Draw an arc on the screen
ellipse();
Draw an ellipse on the screen
triangle();
Draw a triangle on the screen
beginShape(mode);
Begin adding vertices to a custom shape
Arguments
mode
The opengl shape mode LINES
, POINTS
, QUADS
, TRIANGLES
, TRIANGLE_FAN
The following would draw a 100 by 100 square at position 100, 100
The following would draw a 100 by 100 square at position 100, 100
beginShape(QUADS);
vertex(100, 100);
vertex(100, 200);
diff --git a/docs/latest/typography/index.html b/docs/latest/typography/index.html
index dfc1478f..5205b6bf 100644
--- a/docs/latest/typography/index.html
+++ b/docs/latest/typography/index.html
@@ -1,4 +1,4 @@
-lu5 | typography typography
v0.0.6loadFont(path);
Load a font
Arguments
path
The font path on the local systemReturns
font
The image reference function setup()
+lu5 | typography typography
v0.0.6loadFont(path);
Load a font
Arguments
path
The font path on the local systemReturns
font
The image reference function setup()
createWindow(600, 600);
font = loadFont('/path/to/myfont.ttf');
end
diff --git a/docs/latest/vector/index.html b/docs/latest/vector/index.html
index 34c898e4..47de00cc 100644
--- a/docs/latest/vector/index.html
+++ b/docs/latest/vector/index.html
@@ -1,4 +1,4 @@
-lu5 | vector vector
v0.0.6createVector(x, y);
Create a vector instance
Arguments
x
The first component of the vectory
The second component of the vectorReturns
Vector
The created vector local a = createVector(3, 5);
+lu5 | vector vector
v0.0.6createVector(x, y);
Create a vector instance
Arguments
x
The first component of the vectory
The second component of the vectorReturns
Vector
The created vector local a = createVector(3, 5);
local b = createVector(1, 3);
local c = a:add(b);
diff --git a/docs/latest/window/index.html b/docs/latest/window/index.html
index f9f2165a..9be43560 100644
--- a/docs/latest/window/index.html
+++ b/docs/latest/window/index.html
@@ -1,4 +1,4 @@
-lu5 | window window
v0.0.6createWindow(w, h);
Create a GLFW window.
Arguments
w
Window widthh
Window heightIt is also possible to create a window in the global scope without defining a setup function.
function setup()
+lu5 | window window
v0.0.6createWindow(w, h);
Create a GLFW window.
Arguments
w
Window widthh
Window heightIt is also possible to create a window in the global scope without defining a setup function.
function setup()
-- Create the window here
createWindow(600, 600);
end
diff --git a/docs/v0.0.6/classes/index.html b/docs/v0.0.6/classes/index.html
index 79b2b909..66d8fc15 100644
--- a/docs/v0.0.6/classes/index.html
+++ b/docs/v0.0.6/classes/index.html
@@ -1,4 +1,4 @@
-lu5 | classes classes
v0.0.6class(name);
Create a class.
if a class implements a print
method, it can be used in the print
function
Arguments
name
The class name local Player = class('Player');
+lu5 | classes classes
v0.0.6class(name);
Create a class.
if a class implements a print
method, it can be used in the print
function
Arguments
name
The class name local Player = class('Player');
function Player:init(x, y)
self.x = x;
diff --git a/docs/v0.0.6/image/index.html b/docs/v0.0.6/image/index.html
index 33e8b792..035b06a3 100644
--- a/docs/v0.0.6/image/index.html
+++ b/docs/v0.0.6/image/index.html
@@ -1,4 +1,4 @@
-lu5 | image image
v0.0.6loadImage(path);
Load a png or jpeg image
Arguments
path
The local image pathReturns
img
The image reference function setup()
+lu5 | image image
v0.0.6loadImage(path);
Load a png or jpeg image
Arguments
path
The local image pathReturns
img
The image reference function setup()
createWindow(600, 600);
img = loadImage('/path/to/mypic.png');
end
diff --git a/docs/v0.0.6/index.html b/docs/v0.0.6/index.html
index dee8fb81..a2532b11 100644
--- a/docs/v0.0.6/index.html
+++ b/docs/v0.0.6/index.html
@@ -1 +1 @@
-lu5 | Reference Reference
v0.0.6classes
\ No newline at end of file
+lu5 | Reference Reference
v0.0.6classes
\ No newline at end of file
diff --git a/docs/v0.0.6/io/index.html b/docs/v0.0.6/io/index.html
index 1ba8b630..5fe0c564 100644
--- a/docs/v0.0.6/io/index.html
+++ b/docs/v0.0.6/io/index.html
@@ -1,4 +1,4 @@
-lu5 | io io
v0.0.6print(value);
Printing utility, can take any lua type.
Arguments
value
The value to print to stdout print(42);
+lu5 | io io
v0.0.6print(value);
Printing utility, can take any lua type.
Arguments
value
The value to print to stdout print(42);
print(1, 2, 3);
diff --git a/docs/v0.0.6/keyboard/index.html b/docs/v0.0.6/keyboard/index.html
index e4063c6a..9881e201 100644
--- a/docs/v0.0.6/keyboard/index.html
+++ b/docs/v0.0.6/keyboard/index.html
@@ -1,4 +1,4 @@
-lu5 | keyboard keyboard
v0.0.6keyIsDown(k);
Check if a keyboard key is pressed, returns true
if key is down and returns false
if it's not
Arguments
k
The keyboard key to check as a key global, or a stringReturns
boolean
Whether or not the key is down -- Use a string
+lu5 | keyboard keyboard
v0.0.6keyIsDown(k);
Check if a keyboard key is pressed, returns true
if key is down and returns false
if it's not
Arguments
k
The keyboard key to check as a key global, or a stringReturns
boolean
Whether or not the key is down -- Use a string
if (keyIsDown('a')) then
-- key 'a' is down
end
diff --git a/docs/v0.0.6/math/index.html b/docs/v0.0.6/math/index.html
index 869ad59d..00383dcb 100644
--- a/docs/v0.0.6/math/index.html
+++ b/docs/v0.0.6/math/index.html
@@ -1,4 +1,4 @@
-lu5 | math math
v0.0.6randomSeed(seed);
Set a random seed
Arguments
seed
The seed valueReturns
number
The random value
random(min, max);
Get a random number
Arguments
min
The minimum of the rangemax
The maximum of the rangeReturns
number
The random value random() -- random number between 0 and 1
+lu5 | math math
v0.0.6randomSeed(seed);
Set a random seed
Arguments
seed
The seed valueReturns
number
The random value
random(min, max);
Get a random number
Arguments
min
The minimum of the rangemax
The maximum of the rangeReturns
number
The random value random() -- random number between 0 and 1
random(3) -- random number between 0 and 3
random(3, 12) -- random number between 3 and 12
diff --git a/docs/v0.0.6/mouse/index.html b/docs/v0.0.6/mouse/index.html
index b6516f6b..dbf5a0f0 100644
--- a/docs/v0.0.6/mouse/index.html
+++ b/docs/v0.0.6/mouse/index.html
@@ -1,4 +1,4 @@
-lu5 | mouse mouse
v0.0.6mouseX
GlobalThe x mouse coordinate
createWindow(400, 400);
+lu5 | mouse mouse
v0.0.6mouseX
GlobalThe x mouse coordinate
createWindow(400, 400);
function draw()
background(51);
diff --git a/docs/v0.0.6/setting/index.html b/docs/v0.0.6/setting/index.html
index 65006cd3..df686648 100644
--- a/docs/v0.0.6/setting/index.html
+++ b/docs/v0.0.6/setting/index.html
@@ -1,3 +1,3 @@
-lu5 | setting setting
v0.0.6background(r, g, b, a);
Clear a background with a color
Arguments
r
The red byteg
The green byteb
The blue bytea
The alpha byte
fill(r, g, b, [a]);
Set the fill color for shapes
Arguments
r
The red byteg
The green byteb
The blue byte[a]
The alpha byteCan also accept a hexadecimal or color name as string
fill(255, 150, 40);
+lu5 | setting setting
v0.0.6background(r, g, b, a);
Clear a background with a color
Arguments
r
The red byteg
The green byteb
The blue bytea
The alpha byte
fill(r, g, b, [a]);
Set the fill color for shapes
Arguments
r
The red byteg
The green byteb
The blue byte[a]
The alpha byteCan also accept a hexadecimal or color name as string
fill(255, 150, 40);
square(200, 200, 64);
strokeWeight(weight);
No description
Arguments
weight
The line width in pixels strokeWeight(8);
line(200, 200, mouseX, mouseY);
noFill();
Disable fill
stroke(r, g, b, a);
Set the stroke color for shapes
Arguments
r
The red byteg
The green byteb
The blue bytea
The alpha byteOnly implemented for line
and circle
noStroke();
Disable stroke
Only implemented for line
and circle
push();
Save the style settings
pop();
Restore the style settings
\ No newline at end of file
diff --git a/docs/v0.0.6/shapes/index.html b/docs/v0.0.6/shapes/index.html
index 3555fd91..3fd488d4 100644
--- a/docs/v0.0.6/shapes/index.html
+++ b/docs/v0.0.6/shapes/index.html
@@ -1,4 +1,4 @@
-lu5 | shapes shapes
v0.0.6circle(x, y, d);
Draw a circle to the opengl context
Arguments
x
The x position of the circley
The y position of the circled
The diameter of the circle
rect(x, y, w, h);
Draw a rectangle to the opengl context
Arguments
x
The x position of the reactangley
The y position of the reactanglew
The widthh
The height
square(x, y, s);
Draw a square to the opengl context
Arguments
x
The x position of the squarey
The y position of the squares
The size of the square
line(x1, y1, x2, y2);
Draw a line to the opengl context
Arguments
x1
The x position of the first pointy1
The y position of the first pointx2
The x position of the second pointy2
The y position of the second point
quad(x1, y1, x2, y2, x3, y3, x4, y4);
Draw a quad on the screen
Arguments
x1
The x position of the first pointy1
The y position of the first pointx2
The x position of the second pointy2
The y position of the second pointx3
The x position of the third pointy3
The y position of the third pointx4
The x position of the fourth pointy4
The y position of the fourth point
point();
Draw a point on the screen
arc();
Draw an arc on the screen
ellipse();
Draw an ellipse on the screen
triangle();
Draw a triangle on the screen
beginShape(mode);
Begin adding vertices to a custom shape
Arguments
mode
The opengl shape mode LINES
, POINTS
, QUADS
, TRIANGLES
, TRIANGLE_FAN
The following would draw a 100 by 100 square at position 100, 100
+
lu5 | shapes shapes
v0.0.6circle(x, y, d);
Draw a circle to the opengl context
Arguments
x
The x position of the circley
The y position of the circled
The diameter of the circle
rect(x, y, w, h);
Draw a rectangle to the opengl context
Arguments
x
The x position of the reactangley
The y position of the reactanglew
The widthh
The height
square(x, y, s);
Draw a square to the opengl context
Arguments
x
The x position of the squarey
The y position of the squares
The size of the square
line(x1, y1, x2, y2);
Draw a line to the opengl context
Arguments
x1
The x position of the first pointy1
The y position of the first pointx2
The x position of the second pointy2
The y position of the second point
quad(x1, y1, x2, y2, x3, y3, x4, y4);
Draw a quad on the screen
Arguments
x1
The x position of the first pointy1
The y position of the first pointx2
The x position of the second pointy2
The y position of the second pointx3
The x position of the third pointy3
The y position of the third pointx4
The x position of the fourth pointy4
The y position of the fourth point
point();
Draw a point on the screen
arc();
Draw an arc on the screen
ellipse();
Draw an ellipse on the screen
triangle();
Draw a triangle on the screen
beginShape(mode);
Begin adding vertices to a custom shape
Arguments
mode
The opengl shape mode LINES
, POINTS
, QUADS
, TRIANGLES
, TRIANGLE_FAN
The following would draw a 100 by 100 square at position 100, 100
The following would draw a 100 by 100 square at position 100, 100
beginShape(QUADS);
vertex(100, 100);
vertex(100, 200);
diff --git a/docs/v0.0.6/typography/index.html b/docs/v0.0.6/typography/index.html
index dfc1478f..5205b6bf 100644
--- a/docs/v0.0.6/typography/index.html
+++ b/docs/v0.0.6/typography/index.html
@@ -1,4 +1,4 @@
-lu5 | typography typography
v0.0.6loadFont(path);
Load a font
Arguments
path
The font path on the local systemReturns
font
The image reference function setup()
+lu5 | typography typography
v0.0.6loadFont(path);
Load a font
Arguments
path
The font path on the local systemReturns
font
The image reference function setup()
createWindow(600, 600);
font = loadFont('/path/to/myfont.ttf');
end
diff --git a/docs/v0.0.6/vector/index.html b/docs/v0.0.6/vector/index.html
index 34c898e4..47de00cc 100644
--- a/docs/v0.0.6/vector/index.html
+++ b/docs/v0.0.6/vector/index.html
@@ -1,4 +1,4 @@
-lu5 | vector vector
v0.0.6createVector(x, y);
Create a vector instance
Arguments
x
The first component of the vectory
The second component of the vectorReturns
Vector
The created vector local a = createVector(3, 5);
+lu5 | vector vector
v0.0.6createVector(x, y);
Create a vector instance
Arguments
x
The first component of the vectory
The second component of the vectorReturns
Vector
The created vector local a = createVector(3, 5);
local b = createVector(1, 3);
local c = a:add(b);
diff --git a/docs/v0.0.6/window/index.html b/docs/v0.0.6/window/index.html
index f9f2165a..9be43560 100644
--- a/docs/v0.0.6/window/index.html
+++ b/docs/v0.0.6/window/index.html
@@ -1,4 +1,4 @@
-lu5 | window window
v0.0.6createWindow(w, h);
Create a GLFW window.
Arguments
w
Window widthh
Window heightIt is also possible to create a window in the global scope without defining a setup function.
function setup()
+lu5 | window window
v0.0.6createWindow(w, h);
Create a GLFW window.
Arguments
w
Window widthh
Window heightIt is also possible to create a window in the global scope without defining a setup function.
function setup()
-- Create the window here
createWindow(600, 600);
end
diff --git a/tasks/lib/components/layout/Head.lua b/tasks/lib/components/layout/Head.lua
index 2150bd26..19ad3f73 100644
--- a/tasks/lib/components/layout/Head.lua
+++ b/tasks/lib/components/layout/Head.lua
@@ -10,7 +10,7 @@ local luax = require('tasks/lib/luax');
---
function Head(props)
local title = 'lu5 | ' .. props.page_name;
- local thumbnail = props.meta.url ..'/' .. props.media.thumbnail;
+ local thumbnail = props.meta.url .. '/' .. props.media.assets .. '/' .. props.media.thumbnail;
return luax('head', {
luax('meta', {charset='UTF-8'}),
@@ -59,7 +59,9 @@ function Head(props)
'gtag("js", new Date());',
'gtag("config", "', props.ga.gtag_id ,'");'
}),
-
+
+ -- Icon & Title
+ luax('link', {rel="icon", type="image/svg", href=props.root .. props.media.assets .. "/logo.svg"}),
luax('title', title);
})
end