Exports & Events
Client Exports
Documentation for client-side exports.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Documentation for client-side exports.
---@return boolean is_active
local is_active = exports["no-camera"]:is_camera_active()
---@enum CAMERA_STATE
CAMERA_STATE = {
DEACTIVE = 0,
HOLDING = 1,
VIEWING = 2,
PHOTO_MODE = 3
}
---@return CAMERA_STATE state
local state = exports["no-camera"]:get_camera_state()
---@return boolean is_photo_mode
local is_photo_mode = exports["no-camera"]:is_photo_mode()
---@return boolean is_viewing
local is_viewing = exports["no-camera"]:is_viewing_mode()
---@return boolean is_taking_photo
local is_taking = exports["no-camera"]:is_taking_photo()
exports["no-camera"]:activate_camera()
exports["no-camera"]:deactivate_camera()
---@return boolean is_active Returns true if camera is now active
local is_active = exports["no-camera"]:toggle_camera()
---@return boolean success
---@return string? error Error message if failed
local success, error = exports["no-camera"]:enter_photo_mode()
exports["no-camera"]:exit_photo_mode()
---@return boolean is_photo_mode
local is_photo_mode = exports["no-camera"]:toggle_photo_mode()
exports["no-camera"]:enter_viewing_mode()
exports["no-camera"]:exit_viewing_mode()
exports["no-camera"]:toggle_viewing_mode()
---@return boolean success
---@return string? error Error message if failed
local success, error = exports["no-camera"]:take_photo()
---@class CameraSettingsData
---@field iso number
---@field shutter_speed string
---@field aperture number
---@field zoom_level number
---@field flash_mode string
---@return CameraSettingsData settings
local settings = exports["no-camera"]:get_camera_settings()
---@param value number ISO value (100, 200, 400, 800, 1600, 3200, 6400)
---@return boolean success
local success = exports["no-camera"]:set_iso(400)
---@param value string Shutter speed ("1/4000", "1/2000", "1/1000", "1/500", "1/250", "1/125", "1/60", "1/30", "1/15", "1/8", "1/4", "1/2", "1")
---@return boolean success
local success = exports["no-camera"]:set_shutter_speed("1/250")
---@param value number Aperture value (1.4, 2, 2.8, 4, 5.6, 8, 11, 16, 22)
---@return boolean success
local success = exports["no-camera"]:set_aperture(2.8)
---@param value number Zoom level (1, 1.5, 2, 3, 5, 10)
---@return boolean success
local success = exports["no-camera"]:set_zoom(2)
---@param value string Flash mode ("auto", "on", "off")
---@return boolean success
local success = exports["no-camera"]:set_flash_mode("auto")
---@param settings table Settings to update (iso, shutter_speed, aperture, zoom_level, flash_mode)
---@return table result { success = table, settings = table }
local result = exports["no-camera"]:update_camera_settings({
iso = 800,
aperture = 4,
flash_mode = "on"
})
exports["no-camera"]:reset_camera_settings()
---@param image string URL of the photo
---@param location string? Optional location string
---@param timestamp number? Optional timestamp
exports["no-camera"]:show_photo("https://example.com/photo.jpg", "Vinewood Hills", 1738656000000)
exports["no-camera"]:close_photo()
---@return boolean is_active
local is_active = exports["no-camera"]:is_photo_active()
exports["no-camera"]:focus_photo()
exports["no-camera"]:unfocus_photo()
---@return boolean is_focused
local is_focused = exports["no-camera"]:is_photo_focused()
---@class PhotoData
---@field image string URL of the photo
---@field location? string Location where the photo was taken
---@field timestamp? number Unix timestamp when the photo was taken
---@return PhotoData? photo The current photo data or nil if none
local photo = exports["no-camera"]:get_current_photo()
