Skip to content

Latest commit

Β 

History

History
162 lines (111 loc) Β· 4.74 KB

File metadata and controls

162 lines (111 loc) Β· 4.74 KB

Perro Docs

Use this reference when you know the system, file, command, or API you need. Start with the Perro Book for a guided first project.

Goal

Find one trusted page fast, see the ownership model, copy a complete example, and know what failure looks like before the code runs.

Mental Model

Perro docs follow the same runtime split as the engine:

project files -> compiler + CLI -> packed assets -> runtime -> script context

Script context windows stay explicit:

  • ctx.run -> live scene, nodes, time, signals, and runtime mutation
  • ctx.res -> assets, resource formats, and resource lifetime
  • ctx.ipt -> keyboard, mouse, gamepad, and action input

Use / Avoid

Use the book for a linear path.

Use reference pages for exact calls, fields, limits, and failure behavior.

Avoid copying a single API call without its ownership and lifetime rules.

Avoid using history pages as current guidance.

Page Table

Start

Author

Script

Runtime

Assets

Platforms

Ship

Reference

History

History and audit pages preserve decisions, measurements, and migration notes. Use current guides for implementation.

Data Flow

Search reads titles, summaries, headings, slugs, and the first body segment. Group filters narrow results without changing canonical routes.

markdown -> build validation -> generated docs data
         -> left nav + article + right TOC
         -> search + deep links + prev/next

Full Example

To add player input:

  1. Read Input for the decision model.
  2. Use Input API for context ownership.
  3. Pick Actions for remappable input.
  4. Copy a complete example and keep its failure checks.
  5. Run perro check before perro dev.

Failure Behavior

The website build fails on empty summaries, duplicate routes, duplicate heading IDs, missing nav groups, broken internal docs links, and broken anchors.

Unknown docs routes render the shared 404 page.

Performance + Compatibility

Search runs against generated local text.

No hosted search service or client index fetch sits on the reading path.

Docs work with SSR, hydration, keyboard navigation, and reduced motion.

API Reference

Use the Book API Map for topic-to-reference links.

Use the generated docs search for exact call names.

Related Pages