Adding the script

JS scripts are resources and so need to be imported into the scene after which they can be applied to a Javascript node.

  1. In the Resources panel, right click then: Import Resource -> Script -> Javascript and browse to your .js file.
  2. Create a Javascript Node and then select the JS Resource in it’s properties.

Keeping the script up-to-date

The JS script becomes embedded in your project when you import it. To refresh from the source .js file, right click the resource and click Reload Resource.

Notch can watch the .js file for changes and reload when it sees updates. To enable this right click the resource and click Reflect Resource Changes.