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>
52 lines
858 B
Markdown
52 lines
858 B
Markdown
---
|
|
title: "camera"
|
|
type: docs
|
|
---
|
|
|
|
# camera
|
|
|
|
### list() <sub>function</sub>
|
|
|
|
Return an array of available camera device IDs.
|
|
|
|
|
|
|
|
**Returns**: An array of camera IDs, or undefined if no cameras are available.
|
|
|
|
|
|
### open(id) <sub>function</sub>
|
|
|
|
Open a camera device with the given ID.
|
|
|
|
|
|
|
|
**id**: The camera ID to open.
|
|
|
|
|
|
**Returns**: A camera object on success, or throws an error if the camera cannot be opened.
|
|
|
|
|
|
### name(id) <sub>function</sub>
|
|
|
|
Return the name of the camera with the given ID.
|
|
|
|
|
|
|
|
**id**: The camera ID to query.
|
|
|
|
|
|
**Returns**: A string with the camera's name, or throws an error if the name cannot be retrieved.
|
|
|
|
|
|
### position(id) <sub>function</sub>
|
|
|
|
Return the physical position of the camera with the given ID.
|
|
|
|
|
|
|
|
**id**: The camera ID to query.
|
|
|
|
|
|
**Returns**: A string indicating the camera position ("unknown", "front", or "back").
|
|
|