Last week, the engine was ported from ES5 to ES6 Module format. It was a huge refactor of the PlayCanvas codebase, but it’s really exciting because it will help us move the engine forwards. Read all about the effort here:
Here’s where you come in. To ensure we have a smooth roll-out, you can help us test it and catch any potential bugs. To do so, just launch your scene from the Editor and add the following to the URL:
@zhou_xia Well, this is maybe a step towards Typescript. We now have import/export statements and a nice build system which integrates nicely with the Typescript compiler. We haven’t 100% decided whether we’ll choose Typescript over ES6+Babel, but I think Typescript currently is the preference.
No. It means that the code editor will no longer warn you about the presence of ES6 in you scripts, and it will be up to you to run your __game-scripts.js file through Babel or Buble (by downloading your game as a ZIP from playcanvas.com).
However, I did just add the following suggestion to @syau’s issue on GitHub:
Perhaps as an intermediate step, we should make this an user preference that defaults to off.