Add camera and debug modules
This commit is contained in:
46
docs/api/modules/camera.md
Normal file
46
docs/api/modules/camera.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# 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").
|
||||
|
||||
76
docs/api/modules/debug.md
Normal file
76
docs/api/modules/debug.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# debug
|
||||
|
||||
### stack_depth() <sub>function</sub>
|
||||
|
||||
Return the current stack depth.
|
||||
|
||||
|
||||
|
||||
**Returns**: A number representing the stack depth.
|
||||
|
||||
|
||||
### build_backtrace() <sub>function</sub>
|
||||
|
||||
Build and return a backtrace of the current call stack.
|
||||
|
||||
|
||||
|
||||
**Returns**: An object representing the call stack backtrace.
|
||||
|
||||
|
||||
### closure_vars(fn) <sub>function</sub>
|
||||
|
||||
Return the closure variables for a given function.
|
||||
|
||||
|
||||
|
||||
**fn**: The function object to inspect.
|
||||
|
||||
|
||||
**Returns**: An object containing the closure variables.
|
||||
|
||||
|
||||
### local_vars(depth) <sub>function</sub>
|
||||
|
||||
Return the local variables for a specific stack frame.
|
||||
|
||||
|
||||
|
||||
**depth**: The stack frame depth to inspect.
|
||||
|
||||
|
||||
**Returns**: An object containing the local variables at the specified depth.
|
||||
|
||||
|
||||
### fn_info(fn) <sub>function</sub>
|
||||
|
||||
Return metadata about a given function.
|
||||
|
||||
|
||||
|
||||
**fn**: The function object to inspect.
|
||||
|
||||
|
||||
**Returns**: An object with metadata about the function.
|
||||
|
||||
|
||||
### backtrace_fns() <sub>function</sub>
|
||||
|
||||
Return an array of functions in the current backtrace.
|
||||
|
||||
|
||||
|
||||
**Returns**: An array of function objects from the call stack.
|
||||
|
||||
|
||||
### dump_obj(obj) <sub>function</sub>
|
||||
|
||||
Return a string representation of a given object.
|
||||
|
||||
|
||||
|
||||
**obj**: The object to dump.
|
||||
|
||||
|
||||
**Returns**: A string describing the object's contents.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -66,23 +66,3 @@ and booleans for pressed buttons (left, middle, right, x1, x2).
|
||||
|
||||
**Returns**: Object { x, y, left, middle, right, x1, x2 }
|
||||
|
||||
|
||||
### mouse <sub>object</sub>
|
||||
|
||||
### keyboard <sub>object</sub>
|
||||
|
||||
### print_pawn_kbm(pawn) <sub>function</sub>
|
||||
|
||||
### procdown() <sub>function</sub>
|
||||
|
||||
### print_md_kbm(pawn) <sub>function</sub>
|
||||
|
||||
### has_bind(pawn, bind) <sub>function</sub>
|
||||
|
||||
### action <sub>object</sub>
|
||||
|
||||
### tabcomplete(val, list) <sub>function</sub>
|
||||
|
||||
### do_uncontrol(pawn) <sub>function</sub>
|
||||
|
||||
### player <sub>object</sub>
|
||||
|
||||
@@ -174,12 +174,17 @@ Return the application's base directory (where the executable is located).
|
||||
**Returns**: A string with the base directory path.
|
||||
|
||||
|
||||
### userdir() <sub>function</sub>
|
||||
### prefdir(org, app) <sub>function</sub>
|
||||
|
||||
Return the user's directory, often used for saving data.
|
||||
Get the user-and-app-specific path where files can be written.
|
||||
|
||||
|
||||
|
||||
**org**: The name of your organization.
|
||||
|
||||
**app**: The name of your application.
|
||||
|
||||
|
||||
**Returns**: A string with the user's directory path.
|
||||
|
||||
|
||||
|
||||
@@ -33,71 +33,3 @@
|
||||
### imgui(...args) <sub>function</sub>
|
||||
|
||||
### app(...args) <sub>function</sub>
|
||||
|
||||
### date <sub>string</sub>
|
||||
|
||||
### camera <sub>object</sub>
|
||||
|
||||
### debug <sub>boolean</sub>
|
||||
|
||||
### semver <sub>object</sub>
|
||||
|
||||
### title <sub>string</sub>
|
||||
|
||||
### width <sub>number</sub>
|
||||
|
||||
### height <sub>number</sub>
|
||||
|
||||
### size <sub>object</sub>
|
||||
|
||||
### icon <sub>object</sub>
|
||||
|
||||
### high_dpi <sub>number</sub>
|
||||
|
||||
### alpha <sub>number</sub>
|
||||
|
||||
### fullscreen <sub>number</sub>
|
||||
|
||||
### sample_count <sub>number</sub>
|
||||
|
||||
### enable_clipboard <sub>boolean</sub>
|
||||
|
||||
### enable_dragndrop <sub>boolean</sub>
|
||||
|
||||
### max_dropped_files <sub>number</sub>
|
||||
|
||||
### swap_interval <sub>number</sub>
|
||||
|
||||
### name <sub>string</sub>
|
||||
|
||||
### identifier <sub>string</sub>
|
||||
|
||||
### creator <sub>string</sub>
|
||||
|
||||
### copyright <sub>string</sub>
|
||||
|
||||
### type <sub>string</sub>
|
||||
|
||||
### url <sub>string</sub>
|
||||
|
||||
### postvals <sub>object</sub>
|
||||
|
||||
### hudcam <sub>object</sub>
|
||||
|
||||
### appcam <sub>object</sub>
|
||||
|
||||
### screencolor <sub>object</sub>
|
||||
|
||||
### window <sub>object</sub>
|
||||
|
||||
An application window, created via prosperon.engine_start or SDL calls. Freed on GC.
|
||||
|
||||
|
||||
### font <sub>object</sub>
|
||||
|
||||
### gpu <sub>object</sub>
|
||||
|
||||
A handle for low-level GPU operations via SDL GPU. Freed on GC.
|
||||
|
||||
|
||||
### exit() <sub>function</sub>
|
||||
|
||||
Reference in New Issue
Block a user