require
FunctionLoad a JavaScript module.
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
require(
moduleName):any
Load a JavaScript module. Used for importing another JavaScript file found in the Resources panel to be used in the current script. Similar to require found in CommonJS specification.
Parameters
| Parameter | Type |
|---|---|
moduleName | string | ScriptAsset |
Returns
any
Remarks
You can access Lens Studio specific modules (like RemoteServiceModule) using the LensStudio prefix, such as: require("LensStudio:RemoteServiceModule).