22 lines
No EOL
3.8 KiB
HTML
22 lines
No EOL
3.8 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Map — Ludic</title>
|
||
<meta name="description" content="A character grid the game paints and reads.">
|
||
<link rel="stylesheet" href="base.css">
|
||
<link rel="stylesheet" href="docs.css">
|
||
</head>
|
||
<body>
|
||
<header class="nav"><div class="wrap nav-in"><a class="brand" href="index.html"><span class="logo">L</span> Ludic</a><button class="nav-toggle" aria-label="Toggle menu" aria-expanded="false">☰</button><nav class="nav-links"><a href="index.html">Home</a><a href="api.html">API Reference</a><a class="nav-cta" href="https://git.workshopsoft.io/workshopsoft/ludic">Source ↗</a></nav></div></header>
|
||
<main class="wrap item">
|
||
<div class="crumbs"><a href="api.html">API Reference</a> <span>›</span> <span class="here">Map</span></div>
|
||
<div class="item-head"><span class="kind-badge kind-namespace">namespace</span><h1 id="top">Map</h1></div>
|
||
<p class="ns-blurb">A character grid the game paints and reads.</p>
|
||
<div class="ns-methods"><a class="ns-method" href="map-size.html"><code class="nm-sig">Map.size(width, height)</code><span class="nm-tip">Set the tilemap dimensions in cells before filling rows.</span></a><a class="ns-method" href="map-row.html"><code class="nm-sig">Map.row(y, cells)</code><span class="nm-tip">Fill one row of the tilemap from a string of tile characters.</span></a><a class="ns-method" href="map-tile.html"><code class="nm-sig">Map.tile(x, y) -> int</code><span class="nm-tip">Read the tile character at a cell (out-of-bounds reads answer '#').</span></a><a class="ns-method" href="map-get.html"><code class="nm-sig">Map.get(x: tx, y: ty) -> int</code><span class="nm-tip">The glyph at a cell ('#' outside the map).</span></a><a class="ns-method" href="map-set.html"><code class="nm-sig">Map.set(x: tx, y: ty, glyph: g)</code><span class="nm-tip">Write one cell in place.</span></a><a class="ns-method" href="map-fill.html"><code class="nm-sig">Map.fill(glyph: g)</code><span class="nm-tip">Every cell becomes the glyph.</span></a><a class="ns-method" href="map-rect.html"><code class="nm-sig">Map.rect(x: tx, y: ty, width: w, height: h, glyph: g)</code><span class="nm-tip">Fill a rectangle of cells.</span></a><a class="ns-method" href="map-border.html"><code class="nm-sig">Map.border(glyph: g)</code><span class="nm-tip">The outermost ring of cells.</span></a><a class="ns-method" href="map-random_cell.html"><code class="nm-sig">Map.random_cell(glyph: g) -> IVec2</code><span class="nm-tip">A random cell holding the glyph (seeded RNG).</span></a><a class="ns-method" href="map-is_solid.html"><code class="nm-sig">Map.is_solid(x: tx, y: ty) -> bool</code><span class="nm-tip">Is a cell solid, per the Solids config?</span></a><a class="ns-method" href="map-is_solid_at.html"><code class="nm-sig">Map.is_solid_at(x: px, y: py) -> bool</code><span class="nm-tip">Is the cell under a pixel position solid?</span></a><a class="ns-method" href="map-width.html"><code class="nm-sig">Map.width() -> int</code><span class="nm-tip">The map's width in cells.</span></a><a class="ns-method" href="map-height.html"><code class="nm-sig">Map.height() -> int</code><span class="nm-tip">The map's height in cells.</span></a><a class="ns-method" href="map-random_cell_far.html"><code class="nm-sig">Map.random_cell_far(glyph:, from:, min_tiles:) -> IVec2</code><span class="nm-tip">A random cell with the glyph, at least a distance from a point.</span></a><a class="ns-method" href="map-to_tile.html"><code class="nm-sig">Map.to_tile(pixel: IVec2) -> IVec2</code><span class="nm-tip">The tile under a pixel position.</span></a></div>
|
||
<a class="back" href="api.html">← All symbols</a>
|
||
</main>
|
||
<script src="ludic-highlight.js"></script>
|
||
<script>Ludic.installCards(); Ludic.flashTarget();</script>
|
||
</body></html> |