ecmascript:

// TODO:        * authors please update the following metadata for this file *
// Description: Editable example ECMAscript (javascript) source file for use with X3D Script node
// Filename:    newECMAscript.js
// Author:      Don Brutzman
// Identifier:  http://www.web3d.org/x3d/content/examples/newECMAscript.js
// Created:     11 December 2007
// Revised:     11 December 2007
// Reference:   http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Scripts
// License:     license.html

function initialize (timestamp)
{
    // The initialize() function is automatically invoked when the Script node is first activated, prior to other events

    scriptName = 'newEcmascript.js'; // TODO:  authors need to edit scriptName or else remove all uses
    Browser.print ('[' + scriptName + ' initialize() commmenced...]');

    // TODO:  authors need to insert initialization code (if any)

    Browser.print ('[...' + scriptName + ' initialize() complete]');
    // initialize() can also be invoked by other functions, if appropriate
}

function myInputOnlyFieldName (myInputValue, timestamp) // all timestamp parameters optional
{
    // TODO:  authors need to insert script code for outputOnly or inputOutput fields, rename to match Script field definitions

    myOutputOnlyFieldName = someFunction (myInputValue);  // TODO:  replace this line
}

