View a comprehensive history of all the new Javascript scripting feature updates and changes Construct 3 since the first release.
Fix runtime.callFunction() not working in script block (note script actions still worked)
Specific autocomplete suggestions for certain built-ins such as 'runtime'
Top-level 'function' and 'var' declarations are now shown as autocompleted properties on the global object
Accessing or setting a property on the global object will add it to the list of global variables for autocomplete
Script files in the 'Files' folder will be included for project-wide autocomplete
Prefer autocomplete options that start with the typed section
Highlight typed section within each option in autocomplete list
Exporting projects using JavaScript code with 'Minify script' is now supported
Add DrawingCanvas getImagePixelData() method
Add IWorldInstance methods getBoundingBox(), getBoundingQuad()
Add IWorldInstance properties zElevation, totalZElevation
Script blocks in event sheets can now be disabled
Fix custom instance classes not always being immediately instantiated (regression since r154)
Fix runtime mouse events not firing (regression since r155)
Disabled language specific identation in text editors - prevents unneeded indentation in JS when following the style of having the opening brace on a new line
Referencing an undefined variable in a script is now assumed to be an external variable, and is considered to be defined in the global scope by the autocomplete system
New script interfaces for Array, Button, Dictionary, Sprite, SpriteFont, Text, Text Input, Tiled Background and Tilemap
Added "deviceorientation" and "devicemotion" events, and Touch script interface for requesting orientation/motion permission
Add runtime.invokeDownload() method
Fix incorrect error using 'await' in event sheet script blocks
Both 'runtime' and 'localVars' are now recognised by the script analyser in event sheet script blocks
Autocomplete could be triggered by the up and down arrow keys, interrupting document navigation
New scripting examples 'Simple alert', 'Simple keyboard movement', 'Local storage' and 'Integrating events with script'
Autocomplete of variables and properties
Added runtime.assets.loadStyleSheet() method
Add option to create new JavaScript file in 'Files' folder (useful with loadScripts)
Added option to the Settings dialog to allow the font size to be changed for all text editor and inline script blocks
Runtime now fires pointer events for both mouse and touch input
Script interface for Binary Data plugin
Code editor now focused after adding a script
Possible crash calling event functions from script
Importing scripts could cause preview to fail
Added runtime.storage APIs (accesses same storage as Local Storage plugin)
Possible incorrect "never modified" warning when the only modifications were unary increment/decrement operators
Possible incorrect "cannot access before initialization" warning when accessing variables of a higher scope from a function
Incorrect scoping of "var" declarations in warning analysis
Warnings that highlight class or function declarations will now highlight the identifier instead of the whole declaration
New warning if declaring a "function" or "var" with the same name as another in the current scope
Asset APIs to load external scripts & WebAssembly modules
New 'Loading external script & WebAssembly' example
Access global variables in event sheets via runtime.globalVars
Access local variables in event sheets via localVars in script actions/blocks
runtime.setReturnValue() function to make it easier to return script values from event functions
Script interfaces for layouts and layers
Editor now validates JavaScript code in your project before preview or export, prompting you to fix syntax errors
Debugger CPU profiler now separately measures time spent in scripts
Added warnings for unused variables, use-before-initalise and assigning to constants
Lots of new APIs to use in scripts
New example category 'Scripting' on Start Page, with 'Ghost shooter code' and 'Audio scripting' examples (more to come)
Full code editor now used for editing code in event sheets
Syntax highlighting for code in event sheets
Error highlighting when editing code in event sheets or files
Updated default script file template, and is now only used for first script
Script files now run after the engine instead of before
Exporting projects using script files now works