Beta versions are not as thoroughly tested as stable
JavaScript Modules for scripting; scene graph improvements; preview improvements & more
24 November, 2020 ()
Email Me New Releases
Don't miss out on the latest and greatest new features in Construct 3
Notes
It's the start of a new beta release cycle! We have loads of new things for you in this release. First of all the JavaScript coding feature now supports modules! This is a significant overhaul of how the scripting feature works, updating it to use the new, modernised and standardised modules feature in JavaScript. In short this allows you to use import and export syntax in your JavaScript files, allowing you to better organise your script files, write clearer code, control the precise order scripts are loaded, and avoid pitfalls of using lots of global state. For backwards compatibility existing projects will continue to use the old mode, referred to as classic mode. You may need to make some changes to your code to update to modules. For a guide, see the tutorial Upgrading projects from classic scripts to modules. You should do this soon since classic mode is deprecated and in future will be removed in favour of modules.
Related to that is another significant change to local and remote preview: now local project files can be served from network requests. For example if you created an iframe and loaded a HTML project file, and then the iframe tried to load myimage.png, it would request preview.construct.net/myimage.png and return 404 Not Found. Now we've updated preview to be able to serve the project file correctly. Amongst other things, this allows iframes showing local project files to work correctly in preview, and is also a key part of allowing JavaScript Modules to work in preview. This is supported via upgraded Service Workers which intercept network requests locally - so your project contents are still not uploaded to our server, ensuring previewing is fast and your project files remain private as they are only stored on your system.
We've also continued to improve the relatively new scene graph feature. Now you can create entire scene graph hierarchies at runtime with the new Create hierarchy option in the Create object, Spawn an object and Recreate initial objects actions. This means you can now use the scene graph editing features to set up a complex hierarchy in the Layout View, and then conveniently create that entire hierarchy at runtime with a single action - just create the root instance and tick the Create hierarchy checkbox! For the editor, there's now also a select mode property for root scene graph objects like there is for containers, allowing you to set it to automatically select (and wrap) the whole hierarchy, making it easier to treat the hierarchy as a single object in the editor.
Finally as ever there's a few other changes and improvements, and a big batch of bug fixes - see the changelog below for full details. Happy testing!
Like this Release?
Let us know with a thumbs up!
Launch r226
New Features
Scripting support for JavaScript Modules
New Additions
Scene graph: add a 'Select mode' property to root instances
Scene graph: 'Create hierarchy' option for actions that create objects
Network requests in local & remote preview now can serve project files
iframe: displaying local project file HTML now previews correctly
Animations editor: support mathematical expressions in image point and collision polygon inputs
Changes
Drag & drop behavior: only drag via left mouse clicks instead of any click
Updated cordova-ios to v6.1.1
Bug Fixes
UI state: avoid saving state that causes unexpected layout after restart
UI state: tabs outside the main pane not restored when opening a project
Animations editor: prevent setting negative values when modifying collision polygon vertices
Animations editor: ESC key not working if focus is on the main panel (regression r225)
Scene graph: 'remove all children' context menu option was not working
Scene graph: possible crash using the 'remove from parent' context menu option
Tilemap bar: tools not working properly when used on a layout opened in a popup window
Tilemap bar: toolbar buttons not working when detached to a popup window (regression r218)
Z Order bar: crash attempting to open the bar in the mobile
iframe: did not always handle query strings correctly when loading local project file
Audio: convolution effects did not always work in Safari
Layout View: could incorrectly show resize/rotate cursors over other parts of UI
Share plugin: could not always share files in iOS apps
Performance Improvements
Improve preview startup time
Adjust frame scheduling to allow maximum possible time to run events/logic (reland)
Scripting updates
Update all scripting examples to use modules
Fix boolean instance variables not using boolean type
Share Construct 3 Release r226 Now