Skip to content

Commit

Permalink
docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasvlevi committed May 8, 2024
1 parent 4492984 commit 447471a
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 32 deletions.
2 changes: 1 addition & 1 deletion docs/assets/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 48 additions & 1 deletion docs/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,55 @@ <h1 class="module">events</h1>
</header>


<div class="method" id="isKeyDown"><code>isKeyDown(k);</code><p>Check if a keyboard key is pressed, returns <code class="inline">true</code> if key is down and returns <code class="inline">false</code> if it's not</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">k</code><span class="text desc">The keyboard key to check
<div class="method" id="isKeyDown"><div><code>isKeyDown(k);</code></div><p>Check if a keyboard key is pressed, returns <code class="inline">true</code> if key is down and returns <code class="inline">false</code> if it's not</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">k</code><span class="text desc">The keyboard key to check
</span></div></div><h4>Returns</h4><div class="param"><code class="name">boolean</code><span class="text desc">Whether or not the key is down</span></div><p></p><br/></div>
<div class="method" id="mousePressed"><div><code>mousePressed(button);</code><span class="decorator">Event</span></div><p>Called when a mouse button is pressed.</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">button</code><span class="text desc">The pressed mouse button
</span></div></div><p><br/>
In the following example, the circle's size increases when the user clicks the mouse.</p><pre><code class="language-lua"> size = 0;

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

function draw()
background(51);

circle(mouseX, mouseY, size);
end

-- Increase circle size when mouse pressed
function mousePressed()
size = size + 1;
end</code></pre><br/></div>
<div class="method" id="mouseReleased"><div><code>mouseReleased(button);</code><span class="decorator">Event</span></div><p>Called when a mouse button is released.</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">button</code><span class="text desc">The released mouse button
</span></div></div><p><br/>
In the following example, the circle's size increases when the user clicks the mouse.</p><pre><code class="language-lua"> size = 32;

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

function draw()
background(51);

circle(mouseX, mouseY, size);
end

-- Set larger circle size
function mousePressed()
size = 64;
end

-- Reset size
function mouseReleased()
size = 32;
end</code></pre><br/></div>
<div class="method" id="keyPressed"><div><code>keyPressed(key);</code><span class="decorator">Event</span></div><p>Called whenever a key is pressed.</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">key</code><span class="text desc">The pressed key
</span></div></div><p></p><br/></div>
<div class="method" id="keyReleased"><div><code>keyReleased(key);</code><span class="decorator">Event</span></div><p>Called whenever a key is released.</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">key</code><span class="text desc">The released key
</span></div></div><p></p><br/></div>
<div class="method" id="keyHeld"><div><code>keyHeld(key);</code><span class="decorator">Event</span></div><p>Called whenever a key is held down.</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">key</code><span class="text desc">The held key
</span></div></div><p></p><br/></div>
</main>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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></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>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>loaders</h3><ul><li class="index"><a class="dark index" href="./loaders.html#loadFont">loadFont</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>events</h3><ul><li class="index"><a class="dark index" href="./events.html#isKeyDown">isKeyDown</a></li></ul></div></div>
<div class="modules" id="reactive"><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>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>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></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>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>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 @@ -32,7 +32,7 @@ <h1 class="module">io</h1>
</header>


<div class="method" id="print"><code>print(value);</code><p>Printing utility, can take any lua type (except objects).</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">value</code><span class="text desc">The value to print to stdout
<div class="method" id="print"><div><code>print(value);</code></div><p>Printing utility, can take any lua type (except objects).</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">value</code><span class="text desc">The value to print to stdout
</span></div></div><p></p><br/></div>
</main>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/loaders.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h1 class="module">loaders</h1>
</header>


<div class="method" id="loadFont"><code>loadFont(path);</code><p>Load a font face</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">path</code><span class="text desc">The font path on the local system
<div class="method" id="loadFont"><div><code>loadFont(path);</code></div><p>Load a font face</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">path</code><span class="text desc">The font path on the local system
</span></div></div><p></p><pre><code class="language-lua"> function setup()
createWindow(600, 600);
myfont = loadFont('/path/to/myfont.ttf');
Expand Down
12 changes: 6 additions & 6 deletions docs/math.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ <h1 class="module">math</h1>
</header>


<div class="method" id="round"><code>round(x);</code><p>Round a number to the nearest integer</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The value to round
<div class="method" id="round"><div><code>round(x);</code></div><p>Round a number to the nearest integer</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The value to round
</span></div></div><h4>Returns</h4><div class="param"><code class="name">int</code><span class="text desc">The rounded value</span></div><p></p><br/></div>
<div class="method" id="floor"><code>floor(x);</code><p><a href="https://en.wikipedia.org/wiki/Floor_and_ceiling_functions">see here</a>
<div class="method" id="floor"><div><code>floor(x);</code></div><p><a href="https://en.wikipedia.org/wiki/Floor_and_ceiling_functions">see here</a>
floor is a function that takes in a number, and returns the greatest integer less or equal to x</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The value to floor
</span></div></div><h4>Returns</h4><div class="param"><code class="name">int</code><span class="text desc">greatest integer less than or equals to x</span></div><p></p><br/></div>
<div class="method" id="ceil"><code>ceil(x);</code><p><a href="https://en.wikipedia.org/wiki/Floor_and_ceiling_functions">see here</a>
<div class="method" id="ceil"><div><code>ceil(x);</code></div><p><a href="https://en.wikipedia.org/wiki/Floor_and_ceiling_functions">see here</a>
ceil is a function that takes in a number, and returns the smallest integer greater or equal to x</p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The value to floor
</span></div></div><h4>Returns</h4><div class="param"><code class="name">int</code><span class="text desc">The floored value</span></div><p></p><br/></div>
<div class="method" id="sin"><code>sin(x);</code><p>Sine function (Trigonometry) </p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The input value
<div class="method" id="sin"><div><code>sin(x);</code></div><p>Sine function (Trigonometry) </p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The input value
</span></div></div><h4>Returns</h4><div class="param"><code class="name">number</code><span class="text desc">The output value</span></div><p></p><br/></div>
<div class="method" id="cos"><code>cos(x);</code><p>Cosine function (Trigonometry) </p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The input value
<div class="method" id="cos"><div><code>cos(x);</code></div><p>Cosine function (Trigonometry) </p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The input value
</span></div></div><h4>Returns</h4><div class="param"><code class="name">number</code><span class="text desc">The output value</span></div><p></p><br/></div>
<div class="method" id="tan"><code>tan(x);</code><p>Tangent function (Trigonometry) </p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The input value
<div class="method" id="tan"><div><code>tan(x);</code></div><p>Tangent function (Trigonometry) </p><h4>Arguments</h4><div class="params"><div class="param"><code class="name">x</code><span class="text desc">The input value
</span></div></div><h4>Returns</h4><div class="param"><code class="name">number</code><span class="text desc">The output value</span></div><p></p><br/></div>
</main>
</body>
Expand Down
Loading

0 comments on commit 447471a

Please sign in to comment.