Skip to content

Commit

Permalink
class docs
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasvlevi committed May 9, 2024
1 parent b8c3e2b commit b66d37c
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 9 deletions.
65 changes: 65 additions & 0 deletions docs/classes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />

<link rel="stylesheet" href="./assets/style.css" />
<script type="text/javascript" src="./assets/index.js"></script>

<link rel="stylesheet" href="./assets/lu5-hljs-theme.css">
<script src="./assets/hljs.min.js"></script>

<script>hljs.highlightAll();</script>

<title>classes | Documentation</title>
</head>
<body>
<div class="nav" id="menu">
<br/>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li><li class="btn"><a class="light" href="./classes.html"><h4>classes</h4></a></li></ul>
</div>
<main>
<header>
<a href="./"><img width="100px" src="./assets/logo.svg"/></a>
<h1 class="module">classes</h1>
<button class="menuBtn" onclick="toggleMenu()">
<img class="menuIcon" width="40px" src="./assets/arrow_left.svg"/>
</button>

<span class="text version">v0.0.3</span>
</header>


<div class="method" id="class"><div class="methodDeclaration"><code>class(name);</code></div><p>Create a metatable</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">name</code><span class="text desc">The class name
</span></div></div><p></p><pre><code class="language-lua"> local Player = class('Player');

function Player:init(x, y)
self.x = x;
self.y = y;
return self;
end

function Player:draw()
circle(self.x, self.y, 16);
end


-- Create 2 players and draw them
local p1 = Player:new(100, 200);
local p2 = Player:new(300, 200);

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

function draw()
background(51);

p1:draw();
p2:draw();
end</code></pre><br/></div>
</main>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div class="nav" id="menu">
<br/>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li></ul>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li><li class="btn"><a class="light" href="./classes.html"><h4>classes</h4></a></li></ul>
</div>
<main>
<header>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div class="nav" id="menu">
<br/>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li></ul>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li><li class="btn"><a class="light" href="./classes.html"><h4>classes</h4></a></li></ul>
</div>
<main>
<header>
Expand All @@ -31,7 +31,7 @@ <h1 class="module">Reference</h1>
<span class="text version">v0.0.3</span>
</header>

