Add Hugo website and rewrite docs to match current engine

New Hugo site in website/ with prosperon.dev theme (blue/gold/castle
aesthetic), docs sidebar navigation, and content pages. Rewrote all
doc files to align with the actual codebase: compositor+film2d
rendering, use() modules (no global prosperon object), Pit language,
script+JSON entity model. Added entities.md, front matter to all
70+ API docs, and updated API index for current module architecture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 18:09:55 -06:00
parent 1619122a58
commit 83b798e365
106 changed files with 2749 additions and 492 deletions

View File

@@ -1,3 +1,8 @@
---
title: "actor"
type: docs
---
# actor
### toString() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "console"
type: docs
---
# console
The console object provides various logging, debugging, and output methods.

View File

@@ -1,5 +1,62 @@
# Appendix B - api
---
title: "API Reference"
type: docs
---
This is a complete list of accessible functions and parameters that are built into Prosperon. For the most part, developers will concern themselves with the modules, all of which can be imported with `use`.
# API Reference
Types document particular javascript objects with a specific object in their prototype chain, which can allow access to an underlying C data structure. A lot of these are used only internally by Prosperon, but brave developers can pick around in the module internals to see how they're used and do their own thing if they want!
Prosperon's API is a set of modules imported with `use()`. There is no global engine object — import only what you need.
## Game-Facing Modules
These are the modules you use to build games:
| Module | Import | Purpose |
|--------|--------|---------|
| **core** | `use('core')` | Main loop, window, GPU initialization |
| **sprite** | `use('sprite')` | Create and manage sprites |
| **compositor** | `use('compositor')` | Build render plans from scene configs |
| **camera** | `use('camera')` | Viewport into the world |
| **input** | `use('input')` | Action mapping, device routing, control stacks |
| **sound** | `use('sound')` | Audio playback and mixing |
| **world** | `use('world')` | Entity management |
| **text2d** | `use('text2d')` | Text rendering |
| **shape2d** | `use('shape2d')` | SDF-rendered shapes (rect, circle, ellipse, pill) |
| **tilemap2d** | `use('tilemap2d')` | Grid-based tile rendering |
| **line2d** | `use('line2d')` | Line rendering |
| **particles2d** | `use('particles2d')` | Particle emitters |
| **tween** | `use('tween')` | Value interpolation over time |
| **ease** | `use('ease')` | Easing functions |
| **color** | `use('color')` | Color utilities |
| **resources** | `use('resources')` | Asset path resolution |
| **action** | `use('action')` | Action definitions |
| **draw2d** | `use('draw2d')` | Immediate-mode 2D drawing |
| **clay** | `use('clay')` | UI layout |
| **point** | `use('point')` | Point/vector utilities |
## Actor Primitives
These are built into the Pit language runtime and available in all `.ce` programs:
| Primitive | Purpose |
|-----------|---------|
| `$start(callback, path)` | Spawn a child actor from a program |
| `$receiver(callback)` | Register a message handler |
| `send(target, message)` | Send a message to an actor |
| `$delay(callback, seconds)` | Schedule a one-shot callback |
| `$clock(callback, interval)` | Schedule a repeating callback |
| `$stop()` | Terminate the current actor |
## Globals
| Name | Purpose |
|------|---------|
| `use(path)` | Import a module |
| `log.console(msg)` | Print to console |
| `meme(proto, data)` | Create object with prototype and overrides |
## Internal Modules
These are used by the engine internally and not intended for direct game use:
`film2d`, `effects`, `sdl_gpu`, `graphics`, `rasterize`, `fx_graph`, `debug_imgui`, `device`, `input/backends/*`, `input/bindings`, `input/devices`, `input/router`

View File

@@ -1,3 +1,8 @@
---
title: "actor"
type: docs
---
# actor

View File

@@ -1,3 +1,8 @@
---
title: "camera"
type: docs
---
# camera
### list() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "cmd"
type: docs
---
# cmd
### length <sub>number</sub>

View File

@@ -1,3 +1,8 @@
---
title: "color"
type: docs
---
# color
### Color <sub>object</sub>

View File

@@ -1,3 +1,8 @@
---
title: "debug"
type: docs
---
# debug
### stack_depth() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "dmon"
type: docs
---
# dmon
### watch() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "doc"
type: docs
---
# doc

View File

@@ -1,3 +1,8 @@
---
title: "draw2d"
type: docs
---
# draw2d

View File

@@ -1,3 +1,8 @@
---
title: "enet"
type: docs
---
# enet
### initialize() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "event"
type: docs
---
# event
### push_event(event) <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "geometry"
type: docs
---
# geometry

View File

@@ -1,3 +1,8 @@
---
title: "graphics"
type: docs
---
# graphics

View File

@@ -1,3 +1,8 @@
---
title: "imgui"
type: docs
---
# imgui
### windowpos() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "input"
type: docs
---
# input
### mouse_show(show) <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "io"
type: docs
---
# io
### rm(path) <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "js"
type: docs
---
# js

View File

@@ -1,3 +1,8 @@
---
title: "json"
type: docs
---
# json
### encode(val,space,replacer,whitelist) <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "loop"
type: docs
---
# loop
### step() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "math"
type: docs
---
# math
### dot() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "miniz"
type: docs
---
# miniz
### read(data) <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "nota"
type: docs
---
# nota
### encode(value) <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "os"
type: docs
---
# os
### make_transform() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "packer"
type: docs
---
# packer
### getAllFiles(dir) <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "render"
type: docs
---
# render
### _main <sub>object</sub>

