Utils
This document covers miscellaneous utility globals available in the scripting environment.
num
A global method for generating random numbers. This is provided as a substitute for Math.random()
, which is not available in the app script runtime.
/**
* function num(min, max, dp=0)
*/
// get a random integer between 0 and 10
const randomInt = num(0, 10);
// get a random float between 100 and 1000 with 2 decimal places
const randomFloat = num(100, 1000, 2);
Three.js
Certain three.js
classes and methods are exposed directly in the scripting API for your convenience.
Fetch
The standard fetch
API is available for making network requests.