Skip to content

Commit

Permalink
deploy: 0b35f2b
Browse files Browse the repository at this point in the history
  • Loading branch information
dwursteisen committed Dec 29, 2023
1 parent 656725a commit 043e4c5
Show file tree
Hide file tree
Showing 10 changed files with 258 additions and 10 deletions.
120 changes: 119 additions & 1 deletion dependencies/tiny-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -2846,13 +2846,131 @@ <h4 id="_tiny_exit">tiny.exit()</h4>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_vec2">vec2</h3>
<div class="paragraph">
<p>Vector2 manipulation library.</p>
</div>
<div class="sect3">
<h4 id="_vec2_create">vec2.create()</h4>
<div class="paragraph">
<p>Create a vector 2 as a table { x, y }</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_add">vec2.add()</h4>
<div class="paragraph">
<p>Add vector2 to another vector2</p>
</div>
<tiny-editor style="display: none;">

function _init()
gfx.camera(-128, -128)

local v1 = vec2.create(32, 38)
local v2 = vec2.create(20, 2)

gfx.cls()
print("v1", 2, 15, 10)
shape.line(0, 0, v1.x, v1.y, 10)
print("v2", 23, 3, 9)
shape.line(0, 0, v2.x, v2.y, 9)

local v3 = vec2.add(v1, v2)

print("v1 + v2", 30, 15, 11)
gfx.dither(0xAAAA)
shape.line(0, 0, v3.x, v3.y, 11)
gfx.dither()
end

</tiny-editor>
</div>
<div class="sect3">
<h4 id="_vec2_sub">vec2.sub()</h4>
<div class="paragraph">
<p>Subtract another vector to a vector</p>
</div>
<tiny-editor style="display: none;">

function _init()
gfx.camera(-128, -128)

local v1 = vec2.create(32, 38)
local v2 = vec2.create(20, 2)

gfx.cls()
print("v1", 18, 15, 10)
shape.line(0, 0, v1.x, v1.y, 10)
print("v2", 23, 3, 9)
shape.line(0, 0, v2.x, v2.y, 9)

local v3 = vec2.sub(v1, v2)

print("v1 - v2", 0, 40, 11)
gfx.dither(0xAAAA)
shape.line(0, 0, v3.x, v3.y, 11)
gfx.dither()
end

</tiny-editor>
</div>
<div class="sect3">
<h4 id="_vec2_dot">vec2.dot()</h4>
<div class="paragraph">
<p>Dot product between two vectors</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_mag">vec2.mag()</h4>
<div class="paragraph">
<p>Calculate the magnitude (length) of a vector</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_nor">vec2.nor()</h4>
<div class="paragraph">
<p>Normalize a vector</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_crs">vec2.crs()</h4>
<div class="paragraph">
<p>Cross product</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_scl">vec2.scl()</h4>
<div class="paragraph">
<p>Scale a vector</p>
</div>
<tiny-editor style="display: none;">

function _init()
gfx.camera(-128, -128)

local v1 = vec2.create(32, 38)
local v2 = vec2.scl(v1, 2)

gfx.cls()
print("v1 scaled", 8, 60, 11)
gfx.dither(0xAAAA)
shape.line(0, 0, v2.x, v2.y, 11)
gfx.dither()
print("v1", 18, 15, 10)
shape.line(0, 0, v1.x, v1.y, 10)
end

</tiny-editor>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Version main<br>
Last updated 2023-12-20 22:45:19 UTC
Last updated 2023-12-29 12:25:30 UTC
</div>
</div>
</body>
Expand Down
132 changes: 131 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,18 @@ <h1>Tiny 🧸</h1>
<li><a href="#_tiny_exit">tiny.exit()</a></li>
</ul>
</li>
<li><a href="#_vec2">vec2</a>
<ul class="sectlevel3">
<li><a href="#_vec2_create">vec2.create()</a></li>
<li><a href="#_vec2_add">vec2.add()</a></li>
<li><a href="#_vec2_sub">vec2.sub()</a></li>
<li><a href="#_vec2_dot">vec2.dot()</a></li>
<li><a href="#_vec2_mag">vec2.mag()</a></li>
<li><a href="#_vec2_nor">vec2.nor()</a></li>
<li><a href="#_vec2_crs">vec2.crs()</a></li>
<li><a href="#_vec2_scl">vec2.scl()</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#_links">Links</a></li>
Expand Down Expand Up @@ -4013,6 +4025,124 @@ <h4 id="_tiny_exit">tiny.exit()</h4>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_vec2">vec2</h3>
<div class="paragraph">
<p>Vector2 manipulation library.</p>
</div>
<div class="sect3">
<h4 id="_vec2_create">vec2.create()</h4>
<div class="paragraph">
<p>Create a vector 2 as a table { x, y }</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_add">vec2.add()</h4>
<div class="paragraph">
<p>Add vector2 to another vector2</p>
</div>
<tiny-editor style="display: none;">

