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 | Interpreter for Creative Coding

Interpreter for Creative Coding

Lu5 is a free and open-source Lua interpreter for Creative Coding.

Documentation

Builds

\ No newline at end of file +lu5 | Interpreter for Creative Coding

Interpreter for Creative Coding

Lu5 is a free and open-source Lua interpreter for Creative Coding.

Documentation

Builds

\ No newline at end of file diff --git a/docs/latest/classes/index.html b/docs/latest/classes/index.html index 79b2b909..66d8fc15 100644 --- a/docs/latest/classes/index.html +++ b/docs/latest/classes/index.html @@ -1,4 +1,4 @@ -lu5 | classes

classes

v0.0.6
class(name);

Create a class.
if a class implements a print method, it can be used in the print function

Arguments

nameThe class name

 local Player = class('Player');
+lu5 | classes

classes

v0.0.6
class(name);

Create a class.
if a class implements a print method, it can be used in the print function

Arguments

nameThe 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.6
loadImage(path);

Load a png or jpeg image

Arguments

pathThe local image path

Returns

imgThe image reference

 function setup()
+lu5 | image

image

v0.0.6
loadImage(path);

Load a png or jpeg image

Arguments

pathThe local image path

Returns

imgThe 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.6
\ No newline at end of file +lu5 | Reference

Reference

v0.0.6
\ 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.6
print(value);

Printing utility, can take any lua type.

Arguments

valueThe value to print to stdout

 print(42);
+lu5 | io

io

v0.0.6
print(value);

Printing utility, can take any lua type.

Arguments

valueThe 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.6
keyIsDown(k);

Check if a keyboard key is pressed, returns true if key is down and returns false if it's not

Arguments

kThe keyboard key to check as a key global, or a string

Returns

booleanWhether or not the key is down

 -- Use a string 
+lu5 | keyboard

keyboard

v0.0.6
keyIsDown(k);

Check if a keyboard key is pressed, returns true if key is down and returns false if it's not

Arguments

kThe keyboard key to check as a key global, or a string

Returns

booleanWhether 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.6
randomSeed(seed);

Set a random seed

Arguments

seedThe seed value

Returns

numberThe random value


random(min, max);

Get a random number

Arguments

minThe minimum of the range
maxThe maximum of the range

Returns

numberThe random value

 random()      -- random number between 0 and 1
+lu5 | math

math

v0.0.6
randomSeed(seed);

Set a random seed

Arguments

seedThe seed value

Returns

numberThe random value


random(min, max);

Get a random number

Arguments

minThe minimum of the range
maxThe maximum of the range

Returns

numberThe 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.6
mouseXGlobal

The x mouse coordinate

 createWindow(400, 400);
+lu5 | mouse

mouse

v0.0.6
mouseXGlobal

The 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.6
background(r, g, b, a);

Clear a background with a color

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte


fill(r, g, b, [a]);

Set the fill color for shapes

Arguments

rThe red byte
gThe green byte
bThe blue byte
[a]The alpha byte

Can also accept a hexadecimal or color name as string

 fill(255, 150, 40);
+lu5 | setting

setting

v0.0.6
background(r, g, b, a);

Clear a background with a color

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte


fill(r, g, b, [a]);

Set the fill color for shapes

Arguments

rThe red byte
gThe green byte
bThe blue byte
[a]The alpha byte

Can also accept a hexadecimal or color name as string

 fill(255, 150, 40);
  square(200, 200, 64);

strokeWeight(weight);

No description

Arguments

weightThe 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

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte

Only 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.6
circle(x, y, d);

Draw a circle to the opengl context

Arguments

xThe x position of the circle
yThe y position of the circle
dThe diameter of the circle


rect(x, y, w, h);

Draw a rectangle to the opengl context

Arguments

xThe x position of the reactangle
yThe y position of the reactangle
wThe width
hThe height


square(x, y, s);

Draw a square to the opengl context

Arguments

xThe x position of the square
yThe y position of the square
sThe size of the square


line(x1, y1, x2, y2);

Draw a line to the opengl context

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point


quad(x1, y1, x2, y2, x3, y3, x4, y4);

Draw a quad on the screen

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point
x3The x position of the third point
y3The y position of the third point
x4The x position of the fourth point
y4The 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

modeThe 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.6
circle(x, y, d);

Draw a circle to the opengl context

Arguments

xThe x position of the circle
yThe y position of the circle
dThe diameter of the circle


rect(x, y, w, h);

Draw a rectangle to the opengl context

Arguments

xThe x position of the reactangle
yThe y position of the reactangle
wThe width
hThe height


square(x, y, s);

Draw a square to the opengl context

Arguments

xThe x position of the square
yThe y position of the square
sThe size of the square


line(x1, y1, x2, y2);

Draw a line to the opengl context

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point


quad(x1, y1, x2, y2, x3, y3, x4, y4);

Draw a quad on the screen

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point
x3The x position of the third point
y3The y position of the third point
x4The x position of the fourth point
y4The 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

modeThe 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.6
loadFont(path);

Load a font

Arguments

pathThe font path on the local system

Returns

fontThe image reference

 function setup()
+lu5 | typography

typography

v0.0.6
loadFont(path);

Load a font

Arguments

pathThe font path on the local system

Returns

fontThe 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.6
createVector(x, y);

Create a vector instance

Arguments

xThe first component of the vector
yThe second component of the vector

Returns

VectorThe created vector

 local a = createVector(3, 5);
+lu5 | vector

vector

v0.0.6
createVector(x, y);

Create a vector instance

Arguments

xThe first component of the vector
yThe second component of the vector

Returns

