How to: Do Simulation
// "token" is a property in which you can put a custom value that
// will be available during the next code execution
context.token += 0.1;
var value = Math.sin(context.token) * 50;
return value;

Last updated
// "token" is a property in which you can put a custom value that
// will be available during the next code execution
context.token += 0.1;
var value = Math.sin(context.token) * 50;
return value;

Last updated
// ...by default, token is null
if (context.token == null)
context.token = 0;
else context.token += 1;
if (context.token > 50)
context.token = -50;
var value = context.token;
return value;