function _init()
gfx.camera(-128, -128)

local v1 = vec2.create(32, 38)
local v2 = vec2.create(20, 2)

gfx.cls()
print("v1", 2, 15, 10)
shape.line(0, 0, v1.x, v1.y, 10)
print("v2", 23, 3, 9)
shape.line(0, 0, v2.x, v2.y, 9)

local v3 = vec2.add(v1, v2)

print("v1 + v2", 30, 15, 11)
gfx.dither(0xAAAA)
shape.line(0, 0, v3.x, v3.y, 11)
gfx.dither()
end

</tiny-editor>
</div>
<div class="sect3">
<h4 id="_vec2_sub">vec2.sub()</h4>
<div class="paragraph">
<p>Subtract another vector to a vector</p>
</div>
<tiny-editor style="display: none;">

function _init()
gfx.camera(-128, -128)

local v1 = vec2.create(32, 38)
local v2 = vec2.create(20, 2)

gfx.cls()
print("v1", 18, 15, 10)
shape.line(0, 0, v1.x, v1.y, 10)
print("v2", 23, 3, 9)
shape.line(0, 0, v2.x, v2.y, 9)

local v3 = vec2.sub(v1, v2)

print("v1 - v2", 0, 40, 11)
gfx.dither(0xAAAA)
shape.line(0, 0, v3.x, v3.y, 11)
gfx.dither()
end

</tiny-editor>
</div>
<div class="sect3">
<h4 id="_vec2_dot">vec2.dot()</h4>
<div class="paragraph">
<p>Dot product between two vectors</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_mag">vec2.mag()</h4>
<div class="paragraph">
<p>Calculate the magnitude (length) of a vector</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_nor">vec2.nor()</h4>
<div class="paragraph">
<p>Normalize a vector</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_crs">vec2.crs()</h4>
<div class="paragraph">
<p>Cross product</p>
</div>
</div>
<div class="sect3">
<h4 id="_vec2_scl">vec2.scl()</h4>
<div class="paragraph">
<p>Scale a vector</p>
</div>
<tiny-editor style="display: none;">

function _init()
gfx.camera(-128, -128)

local v1 = vec2.create(32, 38)
local v2 = vec2.scl(v1, 2)

gfx.cls()
print("v1 scaled", 8, 60, 11)
gfx.dither(0xAAAA)
shape.line(0, 0, v2.x, v2.y, 11)
gfx.dither()
print("v1", 18, 15, 10)
shape.line(0, 0, v1.x, v1.y, 10)
end

</tiny-editor>
</div>
</div>
</div>
</div>
<div class="sect1">
Expand All @@ -4034,7 +4164,7 @@ <h2 id="_links">Links</h2>
<div id="footer">
<div id="footer-text">
Version main<br>
Last updated 2023-12-20 22:41:48 UTC
Last updated 2023-12-29 12:22:16 UTC
</div>
</div>
<style>
Expand Down
2 changes: 1 addition & 1 deletion sample/tiny-engine.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ <h2 id="_examples">Examples</h2>
<div id="footer">
<div id="footer-text">
Version main<br>
Last updated 2023-12-20 22:41:48 UTC
Last updated 2023-12-29 12:22:16 UTC
</div>
</div>
<script src="tiny-web-editor.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tiny-cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ <h4 id="_examples">Examples</h4>
<div id="footer">
<div id="footer-text">
Version main<br>
Last updated 2023-12-20 22:41:48 UTC
Last updated 2023-12-29 12:22:16 UTC
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion tiny-install.html
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ <h2 id="_tiny_install">Tiny Install</h2>
<div id="footer">
<div id="footer-text">
Version main<br>
Last updated 2023-12-20 22:41:48 UTC
Last updated 2023-12-29 12:22:16 UTC
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion tiny-showcase.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ <h2 id="_tiny_showcase">Tiny Showcase</h2>
<div id="footer">
<div id="footer-text">
Version main<br>
Last updated 2023-12-20 22:41:48 UTC
Last updated 2023-12-29 12:22:16 UTC
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion tiny-tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ <h3 id="_step_3_draw_the_game">Step 3: Draw the Game</h3>
<div id="footer">
<div id="footer-text">
Version main<br>
Last updated 2023-12-20 22:41:48 UTC
Last updated 2023-12-29 12:22:16 UTC
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion tiny-web-editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tiny-web-editor.js.map

Large diffs are not rendered by default.

0 comments on commit 043e4c5

Please sign in to comment.