Table of contents
Chapter index
Previous slide
Next slide
407
Initializing a program script
Writing program scripts with JavaScript
Initializing a program script
The optional
initialize
function is called when the script is loaded
function initialize ( ) { . . . }
Initialization occurs when:
the
Script
node is created (typically when the browser loads the world)