Files
prosperon/docs/api/modules/resources.md
John Alanbrook 83b798e365 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>
2026-02-23 18:09:55 -06:00

74 lines
1.5 KiB
Markdown

---
title: "resources"
type: docs
---
# resources
### scripts <sub>object</sub>
### images <sub>object</sub>
### sounds <sub>object</sub>
### fonts <sub>object</sub>
### lib <sub>object</sub>
### canonical(file) <sub>function</sub>
### find_image(...args) <sub>function</sub>
### find_sound(...args) <sub>function</sub>
### find_script(...args) <sub>function</sub>
### find_font(...args) <sub>function</sub>
### getAllFiles(dir) <sub>function</sub>
Return a list of recognized files in the given directory that are not matched by
.prosperonignore, skipping directories. Recognized extensions include scripts,
images, sounds, fonts, and libs.
**dir**: The directory to search.
**Returns**: An array of recognized file paths.
### gatherStats(filePaths) <sub>function</sub>
Analyze a list of recognized files and categorize them by scripts, images, sounds,
fonts, libs, or other. Return a stats object with these counts and the total.
**filePaths**: An array of file paths to analyze.
**Returns**: { scripts, images, sounds, fonts, lib, other, total }
### pack(dir, outPath) <sub>function</sub>
Create a ZIP archive of all recognized files (skipping those matched by .prosperonignore)
in the specified directory and write it to outPath. Recognized extensions are scripts,
images, sounds, fonts, or libs.
:raises Error: If the directory does not exist.
**dir**: The directory to zip.
**outPath**: The path (including filename) for the resulting ZIP file.
**Returns**: None