Slow Glass System Commands
Slow Glass supports a number of system commands. Typically you won’t need these but they may be useful for debugging or for advanced use.
Console Messages
(log | print) {text}...
The text is written to the JavaScript console.
This command completes immediately.
Finish
Finish [{url}]
Rather abruptly just stop the app.
No further completion events happen, however if the calling page has set up a completion call back it will be invoked with the given URL as an argument. In this way scripts can be chained together if required, for example to have one act of a play follow another.
Breakpoint (for development only)
breakpoint (now | group | update)
Cause a debugger breakpoint immediately, at the end of the group of actions or before the next update.
Future Intentions
I’d like to add the following commands:
post [to] {URL} {variable-name}...
Generates a POST command to the given URL where the form content is of the form:
variable-name: variable-value
and so on, for each given variable name
The intention of this command is to pass requests to external services, for example I’d like to set up a web service on a Raspberry PI to flash some LEDs or run some motors to accompany the animation.
This command completes immediately.
send [to] {URL} {text}...
Send the given text as arguments to the given URL, I’m not sure yet what to do with the responses to these commands.