mirror of
https://github.com/Reuh/ubiquitousse.git
synced 2025-10-27 09:09:30 +00:00
LDtk now only requires LÖVE for drawing
This commit is contained in:
parent
d29c839d04
commit
23f797286b
9 changed files with 108 additions and 41 deletions
|
|
@ -61,7 +61,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/ldtk.html">ldtk</a></td>
|
||||
<td class="summary"><a href="https://ldtk.io/">LDtk</a> level importer for LÖVE.</td>
|
||||
<td class="summary"><a href="https://ldtk.io/">LDtk</a> level importer for Lua and drawing using LÖVE.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/ecs.html">ecs</a></td>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2021-12-25 17:10:15 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 19:17:08 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2021-12-25 17:10:15 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 19:17:08 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1361,7 +1361,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2021-12-25 17:10:15 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 19:17:08 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -62,20 +62,22 @@
|
|||
<div id="content">
|
||||
|
||||
<h1>Module <code>ldtk</code></h1>
|
||||
<p><a href="https://ldtk.io/">LDtk</a> level importer for LÖVE.</p>
|
||||
<p><a href="https://ldtk.io/">LDtk</a> level importer for Lua and drawing using LÖVE.</p>
|
||||
<p> Support most LDtk features, and allow easy usage in LÖVE projects.</p>
|
||||
|
||||
<p> Every unit is in pixel in the API unless written otherwise.</p>
|
||||
<p> Every unit is in pixel in the API unless written otherwise.
|
||||
Colors are reprsented as a table <code>{r,g,b}</code> where <code>r</code>,<code>b</code>,<code>g</code> in [0-1].</p>
|
||||
|
||||
<p> This modules returns a single function, <a href="../modules/ldtk.html#LDtk">LDtk</a>(path).</p>
|
||||
|
||||
<p> Requires LÖVE <code>love.graphics</code> (drawing Image, SpriteBatch, Quad).</p>
|
||||
<p> No mandatory dependency.
|
||||
Requires LÖVE <code>love.graphics</code> (drawing Image, SpriteBatch, Quad) for drawing only.</p>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">local ldtk = require("ubiquitousse.ldtk")
|
||||
|
||||
-- load ldtk project file
|
||||
local project = ltdk("example.ldtk")
|
||||
local project = ldtk("example.ldtk")
|
||||
|
||||
-- can define callbacks when loading: for example to setup entities defined in LDtk
|
||||
local callbacks = {
|
||||
|
|
@ -290,7 +292,7 @@ end
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity.tile">Entity.tile</a></td>
|
||||
<td class="summary">Entity tile, if any.</td>
|
||||
<td class="summary">Tile associated with the entity, if any.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity.fields">Entity.fields</a></td>
|
||||
|
|
@ -351,6 +353,10 @@ end
|
|||
<td class="name" nowrap><a href="#Level.layers">Level.layers</a></td>
|
||||
<td class="summary">List of <a href="../modules/ldtk.html#Layer_objects">Layer</a>s in the level (table).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Level.background">Level.background</a></td>
|
||||
<td class="summary">Level background.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Project_objects">Project objects </a></h2>
|
||||
<table class="function_list">
|
||||
|
|
@ -412,6 +418,7 @@ end
|
|||
</dt>
|
||||
<dd>
|
||||
The tileset LÖVE image object.
|
||||
If LÖVE is not available, this is the path to the image (string).
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
@ -713,7 +720,11 @@ end
|
|||
</dt>
|
||||
<dd>
|
||||
<em>(Tiles, AutoLayer, or IntGrid with AutoLayer rules layers only)</em> <a href="https://love2d.org/wiki/SpriteBatch">LÖVE SpriteBatch</a> containing the layer.
|
||||
nil if LÖVE not available.
|
||||
|
||||
<h3>Requires:</h3>
|
||||
<ul>
|
||||
love
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
@ -886,6 +897,7 @@ end
|
|||
</dt>
|
||||
<dd>
|
||||
Quad associated with the tile (relative to the layer’s tileset).
|
||||
LÖVE Quad if LÖVE is available, otherwise a table <code>{ x, y, width, height }</code>.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
@ -1231,7 +1243,8 @@ end
|
|||
<strong>Entity.tile</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Entity tile, if any. Is a table { tileset = associated tileset object, quad = associated quad }.
|
||||
Tile associated with the entity, if any. Is a table { tileset = associated tileset object, quad = associated quad }.
|
||||
<a href="../modules/ldtk.html#Tile.quad">quad</a> is a LÖVE Quad if LÖVE is available, otherwise a table <code>{ x, y, width, height }</code>.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
@ -1341,9 +1354,6 @@ end
|
|||
<p> These callbacks should allow you to capture all the important elements needed to use the level, so you can hopefully
|
||||
integrate it into your current game engine easily.
|
||||
|
||||
<h3>Requires:</h3>
|
||||
<ul>
|
||||
love
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
@ -1564,6 +1574,37 @@ end
|
|||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Level.background"></a>
|
||||
<strong>Level.background</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Level background. </p>
|
||||
|
||||
<p> If there is a background image, <code>background.image</code> contains a table <code>{image=image, x=number, y=number, sx=number, sy=number}</code>
|
||||
where <a href="../modules/ldtk.html#Tileset.image">image</a> is the LÖVE image (or image filepath if LÖVE not available) <a href="../modules/ldtk.html#IntTile.x">x</a> and <a href="../modules/ldtk.html#Tile.y">y</a> are the top-left position,
|
||||
and <a href="../modules/ldtk.html#Entity.sx">sx</a> and <a href="../modules/ldtk.html#Entity.sy">sy</a> the horizontal and vertical scale factors.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Fields:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">color</span>
|
||||
backrgound color
|
||||
</li>
|
||||
<li><span class="parameter">image</span>
|
||||
backrgound image information, if any
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header has-description"><a name="Project_objects"></a>Project objects </h2>
|
||||
|
|
@ -1599,7 +1640,7 @@ end
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2021-12-25 17:10:15 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 19:17:08 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2021-12-25 17:10:15 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 19:17:08 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2021-12-25 17:10:15 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 19:17:08 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
<p>Set of various libraries I use for game development, mainly with LÖVE. Nothing that hasn’t been done before, but these are tailored to what I need. They can be used independently too.</p>
|
||||
|
||||
<p>Documentation is done in LDoc-like comments in source files, but LDoc doesn’t really like how I structure my libraries so you can’t really generate documentation with it. I'm currently trying to fix this; some modules already have a working LDoc documentation in <code>doc/</code>.</p>
|
||||
<p>Documentation is done in LDoc-like comments in source files, but LDoc doesn’t really like how I structure my libraries so you can’t really generate documentation with it. I'm currently trying to fix this; some modules already have a working LDoc documentation that you can read <a href="https://reuh.github.io/ubiquitousse/index.html">here</a> or in the <code>docs/</code> directory.</p>
|
||||
|
||||
<p>Whatever is currently on the master branch should be working and usable. Changelog, including breaking changes, are documented in commit messages.</p>
|
||||
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2021-12-25 17:10:15 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 19:17:08 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue