Web modules
Modules
Add an exact name@version to prototir.json and Prototir serves it from its
CDN, shared across prototypes. Each page has setup, the API and every version you can declare.
The same documentation as JSON: /modules.json. Unity packages and Godot addons belong in their engine projects instead.
Starter modules
Small Prototir-built scaffolds imported into Web code.
- Audio
prefab-audio@0.1.1Game/app audio over raw Web Audio: load samples from your bundle, play with volume/rate/loop, zero-asset beeps. Replaces maintenance-mode audio shims. Read - Audio features
prefab-audio-features@0.1.1Audio-reactive features from a native AnalyserNode: rms, energy, spectral centroid + raw bins. Mic (with consent) or any AudioNode/MediaStream. Read - Sketch
prefab-sketch@0.1.1The byte-light creative-coding loop: full-window 2D canvas, dpr scaling, resize, draw(ctx, {t, dt, mouse}), p5 ergonomics at ~1KB. Read - Hand controls
prefab-hand-controls@0.1.2Hand landmarks → pointer/pinch events; camera + MediaPipe HandLandmarker + its model weights bundled in, no separate model pack needed. Reported pointer position is smoothed (configurable) to cut per-frame detector jitter without adding lag to pinch detection. Read - Voice input planned
prefab-voice-input@0.1.0Push-to-talk → local transcript events. Read - Localization
prefab-i18n@0.1.1Localized strings and voice-over from your own bundle: Intl plurals/number/date, per-locale lazy loading, audio fallback chain. Read - Input
prefab-input@0.2.0One input API for desktop and mobile: keyboard, or fully customizable virtual controls, any number of buttons/joysticks/d-pads with position, size, shape and short/long-press semantics; same axes/pressed()/onPress() reads either way. Read - Shader canvas
prefab-shader-canvas@0.1.1Full-screen fragment shader boilerplate: uniforms for time/mouse/resolution. Read - Map
prefab-map@0.1.6Embeddable vector map: markers, popups, GeoJSON overlays, light/dark/grayscale themes, click/fly-to/pan-and-zoom. Real OpenStreetMap-derived roads, water, and towns worldwide, up to zoom 10 anywhere on Earth - no external tile host or API key, no CSP change, mandatory OSM/Protomaps attribution. The basemap is served on demand over ranged CDN fetches, like a shared image or model asset, not downloaded in full by every prototype that uses it. Read
Capabilities
Platform features brokered by the SDK rather than import-map downloads.
- Managed AI
capability-aiProvider-neutral managed AI generation through Prototir.ai. The sandbox has connect-src 'none'; requests hop through the shell to a metered, moderated gateway. Prototir owns credentials and routing, while the prototype owner's paid plan and AI credits fund usage; signed-in visitors never spend their own allowance. Read - Storage
capability-storagePer-prototype key-value persistence. Opaque-origin iframes have no reliable localStorage; the shell stores device-local values per prototype and isolates signed-in players on shared browsers. Read - Camera and microphone
capability-permissionsCamera/microphone: declared in prototir.json, granted via iframe allow= after an explicit shell-level user consent prompt. Read
Libraries
Third-party browser libraries served from the Prototir CDN and cached across prototypes.
- Three.js
three@0.185.13D rendering, the workhorse for game/art prototypes. (r185 splits into module+core files, both platform-served; r170 stays available.) Read - PixiJS
pixi@8.6.0Fast 2D WebGL renderer. Read - Phaser
phaser@4.2.1Batteries-included 2D game framework (scenes, tilemaps, arcade physics). (Phaser 4; the 3.87 API stays available as phaser@3.87.0.) Read - p5.js
p5@2.0.2Creative coding (p5 2.x). For byte-light sketches see prefab-sketch. Read - Rapier 3D physics
rapier3d@0.19.33D physics (WASM). Pairs with three. (0.19 fetches its .wasm beside the module instead of embedding it; 0.14 stays available.) Read - Matter.js physics
matter@0.20.0Lightweight 2D physics (no WASM). Read - Tone.js
tone@15.0.4Web Audio synthesis & scheduling. Read - lil-gui
lil-gui@0.20.0Tiny tweak-panel for exposing prototype parameters. Read - Motion
motion@12.42.2Animation library (vanilla Motion One API). Read - Chart.js
chart@4.4.7Charts for dashboard/tool prototypes. Read - D3
d3@7.9.0Data-driven documents for bespoke viz. Read - MapLibre GL JS
maplibre-gl@6.0.0Interactive vector maps (WebGL). The base for prefab-map; import it directly for custom map styling/layers beyond what the prefab exposes. Read - Simplex noise
simplex-noise@4.0.3Procedural noise. Read - ONNX Runtime Web
onnxruntime-web@1.27.0ONNX inference runtime (WASM + WebGPU), the base for model packs. Read - Transformers.js planned
transformers@3.2.0Pipelines over ONNX: detection, segmentation, depth, ASR, embeddings. Read - MediaPipe Vision
mediapipe-vision@0.10.18Hands / pose / face landmarks, realtime body-driven interaction. Read
Model packs
Weights and data for a runtime library, shared across compatible Web prototypes.
- RF-DETR nano object detection planned
model-rfdetr-nano@1.0.0RF-DETR nano object detection weights, real-time DETR in the browser. (YOLOv8 excluded: AGPL.) Read - Whisper tiny speech-to-text planned
model-whisper-tiny@1.0.0Local speech-to-text, voice-controlled prototypes with zero API cost. Read - Depth Anything small planned
model-depth-anything-small@1.0.0Monocular depth from the webcam, parallax/AR-ish effects. Read