docs: regenerate site from f094acfdb5

This commit is contained in:
ludic-docs-bot 2026-09-17 22:10:03 +00:00
commit 63c5ed9baf
975 changed files with 55427 additions and 0 deletions

22
ns-prefab.html Normal file
View file

@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Prefab — Ludic</title>
<meta name="description" content="A prefab is a model with preset component fields — prefab Grunt: Creature { Stats { hp: 30 }, Weapon { def_id: 1 } } — spawned with spawn Grunt { Position { x:…">
<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">Prefab</span></div>
<div class="item-head"><span class="kind-badge kind-namespace">namespace</span><h1 id="top">Prefab</h1></div>
<p class="ns-blurb">A <code>prefab</code> is a model with preset component fields — <code>prefab Grunt: Creature { Stats { hp: 30 }, Weapon { def_id: 1 } }</code> — spawned with <code>spawn Grunt { Position { x: 40 } }</code>, where the spawn's own fields override the presets. Prefabs chain (<code>prefab Grunt: Foe</code>, where <code>Foe</code> is itself a prefab) so shared presets live once. <code>spawn</code> is also an expression yielding the new entity (<code>let e = spawn Grunt { … }</code>), and <a href="prefab-spawn"><code>Prefab.spawn</code></a> spawns a prefab chosen at runtime by name.</p>
<div class="ns-methods"><a class="ns-method" href="prefab-spawn.html"><code class="nm-sig">Prefab.spawn(name: s) -&gt; entity</code><span class="nm-tip">Spawn a prefab chosen by name at runtime; -1 if none has that name.</span></a><a class="ns-method" href="prefab-spawn_at.html"><code class="nm-sig">Prefab.spawn_at(name: s, at: IVec2) -&gt; entity</code><span class="nm-tip">Spawn a prefab by name and place it.</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>