VectorThe 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.6
createWindow(w, h);

Create a GLFW window.

Arguments

wWindow width
hWindow height

It is also possible to create a window in the global scope without defining a setup function.

 function setup()
+lu5 | window

window

v0.0.6
createWindow(w, h);

Create a GLFW window.

Arguments

wWindow width
hWindow height

It 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.6
class(name);

Create a class.
if a class implements a print method, it can be used in the print function

Arguments

nameThe class name

 local Player = class('Player');
+lu5 | classes

classes

v0.0.6
class(name);

Create a class.
if a class implements a print method, it can be used in the print function

Arguments

nameThe 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.6
loadImage(path);

Load a png or jpeg image

Arguments

pathThe local image path

Returns

imgThe image reference

 function setup()
+lu5 | image

image

v0.0.6
loadImage(path);

Load a png or jpeg image

Arguments

pathThe local image path

Returns

imgThe 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.6
\ No newline at end of file +lu5 | Reference

Reference

v0.0.6
\ 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.6
print(value);

Printing utility, can take any lua type.

Arguments

valueThe value to print to stdout

 print(42);
+lu5 | io

io

v0.0.6
print(value);

Printing utility, can take any lua type.

Arguments

valueThe 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.6
keyIsDown(k);

Check if a keyboard key is pressed, returns true if key is down and returns false if it's not

Arguments

kThe keyboard key to check as a key global, or a string

Returns

booleanWhether or not the key is down

 -- Use a string 
+lu5 | keyboard

keyboard

v0.0.6
keyIsDown(k);

Check if a keyboard key is pressed, returns true if key is down and returns false if it's not

Arguments

kThe keyboard key to check as a key global, or a string

Returns

booleanWhether 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.6
randomSeed(seed);

Set a random seed

Arguments

seedThe seed value

Returns

numberThe random value


random(min, max);

Get a random number

Arguments

minThe minimum of the range
maxThe maximum of the range

Returns

numberThe random value

 random()      -- random number between 0 and 1
+lu5 | math

math

v0.0.6
randomSeed(seed);

Set a random seed

Arguments

seedThe seed value

Returns

numberThe random value


random(min, max);

Get a random number

Arguments

minThe minimum of the range
maxThe maximum of the range

Returns

numberThe 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.6
mouseXGlobal

The x mouse coordinate

 createWindow(400, 400);
+lu5 | mouse

mouse

v0.0.6
mouseXGlobal

The 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.6
background(r, g, b, a);

Clear a background with a color

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte


fill(r, g, b, [a]);

Set the fill color for shapes

Arguments

rThe red byte
gThe green byte
bThe blue byte
[a]The alpha byte

Can also accept a hexadecimal or color name as string

 fill(255, 150, 40);
+lu5 | setting

setting

v0.0.6
background(r, g, b, a);

Clear a background with a color

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte


fill(r, g, b, [a]);

Set the fill color for shapes

Arguments

rThe red byte
gThe green byte
bThe blue byte
[a]The alpha byte

Can also accept a hexadecimal or color name as string

 fill(255, 150, 40);
  square(200, 200, 64);

strokeWeight(weight);

No description

Arguments

weightThe 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

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte

Only 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.6
circle(x, y, d);

Draw a circle to the opengl context

Arguments

xThe x position of the circle
yThe y position of the circle
dThe diameter of the circle


rect(x, y, w, h);

Draw a rectangle to the opengl context

Arguments

xThe x position of the reactangle
yThe y position of the reactangle
wThe width
hThe height


square(x, y, s);

Draw a square to the opengl context

Arguments

xThe x position of the square
yThe y position of the square
sThe size of the square


line(x1, y1, x2, y2);

Draw a line to the opengl context

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point


quad(x1, y1, x2, y2, x3, y3, x4, y4);

Draw a quad on the screen

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point
x3The x position of the third point
y3The y position of the third point
x4The x position of the fourth point
y4The 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

modeThe 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.6
circle(x, y, d);

Draw a circle to the opengl context

Arguments

xThe x position of the circle
yThe y position of the circle
dThe diameter of the circle


rect(x, y, w, h);

Draw a rectangle to the opengl context

Arguments

xThe x position of the reactangle
yThe y position of the reactangle
wThe width
hThe height


square(x, y, s);

Draw a square to the opengl context

Arguments

xThe x position of the square
yThe y position of the square
sThe size of the square


line(x1, y1, x2, y2);

Draw a line to the opengl context

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point


quad(x1, y1, x2, y2, x3, y3, x4, y4);

Draw a quad on the screen

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point
x3The x position of the third point
y3The y position of the third point
x4The x position of the fourth point
y4The 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

modeThe 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.6
loadFont(path);

Load a font

Arguments

pathThe font path on the local system

Returns

fontThe image reference

 function setup()
+lu5 | typography

typography

v0.0.6
loadFont(path);

Load a font

Arguments

pathThe font path on the local system

Returns

fontThe 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.6
createVector(x, y);

Create a vector instance

Arguments

xThe first component of the vector
yThe second component of the vector

Returns

VectorThe created vector

 local a = createVector(3, 5);
+lu5 | vector

vector

v0.0.6
createVector(x, y);

Create a vector instance

Arguments

xThe first component of the vector
yThe second component of the vector

Returns

VectorThe 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.6
createWindow(w, h);

Create a GLFW window.

Arguments

wWindow width
hWindow height

It is also possible to create a window in the global scope without defining a setup function.

 function setup()
+lu5 | window

window

v0.0.6
createWindow(w, h);

Create a GLFW window.

Arguments

wWindow width
hWindow height

It 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