Skip to main content

global

Namespace

Namespace in the Lens Scripting API.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Variables

VariableDescription
debugRenderSystemReturns the DebugRender, which provides methods to draw primitive visuals for debugging.
deviceInfoSystemReturns the global DeviceInfoSystem, which provides information about the device running the Lens.
hapticFeedbackSystemReturns the HapticFeedbackSystem, which provides methods to trigger the device's haptic system.
launchParamsReturns the global GeneralDataStore for Launch Params, which provides any special data passed in when the Lens is launched.
localizationSystemReturns the global LocalizationSystem, which helps convert times, dates, and other units to user friendly strings.
persistentStorageSystemReturns the global PersistentStorageSystem, which allows data to persist between Lens sessions.
sceneReturns the global ScriptScene object, which offers information and controls for the current scene.
textInputSystemReturns the TextInputSystem, which provides methods to access the device's keyboard and typing systems. and typing systems.
touchSystemReturns the global TouchDataProvider, which controls how the Lens handles touch events.
userContextSystemReturns the global UserContextSystem, which provides information about the user such as display name, birthday, and even current weather.