Describe the changes below:
The tween animation was getting stuck when calling restart on it after being added.
It now checks to see if this.state === TWEEN_CONST.PENDING_ADD in the tween restart function
If true, sets this.seek(0) and this.parent.makeActive(this)
This fixes the issue that makes the tween stuck when restarting the new tween directly after adding a the new tween.
Updates to package.json and package-lock.json were undone from the last pull request.
package.json and package-lock.json
Previous change was to fix tween animations getting stuck when reset was called after being added to _add.
This checked if this.state === TWEEN_CONST.PENDING_ADD. If true this.seek(0) and this.parent.makeActive(this).
It checks to see if state === TWEEN_CONST.PENDING_ADD.
If so sets seek(0) and parent.makeActive(this).
This fixes the issue that makes the tween stuck when restarting after adding a new tween.
* PluginManager.registerFileType has a new property `addToScene` which allows you to inject the new file type into the LoaderPlugin of the given Scene. You could use this to add the file type into the Scene in which it was loaded.
* PluginManager.install has a new property `mapping`. This allows you to give a Global Plugin a property key, so that it is automatically injected into any Scenes as a Scene level instance. This allows you to have a single global plugin running in the PluginManager, that is injected into every Scene automatically.
* PluginManager.createEntry is a new private method to create a plugin entry and return it. This avoids code duplication in several other methods, which now use this instead.
* Game has a new property `hasFocus` which is a read-only boolean that lets you know if the window the game is embedded in (including in an iframe) currently has focus or not.
* Game.Config has a new property `autoFocus`, which is `true` by default, and will automatically call `window.focus()` when the game starts.
* Clicking on the canvas will automatically call `window.focus`. This means in games that use keyboard controls if you tab or click away from the game, then click back on it again, the keys will carry on working (where-as before they would remain unfocused)