<div class="modules" id="reactive"><div class="summary"><h3>window</h3><ul><li class="index"><a class="dark index" href="./window.html#createWindow">createWindow</a></li><li class="index"><a class="dark index" href="./window.html#background">background</a></li><li class="index"><a class="dark index" href="./window.html#frameRate">frameRate</a></li></ul></div><div class="summary"><h3>loaders</h3><ul><li class="index"><a class="dark index" href="./loaders.html#loadFont">loadFont</a></li></ul></div><div class="summary"><h3>events</h3><ul><li class="index"><a class="dark index" href="./events.html#isKeyDown">isKeyDown</a></li><li class="index"><a class="dark index" href="./events.html#mousePressed">mousePressed</a></li><li class="index"><a class="dark index" href="./events.html#mouseReleased">mouseReleased</a></li><li class="index"><a class="dark index" href="./events.html#keyPressed">keyPressed</a></li><li class="index"><a class="dark index" href="./events.html#keyReleased">keyReleased</a></li><li class="index"><a class="dark index" href="./events.html#keyHeld">keyHeld</a></li></ul></div><div class="summary"><h3>shapes</h3><ul><li class="index"><a class="dark index" href="./shapes.html#circle">circle</a></li><li class="index"><a class="dark index" href="./shapes.html#rect">rect</a></li><li class="index"><a class="dark index" href="./shapes.html#square">square</a></li><li class="index"><a class="dark index" href="./shapes.html#line">line</a></li><li class="index"><a class="dark index" href="./shapes.html#quad">quad</a></li><li class="index"><a class="dark index" href="./shapes.html#text">text</a></li><li class="index"><a class="dark index" href="./shapes.html#point">point</a></li><li class="index"><a class="dark index" href="./shapes.html#arc">arc</a></li><li class="index"><a class="dark index" href="./shapes.html#ellipse">ellipse</a></li><li class="index"><a class="dark index" href="./shapes.html#triangle">triangle</a></li></ul></div><div class="summary"><h3>io</h3><ul><li class="index"><a class="dark index" href="./io.html#print">print</a></li></ul></div><div class="summary"><h3>setting</h3><ul><li class="index"><a class="dark index" href="./setting.html#fill">fill</a></li><li class="index"><a class="dark index" href="./setting.html#strokeWeight">strokeWeight</a></li><li class="index"><a class="dark index" href="./setting.html#noFill">noFill</a></li><li class="index"><a class="dark index" href="./setting.html#stroke">stroke</a></li><li class="index"><a class="dark index" href="./setting.html#noStroke">noStroke</a></li><li class="index"><a class="dark index" href="./setting.html#textSize">textSize</a></li><li class="index"><a class="dark index" href="./setting.html#textFont">textFont</a></li></ul></div><div class="summary"><h3>math</h3><ul><li class="index"><a class="dark index" href="./math.html#round">round</a></li><li class="index"><a class="dark index" href="./math.html#floor">floor</a></li><li class="index"><a class="dark index" href="./math.html#ceil">ceil</a></li><li class="index"><a class="dark index" href="./math.html#sin">sin</a></li><li class="index"><a class="dark index" href="./math.html#cos">cos</a></li><li class="index"><a class="dark index" href="./math.html#tan">tan</a></li></ul></div></div>
<div class="modules" id="reactive"><div class="summary"><h3>setting</h3><ul><li class="index"><a class="dark index" href="./setting.html#fill">fill</a></li><li class="index"><a class="dark index" href="./setting.html#strokeWeight">strokeWeight</a></li><li class="index"><a class="dark index" href="./setting.html#noFill">noFill</a></li><li class="index"><a class="dark index" href="./setting.html#stroke">stroke</a></li><li class="index"><a class="dark index" href="./setting.html#noStroke">noStroke</a></li><li class="index"><a class="dark index" href="./setting.html#textSize">textSize</a></li><li class="index"><a class="dark index" href="./setting.html#textFont">textFont</a></li></ul></div><div class="summary"><h3>io</h3><ul><li class="index"><a class="dark index" href="./io.html#print">print</a></li></ul></div><div class="summary"><h3>loaders</h3><ul><li class="index"><a class="dark index" href="./loaders.html#loadFont">loadFont</a></li></ul></div><div class="summary"><h3>window</h3><ul><li class="index"><a class="dark index" href="./window.html#createWindow">createWindow</a></li><li class="index"><a class="dark index" href="./window.html#background">background</a></li><li class="index"><a class="dark index" href="./window.html#frameRate">frameRate</a></li></ul></div><div class="summary"><h3>classes</h3><ul><li class="index"><a class="dark index" href="./classes.html#class">class</a></li></ul></div><div class="summary"><h3>math</h3><ul><li class="index"><a class="dark index" href="./math.html#round">round</a></li><li class="index"><a class="dark index" href="./math.html#floor">floor</a></li><li class="index"><a class="dark index" href="./math.html#ceil">ceil</a></li><li class="index"><a class="dark index" href="./math.html#sin">sin</a></li><li class="index"><a class="dark index" href="./math.html#cos">cos</a></li><li class="index"><a class="dark index" href="./math.html#tan">tan</a></li></ul></div><div class="summary"><h3>events</h3><ul><li class="index"><a class="dark index" href="./events.html#isKeyDown">isKeyDown</a></li><li class="index"><a class="dark index" href="./events.html#mousePressed">mousePressed</a></li><li class="index"><a class="dark index" href="./events.html#mouseReleased">mouseReleased</a></li><li class="index"><a class="dark index" href="./events.html#keyPressed">keyPressed</a></li><li class="index"><a class="dark index" href="./events.html#keyReleased">keyReleased</a></li><li class="index"><a class="dark index" href="./events.html#keyHeld">keyHeld</a></li></ul></div><div class="summary"><h3>shapes</h3><ul><li class="index"><a class="dark index" href="./shapes.html#circle">circle</a></li><li class="index"><a class="dark index" href="./shapes.html#rect">rect</a></li><li class="index"><a class="dark index" href="./shapes.html#square">square</a></li><li class="index"><a class="dark index" href="./shapes.html#line">line</a></li><li class="index"><a class="dark index" href="./shapes.html#quad">quad</a></li><li class="index"><a class="dark index" href="./shapes.html#text">text</a></li><li class="index"><a class="dark index" href="./shapes.html#point">point</a></li><li class="index"><a class="dark index" href="./shapes.html#arc">arc</a></li><li class="index"><a class="dark index" href="./shapes.html#ellipse">ellipse</a></li><li class="index"><a class="dark index" href="./shapes.html#triangle">triangle</a></li></ul></div></div>
</main>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/io.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div class="nav" id="menu">
<br/>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li></ul>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li><li class="btn"><a class="light" href="./classes.html"><h4>classes</h4></a></li></ul>
</div>
<main>
<header>
Expand Down
2 changes: 1 addition & 1 deletion docs/loaders.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div class="nav" id="menu">
<br/>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li></ul>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li><li class="btn"><a class="light" href="./classes.html"><h4>classes</h4></a></li></ul>
</div>
<main>
<header>
Expand Down
2 changes: 1 addition & 1 deletion docs/math.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div class="nav" id="menu">
<br/>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li></ul>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li><li class="btn"><a class="light" href="./classes.html"><h4>classes</h4></a></li></ul>
</div>
<main>
<header>
Expand Down
2 changes: 1 addition & 1 deletion docs/setting.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div class="nav" id="menu">
<br/>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li></ul>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li><li class="btn"><a class="light" href="./classes.html"><h4>classes</h4></a></li></ul>
</div>
<main>
<header>
Expand Down
2 changes: 1 addition & 1 deletion docs/shapes.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div class="nav" id="menu">
<br/>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li></ul>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li><li class="btn"><a class="light" href="./classes.html"><h4>classes</h4></a></li></ul>
</div>
<main>
<header>
Expand Down
2 changes: 1 addition & 1 deletion docs/window.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div class="nav" id="menu">
<br/>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li></ul>
<ul><li class="btn"><a class="light" href="./window.html"><h4>window</h4></a></li><li class="btn"><a class="light" href="./shapes.html"><h4>shapes</h4></a></li><li class="btn"><a class="light" href="./setting.html"><h4>setting</h4></a></li><li class="btn"><a class="light" href="./math.html"><h4>math</h4></a></li><li class="btn"><a class="light" href="./loaders.html"><h4>loaders</h4></a></li><li class="btn"><a class="light" href="./io.html"><h4>io</h4></a></li><li class="btn"><a class="light" href="./events.html"><h4>events</h4></a></li><li class="btn"><a class="light" href="./classes.html"><h4>classes</h4></a></li></ul>
</div>
<main>
<header>
Expand Down

0 comments on commit b66d37c

Please sign in to comment.