View File

@@ -1,3 +1,8 @@
---
title: "resources"
type: docs
---
# resources
### scripts <sub>object</sub>

View File

@@ -1,3 +1,8 @@
---
title: "sound"
type: docs
---
# sound
### undefined <sub>string</sub>

View File

@@ -1,3 +1,8 @@
---
title: "spline"
type: docs
---
# spline
### catmull() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "time"
type: docs
---
# time
The main time object, handling date/time utilities in earth-seconds.

View File

@@ -1,3 +1,8 @@
---
title: "tween"
type: docs
---
# tween
### Tween <sub>object</sub>

View File

@@ -1,3 +1,8 @@
---
title: "util"
type: docs
---
# util

View File

@@ -1,3 +1,8 @@
---
title: "video"
type: docs
---
# video
### make_video() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "prosperon"
type: docs
---
# prosperon
### c_types <sub>object</sub>

View File

@@ -1,3 +1,8 @@
---
title: "PHYSFS_File"
type: docs
---
# PHYSFS_File
A file handle opened via PhysFS for writing or reading. Freed automatically when references go away.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_Camera"
type: docs
---
# SDL_Camera
A handle to a physical camera device. Freed when references drop or camera is closed.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_Cursor"
type: docs
---
# SDL_Cursor
An SDL cursor handle. Freed automatically on GC. No direct methods.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUBuffer"
type: docs
---
# SDL_GPUBuffer
### name() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUCommandBuffer"
type: docs
---
# SDL_GPUCommandBuffer
A command buffer that accumulates rendering, copy, and compute operations. Freed after submission or GC.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUComputePass"
type: docs
---
# SDL_GPUComputePass
A compute pass for dispatching compute pipelines. Freed after end() or GC.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUComputePipeline"
type: docs
---
# SDL_GPUComputePipeline
Encapsulates a compute shader program plus associated resource layouts.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUCopyPass"
type: docs
---
# SDL_GPUCopyPass
A pass for CPU<->GPU or GPU<->GPU copy operations. No direct JS API besides internal usage.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUDevice"
type: docs
---
# SDL_GPUDevice
A handle for low-level GPU operations via SDL GPU. Freed on GC.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUFence"
type: docs
---
# SDL_GPUFence
A GPU fence for synchronization. Created upon commandBuffer.submit().

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUGraphicsPipeline"
type: docs
---
# SDL_GPUGraphicsPipeline
Encapsulates vertex+fragment shaders, blend/cull states, and vertex attribute layouts.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPURenderPass"
type: docs
---
# SDL_GPURenderPass
A single pass of drawing commands with color/depth attachments. Freed after end() or GC.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUSampler"
type: docs
---
# SDL_GPUSampler
Defines how a texture is sampled (filter mode, address mode, anisotropy, compare op, etc.).

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUShader"
type: docs
---
# SDL_GPUShader
A single compiled shader (vertex or fragment) in a GPU-friendly format

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUTexture"
type: docs
---
# SDL_GPUTexture
### name() <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "SDL_GPUTransferBuffer"
type: docs
---
# SDL_GPUTransferBuffer
A staging buffer used for copying data to or from GPU buffers/textures. Typically

View File

@@ -1,3 +1,8 @@
---
title: "SDL_Renderer"
type: docs
---
# SDL_Renderer
A 2D rendering context using the SDL renderer API. Freed automatically.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_Surface"
type: docs
---
# SDL_Surface
A software (CPU) image in memory. Freed when references vanish. Typically converted

View File

@@ -1,3 +1,8 @@
---
title: "SDL_Texture"
type: docs
---
# SDL_Texture
A 2D GPU-accelerated texture for rendering with SDL_Renderer. Freed automatically.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_Thread"
type: docs
---
# SDL_Thread
A handle to an SDL-created thread. Freed on GC after join.

View File

@@ -1,3 +1,8 @@
---
title: "SDL_Window"
type: docs
---
# SDL_Window
An application window, created via prosperon.engine_start or SDL calls. Freed on GC.

View File

@@ -1,3 +1,8 @@
---
title: "datastream"
type: docs
---
# datastream
A streaming media handle, typically for MPEG video. Freed automatically.

View File

@@ -1,3 +1,8 @@
---
title: "enet_host"
type: docs
---
# enet_host
### service(callback, timeout) <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "enet_peer"
type: docs
---
# enet_peer
### send(data) <sub>function</sub>

View File

@@ -1,3 +1,8 @@
---
title: "font"
type: docs
---
# font
A bitmap or TTF-based font object storing glyph data.

View File

@@ -1,3 +1,8 @@
---
title: "rtree"
type: docs
---
# rtree
An R-tree for spatial lookups. Insert bounding boxes, query by bounding box, etc.

View File

@@ -1,3 +1,8 @@
---
title: "sprite"
type: docs
---
# sprite
A 'sprite' is a simple struct for 2D drawing. It stores a rectangle (pos + size),

View File

@@ -1,3 +1,8 @@
---
title: "timer"
type: docs
---
# timer
A scheduled callback or countdown. Freed automatically once no longer referenced

View File

@@ -1,3 +1,8 @@
---
title: "transform"
type: docs
---
# transform
A hierarchical transform storing 3D or 2D position, rotation (as a quaternion),

View File

@@ -1,3 +1,8 @@
---
title: "use"
type: docs
---
# use
### length <sub>number</sub>