diff --git a/.eslintignore b/.eslintignore
index b23b36b69..c9ec50de9 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -8,6 +8,7 @@ src/geom/polygon/Earcut.js
src/utils/array/StableSort.js
src/utils/object/Extend.js
src/structs/RTree.js
+plugins/spine/dist/
plugins/spine/src/runtimes/
webpack.*
webpack.config.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 111f20be2..3e7b5e9a4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,24 @@
# Change Log
-## Version 3.19.0 - Naofumi - in development
+## Version 3.20.0 - Fitoria - in dev
+
+### New Features
+
+* `GameConfig.antialiasGL` is a new boolean that allows you to set the `antialias` property of the WebGL context during creation, without impacting any subsequent textures or the canvas CSS.
+
+### Updates
+
+* When calling `Shader.setRenderToTexture()` it will now draw the shader just once, immediately to the texture, to avoid the texture being blank for a single frame (thanks Kyle)
+* The private `Shader._savedKey` property has been removed as it wasn't used anywhere internally.
+
+### Bug Fixes
+
+* `SpineCanvasPlugin.shutdown` would try to dispose of the `sceneRenderer`, but the property isn't set for Canvas.
+* `ArcadePhysics.Body.checkWorldBounds` would incorrectly report as being on the World bounds if the `blocked.none` flag had been toggled elsewhere in the Body. It now only sets if it toggles a new internal flag (thanks Pablo)
+* `RenderTexture.resize` wouldn't update the CanvasTexture width and height, causing the cal to draw or drawFrame to potentially distort the texture (thanks @yhwh)
+* `InputPlugin.processDragMove` has been updated so that the resulting `dragX` and `dragY` values, sent to the event handler, now compensate for the scale of the Game Objects parent container, if inside of one. This means dragging a child of a scale Container will now still drag at 'full' speed.
+
+## Version 3.19.0 - Naofumi - 8th August 2019
### Tween Updates
@@ -46,9 +64,11 @@
### Spine Updates
+The Spine Plugin is now 100% complete. It has been updated to use the Spine 3.7 Runtimes. Improvements have been made across the entire plugin, including proper batched rendering support in WebGL, cleaner skin and slot functions and lots and lots of updates. It's fully documented and there are lots of examples to be found. The following legacy bugs have also been fixed:
+
* Adding Spine to physics causes position to become NaN. Fix #4501 (thanks @hizzd)
* Destroying a Phaser Game instance and then re-creating it would cause an error trying to re-create Spine Game Objects ("Cannot read property get of null"). Fix #4532 (thanks @Alex-Badea)
-* Rendering a Spine object when a Camer has `renderToTexture` enabled on it would cause the object to be vertically flipped. It now renders correctly in both cases. Fix #4647 (thanks @probt)
+* Rendering a Spine object when a Camera has `renderToTexture` enabled on it would cause the object to be vertically flipped. It now renders correctly in both cases. Fix #4647 (thanks @probt)
### New Features
@@ -77,6 +97,19 @@
* `WebGLRenderer.newType` is a boolean that indicates if the current Game Object has a new type, i.e. different to the previous one in the display list.
* `WebGLRenderer.nextTypeMatch` is a boolean that indicates if the _next_ Game Object in the display list has the same type as the one being currently rendered. This allows you to build batching into separated Game Objects.
* `PluginManager.removeGameObject` is a new method that allows you to de-register custom Game Object types from the global Game Object Factory and/or Creator. Useful for when custom plugins are destroyed and need to clean-up after themselves.
+* `GEOM_CONST` is a new constants object that contains the different types of Geometry Objects, such as `RECTANGLE` and `CIRCLE`.
+* `Circle.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Ellipse.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Line.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Point.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Polygon.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Rectangle.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Triangle.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `InputPlugin.enableDebug` is a new method that will create a debug shape for the given Game Objects hit area. This allows you to quickly check the size and placement of an input hit area. You can customzie the shape outline color. The debug shape will automatically track the Game Object to which it is bound.
+* `InputPlugion.removeDebug` will remove a Debug Input Shape from the given Game Object and destroy it.
+* `Pointer.updateWorldPoint` is a new method that takes a Camera and then updates the Pointers `worldX` and `worldY` values based on the cameras transform (thanks @Nick-lab)
+* `ScaleManager._resetZoom` is a new internal flag that is set when the game zoom factor changes.
+* `Texture.remove` is a new method that allows you to remove a Frame from a Texture based on its name. Fix #4460 (thanks @BigZaphod)
### Updates
@@ -93,6 +126,13 @@
* The `WebAudioSoundManager` will now remove the document touch handlers even if the Promise fails, preventing it from throwing a rejection handler error.
* `GameObjectFactory.remove` is a new static function that will remove a custom Game Object factory type.
* `GameObjectCreator.remove` is a new static function that will remove a custom Game Object creator type.
+* `CanvasTexture.getPixels` now defaults to 0x0 by width x height as the default area, allowing you to call the method with no arguments to get all the pixels for the canvas.
+* `CreateDOMContainer` will now use `div.style.cssText` to set the inline styles of the container, so it now works on IE11. Fix #4674 (thanks @DanLiamco)
+* `TransformMatrix.rotation` now returns the properly normalized rotation value.
+* `PhysicsEditorParser` has now been exposed under the `Phaser.Physics.Matter` namespace, so you can call methods on it directly.
+* Calling `CanvasTexture.update` will now automatically call `refresh` if running under WebGL. This happens for both `draw` and `drawFrame`, meaning you no longer need to remember to call `refresh` after drawing to a Canvas Texture in WebGL, keeping it consistent with the Canvas renderer.
+* `Frame.destroy` will now null the Frames reference to its parent texture, glTexture and clear the data and customData objects.
+* The Container renderer functions will now read the childs `alpha` property, instead of `_alpha`, allowing it to work with more variety of custom children.
### Bug Fixes
@@ -121,14 +161,14 @@
* The `DESTROY` event hook wasn't removed from Group children when destroying the Group and `destroyChildren` was set to false. Now, the hook is removed regardless (thanks @rexrainbow)
* The WebGL Lost and Restored Context callbacks were never removed, which could cause them to hold onto stale references. Fix #3610 (thanks @Twilrom)
* `Origin.updateDisplayOrigin` no longer applies a Math.floor to the display origins, allowing you to have a 0.x origin for a Game Object that only has a width or height of 1. This fixes issues with things like 1x1 rectangles displaying incorrectly during rendering. Fix #4126 (thanks @rexrainbow)
+* `InputManager.resetCursor` will now check if the canvas element still exists before resetting the cursor on it. Fix #4662 (thanks @fromnowhereuser)
+* It was not possible to set the zoom value of the Scale Manager back to 1 again, having changed it to a different value. Fix #4633 (thanks @lgibson02 @BinaryMoon)
### Examples, Documentation and TypeScript
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
-@vacarsu @KennethGomez @samme @ldd @Jazcash
-
-
+@vacarsu @KennethGomez @samme @ldd @Jazcash @jcyuan @LearningCode2023 @PhaserEditor2D
## Version 3.18.1 - Raphtalia - 20th June 2019
diff --git a/README.md b/README.md
index b15baca9d..e70376d98 100644
--- a/README.md
+++ b/README.md
@@ -22,17 +22,17 @@ Grab the source and join the fun!
-> 20th June 2019
+> 8th August 2019
-After another month of hard work, we're very happy to announce the release of Phaser 3.18. In this release we took the time to rewrite large chunks of the Input API. This allowed us to fix a number of issues that had arisen, as well as optimizing the internal event flow. Native support for complete Multi-Touch support, Mouse Wheels and more advanced Pointer Button handling are now available. The whole API is smaller and tidier after the clean-up, which is always a good thing.
+I'm pleased to announce that Phaser 3.19 is now available. This release includes our brand new Spine plugin. Spine allows you to bring animation to life in your games, offering a dedicated 2D skeletal animation system and workflow. Our plugin makes integration with Phaser seamless and is fully updated for the Spine 3.7 Runtimes with support for WebGL and Canvas renderers. This version will properly batch Spine skeletons where possible, potentially saving hundreds of draw calls. The plugin is fully documented and exports both debug and minified files, suitable for ES6 'importing' or ES5 plugin inclusion. The whole plugin is just 68KB in size (min+gz), or a paltry 57KB if you only need the Canvas renderer! That's a really tiny payload for such a massive feature-set. You can find out more about Spine from the [Esoteric Software website](http://esotericsoftware.com/).
-We've also added lots of other features and updates, including better Matter physics constraint handling, Arcade Physics improvements, Audio decoding events, Text justification, new Bounds methods and a lot, lot more. As usual, it doesn't end there, though. You'll find hundreds of great new features, updates and fixes. So, as usual, please do spend some time digging through the [Change Log](#changelog). I assure you, it's worth while :)
+3.19 also introduces a huge overhaul to the Tween system. Tweens now have 100% documentation and we've extended their capabilities significantly. There are lots of new Tween Events to listen for, such as 'COMPLETE' or 'REPEAT' to allow you to trigger actions without needing to create callbacks. Tweens can now tween both 'from' and 'to' a value, with the ability to set a starting value for any tweened property. There are lots of new handy methods and properties, such as `Tween.hasStarted` and a rewrite of the Tween seeking function, so it now allows you to seek to any point in time across a tween. Finally, we've added in the great new 'StaggerBuilder'. This allows you to easily add staggered offsets to a bunch of tween targets, including all kinds of options such as staggering across a grid layout, stagger directions, starting values and a lot more. Please see the docs and examples for more details.
-If you're coming from an earlier release then you may not be aware of what the previous release, 3.17, included. It was a huge release, introducing some big new features. The first was that we moved the DOM Element Game Objects from the 'experimental' flag they were previously hidden under, finished them off, fully documented them and moved them to main. DOM Elements are a great way to layer HTML content over the top of your game and control it, just as if it was a standard Game Object. Have a look at the demos, read the docs and get stuck-in using them!
+As usual, it doesn't end there, though :) Another very useful feature is `Shader.setRenderToTexture`. This allows you to redirect a shader to its own framebuffer / WebGL Texture instead of to the display list. This allows you to use the output of the shader as an input for another shader, by mapping a sampler2D uniform to it. It also allows you to save the Shader to the Texture Manager, allowing you to use it as a texture for any other texture based Game Object such as a Sprite. Combined with the new `setSampler2DBuffer` method you can now easily chain shaders together, using them as buffers for other shaders.
-Also brand new in 3.17 were Shader Game Objects. Previously, if you wished to use a custom shader in your game, you'd have to create your own WebGL pipeline to handle it. Now, with 3.17, adding a shader is a single line of code - and what's more, you can manipulate them just like regular Game Objects, so they can be rotated, scaled, have hit areas and so on. As with DOM Elements please see the new examples and read the fully complete API Docs to learn how to use them.
+One thing I've been seeing asked for a lot on the Phaser Discord is the ability to 'save' a Render Texture to an image. So, I added the new methods `RenderTexture.snapshot` and `snapshotArea`. This allows you to grab whatever is on the Render Texture at that point in time and turn it into an Image. You could then save this image to the Texture Manager, if needed, or just save it out to the filesystem, or transmit it to as web service. Great for things like avatar creators or art packages.
-The final significant 3.17 feature came in the way of masks. Phaser 3 has always supported Bitmap and Geometry Masks, but using them was limited (you couldn't mask children inside Containers, for example), and they were pretty slow. After a lot of development they're now fully batched, meaning the same mask applied to thousands of game objects no longer impacts performance. They can also be nested and will restore the mask stack as they're used and what's more, you can now add masks to Cameras. This is a great feature in itself and opens up the possibility for lots of visual effects in your games.
+You'll find loads more great new features, updates and fixes. So, as usual, please do spend some time digging through the [Change Log](#changelog). I assure you, it's worth while :)
A massive thank-you to everyone who supports Phaser on Patreon and PayPal. Your continued backing has allowed me to work on Phaser all year, and this great new releases is the very real result of that. If you've ever considered becoming a backer, now is the perfect time!
@@ -75,8 +75,9 @@ Extra special thanks to the following companies who's support makes Phaser possi
* [Texture Packer](https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?utm_source=ad&utm_medium=banner&utm_campaign=phaser-2018-10-16)
* [Twilio](https://www.twilio.com)
* [Y8 Games](https://www.y8.com)
+* [Poki](https://developers.poki.com/)
-![Sponsors](https://phaser.io/images/github/sponsors-2019-05.png "Awesome Sponsors")
+![Sponsors](https://phaser.io/images/github/sponsors-2019-08.png "Awesome Sponsors")
![Phaser Newsletter](https://phaser.io/images/github/div-newsletter.png "Phaser Newsletter")
@@ -110,13 +111,13 @@ npm install phaser
[Phaser is on jsDelivr](https://www.jsdelivr.com/projects/phaser) which is a "super-fast CDN for developers". Include the following in your html:
```html
-
+
```
or the minified version:
```html
-
+
```
### API Documentation
@@ -197,13 +198,13 @@ We've 3 tutorials related to Facebook Instant Games and Phaser:
A special build of Phaser with the Facebook Instant Games Plugin ready-enabled is [available on jsDelivr](https://www.jsdelivr.com/projects/phaser). Include the following in your html:
```html
-
+
```
or the minified version:
```html
-
+
```
The build files are in the git repository in the `dist` folder, and you can also include the plugin in custom builds.
@@ -220,7 +221,7 @@ Create an `index.html` page locally and paste the following code into it:
-
+
@@ -331,210 +332,157 @@ You can then run `webpack` to create a development build in the `build` folder w
# Change Log
-## Version 3.18.1 - Raphtalia - 20th June 2019
+## Version 3.19.0 - Naofumi - 8th August 2019
-### Bug Fixes
+### Tween Updates
-* `InputManager.preRender` didn't get the `time` property correctly, causing input plugin methods that relied on it to fail.
-* `KeyboardPlugin.time` wasn't being set to the correct value, causing `checkDown` to fail constantly.
+* All Tween classes and functions have 100% complete JSDocs :)
+* `StaggerBuilder` is a new function that allows you to define a staggered tween property. For example, as part of a tween config: `delay: this.tweens.stagger(500)` would stagger the delay by 500ms for every target of the tween. You can also provide a range: `delay: this.tweens.stagger([ 500, 1000 ])` which is spread across all targets. Finally, you can provide a Stagger Config object as the second argument. This allows you to define a stagger grid, direction, starting value and more. Please see the API Docs and new Examples for further details.
+* `Tween` now extends the Event Emitter class, allowing it to emit its own events and be listened to.
+* `Tween.ACTIVE_EVENT` is a new event that is dispatched when a tween becomes active. Listen to it with `tween.on('active')`.
+* `Tween.COMPLETE_EVENT` is a new event that is dispatched when a tween completes or is stopped. Listen to it with `tween.on('complete')`.
+* `Tween.LOOP_EVENT` is a new event that is dispatched when a tween loops, after any loop delay expires. Listen to it with `tween.on('loop')`.
+* `Tween.REPEAT_EVENT` is a new event that is dispatched when a tween property repeats, after any repeat delay expires. Listen to it with `tween.on('repeat')`.
+* `Tween.START_EVENT` is a new event that is dispatched when a tween starts. Listen to it with `tween.on('start')`.
+* `Tween.UPDATE_EVENT` is a new event that is dispatched when a tween property updates. Listen to it with `tween.on('update')`.
+* `Tween.YOYO_EVENT` is a new event that is dispatched when a tween property yoyos, after any hold delay expires. Listen to it with `tween.on('yoyo')`.
+* `Tween.onActive` is a new callback that is invoked the moment the Tween Manager brings the tween to life, even though it may not have yet started actively tweening anything due to delay settings.
+* `Tween.onStart` is now only invoked when the Tween actually starts tweening a value. Previously, it was invoked as soon as the Tween Manager activated the Tween. This has been recoded and this action is now handled by the `onActive` callback. Fix #3330 (thanks @wtravO)
+* `Tween.seek` has been rewritten so you can now seek to any point in the Tween, regardless of repeats, loops, delays and hold settings. Seeking will not invoke any callbacks or events during the seek. Fix #4409 (thanks @cristib84)
+* You can now set `from` and `to` values for a property, i.e. `alpha: { from: 0, to: 1 }` which would set the alpha of the target to 0 and then tween it to 1 _after_ any delays have expired. Fix #4493 (thanks @BigZaphod)
+* You can now set `start` and `to` values for a property, i.e. `alpha: { start: 0, to: 1 }` which would set the alpha of the target to 0 immediately, as soon as the Tween becomes active, and then tween it to 1 over the duration of the tween.
+* You can now set `start`, `from` and `to` values for a property, i.e. `alpha: { start: 0, from: 0.5, to: 1 }` which would set the alpha of the target to 0 immediately, as soon as the Tween becomes active, then after any delays it would set the alpha to 0.5 and then tween it to 1 over the duration of the Tween.
+* `Tween.hasStarted` is a new property that holds a flag signifying if the Tween has started or not. A Tween that has started is one that is actively tweening a property and not just in a delayed state.
+* `Tween.startDelay` is a new property that is set during the Tween init to hold the shortest possible time before the Tween will start tweening a value. It is decreased each update until it hits zero, after which the `onStart` callback is invoked.
+* `Tween.init` and `Tween.play` have been rewritten so they are not run multiple times when a Tween is paused before playback, or is part of a Timeline. This didn't cause any problems previously, but it was a redundant duplication of calls.
+* `Tween.onLoop` will now be invoked _after_ the `loopDelay` has expired, if any was set.
+* `Tween.onRepeat` will now be invoked _after_ the `repeatDelay` has expired, if any was set.
+* `easeParams` would be ignored for tweens that _didn't_ use a string for the ease function name. Fix #3826 (thanks @SBCGames)
+* You can now specify `easeParams` for any custom easing function you wish to use. Fix #3826 (thanks @SBCGames)
+* All changes to `Tween.state` are now set _before_ any events or callbacks, allowing you to modify the state of the Tween in those handlers (thanks @Cudabear)
+* `Tween.dispatchTweenEvent` is a new internal method that handles dispatching the new Tween Events and callbacks. This consolidates a lot of duplicate code into a single method.
+* `Tween.dispatchTweenDataEvent` is a new internal method that handles dispatching the new TweenData Events and callbacks. This consolidates a lot of duplicate code into a single method.
+* `Tween.isSeeking` is a new internal boolean flag that is used to keep track of the seek progress of a Tween.
+* `Timeline.onLoop` will now be invoked _after_ the `loopDelay` has expired, if any was set.
+* `Timeline.onComplete` will now be invoked _after_ the `completeDelay` has expired, if any was set.
+* All changes to `Timeline.state` are now set _before_ any events or callbacks, allowing you to modify the state of the Timeline in those handlers.
+* The `TIMELINE_LOOP_EVENT` has had the `loopCounter` argument removed from it. It didn't actually send the number of times the Timeline had looped (it actually sent the total remaining).
+* When a TweenData completes it will now set the `current` property to be exactly either `start` or `end` depending on playback direction.
+* When a TweenData completes it will set the exact `start` or `end` value into the target property.
+* `TweenData` has a new function signature, with the new `index` and `getActive`arguments added to it. `TweenBuilder` has been updated to set these, but if you create any TweenData objects directly, use the new signature.
+* `TweenData.getActiveValue` is a new property that, if not null, returns a value to immediately sets the property value to on activation.
+* `GetEaseFunction`, and by extension anything that uses it, such as setting the ease for a Tween, will now accept a variety of input strings as valid. You can now use lower-case, such as `back`, and omit the 'ease' part of the direction, such as `back.in` or `back.inout`.
+* The signature of `getStart` and `getEnd` custom property functions has changed to `(target, key, value, targetIndex, totalTargets, tween)`, previously it was just `(target, key, value)`. Custom functions don't need to change as the new arguments are in addition to those sent previously.
+* The signature of the LoadValue generator functions (such as `delay` and `repeat`) has changed to `(target, key, value, targetIndex, totalTargets, tween)` to match those of the custom property functions. If you used a custom generator function for your Tween configs you'll need to modify the signature to the new one.
+* Tweens created via `TweenManager.create` wouldn't start when `Tween.play` was called without first making them active manually. They now start automatically. Fix #4632 (thanks @mikewesthad)
-## Version 3.18.0 - Raphtalia - 19th June 2019
+### Spine Updates
-### Input System Changes
+The Spine Plugin is now 100% complete. It has been updated to use the Spine 3.7 Runtimes. Improvements have been made across the entire plugin, including proper batched rendering support in WebGL, cleaner skin and slot functions and lots and lots of updates. It's fully documented and there are lots of examples to be found. The following legacy bugs have also been fixed:
-#### Mouse Wheel Support
-
-3.18 now includes native support for reading mouse wheel events.
-
-* `POINTER_WHEEL` is a new event dispatched by the Input Plugin allowing you to listen for global wheel events.
-* `GAMEOBJECT_WHEEL` is a new event dispatched by the Input Plugin allowing you to listen for global wheel events over all interactive Game Objects in a Scene.
-* `GAMEOBJECT_POINTER_WHEEL` is a new event dispatched by a Game Object allowing you to listen for wheel events specifically on that Game Object.
-* `Pointer.deltaX` is a new property that holds the horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.
-* `Pointer.deltaY` is a new property that holds the vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device.
-* `Pointer.deltaZ` is a new property that holds the z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.
-* `Pointer.wheel` is a new internal method that handles the wheel event.
-* `InputManager.onMouseWheel` is a new internal method that handles processing the wheel event.
-* `InputManager.processWheelEvent` is a new internal method that handles processing the wheel event sent by the Input Manager.
-
-#### Button Released Support
-
-* `Pointer.button` is a new property that indicates which button was pressed, or released, on the pointer during the most recent event. It is only set during `up` and `down` events and is always 0 for Touch inputs.
-* `Pointer.leftButtonReleased` is a new method that returns `true` if it was the left mouse button that was just released. This can be checked in a `pointerup` event handler to find out which button was released.
-* `Pointer.rightButtonReleased` is a new method that returns `true` if it was the right mouse button that was just released. This can be checked in a `pointerup` event handler to find out which button was released (thanks @BobtheUltimateProgrammer)
-* `Pointer.middleButtonReleased` is a new method that returns `true` if it was the middle mouse button that was just released. This can be checked in a `pointerup` event handler to find out which button was released.
-* `Pointer.backButtonReleased` is a new method that returns `true` if it was the back mouse button that was just released. This can be checked in a `pointerup` event handler to find out which button was released.
-* `Pointer.forwardButtonReleased` is a new method that returns `true` if it was the forward mouse button that was just released. This can be checked in a `pointerup` event handler to find out which button was released.
-
-#### Input System Bug Fixes
-
-* Calling `setPollAlways()` would cause the `'pointerdown'` event to fire multiple times. Fix #4541 (thanks @Neyromantik)
-* The pointer events were intermittently not registered, causing `pointerup` to often fail. Fix #4538 (thanks @paulsymphony)
-* Due to a regression in 3.16 the drag events were not performing as fast as before, causing drags to feel lagged. Fix #4500 (thanks @aliblong)
-* The Touch Manager will now listen for Touch Cancel events on the Window object (if `inputWindowEvents` is enabled in the game config, which it is by default). This allows it to prevent touch cancel actions, like opening the dock on iOS, from causing genuinely active pointers to enter an active locked state.
-* Over and Out events now work for any number of pointers in multi-touch environments, not just the first touch pointer registered. They also now fire correctly on touch start and touch end / cancel events.
-* If you enable a Game Object for drag and place it inside a rotated Container (of any depth), the `dragX` and `dragY` values sent to the `drag` callback didn't factor the rotation in, so you had to do it manually. This is now done automatically, so the values account for parent rotation before being sent to the event handler. Fix #4437 (thanks @aliblong)
-
-#### Input System API Changes
-
-The old 'input queue' legacy system, which was deprecated in 3.16, has been removed entirely in order to tidy-up the API and keep input events consistent. This means the following changes:
-
-* Removed the `inputQueue` Game config property.
-* Removed the `useQueue`, `queue` and `_updatedThisFrame` properties from the Input Manager.
-* Removed the `legacyUpdate` and `update` methods from the Input Manager.
-* Removed the `ignoreEvents` property as this should now be handled on a per-event basis.
-* The Input Manager no longer listens for the `GameEvents.POST_STEP` event.
-* The following Input Manager methods are no longer required so have been removed: `startPointer`, `updatePointer`, `stopPointer` and `cancelPointer`.
-
-As a result, all of the following Input Manager methods have been renamed:
-
-* `queueTouchStart` is now called `onTouchStart` and invoked by the Touch Manager.
-* `queueTouchMove` is now called `onTouchMove` and invoked by the Touch Manager.
-* `queueTouchEnd` is now called `onTouchEnd` and invoked by the Touch Manager.
-* `queueTouchCancel` is now called `onTouchCancel` and invoked by the Touch Manager.
-* `queueMouseDown` is now called `onMouseDown` and invoked by the Mouse Manager.
-* `queueMouseMove` is now called `onMouseMove` and invoked by the Mouse Manager.
-* `queueMouseUp` is now called `onMouseUp` and invoked by the Mouse Manager.
-
-Each of these handlers used to check the `enabled` state of the Input Manager, but this now handled directly in the Touch and Mouse Managers instead, leading to less branching and cleaner tests. They also all used to run an IIFE that updated motion on the changed pointers array, but this is now handled directly in the event handler, allowing it to be removed from here.
-
-Because the legacy queue mode is gone, there is no longer any need for the DOM Callbacks:
-
-* Removed the `_hasUpCallback`, `_hasDownCallback` and `_hasMoveCallback` properties from the Input Manager
-* Removed the `processDomCallbacks`, `addDownCallback`, `addUpCallback`, `addMoveCallback`, `domCallbacks`, `addDownCallback`, `addUpCallback` and `addMoveCallback` methods.
-
-Also, CSS cursors can now be set directly:
-
-* Cursors are now set and reset immediately on the canvas, leading to the removal of `_setCursor` and `_customCursor` properties.
-
-The following changes took place in the Input Plugin class:
-
-* The method `processDragEvents` has been removed as it's now split across smaller, more explicit methods.
-* `processDragDownEvent` is a new method that handles a down event for drag enabled Game Objects.
-* `processDragMoveEvent` is a new method that handles a move event for drag enabled Game Objects.
-* `processDragUpEvent` is a new method that handles an up event for drag enabled Game Objects.
-* `processDragStartList` is a new internal method that builds a drag list for a pointer.
-* `processDragThresholdEvent` is a new internal method that tests when a pointer with drag thresholds can drag.
-* `processOverEvents` is a new internal method that handles when a touch pointer starts and checks for over events.
-* `processOutEvents` is a new internal method that handles when a touch pointer stops and checks for out events.
-
-The following changes took place in the Pointer class:
-
-* `Pointer.dirty` has been removed as it's no longer required.
-* `Pointer.justDown` has been removed as it's not used internally and makes no sense under the DOM event system.
-* `Pointer.justUp` has been removed as it's not used internally and makes no sense under the DOM event system.
-* `Pointer.justMoved` has been removed as it's not used internally and makes no sense under the DOM event system.
-* The `Pointer.reset` method has been removed as it's no longer required internally.
-* `Pointer.touchstart` now has two arguments, the Touch List entry and the Touch Event. The full Touch Event is now stored in `Pointer.event` (instead of the Touch List entry).
-* `Pointer.touchmove` now has two arguments, the Touch List entry and the Touch Event. The full Touch Event is now stored in `Pointer.event` (instead of the Touch List entry).
-* `Pointer.touchend` now has two arguments, the Touch List entry and the Touch Event. The full Touch Event is now stored in `Pointer.event` (instead of the Touch List entry).
-* `Pointer.touchcancel` now has two arguments, the Touch List entry and the Touch Event. The full Touch Event is now stored in `Pointer.event` (instead of the Touch List entry).
+* Adding Spine to physics causes position to become NaN. Fix #4501 (thanks @hizzd)
+* Destroying a Phaser Game instance and then re-creating it would cause an error trying to re-create Spine Game Objects ("Cannot read property get of null"). Fix #4532 (thanks @Alex-Badea)
+* Rendering a Spine object when a Camera has `renderToTexture` enabled on it would cause the object to be vertically flipped. It now renders correctly in both cases. Fix #4647 (thanks @probt)
### New Features
-* `Matter.Factory.velocity` is a new method that allows you to set the velocity on a Matter Body directly.
-* `Matter.Factory.angularVelocity` is a new method that allows you to set the angular velocity on a Matter Body directly.
-* `Matter.Factory.force` is a new method that allows you to apply a force from a world position on a Matter Body directly.
-* `GetBounds.getTopCenter` is a new method that will return the top-center point from the bounds of a Game Object.
-* `GetBounds.getBottomCenter` is a new method that will return the bottom-center point from the bounds of a Game Object.
-* `GetBounds.getLeftCenter` is a new method that will return the left-center point from the bounds of a Game Object.
-* `GetBounds.getRightCenter` is a new method that will return the right-center point from the bounds of a Game Object.
-* You can now create a desynchronized 2D or WebGL canvas by setting the Game Config property `desynchronized` to `true` (the default is `false`). For more details about what this means see https://developers.google.com/web/updates/2019/05/desynchronized.
-* The CanvasRenderer can now use the `transparent` Game Config property in order to tell the browser an opaque background is in use, leading to faster rendering in a 2D context.
-* `GameObject.scale` is a new property, that exists as part of the Transform component, that allows you to set the horizontal and vertical scale of a Game Object via a setter, rather than using the `setScale` method. This is handy for uniformly scaling objects via tweens, for example.
-* `Base64ToArrayBuffer` is a new utility function that will convert a base64 string into an ArrayBuffer. It works with plain base64 strings, or those with data uri headers attached to them. The resulting ArrayBuffer can be fed to any suitable function that may need it, such as audio decoding.
-* `ArrayBufferToBase64` is a new utility function that converts an ArrayBuffer into a base64 string. You can also optionally included a media type, such as `image/jpeg` which will result in a data uri being returned instead of a plain base64 string.
-*`WebAudioSoundManager.decodeAudio` is a new method that allows you to decode audio data into a format ready for playback and stored in the audio cache. The audio data can be provided as an ArrayBuffer, a base64 string or a data uri. Listen for the events to know when the data is ready for use.
-* `Phaser.Sound.Events#DECODED` is a new event emitted by the Web Audio Sound Manager when it has finished decoding audio data.
-* `Phaser.Sound.Events#DECODED_ALL` is a new event emitted by the Web Audio Sound Manager when it has finished decoding all of the audio data files passed to the `decodeAudio` method.
-* `Phaser.Utils.Objects.Pick` is a new function that will take an object and an array of keys and return a new object containing just the keys provided in the array.
-* `Text.align` and `Text.setAlign` can now accept `justify` as a type. It will apply basic justification to multi-line text, adding in extra spaces in order to justify the content. Fix #4291 (thanks @andrewbaranov @Donerkebap13 @dude78GH)
-* `Arcade.Events.WORLD_STEP` is a new event you can listen to. It is emitted by the Arcade Physics World every time the world steps once. It is emitted _after_ the bodies and colliders have been updated. Fix #4289 (thanks @fant0m)
+* `Shader.setRenderToTexture` is a new method that will redirect the Shader to render to its own framebuffer / WebGLTexture instead of to the display list. This allows you to use the output of the shader as an input for another shader, by mapping a sampler2D uniform to it. It also allows you to save the Shader to the Texture Manager, allowing you to use it as a texture for any other texture based Game Object such as a Sprite.
+* `Shader.setSampler2DBuffer` is a new method that allows you to pass a WebGLTexture directly into a Shader as a sampler2D uniform, such as when linking shaders together as buffers for each other.
+* `Shader.renderToTexture` is a new property flag that is set if you set the Shader to render to a texture.
+* `Shader.framebuffer` is a new property that contains a WebGLFramebuffer reference which is set if you set the Shader to render to a texture.
+* `Shader.glTexture` is a new property that contains a WebGLTexture reference which is set if you set the Shader to render to a texture.
+* `Shader.texture` is a new property that contains a Phaser Texture reference which is set if you set the Shader to save to the Texture Manager.
+* `TextureManager.addGLTexture` is a new method that allows you to add a WebGLTexture directly into the Texture Manager, saved under the given key.
+* `TextureSource.isGLTexture` is a new boolean property that reflects if the data backing the underlying Texture Source is a WebGLTexture or not.
+* `TextureTintPipeline.batchSprite` will now flip the UV if the TextureSource comes from a GLTexture.
+* `Math.ToXY` is a new mini function that will take a given index and return a Vector2 containing the x and y coordinates of that index within a grid.
+* `RenderTexture.glTexture` is a new property that holds a reference to the WebGL Texture being used by the Render Texture. Useful for passing to a shader as a sampler2D.
+* `GroupCreateConfig.quantity` - when creating a Group using a config object you can now use the optional property `quantity` to set the number of objects to be created. Use this for quickly creating groups of single frame objects that don't need the advanced capabilities of `frameQuantity` and `repeat`.
+* `Pointer.locked` is a new read-only property that indicates if the pointer has been Pointer Locked, or not, via the Pointer Lock API.
+* `WebGLRenderer.snapshotFramebuffer`, and the corresponding utility function `WebGLSnapshot`, allows you to take a snapshot of a given WebGL framebuffer, such as the one used by a Render Texture or Shader, and either get a single pixel from it as a Color value, or get an area of it as an Image object, which can then optionally be saved to the Texture Manager for use by Game Object textures.
+* `CanvasRenderer.snapshotCanvas` allows you to take a snapshot of a given Canvas object, such as the one used by a Render Texture, and either get a single pixel from it as a Color value, or get an area of it as an Image object, which can then optionally be saved to the Texture Manager for use by Game Object textures.
+* `RenderTexture.snapshot` is a new method that will take a snapshot of the whole current state of the Render Texture and return it as an Image object, which could then be saved to the Texture Manager if needed.
+* `RenderTexture.snapshotArea` is a new method that will take a snapshot of an area of a Render Texture and return it as an Image object, which could then be saved to the Texture Manager if needed.
+* `RenderTexture.snapshotPixel` is a new method that will take extract a single pixel color value from a Render Texture and return it as a Color object.
+* The `SnapshotState` object has three new properties: `isFramebuffer` boolean and `bufferWidth` and `bufferHeight` integers.
+* `Game.CONTEXT_LOST_EVENT` is a new event that is dispatched by the Game instance when the WebGL Renderer webgl context is lost. Use this instead of the old 'lostContextCallbacks' for cleaner context handling.
+* `Game.CONTEXT_RESTORED_EVENT` is a new event that is dispatched by the Game instance when the WebGL Renderer webgl context is restored. Use this instead of the old 'restoredContextCallbacks' for cleaner context handling.
+* `WebGLRenderer.currentType` contains the type of the Game Object currently being rendered.
+* `WebGLRenderer.newType` is a boolean that indicates if the current Game Object has a new type, i.e. different to the previous one in the display list.
+* `WebGLRenderer.nextTypeMatch` is a boolean that indicates if the _next_ Game Object in the display list has the same type as the one being currently rendered. This allows you to build batching into separated Game Objects.
+* `PluginManager.removeGameObject` is a new method that allows you to de-register custom Game Object types from the global Game Object Factory and/or Creator. Useful for when custom plugins are destroyed and need to clean-up after themselves.
+* `GEOM_CONST` is a new constants object that contains the different types of Geometry Objects, such as `RECTANGLE` and `CIRCLE`.
+* `Circle.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Ellipse.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Line.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Point.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Polygon.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Rectangle.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `Triangle.type` is a new property containing the shapes geometry type, which can be used for quick type comparisons.
+* `InputPlugin.enableDebug` is a new method that will create a debug shape for the given Game Objects hit area. This allows you to quickly check the size and placement of an input hit area. You can customzie the shape outline color. The debug shape will automatically track the Game Object to which it is bound.
+* `InputPlugion.removeDebug` will remove a Debug Input Shape from the given Game Object and destroy it.
+* `Pointer.updateWorldPoint` is a new method that takes a Camera and then updates the Pointers `worldX` and `worldY` values based on the cameras transform (thanks @Nick-lab)
+* `ScaleManager._resetZoom` is a new internal flag that is set when the game zoom factor changes.
+* `Texture.remove` is a new method that allows you to remove a Frame from a Texture based on its name. Fix #4460 (thanks @BigZaphod)
### Updates
-* `Zones` will now use the new `customHitArea` property introduced in 3.17 to avoid their hit areas from being resized if you specified your own custom hit area (thanks @rexrainbow)
-* The default `BaseShader` vertex shader has a new uniform `uResolution` which is set during the Shader init and load to be the size of the Game Object to which the shader is bound.
-* The default `BaseShader` vertex shader will now set the `fragCoord` varying to be the Game Object height minus the y inPosition. This will give the correct y axis in the fragment shader, causing 'inverted' shaders to display normally when using the default vertex code.
-* There was some test code left in the `DOMElementCSSRenderer` file that caused `getBoundingClientRect` to be called every render. This has been removed, which increases performance significantly for DOM heavy games.
-* The `TimeStep` will no longer set its `frame` property to zero in the `resetDelta` method. Instead, this property is incremented every step, no matter what, giving an accurate indication of exactly which frame something happened on internally.
-* The `TimeStep.step` method no longer uses the time value passed to the raf callback, as it's not actually the current point in time, but rather the time that the main thread began at. Which doesn't help if we're comparing it to event timestamps.
-* `TimeStep.now` is a new property that holds the exact `performance.now` value, as set at the start of the current game step.
-* `Matter.Factory.fromVertices` can now take a vertices path string as its `vertexSets` argument, as well as an array of vertices.
-* `GetBounds.prepareBoundsOutput` is a new private method that handles processing the output point. All of the bounds methods now use this, allowing us to remove a lot of duplicated code.
-* The PluginManager will now display a console warning if it skips installing a plugin (during boot) because the plugin value is missing or empty (thanks @samme)
-* When creating a Matter Constraint via the Factory you can now optionally provide a `length`. If not given, it will determine the length automatically from the position of the two bodies.
-* When creating a Matter Game Object you can now pass in a pre-created Matter body instead of a config object.
-* When Debug Draw is enabled for Arcade Physics it will now use `Graphics.defaultStrokeWidth` to drawn the body with, this makes static bodies consistent with dynamic ones (thanks @samme)
-* `Group.name` is a new property that allows you to set a name for a Group, just like you can with all other Game Objects. Phaser itself doesn't use this, it's there for you to take advantage of (thanks @samme)
-* Calling `ScaleManager.setGameSize` will now adjust the size of the canvas element as well. Fix #4482 (thanks @sudhirquestai)
-* `Scale.Events.RESIZE` now sends two new arguments to the handler: `previousWidth` and `previousHeight`. If, and only if, the Game Size has changed, these arguments contain the previous size, before the change took place.
-* The Camera Manager has a new method `onSize` which is invoked by handling the Scale Manager `RESIZE` event. When it receives it, it will iterate the cameras it manages. If the camera _doesn't_ have a custom offset and _is_ the size of the game, then it will be automatically resized for you. This means you no longer need to call `this.cameras.resize(width, height)` from within your own resize handler, although you can still do so if you wish, as that will resize _every_ Camera being managed to the new size, instead of just 'full size' cameras.
-* `Graphics.translate` has been renamed to `Graphics.translateCanvas` to make it clearer what it's actually translating (i.e. the drawing buffer, not the Graphics object itself)
-* `Graphics.scale` has been renamed to `Graphics.scaleCanvas` to make it clearer what it's actually scaling (i.e. the drawing buffer, not the Graphics object itself)
-* `Graphics.rotate` has been renamed to `Graphics.rotateCanvas` to make it clearer what it's actually rotating (i.e. the drawing buffer, not the Graphics object itself)
-* The `width` and `height` of an Arc / Circle Shape Game Object is now set to be the diameter of the arc, not the radius (thanks @rexrainbow)
-* `LineStyleCanvas` now takes an `altColor` argument which is used to override the context color.
-* `LineStyleCanvas` now takes an `altAlpha` argument which is used to override the context alpha.
-* `FillStyleCanvas` now takes an `altAlpha` argument which is used to override the context alpha.
-* `StaticPhysicsGroup` can now take a `classType` property in its Group Config and will use the value of it, rather than override it. If none is provided it'll default to `ArcadeSprite`. Fix #4401 (thanks @Legomite)
-* `Phaser.Tilemaps.Parsers.Tiled` used to run the static function `ParseJSONTiled`. `Parsers.Tiled` is now just a namespace, so access the function within it: `Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled`.
-* `Phaser.Tilemaps.Parsers.Impact` used to run the static function `ParseWeltmeister`. `Parsers.Impact` is now just a namespace, so access the function within it: `Phaser.Tilemaps.Parsers.Impact.ParseWeltmeister`.
-* `Phaser.Tilemaps.Parsers.Tiled.AssignTileProperties` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.Base64Decode` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.BuildTilesetIndex` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.ParseGID` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.ParseImageLayers` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.ParseObject` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.ParseObjectLayers` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.ParseTileLayers` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.ParseTilesets` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.ParseTilesets` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Impact.ParseTileLayers` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Impact.ParseTilesets` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Impact.ParseWeltmeister` is now a public static function, available to be called directly.
-* `Phaser.Tilemaps.Parsers.Tiled.Pick` has been removed. It is now available under `Phaser.Utils.Objects.Pick`, which is a more logical place for it.
-* You can now call `this.scene.remove` at the end of a Scene's `create` method without it throwing an error. Why you'd ever want to do this is beyond me, but you now can (thanks @samme)
-* The `Arcade.StaticBody.setSize` arguments have changed from `(width, height, offsetX, offsetY)` to `(width, height, center)`. They now match Dynamic Body setSize and the Size Component method (thanks @samme)
-* When enabling Arcade Physics Body debug it will now draw only the faces marked for collision, allowing you to easily see if a face is disabled or not (thanks @BdR76)
-* `Transform.getParentRotation` is a new method available to all GameObjects that will return the sum total rotation of all of the Game Objects parent Containers, if it has any.
-* `Tween.restart` now sets the Tween properties `elapsed`, `progress`, `totalElapsed` and `totalProgress` to zero when called, rather than adding to existing values should the tween already be running.
-* `ArcadePhysics.Body.resetFlags` is a new method that prepares the Body for a physics step by resetting the `wasTouching`, `touching` and `blocked` states.
-* `ArcadePhysics.Body.preUpdate` has two new arguments `willStep` and `delta`. If `willStep` is true then the body will call resetFlags, sync with the parent Game Object and then run one iteration of `Body.update`, using the provided delta. If false, only the Game Object sync takes place.
-* `ArcadePhysics.World.update` will now determine if a physics step is going to happen this frame or not. If not, it no longer calls `World.step` (fix #4529, thanks @ampled). If a step _is_ going to happen, then it now handles this with one iteration of the bodies array, instead of two. It has also inlined a single world step, avoiding branching out. If extra world steps are required this frame (such as in high Hz environments) then `World.step` is called accordingly.
-* `ArcadePhysics.World.postUpdate` will no longer call `Body.postUpdate` on all of the bodies if no World step has taken place this frame.
-* `ArcadePhysics.World.step` will now increment the `stepsLastFrame` counter, allowing `postUpdate` to determine if bodies should be processed should World.step have been invoked manually.
+* When calling `setHitArea` and not providing a shape (i.e. a texture based hit area), it will now set `customHitArea` to `false` by default (thanks @rexrainbow)
+* The Shader will no longer set uniforms if the values are `null`, saving on GL ops.
+* The Animation Manager will now emit a console warning if you try and play an animation on a Sprite that doesn't exist.
+* The Animation component will no longer start an animation on a Sprite if the animation doesn't exist. Previously it would throw an error saying "Unable to read the property getFirstTick of null".
+* `InputManager.onPointerLockChange` is a new method that handles pointer lock change events and dispatches the lock event.
+* `CanvasTexture` has been added to the `Textures` namespace so it can be created without needing to import it. The correct way to create a `CanvasTexture` is via the Texture Manager, but you can now do it directly if required. Fix #4651 (thanks @Jugacu)
+* The `SmoothedKeyControl` minimum zoom a Camera can go to is now 0.001. Previously it was 0.1. This is to make it match the minimum zoom a Base Camera can go to. Fix #4649 (thanks @giviz)
+* `WebGLRenderer.lostContextCallbacks` and the `onContextLost` method have been removed. Please use the new `CONTEXT_LOST` event instead.
+* `WebGLRenderer.restoredContextCallbacks` and the `onContextRestored` method have been removed. Please use the new `CONTEXT_RESTORED` event instead.
+* `TextureManager.getBase64` will now emit a console warning if you try to get a base64 from a non-image based texture, such as a WebGL Texture.
+* The `WebAudioSoundManager` will now remove the document touch handlers even if the Promise fails, preventing it from throwing a rejection handler error.
+* `GameObjectFactory.remove` is a new static function that will remove a custom Game Object factory type.
+* `GameObjectCreator.remove` is a new static function that will remove a custom Game Object creator type.
+* `CanvasTexture.getPixels` now defaults to 0x0 by width x height as the default area, allowing you to call the method with no arguments to get all the pixels for the canvas.
+* `CreateDOMContainer` will now use `div.style.cssText` to set the inline styles of the container, so it now works on IE11. Fix #4674 (thanks @DanLiamco)
+* `TransformMatrix.rotation` now returns the properly normalized rotation value.
+* `PhysicsEditorParser` has now been exposed under the `Phaser.Physics.Matter` namespace, so you can call methods on it directly.
+* Calling `CanvasTexture.update` will now automatically call `refresh` if running under WebGL. This happens for both `draw` and `drawFrame`, meaning you no longer need to remember to call `refresh` after drawing to a Canvas Texture in WebGL, keeping it consistent with the Canvas renderer.
+* `Frame.destroy` will now null the Frames reference to its parent texture, glTexture and clear the data and customData objects.
+* The Container renderer functions will now read the childs `alpha` property, instead of `_alpha`, allowing it to work with more variety of custom children.
### Bug Fixes
-* Tweens created in a paused state couldn't be started by a call to `play`. Fix #4525 (thanks @TonioParis)
-* If both Arcade Physics circle body positions and the delta equaled zero, the `separateCircle` function would cause the position to be set `NaN` (thanks @hizzd)
-* The `CameraManager` would incorrectly destroy the `default` Camera in its shutdown method, meaning that if you used a fixed mask camera and stopped then resumed a Scene, the masks would stop working. The default camera is now destroyed only in the `destroy` method. Fix #4520 (thanks @telinc1)
-* Passing a Frame object to `Bob.setFrame` would fail, as it expected a string or integer. It now checks the type of object, and if a Frame it checks to make sure it's a Frame belonging to the parent Blitter's texture, and if so sets it. Fix #4516 (thanks @NokFrt)
-* The ScaleManager full screen call had an arrow function in it. Despite being within a conditional block of code it still broke really old browsers like IE11, so has been removed. Fix #4530 (thanks @jorbascrumps @CNDW)
-* `Game.getTime` would return `NaN` because it incorrectly accessed the time value from the TimeStep.
-* Text with a `fixedWidth` or `fixedHeight` could cause the canvas to be cropped if less than the size of the Text itself (thanks @rexrainbow)
-* Changing the `radius` of an Arc Game Object wouldn't update the size, causing origin issues. It now updates the size and origin correctly in WebGL. Fix #4542 (thanks @@PhaserEditor2D)
-* Setting `padding` in a Text style configuration object would cause an error about calling split on undefined. Padding can now be applied both in the config and via `setPadding`.
-* `Tilemap.createBlankDynamicLayer` would fail if you provided a string for the tileset as the base tile width and height were incorrectly read from the tileset argument. Fix #4495 (thanks @jppresents)
-* `Tilemap.createDynamicLayer` would fail if you called it without setting the `x` and `y` arguments, even though they were flagged as being optional. Fix #4508 (thanks @jackfreak)
-* `RenderTexture.draw` didn't work if no `x` and `y` arguments were provided, even though they are optional, due to a problem with the way the frame cut values were added. The class has been refactored to prevent this, fixing issues like `RenderTexture.erase` not working with Groups. Fix #4528 (thanks @jbgomez21 @telinc1)
-* The `Grid` Game Object wouldn't render in Canvas mode at all. Fix #4585 (thanks @fyyyyy)
-* If you had a `Graphics` object in the display list immediately after an object with a Bitmap Mask it would throw an error `Uncaught TypeError: Cannot set property 'TL' of undefined`. Fix #4581 (thanks @Petah @Loonride)
-* Calling Arcade Physics `Body.reset` on a Game Object that doesn't have any bounds, like a Container, would throw an error about being unable to access `getTopLeft`. If this is the case, it will now set the position to the given x/y values (thanks Jazz)
-* All of the `Tilemaps.Parsers.Tiled` static functions are now available to be called directly. Fix #4318 (thanks @jestarray)
-* `Arcade.StaticBody.setSize` now centers the body correctly, as with the other similar methods. Fix #4213 (thanks @samme)
-* Setting `random: false` in a Particle Emitter config option no longer causes it to think random is true (thanks @samme)
-* `Zone.setSize` didn't update the displayOrigin, causing touch events to be inaccurate as the origin was out. Fix #4131 (thanks @rexrainbow)
-* `Tween.restart` wouldn't restart the tween properly. Fix #4594 (thanks @NokFrt)
-* Looped Tween Timelines would mess-up the tween values on every loop repeat, causing the loop to fail. They now loop correctly due to a fix in the Tween.play method. Fix #4558 (thanks @peteroravec)
-* `Timeline.setTimeScale` would only impact the Timeline loop and completion delays, not the actively running Tweens. It now scales the time for all child tweens as well. Fix #4164 (thanks @garethwhittaker)
+* The Scale Manager would throw the error 'TypeError: this.removeFullscreenTarget is not a function' when entering full-screen mode. It would still enter fullscreen, but the error would appear in the console. Fix #4605 (thanks @darklightcode)
+* `Tilemap.renderDebug` was calling out-dated Graphics API methods, which would cause the debug to fail (thanks @Fabadiculous)
+* The `Matter.Factory.constraint`, `joint` and `worldConstraint` methods wouldn't allow a zero length constraint to be created due to a falsey check of the length argument. You can now set length to be any value, including zero, or leave it undefined to have it automatically calculated (thanks @olilanz)
+* `Pointer.getDuration` would return a negative / static value on desktop, or NaN on mobile, because the base time wasn't being pulled in from the Input Manager properly. Fix #4612 (thanks @BobtheUltimateProgrammer)
+* `Pointer.downTime`, `Pointer.upTime` and `Pointer.moveTime` would be set to NaN on mobile browsers where Touch.timeStamp didn't exist. Fix #4612 (thanks @BobtheUltimateProgrammer)
+* `WebGLRenderer.setScissor` will default the `drawingBufferHeight` if no argument is provided, stopping NaN scissor heights.
+* If you called `Scene.destroy` within a Game Object `pointerdown` or `pointerup` handler, it would cause the error "Cannot read property 'game' of null" if the event wasn't cancelled in your handler. It now checks if the manager is still there before accessing its property. Fix #4436 (thanks @jcyuan)
+* The `Arc / Circle` Game Object wasn't rendering centered correctly in WebGL due to an issue in a previous size related commit, it would be half a radius off. Fix #4620 (thanks @CipSoft-Components @rexrainbow)
+* Destroying a Scene in HEADLESS mode would throw an error as it tried to access the gl renderer in the Camera class. Fix #4467 (thanks @AndreaBoeAbrahamsen @samme)
+* `Tilemap.createFromObjects` would ignore the `scene` argument passed in to the method. It's now used (thanks @samme)
+* Fixed a bug in the WebGL and Canvas Renderers where a Sprite with a `flipX` or `flipY` value set would render the offset frames slightly out of place, causing the animation to appear jittery. Also, the sprite would be out of place by its origin. Fix #4636 #3813 (thanks @jronn @B3L7)
+* Animations with custom pivots, like those created in Texture Packer with the pivot option enabled, would be mis-aligned if flipped. They now render in the correct position, regardless of scale or flip on either axis. Fix #4155 (thanks @Zax37)
+* Removing a frame from a 2 frame animation would cause an error when a Sprite using that animation next tried to render. Fix #4621 (thanks @orlicgms)
+* Calling `Animation.setRepeat()` wouldn't reset the `repeatCounter` properly, causing Sprite bound animation instances to fail to change their repeat rate. Fix #4553 (thanks @SavedByZero)
+* The `UpdateList.remove` method wouldn't flag the Game Object for removal properly if it was active. It now checks that the Game Object is in the current update list and hasn't already been inserted into the 'pending removal' list before flagging it. Fix #4544 (thanks @jcyuan)
+* `DynamicTilemapLayer.destroy` will now no longer run its destroy sequence again if it has already been run once. Fix #4634 (thanks @CipSoft-Components)
+* `StaticTilemapLayer.destroy` will now no longer run its destroy sequence again if it has already been run once.
+* `Shader.uniforms` now uses Extend instead of Clone to perform a deep object copy, instead of a shallow one, avoiding multiple instances of the same shader sharing uniforms. Fix #4641 (thanks @davidmball)
+* Calling `input.mouse.requestPointerLock()` will no longer throw an error about being unable to push to the Input Manager events queue.
+* The `POINTERLOCK_CHANGE` event is now dispatched by the Input Manager again.
+* The `Pointer.movementX` and `Pointer.movementY` properties are now taken directly from the DOM pointer event values, if the pointer is locked, and no longer incremental. Fix #4611 (thanks @davidmball)
+* The `Pointer.velocity` and `Pointer.midPoint` values are now updated every frame. Based on the `motionFactor` setting they are smoothed towards zero, for velocity, and the pointer position for the mid point. This now happens regardless if the Pointer moves or not, which is how it was originally intended to behave.
+* The `DESTROY` event hook wasn't removed from Group children when destroying the Group and `destroyChildren` was set to false. Now, the hook is removed regardless (thanks @rexrainbow)
+* The WebGL Lost and Restored Context callbacks were never removed, which could cause them to hold onto stale references. Fix #3610 (thanks @Twilrom)
+* `Origin.updateDisplayOrigin` no longer applies a Math.floor to the display origins, allowing you to have a 0.x origin for a Game Object that only has a width or height of 1. This fixes issues with things like 1x1 rectangles displaying incorrectly during rendering. Fix #4126 (thanks @rexrainbow)
+* `InputManager.resetCursor` will now check if the canvas element still exists before resetting the cursor on it. Fix #4662 (thanks @fromnowhereuser)
+* It was not possible to set the zoom value of the Scale Manager back to 1 again, having changed it to a different value. Fix #4633 (thanks @lgibson02 @BinaryMoon)
### Examples, Documentation and TypeScript
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
-@PhaserEditor2D @samme @Nallebeorn @Punkiebe @rootasjey @Sun0fABeach
+@vacarsu @KennethGomez @samme @ldd @Jazcash @jcyuan @LearningCode2023 @PhaserEditor2D
Please see the complete [Change Log](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md) for previous releases.
@@ -565,8 +513,8 @@ All rights reserved.
"Above all, video games are meant to be just one thing: fun. Fun for everyone." - Satoru Iwata
-[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.18.1/phaser.js
-[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.18.1/phaser.min.js
+[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.19.0/phaser.js
+[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.19.0/phaser.min.js
[clone-http]: https://github.com/photonstorm/phaser.git
[clone-ssh]: git@github.com:photonstorm/phaser.git
[clone-ghwin]: github-windows://openRepo/https://github.com/photonstorm/phaser
diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js
index cd907c61e..e0d3217d9 100644
--- a/dist/phaser-arcade-physics.js
+++ b/dist/phaser-arcade-physics.js
@@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 1402);
+/******/ return __webpack_require__(__webpack_require__.s = 1414);
/******/ })
/************************************************************************/
/******/ ([
@@ -422,87 +422,6 @@ module.exports = GetFastValue;
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-var Class = __webpack_require__(0);
-
-/**
- * @classdesc
- * Defines a Point in 2D space, with an x and y component.
- *
- * @class Point
- * @memberof Phaser.Geom
- * @constructor
- * @since 3.0.0
- *
- * @param {number} [x=0] - The x coordinate of this Point.
- * @param {number} [y=x] - The y coordinate of this Point.
- */
-var Point = new Class({
-
- initialize:
-
- function Point (x, y)
- {
- if (x === undefined) { x = 0; }
- if (y === undefined) { y = x; }
-
- /**
- * The x coordinate of this Point.
- *
- * @name Phaser.Geom.Point#x
- * @type {number}
- * @default 0
- * @since 3.0.0
- */
- this.x = x;
-
- /**
- * The y coordinate of this Point.
- *
- * @name Phaser.Geom.Point#y
- * @type {number}
- * @default 0
- * @since 3.0.0
- */
- this.y = y;
- },
-
- /**
- * Set the x and y coordinates of the point to the given values.
- *
- * @method Phaser.Geom.Point#setTo
- * @since 3.0.0
- *
- * @param {number} [x=0] - The x coordinate of this Point.
- * @param {number} [y=x] - The y coordinate of this Point.
- *
- * @return {Phaser.Geom.Point} This Point object.
- */
- setTo: function (x, y)
- {
- if (x === undefined) { x = 0; }
- if (y === undefined) { y = x; }
-
- this.x = x;
- this.y = y;
-
- return this;
- }
-
-});
-
-module.exports = Point;
-
-
-/***/ }),
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
-
/**
* @author Richard Davey
* @copyright 2019 Photon Storm Ltd.
@@ -1139,7 +1058,7 @@ module.exports = Vector2;
/***/ }),
-/* 5 */
+/* 4 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -1149,8 +1068,172 @@ module.exports = Vector2;
*/
var Class = __webpack_require__(0);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
+var GEOM_CONST = __webpack_require__(47);
+
+/**
+ * @classdesc
+ * Defines a Point in 2D space, with an x and y component.
+ *
+ * @class Point
+ * @memberof Phaser.Geom
+ * @constructor
+ * @since 3.0.0
+ *
+ * @param {number} [x=0] - The x coordinate of this Point.
+ * @param {number} [y=x] - The y coordinate of this Point.
+ */
+var Point = new Class({
+
+ initialize:
+
+ function Point (x, y)
+ {
+ if (x === undefined) { x = 0; }
+ if (y === undefined) { y = x; }
+
+ /**
+ * The geometry constant type of this object: `GEOM_CONST.POINT`.
+ * Used for fast type comparisons.
+ *
+ * @name Phaser.Geom.Point#type
+ * @type {integer}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.type = GEOM_CONST.POINT;
+
+ /**
+ * The x coordinate of this Point.
+ *
+ * @name Phaser.Geom.Point#x
+ * @type {number}
+ * @default 0
+ * @since 3.0.0
+ */
+ this.x = x;
+
+ /**
+ * The y coordinate of this Point.
+ *
+ * @name Phaser.Geom.Point#y
+ * @type {number}
+ * @default 0
+ * @since 3.0.0
+ */
+ this.y = y;
+ },
+
+ /**
+ * Set the x and y coordinates of the point to the given values.
+ *
+ * @method Phaser.Geom.Point#setTo
+ * @since 3.0.0
+ *
+ * @param {number} [x=0] - The x coordinate of this Point.
+ * @param {number} [y=x] - The y coordinate of this Point.
+ *
+ * @return {Phaser.Geom.Point} This Point object.
+ */
+ setTo: function (x, y)
+ {
+ if (x === undefined) { x = 0; }
+ if (y === undefined) { y = x; }
+
+ this.x = x;
+ this.y = y;
+
+ return this;
+ }
+
+});
+
+module.exports = Point;
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+// Source object
+// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'
+// The default value to use if the key doesn't exist
+
+/**
+ * Retrieves a value from an object.
+ *
+ * @function Phaser.Utils.Objects.GetValue
+ * @since 3.0.0
+ *
+ * @param {object} source - The object to retrieve the value from.
+ * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.
+ * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.
+ *
+ * @return {*} The value of the requested key.
+ */
+var GetValue = function (source, key, defaultValue)
+{
+ if (!source || typeof source === 'number')
+ {
+ return defaultValue;
+ }
+ else if (source.hasOwnProperty(key))
+ {
+ return source[key];
+ }
+ else if (key.indexOf('.') !== -1)
+ {
+ var keys = key.split('.');
+ var parent = source;
+ var value = defaultValue;
+
+ // Use for loop here so we can break early
+ for (var i = 0; i < keys.length; i++)
+ {
+ if (parent.hasOwnProperty(keys[i]))
+ {
+ // Yes it has a key property, let's carry on down
+ value = parent[keys[i]];
+
+ parent = parent[keys[i]];
+ }
+ else
+ {
+ // Can't go any further, so reset to default
+ value = defaultValue;
+ break;
+ }
+ }
+
+ return value;
+ }
+ else
+ {
+ return defaultValue;
+ }
+};
+
+module.exports = GetValue;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+var Class = __webpack_require__(0);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
/**
* @classdesc
@@ -1321,80 +1404,17 @@ GameObjectFactory.register = function (factoryType, factoryFunction)
}
};
-PluginCache.register('GameObjectFactory', GameObjectFactory, 'add');
-
-module.exports = GameObjectFactory;
-
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-// Source object
-// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'
-// The default value to use if the key doesn't exist
-
-/**
- * Retrieves a value from an object.
- *
- * @function Phaser.Utils.Objects.GetValue
- * @since 3.0.0
- *
- * @param {object} source - The object to retrieve the value from.
- * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.
- * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.
- *
- * @return {*} The value of the requested key.
- */
-var GetValue = function (source, key, defaultValue)
+GameObjectFactory.remove = function (factoryType)
{
- if (!source || typeof source === 'number')
+ if (GameObjectFactory.prototype.hasOwnProperty(factoryType))
{
- return defaultValue;
- }
- else if (source.hasOwnProperty(key))
- {
- return source[key];
- }
- else if (key.indexOf('.') !== -1)
- {
- var keys = key.split('.');
- var parent = source;
- var value = defaultValue;
-
- // Use for loop here so we can break early
- for (var i = 0; i < keys.length; i++)
- {
- if (parent.hasOwnProperty(keys[i]))
- {
- // Yes it has a key property, let's carry on down
- value = parent[keys[i]];
-
- parent = parent[keys[i]];
- }
- else
- {
- // Can't go any further, so reset to default
- value = defaultValue;
- break;
- }
- }
-
- return value;
- }
- else
- {
- return defaultValue;
+ delete GameObjectFactory.prototype[factoryType];
}
};
-module.exports = GetValue;
+PluginCache.register('GameObjectFactory', GameObjectFactory, 'add');
+
+module.exports = GameObjectFactory;
/***/ }),
@@ -1661,6 +1681,349 @@ module.exports = {
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
+"use strict";
+
+
+var has = Object.prototype.hasOwnProperty
+ , prefix = '~';
+
+/**
+ * Constructor to create a storage for our `EE` objects.
+ * An `Events` instance is a plain object whose properties are event names.
+ *
+ * @constructor
+ * @private
+ */
+function Events() {}
+
+//
+// We try to not inherit from `Object.prototype`. In some engines creating an
+// instance in this way is faster than calling `Object.create(null)` directly.
+// If `Object.create(null)` is not supported we prefix the event names with a
+// character to make sure that the built-in object properties are not
+// overridden or used as an attack vector.
+//
+if (Object.create) {
+ Events.prototype = Object.create(null);
+
+ //
+ // This hack is needed because the `__proto__` property is still inherited in
+ // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
+ //
+ if (!new Events().__proto__) prefix = false;
+}
+
+/**
+ * Representation of a single event listener.
+ *
+ * @param {Function} fn The listener function.
+ * @param {*} context The context to invoke the listener with.
+ * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
+ * @constructor
+ * @private
+ */
+function EE(fn, context, once) {
+ this.fn = fn;
+ this.context = context;
+ this.once = once || false;
+}
+
+/**
+ * Add a listener for a given event.
+ *
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
+ * @param {(String|Symbol)} event The event name.
+ * @param {Function} fn The listener function.
+ * @param {*} context The context to invoke the listener with.
+ * @param {Boolean} once Specify if the listener is a one-time listener.
+ * @returns {EventEmitter}
+ * @private
+ */
+function addListener(emitter, event, fn, context, once) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('The listener must be a function');
+ }
+
+ var listener = new EE(fn, context || emitter, once)
+ , evt = prefix ? prefix + event : event;
+
+ if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
+ else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
+ else emitter._events[evt] = [emitter._events[evt], listener];
+
+ return emitter;
+}
+
+/**
+ * Clear event by name.
+ *
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
+ * @param {(String|Symbol)} evt The Event name.
+ * @private
+ */
+function clearEvent(emitter, evt) {
+ if (--emitter._eventsCount === 0) emitter._events = new Events();
+ else delete emitter._events[evt];
+}
+
+/**
+ * Minimal `EventEmitter` interface that is molded against the Node.js
+ * `EventEmitter` interface.
+ *
+ * @constructor
+ * @public
+ */
+function EventEmitter() {
+ this._events = new Events();
+ this._eventsCount = 0;
+}
+
+/**
+ * Return an array listing the events for which the emitter has registered
+ * listeners.
+ *
+ * @returns {Array}
+ * @public
+ */
+EventEmitter.prototype.eventNames = function eventNames() {
+ var names = []
+ , events
+ , name;
+
+ if (this._eventsCount === 0) return names;
+
+ for (name in (events = this._events)) {
+ if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
+ }
+
+ if (Object.getOwnPropertySymbols) {
+ return names.concat(Object.getOwnPropertySymbols(events));
+ }
+
+ return names;
+};
+
+/**
+ * Return the listeners registered for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @returns {Array} The registered listeners.
+ * @public
+ */
+EventEmitter.prototype.listeners = function listeners(event) {
+ var evt = prefix ? prefix + event : event
+ , handlers = this._events[evt];
+
+ if (!handlers) return [];
+ if (handlers.fn) return [handlers.fn];
+
+ for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
+ ee[i] = handlers[i].fn;
+ }
+
+ return ee;
+};
+
+/**
+ * Return the number of listeners listening to a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @returns {Number} The number of listeners.
+ * @public
+ */
+EventEmitter.prototype.listenerCount = function listenerCount(event) {
+ var evt = prefix ? prefix + event : event
+ , listeners = this._events[evt];
+
+ if (!listeners) return 0;
+ if (listeners.fn) return 1;
+ return listeners.length;
+};
+
+/**
+ * Calls each of the listeners registered for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @returns {Boolean} `true` if the event had listeners, else `false`.
+ * @public
+ */
+EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
+ var evt = prefix ? prefix + event : event;
+
+ if (!this._events[evt]) return false;
+
+ var listeners = this._events[evt]
+ , len = arguments.length
+ , args
+ , i;
+
+ if (listeners.fn) {
+ if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
+
+ switch (len) {
+ case 1: return listeners.fn.call(listeners.context), true;
+ case 2: return listeners.fn.call(listeners.context, a1), true;
+ case 3: return listeners.fn.call(listeners.context, a1, a2), true;
+ case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
+ case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
+ case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
+ }
+
+ for (i = 1, args = new Array(len -1); i < len; i++) {
+ args[i - 1] = arguments[i];
+ }
+
+ listeners.fn.apply(listeners.context, args);
+ } else {
+ var length = listeners.length
+ , j;
+
+ for (i = 0; i < length; i++) {
+ if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
+
+ switch (len) {
+ case 1: listeners[i].fn.call(listeners[i].context); break;
+ case 2: listeners[i].fn.call(listeners[i].context, a1); break;
+ case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
+ case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
+ default:
+ if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
+ args[j - 1] = arguments[j];
+ }
+
+ listeners[i].fn.apply(listeners[i].context, args);
+ }
+ }
+ }
+
+ return true;
+};
+
+/**
+ * Add a listener for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @param {Function} fn The listener function.
+ * @param {*} [context=this] The context to invoke the listener with.
+ * @returns {EventEmitter} `this`.
+ * @public
+ */
+EventEmitter.prototype.on = function on(event, fn, context) {
+ return addListener(this, event, fn, context, false);
+};
+
+/**
+ * Add a one-time listener for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @param {Function} fn The listener function.
+ * @param {*} [context=this] The context to invoke the listener with.
+ * @returns {EventEmitter} `this`.
+ * @public
+ */
+EventEmitter.prototype.once = function once(event, fn, context) {
+ return addListener(this, event, fn, context, true);
+};
+
+/**
+ * Remove the listeners of a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @param {Function} fn Only remove the listeners that match this function.
+ * @param {*} context Only remove the listeners that have this context.
+ * @param {Boolean} once Only remove one-time listeners.
+ * @returns {EventEmitter} `this`.
+ * @public
+ */
+EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
+ var evt = prefix ? prefix + event : event;
+
+ if (!this._events[evt]) return this;
+ if (!fn) {
+ clearEvent(this, evt);
+ return this;
+ }
+
+ var listeners = this._events[evt];
+
+ if (listeners.fn) {
+ if (
+ listeners.fn === fn &&
+ (!once || listeners.once) &&
+ (!context || listeners.context === context)
+ ) {
+ clearEvent(this, evt);
+ }
+ } else {
+ for (var i = 0, events = [], length = listeners.length; i < length; i++) {
+ if (
+ listeners[i].fn !== fn ||
+ (once && !listeners[i].once) ||
+ (context && listeners[i].context !== context)
+ ) {
+ events.push(listeners[i]);
+ }
+ }
+
+ //
+ // Reset the array, or remove it completely if we have no more listeners.
+ //
+ if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
+ else clearEvent(this, evt);
+ }
+
+ return this;
+};
+
+/**
+ * Remove all listeners, or those of the specified event.
+ *
+ * @param {(String|Symbol)} [event] The event name.
+ * @returns {EventEmitter} `this`.
+ * @public
+ */
+EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
+ var evt;
+
+ if (event) {
+ evt = prefix ? prefix + event : event;
+ if (this._events[evt]) clearEvent(this, evt);
+ } else {
+ this._events = new Events();
+ this._eventsCount = 0;
+ }
+
+ return this;
+};
+
+//
+// Alias methods names because people roll like that.
+//
+EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
+EventEmitter.prototype.addListener = EventEmitter.prototype.on;
+
+//
+// Expose the prefix.
+//
+EventEmitter.prefixed = prefix;
+
+//
+// Allow `EventEmitter` to be imported as module namespace.
+//
+EventEmitter.EventEmitter = EventEmitter;
+
+//
+// Expose the module.
+//
+if (true) {
+ module.exports = EventEmitter;
+}
+
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports, __webpack_require__) {
+
/**
* @author Richard Davey
* @copyright 2019 Photon Storm Ltd.
@@ -1668,11 +2031,12 @@ module.exports = {
*/
var Class = __webpack_require__(0);
-var Contains = __webpack_require__(47);
-var GetPoint = __webpack_require__(147);
-var GetPoints = __webpack_require__(249);
-var Line = __webpack_require__(54);
-var Random = __webpack_require__(150);
+var Contains = __webpack_require__(48);
+var GetPoint = __webpack_require__(148);
+var GetPoints = __webpack_require__(252);
+var GEOM_CONST = __webpack_require__(47);
+var Line = __webpack_require__(55);
+var Random = __webpack_require__(151);
/**
* @classdesc
@@ -1699,6 +2063,17 @@ var Rectangle = new Class({
if (width === undefined) { width = 0; }
if (height === undefined) { height = 0; }
+ /**
+ * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.
+ * Used for fast type comparisons.
+ *
+ * @name Phaser.Geom.Rectangle#type
+ * @type {integer}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.type = GEOM_CONST.RECTANGLE;
+
/**
* The X coordinate of the top left corner of the Rectangle.
*
@@ -2156,349 +2531,6 @@ var Rectangle = new Class({
module.exports = Rectangle;
-/***/ }),
-/* 11 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var has = Object.prototype.hasOwnProperty
- , prefix = '~';
-
-/**
- * Constructor to create a storage for our `EE` objects.
- * An `Events` instance is a plain object whose properties are event names.
- *
- * @constructor
- * @private
- */
-function Events() {}
-
-//
-// We try to not inherit from `Object.prototype`. In some engines creating an
-// instance in this way is faster than calling `Object.create(null)` directly.
-// If `Object.create(null)` is not supported we prefix the event names with a
-// character to make sure that the built-in object properties are not
-// overridden or used as an attack vector.
-//
-if (Object.create) {
- Events.prototype = Object.create(null);
-
- //
- // This hack is needed because the `__proto__` property is still inherited in
- // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
- //
- if (!new Events().__proto__) prefix = false;
-}
-
-/**
- * Representation of a single event listener.
- *
- * @param {Function} fn The listener function.
- * @param {*} context The context to invoke the listener with.
- * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
- * @constructor
- * @private
- */
-function EE(fn, context, once) {
- this.fn = fn;
- this.context = context;
- this.once = once || false;
-}
-
-/**
- * Add a listener for a given event.
- *
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
- * @param {(String|Symbol)} event The event name.
- * @param {Function} fn The listener function.
- * @param {*} context The context to invoke the listener with.
- * @param {Boolean} once Specify if the listener is a one-time listener.
- * @returns {EventEmitter}
- * @private
- */
-function addListener(emitter, event, fn, context, once) {
- if (typeof fn !== 'function') {
- throw new TypeError('The listener must be a function');
- }
-
- var listener = new EE(fn, context || emitter, once)
- , evt = prefix ? prefix + event : event;
-
- if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
- else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
- else emitter._events[evt] = [emitter._events[evt], listener];
-
- return emitter;
-}
-
-/**
- * Clear event by name.
- *
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
- * @param {(String|Symbol)} evt The Event name.
- * @private
- */
-function clearEvent(emitter, evt) {
- if (--emitter._eventsCount === 0) emitter._events = new Events();
- else delete emitter._events[evt];
-}
-
-/**
- * Minimal `EventEmitter` interface that is molded against the Node.js
- * `EventEmitter` interface.
- *
- * @constructor
- * @public
- */
-function EventEmitter() {
- this._events = new Events();
- this._eventsCount = 0;
-}
-
-/**
- * Return an array listing the events for which the emitter has registered
- * listeners.
- *
- * @returns {Array}
- * @public
- */
-EventEmitter.prototype.eventNames = function eventNames() {
- var names = []
- , events
- , name;
-
- if (this._eventsCount === 0) return names;
-
- for (name in (events = this._events)) {
- if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
- }
-
- if (Object.getOwnPropertySymbols) {
- return names.concat(Object.getOwnPropertySymbols(events));
- }
-
- return names;
-};
-
-/**
- * Return the listeners registered for a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @returns {Array} The registered listeners.
- * @public
- */
-EventEmitter.prototype.listeners = function listeners(event) {
- var evt = prefix ? prefix + event : event
- , handlers = this._events[evt];
-
- if (!handlers) return [];
- if (handlers.fn) return [handlers.fn];
-
- for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
- ee[i] = handlers[i].fn;
- }
-
- return ee;
-};
-
-/**
- * Return the number of listeners listening to a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @returns {Number} The number of listeners.
- * @public
- */
-EventEmitter.prototype.listenerCount = function listenerCount(event) {
- var evt = prefix ? prefix + event : event
- , listeners = this._events[evt];
-
- if (!listeners) return 0;
- if (listeners.fn) return 1;
- return listeners.length;
-};
-
-/**
- * Calls each of the listeners registered for a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @returns {Boolean} `true` if the event had listeners, else `false`.
- * @public
- */
-EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
- var evt = prefix ? prefix + event : event;
-
- if (!this._events[evt]) return false;
-
- var listeners = this._events[evt]
- , len = arguments.length
- , args
- , i;
-
- if (listeners.fn) {
- if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
-
- switch (len) {
- case 1: return listeners.fn.call(listeners.context), true;
- case 2: return listeners.fn.call(listeners.context, a1), true;
- case 3: return listeners.fn.call(listeners.context, a1, a2), true;
- case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
- case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
- case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
- }
-
- for (i = 1, args = new Array(len -1); i < len; i++) {
- args[i - 1] = arguments[i];
- }
-
- listeners.fn.apply(listeners.context, args);
- } else {
- var length = listeners.length
- , j;
-
- for (i = 0; i < length; i++) {
- if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
-
- switch (len) {
- case 1: listeners[i].fn.call(listeners[i].context); break;
- case 2: listeners[i].fn.call(listeners[i].context, a1); break;
- case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
- case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
- default:
- if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
- args[j - 1] = arguments[j];
- }
-
- listeners[i].fn.apply(listeners[i].context, args);
- }
- }
- }
-
- return true;
-};
-
-/**
- * Add a listener for a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @param {Function} fn The listener function.
- * @param {*} [context=this] The context to invoke the listener with.
- * @returns {EventEmitter} `this`.
- * @public
- */
-EventEmitter.prototype.on = function on(event, fn, context) {
- return addListener(this, event, fn, context, false);
-};
-
-/**
- * Add a one-time listener for a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @param {Function} fn The listener function.
- * @param {*} [context=this] The context to invoke the listener with.
- * @returns {EventEmitter} `this`.
- * @public
- */
-EventEmitter.prototype.once = function once(event, fn, context) {
- return addListener(this, event, fn, context, true);
-};
-
-/**
- * Remove the listeners of a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @param {Function} fn Only remove the listeners that match this function.
- * @param {*} context Only remove the listeners that have this context.
- * @param {Boolean} once Only remove one-time listeners.
- * @returns {EventEmitter} `this`.
- * @public
- */
-EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
- var evt = prefix ? prefix + event : event;
-
- if (!this._events[evt]) return this;
- if (!fn) {
- clearEvent(this, evt);
- return this;
- }
-
- var listeners = this._events[evt];
-
- if (listeners.fn) {
- if (
- listeners.fn === fn &&
- (!once || listeners.once) &&
- (!context || listeners.context === context)
- ) {
- clearEvent(this, evt);
- }
- } else {
- for (var i = 0, events = [], length = listeners.length; i < length; i++) {
- if (
- listeners[i].fn !== fn ||
- (once && !listeners[i].once) ||
- (context && listeners[i].context !== context)
- ) {
- events.push(listeners[i]);
- }
- }
-
- //
- // Reset the array, or remove it completely if we have no more listeners.
- //
- if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
- else clearEvent(this, evt);
- }
-
- return this;
-};
-
-/**
- * Remove all listeners, or those of the specified event.
- *
- * @param {(String|Symbol)} [event] The event name.
- * @returns {EventEmitter} `this`.
- * @public
- */
-EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
- var evt;
-
- if (event) {
- evt = prefix ? prefix + event : event;
- if (this._events[evt]) clearEvent(this, evt);
- } else {
- this._events = new Events();
- this._eventsCount = 0;
- }
-
- return this;
-};
-
-//
-// Alias methods names because people roll like that.
-//
-EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
-EventEmitter.prototype.addListener = EventEmitter.prototype.on;
-
-//
-// Expose the prefix.
-//
-EventEmitter.prefixed = prefix;
-
-//
-// Allow `EventEmitter` to be imported as module namespace.
-//
-EventEmitter.EventEmitter = EventEmitter;
-
-//
-// Expose the module.
-//
-if (true) {
- module.exports = EventEmitter;
-}
-
-
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
@@ -2515,27 +2547,27 @@ if (true) {
module.exports = {
- Alpha: __webpack_require__(244),
- Animation: __webpack_require__(479),
- BlendMode: __webpack_require__(247),
- ComputedSize: __webpack_require__(522),
- Crop: __webpack_require__(523),
- Depth: __webpack_require__(248),
- Flip: __webpack_require__(524),
- GetBounds: __webpack_require__(525),
- Mask: __webpack_require__(252),
- Origin: __webpack_require__(526),
- PathFollower: __webpack_require__(527),
- Pipeline: __webpack_require__(151),
- ScrollFactor: __webpack_require__(255),
- Size: __webpack_require__(528),
- Texture: __webpack_require__(529),
- TextureCrop: __webpack_require__(530),
- Tint: __webpack_require__(531),
- ToJSON: __webpack_require__(256),
- Transform: __webpack_require__(257),
+ Alpha: __webpack_require__(247),
+ Animation: __webpack_require__(481),
+ BlendMode: __webpack_require__(250),
+ ComputedSize: __webpack_require__(524),
+ Crop: __webpack_require__(525),
+ Depth: __webpack_require__(251),
+ Flip: __webpack_require__(526),
+ GetBounds: __webpack_require__(527),
+ Mask: __webpack_require__(255),
+ Origin: __webpack_require__(544),
+ PathFollower: __webpack_require__(545),
+ Pipeline: __webpack_require__(152),
+ ScrollFactor: __webpack_require__(258),
+ Size: __webpack_require__(546),
+ Texture: __webpack_require__(547),
+ TextureCrop: __webpack_require__(548),
+ Tint: __webpack_require__(549),
+ ToJSON: __webpack_require__(259),
+ Transform: __webpack_require__(260),
TransformMatrix: __webpack_require__(32),
- Visible: __webpack_require__(258)
+ Visible: __webpack_require__(261)
};
@@ -2551,10 +2583,10 @@ module.exports = {
*/
var Class = __webpack_require__(0);
-var ComponentsToJSON = __webpack_require__(256);
-var DataManager = __webpack_require__(109);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(110);
+var ComponentsToJSON = __webpack_require__(259);
+var DataManager = __webpack_require__(110);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(111);
/**
* @classdesc
@@ -2859,8 +2891,8 @@ var GameObject = new Class({
* @method Phaser.GameObjects.GameObject#setData
* @since 3.0.0
*
- * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.
- * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.
+ * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.
+ * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.
*
* @return {this} This GameObject.
*/
@@ -3191,8 +3223,8 @@ module.exports = GameObject;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MATH = __webpack_require__(165);
-var GetValue = __webpack_require__(6);
+var MATH = __webpack_require__(166);
+var GetValue = __webpack_require__(5);
/**
* Retrieves a value from an object. Allows for more advanced selection options, including:
@@ -3272,6 +3304,105 @@ module.exports = GetAdvancedValue;
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+var IsPlainObject = __webpack_require__(7);
+
+// @param {boolean} deep - Perform a deep copy?
+// @param {object} target - The target object to copy to.
+// @return {object} The extended object.
+
+/**
+ * This is a slightly modified version of http://api.jquery.com/jQuery.extend/
+ *
+ * @function Phaser.Utils.Objects.Extend
+ * @since 3.0.0
+ *
+ * @return {object} The extended object.
+ */
+var Extend = function ()
+{
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if (typeof target === 'boolean')
+ {
+ deep = target;
+ target = arguments[1] || {};
+
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // extend Phaser if only one argument is passed
+ if (length === i)
+ {
+ target = this;
+ --i;
+ }
+
+ for (; i < length; i++)
+ {
+ // Only deal with non-null/undefined values
+ if ((options = arguments[i]) != null)
+ {
+ // Extend the base object
+ for (name in options)
+ {
+ src = target[name];
+ copy = options[name];
+
+ // Prevent never-ending loop
+ if (target === copy)
+ {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))
+ {
+ if (copyIsArray)
+ {
+ copyIsArray = false;
+ clone = src && Array.isArray(src) ? src : [];
+ }
+ else
+ {
+ clone = src && IsPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[name] = Extend(deep, clone, copy);
+
+ // Don't bring in undefined values
+ }
+ else if (copy !== undefined)
+ {
+ target[name] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+module.exports = Extend;
+
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
/**
* @author Richard Davey
* @copyright 2019 Photon Storm Ltd.
@@ -3279,8 +3410,8 @@ module.exports = GetAdvancedValue;
*/
var Class = __webpack_require__(0);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
/**
* @classdesc
@@ -3423,13 +3554,21 @@ GameObjectCreator.register = function (factoryType, factoryFunction)
}
};
+GameObjectCreator.remove = function (factoryType)
+{
+ if (GameObjectCreator.prototype.hasOwnProperty(factoryType))
+ {
+ delete GameObjectCreator.prototype[factoryType];
+ }
+};
+
PluginCache.register('GameObjectCreator', GameObjectCreator, 'make');
module.exports = GameObjectCreator;
/***/ }),
-/* 16 */
+/* 17 */
/***/ (function(module, exports) {
/**
@@ -3581,7 +3720,7 @@ module.exports = FILE_CONST;
/***/ }),
-/* 17 */
+/* 18 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -3590,97 +3729,34 @@ module.exports = FILE_CONST;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var IsPlainObject = __webpack_require__(7);
-
-// @param {boolean} deep - Perform a deep copy?
-// @param {object} target - The target object to copy to.
-// @return {object} The extended object.
-
/**
- * This is a slightly modified version of http://api.jquery.com/jQuery.extend/
- *
- * @function Phaser.Utils.Objects.Extend
- * @since 3.0.0
- *
- * @return {object} The extended object.
+ * @namespace Phaser.Core.Events
*/
-var Extend = function ()
-{
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
- // Handle a deep copy situation
- if (typeof target === 'boolean')
- {
- deep = target;
- target = arguments[1] || {};
+module.exports = {
- // skip the boolean and the target
- i = 2;
- }
+ BLUR: __webpack_require__(528),
+ BOOT: __webpack_require__(529),
+ CONTEXT_LOST: __webpack_require__(530),
+ CONTEXT_RESTORED: __webpack_require__(531),
+ DESTROY: __webpack_require__(532),
+ FOCUS: __webpack_require__(533),
+ HIDDEN: __webpack_require__(534),
+ PAUSE: __webpack_require__(535),
+ POST_RENDER: __webpack_require__(536),
+ POST_STEP: __webpack_require__(537),
+ PRE_RENDER: __webpack_require__(538),
+ PRE_STEP: __webpack_require__(539),
+ READY: __webpack_require__(540),
+ RESUME: __webpack_require__(541),
+ STEP: __webpack_require__(542),
+ VISIBLE: __webpack_require__(543)
- // extend Phaser if only one argument is passed
- if (length === i)
- {
- target = this;
- --i;
- }
-
- for (; i < length; i++)
- {
- // Only deal with non-null/undefined values
- if ((options = arguments[i]) != null)
- {
- // Extend the base object
- for (name in options)
- {
- src = target[name];
- copy = options[name];
-
- // Prevent never-ending loop
- if (target === copy)
- {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))
- {
- if (copyIsArray)
- {
- copyIsArray = false;
- clone = src && Array.isArray(src) ? src : [];
- }
- else
- {
- clone = src && IsPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[name] = Extend(deep, clone, copy);
-
- // Don't bring in undefined values
- }
- else if (copy !== undefined)
- {
- target[name] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
};
-module.exports = Extend;
-
/***/ }),
-/* 18 */
+/* 19 */
/***/ (function(module, exports) {
/**
@@ -3889,7 +3965,7 @@ module.exports = PluginCache;
/***/ }),
-/* 19 */
+/* 20 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -3904,31 +3980,31 @@ module.exports = PluginCache;
module.exports = {
- BOOT: __webpack_require__(661),
- CREATE: __webpack_require__(662),
- DESTROY: __webpack_require__(663),
- PAUSE: __webpack_require__(664),
- POST_UPDATE: __webpack_require__(665),
- PRE_UPDATE: __webpack_require__(666),
- READY: __webpack_require__(667),
- RENDER: __webpack_require__(668),
- RESUME: __webpack_require__(669),
- SHUTDOWN: __webpack_require__(670),
- SLEEP: __webpack_require__(671),
- START: __webpack_require__(672),
- TRANSITION_COMPLETE: __webpack_require__(673),
- TRANSITION_INIT: __webpack_require__(674),
- TRANSITION_OUT: __webpack_require__(675),
- TRANSITION_START: __webpack_require__(676),
- TRANSITION_WAKE: __webpack_require__(677),
- UPDATE: __webpack_require__(678),
- WAKE: __webpack_require__(679)
+ BOOT: __webpack_require__(665),
+ CREATE: __webpack_require__(666),
+ DESTROY: __webpack_require__(667),
+ PAUSE: __webpack_require__(668),
+ POST_UPDATE: __webpack_require__(669),
+ PRE_UPDATE: __webpack_require__(670),
+ READY: __webpack_require__(671),
+ RENDER: __webpack_require__(672),
+ RESUME: __webpack_require__(673),
+ SHUTDOWN: __webpack_require__(674),
+ SLEEP: __webpack_require__(675),
+ START: __webpack_require__(676),
+ TRANSITION_COMPLETE: __webpack_require__(677),
+ TRANSITION_INIT: __webpack_require__(678),
+ TRANSITION_OUT: __webpack_require__(679),
+ TRANSITION_START: __webpack_require__(680),
+ TRANSITION_WAKE: __webpack_require__(681),
+ UPDATE: __webpack_require__(682),
+ WAKE: __webpack_require__(683)
};
/***/ }),
-/* 20 */
+/* 21 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -3938,13 +4014,13 @@ module.exports = {
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var Events = __webpack_require__(80);
+var CONST = __webpack_require__(17);
+var Events = __webpack_require__(81);
var GetFastValue = __webpack_require__(2);
-var GetURL = __webpack_require__(204);
-var MergeXHRSettings = __webpack_require__(205);
-var XHRLoader = __webpack_require__(428);
-var XHRSettings = __webpack_require__(133);
+var GetURL = __webpack_require__(206);
+var MergeXHRSettings = __webpack_require__(207);
+var XHRLoader = __webpack_require__(431);
+var XHRSettings = __webpack_require__(134);
/**
* @classdesc
@@ -4469,7 +4545,79 @@ module.exports = File;
/***/ }),
-/* 21 */
+/* 22 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+var MATH_CONST = {
+
+ /**
+ * The value of PI * 2.
+ *
+ * @name Phaser.Math.PI2
+ * @type {number}
+ * @since 3.0.0
+ */
+ PI2: Math.PI * 2,
+
+ /**
+ * The value of PI * 0.5.
+ *
+ * @name Phaser.Math.TAU
+ * @type {number}
+ * @since 3.0.0
+ */
+ TAU: Math.PI * 0.5,
+
+ /**
+ * An epsilon value (1.0e-6)
+ *
+ * @name Phaser.Math.EPSILON
+ * @type {number}
+ * @since 3.0.0
+ */
+ EPSILON: 1.0e-6,
+
+ /**
+ * For converting degrees to radians (PI / 180)
+ *
+ * @name Phaser.Math.DEG_TO_RAD
+ * @type {number}
+ * @since 3.0.0
+ */
+ DEG_TO_RAD: Math.PI / 180,
+
+ /**
+ * For converting radians to degrees (180 / PI)
+ *
+ * @name Phaser.Math.RAD_TO_DEG
+ * @type {number}
+ * @since 3.0.0
+ */
+ RAD_TO_DEG: 180 / Math.PI,
+
+ /**
+ * An instance of the Random Number Generator.
+ * This is not set until the Game boots.
+ *
+ * @name Phaser.Math.RND
+ * @type {Phaser.Math.RandomDataGenerator}
+ * @since 3.0.0
+ */
+ RND: null
+
+};
+
+module.exports = MATH_CONST;
+
+
+/***/ }),
+/* 23 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -4553,7 +4701,7 @@ module.exports = GetTilesWithin;
/***/ }),
-/* 22 */
+/* 24 */
/***/ (function(module, exports) {
/**
@@ -4583,79 +4731,7 @@ module.exports = Clamp;
/***/ }),
-/* 23 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-var MATH_CONST = {
-
- /**
- * The value of PI * 2.
- *
- * @name Phaser.Math.PI2
- * @type {number}
- * @since 3.0.0
- */
- PI2: Math.PI * 2,
-
- /**
- * The value of PI * 0.5.
- *
- * @name Phaser.Math.TAU
- * @type {number}
- * @since 3.0.0
- */
- TAU: Math.PI * 0.5,
-
- /**
- * An epsilon value (1.0e-6)
- *
- * @name Phaser.Math.EPSILON
- * @type {number}
- * @since 3.0.0
- */
- EPSILON: 1.0e-6,
-
- /**
- * For converting degrees to radians (PI / 180)
- *
- * @name Phaser.Math.DEG_TO_RAD
- * @type {number}
- * @since 3.0.0
- */
- DEG_TO_RAD: Math.PI / 180,
-
- /**
- * For converting radians to degrees (180 / PI)
- *
- * @name Phaser.Math.RAD_TO_DEG
- * @type {number}
- * @since 3.0.0
- */
- RAD_TO_DEG: 180 / Math.PI,
-
- /**
- * An instance of the Random Number Generator.
- * This is not set until the Game boots.
- *
- * @name Phaser.Math.RND
- * @type {Phaser.Math.RandomDataGenerator}
- * @since 3.0.0
- */
- RND: null
-
-};
-
-module.exports = MATH_CONST;
-
-
-/***/ }),
-/* 24 */
+/* 25 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -4664,8 +4740,8 @@ module.exports = MATH_CONST;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(26);
-var Smoothing = __webpack_require__(113);
+var CONST = __webpack_require__(31);
+var Smoothing = __webpack_require__(114);
// The pool into which the canvas elements are placed.
var pool = [];
@@ -4916,7 +4992,7 @@ module.exports = CanvasPool();
/***/ }),
-/* 25 */
+/* 26 */
/***/ (function(module, exports) {
/**
@@ -5000,144 +5076,6 @@ var SetTransform = function (renderer, ctx, src, camera, parentMatrix)
module.exports = SetTransform;
-/***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * Global constants.
- *
- * @ignore
- */
-
-var CONST = {
-
- /**
- * Phaser Release Version
- *
- * @name Phaser.VERSION
- * @const
- * @type {string}
- * @since 3.0.0
- */
- VERSION: '3.18.1',
-
- BlendModes: __webpack_require__(52),
-
- ScaleModes: __webpack_require__(104),
-
- /**
- * AUTO Detect Renderer.
- *
- * @name Phaser.AUTO
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- AUTO: 0,
-
- /**
- * Canvas Renderer.
- *
- * @name Phaser.CANVAS
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- CANVAS: 1,
-
- /**
- * WebGL Renderer.
- *
- * @name Phaser.WEBGL
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- WEBGL: 2,
-
- /**
- * Headless Renderer.
- *
- * @name Phaser.HEADLESS
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- HEADLESS: 3,
-
- /**
- * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead
- * to help you remember what the value is doing in your code.
- *
- * @name Phaser.FOREVER
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- FOREVER: -1,
-
- /**
- * Direction constant.
- *
- * @name Phaser.NONE
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- NONE: 4,
-
- /**
- * Direction constant.
- *
- * @name Phaser.UP
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- UP: 5,
-
- /**
- * Direction constant.
- *
- * @name Phaser.DOWN
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- DOWN: 6,
-
- /**
- * Direction constant.
- *
- * @name Phaser.LEFT
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- LEFT: 7,
-
- /**
- * Direction constant.
- *
- * @name Phaser.RIGHT
- * @const
- * @type {integer}
- * @since 3.0.0
- */
- RIGHT: 8
-
-};
-
-module.exports = CONST;
-
-
/***/ }),
/* 27 */
/***/ (function(module, exports) {
@@ -5215,41 +5153,7 @@ module.exports = PropertyValueSet;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-/**
- * @namespace Phaser.Core.Events
- */
-
-module.exports = {
-
- BLUR: __webpack_require__(580),
- BOOT: __webpack_require__(581),
- DESTROY: __webpack_require__(582),
- FOCUS: __webpack_require__(583),
- HIDDEN: __webpack_require__(584),
- PAUSE: __webpack_require__(585),
- POST_RENDER: __webpack_require__(586),
- POST_STEP: __webpack_require__(587),
- PRE_RENDER: __webpack_require__(588),
- PRE_STEP: __webpack_require__(589),
- READY: __webpack_require__(590),
- RESUME: __webpack_require__(591),
- STEP: __webpack_require__(592),
- VISIBLE: __webpack_require__(593)
-
-};
-
-
-/***/ }),
-/* 29 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-var BlendModes = __webpack_require__(52);
+var BlendModes = __webpack_require__(53);
var GetAdvancedValue = __webpack_require__(14);
var ScaleModes = __webpack_require__(104);
@@ -5373,7 +5277,7 @@ module.exports = BuildGameObject;
/***/ }),
-/* 30 */
+/* 29 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -5385,7 +5289,7 @@ module.exports = BuildGameObject;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var GameObject = __webpack_require__(13);
-var Line = __webpack_require__(54);
+var Line = __webpack_require__(55);
/**
* @classdesc
@@ -5673,7 +5577,7 @@ module.exports = Shape;
/***/ }),
-/* 31 */
+/* 30 */
/***/ (function(module, exports) {
/**
@@ -5727,6 +5631,144 @@ module.exports = {
};
+/***/ }),
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * Global constants.
+ *
+ * @ignore
+ */
+
+var CONST = {
+
+ /**
+ * Phaser Release Version
+ *
+ * @name Phaser.VERSION
+ * @const
+ * @type {string}
+ * @since 3.0.0
+ */
+ VERSION: '3.19.0',
+
+ BlendModes: __webpack_require__(53),
+
+ ScaleModes: __webpack_require__(104),
+
+ /**
+ * AUTO Detect Renderer.
+ *
+ * @name Phaser.AUTO
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ AUTO: 0,
+
+ /**
+ * Canvas Renderer.
+ *
+ * @name Phaser.CANVAS
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ CANVAS: 1,
+
+ /**
+ * WebGL Renderer.
+ *
+ * @name Phaser.WEBGL
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ WEBGL: 2,
+
+ /**
+ * Headless Renderer.
+ *
+ * @name Phaser.HEADLESS
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ HEADLESS: 3,
+
+ /**
+ * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead
+ * to help you remember what the value is doing in your code.
+ *
+ * @name Phaser.FOREVER
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ FOREVER: -1,
+
+ /**
+ * Direction constant.
+ *
+ * @name Phaser.NONE
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ NONE: 4,
+
+ /**
+ * Direction constant.
+ *
+ * @name Phaser.UP
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ UP: 5,
+
+ /**
+ * Direction constant.
+ *
+ * @name Phaser.DOWN
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ DOWN: 6,
+
+ /**
+ * Direction constant.
+ *
+ * @name Phaser.LEFT
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ LEFT: 7,
+
+ /**
+ * Direction constant.
+ *
+ * @name Phaser.RIGHT
+ * @const
+ * @type {integer}
+ * @since 3.0.0
+ */
+ RIGHT: 8
+
+};
+
+module.exports = CONST;
+
+
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
@@ -5738,7 +5780,8 @@ module.exports = {
*/
var Class = __webpack_require__(0);
-var Vector2 = __webpack_require__(4);
+var MATH_CONST = __webpack_require__(22);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -5758,8 +5801,8 @@ var Vector2 = __webpack_require__(4);
* @since 3.0.0
*
* @param {number} [a=1] - The Scale X value.
- * @param {number} [b=0] - The Shear Y value.
- * @param {number} [c=0] - The Shear X value.
+ * @param {number} [b=0] - The Skew Y value.
+ * @param {number} [c=0] - The Skew X value.
* @param {number} [d=1] - The Scale Y value.
* @param {number} [tx=0] - The Translate X value.
* @param {number} [ty=0] - The Translate Y value.
@@ -5824,7 +5867,7 @@ var TransformMatrix = new Class({
},
/**
- * The Shear Y value.
+ * The Skew Y value.
*
* @name Phaser.GameObjects.Components.TransformMatrix#b
* @type {number}
@@ -5845,7 +5888,7 @@ var TransformMatrix = new Class({
},
/**
- * The Shear X value.
+ * The Skew X value.
*
* @name Phaser.GameObjects.Components.TransformMatrix#c
* @type {number}
@@ -5971,7 +6014,7 @@ var TransformMatrix = new Class({
},
/**
- * The rotation of the Matrix.
+ * The rotation of the Matrix. Value is in radians.
*
* @name Phaser.GameObjects.Components.TransformMatrix#rotation
* @type {number}
@@ -5982,13 +6025,53 @@ var TransformMatrix = new Class({
get: function ()
{
- return Math.acos(this.a / this.scaleX) * (Math.atan(-this.c / this.a) < 0 ? -1 : 1);
+ return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);
}
},
/**
- * The horizontal scale of the Matrix.
+ * The rotation of the Matrix, normalized to be within the Phaser right-handed
+ * clockwise rotation space. Value is in radians.
+ *
+ * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized
+ * @type {number}
+ * @readonly
+ * @since 3.19.0
+ */
+ rotationNormalized: {
+
+ get: function ()
+ {
+ var matrix = this.matrix;
+
+ var a = matrix[0];
+ var b = matrix[1];
+ var c = matrix[2];
+ var d = matrix[3];
+
+ if (a || b)
+ {
+ // var r = Math.sqrt(a * a + b * b);
+
+ return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);
+ }
+ else if (c || d)
+ {
+ // var s = Math.sqrt(c * c + d * d);
+
+ return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ },
+
+ /**
+ * The decomposed horizontal scale of the Matrix. This value is always positive.
*
* @name Phaser.GameObjects.Components.TransformMatrix#scaleX
* @type {number}
@@ -5999,13 +6082,13 @@ var TransformMatrix = new Class({
get: function ()
{
- return Math.sqrt((this.a * this.a) + (this.c * this.c));
+ return Math.sqrt((this.a * this.a) + (this.b * this.b));
}
},
/**
- * The vertical scale of the Matrix.
+ * The decomposed vertical scale of the Matrix. This value is always positive.
*
* @name Phaser.GameObjects.Components.TransformMatrix#scaleY
* @type {number}
@@ -6016,7 +6099,7 @@ var TransformMatrix = new Class({
get: function ()
{
- return Math.sqrt((this.b * this.b) + (this.d * this.d));
+ return Math.sqrt((this.c * this.c) + (this.d * this.d));
}
},
@@ -6665,10 +6748,10 @@ module.exports = TransformMatrix;
*/
var Class = __webpack_require__(0);
-var GetColor = __webpack_require__(160);
-var GetColor32 = __webpack_require__(270);
-var HSVToRGB = __webpack_require__(161);
-var RGBToHSV = __webpack_require__(271);
+var GetColor = __webpack_require__(161);
+var GetColor32 = __webpack_require__(273);
+var HSVToRGB = __webpack_require__(162);
+var RGBToHSV = __webpack_require__(274);
/**
* @namespace Phaser.Display.Color
@@ -7594,7 +7677,7 @@ module.exports = PropertyValueInc;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(23);
+var CONST = __webpack_require__(22);
/**
* Convert the given angle from degrees, to the equivalent angle in radians.
@@ -7941,6 +8024,86 @@ module.exports = Contains;
/* 47 */
/***/ (function(module, exports) {
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+var GEOM_CONST = {
+
+ /**
+ * A Circle Geometry object type.
+ *
+ * @name Phaser.Geom.CIRCLE
+ * @type {integer}
+ * @since 3.19.0
+ */
+ CIRCLE: 0,
+
+ /**
+ * An Ellipse Geometry object type.
+ *
+ * @name Phaser.Geom.ELLIPSE
+ * @type {integer}
+ * @since 3.19.0
+ */
+ ELLIPSE: 1,
+
+ /**
+ * A Line Geometry object type.
+ *
+ * @name Phaser.Geom.LINE
+ * @type {integer}
+ * @since 3.19.0
+ */
+ LINE: 2,
+
+ /**
+ * A Point Geometry object type.
+ *
+ * @name Phaser.Geom.POINT
+ * @type {integer}
+ * @since 3.19.0
+ */
+ POINT: 3,
+
+ /**
+ * A Polygon Geometry object type.
+ *
+ * @name Phaser.Geom.POLYGON
+ * @type {integer}
+ * @since 3.19.0
+ */
+ POLYGON: 4,
+
+ /**
+ * A Rectangle Geometry object type.
+ *
+ * @name Phaser.Geom.RECTANGLE
+ * @type {integer}
+ * @since 3.19.0
+ */
+ RECTANGLE: 5,
+
+ /**
+ * A Triangle Geometry object type.
+ *
+ * @name Phaser.Geom.TRIANGLE
+ * @type {integer}
+ * @since 3.19.0
+ */
+ TRIANGLE: 6
+
+};
+
+module.exports = GEOM_CONST;
+
+
+/***/ }),
+/* 48 */
+/***/ (function(module, exports) {
+
/**
* @author Richard Davey
* @copyright 2019 Photon Storm Ltd.
@@ -7973,7 +8136,7 @@ module.exports = Contains;
/***/ }),
-/* 48 */
+/* 49 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -7988,27 +8151,27 @@ module.exports = Contains;
module.exports = {
- DESTROY: __webpack_require__(602),
- FADE_IN_COMPLETE: __webpack_require__(603),
- FADE_IN_START: __webpack_require__(604),
- FADE_OUT_COMPLETE: __webpack_require__(605),
- FADE_OUT_START: __webpack_require__(606),
- FLASH_COMPLETE: __webpack_require__(607),
- FLASH_START: __webpack_require__(608),
- PAN_COMPLETE: __webpack_require__(609),
- PAN_START: __webpack_require__(610),
- POST_RENDER: __webpack_require__(611),
- PRE_RENDER: __webpack_require__(612),
- SHAKE_COMPLETE: __webpack_require__(613),
- SHAKE_START: __webpack_require__(614),
- ZOOM_COMPLETE: __webpack_require__(615),
- ZOOM_START: __webpack_require__(616)
+ DESTROY: __webpack_require__(606),
+ FADE_IN_COMPLETE: __webpack_require__(607),
+ FADE_IN_START: __webpack_require__(608),
+ FADE_OUT_COMPLETE: __webpack_require__(609),
+ FADE_OUT_START: __webpack_require__(610),
+ FLASH_COMPLETE: __webpack_require__(611),
+ FLASH_START: __webpack_require__(612),
+ PAN_COMPLETE: __webpack_require__(613),
+ PAN_START: __webpack_require__(614),
+ POST_RENDER: __webpack_require__(615),
+ PRE_RENDER: __webpack_require__(616),
+ SHAKE_COMPLETE: __webpack_require__(617),
+ SHAKE_START: __webpack_require__(618),
+ ZOOM_COMPLETE: __webpack_require__(619),
+ ZOOM_START: __webpack_require__(620)
};
/***/ }),
-/* 49 */
+/* 50 */
/***/ (function(module, exports) {
/**
@@ -8046,7 +8209,7 @@ module.exports = LineStyleCanvas;
/***/ }),
-/* 50 */
+/* 51 */
/***/ (function(module, exports) {
/**
@@ -8175,7 +8338,7 @@ module.exports = CONST;
/***/ }),
-/* 51 */
+/* 52 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -8184,8 +8347,8 @@ module.exports = CONST;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTileAt = __webpack_require__(137);
-var GetTilesWithin = __webpack_require__(21);
+var GetTileAt = __webpack_require__(138);
+var GetTilesWithin = __webpack_require__(23);
/**
* Calculates interesting faces within the rectangular area specified (in tile coordinates) of the
@@ -8241,7 +8404,7 @@ module.exports = CalculateFacesWithin;
/***/ }),
-/* 52 */
+/* 53 */
/***/ (function(module, exports) {
/**
@@ -8580,7 +8743,7 @@ module.exports = {
/***/ }),
-/* 53 */
+/* 54 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -8595,58 +8758,58 @@ module.exports = {
module.exports = {
- BOOT: __webpack_require__(782),
- DESTROY: __webpack_require__(783),
- DRAG_END: __webpack_require__(784),
- DRAG_ENTER: __webpack_require__(785),
- DRAG: __webpack_require__(786),
- DRAG_LEAVE: __webpack_require__(787),
- DRAG_OVER: __webpack_require__(788),
- DRAG_START: __webpack_require__(789),
- DROP: __webpack_require__(790),
- GAME_OUT: __webpack_require__(791),
- GAME_OVER: __webpack_require__(792),
- GAMEOBJECT_DOWN: __webpack_require__(793),
- GAMEOBJECT_DRAG_END: __webpack_require__(794),
- GAMEOBJECT_DRAG_ENTER: __webpack_require__(795),
- GAMEOBJECT_DRAG: __webpack_require__(796),
- GAMEOBJECT_DRAG_LEAVE: __webpack_require__(797),
- GAMEOBJECT_DRAG_OVER: __webpack_require__(798),
- GAMEOBJECT_DRAG_START: __webpack_require__(799),
- GAMEOBJECT_DROP: __webpack_require__(800),
- GAMEOBJECT_MOVE: __webpack_require__(801),
- GAMEOBJECT_OUT: __webpack_require__(802),
- GAMEOBJECT_OVER: __webpack_require__(803),
- GAMEOBJECT_POINTER_DOWN: __webpack_require__(804),
- GAMEOBJECT_POINTER_MOVE: __webpack_require__(805),
- GAMEOBJECT_POINTER_OUT: __webpack_require__(806),
- GAMEOBJECT_POINTER_OVER: __webpack_require__(807),
- GAMEOBJECT_POINTER_UP: __webpack_require__(808),
- GAMEOBJECT_POINTER_WHEEL: __webpack_require__(809),
- GAMEOBJECT_UP: __webpack_require__(810),
- GAMEOBJECT_WHEEL: __webpack_require__(811),
- MANAGER_BOOT: __webpack_require__(812),
- MANAGER_PROCESS: __webpack_require__(813),
- MANAGER_UPDATE: __webpack_require__(814),
- POINTER_DOWN: __webpack_require__(815),
- POINTER_DOWN_OUTSIDE: __webpack_require__(816),
- POINTER_MOVE: __webpack_require__(817),
- POINTER_OUT: __webpack_require__(818),
- POINTER_OVER: __webpack_require__(819),
- POINTER_UP: __webpack_require__(820),
- POINTER_UP_OUTSIDE: __webpack_require__(821),
- POINTER_WHEEL: __webpack_require__(822),
- POINTERLOCK_CHANGE: __webpack_require__(823),
- PRE_UPDATE: __webpack_require__(824),
- SHUTDOWN: __webpack_require__(825),
- START: __webpack_require__(826),
- UPDATE: __webpack_require__(827)
+ BOOT: __webpack_require__(787),
+ DESTROY: __webpack_require__(788),
+ DRAG_END: __webpack_require__(789),
+ DRAG_ENTER: __webpack_require__(790),
+ DRAG: __webpack_require__(791),
+ DRAG_LEAVE: __webpack_require__(792),
+ DRAG_OVER: __webpack_require__(793),
+ DRAG_START: __webpack_require__(794),
+ DROP: __webpack_require__(795),
+ GAME_OUT: __webpack_require__(796),
+ GAME_OVER: __webpack_require__(797),
+ GAMEOBJECT_DOWN: __webpack_require__(798),
+ GAMEOBJECT_DRAG_END: __webpack_require__(799),
+ GAMEOBJECT_DRAG_ENTER: __webpack_require__(800),
+ GAMEOBJECT_DRAG: __webpack_require__(801),
+ GAMEOBJECT_DRAG_LEAVE: __webpack_require__(802),
+ GAMEOBJECT_DRAG_OVER: __webpack_require__(803),
+ GAMEOBJECT_DRAG_START: __webpack_require__(804),
+ GAMEOBJECT_DROP: __webpack_require__(805),
+ GAMEOBJECT_MOVE: __webpack_require__(806),
+ GAMEOBJECT_OUT: __webpack_require__(807),
+ GAMEOBJECT_OVER: __webpack_require__(808),
+ GAMEOBJECT_POINTER_DOWN: __webpack_require__(809),
+ GAMEOBJECT_POINTER_MOVE: __webpack_require__(810),
+ GAMEOBJECT_POINTER_OUT: __webpack_require__(811),
+ GAMEOBJECT_POINTER_OVER: __webpack_require__(812),
+ GAMEOBJECT_POINTER_UP: __webpack_require__(813),
+ GAMEOBJECT_POINTER_WHEEL: __webpack_require__(814),
+ GAMEOBJECT_UP: __webpack_require__(815),
+ GAMEOBJECT_WHEEL: __webpack_require__(816),
+ MANAGER_BOOT: __webpack_require__(817),
+ MANAGER_PROCESS: __webpack_require__(818),
+ MANAGER_UPDATE: __webpack_require__(819),
+ POINTER_DOWN: __webpack_require__(820),
+ POINTER_DOWN_OUTSIDE: __webpack_require__(821),
+ POINTER_MOVE: __webpack_require__(822),
+ POINTER_OUT: __webpack_require__(823),
+ POINTER_OVER: __webpack_require__(824),
+ POINTER_UP: __webpack_require__(825),
+ POINTER_UP_OUTSIDE: __webpack_require__(826),
+ POINTER_WHEEL: __webpack_require__(827),
+ POINTERLOCK_CHANGE: __webpack_require__(828),
+ PRE_UPDATE: __webpack_require__(829),
+ SHUTDOWN: __webpack_require__(830),
+ START: __webpack_require__(831),
+ UPDATE: __webpack_require__(832)
};
/***/ }),
-/* 54 */
+/* 55 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -8656,10 +8819,11 @@ module.exports = {
*/
var Class = __webpack_require__(0);
-var GetPoint = __webpack_require__(250);
-var GetPoints = __webpack_require__(148);
-var Random = __webpack_require__(149);
-var Vector2 = __webpack_require__(4);
+var GetPoint = __webpack_require__(253);
+var GetPoints = __webpack_require__(149);
+var GEOM_CONST = __webpack_require__(47);
+var Random = __webpack_require__(150);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -8686,6 +8850,17 @@ var Line = new Class({
if (x2 === undefined) { x2 = 0; }
if (y2 === undefined) { y2 = 0; }
+ /**
+ * The geometry constant type of this object: `GEOM_CONST.LINE`.
+ * Used for fast type comparisons.
+ *
+ * @name Phaser.Geom.Line#type
+ * @type {integer}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.type = GEOM_CONST.LINE;
+
/**
* The x coordinate of the lines starting point.
*
@@ -8971,7 +9146,7 @@ module.exports = Line;
/***/ }),
-/* 55 */
+/* 56 */
/***/ (function(module, exports) {
/**
@@ -8999,7 +9174,7 @@ module.exports = Length;
/***/ }),
-/* 56 */
+/* 57 */
/***/ (function(module, exports) {
/**
@@ -9031,7 +9206,7 @@ module.exports = Wrap;
/***/ }),
-/* 57 */
+/* 58 */
/***/ (function(module, exports) {
/**
@@ -9065,7 +9240,7 @@ module.exports = DistanceBetween;
/***/ }),
-/* 58 */
+/* 59 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -9075,11 +9250,11 @@ module.exports = DistanceBetween;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
var IsPlainObject = __webpack_require__(7);
/**
@@ -9295,7 +9470,7 @@ module.exports = JSONFile;
/***/ }),
-/* 59 */
+/* 60 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -9489,8 +9664,8 @@ module.exports = MultiFile;
/***/ }),
-/* 60 */,
-/* 61 */
+/* 61 */,
+/* 62 */
/***/ (function(module, exports) {
/**
@@ -9541,7 +9716,7 @@ module.exports = WorldToTileX;
/***/ }),
-/* 62 */
+/* 63 */
/***/ (function(module, exports) {
/**
@@ -9592,7 +9767,7 @@ module.exports = WorldToTileY;
/***/ }),
-/* 63 */
+/* 64 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10274,7 +10449,7 @@ earcut.flatten = function (data) {
/***/ }),
-/* 64 */
+/* 65 */
/***/ (function(module, exports) {
/**
@@ -10316,7 +10491,7 @@ module.exports = Clone;
/***/ }),
-/* 65 */
+/* 66 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -10331,35 +10506,35 @@ module.exports = Clone;
module.exports = {
- COMPLETE: __webpack_require__(851),
- DECODED: __webpack_require__(852),
- DECODED_ALL: __webpack_require__(853),
- DESTROY: __webpack_require__(854),
- DETUNE: __webpack_require__(855),
- GLOBAL_DETUNE: __webpack_require__(856),
- GLOBAL_MUTE: __webpack_require__(857),
- GLOBAL_RATE: __webpack_require__(858),
- GLOBAL_VOLUME: __webpack_require__(859),
- LOOP: __webpack_require__(860),
- LOOPED: __webpack_require__(861),
- MUTE: __webpack_require__(862),
- PAUSE_ALL: __webpack_require__(863),
- PAUSE: __webpack_require__(864),
- PLAY: __webpack_require__(865),
- RATE: __webpack_require__(866),
- RESUME_ALL: __webpack_require__(867),
- RESUME: __webpack_require__(868),
- SEEK: __webpack_require__(869),
- STOP_ALL: __webpack_require__(870),
- STOP: __webpack_require__(871),
- UNLOCKED: __webpack_require__(872),
- VOLUME: __webpack_require__(873)
+ COMPLETE: __webpack_require__(855),
+ DECODED: __webpack_require__(856),
+ DECODED_ALL: __webpack_require__(857),
+ DESTROY: __webpack_require__(858),
+ DETUNE: __webpack_require__(859),
+ GLOBAL_DETUNE: __webpack_require__(860),
+ GLOBAL_MUTE: __webpack_require__(861),
+ GLOBAL_RATE: __webpack_require__(862),
+ GLOBAL_VOLUME: __webpack_require__(863),
+ LOOP: __webpack_require__(864),
+ LOOPED: __webpack_require__(865),
+ MUTE: __webpack_require__(866),
+ PAUSE_ALL: __webpack_require__(867),
+ PAUSE: __webpack_require__(868),
+ PLAY: __webpack_require__(869),
+ RATE: __webpack_require__(870),
+ RESUME_ALL: __webpack_require__(871),
+ RESUME: __webpack_require__(872),
+ SEEK: __webpack_require__(873),
+ STOP_ALL: __webpack_require__(874),
+ STOP: __webpack_require__(875),
+ UNLOCKED: __webpack_require__(876),
+ VOLUME: __webpack_require__(877)
};
/***/ }),
-/* 66 */
+/* 67 */
/***/ (function(module, exports) {
/**
@@ -10408,7 +10583,7 @@ module.exports = SafeRange;
/***/ }),
-/* 67 */
+/* 68 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -10420,7 +10595,7 @@ module.exports = SafeRange;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var GameObject = __webpack_require__(13);
-var SpriteRender = __webpack_require__(926);
+var SpriteRender = __webpack_require__(930);
/**
* @classdesc
@@ -10586,7 +10761,7 @@ module.exports = Sprite;
/***/ }),
-/* 68 */
+/* 69 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -10661,7 +10836,7 @@ module.exports = StrokePathWebGL;
/***/ }),
-/* 69 */
+/* 70 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -10671,11 +10846,12 @@ module.exports = StrokePathWebGL;
*/
var Class = __webpack_require__(0);
-var Contains = __webpack_require__(81);
-var GetPoint = __webpack_require__(396);
-var GetPoints = __webpack_require__(397);
-var Line = __webpack_require__(54);
-var Random = __webpack_require__(153);
+var Contains = __webpack_require__(83);
+var GetPoint = __webpack_require__(399);
+var GetPoints = __webpack_require__(400);
+var GEOM_CONST = __webpack_require__(47);
+var Line = __webpack_require__(55);
+var Random = __webpack_require__(154);
/**
* @classdesc
@@ -10708,6 +10884,17 @@ var Triangle = new Class({
if (x3 === undefined) { x3 = 0; }
if (y3 === undefined) { y3 = 0; }
+ /**
+ * The geometry constant type of this object: `GEOM_CONST.TRIANGLE`.
+ * Used for fast type comparisons.
+ *
+ * @name Phaser.Geom.Triangle#type
+ * @type {integer}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.type = GEOM_CONST.TRIANGLE;
+
/**
* `x` coordinate of the first point.
*
@@ -11096,7 +11283,7 @@ module.exports = Triangle;
/***/ }),
-/* 70 */
+/* 71 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -11106,8 +11293,8 @@ module.exports = Triangle;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -11370,7 +11557,7 @@ module.exports = ImageFile;
/***/ }),
-/* 71 */
+/* 72 */
/***/ (function(module, exports) {
/**
@@ -11406,7 +11593,7 @@ module.exports = SetTileCollision;
/***/ }),
-/* 72 */
+/* 73 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -11417,7 +11604,7 @@ module.exports = SetTileCollision;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var Rectangle = __webpack_require__(417);
+var Rectangle = __webpack_require__(420);
/**
* @classdesc
@@ -12244,7 +12431,7 @@ module.exports = Tile;
/***/ }),
-/* 73 */
+/* 74 */
/***/ (function(module, exports) {
/**
@@ -12272,7 +12459,7 @@ module.exports = GetCenterX;
/***/ }),
-/* 74 */
+/* 75 */
/***/ (function(module, exports) {
/**
@@ -12307,7 +12494,7 @@ module.exports = SetCenterX;
/***/ }),
-/* 75 */
+/* 76 */
/***/ (function(module, exports) {
/**
@@ -12342,7 +12529,7 @@ module.exports = SetCenterY;
/***/ }),
-/* 76 */
+/* 77 */
/***/ (function(module, exports) {
/**
@@ -12370,7 +12557,7 @@ module.exports = GetCenterY;
/***/ }),
-/* 77 */
+/* 78 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -12381,9 +12568,10 @@ module.exports = GetCenterY;
var Class = __webpack_require__(0);
var Contains = __webpack_require__(46);
-var GetPoint = __webpack_require__(241);
-var GetPoints = __webpack_require__(242);
-var Random = __webpack_require__(145);
+var GetPoint = __webpack_require__(244);
+var GetPoints = __webpack_require__(245);
+var GEOM_CONST = __webpack_require__(47);
+var Random = __webpack_require__(146);
/**
* @classdesc
@@ -12412,6 +12600,17 @@ var Circle = new Class({
if (y === undefined) { y = 0; }
if (radius === undefined) { radius = 0; }
+ /**
+ * The geometry constant type of this object: `GEOM_CONST.CIRCLE`.
+ * Used for fast type comparisons.
+ *
+ * @name Phaser.Geom.Circle#type
+ * @type {integer}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.type = GEOM_CONST.CIRCLE;
+
/**
* The x position of the center of the circle.
*
@@ -12733,7 +12932,7 @@ module.exports = Circle;
/***/ }),
-/* 78 */
+/* 79 */
/***/ (function(module, exports) {
/**
@@ -12779,7 +12978,7 @@ module.exports = SpliceOne;
/***/ }),
-/* 79 */
+/* 80 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -12789,9 +12988,9 @@ module.exports = SpliceOne;
*/
var Class = __webpack_require__(0);
-var FromPoints = __webpack_require__(172);
-var Rectangle = __webpack_require__(10);
-var Vector2 = __webpack_require__(4);
+var FromPoints = __webpack_require__(173);
+var Rectangle = __webpack_require__(11);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -12987,10 +13186,8 @@ var Curve = new Class({
return this.getPointAt(1, out);
},
- // Get total curve arc length
-
/**
- * [description]
+ * Get total curve arc length
*
* @method Phaser.Curves.Curve#getLength
* @since 3.0.0
@@ -13004,10 +13201,9 @@ var Curve = new Class({
return lengths[lengths.length - 1];
},
- // Get list of cumulative segment lengths
/**
- * [description]
+ * Get list of cumulative segment lengths
*
* @method Phaser.Curves.Curve#getLengths
* @since 3.0.0
@@ -13166,13 +13362,11 @@ var Curve = new Class({
return this.getPointAt(0, out);
},
- // Returns a unit vector tangent at t
- // In case any sub curve does not implement its tangent derivation,
- // 2 points a small delta apart will be used to find its gradient
- // which seems to give a reasonable approximation
-
/**
- * [description]
+ * Returns a unit vector tangent at t
+ * In case any sub curve does not implement its tangent derivation,
+ * 2 points a small delta apart will be used to find its gradient
+ * which seems to give a reasonable approximation
*
* @method Phaser.Curves.Curve#getTangent
* @since 3.0.0
@@ -13354,7 +13548,7 @@ module.exports = Curve;
/***/ }),
-/* 80 */
+/* 81 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -13369,22 +13563,131 @@ module.exports = Curve;
module.exports = {
- ADD: __webpack_require__(829),
- COMPLETE: __webpack_require__(830),
- FILE_COMPLETE: __webpack_require__(831),
- FILE_KEY_COMPLETE: __webpack_require__(832),
- FILE_LOAD_ERROR: __webpack_require__(833),
- FILE_LOAD: __webpack_require__(834),
- FILE_PROGRESS: __webpack_require__(835),
- POST_PROCESS: __webpack_require__(836),
- PROGRESS: __webpack_require__(837),
- START: __webpack_require__(838)
+ ADD: __webpack_require__(834),
+ COMPLETE: __webpack_require__(835),
+ FILE_COMPLETE: __webpack_require__(836),
+ FILE_KEY_COMPLETE: __webpack_require__(837),
+ FILE_LOAD_ERROR: __webpack_require__(838),
+ FILE_LOAD: __webpack_require__(839),
+ FILE_PROGRESS: __webpack_require__(840),
+ POST_PROCESS: __webpack_require__(841),
+ PROGRESS: __webpack_require__(842),
+ START: __webpack_require__(843)
};
/***/ }),
-/* 81 */
+/* 82 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+var EaseMap = __webpack_require__(164);
+var UppercaseFirst = __webpack_require__(178);
+
+/**
+ * This internal function is used to return the correct ease function for a Tween.
+ *
+ * It can take a variety of input, including an EaseMap based string, or a custom function.
+ *
+ * @function Phaser.Tweens.Builders.GetEaseFunction
+ * @since 3.0.0
+ *
+ * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function.
+ * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease.
+ *
+ * @return {function} The ease function.
+ */
+var GetEaseFunction = function (ease, easeParams)
+{
+ // Default ease function
+ var easeFunction = EaseMap.Power0;
+
+ // Prepare ease function
+ if (typeof ease === 'string')
+ {
+ // String based look-up
+
+ // 1) They specified it correctly
+ if (EaseMap.hasOwnProperty(ease))
+ {
+ easeFunction = EaseMap[ease];
+ }
+ else
+ {
+ // Do some string manipulation to try and find it
+ var direction = '';
+
+ if (ease.indexOf('.'))
+ {
+ // quad.in = Quad.easeIn
+ // quad.out = Quad.easeOut
+ // quad.inout =Quad.easeInOut
+
+ direction = ease.substr(ease.indexOf('.') + 1);
+
+ if (direction.toLowerCase() === 'in')
+ {
+ direction = 'easeIn';
+ }
+ else if (direction.toLowerCase() === 'out')
+ {
+ direction = 'easeOut';
+ }
+ else if (direction.toLowerCase() === 'inout')
+ {
+ direction = 'easeInOut';
+ }
+ }
+
+ ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction);
+
+ if (EaseMap.hasOwnProperty(ease))
+ {
+ easeFunction = EaseMap[ease];
+ }
+ }
+ }
+ else if (typeof ease === 'function')
+ {
+ // Custom function
+ easeFunction = ease;
+ }
+ else if (Array.isArray(ease) && ease.length === 4)
+ {
+ // Bezier function (TODO)
+ }
+
+ // No custom ease parameters?
+ if (!easeParams)
+ {
+ // Return ease function
+ return easeFunction;
+ }
+
+ var cloneParams = easeParams.slice(0);
+
+ cloneParams.unshift(0);
+
+ // Return ease function with custom ease parameters
+ return function (v)
+ {
+ cloneParams[0] = v;
+
+ return easeFunction.apply(this, cloneParams);
+ };
+};
+
+module.exports = GetEaseFunction;
+
+
+/***/ }),
+/* 83 */
/***/ (function(module, exports) {
/**
@@ -13437,7 +13740,7 @@ module.exports = Contains;
/***/ }),
-/* 82 */
+/* 84 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -13446,7 +13749,7 @@ module.exports = Contains;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
// This is based off an explanation and expanded math presented by Paul Bourke:
// See http:'local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
@@ -13513,7 +13816,7 @@ module.exports = LineToLine;
/***/ }),
-/* 83 */
+/* 85 */
/***/ (function(module, exports) {
/**
@@ -13541,8 +13844,8 @@ module.exports = Angle;
/***/ }),
-/* 84 */,
-/* 85 */
+/* 86 */,
+/* 87 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -13551,49 +13854,7 @@ module.exports = Angle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clone = __webpack_require__(64);
-
-/**
- * Creates a new Object using all values from obj1 and obj2.
- * If a value exists in both obj1 and obj2, the value in obj1 is used.
- *
- * @function Phaser.Utils.Objects.Merge
- * @since 3.0.0
- *
- * @param {object} obj1 - The first object.
- * @param {object} obj2 - The second object.
- *
- * @return {object} A new object containing the union of obj1's and obj2's properties.
- */
-var Merge = function (obj1, obj2)
-{
- var clone = Clone(obj1);
-
- for (var key in obj2)
- {
- if (!clone.hasOwnProperty(key))
- {
- clone[key] = obj2[key];
- }
- }
-
- return clone;
-};
-
-module.exports = Merge;
-
-
-/***/ }),
-/* 86 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
/**
* Return a value based on the range between `min` and `max` and the percentage given.
@@ -13618,7 +13879,7 @@ module.exports = FromPercent;
/***/ }),
-/* 87 */
+/* 88 */
/***/ (function(module, exports) {
/**
@@ -13659,7 +13920,7 @@ module.exports = GetBoolean;
/***/ }),
-/* 88 */
+/* 89 */
/***/ (function(module, exports) {
/**
@@ -13831,7 +14092,7 @@ module.exports = TWEEN_CONST;
/***/ }),
-/* 89 */
+/* 90 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -13846,18 +14107,18 @@ module.exports = TWEEN_CONST;
module.exports = {
- ENTER_FULLSCREEN: __webpack_require__(655),
- FULLSCREEN_FAILED: __webpack_require__(656),
- FULLSCREEN_UNSUPPORTED: __webpack_require__(657),
- LEAVE_FULLSCREEN: __webpack_require__(658),
- ORIENTATION_CHANGE: __webpack_require__(659),
- RESIZE: __webpack_require__(660)
+ ENTER_FULLSCREEN: __webpack_require__(659),
+ FULLSCREEN_FAILED: __webpack_require__(660),
+ FULLSCREEN_UNSUPPORTED: __webpack_require__(661),
+ LEAVE_FULLSCREEN: __webpack_require__(662),
+ ORIENTATION_CHANGE: __webpack_require__(663),
+ RESIZE: __webpack_require__(664)
};
/***/ }),
-/* 90 */
+/* 91 */
/***/ (function(module, exports) {
/**
@@ -13901,7 +14162,7 @@ module.exports = SnapFloor;
/***/ }),
-/* 91 */
+/* 92 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -13911,8 +14172,8 @@ module.exports = SnapFloor;
*/
var Class = __webpack_require__(0);
-var Clamp = __webpack_require__(22);
-var Extend = __webpack_require__(17);
+var Clamp = __webpack_require__(24);
+var Extend = __webpack_require__(15);
/**
* @classdesc
@@ -14613,16 +14874,18 @@ var Frame = new Class({
},
/**
- * Destroys this Frames references.
+ * Destroys this Frame by nulling its reference to the parent Texture and and data objects.
*
* @method Phaser.Textures.Frame#destroy
* @since 3.0.0
*/
destroy: function ()
{
- this.texture = null;
-
this.source = null;
+ this.texture = null;
+ this.glTexture = null;
+ this.customData = null;
+ this.data = null;
},
/**
@@ -14718,7 +14981,7 @@ module.exports = Frame;
/***/ }),
-/* 92 */
+/* 93 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -14728,10 +14991,11 @@ module.exports = Frame;
*/
var Class = __webpack_require__(0);
-var Contains = __webpack_require__(93);
-var GetPoint = __webpack_require__(368);
-var GetPoints = __webpack_require__(369);
-var Random = __webpack_require__(152);
+var Contains = __webpack_require__(94);
+var GetPoint = __webpack_require__(371);
+var GetPoints = __webpack_require__(372);
+var GEOM_CONST = __webpack_require__(47);
+var Random = __webpack_require__(153);
/**
* @classdesc
@@ -14762,6 +15026,17 @@ var Ellipse = new Class({
if (width === undefined) { width = 0; }
if (height === undefined) { height = 0; }
+ /**
+ * The geometry constant type of this object: `GEOM_CONST.ELLIPSE`.
+ * Used for fast type comparisons.
+ *
+ * @name Phaser.Geom.Ellipse#type
+ * @type {integer}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.type = GEOM_CONST.ELLIPSE;
+
/**
* The x position of the center of the ellipse.
*
@@ -15086,7 +15361,7 @@ module.exports = Ellipse;
/***/ }),
-/* 93 */
+/* 94 */
/***/ (function(module, exports) {
/**
@@ -15128,7 +15403,7 @@ module.exports = Contains;
/***/ }),
-/* 94 */
+/* 95 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -15137,15 +15412,15 @@ module.exports = Contains;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Actions = __webpack_require__(229);
+var Actions = __webpack_require__(232);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(110);
+var Events = __webpack_require__(111);
var GetFastValue = __webpack_require__(2);
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
var IsPlainObject = __webpack_require__(7);
-var Range = __webpack_require__(362);
-var Set = __webpack_require__(105);
-var Sprite = __webpack_require__(67);
+var Range = __webpack_require__(365);
+var Set = __webpack_require__(106);
+var Sprite = __webpack_require__(68);
/**
* @classdesc
@@ -15482,14 +15757,15 @@ var Group = new Class({
var randomKey = GetFastValue(options, 'randomKey', false);
var randomFrame = GetFastValue(options, 'randomFrame', false);
var yoyo = GetFastValue(options, 'yoyo', false);
- var quantity = GetFastValue(options, 'frameQuantity', 1);
+ var quantity = GetFastValue(options, 'quantity', false);
+ var frameQuantity = GetFastValue(options, 'frameQuantity', 1);
var max = GetFastValue(options, 'max', 0);
- // If a grid is set we use that to override the quantity?
+ // If a quantity value is set we use that to override the frameQuantity
var range = Range(key, frame, {
max: max,
- qty: quantity,
+ qty: (quantity) ? quantity : frameQuantity,
random: randomKey,
randomB: randomFrame,
repeat: repeat,
@@ -16266,22 +16542,7 @@ var Group = new Class({
return;
}
- if (destroyChildren)
- {
- var children = this.children;
-
- for (var i = 0; i < children.size; i++)
- {
- var gameObject = children.entries[i];
-
- // Remove the event hook first or it'll go all recursive hell on us
- gameObject.off(Events.DESTROY, this.remove, this);
-
- gameObject.destroy();
- }
- }
-
- this.children.clear();
+ this.clear(false, destroyChildren);
this.scene = undefined;
this.children = undefined;
@@ -16293,7 +16554,7 @@ module.exports = Group;
/***/ }),
-/* 95 */
+/* 96 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -16305,7 +16566,7 @@ module.exports = Group;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var GameObject = __webpack_require__(13);
-var ImageRender = __webpack_require__(929);
+var ImageRender = __webpack_require__(933);
/**
* @classdesc
@@ -16393,68 +16654,6 @@ var Image = new Class({
module.exports = Image;
-/***/ }),
-/* 96 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-var EaseMap = __webpack_require__(163);
-
-/**
- * [description]
- *
- * @function Phaser.Tweens.Builders.GetEaseFunction
- * @since 3.0.0
- *
- * @param {(string|function)} ease - [description]
- * @param {array} easeParams - [description]
- *
- * @return {function} [description]
- */
-var GetEaseFunction = function (ease, easeParams)
-{
- if (typeof ease === 'string' && EaseMap.hasOwnProperty(ease))
- {
- if (easeParams)
- {
- var cloneParams = easeParams.slice(0);
-
- cloneParams.unshift(0);
-
- return function (v)
- {
- cloneParams[0] = v;
-
- return EaseMap[ease].apply(this, cloneParams);
- };
- }
- else
- {
- // String based look-up
- return EaseMap[ease];
- }
- }
- else if (typeof ease === 'function')
- {
- // Custom function
- return ease;
- }
- else if (Array.isArray(ease) && ease.length === 4)
- {
- // Bezier function (TODO)
- }
-
- return EaseMap.Power0;
-};
-
-module.exports = GetEaseFunction;
-
-
/***/ }),
/* 97 */
/***/ (function(module, exports) {
@@ -17084,6 +17283,51 @@ module.exports = ScaleModes;
/* 105 */
/***/ (function(module, exports, __webpack_require__) {
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+var Clone = __webpack_require__(65);
+
+/**
+ * Creates a new Object using all values from obj1 and obj2.
+ * If a value exists in both obj1 and obj2, the value in obj1 is used.
+ *
+ * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this
+ * function on shallow objects.
+ *
+ * @function Phaser.Utils.Objects.Merge
+ * @since 3.0.0
+ *
+ * @param {object} obj1 - The first object.
+ * @param {object} obj2 - The second object.
+ *
+ * @return {object} A new object containing the union of obj1's and obj2's properties.
+ */
+var Merge = function (obj1, obj2)
+{
+ var clone = Clone(obj1);
+
+ for (var key in obj2)
+ {
+ if (!clone.hasOwnProperty(key))
+ {
+ clone[key] = obj2[key];
+ }
+ }
+
+ return clone;
+};
+
+module.exports = Merge;
+
+
+/***/ }),
+/* 106 */
+/***/ (function(module, exports, __webpack_require__) {
+
/**
* @author Richard Davey
* @copyright 2019 Photon Storm Ltd.
@@ -17530,7 +17774,7 @@ module.exports = Set;
/***/ }),
-/* 106 */
+/* 107 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -17539,14 +17783,14 @@ module.exports = Set;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BlendModes = __webpack_require__(52);
-var Circle = __webpack_require__(77);
+var BlendModes = __webpack_require__(53);
+var Circle = __webpack_require__(78);
var CircleContains = __webpack_require__(46);
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var GameObject = __webpack_require__(13);
-var Rectangle = __webpack_require__(10);
-var RectangleContains = __webpack_require__(47);
+var Rectangle = __webpack_require__(11);
+var RectangleContains = __webpack_require__(48);
/**
* @classdesc
@@ -17843,7 +18087,7 @@ module.exports = Zone;
/***/ }),
-/* 107 */
+/* 108 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -17858,30 +18102,30 @@ module.exports = Zone;
module.exports = {
- ADD_ANIMATION: __webpack_require__(504),
- ANIMATION_COMPLETE: __webpack_require__(505),
- ANIMATION_REPEAT: __webpack_require__(506),
- ANIMATION_RESTART: __webpack_require__(507),
- ANIMATION_START: __webpack_require__(508),
- PAUSE_ALL: __webpack_require__(509),
- REMOVE_ANIMATION: __webpack_require__(510),
- RESUME_ALL: __webpack_require__(511),
- SPRITE_ANIMATION_COMPLETE: __webpack_require__(512),
- SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(513),
- SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(514),
- SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(515),
- SPRITE_ANIMATION_KEY_START: __webpack_require__(516),
- SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(517),
- SPRITE_ANIMATION_REPEAT: __webpack_require__(518),
- SPRITE_ANIMATION_RESTART: __webpack_require__(519),
- SPRITE_ANIMATION_START: __webpack_require__(520),
- SPRITE_ANIMATION_UPDATE: __webpack_require__(521)
+ ADD_ANIMATION: __webpack_require__(506),
+ ANIMATION_COMPLETE: __webpack_require__(507),
+ ANIMATION_REPEAT: __webpack_require__(508),
+ ANIMATION_RESTART: __webpack_require__(509),
+ ANIMATION_START: __webpack_require__(510),
+ PAUSE_ALL: __webpack_require__(511),
+ REMOVE_ANIMATION: __webpack_require__(512),
+ RESUME_ALL: __webpack_require__(513),
+ SPRITE_ANIMATION_COMPLETE: __webpack_require__(514),
+ SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(515),
+ SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(516),
+ SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(517),
+ SPRITE_ANIMATION_KEY_START: __webpack_require__(518),
+ SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(519),
+ SPRITE_ANIMATION_REPEAT: __webpack_require__(520),
+ SPRITE_ANIMATION_RESTART: __webpack_require__(521),
+ SPRITE_ANIMATION_START: __webpack_require__(522),
+ SPRITE_ANIMATION_UPDATE: __webpack_require__(523)
};
/***/ }),
-/* 108 */
+/* 109 */
/***/ (function(module, exports) {
/**
@@ -17909,7 +18153,7 @@ module.exports = Perimeter;
/***/ }),
-/* 109 */
+/* 110 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -17919,7 +18163,7 @@ module.exports = Perimeter;
*/
var Class = __webpack_require__(0);
-var Events = __webpack_require__(259);
+var Events = __webpack_require__(262);
/**
* @callback DataEachCallback
@@ -18550,7 +18794,7 @@ module.exports = DataManager;
/***/ }),
-/* 110 */
+/* 111 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -18563,11 +18807,11 @@ module.exports = DataManager;
* @namespace Phaser.GameObjects.Events
*/
-module.exports = { DESTROY: __webpack_require__(536) };
+module.exports = { DESTROY: __webpack_require__(554) };
/***/ }),
-/* 111 */
+/* 112 */
/***/ (function(module, exports) {
/**
@@ -18605,7 +18849,7 @@ module.exports = Shuffle;
/***/ }),
-/* 112 */
+/* 113 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -18617,12 +18861,12 @@ module.exports = Shuffle;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var DegToRad = __webpack_require__(35);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(48);
-var Rectangle = __webpack_require__(10);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(49);
+var Rectangle = __webpack_require__(11);
var TransformMatrix = __webpack_require__(32);
-var ValueToColor = __webpack_require__(159);
-var Vector2 = __webpack_require__(4);
+var ValueToColor = __webpack_require__(160);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -20526,7 +20770,7 @@ module.exports = BaseCamera;
/***/ }),
-/* 113 */
+/* 114 */
/***/ (function(module, exports) {
/**
@@ -20658,7 +20902,7 @@ module.exports = Smoothing();
/***/ }),
-/* 114 */
+/* 115 */
/***/ (function(module, exports) {
/**
@@ -20688,7 +20932,7 @@ module.exports = Linear;
/***/ }),
-/* 115 */
+/* 116 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@@ -20857,10 +21101,10 @@ function init ()
module.exports = init();
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(681)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(685)))
/***/ }),
-/* 116 */
+/* 117 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -20869,7 +21113,7 @@ module.exports = init();
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var OS = __webpack_require__(115);
+var OS = __webpack_require__(116);
/**
* Determines the browser type and version running this Phaser Game instance.
@@ -20970,7 +21214,7 @@ module.exports = init();
/***/ }),
-/* 117 */
+/* 118 */
/***/ (function(module, exports) {
/**
@@ -21000,7 +21244,7 @@ module.exports = IsSizePowerOfTwo;
/***/ }),
-/* 118 */
+/* 119 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -21015,17 +21259,17 @@ module.exports = IsSizePowerOfTwo;
module.exports = {
- ADD: __webpack_require__(727),
- ERROR: __webpack_require__(728),
- LOAD: __webpack_require__(729),
- READY: __webpack_require__(730),
- REMOVE: __webpack_require__(731)
+ ADD: __webpack_require__(732),
+ ERROR: __webpack_require__(733),
+ LOAD: __webpack_require__(734),
+ READY: __webpack_require__(735),
+ REMOVE: __webpack_require__(736)
};
/***/ }),
-/* 119 */
+/* 120 */
/***/ (function(module, exports) {
/**
@@ -21083,7 +21327,7 @@ module.exports = AddToDOM;
/***/ }),
-/* 120 */
+/* 121 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -21092,7 +21336,7 @@ module.exports = AddToDOM;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SpliceOne = __webpack_require__(78);
+var SpliceOne = __webpack_require__(79);
/**
* Removes the given item, or array of items, from the array.
@@ -21174,7 +21418,7 @@ module.exports = Remove;
/***/ }),
-/* 121 */
+/* 122 */
/***/ (function(module, exports) {
/**
@@ -22062,7 +22306,7 @@ module.exports = KeyCodes;
/***/ }),
-/* 122 */
+/* 123 */
/***/ (function(module, exports) {
/**
@@ -22185,7 +22429,7 @@ module.exports = CONST;
/***/ }),
-/* 123 */
+/* 124 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -22196,10 +22440,10 @@ module.exports = CONST;
*/
var Class = __webpack_require__(0);
-var Clone = __webpack_require__(64);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(65);
-var GameEvents = __webpack_require__(28);
+var Clone = __webpack_require__(65);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(66);
+var GameEvents = __webpack_require__(18);
var NOOP = __webpack_require__(1);
/**
@@ -22809,7 +23053,7 @@ module.exports = BaseSoundManager;
/***/ }),
-/* 124 */
+/* 125 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -22820,9 +23064,9 @@ module.exports = BaseSoundManager;
*/
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(65);
-var Extend = __webpack_require__(17);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(66);
+var Extend = __webpack_require__(15);
var NOOP = __webpack_require__(1);
/**
@@ -23309,7 +23553,7 @@ module.exports = BaseSound;
/***/ }),
-/* 125 */
+/* 126 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -23318,10 +23562,10 @@ module.exports = BaseSound;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ArrayUtils = __webpack_require__(178);
+var ArrayUtils = __webpack_require__(180);
var Class = __webpack_require__(0);
var NOOP = __webpack_require__(1);
-var StableSort = __webpack_require__(127);
+var StableSort = __webpack_require__(128);
/**
* @callback EachListCallback
@@ -24125,7 +24369,7 @@ module.exports = List;
/***/ }),
-/* 126 */
+/* 127 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -24134,8 +24378,8 @@ module.exports = List;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CheckMatrix = __webpack_require__(179);
-var TransposeMatrix = __webpack_require__(360);
+var CheckMatrix = __webpack_require__(181);
+var TransposeMatrix = __webpack_require__(363);
/**
* Rotates the array matrix based on the given rotation value.
@@ -24197,7 +24441,7 @@ module.exports = RotateMatrix;
/***/ }),
-/* 127 */
+/* 128 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -24342,7 +24586,7 @@ else {}
})();
/***/ }),
-/* 128 */
+/* 129 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -24354,10 +24598,10 @@ else {}
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var GameObject = __webpack_require__(13);
-var GetBitmapTextSize = __webpack_require__(904);
-var ParseFromAtlas = __webpack_require__(905);
-var ParseXMLBitmapFont = __webpack_require__(181);
-var Render = __webpack_require__(906);
+var GetBitmapTextSize = __webpack_require__(908);
+var ParseFromAtlas = __webpack_require__(909);
+var ParseXMLBitmapFont = __webpack_require__(183);
+var Render = __webpack_require__(910);
/**
* @classdesc
@@ -24984,7 +25228,7 @@ module.exports = BitmapText;
/***/ }),
-/* 129 */
+/* 130 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -24996,7 +25240,7 @@ module.exports = BitmapText;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var GameObject = __webpack_require__(13);
-var MeshRender = __webpack_require__(1026);
+var MeshRender = __webpack_require__(1030);
var NOOP = __webpack_require__(1);
/**
@@ -25157,7 +25401,7 @@ module.exports = Mesh;
/***/ }),
-/* 130 */
+/* 131 */
/***/ (function(module, exports) {
/**
@@ -25193,7 +25437,7 @@ module.exports = RectangleToRectangle;
/***/ }),
-/* 131 */
+/* 132 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -25202,7 +25446,7 @@ module.exports = RectangleToRectangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
// Contains the plugins that Phaser uses globally and locally.
// These are the source objects, not instantiated.
@@ -25305,7 +25549,7 @@ module.exports = InputPluginCache;
/***/ }),
-/* 132 */
+/* 133 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -25320,19 +25564,19 @@ module.exports = InputPluginCache;
module.exports = {
- ANY_KEY_DOWN: __webpack_require__(1164),
- ANY_KEY_UP: __webpack_require__(1165),
- COMBO_MATCH: __webpack_require__(1166),
- DOWN: __webpack_require__(1167),
- KEY_DOWN: __webpack_require__(1168),
- KEY_UP: __webpack_require__(1169),
- UP: __webpack_require__(1170)
+ ANY_KEY_DOWN: __webpack_require__(1168),
+ ANY_KEY_UP: __webpack_require__(1169),
+ COMBO_MATCH: __webpack_require__(1170),
+ DOWN: __webpack_require__(1171),
+ KEY_DOWN: __webpack_require__(1172),
+ KEY_UP: __webpack_require__(1173),
+ UP: __webpack_require__(1174)
};
/***/ }),
-/* 133 */
+/* 134 */
/***/ (function(module, exports) {
/**
@@ -25396,7 +25640,7 @@ module.exports = XHRSettings;
/***/ }),
-/* 134 */
+/* 135 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -25406,8 +25650,8 @@ module.exports = XHRSettings;
*/
var Class = __webpack_require__(0);
-var Components = __webpack_require__(207);
-var Sprite = __webpack_require__(67);
+var Components = __webpack_require__(209);
+var Sprite = __webpack_require__(68);
/**
* @classdesc
@@ -25497,8 +25741,8 @@ module.exports = ArcadeSprite;
/***/ }),
-/* 135 */,
-/* 136 */
+/* 136 */,
+/* 137 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -25513,54 +25757,54 @@ module.exports = ArcadeSprite;
module.exports = {
- CalculateFacesAt: __webpack_require__(210),
- CalculateFacesWithin: __webpack_require__(51),
- Copy: __webpack_require__(1257),
- CreateFromTiles: __webpack_require__(1258),
- CullTiles: __webpack_require__(1259),
- Fill: __webpack_require__(1260),
- FilterTiles: __webpack_require__(1261),
- FindByIndex: __webpack_require__(1262),
- FindTile: __webpack_require__(1263),
- ForEachTile: __webpack_require__(1264),
- GetTileAt: __webpack_require__(137),
- GetTileAtWorldXY: __webpack_require__(1265),
- GetTilesWithin: __webpack_require__(21),
- GetTilesWithinShape: __webpack_require__(1266),
- GetTilesWithinWorldXY: __webpack_require__(1267),
- HasTileAt: __webpack_require__(451),
- HasTileAtWorldXY: __webpack_require__(1268),
+ CalculateFacesAt: __webpack_require__(212),
+ CalculateFacesWithin: __webpack_require__(52),
+ Copy: __webpack_require__(1261),
+ CreateFromTiles: __webpack_require__(1262),
+ CullTiles: __webpack_require__(1263),
+ Fill: __webpack_require__(1264),
+ FilterTiles: __webpack_require__(1265),
+ FindByIndex: __webpack_require__(1266),
+ FindTile: __webpack_require__(1267),
+ ForEachTile: __webpack_require__(1268),
+ GetTileAt: __webpack_require__(138),
+ GetTileAtWorldXY: __webpack_require__(1269),
+ GetTilesWithin: __webpack_require__(23),
+ GetTilesWithinShape: __webpack_require__(1270),
+ GetTilesWithinWorldXY: __webpack_require__(1271),
+ HasTileAt: __webpack_require__(454),
+ HasTileAtWorldXY: __webpack_require__(1272),
IsInLayerBounds: __webpack_require__(101),
- PutTileAt: __webpack_require__(211),
- PutTileAtWorldXY: __webpack_require__(1269),
- PutTilesAt: __webpack_require__(1270),
- Randomize: __webpack_require__(1271),
- RemoveTileAt: __webpack_require__(452),
- RemoveTileAtWorldXY: __webpack_require__(1272),
- RenderDebug: __webpack_require__(1273),
- ReplaceByIndex: __webpack_require__(450),
- SetCollision: __webpack_require__(1274),
- SetCollisionBetween: __webpack_require__(1275),
- SetCollisionByExclusion: __webpack_require__(1276),
- SetCollisionByProperty: __webpack_require__(1277),
- SetCollisionFromCollisionGroup: __webpack_require__(1278),
- SetTileIndexCallback: __webpack_require__(1279),
- SetTileLocationCallback: __webpack_require__(1280),
- Shuffle: __webpack_require__(1281),
- SwapByIndex: __webpack_require__(1282),
- TileToWorldX: __webpack_require__(138),
- TileToWorldXY: __webpack_require__(1283),
- TileToWorldY: __webpack_require__(139),
- WeightedRandomize: __webpack_require__(1284),
- WorldToTileX: __webpack_require__(61),
- WorldToTileXY: __webpack_require__(1285),
- WorldToTileY: __webpack_require__(62)
+ PutTileAt: __webpack_require__(213),
+ PutTileAtWorldXY: __webpack_require__(1273),
+ PutTilesAt: __webpack_require__(1274),
+ Randomize: __webpack_require__(1275),
+ RemoveTileAt: __webpack_require__(455),
+ RemoveTileAtWorldXY: __webpack_require__(1276),
+ RenderDebug: __webpack_require__(1277),
+ ReplaceByIndex: __webpack_require__(453),
+ SetCollision: __webpack_require__(1278),
+ SetCollisionBetween: __webpack_require__(1279),
+ SetCollisionByExclusion: __webpack_require__(1280),
+ SetCollisionByProperty: __webpack_require__(1281),
+ SetCollisionFromCollisionGroup: __webpack_require__(1282),
+ SetTileIndexCallback: __webpack_require__(1283),
+ SetTileLocationCallback: __webpack_require__(1284),
+ Shuffle: __webpack_require__(1285),
+ SwapByIndex: __webpack_require__(1286),
+ TileToWorldX: __webpack_require__(139),
+ TileToWorldXY: __webpack_require__(1287),
+ TileToWorldY: __webpack_require__(140),
+ WeightedRandomize: __webpack_require__(1288),
+ WorldToTileX: __webpack_require__(62),
+ WorldToTileXY: __webpack_require__(1289),
+ WorldToTileY: __webpack_require__(63)
};
/***/ }),
-/* 137 */
+/* 138 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -25616,7 +25860,7 @@ module.exports = GetTileAt;
/***/ }),
-/* 138 */
+/* 139 */
/***/ (function(module, exports) {
/**
@@ -25661,7 +25905,7 @@ module.exports = TileToWorldX;
/***/ }),
-/* 139 */
+/* 140 */
/***/ (function(module, exports) {
/**
@@ -25706,7 +25950,7 @@ module.exports = TileToWorldY;
/***/ }),
-/* 140 */
+/* 141 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -26110,7 +26354,7 @@ module.exports = Tileset;
/***/ }),
-/* 141 */
+/* 142 */
/***/ (function(module, exports) {
/**
@@ -26120,16 +26364,17 @@ module.exports = Tileset;
*/
/**
- * [description]
+ * Internal function used by the Tween Builder to create a function that will return
+ * the given value from the source.
*
* @function Phaser.Tweens.Builders.GetNewValue
* @since 3.0.0
*
- * @param {object} source - [description]
- * @param {string} key - [description]
- * @param {*} defaultValue - [description]
+ * @param {any} source - The source object to get the value from.
+ * @param {string} key - The property to get from the source.
+ * @param {any} defaultValue - A default value to return should the source not have the property set.
*
- * @return {function} [description]
+ * @return {function} A function which when called will return the property value from the source.
*/
var GetNewValue = function (source, key, defaultValue)
{
@@ -26141,9 +26386,9 @@ var GetNewValue = function (source, key, defaultValue)
if (t === 'function')
{
- valueCallback = function (index, totalTargets, target)
+ valueCallback = function (target, targetKey, value, targetIndex, totalTargets, tween)
{
- return source[key](index, totalTargets, target);
+ return source[key](target, targetKey, value, targetIndex, totalTargets, tween);
};
}
else
@@ -26173,7 +26418,7 @@ module.exports = GetNewValue;
/***/ }),
-/* 142 */
+/* 143 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -26182,17 +26427,17 @@ module.exports = GetNewValue;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Defaults = __webpack_require__(219);
+var Defaults = __webpack_require__(221);
var GetAdvancedValue = __webpack_require__(14);
-var GetBoolean = __webpack_require__(87);
-var GetEaseFunction = __webpack_require__(96);
-var GetNewValue = __webpack_require__(141);
-var GetProps = __webpack_require__(473);
-var GetTargets = __webpack_require__(217);
-var GetValue = __webpack_require__(6);
-var GetValueOp = __webpack_require__(218);
-var Tween = __webpack_require__(220);
-var TweenData = __webpack_require__(221);
+var GetBoolean = __webpack_require__(88);
+var GetEaseFunction = __webpack_require__(82);
+var GetNewValue = __webpack_require__(142);
+var GetProps = __webpack_require__(476);
+var GetTargets = __webpack_require__(219);
+var GetValue = __webpack_require__(5);
+var GetValueOp = __webpack_require__(220);
+var Tween = __webpack_require__(222);
+var TweenData = __webpack_require__(224);
/**
* Creates a new Tween.
@@ -26246,9 +26491,11 @@ var TweenBuilder = function (parent, config, defaults)
var tweenData = TweenData(
targets[t],
+ t,
key,
ops.getEnd,
ops.getStart,
+ ops.getActive,
GetEaseFunction(GetValue(value, 'ease', ease), easeParams),
GetNewValue(value, 'delay', delay),
GetNewValue(value, 'duration', duration),
@@ -26304,7 +26551,7 @@ module.exports = TweenBuilder;
/***/ }),
-/* 143 */
+/* 144 */
/***/ (function(module, exports) {
/**
@@ -26438,7 +26685,7 @@ module.exports = ALIGN_CONST;
/***/ }),
-/* 144 */
+/* 145 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -26447,7 +26694,7 @@ module.exports = ALIGN_CONST;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.
@@ -26477,7 +26724,7 @@ module.exports = CircumferencePoint;
/***/ }),
-/* 145 */
+/* 146 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -26486,7 +26733,7 @@ module.exports = CircumferencePoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Returns a uniformly distributed random point from anywhere within the given Circle.
@@ -26521,7 +26768,7 @@ module.exports = Random;
/***/ }),
-/* 146 */
+/* 147 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -26530,13 +26777,13 @@ module.exports = Random;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(107);
-var FindClosestInSorted = __webpack_require__(245);
-var Frame = __webpack_require__(246);
-var GetValue = __webpack_require__(6);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(108);
+var FindClosestInSorted = __webpack_require__(248);
+var Frame = __webpack_require__(249);
+var GetValue = __webpack_require__(5);
/**
* @classdesc
@@ -27369,9 +27616,11 @@ var Animation = new Class({
var len = this.frames.length;
var slice = 1 / (len - 1);
+ var frame;
+
for (var i = 0; i < len; i++)
{
- var frame = this.frames[i];
+ frame = this.frames[i];
frame.index = i + 1;
frame.isFirst = false;
@@ -27381,11 +27630,21 @@ var Animation = new Class({
if (i === 0)
{
frame.isFirst = true;
- frame.isLast = (len === 1);
- frame.prevFrame = this.frames[len - 1];
- frame.nextFrame = this.frames[i + 1];
+
+ if (len === 1)
+ {
+ frame.isLast = true;
+ frame.nextFrame = frame;
+ frame.prevFrame = frame;
+ }
+ else
+ {
+ frame.isLast = false;
+ frame.prevFrame = this.frames[len - 1];
+ frame.nextFrame = this.frames[i + 1];
+ }
}
- else if (i === len - 1)
+ else if (i === len - 1 && len > 1)
{
frame.isLast = true;
frame.prevFrame = this.frames[len - 2];
@@ -27462,7 +27721,7 @@ module.exports = Animation;
/***/ }),
-/* 147 */
+/* 148 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -27471,8 +27730,8 @@ module.exports = Animation;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Perimeter = __webpack_require__(108);
-var Point = __webpack_require__(3);
+var Perimeter = __webpack_require__(109);
+var Point = __webpack_require__(4);
/**
* Position is a value between 0 and 1 where 0 = the top-left of the rectangle and 0.5 = the bottom right.
@@ -27539,7 +27798,7 @@ module.exports = GetPoint;
/***/ }),
-/* 148 */
+/* 149 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -27548,8 +27807,8 @@ module.exports = GetPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Length = __webpack_require__(55);
-var Point = __webpack_require__(3);
+var Length = __webpack_require__(56);
+var Point = __webpack_require__(4);
/**
* Get a number of points along a line's length.
@@ -27604,7 +27863,7 @@ module.exports = GetPoints;
/***/ }),
-/* 149 */
+/* 150 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -27613,7 +27872,7 @@ module.exports = GetPoints;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Returns a random point on a given Line.
@@ -27644,7 +27903,7 @@ module.exports = Random;
/***/ }),
-/* 150 */
+/* 151 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -27653,7 +27912,7 @@ module.exports = Random;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Returns a random point within a Rectangle.
@@ -27682,7 +27941,7 @@ module.exports = Random;
/***/ }),
-/* 151 */
+/* 152 */
/***/ (function(module, exports) {
/**
@@ -27811,7 +28070,7 @@ module.exports = Pipeline;
/***/ }),
-/* 152 */
+/* 153 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -27820,7 +28079,7 @@ module.exports = Pipeline;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Returns a uniformly distributed random point from anywhere within the given Ellipse.
@@ -27852,7 +28111,7 @@ module.exports = Random;
/***/ }),
-/* 153 */
+/* 154 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -27861,7 +28120,7 @@ module.exports = Random;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* [description]
@@ -27908,7 +28167,7 @@ module.exports = Random;
/***/ }),
-/* 154 */
+/* 155 */
/***/ (function(module, exports) {
/**
@@ -27945,7 +28204,7 @@ module.exports = RotateAroundDistance;
/***/ }),
-/* 155 */
+/* 156 */
/***/ (function(module, exports) {
/**
@@ -27984,7 +28243,7 @@ module.exports = SmootherStep;
/***/ }),
-/* 156 */
+/* 157 */
/***/ (function(module, exports) {
/**
@@ -28031,7 +28290,7 @@ module.exports = SmoothStep;
/***/ }),
-/* 157 */
+/* 158 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -28404,7 +28663,7 @@ module.exports = Map;
/***/ }),
-/* 158 */
+/* 159 */
/***/ (function(module, exports) {
/**
@@ -28480,7 +28739,7 @@ module.exports = Pad;
/***/ }),
-/* 159 */
+/* 160 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -28489,10 +28748,10 @@ module.exports = Pad;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var HexStringToColor = __webpack_require__(269);
-var IntegerToColor = __webpack_require__(272);
-var ObjectToColor = __webpack_require__(274);
-var RGBStringToColor = __webpack_require__(275);
+var HexStringToColor = __webpack_require__(272);
+var IntegerToColor = __webpack_require__(275);
+var ObjectToColor = __webpack_require__(277);
+var RGBStringToColor = __webpack_require__(278);
/**
* Converts the given source color value into an instance of a Color class.
@@ -28536,7 +28795,7 @@ module.exports = ValueToColor;
/***/ }),
-/* 160 */
+/* 161 */
/***/ (function(module, exports) {
/**
@@ -28566,7 +28825,7 @@ module.exports = GetColor;
/***/ }),
-/* 161 */
+/* 162 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -28575,7 +28834,7 @@ module.exports = GetColor;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetColor = __webpack_require__(160);
+var GetColor = __webpack_require__(161);
/**
* Converts an HSV (hue, saturation and value) color value to RGB.
@@ -28667,7 +28926,7 @@ module.exports = HSVToRGB;
/***/ }),
-/* 162 */
+/* 163 */
/***/ (function(module, exports) {
/**
@@ -28704,7 +28963,7 @@ module.exports = CenterOn;
/***/ }),
-/* 163 */
+/* 164 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -28713,18 +28972,18 @@ module.exports = CenterOn;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Back = __webpack_require__(277);
-var Bounce = __webpack_require__(278);
-var Circular = __webpack_require__(279);
-var Cubic = __webpack_require__(280);
-var Elastic = __webpack_require__(281);
-var Expo = __webpack_require__(282);
-var Linear = __webpack_require__(283);
-var Quadratic = __webpack_require__(284);
-var Quartic = __webpack_require__(285);
-var Quintic = __webpack_require__(286);
-var Sine = __webpack_require__(287);
-var Stepped = __webpack_require__(288);
+var Back = __webpack_require__(280);
+var Bounce = __webpack_require__(281);
+var Circular = __webpack_require__(282);
+var Cubic = __webpack_require__(283);
+var Elastic = __webpack_require__(284);
+var Expo = __webpack_require__(285);
+var Linear = __webpack_require__(286);
+var Quadratic = __webpack_require__(287);
+var Quartic = __webpack_require__(288);
+var Quintic = __webpack_require__(289);
+var Sine = __webpack_require__(290);
+var Stepped = __webpack_require__(291);
// EaseMap
module.exports = {
@@ -28785,7 +29044,7 @@ module.exports = {
/***/ }),
-/* 164 */
+/* 165 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -28794,9 +29053,9 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var OS = __webpack_require__(115);
-var Browser = __webpack_require__(116);
-var CanvasPool = __webpack_require__(24);
+var OS = __webpack_require__(116);
+var Browser = __webpack_require__(117);
+var CanvasPool = __webpack_require__(25);
/**
* Determines the features of the browser running this Phaser Game instance.
@@ -28977,7 +29236,7 @@ module.exports = init();
/***/ }),
-/* 165 */
+/* 166 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -28986,8 +29245,8 @@ module.exports = init();
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(23);
-var Extend = __webpack_require__(17);
+var CONST = __webpack_require__(22);
+var Extend = __webpack_require__(15);
/**
* @namespace Phaser.Math
@@ -28996,61 +29255,62 @@ var Extend = __webpack_require__(17);
var PhaserMath = {
// Collections of functions
- Angle: __webpack_require__(686),
- Distance: __webpack_require__(694),
- Easing: __webpack_require__(696),
- Fuzzy: __webpack_require__(697),
- Interpolation: __webpack_require__(700),
- Pow2: __webpack_require__(705),
- Snap: __webpack_require__(707),
+ Angle: __webpack_require__(690),
+ Distance: __webpack_require__(698),
+ Easing: __webpack_require__(700),
+ Fuzzy: __webpack_require__(701),
+ Interpolation: __webpack_require__(704),
+ Pow2: __webpack_require__(709),
+ Snap: __webpack_require__(711),
// Expose the RNG Class
- RandomDataGenerator: __webpack_require__(709),
+ RandomDataGenerator: __webpack_require__(713),
// Single functions
- Average: __webpack_require__(710),
- Bernstein: __webpack_require__(297),
- Between: __webpack_require__(168),
- CatmullRom: __webpack_require__(167),
- CeilTo: __webpack_require__(711),
- Clamp: __webpack_require__(22),
+ Average: __webpack_require__(714),
+ Bernstein: __webpack_require__(300),
+ Between: __webpack_require__(169),
+ CatmullRom: __webpack_require__(168),
+ CeilTo: __webpack_require__(715),
+ Clamp: __webpack_require__(24),
DegToRad: __webpack_require__(35),
- Difference: __webpack_require__(712),
- Factorial: __webpack_require__(298),
- FloatBetween: __webpack_require__(304),
- FloorTo: __webpack_require__(713),
- FromPercent: __webpack_require__(86),
- GetSpeed: __webpack_require__(714),
- IsEven: __webpack_require__(715),
- IsEvenStrict: __webpack_require__(716),
- Linear: __webpack_require__(114),
- MaxAdd: __webpack_require__(717),
- MinSub: __webpack_require__(718),
- Percent: __webpack_require__(719),
- RadToDeg: __webpack_require__(169),
- RandomXY: __webpack_require__(720),
- RandomXYZ: __webpack_require__(721),
- RandomXYZW: __webpack_require__(722),
- Rotate: __webpack_require__(305),
- RotateAround: __webpack_require__(251),
- RotateAroundDistance: __webpack_require__(154),
- RoundAwayFromZero: __webpack_require__(306),
- RoundTo: __webpack_require__(723),
- SinCosTableGenerator: __webpack_require__(724),
- SmootherStep: __webpack_require__(155),
- SmoothStep: __webpack_require__(156),
- TransformXY: __webpack_require__(307),
- Within: __webpack_require__(725),
- Wrap: __webpack_require__(56),
+ Difference: __webpack_require__(716),
+ Factorial: __webpack_require__(301),
+ FloatBetween: __webpack_require__(307),
+ FloorTo: __webpack_require__(717),
+ FromPercent: __webpack_require__(87),
+ GetSpeed: __webpack_require__(718),
+ IsEven: __webpack_require__(719),
+ IsEvenStrict: __webpack_require__(720),
+ Linear: __webpack_require__(115),
+ MaxAdd: __webpack_require__(721),
+ MinSub: __webpack_require__(722),
+ Percent: __webpack_require__(723),
+ RadToDeg: __webpack_require__(170),
+ RandomXY: __webpack_require__(724),
+ RandomXYZ: __webpack_require__(725),
+ RandomXYZW: __webpack_require__(726),
+ Rotate: __webpack_require__(308),
+ RotateAround: __webpack_require__(254),
+ RotateAroundDistance: __webpack_require__(155),
+ RoundAwayFromZero: __webpack_require__(309),
+ RoundTo: __webpack_require__(727),
+ SinCosTableGenerator: __webpack_require__(728),
+ SmootherStep: __webpack_require__(156),
+ SmoothStep: __webpack_require__(157),
+ ToXY: __webpack_require__(729),
+ TransformXY: __webpack_require__(310),
+ Within: __webpack_require__(730),
+ Wrap: __webpack_require__(57),
// Vector classes
- Vector2: __webpack_require__(4),
- Vector3: __webpack_require__(170),
- Vector4: __webpack_require__(308),
- Matrix3: __webpack_require__(309),
- Matrix4: __webpack_require__(310),
- Quaternion: __webpack_require__(311),
- RotateVec3: __webpack_require__(726)
+ Vector2: __webpack_require__(3),
+ Vector3: __webpack_require__(171),
+ Vector4: __webpack_require__(311),
+ Matrix3: __webpack_require__(312),
+ Matrix4: __webpack_require__(313),
+ Quaternion: __webpack_require__(314),
+ RotateVec3: __webpack_require__(731)
};
@@ -29064,7 +29324,7 @@ module.exports = PhaserMath;
/***/ }),
-/* 166 */
+/* 167 */
/***/ (function(module, exports) {
/**
@@ -29098,7 +29358,7 @@ module.exports = Equal;
/***/ }),
-/* 167 */
+/* 168 */
/***/ (function(module, exports) {
/**
@@ -29135,7 +29395,7 @@ module.exports = CatmullRom;
/***/ }),
-/* 168 */
+/* 169 */
/***/ (function(module, exports) {
/**
@@ -29164,7 +29424,7 @@ module.exports = Between;
/***/ }),
-/* 169 */
+/* 170 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -29173,7 +29433,7 @@ module.exports = Between;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(23);
+var CONST = __webpack_require__(22);
/**
* Convert the given angle in radians, to the equivalent angle in degrees.
@@ -29194,7 +29454,7 @@ module.exports = RadToDeg;
/***/ }),
-/* 170 */
+/* 171 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -30004,7 +30264,7 @@ module.exports = Vector3;
/***/ }),
-/* 171 */
+/* 172 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -30105,7 +30365,7 @@ module.exports = DefaultPlugins;
/***/ }),
-/* 172 */
+/* 173 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -30114,7 +30374,7 @@ module.exports = DefaultPlugins;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
+var Rectangle = __webpack_require__(11);
// points is an array of Point-like objects,
// either 2 dimensional arrays, or objects with public x/y properties:
@@ -30190,7 +30450,7 @@ module.exports = FromPoints;
/***/ }),
-/* 173 */
+/* 174 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -30201,10 +30461,10 @@ module.exports = FromPoints;
var CONST = {
- CENTER: __webpack_require__(331),
- ORIENTATION: __webpack_require__(332),
- SCALE_MODE: __webpack_require__(333),
- ZOOM: __webpack_require__(334)
+ CENTER: __webpack_require__(334),
+ ORIENTATION: __webpack_require__(335),
+ SCALE_MODE: __webpack_require__(336),
+ ZOOM: __webpack_require__(337)
};
@@ -30212,7 +30472,7 @@ module.exports = CONST;
/***/ }),
-/* 174 */
+/* 175 */
/***/ (function(module, exports) {
/**
@@ -30241,7 +30501,7 @@ module.exports = RemoveFromDOM;
/***/ }),
-/* 175 */
+/* 176 */
/***/ (function(module, exports) {
/**
@@ -30339,7 +30599,7 @@ module.exports = INPUT_CONST;
/***/ }),
-/* 176 */
+/* 177 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -30349,13 +30609,13 @@ module.exports = INPUT_CONST;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(122);
-var DefaultPlugins = __webpack_require__(171);
-var Events = __webpack_require__(19);
-var GetPhysicsPlugins = __webpack_require__(839);
-var GetScenePlugins = __webpack_require__(840);
+var CONST = __webpack_require__(123);
+var DefaultPlugins = __webpack_require__(172);
+var Events = __webpack_require__(20);
+var GetPhysicsPlugins = __webpack_require__(844);
+var GetScenePlugins = __webpack_require__(845);
var NOOP = __webpack_require__(1);
-var Settings = __webpack_require__(348);
+var Settings = __webpack_require__(350);
/**
* @classdesc
@@ -30510,7 +30770,7 @@ var Systems = new Class({
* In the default set-up you can access this from within a Scene via the `this.sound` property.
*
* @name Phaser.Scenes.Systems#sound
- * @type {Phaser.Sound.BaseSoundManager}
+ * @type {(Phaser.Sound.NoAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager)}
* @since 3.0.0
*/
this.sound;
@@ -31097,7 +31357,44 @@ module.exports = Systems;
/***/ }),
-/* 177 */
+/* 178 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * Capitalizes the first letter of a string if there is one.
+ * @example
+ * UppercaseFirst('abc');
+ * // returns 'Abc'
+ * @example
+ * UppercaseFirst('the happy family');
+ * // returns 'The happy family'
+ * @example
+ * UppercaseFirst('');
+ * // returns ''
+ *
+ * @function Phaser.Utils.String.UppercaseFirst
+ * @since 3.0.0
+ *
+ * @param {string} str - The string to capitalize.
+ *
+ * @return {string} A new string, same as the first, but with the first letter capitalized.
+ */
+var UppercaseFirst = function (str)
+{
+ return str && str[0].toUpperCase() + str.slice(1);
+};
+
+module.exports = UppercaseFirst;
+
+
+/***/ }),
+/* 179 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -31107,8 +31404,8 @@ module.exports = Systems;
*/
var Class = __webpack_require__(0);
-var Frame = __webpack_require__(91);
-var TextureSource = __webpack_require__(350);
+var Frame = __webpack_require__(92);
+var TextureSource = __webpack_require__(353);
var TEXTURE_MISSING_ERROR = 'Texture.frame missing: ';
@@ -31279,6 +31576,35 @@ var Texture = new Class({
return frame;
},
+ /**
+ * Removes the given Frame from this Texture. The Frame is destroyed immediately.
+ *
+ * Any Game Objects using this Frame should stop using it _before_ you remove it,
+ * as it does not happen automatically.
+ *
+ * @method Phaser.Textures.Texture#remove
+ * @since 3.19.0
+ *
+ * @param {string} name - The key of the Frame to remove.
+ *
+ * @return {boolean} True if a Frame with the matching key was removed from this Texture.
+ */
+ remove: function (name)
+ {
+ if (this.has(name))
+ {
+ var frame = this.get(name);
+
+ frame.destroy();
+
+ delete this.frames[name];
+
+ return true;
+ }
+
+ return false;
+ },
+
/**
* Checks to see if a Frame matching the given key exists within this Texture.
*
@@ -31588,7 +31914,7 @@ module.exports = Texture;
/***/ }),
-/* 178 */
+/* 180 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -31603,45 +31929,45 @@ module.exports = Texture;
module.exports = {
- Matrix: __webpack_require__(876),
+ Matrix: __webpack_require__(880),
- Add: __webpack_require__(883),
- AddAt: __webpack_require__(884),
- BringToTop: __webpack_require__(885),
- CountAllMatching: __webpack_require__(886),
- Each: __webpack_require__(887),
- EachInRange: __webpack_require__(888),
- FindClosestInSorted: __webpack_require__(245),
- GetAll: __webpack_require__(889),
- GetFirst: __webpack_require__(890),
- GetRandom: __webpack_require__(180),
- MoveDown: __webpack_require__(891),
- MoveTo: __webpack_require__(892),
- MoveUp: __webpack_require__(893),
- NumberArray: __webpack_require__(894),
- NumberArrayStep: __webpack_require__(895),
- QuickSelect: __webpack_require__(361),
- Range: __webpack_require__(362),
- Remove: __webpack_require__(120),
- RemoveAt: __webpack_require__(896),
- RemoveBetween: __webpack_require__(897),
- RemoveRandomElement: __webpack_require__(898),
- Replace: __webpack_require__(899),
- RotateLeft: __webpack_require__(261),
- RotateRight: __webpack_require__(262),
- SafeRange: __webpack_require__(66),
- SendToBack: __webpack_require__(900),
- SetAll: __webpack_require__(901),
- Shuffle: __webpack_require__(111),
- SpliceOne: __webpack_require__(78),
- StableSort: __webpack_require__(127),
- Swap: __webpack_require__(902)
+ Add: __webpack_require__(887),
+ AddAt: __webpack_require__(888),
+ BringToTop: __webpack_require__(889),
+ CountAllMatching: __webpack_require__(890),
+ Each: __webpack_require__(891),
+ EachInRange: __webpack_require__(892),
+ FindClosestInSorted: __webpack_require__(248),
+ GetAll: __webpack_require__(893),
+ GetFirst: __webpack_require__(894),
+ GetRandom: __webpack_require__(182),
+ MoveDown: __webpack_require__(895),
+ MoveTo: __webpack_require__(896),
+ MoveUp: __webpack_require__(897),
+ NumberArray: __webpack_require__(898),
+ NumberArrayStep: __webpack_require__(899),
+ QuickSelect: __webpack_require__(364),
+ Range: __webpack_require__(365),
+ Remove: __webpack_require__(121),
+ RemoveAt: __webpack_require__(900),
+ RemoveBetween: __webpack_require__(901),
+ RemoveRandomElement: __webpack_require__(902),
+ Replace: __webpack_require__(903),
+ RotateLeft: __webpack_require__(264),
+ RotateRight: __webpack_require__(265),
+ SafeRange: __webpack_require__(67),
+ SendToBack: __webpack_require__(904),
+ SetAll: __webpack_require__(905),
+ Shuffle: __webpack_require__(112),
+ SpliceOne: __webpack_require__(79),
+ StableSort: __webpack_require__(128),
+ Swap: __webpack_require__(906)
};
/***/ }),
-/* 179 */
+/* 181 */
/***/ (function(module, exports) {
/**
@@ -31702,7 +32028,7 @@ module.exports = CheckMatrix;
/***/ }),
-/* 180 */
+/* 182 */
/***/ (function(module, exports) {
/**
@@ -31737,7 +32063,7 @@ module.exports = GetRandom;
/***/ }),
-/* 181 */
+/* 183 */
/***/ (function(module, exports) {
/**
@@ -31878,7 +32204,7 @@ module.exports = ParseXMLBitmapFont;
/***/ }),
-/* 182 */
+/* 184 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -31887,13 +32213,13 @@ module.exports = ParseXMLBitmapFont;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BlitterRender = __webpack_require__(909);
-var Bob = __webpack_require__(912);
+var BlitterRender = __webpack_require__(913);
+var Bob = __webpack_require__(916);
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var Frame = __webpack_require__(91);
+var Frame = __webpack_require__(92);
var GameObject = __webpack_require__(13);
-var List = __webpack_require__(125);
+var List = __webpack_require__(126);
/**
* @callback CreateCallback
@@ -32177,7 +32503,7 @@ module.exports = Blitter;
/***/ }),
-/* 183 */
+/* 185 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -32187,16 +32513,16 @@ module.exports = Blitter;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ArrayUtils = __webpack_require__(178);
-var BlendModes = __webpack_require__(52);
+var ArrayUtils = __webpack_require__(180);
+var BlendModes = __webpack_require__(53);
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var Events = __webpack_require__(110);
+var Events = __webpack_require__(111);
var GameObject = __webpack_require__(13);
-var Rectangle = __webpack_require__(10);
-var Render = __webpack_require__(913);
-var Union = __webpack_require__(364);
-var Vector2 = __webpack_require__(4);
+var Rectangle = __webpack_require__(11);
+var Render = __webpack_require__(917);
+var Union = __webpack_require__(367);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -33502,7 +33828,7 @@ module.exports = Container;
/***/ }),
-/* 184 */
+/* 186 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -33511,9 +33837,9 @@ module.exports = Container;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BitmapText = __webpack_require__(128);
+var BitmapText = __webpack_require__(129);
var Class = __webpack_require__(0);
-var Render = __webpack_require__(918);
+var Render = __webpack_require__(922);
/**
* @classdesc
@@ -33735,7 +34061,7 @@ module.exports = DynamicBitmapText;
/***/ }),
-/* 185 */
+/* 187 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -33744,26 +34070,26 @@ module.exports = DynamicBitmapText;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BaseCamera = __webpack_require__(112);
+var BaseCamera = __webpack_require__(113);
var Class = __webpack_require__(0);
-var Commands = __webpack_require__(186);
-var ComponentsAlpha = __webpack_require__(244);
-var ComponentsBlendMode = __webpack_require__(247);
-var ComponentsDepth = __webpack_require__(248);
-var ComponentsMask = __webpack_require__(252);
-var ComponentsPipeline = __webpack_require__(151);
-var ComponentsTransform = __webpack_require__(257);
-var ComponentsVisible = __webpack_require__(258);
-var ComponentsScrollFactor = __webpack_require__(255);
+var Commands = __webpack_require__(188);
+var ComponentsAlpha = __webpack_require__(247);
+var ComponentsBlendMode = __webpack_require__(250);
+var ComponentsDepth = __webpack_require__(251);
+var ComponentsMask = __webpack_require__(255);
+var ComponentsPipeline = __webpack_require__(152);
+var ComponentsTransform = __webpack_require__(260);
+var ComponentsVisible = __webpack_require__(261);
+var ComponentsScrollFactor = __webpack_require__(258);
var TransformMatrix = __webpack_require__(32);
-var Ellipse = __webpack_require__(92);
+var Ellipse = __webpack_require__(93);
var GameObject = __webpack_require__(13);
var GetFastValue = __webpack_require__(2);
-var GetValue = __webpack_require__(6);
-var MATH_CONST = __webpack_require__(23);
-var Render = __webpack_require__(924);
+var GetValue = __webpack_require__(5);
+var MATH_CONST = __webpack_require__(22);
+var Render = __webpack_require__(928);
/**
* @classdesc
@@ -35285,7 +35611,7 @@ module.exports = Graphics;
/***/ }),
-/* 186 */
+/* 188 */
/***/ (function(module, exports) {
/**
@@ -35322,7 +35648,7 @@ module.exports = {
/***/ }),
-/* 187 */
+/* 189 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -35331,7 +35657,7 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Returns a Point object containing the coordinates of a point on the circumference of the Ellipse based on the given angle.
@@ -35364,7 +35690,7 @@ module.exports = CircumferencePoint;
/***/ }),
-/* 188 */
+/* 190 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -35376,10 +35702,10 @@ module.exports = CircumferencePoint;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var GameObject = __webpack_require__(13);
-var GravityWell = __webpack_require__(372);
-var List = __webpack_require__(125);
-var ParticleEmitter = __webpack_require__(374);
-var Render = __webpack_require__(934);
+var GravityWell = __webpack_require__(375);
+var List = __webpack_require__(126);
+var ParticleEmitter = __webpack_require__(377);
+var Render = __webpack_require__(938);
/**
* @classdesc
@@ -35838,7 +36164,7 @@ module.exports = ParticleEmitterManager;
/***/ }),
-/* 189 */
+/* 191 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -35847,17 +36173,17 @@ module.exports = ParticleEmitterManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BlendModes = __webpack_require__(52);
-var Camera = __webpack_require__(112);
-var CanvasPool = __webpack_require__(24);
+var BlendModes = __webpack_require__(53);
+var Camera = __webpack_require__(113);
+var CanvasPool = __webpack_require__(25);
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var CONST = __webpack_require__(26);
-var Frame = __webpack_require__(91);
+var CONST = __webpack_require__(31);
+var Frame = __webpack_require__(92);
var GameObject = __webpack_require__(13);
-var Render = __webpack_require__(938);
+var Render = __webpack_require__(942);
var Utils = __webpack_require__(9);
-var UUID = __webpack_require__(380);
+var UUID = __webpack_require__(383);
/**
* @classdesc
@@ -36103,6 +36429,17 @@ var RenderTexture = new Class({
*/
this.gl = null;
+ /**
+ * A reference to the WebGLTexture that is being rendered to in a WebGL Context.
+ *
+ * @name Phaser.GameObjects.RenderTexture#glTexture
+ * @type {WebGLTexture}
+ * @default null
+ * @readonly
+ * @since 3.19.0
+ */
+ this.glTexture = null;
+
var renderer = this.renderer;
if (renderer.type === CONST.WEBGL)
@@ -36110,8 +36447,9 @@ var RenderTexture = new Class({
var gl = renderer.gl;
this.gl = gl;
+ this.glTexture = this.frame.source.glTexture;
this.drawGameObject = this.batchGameObjectWebGL;
- this.framebuffer = renderer.createFramebuffer(width, height, this.frame.source.glTexture, false);
+ this.framebuffer = renderer.createFramebuffer(width, height, this.glTexture, false);
}
else if (renderer.type === CONST.CANVAS)
{
@@ -36176,7 +36514,8 @@ var RenderTexture = new Class({
{
if (this.frame.name === '__BASE')
{
- // Tesize the texture
+ // Resize the texture
+
this.canvas.width = width;
this.canvas.height = height;
@@ -36187,10 +36526,14 @@ var RenderTexture = new Class({
this.renderer.deleteTexture(this.frame.source.glTexture);
this.renderer.deleteFramebuffer(this.framebuffer);
- this.frame.source.glTexture = this.renderer.createTexture2D(0, gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE, gl.RGBA, null, width, height, false);
- this.framebuffer = this.renderer.createFramebuffer(width, height, this.frame.source.glTexture, false);
+ var glTexture = this.renderer.createTexture2D(0, gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE, gl.RGBA, null, width, height, false);
- this.frame.glTexture = this.frame.source.glTexture;
+ this.framebuffer = this.renderer.createFramebuffer(width, height, glTexture, false);
+
+ this.frame.source.isRenderTexture = true;
+
+ this.frame.glTexture = glTexture;
+ this.glTexture = glTexture;
}
this.frame.source.width = width;
@@ -36843,8 +37186,6 @@ var RenderTexture = new Class({
* @param {number} [y=0] - The y position to offset the Game Object by.
* @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.
* @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property.
- *
- * @return {boolean} `true` if the frame was found and drawn, otherwise `false`.
*/
batchTextureFrameKey: function (key, frame, x, y, alpha, tint)
{
@@ -36896,6 +37237,114 @@ var RenderTexture = new Class({
}
},
+ /**
+ * Takes a snapshot of the given area of this Render Texture.
+ *
+ * The snapshot is taken immediately.
+ *
+ * To capture the whole Render Texture see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.
+ *
+ * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.
+ * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,
+ * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,
+ * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
+ *
+ * @method Phaser.GameObjects.RenderTexture#snapshotArea
+ * @since 3.19.0
+ *
+ * @param {integer} x - The x coordinate to grab from.
+ * @param {integer} y - The y coordinate to grab from.
+ * @param {integer} width - The width of the area to grab.
+ * @param {integer} height - The height of the area to grab.
+ * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.
+ * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.
+ * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.
+ *
+ * @return {this} This Render Texture instance.
+ */
+ snapshotArea: function (x, y, width, height, callback, type, encoderOptions)
+ {
+ if (this.gl)
+ {
+ this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, false, x, y, width, height, type, encoderOptions);
+ }
+ else
+ {
+ this.renderer.snapshotCanvas(this.canvas, callback, false, x, y, width, height, type, encoderOptions);
+ }
+
+ return this;
+ },
+
+ /**
+ * Takes a snapshot of the whole of this Render Texture.
+ *
+ * The snapshot is taken immediately.
+ *
+ * To capture just a portion of the Render Texture see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.
+ *
+ * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.
+ * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,
+ * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,
+ * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
+ *
+ * @method Phaser.GameObjects.RenderTexture#snapshot
+ * @since 3.19.0
+ *
+ * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.
+ * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.
+ * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.
+ *
+ * @return {this} This Render Texture instance.
+ */
+ snapshot: function (callback, type, encoderOptions)
+ {
+ if (this.gl)
+ {
+ this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, false, 0, 0, this.width, this.height, type, encoderOptions);
+ }
+ else
+ {
+ this.renderer.snapshotCanvas(this.canvas, callback, false, 0, 0, this.width, this.height, type, encoderOptions);
+ }
+
+ return this;
+ },
+
+ /**
+ * Takes a snapshot of the given pixel from this Render Texture.
+ *
+ * The snapshot is taken immediately.
+ *
+ * To capture the whole Render Texture see the `snapshot` method. To capture a specific portion, see `snapshotArea`.
+ *
+ * Unlike the other two snapshot methods, this one will send your callback a `Color` object containing the color data for
+ * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,
+ * using less memory, than the other snapshot methods.
+ *
+ * @method Phaser.GameObjects.RenderTexture#snapshotPixel
+ * @since 3.19.0
+ *
+ * @param {integer} x - The x coordinate of the pixel to get.
+ * @param {integer} y - The y coordinate of the pixel to get.
+ * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.
+ *
+ * @return {this} This Render Texture instance.
+ */
+ snapshotPixel: function (x, y, callback)
+ {
+ if (this.gl)
+ {
+ this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, true, x, y);
+ }
+ else
+ {
+ this.renderer.snapshotCanvas(this.canvas, callback, true, x, y);
+ }
+
+ return this;
+ },
+
/**
* Internal destroy handler, called as part of the destroy process.
*
@@ -36921,6 +37370,7 @@ var RenderTexture = new Class({
this.context = null;
this.framebuffer = null;
this.texture = null;
+ this.glTexture = null;
}
}
@@ -36930,7 +37380,7 @@ module.exports = RenderTexture;
/***/ }),
-/* 190 */
+/* 192 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -36939,17 +37389,17 @@ module.exports = RenderTexture;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var AddToDOM = __webpack_require__(119);
-var CanvasPool = __webpack_require__(24);
+var AddToDOM = __webpack_require__(120);
+var CanvasPool = __webpack_require__(25);
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var CONST = __webpack_require__(26);
+var GameEvents = __webpack_require__(18);
var GameObject = __webpack_require__(13);
-var GetTextSize = __webpack_require__(944);
-var GetValue = __webpack_require__(6);
-var RemoveFromDOM = __webpack_require__(174);
-var TextRender = __webpack_require__(945);
-var TextStyle = __webpack_require__(948);
+var GetTextSize = __webpack_require__(948);
+var GetValue = __webpack_require__(5);
+var RemoveFromDOM = __webpack_require__(175);
+var TextRender = __webpack_require__(949);
+var TextStyle = __webpack_require__(952);
/**
* @classdesc
@@ -37016,7 +37466,7 @@ var TextStyle = __webpack_require__(948);
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {(string|string[])} text - The text this Text object will display.
- * @param {Phaser.Types.GameObjects.Text.TextSyle} style - The text style configuration object.
+ * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The text style configuration object.
*/
var Text = new Class({
@@ -37223,13 +37673,10 @@ var Text = new Class({
this.lineSpacing = style.lineSpacing;
}
- if (scene.sys.game.config.renderType === CONST.WEBGL)
+ scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function ()
{
- scene.sys.game.renderer.onContextRestored(function ()
- {
- this.dirty = true;
- }, this);
- }
+ this.dirty = true;
+ }, this);
},
/**
@@ -38338,7 +38785,7 @@ module.exports = Text;
/***/ }),
-/* 191 */
+/* 193 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -38347,15 +38794,15 @@ module.exports = Text;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CanvasPool = __webpack_require__(24);
+var CanvasPool = __webpack_require__(25);
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var CONST = __webpack_require__(26);
+var GameEvents = __webpack_require__(18);
var GameObject = __webpack_require__(13);
-var GetPowerOfTwo = __webpack_require__(302);
-var Smoothing = __webpack_require__(113);
-var TileSpriteRender = __webpack_require__(950);
-var Vector2 = __webpack_require__(4);
+var GetPowerOfTwo = __webpack_require__(305);
+var Smoothing = __webpack_require__(114);
+var TileSpriteRender = __webpack_require__(954);
+var Vector2 = __webpack_require__(3);
// bitmask flag for GameObject.renderMask
var _FLAG = 8; // 1000
@@ -38618,17 +39065,15 @@ var TileSprite = new Class({
this.setOriginFromFrame();
this.initPipeline();
- if (scene.sys.game.config.renderType === CONST.WEBGL)
+ scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)
{
- scene.sys.game.renderer.onContextRestored(function (renderer)
- {
- var gl = renderer.gl;
+ var gl = renderer.gl;
- this.dirty = true;
- this.fillPattern = null;
- this.fillPattern = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.fillCanvas, this.potWidth, this.potHeight);
- }, this);
- }
+ this.dirty = true;
+ this.fillPattern = null;
+ this.fillPattern = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.fillCanvas, this.potWidth, this.potHeight);
+
+ }, this);
},
/**
@@ -38975,7 +39420,7 @@ module.exports = TileSprite;
/***/ }),
-/* 192 */
+/* 194 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -38985,8 +39430,9 @@ module.exports = TileSprite;
*/
var Class = __webpack_require__(0);
-var Contains = __webpack_require__(193);
-var GetPoints = __webpack_require__(390);
+var Contains = __webpack_require__(195);
+var GetPoints = __webpack_require__(393);
+var GEOM_CONST = __webpack_require__(47);
/**
* @classdesc
@@ -39017,6 +39463,17 @@ var Polygon = new Class({
function Polygon (points)
{
+ /**
+ * The geometry constant type of this object: `GEOM_CONST.POLYGON`.
+ * Used for fast type comparisons.
+ *
+ * @name Phaser.Geom.Polygon#type
+ * @type {integer}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.type = GEOM_CONST.POLYGON;
+
/**
* The area of this Polygon.
*
@@ -39196,7 +39653,7 @@ module.exports = Polygon;
/***/ }),
-/* 193 */
+/* 195 */
/***/ (function(module, exports) {
/**
@@ -39245,7 +39702,7 @@ module.exports = Contains;
/***/ }),
-/* 194 */
+/* 196 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -39255,7 +39712,7 @@ module.exports = Contains;
*/
var Class = __webpack_require__(0);
-var Mesh = __webpack_require__(129);
+var Mesh = __webpack_require__(130);
/**
* @classdesc
@@ -39906,7 +40363,7 @@ module.exports = Quad;
/***/ }),
-/* 195 */
+/* 197 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -39919,9 +40376,9 @@ var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var GameObject = __webpack_require__(13);
var GetFastValue = __webpack_require__(2);
-var Merge = __webpack_require__(85);
-var SetValue = __webpack_require__(398);
-var ShaderRender = __webpack_require__(1029);
+var Extend = __webpack_require__(15);
+var SetValue = __webpack_require__(401);
+var ShaderRender = __webpack_require__(1033);
var TransformMatrix = __webpack_require__(32);
/**
@@ -40211,12 +40668,163 @@ var Shader = new Class({
*/
this._textureCount = 0;
+ /**
+ * A reference to the GL Frame Buffer this Shader is drawing to.
+ * This property is only set if you have called `Shader.setRenderToTexture`.
+ *
+ * @name Phaser.GameObjects.Shader#framebuffer
+ * @type {?WebGLFramebuffer}
+ * @since 3.19.0
+ */
+ this.framebuffer = null;
+
+ /**
+ * A reference to the WebGLTexture this Shader is rendering to.
+ * This property is only set if you have called `Shader.setRenderToTexture`.
+ *
+ * @name Phaser.GameObjects.Shader#glTexture
+ * @type {?WebGLTexture}
+ * @since 3.19.0
+ */
+ this.glTexture = null;
+
+ /**
+ * A flag that indicates if this Shader has been set to render to a texture instead of the display list.
+ *
+ * This property is `true` if you have called `Shader.setRenderToTexture`, otherwise it's `false`.
+ *
+ * A Shader that is rendering to a texture _does not_ appear on the display list.
+ *
+ * @name Phaser.GameObjects.Shader#renderToTexture
+ * @type {boolean}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.renderToTexture = false;
+
+ /**
+ * A reference to the Phaser.Textures.Texture that has been stored in the Texture Manager for this Shader.
+ *
+ * This property is only set if you have called `Shader.setRenderToTexture`, otherwise it is `null`.
+ *
+ * @name Phaser.GameObjects.Shader#texture
+ * @type {Phaser.Textures.Texture}
+ * @since 3.19.0
+ */
+ this.texture = null;
+
+ /**
+ * Internal saved texture key.
+ *
+ * @name Phaser.GameObjects.Shader#_savedKey
+ * @type {boolean}
+ * @private
+ * @since 3.19.0
+ */
+ this._savedKey = '';
+
this.setPosition(x, y);
this.setSize(width, height);
this.setOrigin(0.5, 0.5);
this.setShader(key, textures);
},
+ /**
+ * Compares the renderMask with the renderFlags to see if this Game Object will render or not.
+ * Also checks the Game Object against the given Cameras exclusion list.
+ *
+ * @method Phaser.GameObjects.Shader#willRender
+ * @since 3.0.0
+ *
+ * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.
+ *
+ * @return {boolean} True if the Game Object should be rendered, otherwise false.
+ */
+ willRender: function (camera)
+ {
+ if (this.renderToTexture)
+ {
+ return true;
+ }
+ else
+ {
+ return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));
+ }
+ },
+
+ /**
+ * Changes this Shader so instead of rendering to the display list it renders to a
+ * WebGL Framebuffer and WebGL Texture instead. This allows you to use the output
+ * of this shader as an input for another shader, by mapping a sampler2D uniform
+ * to it.
+ *
+ * After calling this method the `Shader.framebuffer` and `Shader.glTexture` properties
+ * are populated.
+ *
+ * Additionally, you can provide a key to this method. Doing so will create a Phaser Texture
+ * from this Shader and save it into the Texture Manager, allowing you to then use it for
+ * any texture-based Game Object, such as a Sprite or Image:
+ *
+ * ```javascript
+ * var shader = this.add.shader('myShader', x, y, width, height);
+ *
+ * shader.setRenderToTexture('doodle');
+ *
+ * this.add.image(400, 300, 'doodle');
+ * ```
+ *
+ * Note that it stores an active reference to this Shader. That means as this shader updates,
+ * so does the texture and any object using it to render with. Also, if you destroy this
+ * shader, be sure to clear any objects that may have been using it as a texture too.
+ *
+ * You can access the Phaser Texture that is created via the `Shader.texture` property.
+ *
+ * By default it will create a single base texture. You can add frames to the texture
+ * by using the `Texture.add` method. After doing this, you can then allow Game Objects
+ * to use a specific frame from a Render Texture.
+ *
+ * @method Phaser.GameObjects.Shader#setRenderToTexture
+ * @since 3.19.0
+ *
+ * @param {string} [key] - The unique key to store the texture as within the global Texture Manager.
+ * @param {boolean} [flipY=false] - Does this texture need vertically flipping before rendering? This should usually be set to `true` if being fed from a buffer.
+ *
+ * @return {this} This Shader instance.
+ */
+ setRenderToTexture: function (key, flipY)
+ {
+ if (flipY === undefined) { flipY = false; }
+
+ if (!this.renderToTexture)
+ {
+ var width = this.width;
+ var height = this.height;
+ var renderer = this.renderer;
+
+ this.glTexture = renderer.createTextureFromSource(null, width, height, 0);
+
+ this.glTexture.flipY = flipY;
+
+ this.framebuffer = renderer.createFramebuffer(width, height, this.glTexture, false);
+
+ this._rendererWidth = width;
+ this._rendererHeight = height;
+
+ this.renderToTexture = true;
+
+ this.projOrtho(0, this.width, this.height, 0);
+
+ if (key)
+ {
+ this._savedKey = key;
+
+ this.texture = this.scene.sys.textures.addGLTexture(key, this.glTexture, width, height);
+ }
+ }
+
+ return this;
+ },
+
/**
* Sets the fragment and, optionally, the vertex shader source code that this Shader will use.
* This will immediately delete the active shader program, if set, and then create a new one
@@ -40272,7 +40880,7 @@ var Shader = new Class({
// The default uniforms available within the fragment shader
var defaultUniforms = {
- resolution: { type: '2f', value: { x: this.width, y: this.height }},
+ resolution: { type: '2f', value: { x: this.width, y: this.height } },
time: { type: '1f', value: 0 },
mouse: { type: '2f', value: { x: this.width / 2, y: this.height / 2 } },
date: { type: '4fv', value: [ d.getFullYear(), d.getMonth(), d.getDate(), d.getHours() * 60 * 60 + d.getMinutes() * 60 + d.getSeconds() ] },
@@ -40282,10 +40890,10 @@ var Shader = new Class({
iChannel2: { type: 'sampler2D', value: null, textureData: { repeat: true } },
iChannel3: { type: 'sampler2D', value: null, textureData: { repeat: true } }
};
-
+
if (this.shader.uniforms)
{
- this.uniforms = Merge(this.shader.uniforms, defaultUniforms);
+ this.uniforms = Extend(true, {}, this.shader.uniforms, defaultUniforms);
}
else
{
@@ -40302,7 +40910,7 @@ var Shader = new Class({
this.initUniforms();
- this.projOrtho(0, renderer.width, renderer.height, 0);
+ this.projOrtho(0, this._rendererWidth, this._rendererHeight, 0);
return this;
},
@@ -40402,12 +41010,66 @@ var Shader = new Class({
}
},
+ /**
+ * Sets a sampler2D uniform on this shader where the source texture is a WebGLTexture.
+ *
+ * This allows you to feed the output from one Shader into another:
+ *
+ * ```javascript
+ * let shader1 = this.add.shader(baseShader1, 0, 0, 512, 512).setRenderToTexture();
+ * let shader2 = this.add.shader(baseShader2, 0, 0, 512, 512).setRenderToTexture('output');
+ *
+ * shader1.setSampler2DBuffer('iChannel0', shader2.glTexture, 512, 512);
+ * shader2.setSampler2DBuffer('iChannel0', shader1.glTexture, 512, 512);
+ * ```
+ *
+ * In the above code, the result of baseShader1 is fed into Shader2 as the `iChannel0` sampler2D uniform.
+ * The result of baseShader2 is then fed back into shader1 again, creating a feedback loop.
+ *
+ * If you wish to use an image from the Texture Manager as a sampler2D input for this shader,
+ * see the `Shader.setSampler2D` method.
+ *
+ * @method Phaser.GameObjects.Shader#setSampler2DBuffer
+ * @since 3.19.0
+ *
+ * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`.
+ * @param {WebGLTexture} texture - A WebGLTexture reference.
+ * @param {integer} width - The width of the texture.
+ * @param {integer} height - The height of the texture.
+ * @param {integer} [textureIndex=0] - The texture index.
+ * @param {any} [textureData] - Additional texture data.
+ *
+ * @return {this} This Shader instance.
+ */
+ setSampler2DBuffer: function (uniformKey, texture, width, height, textureIndex, textureData)
+ {
+ if (textureIndex === undefined) { textureIndex = 0; }
+ if (textureData === undefined) { textureData = {}; }
+
+ var uniform = this.uniforms[uniformKey];
+
+ uniform.value = texture;
+
+ textureData.width = width;
+ textureData.height = height;
+
+ uniform.textureData = textureData;
+
+ this._textureCount = textureIndex;
+
+ this.initSampler2D(uniform);
+
+ return this;
+ },
+
/**
* Sets a sampler2D uniform on this shader.
*
* The textureKey given is the key from the Texture Manager cache. You cannot use a single frame
* from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.
*
+ * If you wish to use another Shader as a sampler2D input for this shader, see the `Shader.setSampler2DBuffer` method.
+ *
* @method Phaser.GameObjects.Shader#setSampler2D
* @since 3.17.0
*
@@ -40428,11 +41090,23 @@ var Shader = new Class({
{
var frame = textureManager.getFrame(textureKey);
var uniform = this.uniforms[uniformKey];
+ var source = frame.source;
uniform.textureKey = textureKey;
- uniform.source = frame.source.image;
+ uniform.source = source.image;
uniform.value = frame.glTexture;
+ if (source.isGLTexture)
+ {
+ if (!textureData)
+ {
+ textureData = {};
+ }
+
+ textureData.width = source.width;
+ textureData.height = source.height;
+ }
+
if (textureData)
{
uniform.textureData = textureData;
@@ -40674,6 +41348,11 @@ var Shader = new Class({
location = uniform.uniformLocation;
value = uniform.value;
+ if (value === null)
+ {
+ continue;
+ }
+
if (length === 1)
{
if (uniform.glMatrix)
@@ -40720,35 +41399,40 @@ var Shader = new Class({
* @method Phaser.GameObjects.Shader#load
* @since 3.17.0
*
- * @param {Phaser.GameObjects.Components.TransformMatrix} matrix2D - The transform matrix to use during rendering.
+ * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix2D] - The transform matrix to use during rendering.
*/
load: function (matrix2D)
{
// ITRS
+ var gl = this.gl;
var width = this.width;
var height = this.height;
var renderer = this.renderer;
var program = this.program;
-
- var x = -this._displayOriginX;
- var y = -this._displayOriginY;
-
var vm = this.viewMatrix;
- vm[0] = matrix2D[0];
- vm[1] = matrix2D[1];
- vm[4] = matrix2D[2];
- vm[5] = matrix2D[3];
- vm[8] = matrix2D[4];
- vm[9] = matrix2D[5];
- vm[12] = vm[0] * x + vm[4] * y;
- vm[13] = vm[1] * x + vm[5] * y;
+ if (!this.renderToTexture)
+ {
+ var x = -this._displayOriginX;
+ var y = -this._displayOriginY;
+
+ vm[0] = matrix2D[0];
+ vm[1] = matrix2D[1];
+ vm[4] = matrix2D[2];
+ vm[5] = matrix2D[3];
+ vm[8] = matrix2D[4];
+ vm[9] = matrix2D[5];
+ vm[12] = vm[0] * x + vm[4] * y;
+ vm[13] = vm[1] * x + vm[5] * y;
+ }
// Update vertex shader uniforms
- this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix);
- this.renderer.setFloat2(program, 'uResolution', this.width, this.height);
+ gl.useProgram(program);
+
+ gl.uniformMatrix4fv(gl.getUniformLocation(program, 'uViewMatrix'), false, vm);
+ gl.uniform2f(gl.getUniformLocation(program, 'uResolution'), this.width, this.height);
// Update fragment shader uniforms
@@ -40797,8 +41481,16 @@ var Shader = new Class({
var renderer = this.renderer;
var vertexSize = Float32Array.BYTES_PER_ELEMENT * 2;
- renderer.setProgram(program);
- renderer.setVertexBuffer(vertexBuffer);
+ if (this.renderToTexture)
+ {
+ renderer.setFramebuffer(this.framebuffer);
+
+ gl.clearColor(0, 0, 0, 0);
+
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ }
+
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
var location = gl.getAttribLocation(program, 'inPosition');
@@ -40827,6 +41519,11 @@ var Shader = new Class({
gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));
gl.drawArrays(gl.TRIANGLES, 0, vertexCount);
+
+ if (this.renderToTexture)
+ {
+ renderer.setFramebuffer(null, false);
+ }
},
/**
@@ -40866,6 +41563,17 @@ var Shader = new Class({
gl.deleteProgram(this.program);
gl.deleteBuffer(this.vertexBuffer);
+
+ if (this.renderToTexture)
+ {
+ this.renderer.deleteFramebuffer(this.framebuffer);
+
+ this.texture.destroy();
+
+ this.framebuffer = null;
+ this.glTexture = null;
+ this.texture = null;
+ }
}
});
@@ -40874,7 +41582,7 @@ module.exports = Shader;
/***/ }),
-/* 196 */
+/* 198 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -40884,8 +41592,8 @@ module.exports = Shader;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
-var LineToCircle = __webpack_require__(197);
+var Point = __webpack_require__(4);
+var LineToCircle = __webpack_require__(199);
/**
* Checks for intersection between the line segment and circle,
@@ -40966,7 +41674,7 @@ module.exports = GetLineToCircle;
/***/ }),
-/* 197 */
+/* 199 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -40976,7 +41684,7 @@ module.exports = GetLineToCircle;
*/
var Contains = __webpack_require__(46);
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
var tmp = new Point();
@@ -41050,7 +41758,7 @@ module.exports = LineToCircle;
/***/ }),
-/* 198 */
+/* 200 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -41060,9 +41768,9 @@ module.exports = LineToCircle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
-var LineToLine = __webpack_require__(82);
-var LineToRectangle = __webpack_require__(405);
+var Point = __webpack_require__(4);
+var LineToLine = __webpack_require__(84);
+var LineToRectangle = __webpack_require__(408);
/**
* Checks for intersection between the Line and a Rectangle shape,
@@ -41110,7 +41818,7 @@ module.exports = GetLineToRectangle;
/***/ }),
-/* 199 */
+/* 201 */
/***/ (function(module, exports) {
/**
@@ -41197,7 +41905,7 @@ module.exports = ContainsArray;
/***/ }),
-/* 200 */
+/* 202 */
/***/ (function(module, exports) {
/**
@@ -41245,7 +41953,7 @@ module.exports = RotateAroundXY;
/***/ }),
-/* 201 */
+/* 203 */
/***/ (function(module, exports) {
/**
@@ -41273,7 +41981,7 @@ module.exports = GetAspectRatio;
/***/ }),
-/* 202 */
+/* 204 */
/***/ (function(module, exports) {
/**
@@ -41327,7 +42035,7 @@ module.exports = RotateAroundXY;
/***/ }),
-/* 203 */
+/* 205 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -41342,18 +42050,18 @@ module.exports = RotateAroundXY;
module.exports = {
- BUTTON_DOWN: __webpack_require__(1150),
- BUTTON_UP: __webpack_require__(1151),
- CONNECTED: __webpack_require__(1152),
- DISCONNECTED: __webpack_require__(1153),
- GAMEPAD_BUTTON_DOWN: __webpack_require__(1154),
- GAMEPAD_BUTTON_UP: __webpack_require__(1155)
+ BUTTON_DOWN: __webpack_require__(1154),
+ BUTTON_UP: __webpack_require__(1155),
+ CONNECTED: __webpack_require__(1156),
+ DISCONNECTED: __webpack_require__(1157),
+ GAMEPAD_BUTTON_DOWN: __webpack_require__(1158),
+ GAMEPAD_BUTTON_UP: __webpack_require__(1159)
};
/***/ }),
-/* 204 */
+/* 206 */
/***/ (function(module, exports) {
/**
@@ -41394,7 +42102,7 @@ module.exports = GetURL;
/***/ }),
-/* 205 */
+/* 207 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -41403,8 +42111,8 @@ module.exports = GetURL;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Extend = __webpack_require__(17);
-var XHRSettings = __webpack_require__(133);
+var Extend = __webpack_require__(15);
+var XHRSettings = __webpack_require__(134);
/**
* Takes two XHRSettings Objects and creates a new XHRSettings object from them.
@@ -41442,7 +42150,7 @@ module.exports = MergeXHRSettings;
/***/ }),
-/* 206 */
+/* 208 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -41452,12 +42160,12 @@ module.exports = MergeXHRSettings;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
-var ParseXML = __webpack_require__(336);
+var ParseXML = __webpack_require__(339);
/**
* @classdesc
@@ -41627,7 +42335,7 @@ module.exports = XMLFile;
/***/ }),
-/* 207 */
+/* 209 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -41642,24 +42350,24 @@ module.exports = XMLFile;
module.exports = {
- Acceleration: __webpack_require__(1209),
- Angular: __webpack_require__(1210),
- Bounce: __webpack_require__(1211),
- Debug: __webpack_require__(1212),
- Drag: __webpack_require__(1213),
- Enable: __webpack_require__(1214),
- Friction: __webpack_require__(1215),
- Gravity: __webpack_require__(1216),
- Immovable: __webpack_require__(1217),
- Mass: __webpack_require__(1218),
- Size: __webpack_require__(1219),
- Velocity: __webpack_require__(1220)
+ Acceleration: __webpack_require__(1213),
+ Angular: __webpack_require__(1214),
+ Bounce: __webpack_require__(1215),
+ Debug: __webpack_require__(1216),
+ Drag: __webpack_require__(1217),
+ Enable: __webpack_require__(1218),
+ Friction: __webpack_require__(1219),
+ Gravity: __webpack_require__(1220),
+ Immovable: __webpack_require__(1221),
+ Mass: __webpack_require__(1222),
+ Size: __webpack_require__(1223),
+ Velocity: __webpack_require__(1224)
};
/***/ }),
-/* 208 */
+/* 210 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -41674,21 +42382,21 @@ module.exports = {
module.exports = {
- COLLIDE: __webpack_require__(1222),
- OVERLAP: __webpack_require__(1223),
- PAUSE: __webpack_require__(1224),
- RESUME: __webpack_require__(1225),
- TILE_COLLIDE: __webpack_require__(1226),
- TILE_OVERLAP: __webpack_require__(1227),
- WORLD_BOUNDS: __webpack_require__(1228),
- WORLD_STEP: __webpack_require__(1229)
+ COLLIDE: __webpack_require__(1226),
+ OVERLAP: __webpack_require__(1227),
+ PAUSE: __webpack_require__(1228),
+ RESUME: __webpack_require__(1229),
+ TILE_COLLIDE: __webpack_require__(1230),
+ TILE_OVERLAP: __webpack_require__(1231),
+ WORLD_BOUNDS: __webpack_require__(1232),
+ WORLD_STEP: __webpack_require__(1233)
};
/***/ }),
-/* 209 */,
-/* 210 */
+/* 211 */,
+/* 212 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -41697,7 +42405,7 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTileAt = __webpack_require__(137);
+var GetTileAt = __webpack_require__(138);
/**
* Calculates interesting faces at the given tile coordinates of the specified layer. Interesting
@@ -41764,7 +42472,7 @@ module.exports = CalculateFacesAt;
/***/ }),
-/* 211 */
+/* 213 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -41773,10 +42481,10 @@ module.exports = CalculateFacesAt;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Tile = __webpack_require__(72);
+var Tile = __webpack_require__(73);
var IsInLayerBounds = __webpack_require__(101);
-var CalculateFacesAt = __webpack_require__(210);
-var SetTileCollision = __webpack_require__(71);
+var CalculateFacesAt = __webpack_require__(212);
+var SetTileCollision = __webpack_require__(72);
/**
* Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index
@@ -41844,7 +42552,7 @@ module.exports = PutTileAt;
/***/ }),
-/* 212 */
+/* 214 */
/***/ (function(module, exports) {
/**
@@ -41883,7 +42591,7 @@ module.exports = SetLayerCollisionIndex;
/***/ }),
-/* 213 */
+/* 215 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -41892,10 +42600,10 @@ module.exports = SetLayerCollisionIndex;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Formats = __webpack_require__(31);
+var Formats = __webpack_require__(30);
var LayerData = __webpack_require__(102);
var MapData = __webpack_require__(103);
-var Tile = __webpack_require__(72);
+var Tile = __webpack_require__(73);
/**
* Parses a 2D array of tile indexes into a new MapData object with a single layer.
@@ -41975,7 +42683,7 @@ module.exports = Parse2DArray;
/***/ }),
-/* 214 */
+/* 216 */
/***/ (function(module, exports) {
/**
@@ -42065,7 +42773,7 @@ module.exports = ParseGID;
/***/ }),
-/* 215 */
+/* 217 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -42074,8 +42782,8 @@ module.exports = ParseGID;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Pick = __webpack_require__(461);
-var ParseGID = __webpack_require__(214);
+var Pick = __webpack_require__(464);
+var ParseGID = __webpack_require__(216);
var copyPoints = function (p) { return { x: p.x, y: p.y }; };
@@ -42147,7 +42855,7 @@ module.exports = ParseObject;
/***/ }),
-/* 216 */
+/* 218 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -42156,10 +42864,10 @@ module.exports = ParseObject;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Formats = __webpack_require__(31);
+var Formats = __webpack_require__(30);
var MapData = __webpack_require__(103);
-var Parse = __webpack_require__(453);
-var Tilemap = __webpack_require__(469);
+var Parse = __webpack_require__(456);
+var Tilemap = __webpack_require__(472);
/**
* Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When
@@ -42233,7 +42941,7 @@ module.exports = ParseToTilemap;
/***/ }),
-/* 217 */
+/* 219 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -42242,7 +42950,7 @@ module.exports = ParseToTilemap;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
/**
* Extracts an array of targets from a Tween configuration object.
@@ -42282,7 +42990,7 @@ module.exports = GetTargets;
/***/ }),
-/* 218 */
+/* 220 */
/***/ (function(module, exports) {
/**
@@ -42291,6 +42999,14 @@ module.exports = GetTargets;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
+/**
+ * @ignore
+ */
+function hasGetActive (def)
+{
+ return (!!def.getActive && typeof def.getActive === 'function');
+}
+
/**
* @ignore
*/
@@ -42312,13 +43028,28 @@ function hasGetEnd (def)
*/
function hasGetters (def)
{
- return hasGetStart(def) || hasGetEnd(def);
+ return hasGetStart(def) || hasGetEnd(def) || hasGetActive(def);
}
/**
- * Returns `getStart` and `getEnd` functions for a Tween's Data based on a target property and end value.
+ * Returns `getActive`, `getStart` and `getEnd` functions for a TweenData based on a target property and end value.
+ *
+ * `getActive` if not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.
+ * `getEnd` is invoked once any start delays have expired and returns what the value should tween to.
+ * `getStart` is invoked when the tween reaches the end and needs to either repeat or yoyo, it returns the value to go back to.
*
- * If the end value is a number, it will be treated as an absolute value and the property will be tweened to it. A string can be provided to specify a relative end value which consists of an operation (`+=` to add to the current value, `-=` to subtract from the current value, `*=` to multiply the current value, or `/=` to divide the current value) followed by its operand. A function can be provided to allow greater control over the end value; it will receive the target object being tweened, the name of the property being tweened, and the current value of the property as its arguments. If both the starting and the ending values need to be controlled, an object with `getStart` and `getEnd` callbacks, which will receive the same arguments, can be provided instead. If an object with a `value` property is provided, the property will be used as the effective value under the same rules described here.
+ * If the end value is a number, it will be treated as an absolute value and the property will be tweened to it.
+ * A string can be provided to specify a relative end value which consists of an operation
+ * (`+=` to add to the current value, `-=` to subtract from the current value, `*=` to multiply the current
+ * value, or `/=` to divide the current value) followed by its operand.
+ *
+ * A function can be provided to allow greater control over the end value; it will receive the target
+ * object being tweened, the name of the property being tweened, and the current value of the property
+ * as its arguments.
+ *
+ * If both the starting and the ending values need to be controlled, an object with `getStart` and `getEnd`
+ * callbacks, which will receive the same arguments, can be provided instead. If an object with a `value`
+ * property is provided, the property will be used as the effective value under the same rules described here.
*
* @function Phaser.Tweens.Builders.GetValueOp
* @since 3.0.0
@@ -42326,7 +43057,7 @@ function hasGetters (def)
* @param {string} key - The name of the property to modify.
* @param {*} propertyValue - The ending value of the property, as described above.
*
- * @return {function} An array of two functions, `getStart` and `getEnd`, which return the starting and the ending value of the property based on the provided value.
+ * @return {function} An array of functions, `getActive`, `getStart` and `getEnd`, which return the starting and the ending value of the property based on the provided value.
*/
var GetValueOp = function (key, propertyValue)
{
@@ -42338,6 +43069,9 @@ var GetValueOp = function (key, propertyValue)
// The returned value sets what the property will be at the START of the Tween (usually called at the end of the Tween)
var getStart = function (target, key, value) { return value; };
+ // What to set the property to the moment the TweenData is invoked
+ var getActive = null;
+
var t = typeof(propertyValue);
if (t === 'number')
@@ -42406,54 +43140,112 @@ var GetValueOp = function (key, propertyValue)
// The same as setting just the getEnd function and no getStart
// props: {
- // x: function (target, key, value) { return value + 50); },
+ // x: function (target, key, value, targetIndex, totalTargets, tween) { return value + 50); },
// }
getEnd = propertyValue;
}
- else if (t === 'object' && hasGetters(propertyValue))
+ else if (t === 'object')
{
- /*
- x: {
- // Called at the start of the Tween. The returned value sets what the property will be at the END of the Tween.
- getEnd: function (target, key, value)
- {
- return value;
- },
+ if (hasGetters(propertyValue))
+ {
+ /*
+ x: {
+ // Called the moment Tween is active. The returned value sets the property on the target immediately.
+ getActive: function (target, key, value, targetIndex, totalTargets, tween)
+ {
+ return value;
+ },
- // Called at the end of the Tween. The returned value sets what the property will be at the START of the Tween.
- getStart: function (target, key, value)
+ // Called at the start of the Tween. The returned value sets what the property will be at the END of the Tween.
+ getEnd: function (target, key, value, targetIndex, totalTargets, tween)
+ {
+ return value;
+ },
+
+ // Called at the end of the Tween. The returned value sets what the property will be at the START of the Tween.
+ getStart: function (target, key, value, targetIndex, totalTargets, tween)
+ {
+ return value;
+ }
+ }
+ */
+
+ if (hasGetActive(propertyValue))
{
- return value;
+ getActive = propertyValue.getActive;
+ }
+
+ if (hasGetEnd(propertyValue))
+ {
+ getEnd = propertyValue.getEnd;
+ }
+
+ if (hasGetStart(propertyValue))
+ {
+ getStart = propertyValue.getStart;
}
}
- */
-
- if (hasGetEnd(propertyValue))
+ else if (propertyValue.hasOwnProperty('value'))
{
- getEnd = propertyValue.getEnd;
- }
+ // 'value' may still be a string, function or a number
+ // props: {
+ // x: { value: 400, ... },
+ // y: { value: 300, ... }
+ // }
- if (hasGetStart(propertyValue))
+ callbacks = GetValueOp(key, propertyValue.value);
+ }
+ else
{
- getStart = propertyValue.getStart;
- }
- }
- else if (propertyValue.hasOwnProperty('value'))
- {
- // Value may still be a string, function or a number
- // props: {
- // x: { value: 400, ... },
- // y: { value: 300, ... }
- // }
+ // 'from' and 'to' may still be a string, function or a number
+ // props: {
+ // x: { from: 400, to: 600 },
+ // y: { from: 300, to: 500 }
+ // }
- callbacks = GetValueOp(key, propertyValue.value);
+ // Same as above, but the 'start' value is set immediately on the target
+ // props: {
+ // x: { start: 400, to: 600 },
+ // y: { start: 300, to: 500 }
+ // }
+
+ // 'start' value is set immediately, then it goes 'from' to 'to' during the tween
+ // props: {
+ // x: { start: 200, from: 400, to: 600 },
+ // y: { start: 300, from: 300, to: 500 }
+ // }
+
+ var hasTo = propertyValue.hasOwnProperty('to');
+ var hasFrom = propertyValue.hasOwnProperty('from');
+ var hasStart = propertyValue.hasOwnProperty('start');
+
+ if (hasTo && (hasFrom || hasStart))
+ {
+ callbacks = GetValueOp(key, propertyValue.to);
+
+ if (hasStart)
+ {
+ var startCallbacks = GetValueOp(key, propertyValue.start);
+
+ callbacks.getActive = startCallbacks.getEnd;
+ }
+
+ if (hasFrom)
+ {
+ var fromCallbacks = GetValueOp(key, propertyValue.from);
+
+ callbacks.getStart = fromCallbacks.getEnd;
+ }
+ }
+ }
}
// If callback not set by the else if block above then set it here and return it
if (!callbacks)
{
callbacks = {
+ getActive: getActive,
getEnd: getEnd,
getStart: getStart
};
@@ -42466,7 +43258,7 @@ module.exports = GetValueOp;
/***/ }),
-/* 219 */
+/* 221 */
/***/ (function(module, exports) {
/**
@@ -42510,7 +43302,7 @@ module.exports = TWEEN_DEFAULTS;
/***/ }),
-/* 220 */
+/* 222 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -42520,9 +43312,11 @@ module.exports = TWEEN_DEFAULTS;
*/
var Class = __webpack_require__(0);
-var GameObjectCreator = __webpack_require__(15);
-var GameObjectFactory = __webpack_require__(5);
-var TWEEN_CONST = __webpack_require__(88);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(223);
+var GameObjectCreator = __webpack_require__(16);
+var GameObjectFactory = __webpack_require__(6);
+var TWEEN_CONST = __webpack_require__(89);
/**
* @classdesc
@@ -42532,6 +43326,7 @@ var TWEEN_CONST = __webpack_require__(88);
*
* @class Tween
* @memberof Phaser.Tweens
+ * @extends Phaser.Events.EventEmitter
* @constructor
* @since 3.0.0
*
@@ -42541,10 +43336,14 @@ var TWEEN_CONST = __webpack_require__(88);
*/
var Tween = new Class({
+ Extends: EventEmitter,
+
initialize:
function Tween (parent, data, targets)
{
+ EventEmitter.call(this);
+
/**
* A reference to the parent of this Tween.
* Either the Tween Manager or a Tween Timeline instance.
@@ -42652,6 +43451,40 @@ var Tween = new Class({
*/
this.loopCounter = 0;
+ /**
+ * Time in ms/frames before the 'onStart' event fires.
+ * This is the shortest `delay` value across all of the TweenDatas of this Tween.
+ *
+ * @name Phaser.Tweens.Tween#startDelay
+ * @type {number}
+ * @default 0
+ * @since 3.19.0
+ */
+ this.startDelay = 0;
+
+ /**
+ * Has this Tween started playback yet?
+ * This boolean is toggled when the Tween leaves the 'delayed' state and starts running.
+ *
+ * @name Phaser.Tweens.Tween#hasStarted
+ * @type {boolean}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.hasStarted = false;
+
+ /**
+ * Is this Tween currently seeking?
+ * This boolean is toggled in the `Tween.seek` method.
+ * When a tween is seeking it will not dispatch any events or callbacks.
+ *
+ * @name Phaser.Tweens.Tween#isSeeking
+ * @type {boolean}
+ * @readonly
+ * @since 3.19.0
+ */
+ this.isSeeking = false;
+
/**
* Time in ms/frames before the 'onComplete' event fires. This never fires if loop = -1 (as it never completes)
*
@@ -42709,7 +43542,7 @@ var Tween = new Class({
* @private
* @since 3.0.0
*/
- this._pausedState = TWEEN_CONST.PENDING_ADD;
+ this._pausedState = TWEEN_CONST.INIT;
/**
* Does the Tween start off paused? (if so it needs to be started with Tween.play)
@@ -42782,14 +43615,24 @@ var Tween = new Class({
this.totalProgress = 0;
/**
- * An object containing the various Tween callback references.
+ * An object containing the different Tween callback functions.
+ *
+ * You can either set these in the Tween config, or by calling the `Tween.setCallback` method.
+ *
+ * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused.
+ * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay.
+ * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.
+ * `onRepeat` When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.
+ * `onComplete` When the Tween finishes playback fully or `Tween.stop` is called. Never invoked if tween is set to repeat infinitely.
+ * `onUpdate` When a TweenData updates a property on a source target during playback.
+ * `onLoop` When a Tween loops. This happens _after_ the `loopDelay` expires, if set.
*
* @name Phaser.Tweens.Tween#callbacks
* @type {object}
- * @default 0
* @since 3.0.0
*/
this.callbacks = {
+ onActive: null,
onComplete: null,
onLoop: null,
onRepeat: null,
@@ -42798,6 +43641,13 @@ var Tween = new Class({
onYoyo: null
};
+ /**
+ * The context in which all callbacks are invoked.
+ *
+ * @name Phaser.Tweens.Tween#callbackScope
+ * @type {any}
+ * @since 3.0.0
+ */
this.callbackScope;
},
@@ -42969,7 +43819,8 @@ var Tween = new Class({
*/
calcDuration: function ()
{
- var max = 0;
+ var maxDuration = 0;
+ var minDelay = Number.MAX_SAFE_INTEGER;
var data = this.data;
@@ -43000,10 +43851,15 @@ var Tween = new Class({
tweenData.totalDuration += (tweenData.t2 * tweenData.repeat);
}
- if (tweenData.totalDuration > max)
+ if (tweenData.totalDuration > maxDuration)
{
// Get the longest TweenData from the Tween, used to calculate the Tween TD
- max = tweenData.totalDuration;
+ maxDuration = tweenData.totalDuration;
+ }
+
+ if (tweenData.delay < minDelay)
+ {
+ minDelay = tweenData.delay;
}
}
@@ -43011,7 +43867,7 @@ var Tween = new Class({
// If duration has been set to 0 then we give it a super-low value so that it always
// renders at least 1 frame, but no more, without causing divided by zero errors elsewhere.
- this.duration = Math.max(max, 0.001);
+ this.duration = Math.max(maxDuration, 0.001);
this.loopCounter = (this.loop === -1) ? 999999999999 : this.loop;
@@ -43023,6 +43879,9 @@ var Tween = new Class({
{
this.totalDuration = this.duration + this.completeDelay;
}
+
+ // How long before this Tween starts playback?
+ this.startDelay = minDelay;
},
/**
@@ -43036,6 +43895,15 @@ var Tween = new Class({
*/
init: function ()
{
+ // You can't have a paused Tween if it's part of a Timeline
+ if (this.paused && !this.parentIsTimeline)
+ {
+ this.state = TWEEN_CONST.PENDING_ADD;
+ this._pausedState = TWEEN_CONST.INIT;
+
+ return false;
+ }
+
var data = this.data;
var totalTargets = this.totalTargets;
@@ -43044,12 +43912,17 @@ var Tween = new Class({
var tweenData = data[i];
var target = tweenData.target;
var gen = tweenData.gen;
+ var key = tweenData.key;
+ var targetIndex = tweenData.index;
- tweenData.delay = gen.delay(i, totalTargets, target);
- tweenData.duration = Math.max(gen.duration(i, totalTargets, target), 0.001);
- tweenData.hold = gen.hold(i, totalTargets, target);
- tweenData.repeat = gen.repeat(i, totalTargets, target);
- tweenData.repeatDelay = gen.repeatDelay(i, totalTargets, target);
+ // Old function signature: i, totalTargets, target
+ // New function signature: target, key, value, index, total, tween
+
+ tweenData.delay = gen.delay(target, key, 0, targetIndex, totalTargets, this);
+ tweenData.duration = Math.max(gen.duration(target, key, 0, targetIndex, totalTargets, this), 0.001);
+ tweenData.hold = gen.hold(target, key, 0, targetIndex, totalTargets, this);
+ tweenData.repeat = gen.repeat(target, key, 0, targetIndex, totalTargets, this);
+ tweenData.repeatDelay = gen.repeatDelay(target, key, 0, targetIndex, totalTargets, this);
}
this.calcDuration();
@@ -43059,26 +43932,32 @@ var Tween = new Class({
this.elapsed = 0;
this.totalElapsed = 0;
- // You can't have a paused Tween if it's part of a Timeline
- if (this.paused && !this.parentIsTimeline)
- {
- this.state = TWEEN_CONST.PENDING_ADD;
- this._pausedState = TWEEN_CONST.INIT;
+ this.state = TWEEN_CONST.INIT;
- return false;
- }
- else
- {
- this.state = TWEEN_CONST.INIT;
+ return true;
+ },
- return true;
- }
+ /**
+ * Internal method that makes this Tween active within the TweenManager
+ * and emits the onActive event and callback.
+ *
+ * @method Phaser.Tweens.Tween#makeActive
+ * @fires Phaser.Tweens.Events#TWEEN_ACTIVE
+ * @since 3.19.0
+ */
+ makeActive: function ()
+ {
+ this.parent.makeActive(this);
+
+ this.dispatchTweenEvent(Events.TWEEN_ACTIVE, this.callbacks.onActive);
},
/**
* Internal method that advances to the next state of the Tween during playback.
*
* @method Phaser.Tweens.Tween#nextState
+ * @fires Phaser.Tweens.Events#TWEEN_COMPLETE
+ * @fires Phaser.Tweens.Events#TWEEN_LOOP
* @since 3.0.0
*/
nextState: function ()
@@ -43089,15 +43968,6 @@ var Tween = new Class({
this.progress = 0;
this.loopCounter--;
- var onLoop = this.callbacks.onLoop;
-
- if (onLoop)
- {
- onLoop.params[1] = this.targets;
-
- onLoop.func.apply(onLoop.scope, onLoop.params);
- }
-
this.resetTweenData(true);
if (this.loopDelay > 0)
@@ -43108,25 +43978,21 @@ var Tween = new Class({
else
{
this.state = TWEEN_CONST.ACTIVE;
+
+ this.dispatchTweenEvent(Events.TWEEN_LOOP, this.callbacks.onLoop);
}
}
else if (this.completeDelay > 0)
{
- this.countdown = this.completeDelay;
this.state = TWEEN_CONST.COMPLETE_DELAY;
+
+ this.countdown = this.completeDelay;
}
else
{
- var onComplete = this.callbacks.onComplete;
-
- if (onComplete)
- {
- onComplete.params[1] = this.targets;
-
- onComplete.func.apply(onComplete.scope, onComplete.params);
- }
-
this.state = TWEEN_CONST.PENDING_REMOVE;
+
+ this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);
}
},
@@ -43176,11 +44042,21 @@ var Tween = new Class({
{
if (resetFromTimeline === undefined) { resetFromTimeline = false; }
- if (this.state === TWEEN_CONST.ACTIVE || (this.state === TWEEN_CONST.PENDING_ADD && this._pausedState === TWEEN_CONST.PENDING_ADD))
+ var state = this.state;
+
+ if (state === TWEEN_CONST.INIT && !this.parentIsTimeline)
+ {
+ this.resetTweenData(false);
+
+ this.state = TWEEN_CONST.ACTIVE;
+
+ return this;
+ }
+ else if (state === TWEEN_CONST.ACTIVE || (state === TWEEN_CONST.PENDING_ADD && this._pausedState === TWEEN_CONST.PENDING_ADD))
{
return this;
}
- else if (!this.parentIsTimeline && (this.state === TWEEN_CONST.PENDING_REMOVE || this.state === TWEEN_CONST.REMOVED))
+ else if (!this.parentIsTimeline && (state === TWEEN_CONST.PENDING_REMOVE || state === TWEEN_CONST.REMOVED))
{
this.seek(0);
this.parent.makeActive(this);
@@ -43188,21 +44064,12 @@ var Tween = new Class({
return this;
}
- var onStart = this.callbacks.onStart;
-
if (this.parentIsTimeline)
{
this.resetTweenData(resetFromTimeline);
if (this.calculatedOffset === 0)
{
- if (onStart)
- {
- onStart.params[1] = this.targets;
-
- onStart.func.apply(onStart.scope, onStart.params);
- }
-
this.state = TWEEN_CONST.ACTIVE;
}
else
@@ -43216,7 +44083,7 @@ var Tween = new Class({
{
this.paused = false;
- this.parent.makeActive(this);
+ this.makeActive();
}
else
{
@@ -43224,14 +44091,7 @@ var Tween = new Class({
this.state = TWEEN_CONST.ACTIVE;
- if (onStart)
- {
- onStart.params[1] = this.targets;
-
- onStart.func.apply(onStart.scope, onStart.params);
- }
-
- this.parent.makeActive(this);
+ this.makeActive();
}
return this;
@@ -43248,11 +44108,17 @@ var Tween = new Class({
resetTweenData: function (resetFromLoop)
{
var data = this.data;
+ var total = this.totalData;
+ var totalTargets = this.totalTargets;
- for (var i = 0; i < this.totalData; i++)
+ for (var i = 0; i < total; i++)
{
var tweenData = data[i];
+ var target = tweenData.target;
+ var key = tweenData.key;
+ var targetIndex = tweenData.index;
+
tweenData.progress = 0;
tweenData.elapsed = 0;
@@ -43260,9 +44126,9 @@ var Tween = new Class({
if (resetFromLoop)
{
- tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start);
+ tweenData.start = tweenData.getStartValue(target, key, tweenData.start, targetIndex, totalTargets, this);
- tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.end);
+ tweenData.end = tweenData.getEndValue(target, key, tweenData.end, targetIndex, totalTargets, this);
tweenData.current = tweenData.start;
@@ -43276,8 +44142,14 @@ var Tween = new Class({
if (tweenData.delay > 0)
{
tweenData.elapsed = tweenData.delay;
+
tweenData.state = TWEEN_CONST.DELAY;
}
+
+ if (tweenData.getActiveValue)
+ {
+ target[key] = tweenData.getActiveValue(tweenData.target, tweenData.key, tweenData.start);
+ }
}
},
@@ -43306,73 +44178,110 @@ var Tween = new Class({
},
/**
- * Attempts to seek to a specific position in a Tween.
+ * Seeks to a specific point in the Tween.
+ *
+ * **Note:** You cannot seek a Tween that repeats or loops forever, or that has an unusually long total duration.
+ *
+ * The given position is a value between 0 and 1 which represents how far through the Tween to seek to.
+ * A value of 0.5 would seek to half-way through the Tween, where-as a value of zero would seek to the start.
+ *
+ * Note that the seek takes the entire duration of the Tween into account, including delays, loops and repeats.
+ * For example, a Tween that lasts for 2 seconds, but that loops 3 times, would have a total duration of 6 seconds,
+ * so seeking to 0.5 would seek to 3 seconds into the Tween, as that's half-way through its _entire_ duration.
+ *
+ * Seeking works by resetting the Tween to its initial values and then iterating through the Tween at `delta`
+ * jumps per step. The longer the Tween, the longer this can take.
*
* @method Phaser.Tweens.Tween#seek
* @since 3.0.0
*
* @param {number} toPosition - A value between 0 and 1 which represents the progress point to seek to.
+ * @param {number} [delta=16.6] - The size of each step when seeking through the Tween. A higher value completes faster but at a cost of less precision.
*
* @return {this} This Tween instance.
*/
- seek: function (toPosition)
+ seek: function (toPosition, delta)
{
+ if (delta === undefined) { delta = 16.6; }
+
+ if (this.totalDuration >= 3600000)
+ {
+ console.warn('Tween.seek duration too long');
+
+ return this;
+ }
+
+ if (this.state === TWEEN_CONST.REMOVED)
+ {
+ this.makeActive();
+ }
+
+ this.elapsed = 0;
+ this.progress = 0;
+ this.totalElapsed = 0;
+ this.totalProgress = 0;
+
var data = this.data;
+ var totalTargets = this.totalTargets;
for (var i = 0; i < this.totalData; i++)
{
- // This won't work with loop > 0 yet
- var ms = this.totalDuration * toPosition;
-
var tweenData = data[i];
- var progress = 0;
- var elapsed = 0;
+ var target = tweenData.target;
+ var gen = tweenData.gen;
+ var key = tweenData.key;
+ var targetIndex = tweenData.index;
- if (ms <= tweenData.delay)
+ tweenData.progress = 0;
+ tweenData.elapsed = 0;
+
+ tweenData.repeatCounter = (tweenData.repeat === -1) ? 999999999999 : tweenData.repeat;
+
+ // Old function signature: i, totalTargets, target
+ // New function signature: target, key, value, index, total, tween
+
+ tweenData.delay = gen.delay(target, key, 0, targetIndex, totalTargets, this);
+ tweenData.duration = Math.max(gen.duration(target, key, 0, targetIndex, totalTargets, this), 0.001);
+ tweenData.hold = gen.hold(target, key, 0, targetIndex, totalTargets, this);
+ tweenData.repeat = gen.repeat(target, key, 0, targetIndex, totalTargets, this);
+ tweenData.repeatDelay = gen.repeatDelay(target, key, 0, targetIndex, totalTargets, this);
+
+ tweenData.current = tweenData.start;
+ tweenData.state = TWEEN_CONST.PLAYING_FORWARD;
+
+ this.updateTweenData(this, tweenData, 0, targetIndex, totalTargets);
+
+ if (tweenData.delay > 0)
{
- progress = 0;
- elapsed = 0;
+ tweenData.elapsed = tweenData.delay;
+ tweenData.state = TWEEN_CONST.DELAY;
}
- else if (ms >= tweenData.totalDuration)
- {
- progress = 1;
- elapsed = tweenData.duration;
- }
- else if (ms > tweenData.delay && ms <= tweenData.t1)
- {
- // Keep it zero bound
- ms = Math.max(0, ms - tweenData.delay);
+ }
- // Somewhere in the first playthru range
- progress = ms / tweenData.t1;
- elapsed = tweenData.duration * progress;
- }
- else if (ms > tweenData.t1 && ms < tweenData.totalDuration)
- {
- // Somewhere in repeat land
- ms -= tweenData.delay;
- ms -= tweenData.t1;
+ this.calcDuration();
- // var repeats = Math.floor(ms / tweenData.t2);
+ var wasPaused = false;
- // remainder
- ms = ((ms / tweenData.t2) % 1) * tweenData.t2;
+ if (this.state === TWEEN_CONST.PAUSED)
+ {
+ wasPaused = true;
- if (ms > tweenData.repeatDelay)
- {
- progress = ms / tweenData.t1;
- elapsed = tweenData.duration * progress;
- }
- }
+ this.state = TWEEN_CONST.ACTIVE;
+ }
- tweenData.progress = progress;
- tweenData.elapsed = elapsed;
+ this.isSeeking = true;
- var v = tweenData.ease(tweenData.progress);
+ do
+ {
+ this.update(0, delta);
- tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);
+ } while (this.totalProgress < toPosition);
- tweenData.target[tweenData.key] = tweenData.current;
+ this.isSeeking = false;
+
+ if (wasPaused)
+ {
+ this.state = TWEEN_CONST.PAUSED;
}
return this;
@@ -43380,14 +44289,26 @@ var Tween = new Class({
/**
* Sets an event based callback to be invoked during playback.
+ *
+ * Calling this method will replace a previously set callback for the given type, if any exists.
+ *
+ * The types available are:
+ *
+ * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused.
+ * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay.
+ * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.
+ * `onRepeat` When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.
+ * `onComplete` When the Tween finishes playback fully or `Tween.stop` is called. Never invoked if tween is set to repeat infinitely.
+ * `onUpdate` When a TweenData updates a property on a source target during playback.
+ * `onLoop` When a Tween loops. This happens _after_ the `loopDelay` expires, if set.
*
* @method Phaser.Tweens.Tween#setCallback
* @since 3.0.0
*
- * @param {string} type - Type of the callback.
- * @param {function} callback - Callback function.
+ * @param {string} type - Type of the callback to set.
+ * @param {function} callback - The function to invoke when this callback happens.
* @param {array} [params] - An array of parameters for specified callbacks types.
- * @param {object} [scope] - The context the callback will be invoked in.
+ * @param {any} [scope] - The context the callback will be invoked in.
*
* @return {this} This Tween instance.
*/
@@ -43407,6 +44328,7 @@ var Tween = new Class({
* If you don't need a delay, or have an onComplete callback, then call `Tween.stop` instead.
*
* @method Phaser.Tweens.Tween#complete
+ * @fires Phaser.Tweens.Events#TWEEN_COMPLETE
* @since 3.2.0
*
* @param {number} [delay=0] - The time to wait before invoking the complete callback. If zero it will fire immediately.
@@ -43419,21 +44341,15 @@ var Tween = new Class({
if (delay)
{
- this.countdown = delay;
this.state = TWEEN_CONST.COMPLETE_DELAY;
+
+ this.countdown = delay;
}
else
{
- var onComplete = this.callbacks.onComplete;
-
- if (onComplete)
- {
- onComplete.params[1] = this.targets;
-
- onComplete.func.apply(onComplete.scope, onComplete.params);
- }
-
this.state = TWEEN_CONST.PENDING_REMOVE;
+
+ this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);
}
return this;
@@ -43494,6 +44410,8 @@ var Tween = new Class({
}
}
+ this.removeAllListeners();
+
this.state = TWEEN_CONST.PENDING_REMOVE;
}
@@ -43504,6 +44422,9 @@ var Tween = new Class({
* Internal method that advances the Tween based on the time values.
*
* @method Phaser.Tweens.Tween#update
+ * @fires Phaser.Tweens.Events#TWEEN_COMPLETE
+ * @fires Phaser.Tweens.Events#TWEEN_LOOP
+ * @fires Phaser.Tweens.Events#TWEEN_START
* @since 3.0.0
*
* @param {number} timestamp - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
@@ -43535,11 +44456,25 @@ var Tween = new Class({
{
case TWEEN_CONST.ACTIVE:
+ if (!this.hasStarted && !this.isSeeking)
+ {
+ this.startDelay -= delta;
+
+ if (this.startDelay <= 0)
+ {
+ this.hasStarted = true;
+
+ this.dispatchTweenEvent(Events.TWEEN_START, this.callbacks.onStart);
+ }
+ }
+
var stillRunning = false;
for (var i = 0; i < this.totalData; i++)
{
- if (this.updateTweenData(this, this.data[i], delta))
+ var tweenData = this.data[i];
+
+ if (this.updateTweenData(this, tweenData, delta))
{
stillRunning = true;
}
@@ -43560,6 +44495,8 @@ var Tween = new Class({
if (this.countdown <= 0)
{
this.state = TWEEN_CONST.ACTIVE;
+
+ this.dispatchTweenEvent(Events.TWEEN_LOOP, this.callbacks.onLoop);
}
break;
@@ -43570,15 +44507,6 @@ var Tween = new Class({
if (this.countdown <= 0)
{
- var onStart = this.callbacks.onStart;
-
- if (onStart)
- {
- onStart.params[1] = this.targets;
-
- onStart.func.apply(onStart.scope, onStart.params);
- }
-
this.state = TWEEN_CONST.ACTIVE;
}
@@ -43590,14 +44518,9 @@ var Tween = new Class({
if (this.countdown <= 0)
{
- var onComplete = this.callbacks.onComplete;
-
- if (onComplete)
- {
- onComplete.func.apply(onComplete.scope, onComplete.params);
- }
-
this.state = TWEEN_CONST.PENDING_REMOVE;
+
+ this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);
}
break;
@@ -43606,10 +44529,61 @@ var Tween = new Class({
return (this.state === TWEEN_CONST.PENDING_REMOVE);
},
+ /**
+ * Internal method that will emit a TweenData based Event and invoke the given callback.
+ *
+ * @method Phaser.Tweens.Tween#dispatchTweenDataEvent
+ * @since 3.19.0
+ *
+ * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.
+ * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.
+ * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData object that caused this event.
+ */
+ dispatchTweenDataEvent: function (event, callback, tweenData)
+ {
+ if (!this.isSeeking)
+ {
+ this.emit(event, this, tweenData.key, tweenData.target);
+
+ if (callback)
+ {
+ callback.params[1] = tweenData.target;
+
+ callback.func.apply(callback.scope, callback.params);
+ }
+ }
+ },
+
+ /**
+ * Internal method that will emit a Tween based Event and invoke the given callback.
+ *
+ * @method Phaser.Tweens.Tween#dispatchTweenEvent
+ * @since 3.19.0
+ *
+ * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.
+ * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.
+ */
+ dispatchTweenEvent: function (event, callback)
+ {
+ if (!this.isSeeking)
+ {
+ this.emit(event, this, this.targets);
+
+ if (callback)
+ {
+ callback.params[1] = this.targets;
+
+ callback.func.apply(callback.scope, callback.params);
+ }
+ }
+ },
+
/**
* Internal method used as part of the playback process that sets a tween to play in reverse.
*
* @method Phaser.Tweens.Tween#setStateFromEnd
+ * @fires Phaser.Tweens.Events#TWEEN_REPEAT
+ * @fires Phaser.Tweens.Events#TWEEN_YOYO
* @since 3.0.0
*
* @param {Phaser.Tweens.Tween} tween - The Tween to update.
@@ -43633,25 +44607,14 @@ var Tween = new Class({
tweenData.target.toggleFlipX();
}
- // Problem: The flip and callback and so on gets called for every TweenData that triggers it at the same time.
- // If you're tweening several properties it can fire for all of them, at once.
-
if (tweenData.flipY)
{
tweenData.target.toggleFlipY();
}
- var onYoyo = tween.callbacks.onYoyo;
+ this.dispatchTweenDataEvent(Events.TWEEN_YOYO, tween.callbacks.onYoyo, tweenData);
- if (onYoyo)
- {
- // Element 1 is reserved for the target of the yoyo (and needs setting here)
- onYoyo.params[1] = tweenData.target;
-
- onYoyo.func.apply(onYoyo.scope, onYoyo.params);
- }
-
- tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start);
+ tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);
return TWEEN_CONST.PLAYING_BACKWARD;
}
@@ -43676,19 +44639,9 @@ var Tween = new Class({
tweenData.target.toggleFlipY();
}
- var onRepeat = tween.callbacks.onRepeat;
+ tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);
- if (onRepeat)
- {
- // Element 1 is reserved for the target of the repeat (and needs setting here)
- onRepeat.params[1] = tweenData.target;
-
- onRepeat.func.apply(onRepeat.scope, onRepeat.params);
- }
-
- tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start);
-
- tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start);
+ tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);
// Delay?
if (tweenData.repeatDelay > 0)
@@ -43703,6 +44656,8 @@ var Tween = new Class({
}
else
{
+ this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);
+
return TWEEN_CONST.PLAYING_FORWARD;
}
}
@@ -43714,6 +44669,7 @@ var Tween = new Class({
* Internal method used as part of the playback process that sets a tween to play from the start.
*
* @method Phaser.Tweens.Tween#setStateFromStart
+ * @fires Phaser.Tweens.Events#TWEEN_REPEAT
* @since 3.0.0
*
* @param {Phaser.Tweens.Tween} tween - The Tween to update.
@@ -43742,17 +44698,7 @@ var Tween = new Class({
tweenData.target.toggleFlipY();
}
- var onRepeat = tween.callbacks.onRepeat;
-
- if (onRepeat)
- {
- // Element 1 is reserved for the target of the repeat (and needs setting here)
- onRepeat.params[1] = tweenData.target;
-
- onRepeat.func.apply(onRepeat.scope, onRepeat.params);
- }
-
- tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start);
+ tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);
// Delay?
if (tweenData.repeatDelay > 0)
@@ -43767,6 +44713,8 @@ var Tween = new Class({
}
else
{
+ this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);
+
return TWEEN_CONST.PLAYING_FORWARD;
}
}
@@ -43778,22 +44726,26 @@ var Tween = new Class({
* Internal method that advances the TweenData based on the time value given.
*
* @method Phaser.Tweens.Tween#updateTweenData
+ * @fires Phaser.Tweens.Events#TWEEN_UPDATE
+ * @fires Phaser.Tweens.Events#TWEEN_REPEAT
* @since 3.0.0
*
* @param {Phaser.Tweens.Tween} tween - The Tween to update.
* @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.
- * @param {number} delta - Either a value in ms, or 1 if Tween.useFrames is true
+ * @param {number} delta - Either a value in ms, or 1 if Tween.useFrames is true.
*
* @return {boolean} True if the tween is not complete (e.g., playing), or false if the tween is complete.
*/
updateTweenData: function (tween, tweenData, delta)
{
+ var target = tweenData.target;
+
switch (tweenData.state)
{
case TWEEN_CONST.PLAYING_FORWARD:
case TWEEN_CONST.PLAYING_BACKWARD:
- if (!tweenData.target)
+ if (!target)
{
tweenData.state = TWEEN_CONST.COMPLETE;
break;
@@ -43814,37 +44766,16 @@ var Tween = new Class({
var forward = (tweenData.state === TWEEN_CONST.PLAYING_FORWARD);
var progress = elapsed / duration;
- var v;
-
- if (forward)
- {
- v = tweenData.ease(progress);
- }
- else
- {
- v = tweenData.ease(1 - progress);
- }
-
- tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);
-
- tweenData.target[tweenData.key] = tweenData.current;
-
tweenData.elapsed = elapsed;
tweenData.progress = progress;
- var onUpdate = tween.callbacks.onUpdate;
-
- if (onUpdate)
- {
- onUpdate.params[1] = tweenData.target;
-
- onUpdate.func.apply(onUpdate.scope, onUpdate.params);
- }
-
if (progress === 1)
{
if (forward)
{
+ tweenData.current = tweenData.end;
+ target[tweenData.key] = tweenData.end;
+
if (tweenData.hold > 0)
{
tweenData.elapsed = tweenData.hold - diff;
@@ -43858,9 +44789,22 @@ var Tween = new Class({
}
else
{
+ tweenData.current = tweenData.start;
+ target[tweenData.key] = tweenData.start;
+
tweenData.state = this.setStateFromStart(tween, tweenData, diff);
}
}
+ else
+ {
+ var v = (forward) ? tweenData.ease(progress) : tweenData.ease(1 - progress);
+
+ tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);
+
+ target[tweenData.key] = tweenData.current;
+ }
+
+ this.dispatchTweenDataEvent(Events.TWEEN_UPDATE, tween.callbacks.onUpdate, tweenData);
break;
@@ -43886,6 +44830,8 @@ var Tween = new Class({
tweenData.elapsed = Math.abs(tweenData.elapsed);
tweenData.state = TWEEN_CONST.PLAYING_FORWARD;
+
+ this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);
}
break;
@@ -43903,15 +44849,15 @@ var Tween = new Class({
case TWEEN_CONST.PENDING_RENDER:
- if (tweenData.target)
+ if (target)
{
- tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.target[tweenData.key]);
+ tweenData.start = tweenData.getStartValue(target, tweenData.key, target[tweenData.key], tweenData.index, tween.totalTargets, tween);
- tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start);
+ tweenData.end = tweenData.getEndValue(target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);
tweenData.current = tweenData.start;
- tweenData.target[tweenData.key] = tweenData.start;
+ target[tweenData.key] = tweenData.start;
tweenData.state = TWEEN_CONST.PLAYING_FORWARD;
}
@@ -43929,7 +44875,16 @@ var Tween = new Class({
});
+// onActive = 'active' event = When the Tween is moved from the pending to the active list in the manager, even if playback delayed
+// onStart = 'start' event = When the Tween starts playing from a delayed state (will happen same time as onActive if no delay)
+// onYoyo = 'yoyo' event = When the Tween starts a yoyo
+// onRepeat = 'repeat' event = When a TweenData repeats playback (if any)
+// onComplete = 'complete' event = When the Tween finishes all playback (can sometimes never happen if repeat -1), also when 'stop' called
+// onUpdate = 'update' event = When the Tween updates a TweenData during playback (expensive!)
+// onLoop = 'loop' event = Used to loop ALL TweenDatas in a Tween
+
Tween.TYPES = [
+ 'onActive',
'onComplete',
'onLoop',
'onRepeat',
@@ -43941,7 +44896,7 @@ Tween.TYPES = [
/**
* Creates a new Tween object.
*
- * Note: This method will only be available Tweens have been built into Phaser.
+ * Note: This method will only be available if Tweens have been built into Phaser.
*
* @method Phaser.GameObjects.GameObjectFactory#tween
* @since 3.0.0
@@ -43986,7 +44941,40 @@ module.exports = Tween;
/***/ }),
-/* 221 */
+/* 223 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * @namespace Phaser.Tweens.Events
+ */
+
+module.exports = {
+
+ TIMELINE_COMPLETE: __webpack_require__(1306),
+ TIMELINE_LOOP: __webpack_require__(1307),
+ TIMELINE_PAUSE: __webpack_require__(1308),
+ TIMELINE_RESUME: __webpack_require__(1309),
+ TIMELINE_START: __webpack_require__(1310),
+ TIMELINE_UPDATE: __webpack_require__(1311),
+ TWEEN_ACTIVE: __webpack_require__(1312),
+ TWEEN_COMPLETE: __webpack_require__(1313),
+ TWEEN_LOOP: __webpack_require__(1314),
+ TWEEN_REPEAT: __webpack_require__(1315),
+ TWEEN_START: __webpack_require__(1316),
+ TWEEN_UPDATE: __webpack_require__(1317),
+ TWEEN_YOYO: __webpack_require__(1318)
+
+};
+
+
+/***/ }),
+/* 224 */
/***/ (function(module, exports) {
/**
@@ -43996,17 +44984,21 @@ module.exports = Tween;
*/
/**
- * Returns a TweenDataConfig object that describes the tween data for a unique property of a unique target. A single Tween consists of multiple TweenDatas, depending on how many properties are being changed by the Tween.
+ * Returns a TweenDataConfig object that describes the tween data for a unique property of a unique target.
+ * A single Tween consists of multiple TweenDatas, depending on how many properties are being changed by the Tween.
*
- * This is an internal function used by the TweenBuilder and should not be accessed directly, instead, Tweens should be created using the GameObjectFactory or GameObjectCreator.
+ * This is an internal function used by the TweenBuilder and should not be accessed directly, instead,
+ * Tweens should be created using the GameObjectFactory or GameObjectCreator.
*
* @function Phaser.Tweens.TweenData
* @since 3.0.0
*
- * @param {object} target - The target to tween.
+ * @param {any} target - The target to tween.
+ * @param {integer} index - The target index within the Tween targets array.
* @param {string} key - The property of the target to tween.
* @param {function} getEnd - What the property will be at the END of the Tween.
* @param {function} getStart - What the property will be at the START of the Tween.
+ * @param {?function} getActive - If not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.
* @param {function} ease - The ease function this tween uses.
* @param {number} delay - Time in ms/frames before tween will start.
* @param {number} duration - Duration of the tween in ms/frames.
@@ -44019,16 +45011,22 @@ module.exports = Tween;
*
* @return {Phaser.Types.Tweens.TweenDataConfig} The config object describing this TweenData.
*/
-var TweenData = function (target, key, getEnd, getStart, ease, delay, duration, yoyo, hold, repeat, repeatDelay, flipX, flipY)
+var TweenData = function (target, index, key, getEnd, getStart, getActive, ease, delay, duration, yoyo, hold, repeat, repeatDelay, flipX, flipY)
{
return {
// The target to tween
target: target,
+ // The index of the target within the tween targets array
+ index: index,
+
// The property of the target to tween
key: key,
+ // What to set the property to the moment the TweenData is invoked.
+ getActiveValue: getActive,
+
// The returned value sets what the property will be at the END of the Tween.
getEndValue: getEnd,
@@ -44102,7 +45100,7 @@ module.exports = TweenData;
/***/ }),
-/* 222 */
+/* 225 */
/***/ (function(module, exports) {
var g;
@@ -44128,7 +45126,7 @@ module.exports = g;
/***/ }),
-/* 223 */
+/* 226 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -44137,7 +45135,7 @@ module.exports = g;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MathWrap = __webpack_require__(56);
+var MathWrap = __webpack_require__(57);
/**
* Wrap an angle.
@@ -44160,7 +45158,7 @@ module.exports = Wrap;
/***/ }),
-/* 224 */
+/* 227 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -44169,7 +45167,7 @@ module.exports = Wrap;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Wrap = __webpack_require__(56);
+var Wrap = __webpack_require__(57);
/**
* Wrap an angle in degrees.
@@ -44192,7 +45190,7 @@ module.exports = WrapDegrees;
/***/ }),
-/* 225 */
+/* 228 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -44957,7 +45955,7 @@ module.exports = WebGLPipeline;
/***/ }),
-/* 226 */
+/* 229 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -44968,14 +45966,14 @@ module.exports = WebGLPipeline;
*/
var Class = __webpack_require__(0);
-var Earcut = __webpack_require__(63);
+var Earcut = __webpack_require__(64);
var GetFastValue = __webpack_require__(2);
-var ModelViewProjection = __webpack_require__(487);
-var ShaderSourceFS = __webpack_require__(735);
-var ShaderSourceVS = __webpack_require__(736);
+var ModelViewProjection = __webpack_require__(489);
+var ShaderSourceFS = __webpack_require__(740);
+var ShaderSourceVS = __webpack_require__(741);
var TransformMatrix = __webpack_require__(32);
var Utils = __webpack_require__(9);
-var WebGLPipeline = __webpack_require__(225);
+var WebGLPipeline = __webpack_require__(228);
/**
* @classdesc
@@ -45495,9 +46493,13 @@ var TextureTintPipeline = new Class({
var frameY = frame.y;
var frameWidth = frame.cutWidth;
var frameHeight = frame.cutHeight;
+ var customPivot = frame.customPivot;
- var x = -sprite.displayOriginX + frameX;
- var y = -sprite.displayOriginY + frameY;
+ var displayOriginX = sprite.displayOriginX;
+ var displayOriginY = sprite.displayOriginY;
+
+ var x = -displayOriginX + frameX;
+ var y = -displayOriginY + frameY;
if (sprite.isCropped)
{
@@ -45519,26 +46521,35 @@ var TextureTintPipeline = new Class({
frameX = crop.x;
frameY = crop.y;
- x = -sprite.displayOriginX + frameX;
- y = -sprite.displayOriginY + frameY;
+ x = -displayOriginX + frameX;
+ y = -displayOriginY + frameY;
}
+ var flipX = 1;
+ var flipY = 1;
+
if (sprite.flipX)
{
- x += frameWidth;
- frameWidth *= -1;
+ if (!customPivot)
+ {
+ x += (-frame.realWidth + (displayOriginX * 2));
+ }
+
+ flipX = -1;
}
- if (sprite.flipY)
+ // Auto-invert the flipY if this is coming from a GLTexture
+ if (sprite.flipY || (frame.source.isGLTexture && !texture.flipY))
{
- y += frameHeight;
- frameHeight *= -1;
+ if (!customPivot)
+ {
+ y += (-frame.realHeight + (displayOriginY * 2));
+ }
+
+ flipY = -1;
}
- var xw = x + frameWidth;
- var yh = y + frameHeight;
-
- spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX, sprite.scaleY);
+ spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY);
camMatrix.copyFrom(camera.matrix);
@@ -45563,6 +46574,9 @@ var TextureTintPipeline = new Class({
camMatrix.multiply(spriteMatrix, calcMatrix);
}
+ var xw = x + frameWidth;
+ var yh = y + frameHeight;
+
var tx0 = calcMatrix.getX(x, y);
var ty0 = calcMatrix.getY(x, y);
@@ -46449,9 +47463,9 @@ module.exports = TextureTintPipeline;
/***/ }),
-/* 227 */,
-/* 228 */,
-/* 229 */
+/* 230 */,
+/* 231 */,
+/* 232 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46466,61 +47480,61 @@ module.exports = TextureTintPipeline;
module.exports = {
- Angle: __webpack_require__(499),
- Call: __webpack_require__(500),
- GetFirst: __webpack_require__(501),
- GetLast: __webpack_require__(502),
- GridAlign: __webpack_require__(503),
- IncAlpha: __webpack_require__(537),
- IncX: __webpack_require__(538),
- IncXY: __webpack_require__(539),
- IncY: __webpack_require__(540),
- PlaceOnCircle: __webpack_require__(541),
- PlaceOnEllipse: __webpack_require__(542),
- PlaceOnLine: __webpack_require__(543),
- PlaceOnRectangle: __webpack_require__(544),
- PlaceOnTriangle: __webpack_require__(545),
- PlayAnimation: __webpack_require__(546),
+ Angle: __webpack_require__(501),
+ Call: __webpack_require__(502),
+ GetFirst: __webpack_require__(503),
+ GetLast: __webpack_require__(504),
+ GridAlign: __webpack_require__(505),
+ IncAlpha: __webpack_require__(555),
+ IncX: __webpack_require__(556),
+ IncXY: __webpack_require__(557),
+ IncY: __webpack_require__(558),
+ PlaceOnCircle: __webpack_require__(559),
+ PlaceOnEllipse: __webpack_require__(560),
+ PlaceOnLine: __webpack_require__(561),
+ PlaceOnRectangle: __webpack_require__(562),
+ PlaceOnTriangle: __webpack_require__(563),
+ PlayAnimation: __webpack_require__(564),
PropertyValueInc: __webpack_require__(34),
PropertyValueSet: __webpack_require__(27),
- RandomCircle: __webpack_require__(547),
- RandomEllipse: __webpack_require__(548),
- RandomLine: __webpack_require__(549),
- RandomRectangle: __webpack_require__(550),
- RandomTriangle: __webpack_require__(551),
- Rotate: __webpack_require__(552),
- RotateAround: __webpack_require__(553),
- RotateAroundDistance: __webpack_require__(554),
- ScaleX: __webpack_require__(555),
- ScaleXY: __webpack_require__(556),
- ScaleY: __webpack_require__(557),
- SetAlpha: __webpack_require__(558),
- SetBlendMode: __webpack_require__(559),
- SetDepth: __webpack_require__(560),
- SetHitArea: __webpack_require__(561),
- SetOrigin: __webpack_require__(562),
- SetRotation: __webpack_require__(563),
- SetScale: __webpack_require__(564),
- SetScaleX: __webpack_require__(565),
- SetScaleY: __webpack_require__(566),
- SetTint: __webpack_require__(567),
- SetVisible: __webpack_require__(568),
- SetX: __webpack_require__(569),
- SetXY: __webpack_require__(570),
- SetY: __webpack_require__(571),
- ShiftPosition: __webpack_require__(572),
- Shuffle: __webpack_require__(573),
- SmootherStep: __webpack_require__(574),
- SmoothStep: __webpack_require__(575),
- Spread: __webpack_require__(576),
- ToggleVisible: __webpack_require__(577),
- WrapInRectangle: __webpack_require__(578)
+ RandomCircle: __webpack_require__(565),
+ RandomEllipse: __webpack_require__(566),
+ RandomLine: __webpack_require__(567),
+ RandomRectangle: __webpack_require__(568),
+ RandomTriangle: __webpack_require__(569),
+ Rotate: __webpack_require__(570),
+ RotateAround: __webpack_require__(571),
+ RotateAroundDistance: __webpack_require__(572),
+ ScaleX: __webpack_require__(573),
+ ScaleXY: __webpack_require__(574),
+ ScaleY: __webpack_require__(575),
+ SetAlpha: __webpack_require__(576),
+ SetBlendMode: __webpack_require__(577),
+ SetDepth: __webpack_require__(578),
+ SetHitArea: __webpack_require__(579),
+ SetOrigin: __webpack_require__(580),
+ SetRotation: __webpack_require__(581),
+ SetScale: __webpack_require__(582),
+ SetScaleX: __webpack_require__(583),
+ SetScaleY: __webpack_require__(584),
+ SetTint: __webpack_require__(585),
+ SetVisible: __webpack_require__(586),
+ SetX: __webpack_require__(587),
+ SetXY: __webpack_require__(588),
+ SetY: __webpack_require__(589),
+ ShiftPosition: __webpack_require__(590),
+ Shuffle: __webpack_require__(591),
+ SmootherStep: __webpack_require__(592),
+ SmoothStep: __webpack_require__(593),
+ Spread: __webpack_require__(594),
+ ToggleVisible: __webpack_require__(595),
+ WrapInRectangle: __webpack_require__(596)
};
/***/ }),
-/* 230 */
+/* 233 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46529,19 +47543,19 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ALIGN_CONST = __webpack_require__(143);
+var ALIGN_CONST = __webpack_require__(144);
var AlignInMap = [];
-AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(231);
-AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(232);
-AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(233);
-AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(234);
-AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(236);
-AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(237);
-AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(238);
-AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(239);
-AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(240);
+AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(234);
+AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(235);
+AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(236);
+AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(237);
+AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(239);
+AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(240);
+AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(241);
+AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(242);
+AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(243);
/**
* Takes given Game Object and aligns it so that it is positioned relative to the other.
@@ -46569,7 +47583,7 @@ module.exports = QuickSet;
/***/ }),
-/* 231 */
+/* 234 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46579,9 +47593,9 @@ module.exports = QuickSet;
*/
var GetBottom = __webpack_require__(38);
-var GetCenterX = __webpack_require__(73);
+var GetCenterX = __webpack_require__(74);
var SetBottom = __webpack_require__(39);
-var SetCenterX = __webpack_require__(74);
+var SetCenterX = __webpack_require__(75);
/**
* Takes given Game Object and aligns it so that it is positioned in the bottom center of the other.
@@ -46613,7 +47627,7 @@ module.exports = BottomCenter;
/***/ }),
-/* 232 */
+/* 235 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46657,7 +47671,7 @@ module.exports = BottomLeft;
/***/ }),
-/* 233 */
+/* 236 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46701,7 +47715,7 @@ module.exports = BottomRight;
/***/ }),
-/* 234 */
+/* 237 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46710,9 +47724,9 @@ module.exports = BottomRight;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CenterOn = __webpack_require__(235);
-var GetCenterX = __webpack_require__(73);
-var GetCenterY = __webpack_require__(76);
+var CenterOn = __webpack_require__(238);
+var GetCenterX = __webpack_require__(74);
+var GetCenterY = __webpack_require__(77);
/**
* Takes given Game Object and aligns it so that it is positioned in the center of the other.
@@ -46743,7 +47757,7 @@ module.exports = Center;
/***/ }),
-/* 235 */
+/* 238 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46752,8 +47766,8 @@ module.exports = Center;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SetCenterX = __webpack_require__(74);
-var SetCenterY = __webpack_require__(75);
+var SetCenterX = __webpack_require__(75);
+var SetCenterY = __webpack_require__(76);
/**
* Positions the Game Object so that it is centered on the given coordinates.
@@ -46780,7 +47794,7 @@ module.exports = CenterOn;
/***/ }),
-/* 236 */
+/* 239 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46789,9 +47803,9 @@ module.exports = CenterOn;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetCenterY = __webpack_require__(76);
+var GetCenterY = __webpack_require__(77);
var GetLeft = __webpack_require__(40);
-var SetCenterY = __webpack_require__(75);
+var SetCenterY = __webpack_require__(76);
var SetLeft = __webpack_require__(41);
/**
@@ -46824,7 +47838,7 @@ module.exports = LeftCenter;
/***/ }),
-/* 237 */
+/* 240 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46833,9 +47847,9 @@ module.exports = LeftCenter;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetCenterY = __webpack_require__(76);
+var GetCenterY = __webpack_require__(77);
var GetRight = __webpack_require__(42);
-var SetCenterY = __webpack_require__(75);
+var SetCenterY = __webpack_require__(76);
var SetRight = __webpack_require__(43);
/**
@@ -46868,7 +47882,7 @@ module.exports = RightCenter;
/***/ }),
-/* 238 */
+/* 241 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46877,9 +47891,9 @@ module.exports = RightCenter;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetCenterX = __webpack_require__(73);
+var GetCenterX = __webpack_require__(74);
var GetTop = __webpack_require__(44);
-var SetCenterX = __webpack_require__(74);
+var SetCenterX = __webpack_require__(75);
var SetTop = __webpack_require__(45);
/**
@@ -46912,7 +47926,7 @@ module.exports = TopCenter;
/***/ }),
-/* 239 */
+/* 242 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -46956,7 +47970,7 @@ module.exports = TopLeft;
/***/ }),
-/* 240 */
+/* 243 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -47000,7 +48014,7 @@ module.exports = TopRight;
/***/ }),
-/* 241 */
+/* 244 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -47009,10 +48023,10 @@ module.exports = TopRight;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CircumferencePoint = __webpack_require__(144);
-var FromPercent = __webpack_require__(86);
-var MATH_CONST = __webpack_require__(23);
-var Point = __webpack_require__(3);
+var CircumferencePoint = __webpack_require__(145);
+var FromPercent = __webpack_require__(87);
+var MATH_CONST = __webpack_require__(22);
+var Point = __webpack_require__(4);
/**
* Returns a Point object containing the coordinates of a point on the circumference of the Circle
@@ -47043,7 +48057,7 @@ module.exports = GetPoint;
/***/ }),
-/* 242 */
+/* 245 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -47052,10 +48066,10 @@ module.exports = GetPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Circumference = __webpack_require__(243);
-var CircumferencePoint = __webpack_require__(144);
-var FromPercent = __webpack_require__(86);
-var MATH_CONST = __webpack_require__(23);
+var Circumference = __webpack_require__(246);
+var CircumferencePoint = __webpack_require__(145);
+var FromPercent = __webpack_require__(87);
+var MATH_CONST = __webpack_require__(22);
/**
* Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle,
@@ -47095,7 +48109,7 @@ module.exports = GetPoints;
/***/ }),
-/* 243 */
+/* 246 */
/***/ (function(module, exports) {
/**
@@ -47123,7 +48137,7 @@ module.exports = Circumference;
/***/ }),
-/* 244 */
+/* 247 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -47132,7 +48146,7 @@ module.exports = Circumference;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
// bitmask flag for GameObject.renderMask
var _FLAG = 2; // 0010
@@ -47418,7 +48432,7 @@ module.exports = Alpha;
/***/ }),
-/* 245 */
+/* 248 */
/***/ (function(module, exports) {
/**
@@ -47502,7 +48516,7 @@ module.exports = FindClosestInSorted;
/***/ }),
-/* 246 */
+/* 249 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -47676,7 +48690,7 @@ module.exports = AnimationFrame;
/***/ }),
-/* 247 */
+/* 250 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -47685,7 +48699,7 @@ module.exports = AnimationFrame;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BlendModes = __webpack_require__(52);
+var BlendModes = __webpack_require__(53);
/**
* Provides methods used for setting the blend mode of a Game Object.
@@ -47798,7 +48812,7 @@ module.exports = BlendMode;
/***/ }),
-/* 248 */
+/* 251 */
/***/ (function(module, exports) {
/**
@@ -47891,7 +48905,7 @@ module.exports = Depth;
/***/ }),
-/* 249 */
+/* 252 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -47900,8 +48914,8 @@ module.exports = Depth;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetPoint = __webpack_require__(147);
-var Perimeter = __webpack_require__(108);
+var GetPoint = __webpack_require__(148);
+var Perimeter = __webpack_require__(109);
// Return an array of points from the perimeter of the rectangle
// each spaced out based on the quantity or step required
@@ -47945,7 +48959,7 @@ module.exports = GetPoints;
/***/ }),
-/* 250 */
+/* 253 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -47954,7 +48968,7 @@ module.exports = GetPoints;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Get a point on a line that's a given percentage along its length.
@@ -47984,7 +48998,7 @@ module.exports = GetPoint;
/***/ }),
-/* 251 */
+/* 254 */
/***/ (function(module, exports) {
/**
@@ -48024,7 +49038,7 @@ module.exports = RotateAround;
/***/ }),
-/* 252 */
+/* 255 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -48033,8 +49047,8 @@ module.exports = RotateAround;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BitmapMask = __webpack_require__(253);
-var GeometryMask = __webpack_require__(254);
+var BitmapMask = __webpack_require__(256);
+var GeometryMask = __webpack_require__(257);
/**
* Provides methods used for getting and setting the mask of a Game Object.
@@ -48171,7 +49185,7 @@ module.exports = Mask;
/***/ }),
-/* 253 */
+/* 256 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -48181,6 +49195,7 @@ module.exports = Mask;
*/
var Class = __webpack_require__(0);
+var GameEvents = __webpack_require__(18);
/**
* @classdesc
@@ -48335,7 +49350,7 @@ var BitmapMask = new Class({
this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);
this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);
- renderer.onContextRestored(function (renderer)
+ scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)
{
var width = renderer.width;
var height = renderer.height;
@@ -48463,7 +49478,7 @@ module.exports = BitmapMask;
/***/ }),
-/* 254 */
+/* 257 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -48778,7 +49793,7 @@ module.exports = GeometryMask;
/***/ }),
-/* 255 */
+/* 258 */
/***/ (function(module, exports) {
/**
@@ -48885,7 +49900,7 @@ module.exports = ScrollFactor;
/***/ }),
-/* 256 */
+/* 259 */
/***/ (function(module, exports) {
/**
@@ -48947,7 +49962,7 @@ module.exports = ToJSON;
/***/ }),
-/* 257 */
+/* 260 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -48956,10 +49971,10 @@ module.exports = ToJSON;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MATH_CONST = __webpack_require__(23);
+var MATH_CONST = __webpack_require__(22);
var TransformMatrix = __webpack_require__(32);
-var WrapAngle = __webpack_require__(223);
-var WrapAngleDegrees = __webpack_require__(224);
+var WrapAngle = __webpack_require__(226);
+var WrapAngleDegrees = __webpack_require__(227);
// global bitmask flag for GameObject.renderMask (used by Scale)
var _FLAG = 4; // 0100
@@ -49147,8 +50162,9 @@ var Transform = {
/**
* The angle of this Game Object as expressed in degrees.
- *
- * Where 0 is to the right, 90 is down, 180 is left.
+ *
+ * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
+ * and -90 is up.
*
* If you prefer to work in radians, see the `rotation` property instead.
*
@@ -49173,6 +50189,9 @@ var Transform = {
/**
* The angle of this Game Object in radians.
+ *
+ * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
+ * and -90 is up.
*
* If you prefer to work in degrees, see the `angle` property instead.
*
@@ -49477,7 +50496,7 @@ module.exports = Transform;
/***/ }),
-/* 258 */
+/* 261 */
/***/ (function(module, exports) {
/**
@@ -49566,7 +50585,7 @@ module.exports = Visible;
/***/ }),
-/* 259 */
+/* 262 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -49581,16 +50600,16 @@ module.exports = Visible;
module.exports = {
- CHANGE_DATA: __webpack_require__(532),
- CHANGE_DATA_KEY: __webpack_require__(533),
- REMOVE_DATA: __webpack_require__(534),
- SET_DATA: __webpack_require__(535)
+ CHANGE_DATA: __webpack_require__(550),
+ CHANGE_DATA_KEY: __webpack_require__(551),
+ REMOVE_DATA: __webpack_require__(552),
+ SET_DATA: __webpack_require__(553)
};
/***/ }),
-/* 260 */
+/* 263 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -49599,14 +50618,13 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Perimeter = __webpack_require__(108);
-var Point = __webpack_require__(3);
+var Perimeter = __webpack_require__(109);
+var Point = __webpack_require__(4);
-// Return an array of points from the perimeter of the rectangle
-// each spaced out based on the quantity or step required
/**
- * [description]
+ * Return an array of points from the perimeter of the rectangle
+ * each spaced out based on the quantity or step required
*
* @function Phaser.Geom.Rectangle.MarchingAnts
* @since 3.0.0
@@ -49710,7 +50728,7 @@ module.exports = MarchingAnts;
/***/ }),
-/* 261 */
+/* 264 */
/***/ (function(module, exports) {
/**
@@ -49750,7 +50768,7 @@ module.exports = RotateLeft;
/***/ }),
-/* 262 */
+/* 265 */
/***/ (function(module, exports) {
/**
@@ -49790,7 +50808,7 @@ module.exports = RotateRight;
/***/ }),
-/* 263 */
+/* 266 */
/***/ (function(module, exports) {
/**
@@ -49864,7 +50882,7 @@ module.exports = BresenhamPoints;
/***/ }),
-/* 264 */
+/* 267 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -49873,14 +50891,14 @@ module.exports = BresenhamPoints;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Animation = __webpack_require__(146);
+var Animation = __webpack_require__(147);
var Class = __webpack_require__(0);
-var CustomMap = __webpack_require__(157);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(107);
-var GameEvents = __webpack_require__(28);
-var GetValue = __webpack_require__(6);
-var Pad = __webpack_require__(158);
+var CustomMap = __webpack_require__(158);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(108);
+var GameEvents = __webpack_require__(18);
+var GetValue = __webpack_require__(5);
+var Pad = __webpack_require__(159);
/**
* @classdesc
@@ -50311,6 +51329,10 @@ var AnimationManager = new Class({
{
anim.load(child, startFrame);
}
+ else
+ {
+ console.warn('Missing animation: ' + key);
+ }
return child;
},
@@ -50509,7 +51531,7 @@ module.exports = AnimationManager;
/***/ }),
-/* 265 */
+/* 268 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -50519,9 +51541,9 @@ module.exports = AnimationManager;
*/
var Class = __webpack_require__(0);
-var CustomMap = __webpack_require__(157);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(266);
+var CustomMap = __webpack_require__(158);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(269);
/**
* @classdesc
@@ -50695,7 +51717,7 @@ module.exports = BaseCache;
/***/ }),
-/* 266 */
+/* 269 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -50710,14 +51732,14 @@ module.exports = BaseCache;
module.exports = {
- ADD: __webpack_require__(595),
- REMOVE: __webpack_require__(596)
+ ADD: __webpack_require__(599),
+ REMOVE: __webpack_require__(600)
};
/***/ }),
-/* 267 */
+/* 270 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -50726,9 +51748,9 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BaseCache = __webpack_require__(265);
+var BaseCache = __webpack_require__(268);
var Class = __webpack_require__(0);
-var GameEvents = __webpack_require__(28);
+var GameEvents = __webpack_require__(18);
/**
* @classdesc
@@ -50941,7 +51963,7 @@ module.exports = CacheManager;
/***/ }),
-/* 268 */
+/* 271 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -50950,16 +51972,16 @@ module.exports = CacheManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BaseCamera = __webpack_require__(112);
-var CanvasPool = __webpack_require__(24);
-var CenterOn = __webpack_require__(162);
-var Clamp = __webpack_require__(22);
+var BaseCamera = __webpack_require__(113);
+var CanvasPool = __webpack_require__(25);
+var CenterOn = __webpack_require__(163);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var Effects = __webpack_require__(276);
-var Linear = __webpack_require__(114);
-var Rectangle = __webpack_require__(10);
-var Vector2 = __webpack_require__(4);
+var Effects = __webpack_require__(279);
+var Linear = __webpack_require__(115);
+var Rectangle = __webpack_require__(11);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -50988,7 +52010,7 @@ var Vector2 = __webpack_require__(4);
* @memberof Phaser.Cameras.Scene2D
* @constructor
* @since 3.0.0
- *
+ *
* @extends Phaser.Cameras.Scene2D.BaseCamera
* @extends Phaser.GameObjects.Components.Flip
* @extends Phaser.GameObjects.Components.Tint
@@ -51140,11 +52162,11 @@ var Camera = new Class({
/**
* Is this Camera rendering directly to the canvas or to a texture?
- *
+ *
* Enable rendering to texture with the method `setRenderToTexture` (just enabling this boolean won't be enough)
- *
+ *
* Once enabled you can toggle it by switching this property.
- *
+ *
* To properly remove a render texture you should call the `clearRenderToTexture()` method.
*
* @name Phaser.Cameras.Scene2D.Camera#renderToTexture
@@ -51157,9 +52179,9 @@ var Camera = new Class({
/**
* If this Camera has been set to render to a texture then this holds a reference
* to the HTML Canvas Element that the Camera is drawing to.
- *
+ *
* Enable texture rendering using the method `setRenderToTexture`.
- *
+ *
* This is only populated if Phaser is running with the Canvas Renderer.
*
* @name Phaser.Cameras.Scene2D.Camera#canvas
@@ -51171,9 +52193,9 @@ var Camera = new Class({
/**
* If this Camera has been set to render to a texture then this holds a reference
* to the Rendering Context belonging to the Canvas element the Camera is drawing to.
- *
+ *
* Enable texture rendering using the method `setRenderToTexture`.
- *
+ *
* This is only populated if Phaser is running with the Canvas Renderer.
*
* @name Phaser.Cameras.Scene2D.Camera#context
@@ -51185,9 +52207,9 @@ var Camera = new Class({
/**
* If this Camera has been set to render to a texture then this holds a reference
* to the GL Texture belonging the Camera is drawing to.
- *
+ *
* Enable texture rendering using the method `setRenderToTexture`.
- *
+ *
* This is only set if Phaser is running with the WebGL Renderer.
*
* @name Phaser.Cameras.Scene2D.Camera#glTexture
@@ -51199,9 +52221,9 @@ var Camera = new Class({
/**
* If this Camera has been set to render to a texture then this holds a reference
* to the GL Frame Buffer belonging the Camera is drawing to.
- *
+ *
* Enable texture rendering using the method `setRenderToTexture`.
- *
+ *
* This is only set if Phaser is running with the WebGL Renderer.
*
* @name Phaser.Cameras.Scene2D.Camera#framebuffer
@@ -51213,9 +52235,9 @@ var Camera = new Class({
/**
* If this Camera has been set to render to a texture and to use a custom pipeline,
* then this holds a reference to the pipeline the Camera is drawing with.
- *
+ *
* Enable texture rendering using the method `setRenderToTexture`.
- *
+ *
* This is only set if Phaser is running with the WebGL Renderer.
*
* @name Phaser.Cameras.Scene2D.Camera#pipeline
@@ -51227,32 +52249,32 @@ var Camera = new Class({
/**
* Sets the Camera to render to a texture instead of to the main canvas.
- *
+ *
* The Camera will redirect all Game Objects it's asked to render to this texture.
- *
+ *
* During the render sequence, the texture itself will then be rendered to the main canvas.
- *
+ *
* Doing this gives you the ability to modify the texture before this happens,
* allowing for special effects such as Camera specific shaders, or post-processing
* on the texture.
- *
+ *
* If running under Canvas the Camera will render to its `canvas` property.
- *
+ *
* If running under WebGL the Camera will create a frame buffer, which is stored in its `framebuffer` and `glTexture` properties.
- *
+ *
* If you set a camera to render to a texture then it will emit 2 events during the render loop:
- *
+ *
* First, it will emit the event `prerender`. This happens right before any Game Object's are drawn to the Camera texture.
- *
+ *
* Then, it will emit the event `postrender`. This happens after all Game Object's have been drawn, but right before the
* Camera texture is rendered to the main game canvas. It's the final point at which you can manipulate the texture before
* it appears in-game.
- *
+ *
* You should not enable this unless you plan on actually using the texture it creates
* somehow, otherwise you're just doubling the work required to render your game.
- *
+ *
* To temporarily disable rendering to a texture, toggle the `renderToTexture` boolean.
- *
+ *
* If you no longer require the Camera to render to a texture, call the `clearRenderToTexture` method,
* which will delete the respective textures and free-up resources.
*
@@ -51290,9 +52312,9 @@ var Camera = new Class({
/**
* Sets the WebGL pipeline this Camera is using when rendering to a texture.
- *
+ *
* You can pass either the string-based name of the pipeline, or a reference to the pipeline itself.
- *
+ *
* Call this method with no arguments to clear any previously set pipeline.
*
* @method Phaser.Cameras.Scene2D.Camera#setPipeline
@@ -51324,7 +52346,7 @@ var Camera = new Class({
/**
* If this Camera was set to render to a texture, this will clear the resources it was using and
* redirect it to render back to the primary Canvas again.
- *
+ *
* If you only wish to temporarily disable rendering to a texture then you can toggle the
* property `renderToTexture` instead.
*
@@ -51342,6 +52364,11 @@ var Camera = new Class({
var renderer = this.scene.sys.game.renderer;
+ if (!renderer)
+ {
+ return;
+ }
+
if (renderer.gl)
{
if (this.framebuffer)
@@ -51561,7 +52588,7 @@ var Camera = new Class({
* @since 3.0.0
*
* @param {integer} [duration=100] - The duration of the effect in milliseconds.
- * @param {number} [intensity=0.05] - The intensity of the shake.
+ * @param {(number|Phaser.Math.Vector2)} [intensity=0.05] - The intensity of the shake.
* @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running.
* @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.
* It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
@@ -51834,7 +52861,7 @@ var Camera = new Class({
this.scrollX = fx - originX;
this.scrollY = fy - originY;
-
+
if (this.useBounds)
{
this.scrollX = this.clampX(this.scrollX);
@@ -51929,7 +52956,7 @@ module.exports = Camera;
/***/ }),
-/* 269 */
+/* 272 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -51982,7 +53009,7 @@ module.exports = HexStringToColor;
/***/ }),
-/* 270 */
+/* 273 */
/***/ (function(module, exports) {
/**
@@ -52013,7 +53040,7 @@ module.exports = GetColor32;
/***/ }),
-/* 271 */
+/* 274 */
/***/ (function(module, exports) {
/**
@@ -52093,7 +53120,7 @@ module.exports = RGBToHSV;
/***/ }),
-/* 272 */
+/* 275 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -52103,7 +53130,7 @@ module.exports = RGBToHSV;
*/
var Color = __webpack_require__(33);
-var IntegerToRGB = __webpack_require__(273);
+var IntegerToRGB = __webpack_require__(276);
/**
* Converts the given color value into an instance of a Color object.
@@ -52126,7 +53153,7 @@ module.exports = IntegerToColor;
/***/ }),
-/* 273 */
+/* 276 */
/***/ (function(module, exports) {
/**
@@ -52174,7 +53201,7 @@ module.exports = IntegerToRGB;
/***/ }),
-/* 274 */
+/* 277 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -52204,7 +53231,7 @@ module.exports = ObjectToColor;
/***/ }),
-/* 275 */
+/* 278 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -52250,7 +53277,7 @@ module.exports = RGBStringToColor;
/***/ }),
-/* 276 */
+/* 279 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -52265,80 +53292,11 @@ module.exports = RGBStringToColor;
module.exports = {
- Fade: __webpack_require__(617),
- Flash: __webpack_require__(618),
- Pan: __webpack_require__(619),
- Shake: __webpack_require__(652),
- Zoom: __webpack_require__(653)
-
-};
-
-
-/***/ }),
-/* 277 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * @namespace Phaser.Math.Easing.Back
- */
-
-module.exports = {
-
- In: __webpack_require__(620),
- Out: __webpack_require__(621),
- InOut: __webpack_require__(622)
-
-};
-
-
-/***/ }),
-/* 278 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * @namespace Phaser.Math.Easing.Bounce
- */
-
-module.exports = {
-
- In: __webpack_require__(623),
- Out: __webpack_require__(624),
- InOut: __webpack_require__(625)
-
-};
-
-
-/***/ }),
-/* 279 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * @namespace Phaser.Math.Easing.Circular
- */
-
-module.exports = {
-
- In: __webpack_require__(626),
- Out: __webpack_require__(627),
- InOut: __webpack_require__(628)
+ Fade: __webpack_require__(621),
+ Flash: __webpack_require__(622),
+ Pan: __webpack_require__(623),
+ Shake: __webpack_require__(656),
+ Zoom: __webpack_require__(657)
};
@@ -52354,14 +53312,14 @@ module.exports = {
*/
/**
- * @namespace Phaser.Math.Easing.Cubic
+ * @namespace Phaser.Math.Easing.Back
*/
module.exports = {
- In: __webpack_require__(629),
- Out: __webpack_require__(630),
- InOut: __webpack_require__(631)
+ In: __webpack_require__(624),
+ Out: __webpack_require__(625),
+ InOut: __webpack_require__(626)
};
@@ -52377,14 +53335,14 @@ module.exports = {
*/
/**
- * @namespace Phaser.Math.Easing.Elastic
+ * @namespace Phaser.Math.Easing.Bounce
*/
module.exports = {
- In: __webpack_require__(632),
- Out: __webpack_require__(633),
- InOut: __webpack_require__(634)
+ In: __webpack_require__(627),
+ Out: __webpack_require__(628),
+ InOut: __webpack_require__(629)
};
@@ -52400,14 +53358,14 @@ module.exports = {
*/
/**
- * @namespace Phaser.Math.Easing.Expo
+ * @namespace Phaser.Math.Easing.Circular
*/
module.exports = {
- In: __webpack_require__(635),
- Out: __webpack_require__(636),
- InOut: __webpack_require__(637)
+ In: __webpack_require__(630),
+ Out: __webpack_require__(631),
+ InOut: __webpack_require__(632)
};
@@ -52423,10 +53381,16 @@ module.exports = {
*/
/**
- * @namespace Phaser.Math.Easing.Linear
+ * @namespace Phaser.Math.Easing.Cubic
*/
-module.exports = __webpack_require__(638);
+module.exports = {
+
+ In: __webpack_require__(633),
+ Out: __webpack_require__(634),
+ InOut: __webpack_require__(635)
+
+};
/***/ }),
@@ -52440,14 +53404,14 @@ module.exports = __webpack_require__(638);
*/
/**
- * @namespace Phaser.Math.Easing.Quadratic
+ * @namespace Phaser.Math.Easing.Elastic
*/
module.exports = {
- In: __webpack_require__(639),
- Out: __webpack_require__(640),
- InOut: __webpack_require__(641)
+ In: __webpack_require__(636),
+ Out: __webpack_require__(637),
+ InOut: __webpack_require__(638)
};
@@ -52463,14 +53427,14 @@ module.exports = {
*/
/**
- * @namespace Phaser.Math.Easing.Quartic
+ * @namespace Phaser.Math.Easing.Expo
*/
module.exports = {
- In: __webpack_require__(642),
- Out: __webpack_require__(643),
- InOut: __webpack_require__(644)
+ In: __webpack_require__(639),
+ Out: __webpack_require__(640),
+ InOut: __webpack_require__(641)
};
@@ -52486,16 +53450,10 @@ module.exports = {
*/
/**
- * @namespace Phaser.Math.Easing.Quintic
+ * @namespace Phaser.Math.Easing.Linear
*/
-module.exports = {
-
- In: __webpack_require__(645),
- Out: __webpack_require__(646),
- InOut: __webpack_require__(647)
-
-};
+module.exports = __webpack_require__(642);
/***/ }),
@@ -52509,14 +53467,14 @@ module.exports = {
*/
/**
- * @namespace Phaser.Math.Easing.Sine
+ * @namespace Phaser.Math.Easing.Quadratic
*/
module.exports = {
- In: __webpack_require__(648),
- Out: __webpack_require__(649),
- InOut: __webpack_require__(650)
+ In: __webpack_require__(643),
+ Out: __webpack_require__(644),
+ InOut: __webpack_require__(645)
};
@@ -52532,16 +53490,85 @@ module.exports = {
*/
/**
- * @namespace Phaser.Math.Easing.Stepped
+ * @namespace Phaser.Math.Easing.Quartic
*/
-module.exports = __webpack_require__(651);
+module.exports = {
+
+ In: __webpack_require__(646),
+ Out: __webpack_require__(647),
+ InOut: __webpack_require__(648)
+
+};
/***/ }),
/* 289 */
/***/ (function(module, exports, __webpack_require__) {
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * @namespace Phaser.Math.Easing.Quintic
+ */
+
+module.exports = {
+
+ In: __webpack_require__(649),
+ Out: __webpack_require__(650),
+ InOut: __webpack_require__(651)
+
+};
+
+
+/***/ }),
+/* 290 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * @namespace Phaser.Math.Easing.Sine
+ */
+
+module.exports = {
+
+ In: __webpack_require__(652),
+ Out: __webpack_require__(653),
+ InOut: __webpack_require__(654)
+
+};
+
+
+/***/ }),
+/* 291 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * @namespace Phaser.Math.Easing.Stepped
+ */
+
+module.exports = __webpack_require__(655);
+
+
+/***/ }),
+/* 292 */
+/***/ (function(module, exports, __webpack_require__) {
+
/**
* @author Richard Davey
* @copyright 2019 Photon Storm Ltd.
@@ -52549,15 +53576,15 @@ module.exports = __webpack_require__(651);
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(26);
-var Device = __webpack_require__(290);
+var CONST = __webpack_require__(31);
+var Device = __webpack_require__(293);
var GetFastValue = __webpack_require__(2);
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
var IsPlainObject = __webpack_require__(7);
-var PhaserMath = __webpack_require__(165);
+var PhaserMath = __webpack_require__(166);
var NOOP = __webpack_require__(1);
-var DefaultPlugins = __webpack_require__(171);
-var ValueToColor = __webpack_require__(159);
+var DefaultPlugins = __webpack_require__(172);
+var ValueToColor = __webpack_require__(160);
/**
* @classdesc
@@ -53105,7 +54132,7 @@ module.exports = Config;
/***/ }),
-/* 290 */
+/* 293 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -53139,20 +54166,20 @@ module.exports = Config;
module.exports = {
- os: __webpack_require__(115),
- browser: __webpack_require__(116),
- features: __webpack_require__(164),
- input: __webpack_require__(682),
- audio: __webpack_require__(683),
- video: __webpack_require__(684),
- fullscreen: __webpack_require__(685),
- canvasFeatures: __webpack_require__(291)
+ os: __webpack_require__(116),
+ browser: __webpack_require__(117),
+ features: __webpack_require__(165),
+ input: __webpack_require__(686),
+ audio: __webpack_require__(687),
+ video: __webpack_require__(688),
+ fullscreen: __webpack_require__(689),
+ canvasFeatures: __webpack_require__(294)
};
/***/ }),
-/* 291 */
+/* 294 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -53161,7 +54188,7 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CanvasPool = __webpack_require__(24);
+var CanvasPool = __webpack_require__(25);
/**
* Determines the canvas features of the browser running this Phaser Game instance.
@@ -53266,7 +54293,7 @@ module.exports = init();
/***/ }),
-/* 292 */
+/* 295 */
/***/ (function(module, exports) {
/**
@@ -53297,7 +54324,7 @@ module.exports = Between;
/***/ }),
-/* 293 */
+/* 296 */
/***/ (function(module, exports) {
/**
@@ -53334,7 +54361,7 @@ module.exports = Normalize;
/***/ }),
-/* 294 */
+/* 297 */
/***/ (function(module, exports) {
/**
@@ -53368,7 +54395,7 @@ module.exports = DistanceSquared;
/***/ }),
-/* 295 */
+/* 298 */
/***/ (function(module, exports) {
/**
@@ -53402,7 +54429,7 @@ module.exports = GreaterThan;
/***/ }),
-/* 296 */
+/* 299 */
/***/ (function(module, exports) {
/**
@@ -53436,7 +54463,7 @@ module.exports = LessThan;
/***/ }),
-/* 297 */
+/* 300 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -53445,7 +54472,7 @@ module.exports = LessThan;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Factorial = __webpack_require__(298);
+var Factorial = __webpack_require__(301);
/**
* [description]
@@ -53467,7 +54494,7 @@ module.exports = Bernstein;
/***/ }),
-/* 298 */
+/* 301 */
/***/ (function(module, exports) {
/**
@@ -53507,7 +54534,7 @@ module.exports = Factorial;
/***/ }),
-/* 299 */
+/* 302 */
/***/ (function(module, exports) {
/**
@@ -53577,7 +54604,7 @@ module.exports = CubicBezierInterpolation;
/***/ }),
-/* 300 */
+/* 303 */
/***/ (function(module, exports) {
/**
@@ -53636,7 +54663,7 @@ module.exports = QuadraticBezierInterpolation;
/***/ }),
-/* 301 */
+/* 304 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -53645,7 +54672,7 @@ module.exports = QuadraticBezierInterpolation;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SmoothStep = __webpack_require__(156);
+var SmoothStep = __webpack_require__(157);
/**
* A Smooth Step interpolation method.
@@ -53669,7 +54696,7 @@ module.exports = SmoothStepInterpolation;
/***/ }),
-/* 302 */
+/* 305 */
/***/ (function(module, exports) {
/**
@@ -53699,7 +54726,7 @@ module.exports = GetPowerOfTwo;
/***/ }),
-/* 303 */
+/* 306 */
/***/ (function(module, exports) {
/**
@@ -53743,7 +54770,7 @@ module.exports = SnapCeil;
/***/ }),
-/* 304 */
+/* 307 */
/***/ (function(module, exports) {
/**
@@ -53772,7 +54799,7 @@ module.exports = FloatBetween;
/***/ }),
-/* 305 */
+/* 308 */
/***/ (function(module, exports) {
/**
@@ -53807,7 +54834,7 @@ module.exports = Rotate;
/***/ }),
-/* 306 */
+/* 309 */
/***/ (function(module, exports) {
/**
@@ -53836,7 +54863,7 @@ module.exports = RoundAwayFromZero;
/***/ }),
-/* 307 */
+/* 310 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -53845,7 +54872,7 @@ module.exports = RoundAwayFromZero;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Vector2 = __webpack_require__(4);
+var Vector2 = __webpack_require__(3);
/**
* Takes the `x` and `y` coordinates and transforms them into the same space as
@@ -53891,7 +54918,7 @@ module.exports = TransformXY;
/***/ }),
-/* 308 */
+/* 311 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -54436,7 +55463,7 @@ module.exports = Vector4;
/***/ }),
-/* 309 */
+/* 312 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -55029,7 +56056,7 @@ module.exports = Matrix3;
/***/ }),
-/* 310 */
+/* 313 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -56491,7 +57518,7 @@ module.exports = Matrix4;
/***/ }),
-/* 311 */
+/* 314 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -56504,8 +57531,8 @@ module.exports = Matrix4;
// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl
var Class = __webpack_require__(0);
-var Vector3 = __webpack_require__(170);
-var Matrix3 = __webpack_require__(309);
+var Vector3 = __webpack_require__(171);
+var Matrix3 = __webpack_require__(312);
var EPSILON = 0.000001;
@@ -57263,7 +58290,7 @@ module.exports = Quaternion;
/***/ }),
-/* 312 */
+/* 315 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -57272,10 +58299,10 @@ module.exports = Quaternion;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CanvasInterpolation = __webpack_require__(313);
-var CanvasPool = __webpack_require__(24);
-var CONST = __webpack_require__(26);
-var Features = __webpack_require__(164);
+var CanvasInterpolation = __webpack_require__(316);
+var CanvasPool = __webpack_require__(25);
+var CONST = __webpack_require__(31);
+var Features = __webpack_require__(165);
/**
* Called automatically by Phaser.Game and responsible for creating the renderer it will use.
@@ -57365,8 +58392,8 @@ var CreateRenderer = function (game)
if (true)
{
- CanvasRenderer = __webpack_require__(480);
- WebGLRenderer = __webpack_require__(483);
+ CanvasRenderer = __webpack_require__(482);
+ WebGLRenderer = __webpack_require__(485);
// Let the config pick the renderer type, as both are included
if (config.renderType === CONST.WEBGL)
@@ -57391,7 +58418,7 @@ module.exports = CreateRenderer;
/***/ }),
-/* 313 */
+/* 316 */
/***/ (function(module, exports) {
/**
@@ -57454,7 +58481,7 @@ module.exports = CanvasInterpolation;
/***/ }),
-/* 314 */
+/* 317 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -57463,7 +58490,7 @@ module.exports = CanvasInterpolation;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(26);
+var CONST = __webpack_require__(31);
/**
* Called automatically by Phaser.Game and responsible for creating the console.log debug header.
@@ -57584,7 +58611,7 @@ module.exports = DebugHeader;
/***/ }),
-/* 315 */
+/* 318 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -57594,9 +58621,9 @@ module.exports = DebugHeader;
*/
var Class = __webpack_require__(0);
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
var NOOP = __webpack_require__(1);
-var RequestAnimationFrame = __webpack_require__(316);
+var RequestAnimationFrame = __webpack_require__(319);
// Frame Rate config
// fps: {
@@ -58291,7 +59318,7 @@ module.exports = TimeStep;
/***/ }),
-/* 316 */
+/* 319 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -58491,7 +59518,7 @@ module.exports = RequestAnimationFrame;
/***/ }),
-/* 317 */
+/* 320 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -58500,7 +59527,7 @@ module.exports = RequestAnimationFrame;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Events = __webpack_require__(28);
+var Events = __webpack_require__(18);
/**
* The Visibility Handler is responsible for listening out for document level visibility change events.
@@ -58582,7 +59609,7 @@ module.exports = VisibilityHandler;
/***/ }),
-/* 318 */
+/* 321 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -58591,9 +59618,9 @@ module.exports = VisibilityHandler;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Arne16 = __webpack_require__(319);
-var CanvasPool = __webpack_require__(24);
-var GetValue = __webpack_require__(6);
+var Arne16 = __webpack_require__(322);
+var CanvasPool = __webpack_require__(25);
+var GetValue = __webpack_require__(5);
/**
* [description]
@@ -58676,7 +59703,7 @@ module.exports = GenerateTexture;
/***/ }),
-/* 319 */
+/* 322 */
/***/ (function(module, exports) {
/**
@@ -58714,7 +59741,7 @@ module.exports = {
/***/ }),
-/* 320 */
+/* 323 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -58726,9 +59753,9 @@ module.exports = {
// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)
var Class = __webpack_require__(0);
-var CubicBezier = __webpack_require__(299);
-var Curve = __webpack_require__(79);
-var Vector2 = __webpack_require__(4);
+var CubicBezier = __webpack_require__(302);
+var Curve = __webpack_require__(80);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -58941,7 +59968,7 @@ module.exports = CubicBezierCurve;
/***/ }),
-/* 321 */
+/* 324 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -58953,11 +59980,11 @@ module.exports = CubicBezierCurve;
// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)
var Class = __webpack_require__(0);
-var Curve = __webpack_require__(79);
+var Curve = __webpack_require__(80);
var DegToRad = __webpack_require__(35);
-var GetValue = __webpack_require__(6);
-var RadToDeg = __webpack_require__(169);
-var Vector2 = __webpack_require__(4);
+var GetValue = __webpack_require__(5);
+var RadToDeg = __webpack_require__(170);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -58977,7 +60004,7 @@ var Vector2 = __webpack_require__(4);
* @param {number} [yRadius=0] - The vertical radius of ellipse.
* @param {integer} [startAngle=0] - The start angle of the ellipse, in degrees.
* @param {integer} [endAngle=360] - The end angle of the ellipse, in degrees.
- * @param {boolean} [clockwise=false] - Sets if the the ellipse rotation is clockwise (true) or anti-clockwise (false)
+ * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`).
* @param {integer} [rotation=0] - The rotation of the ellipse, in degrees.
*/
var EllipseCurve = new Class({
@@ -59565,7 +60592,7 @@ module.exports = EllipseCurve;
/***/ }),
-/* 322 */
+/* 325 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -59577,10 +60604,10 @@ module.exports = EllipseCurve;
// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)
var Class = __webpack_require__(0);
-var Curve = __webpack_require__(79);
-var FromPoints = __webpack_require__(172);
-var Rectangle = __webpack_require__(10);
-var Vector2 = __webpack_require__(4);
+var Curve = __webpack_require__(80);
+var FromPoints = __webpack_require__(173);
+var Rectangle = __webpack_require__(11);
+var Vector2 = __webpack_require__(3);
var tmpVec2 = new Vector2();
@@ -59822,7 +60849,7 @@ module.exports = LineCurve;
/***/ }),
-/* 323 */
+/* 326 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -59832,9 +60859,9 @@ module.exports = LineCurve;
*/
var Class = __webpack_require__(0);
-var Curve = __webpack_require__(79);
-var QuadraticBezierInterpolation = __webpack_require__(300);
-var Vector2 = __webpack_require__(4);
+var Curve = __webpack_require__(80);
+var QuadraticBezierInterpolation = __webpack_require__(303);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -60036,7 +61063,7 @@ module.exports = QuadraticBezier;
/***/ }),
-/* 324 */
+/* 327 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -60047,10 +61074,10 @@ module.exports = QuadraticBezier;
// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)
-var CatmullRom = __webpack_require__(167);
+var CatmullRom = __webpack_require__(168);
var Class = __webpack_require__(0);
-var Curve = __webpack_require__(79);
-var Vector2 = __webpack_require__(4);
+var Curve = __webpack_require__(80);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -60261,7 +61288,7 @@ module.exports = SplineCurve;
/***/ }),
-/* 325 */
+/* 328 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -60385,7 +61412,7 @@ module.exports = BaseShader;
/***/ }),
-/* 326 */
+/* 329 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -60396,30 +61423,30 @@ module.exports = BaseShader;
var Color = __webpack_require__(33);
-Color.ColorToRGBA = __webpack_require__(770);
-Color.ComponentToHex = __webpack_require__(327);
-Color.GetColor = __webpack_require__(160);
-Color.GetColor32 = __webpack_require__(270);
-Color.HexStringToColor = __webpack_require__(269);
-Color.HSLToColor = __webpack_require__(771);
-Color.HSVColorWheel = __webpack_require__(772);
-Color.HSVToRGB = __webpack_require__(161);
-Color.HueToComponent = __webpack_require__(328);
-Color.IntegerToColor = __webpack_require__(272);
-Color.IntegerToRGB = __webpack_require__(273);
-Color.Interpolate = __webpack_require__(773);
-Color.ObjectToColor = __webpack_require__(274);
-Color.RandomRGB = __webpack_require__(774);
-Color.RGBStringToColor = __webpack_require__(275);
-Color.RGBToHSV = __webpack_require__(271);
-Color.RGBToString = __webpack_require__(775);
-Color.ValueToColor = __webpack_require__(159);
+Color.ColorToRGBA = __webpack_require__(775);
+Color.ComponentToHex = __webpack_require__(330);
+Color.GetColor = __webpack_require__(161);
+Color.GetColor32 = __webpack_require__(273);
+Color.HexStringToColor = __webpack_require__(272);
+Color.HSLToColor = __webpack_require__(776);
+Color.HSVColorWheel = __webpack_require__(777);
+Color.HSVToRGB = __webpack_require__(162);
+Color.HueToComponent = __webpack_require__(331);
+Color.IntegerToColor = __webpack_require__(275);
+Color.IntegerToRGB = __webpack_require__(276);
+Color.Interpolate = __webpack_require__(778);
+Color.ObjectToColor = __webpack_require__(277);
+Color.RandomRGB = __webpack_require__(779);
+Color.RGBStringToColor = __webpack_require__(278);
+Color.RGBToHSV = __webpack_require__(274);
+Color.RGBToString = __webpack_require__(780);
+Color.ValueToColor = __webpack_require__(160);
module.exports = Color;
/***/ }),
-/* 327 */
+/* 330 */
/***/ (function(module, exports) {
/**
@@ -60449,7 +61476,7 @@ module.exports = ComponentToHex;
/***/ }),
-/* 328 */
+/* 331 */
/***/ (function(module, exports) {
/**
@@ -60505,7 +61532,7 @@ module.exports = HueToComponent;
/***/ }),
-/* 329 */
+/* 332 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -60514,7 +61541,7 @@ module.exports = HueToComponent;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var OS = __webpack_require__(115);
+var OS = __webpack_require__(116);
/**
* @callback ContentLoadedCallback
@@ -60568,7 +61595,7 @@ module.exports = DOMContentLoaded;
/***/ }),
-/* 330 */
+/* 333 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -60577,7 +61604,7 @@ module.exports = DOMContentLoaded;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(173);
+var CONST = __webpack_require__(174);
/**
* Attempts to determine the screen orientation using the Orientation API.
@@ -60634,7 +61661,7 @@ module.exports = GetScreenOrientation;
/***/ }),
-/* 331 */
+/* 334 */
/***/ (function(module, exports) {
/**
@@ -60720,7 +61747,7 @@ module.exports = {
/***/ }),
-/* 332 */
+/* 335 */
/***/ (function(module, exports) {
/**
@@ -60773,7 +61800,7 @@ module.exports = {
/***/ }),
-/* 333 */
+/* 336 */
/***/ (function(module, exports) {
/**
@@ -60871,7 +61898,7 @@ module.exports = {
/***/ }),
-/* 334 */
+/* 337 */
/***/ (function(module, exports) {
/**
@@ -60945,7 +61972,7 @@ module.exports = {
/***/ }),
-/* 335 */
+/* 338 */
/***/ (function(module, exports) {
/**
@@ -60996,7 +62023,7 @@ module.exports = GetTarget;
/***/ }),
-/* 336 */
+/* 339 */
/***/ (function(module, exports) {
/**
@@ -61053,7 +62080,7 @@ module.exports = ParseXML;
/***/ }),
-/* 337 */
+/* 340 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -61063,16 +62090,16 @@ module.exports = ParseXML;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(175);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(53);
-var GameEvents = __webpack_require__(28);
-var Keyboard = __webpack_require__(338);
-var Mouse = __webpack_require__(339);
-var Pointer = __webpack_require__(340);
-var Touch = __webpack_require__(341);
+var CONST = __webpack_require__(176);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(54);
+var GameEvents = __webpack_require__(18);
+var Keyboard = __webpack_require__(341);
+var Mouse = __webpack_require__(342);
+var Pointer = __webpack_require__(343);
+var Touch = __webpack_require__(344);
var TransformMatrix = __webpack_require__(32);
-var TransformXY = __webpack_require__(307);
+var TransformXY = __webpack_require__(310);
/**
* @classdesc
@@ -61516,7 +62543,7 @@ var InputManager = new Class({
*/
resetCursor: function (interactiveObject)
{
- if (interactiveObject.cursor)
+ if (interactiveObject.cursor && this.canvas)
{
this.canvas.style.cursor = this.defaultCursor;
}
@@ -61829,6 +62856,25 @@ var InputManager = new Class({
this.updateInputPlugins(CONST.MOUSE_WHEEL, this.mousePointerContainer);
},
+ /**
+ * Processes a pointer lock change event, as passed in by the MouseManager.
+ *
+ * @method Phaser.Input.InputManager#onPointerLockChange
+ * @fires Phaser.Input.Events#POINTERLOCK_CHANGE
+ * @private
+ * @since 3.19.0
+ *
+ * @param {MouseEvent} event - The native DOM Mouse event.
+ */
+ onPointerLockChange: function (event)
+ {
+ var isLocked = this.mouse.locked;
+
+ this.mousePointer.locked = isLocked;
+
+ this.events.emit(Events.POINTERLOCK_CHANGE, event, isLocked);
+ },
+
/**
* Checks if the given Game Object should be considered as a candidate for input or not.
*
@@ -62116,7 +63162,7 @@ module.exports = InputManager;
/***/ }),
-/* 338 */
+/* 341 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -62125,11 +63171,11 @@ module.exports = InputManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ArrayRemove = __webpack_require__(120);
+var ArrayRemove = __webpack_require__(121);
var Class = __webpack_require__(0);
-var GameEvents = __webpack_require__(28);
-var InputEvents = __webpack_require__(53);
-var KeyCodes = __webpack_require__(121);
+var GameEvents = __webpack_require__(18);
+var InputEvents = __webpack_require__(54);
+var KeyCodes = __webpack_require__(122);
var NOOP = __webpack_require__(0);
/**
@@ -62566,7 +63612,7 @@ module.exports = KeyboardManager;
/***/ }),
-/* 339 */
+/* 342 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -62576,8 +63622,8 @@ module.exports = KeyboardManager;
*/
var Class = __webpack_require__(0);
-var Features = __webpack_require__(164);
-var InputEvents = __webpack_require__(53);
+var Features = __webpack_require__(165);
+var InputEvents = __webpack_require__(54);
var NOOP = __webpack_require__(0);
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent
@@ -62984,8 +64030,8 @@ var MouseManager = new Class({
var element = _this.target;
_this.locked = (document.pointerLockElement === element || document.mozPointerLockElement === element || document.webkitPointerLockElement === element) ? true : false;
-
- _this.manager.queue.push(event);
+
+ _this.manager.onPointerLockChange(event);
};
document.addEventListener('pointerlockchange', this.pointerLockChange, true);
@@ -63048,7 +64094,7 @@ module.exports = MouseManager;
/***/ }),
-/* 340 */
+/* 343 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -63057,12 +64103,12 @@ module.exports = MouseManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Angle = __webpack_require__(292);
+var Angle = __webpack_require__(295);
var Class = __webpack_require__(0);
-var Distance = __webpack_require__(57);
-var FuzzyEqual = __webpack_require__(166);
-var SmoothStepInterpolation = __webpack_require__(301);
-var Vector2 = __webpack_require__(4);
+var Distance = __webpack_require__(58);
+var FuzzyEqual = __webpack_require__(167);
+var SmoothStepInterpolation = __webpack_require__(304);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -63312,6 +64358,9 @@ var Pointer = new Class({
/**
* The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.
+ *
+ * If you wish to use this value _outside_ of an input event handler then you should update it first by calling
+ * the `Pointer.updateWorldPoint` method.
*
* @name Phaser.Input.Pointer#worldX
* @type {number}
@@ -63322,6 +64371,9 @@ var Pointer = new Class({
/**
* The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.
+ *
+ * If you wish to use this value _outside_ of an input event handler then you should update it first by calling
+ * the `Pointer.updateWorldPoint` method.
*
* @name Phaser.Input.Pointer#worldY
* @type {number}
@@ -63492,13 +64544,20 @@ var Pointer = new Class({
this.active = (id === 0) ? true : false;
/**
- * Time when this Pointer was most recently updated by a DOM Event.
+ * Is this pointer Pointer Locked?
+ *
+ * Only a mouse pointer can be locked and it only becomes locked when requested via
+ * the browsers Pointer Lock API.
+ *
+ * You can request this by calling the `this.input.mouse.requestPointerLock()` method from
+ * a `pointerdown` or `pointerup` event handler.
*
- * @name Phaser.Input.Pointer#time
- * @type {number}
- * @since 3.16.0
+ * @name Phaser.Input.Pointer#locked
+ * @readonly
+ * @type {boolean}
+ * @since 3.19.0
*/
- this.time = 0;
+ this.locked = false;
/**
* The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.
@@ -63532,6 +64591,40 @@ var Pointer = new Class({
this.deltaZ = 0;
},
+ /**
+ * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are
+ * the result of a translation through the given Camera.
+ *
+ * Note that the values will be automatically replaced the moment the Pointer is
+ * updated by an input event, such as a mouse move, so should be used immediately.
+ *
+ * @method Phaser.Input.Pointer#updateWorldPoint
+ * @since 3.19.0
+ *
+ * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.
+ *
+ * @return {this} This Pointer object.
+ */
+ updateWorldPoint: function (camera)
+ {
+ var x = this.x;
+ var y = this.y;
+
+ if (camera.resolution !== 1)
+ {
+ x += camera._x;
+ y += camera._y;
+ }
+
+ // Stores the world point inside of tempPoint
+ var temp = camera.getWorldPoint(x, y);
+
+ this.worldX = temp.x;
+ this.worldY = temp.y;
+
+ return this;
+ },
+
/**
* Takes a Camera and returns a Vector2 containing the translated position of this Pointer
* within that Camera. This can be used to convert this Pointers position into camera space.
@@ -63696,11 +64789,11 @@ var Pointer = new Class({
// Sets the local x/y properties
this.manager.transformPointer(this, event.pageX, event.pageY, true);
- if (this.manager.mouse.locked)
+ if (this.locked)
{
// Multiple DOM events may occur within one frame, but only one Phaser event will fire
- this.movementX += event.movementX || event.mozMovementX || event.webkitMovementX || 0;
- this.movementY += event.movementY || event.mozMovementY || event.webkitMovementY || 0;
+ this.movementX = event.movementX || event.mozMovementX || event.webkitMovementX || 0;
+ this.movementY = event.movementY || event.mozMovementY || event.webkitMovementY || 0;
}
this.moveTime = event.timeStamp;
@@ -63769,7 +64862,7 @@ var Pointer = new Class({
this.primaryDown = true;
this.downX = this.x;
this.downY = this.y;
- this.downTime = touch.timeStamp;
+ this.downTime = event.timeStamp;
this.isDown = true;
@@ -63796,7 +64889,7 @@ var Pointer = new Class({
// Sets the local x/y properties
this.manager.transformPointer(this, touch.pageX, touch.pageY, true);
- this.moveTime = touch.timeStamp;
+ this.moveTime = event.timeStamp;
this.wasTouch = true;
@@ -63827,7 +64920,7 @@ var Pointer = new Class({
this.primaryDown = false;
this.upX = this.x;
this.upY = this.y;
- this.upTime = touch.timeStamp;
+ this.upTime = event.timeStamp;
this.isDown = false;
@@ -63863,7 +64956,7 @@ var Pointer = new Class({
this.primaryDown = false;
this.upX = this.x;
this.upY = this.y;
- this.upTime = touch.timeStamp;
+ this.upTime = event.timeStamp;
this.isDown = false;
@@ -64107,7 +65200,7 @@ var Pointer = new Class({
{
if (this.isDown)
{
- return (this.time - this.downTime);
+ return (this.manager.time - this.downTime);
}
else
{
@@ -64252,6 +65345,25 @@ var Pointer = new Class({
this.position.y = value;
}
+ },
+
+ /**
+ * Time when this Pointer was most recently updated by a DOM Event.
+ * This comes directly from the `event.timeStamp` property.
+ * If no event has yet taken place, it will return zero.
+ *
+ * @name Phaser.Input.Pointer#time
+ * @type {number}
+ * @readonly
+ * @since 3.16.0
+ */
+ time: {
+
+ get: function ()
+ {
+ return (this.event) ? this.event.timeStamp : 0;
+ }
+
}
});
@@ -64260,7 +65372,7 @@ module.exports = Pointer;
/***/ }),
-/* 341 */
+/* 344 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -64270,7 +65382,7 @@ module.exports = Pointer;
*/
var Class = __webpack_require__(0);
-var InputEvents = __webpack_require__(53);
+var InputEvents = __webpack_require__(54);
var NOOP = __webpack_require__(1);
// https://developer.mozilla.org/en-US/docs/Web/API/Touch_events
@@ -64645,7 +65757,7 @@ module.exports = TouchManager;
/***/ }),
-/* 342 */
+/* 345 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -64655,14 +65767,14 @@ module.exports = TouchManager;
*/
var Class = __webpack_require__(0);
-var GameEvents = __webpack_require__(28);
-var EventEmitter = __webpack_require__(11);
+var GameEvents = __webpack_require__(18);
+var EventEmitter = __webpack_require__(10);
var FileTypesManager = __webpack_require__(8);
-var GameObjectCreator = __webpack_require__(15);
-var GameObjectFactory = __webpack_require__(5);
+var GameObjectCreator = __webpack_require__(16);
+var GameObjectFactory = __webpack_require__(6);
var GetFastValue = __webpack_require__(2);
-var PluginCache = __webpack_require__(18);
-var Remove = __webpack_require__(120);
+var PluginCache = __webpack_require__(19);
+var Remove = __webpack_require__(121);
/**
* @classdesc
@@ -65434,6 +66546,35 @@ var PluginManager = new Class({
return this;
},
+ /**
+ * Removes a previously registered Game Object from the global Game Object Factory and / or Creator.
+ * This is usually called from within your Plugin destruction code to help clean-up after your plugin has been removed.
+ *
+ * @method Phaser.Plugins.PluginManager#removeGameObject
+ * @since 3.19.0
+ *
+ * @param {string} key - The key of the Game Object to be removed from the factories.
+ * @param {boolean} [removeFromFactory=true] - Should the Game Object be removed from the Game Object Factory?
+ * @param {boolean} [removeFromCreator=true] - Should the Game Object be removed from the Game Object Creator?
+ */
+ removeGameObject: function (key, removeFromFactory, removeFromCreator)
+ {
+ if (removeFromFactory === undefined) { removeFromFactory = true; }
+ if (removeFromCreator === undefined) { removeFromCreator = true; }
+
+ if (removeFromFactory)
+ {
+ GameObjectFactory.remove(key);
+ }
+
+ if (removeFromCreator)
+ {
+ GameObjectCreator.remove(key);
+ }
+
+ return this;
+ },
+
/**
* Registers a new file type with the global File Types Manager, making it available to all Loader
* Plugins created after this.
@@ -65518,7 +66659,7 @@ module.exports = PluginManager;
/***/ }),
-/* 343 */
+/* 346 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -65527,19 +66668,19 @@ module.exports = PluginManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(173);
+var CONST = __webpack_require__(174);
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(89);
-var GameEvents = __webpack_require__(28);
-var GetInnerHeight = __webpack_require__(828);
-var GetTarget = __webpack_require__(335);
-var GetScreenOrientation = __webpack_require__(330);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(90);
+var GameEvents = __webpack_require__(18);
+var GetInnerHeight = __webpack_require__(833);
+var GetTarget = __webpack_require__(338);
+var GetScreenOrientation = __webpack_require__(333);
var NOOP = __webpack_require__(1);
-var Rectangle = __webpack_require__(10);
-var Size = __webpack_require__(344);
-var SnapFloor = __webpack_require__(90);
-var Vector2 = __webpack_require__(4);
+var Rectangle = __webpack_require__(11);
+var Size = __webpack_require__(347);
+var SnapFloor = __webpack_require__(91);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -65783,6 +66924,16 @@ var ScaleManager = new Class({
*/
this.zoom = 1;
+ /**
+ * Internal flag set when the game zoom factor is modified.
+ *
+ * @name Phaser.Scale.ScaleManager#_resetZoom
+ * @type {boolean}
+ * @readonly
+ * @since 3.19.0
+ */
+ this._resetZoom = false;
+
/**
* The scale factor between the baseSize and the canvasBounds.
*
@@ -66077,6 +67228,11 @@ var ScaleManager = new Class({
this.zoom = zoom;
+ if (zoom !== 1)
+ {
+ this._resetZoom = true;
+ }
+
// The modified game size, which is the w/h * resolution
this.baseSize.setSize(width * resolution, height * resolution);
@@ -66391,6 +67547,7 @@ var ScaleManager = new Class({
setZoom: function (value)
{
this.zoom = value;
+ this._resetZoom = true;
return this.refresh();
},
@@ -66407,6 +67564,7 @@ var ScaleManager = new Class({
setMaxZoom: function ()
{
this.zoom = this.getMaxZoom();
+ this._resetZoom = true;
return this.refresh();
},
@@ -66519,10 +67677,12 @@ var ScaleManager = new Class({
styleHeight = Math.floor(styleHeight);
}
- if (zoom > 1)
+ if (this._resetZoom)
{
style.width = styleWidth + 'px';
style.height = styleHeight + 'px';
+
+ this._resetZoom = false;
}
}
else if (this.scaleMode === CONST.SCALE_MODE.RESIZE)
@@ -66749,14 +67909,14 @@ var ScaleManager = new Class({
if (fullscreen.keyboard)
{
fsTarget[fullscreen.request](Element.ALLOW_KEYBOARD_INPUT)
- .then(this.fullscreenSuccessHandler)
- .catch(this.fullscreenErrorHandler);
+ .then(this.fullscreenSuccessHandler.bind(this))
+ .catch(this.fullscreenErrorHandler.bind(this));
}
else
{
fsTarget[fullscreen.request](fullscreenOptions)
- .then(this.fullscreenSuccessHandler)
- .catch(this.fullscreenErrorHandler);
+ .then(this.fullscreenSuccessHandler.bind(this))
+ .catch(this.fullscreenErrorHandler.bind(this));
}
}
else
@@ -67100,11 +68260,12 @@ var ScaleManager = new Class({
this.canvas = null;
this.canvasBounds = null;
this.parent = null;
+ this.fullscreenTarget = null;
+
this.parentSize.destroy();
this.gameSize.destroy();
this.baseSize.destroy();
this.displaySize.destroy();
- this.fullscreenTarget = null;
},
/**
@@ -67242,7 +68403,7 @@ module.exports = ScaleManager;
/***/ }),
-/* 344 */
+/* 347 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -67251,10 +68412,10 @@ module.exports = ScaleManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
-var SnapFloor = __webpack_require__(90);
-var Vector2 = __webpack_require__(4);
+var SnapFloor = __webpack_require__(91);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -68022,7 +69183,7 @@ module.exports = Size;
/***/ }),
-/* 345 */
+/* 348 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -68032,14 +69193,14 @@ module.exports = Size;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(122);
-var Events = __webpack_require__(19);
-var GameEvents = __webpack_require__(28);
-var GetValue = __webpack_require__(6);
-var LoaderEvents = __webpack_require__(80);
+var CONST = __webpack_require__(123);
+var Events = __webpack_require__(20);
+var GameEvents = __webpack_require__(18);
+var GetValue = __webpack_require__(5);
+var LoaderEvents = __webpack_require__(81);
var NOOP = __webpack_require__(1);
-var Scene = __webpack_require__(346);
-var Systems = __webpack_require__(176);
+var Scene = __webpack_require__(349);
+var Systems = __webpack_require__(177);
/**
* @classdesc
@@ -69656,7 +70817,7 @@ module.exports = SceneManager;
/***/ }),
-/* 346 */
+/* 349 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -69666,12 +70827,14 @@ module.exports = SceneManager;
*/
var Class = __webpack_require__(0);
-var Systems = __webpack_require__(176);
+var Systems = __webpack_require__(177);
/**
* @classdesc
* A base Phaser.Scene class which can be extended for your own use.
*
+ * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}.
+ *
* @class Scene
* @memberof Phaser
* @constructor
@@ -69944,80 +71107,13 @@ var Scene = new Class({
{
}
- /**
- * Can be defined on your own Scenes.
- * This method is called by the Scene Manager when the scene starts, before `preload()` and `create()`.
- *
- * @method Phaser.Scene#init
- * @since 3.0.0
- *
- * @param {object} data - Any data passed via `ScenePlugin.add()` or `ScenePlugin.start()`. Same as Scene.settings.data.
- */
-
- /**
- * Can be defined on your own Scenes. Use it to load assets.
- * This method is called by the Scene Manager, after `init()` and before `create()`, only if the Scene has a LoaderPlugin.
- * After this method completes, if the LoaderPlugin's queue isn't empty, the LoaderPlugin will start automatically.
- *
- * @method Phaser.Scene#preload
- * @since 3.0.0
- */
-
- /**
- * Can be defined on your own Scenes. Use it to create your game objects.
- * This method is called by the Scene Manager when the scene starts, after `init()` and `preload()`.
- * If the LoaderPlugin started after `preload()`, then this method is called only after loading is complete.
- *
- * @method Phaser.Scene#create
- * @since 3.0.0
- *
- * @param {object} data - Any data passed via `ScenePlugin.add()` or `ScenePlugin.start()`. Same as Scene.settings.data.
- */
-
});
module.exports = Scene;
/***/ }),
-/* 347 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * Capitalizes the first letter of a string if there is one.
- * @example
- * UppercaseFirst('abc');
- * // returns 'Abc'
- * @example
- * UppercaseFirst('the happy family');
- * // returns 'The happy family'
- * @example
- * UppercaseFirst('');
- * // returns ''
- *
- * @function Phaser.Utils.String.UppercaseFirst
- * @since 3.0.0
- *
- * @param {string} str - The string to capitalize.
- *
- * @return {string} A new string, same as the first, but with the first letter capitalized.
- */
-var UppercaseFirst = function (str)
-{
- return str && str[0].toUpperCase() + str.slice(1);
-};
-
-module.exports = UppercaseFirst;
-
-
-/***/ }),
-/* 348 */
+/* 350 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -70026,10 +71122,10 @@ module.exports = UppercaseFirst;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(122);
-var GetValue = __webpack_require__(6);
-var Merge = __webpack_require__(85);
-var InjectionMap = __webpack_require__(841);
+var CONST = __webpack_require__(123);
+var GetValue = __webpack_require__(5);
+var Merge = __webpack_require__(105);
+var InjectionMap = __webpack_require__(846);
/**
* @namespace Phaser.Scenes.Settings
@@ -70113,7 +71209,7 @@ module.exports = Settings;
/***/ }),
-/* 349 */
+/* 351 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -70122,18 +71218,18 @@ module.exports = Settings;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CanvasPool = __webpack_require__(24);
-var CanvasTexture = __webpack_require__(842);
+var CanvasPool = __webpack_require__(25);
+var CanvasTexture = __webpack_require__(352);
var Class = __webpack_require__(0);
var Color = __webpack_require__(33);
-var CONST = __webpack_require__(26);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(118);
-var GameEvents = __webpack_require__(28);
-var GenerateTexture = __webpack_require__(318);
-var GetValue = __webpack_require__(6);
-var Parser = __webpack_require__(351);
-var Texture = __webpack_require__(177);
+var CONST = __webpack_require__(31);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(119);
+var GameEvents = __webpack_require__(18);
+var GenerateTexture = __webpack_require__(321);
+var GetValue = __webpack_require__(5);
+var Parser = __webpack_require__(354);
+var Texture = __webpack_require__(179);
/**
* @callback EachTextureCallback
@@ -70407,6 +71503,10 @@ var TextureManager = new Class({
* Gets an existing texture frame and converts it into a base64 encoded image and returns the base64 data.
*
* You can also provide the image type and encoder options.
+ *
+ * This will only work with bitmap based texture frames, such as those created from Texture Atlases.
+ * It will not work with GL Texture objects, such as Shaders, or Render Textures. For those please
+ * see the WebGL Snapshot function instead.
*
* @method Phaser.Textures.TextureManager#getBase64
* @since 3.12.0
@@ -70427,7 +71527,11 @@ var TextureManager = new Class({
var textureFrame = this.getFrame(key, frame);
- if (textureFrame)
+ if (textureFrame && (textureFrame.source.isRenderTexture || textureFrame.source.isGLTexture))
+ {
+ console.warn('Cannot getBase64 from WebGL Texture');
+ }
+ else if (textureFrame)
{
var cd = textureFrame.canvasData;
@@ -70488,6 +71592,38 @@ var TextureManager = new Class({
return texture;
},
+ /**
+ * Takes a WebGL Texture and creates a Phaser Texture from it, which is added to the Texture Manager using the given key.
+ *
+ * This allows you to then use the Texture as a normal texture for texture based Game Objects like Sprites.
+ *
+ * This is a WebGL only feature.
+ *
+ * @method Phaser.Textures.TextureManager#addGLTexture
+ * @fires Phaser.Textures.Events#ADD
+ * @since 3.19.0
+ *
+ * @param {string} key - The unique string-based key of the Texture.
+ * @param {WebGLTexture} glTexture - The source Render Texture.
+ *
+ * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.
+ */
+ addGLTexture: function (key, glTexture, width, height)
+ {
+ var texture = null;
+
+ if (this.checkKey(key))
+ {
+ texture = this.create(key, glTexture, width, height);
+
+ texture.add('__BASE', 0, 0, 0, width, height);
+
+ this.emit(Events.ADD, key, texture);
+ }
+
+ return texture;
+ },
+
/**
* Adds a Render Texture to the Texture Manager using the given key.
* This allows you to then use the Render Texture as a normal texture for texture based Game Objects like Sprites.
@@ -71235,7 +72371,7 @@ module.exports = TextureManager;
/***/ }),
-/* 350 */
+/* 352 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -71244,9 +72380,640 @@ module.exports = TextureManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CanvasPool = __webpack_require__(24);
var Class = __webpack_require__(0);
-var IsSizePowerOfTwo = __webpack_require__(117);
+var Clamp = __webpack_require__(24);
+var Color = __webpack_require__(33);
+var CONST = __webpack_require__(31);
+var IsSizePowerOfTwo = __webpack_require__(118);
+var Texture = __webpack_require__(179);
+
+/**
+ * @classdesc
+ * A Canvas Texture is a special kind of Texture that is backed by an HTML Canvas Element as its source.
+ *
+ * You can use the properties of this texture to draw to the canvas element directly, using all of the standard
+ * canvas operations available in the browser. Any Game Object can be given this texture and will render with it.
+ *
+ * Note: When running under WebGL the Canvas Texture needs to re-generate its base WebGLTexture and reupload it to
+ * the GPU every time you modify it, otherwise the changes you make to this texture will not be visible. To do this
+ * you should call `CanvasTexture.refresh()` once you are finished with your changes to the canvas. Try and keep
+ * this to a minimum, especially on large canvas sizes, or you may inadvertently thrash the GPU by constantly uploading
+ * texture data to it. This restriction does not apply if using the Canvas Renderer.
+ *
+ * It starts with only one frame that covers the whole of the canvas. You can add further frames, that specify
+ * sections of the canvas using the `add` method.
+ *
+ * Should you need to resize the canvas use the `setSize` method so that it accurately updates all of the underlying
+ * texture data as well. Forgetting to do this (i.e. by changing the canvas size directly from your code) could cause
+ * graphical errors.
+ *
+ * @class CanvasTexture
+ * @extends Phaser.Textures.Texture
+ * @memberof Phaser.Textures
+ * @constructor
+ * @since 3.7.0
+ *
+ * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to.
+ * @param {string} key - The unique string-based key of this Texture.
+ * @param {HTMLCanvasElement} source - The canvas element that is used as the base of this texture.
+ * @param {integer} width - The width of the canvas.
+ * @param {integer} height - The height of the canvas.
+ */
+var CanvasTexture = new Class({
+
+ Extends: Texture,
+
+ initialize:
+
+ function CanvasTexture (manager, key, source, width, height)
+ {
+ Texture.call(this, manager, key, source, width, height);
+
+ this.add('__BASE', 0, 0, 0, width, height);
+
+ /**
+ * A reference to the Texture Source of this Canvas.
+ *
+ * @name Phaser.Textures.CanvasTexture#_source
+ * @type {Phaser.Textures.TextureSource}
+ * @private
+ * @since 3.7.0
+ */
+ this._source = this.frames['__BASE'].source;
+
+ /**
+ * The source Canvas Element.
+ *
+ * @name Phaser.Textures.CanvasTexture#canvas
+ * @readonly
+ * @type {HTMLCanvasElement}
+ * @since 3.7.0
+ */
+ this.canvas = this._source.image;
+
+ /**
+ * The 2D Canvas Rendering Context.
+ *
+ * @name Phaser.Textures.CanvasTexture#context
+ * @readonly
+ * @type {CanvasRenderingContext2D}
+ * @since 3.7.0
+ */
+ this.context = this.canvas.getContext('2d');
+
+ /**
+ * The width of the Canvas.
+ * This property is read-only, if you wish to change it use the `setSize` method.
+ *
+ * @name Phaser.Textures.CanvasTexture#width
+ * @readonly
+ * @type {integer}
+ * @since 3.7.0
+ */
+ this.width = width;
+
+ /**
+ * The height of the Canvas.
+ * This property is read-only, if you wish to change it use the `setSize` method.
+ *
+ * @name Phaser.Textures.CanvasTexture#height
+ * @readonly
+ * @type {integer}
+ * @since 3.7.0
+ */
+ this.height = height;
+
+ /**
+ * The context image data.
+ * Use the `update` method to populate this when the canvas changes.
+ *
+ * @name Phaser.Textures.CanvasTexture#imageData
+ * @type {ImageData}
+ * @since 3.13.0
+ */
+ this.imageData = this.context.getImageData(0, 0, width, height);
+
+ /**
+ * A Uint8ClampedArray view into the `buffer`.
+ * Use the `update` method to populate this when the canvas changes.
+ * Note that this is unavailable in some browsers, such as Epic Browser, due to their security restrictions.
+ *
+ * @name Phaser.Textures.CanvasTexture#data
+ * @type {Uint8ClampedArray}
+ * @since 3.13.0
+ */
+ this.data = null;
+
+ if (this.imageData)
+ {
+ this.data = this.imageData.data;
+ }
+
+ /**
+ * An Uint32Array view into the `buffer`.
+ *
+ * @name Phaser.Textures.CanvasTexture#pixels
+ * @type {Uint32Array}
+ * @since 3.13.0
+ */
+ this.pixels = null;
+
+ /**
+ * An ArrayBuffer the same size as the context ImageData.
+ *
+ * @name Phaser.Textures.CanvasTexture#buffer
+ * @type {ArrayBuffer}
+ * @since 3.13.0
+ */
+ this.buffer;
+
+ if (this.data)
+ {
+ if (this.imageData.data.buffer)
+ {
+ this.buffer = this.imageData.data.buffer;
+ this.pixels = new Uint32Array(this.buffer);
+ }
+ else if (window.ArrayBuffer)
+ {
+ this.buffer = new ArrayBuffer(this.imageData.data.length);
+ this.pixels = new Uint32Array(this.buffer);
+ }
+ else
+ {
+ this.pixels = this.imageData.data;
+ }
+ }
+ },
+
+ /**
+ * This re-creates the `imageData` from the current context.
+ * It then re-builds the ArrayBuffer, the `data` Uint8ClampedArray reference and the `pixels` Int32Array.
+ *
+ * Warning: This is a very expensive operation, so use it sparingly.
+ *
+ * @method Phaser.Textures.CanvasTexture#update
+ * @since 3.13.0
+ *
+ * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.
+ */
+ update: function ()
+ {
+ this.imageData = this.context.getImageData(0, 0, this.width, this.height);
+
+ this.data = this.imageData.data;
+
+ if (this.imageData.data.buffer)
+ {
+ this.buffer = this.imageData.data.buffer;
+ this.pixels = new Uint32Array(this.buffer);
+ }
+ else if (window.ArrayBuffer)
+ {
+ this.buffer = new ArrayBuffer(this.imageData.data.length);
+ this.pixels = new Uint32Array(this.buffer);
+ }
+ else
+ {
+ this.pixels = this.imageData.data;
+ }
+
+ if (this.manager.game.config.renderType === CONST.WEBGL)
+ {
+ this.refresh();
+ }
+
+ return this;
+ },
+
+ /**
+ * Draws the given Image or Canvas element to this CanvasTexture, then updates the internal
+ * ImageData buffer and arrays.
+ *
+ * @method Phaser.Textures.CanvasTexture#draw
+ * @since 3.13.0
+ *
+ * @param {integer} x - The x coordinate to draw the source at.
+ * @param {integer} y - The y coordinate to draw the source at.
+ * @param {(HTMLImageElement|HTMLCanvasElement)} source - The element to draw to this canvas.
+ *
+ * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.
+ */
+ draw: function (x, y, source)
+ {
+ this.context.drawImage(source, x, y);
+
+ return this.update();
+ },
+
+ /**
+ * Draws the given texture frame to this CanvasTexture, then updates the internal
+ * ImageData buffer and arrays.
+ *
+ * @method Phaser.Textures.CanvasTexture#drawFrame
+ * @since 3.16.0
+ *
+ * @param {string} key - The unique string-based key of the Texture.
+ * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.
+ * @param {integer} [x=0] - The x coordinate to draw the source at.
+ * @param {integer} [y=0] - The y coordinate to draw the source at.
+ *
+ * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.
+ */
+ drawFrame: function (key, frame, x, y)
+ {
+ if (x === undefined) { x = 0; }
+ if (y === undefined) { y = 0; }
+
+ var textureFrame = this.manager.getFrame(key, frame);
+
+ if (textureFrame)
+ {
+ var cd = textureFrame.canvasData;
+
+ var width = textureFrame.cutWidth;
+ var height = textureFrame.cutHeight;
+ var res = textureFrame.source.resolution;
+
+ this.context.drawImage(
+ textureFrame.source.image,
+ cd.x, cd.y,
+ width,
+ height,
+ x, y,
+ width / res,
+ height / res
+ );
+
+ return this.update();
+ }
+ else
+ {
+ return this;
+ }
+ },
+
+ /**
+ * Sets a pixel in the CanvasTexture to the given color and alpha values.
+ *
+ * This is an expensive operation to run in large quantities, so use sparingly.
+ *
+ * @method Phaser.Textures.CanvasTexture#setPixel
+ * @since 3.16.0
+ *
+ * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} red - The red color value. A number between 0 and 255.
+ * @param {integer} green - The green color value. A number between 0 and 255.
+ * @param {integer} blue - The blue color value. A number between 0 and 255.
+ * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.
+ *
+ * @return {this} This CanvasTexture.
+ */
+ setPixel: function (x, y, red, green, blue, alpha)
+ {
+ if (alpha === undefined) { alpha = 255; }
+
+ x = Math.abs(Math.floor(x));
+ y = Math.abs(Math.floor(y));
+
+ var index = this.getIndex(x, y);
+
+ if (index > -1)
+ {
+ var imageData = this.context.getImageData(x, y, 1, 1);
+
+ imageData.data[0] = red;
+ imageData.data[1] = green;
+ imageData.data[2] = blue;
+ imageData.data[3] = alpha;
+
+ this.context.putImageData(imageData, x, y);
+ }
+
+ return this;
+ },
+
+ /**
+ * Puts the ImageData into the context of this CanvasTexture at the given coordinates.
+ *
+ * @method Phaser.Textures.CanvasTexture#putData
+ * @since 3.16.0
+ *
+ * @param {ImageData} imageData - The ImageData to put at the given location.
+ * @param {integer} x - The x coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} y - The y coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} [dirtyX=0] - Horizontal position (x coordinate) of the top-left corner from which the image data will be extracted.
+ * @param {integer} [dirtyY=0] - Vertical position (x coordinate) of the top-left corner from which the image data will be extracted.
+ * @param {integer} [dirtyWidth] - Width of the rectangle to be painted. Defaults to the width of the image data.
+ * @param {integer} [dirtyHeight] - Height of the rectangle to be painted. Defaults to the height of the image data.
+ *
+ * @return {this} This CanvasTexture.
+ */
+ putData: function (imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight)
+ {
+ if (dirtyX === undefined) { dirtyX = 0; }
+ if (dirtyY === undefined) { dirtyY = 0; }
+ if (dirtyWidth === undefined) { dirtyWidth = imageData.width; }
+ if (dirtyHeight === undefined) { dirtyHeight = imageData.height; }
+
+ this.context.putImageData(imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
+
+ return this;
+ },
+
+ /**
+ * Gets an ImageData region from this CanvasTexture from the position and size specified.
+ * You can write this back using `CanvasTexture.putData`, or manipulate it.
+ *
+ * @method Phaser.Textures.CanvasTexture#getData
+ * @since 3.16.0
+ *
+ * @param {integer} x - The x coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} y - The y coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} width - The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.
+ * @param {integer} height - The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.
+ *
+ * @return {ImageData} The ImageData extracted from this CanvasTexture.
+ */
+ getData: function (x, y, width, height)
+ {
+ x = Clamp(Math.floor(x), 0, this.width - 1);
+ y = Clamp(Math.floor(y), 0, this.height - 1);
+ width = Clamp(width, 1, this.width - x);
+ height = Clamp(height, 1, this.height - y);
+
+ var imageData = this.context.getImageData(x, y, width, height);
+
+ return imageData;
+ },
+
+ /**
+ * Get the color of a specific pixel from this texture and store it in a Color object.
+ *
+ * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,
+ * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
+ *
+ * @method Phaser.Textures.CanvasTexture#getPixel
+ * @since 3.13.0
+ *
+ * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {Phaser.Display.Color} [out] - A Color object to store the pixel values in. If not provided a new Color object will be created.
+ *
+ * @return {Phaser.Display.Color} An object with the red, green, blue and alpha values set in the r, g, b and a properties.
+ */
+ getPixel: function (x, y, out)
+ {
+ if (!out)
+ {
+ out = new Color();
+ }
+
+ var index = this.getIndex(x, y);
+
+ if (index > -1)
+ {
+ var data = this.data;
+
+ var r = data[index + 0];
+ var g = data[index + 1];
+ var b = data[index + 2];
+ var a = data[index + 3];
+
+ out.setTo(r, g, b, a);
+ }
+
+ return out;
+ },
+
+ /**
+ * Returns an array containing all of the pixels in the given region.
+ *
+ * If the requested region extends outside the bounds of this CanvasTexture,
+ * the region is truncated to fit.
+ *
+ * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,
+ * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
+ *
+ * @method Phaser.Textures.CanvasTexture#getPixels
+ * @since 3.16.0
+ *
+ * @param {integer} [x=0] - The x coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} [y=0] - The y coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} [width] - The width of the region to get. Must be an integer. Defaults to the canvas width if not given.
+ * @param {integer} [height] - The height of the region to get. Must be an integer. If not given will be set to the `width`.
+ *
+ * @return {Phaser.Types.Textures.PixelConfig[]} An array of Pixel objects.
+ */
+ getPixels: function (x, y, width, height)
+ {
+ if (x === undefined) { x = 0; }
+ if (y === undefined) { y = 0; }
+ if (width === undefined) { width = this.width; }
+ if (height === undefined) { height = width; }
+
+ x = Math.abs(Math.round(x));
+ y = Math.abs(Math.round(y));
+
+ var left = Clamp(x, 0, this.width);
+ var right = Clamp(x + width, 0, this.width);
+ var top = Clamp(y, 0, this.height);
+ var bottom = Clamp(y + height, 0, this.height);
+
+ var pixel = new Color();
+
+ var out = [];
+
+ for (var py = top; py < bottom; py++)
+ {
+ var row = [];
+
+ for (var px = left; px < right; px++)
+ {
+ pixel = this.getPixel(px, py, pixel);
+
+ row.push({ x: px, y: py, color: pixel.color, alpha: pixel.alphaGL });
+ }
+
+ out.push(row);
+ }
+
+ return out;
+ },
+
+ /**
+ * Returns the Image Data index for the given pixel in this CanvasTexture.
+ *
+ * The index can be used to read directly from the `this.data` array.
+ *
+ * The index points to the red value in the array. The subsequent 3 indexes
+ * point to green, blue and alpha respectively.
+ *
+ * @method Phaser.Textures.CanvasTexture#getIndex
+ * @since 3.16.0
+ *
+ * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
+ * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
+ *
+ * @return {integer}
+ */
+ getIndex: function (x, y)
+ {
+ x = Math.abs(Math.round(x));
+ y = Math.abs(Math.round(y));
+
+ if (x < this.width && y < this.height)
+ {
+ return (x + y * this.width) * 4;
+ }
+ else
+ {
+ return -1;
+ }
+ },
+
+ /**
+ * This should be called manually if you are running under WebGL.
+ * It will refresh the WebGLTexture from the Canvas source. Only call this if you know that the
+ * canvas has changed, as there is a significant GPU texture allocation cost involved in doing so.
+ *
+ * @method Phaser.Textures.CanvasTexture#refresh
+ * @since 3.7.0
+ *
+ * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.
+ */
+ refresh: function ()
+ {
+ this._source.update();
+
+ return this;
+ },
+
+ /**
+ * Gets the Canvas Element.
+ *
+ * @method Phaser.Textures.CanvasTexture#getCanvas
+ * @since 3.7.0
+ *
+ * @return {HTMLCanvasElement} The Canvas DOM element this texture is using.
+ */
+ getCanvas: function ()
+ {
+ return this.canvas;
+ },
+
+ /**
+ * Gets the 2D Canvas Rendering Context.
+ *
+ * @method Phaser.Textures.CanvasTexture#getContext
+ * @since 3.7.0
+ *
+ * @return {CanvasRenderingContext2D} The Canvas Rendering Context this texture is using.
+ */
+ getContext: function ()
+ {
+ return this.context;
+ },
+
+ /**
+ * Clears the given region of this Canvas Texture, resetting it back to transparent.
+ * If no region is given, the whole Canvas Texture is cleared.
+ *
+ * @method Phaser.Textures.CanvasTexture#clear
+ * @since 3.7.0
+ *
+ * @param {integer} [x=0] - The x coordinate of the top-left of the region to clear.
+ * @param {integer} [y=0] - The y coordinate of the top-left of the region to clear.
+ * @param {integer} [width] - The width of the region.
+ * @param {integer} [height] - The height of the region.
+ *
+ * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.
+ */
+ clear: function (x, y, width, height)
+ {
+ if (x === undefined) { x = 0; }
+ if (y === undefined) { y = 0; }
+ if (width === undefined) { width = this.width; }
+ if (height === undefined) { height = this.height; }
+
+ this.context.clearRect(x, y, width, height);
+
+ return this.update();
+ },
+
+ /**
+ * Changes the size of this Canvas Texture.
+ *
+ * @method Phaser.Textures.CanvasTexture#setSize
+ * @since 3.7.0
+ *
+ * @param {integer} width - The new width of the Canvas.
+ * @param {integer} [height] - The new height of the Canvas. If not given it will use the width as the height.
+ *
+ * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.
+ */
+ setSize: function (width, height)
+ {
+ if (height === undefined) { height = width; }
+
+ if (width !== this.width || height !== this.height)
+ {
+ // Update the Canvas
+ this.canvas.width = width;
+ this.canvas.height = height;
+
+ // Update the Texture Source
+ this._source.width = width;
+ this._source.height = height;
+ this._source.isPowerOf2 = IsSizePowerOfTwo(width, height);
+
+ // Update the Frame
+ this.frames['__BASE'].setSize(width, height, 0, 0);
+
+ this.refresh();
+ }
+
+ return this;
+ },
+
+ /**
+ * Destroys this Texture and releases references to its sources and frames.
+ *
+ * @method Phaser.Textures.CanvasTexture#destroy
+ * @since 3.16.0
+ */
+ destroy: function ()
+ {
+ Texture.prototype.destroy.call(this);
+
+ this._source = null;
+ this.canvas = null;
+ this.context = null;
+ this.imageData = null;
+ this.data = null;
+ this.pixels = null;
+ this.buffer = null;
+ }
+
+});
+
+module.exports = CanvasTexture;
+
+
+/***/ }),
+/* 353 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+var CanvasPool = __webpack_require__(25);
+var Class = __webpack_require__(0);
+var IsSizePowerOfTwo = __webpack_require__(118);
var ScaleModes = __webpack_require__(104);
/**
@@ -71262,7 +73029,7 @@ var ScaleModes = __webpack_require__(104);
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture this TextureSource belongs to.
- * @param {(HTMLImageElement|HTMLCanvasElement)} source - The source image data.
+ * @param {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture|WebGLTexture)} source - The source image data.
* @param {integer} [width] - Optional width of the source image. If not given it's derived from the source itself.
* @param {integer} [height] - Optional height of the source image. If not given it's derived from the source itself.
*/
@@ -71294,10 +73061,10 @@ var TextureSource = new Class({
/**
* The source of the image data.
- * This is either an Image Element, a Canvas Element or a RenderTexture.
+ * This is either an Image Element, a Canvas Element, a RenderTexture or a WebGLTexture.
*
* @name Phaser.Textures.TextureSource#source
- * @type {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture)}
+ * @type {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture|WebGLTexture)}
* @since 3.12.0
*/
this.source = source;
@@ -71380,6 +73147,15 @@ var TextureSource = new Class({
*/
this.isRenderTexture = (source.type === 'RenderTexture');
+ /**
+ * Is the source image a WebGLTexture?
+ *
+ * @name Phaser.Textures.TextureSource#isGLTexture
+ * @type {boolean}
+ * @since 3.19.0
+ */
+ this.isGLTexture = (source instanceof WebGLTexture);
+
/**
* Are the source image dimensions a power of two?
*
@@ -71390,7 +73166,8 @@ var TextureSource = new Class({
this.isPowerOf2 = IsSizePowerOfTwo(this.width, this.height);
/**
- * The WebGL Texture of the source image.
+ * The WebGL Texture of the source image. If this TextureSource is driven from a WebGLTexture
+ * already, then this is a reference to that WebGLTexture.
*
* @name Phaser.Textures.TextureSource#glTexture
* @type {?WebGLTexture}
@@ -71426,6 +73203,10 @@ var TextureSource = new Class({
this.glTexture = this.renderer.createTextureFromSource(null, this.width, this.height, this.scaleMode);
}
+ else if (this.isGLTexture)
+ {
+ this.glTexture = this.source;
+ }
else
{
this.glTexture = this.renderer.createTextureFromSource(this.image, this.width, this.height, this.scaleMode);
@@ -71475,19 +73256,6 @@ var TextureSource = new Class({
if (this.renderer.gl && this.isCanvas)
{
this.glTexture = this.renderer.canvasToTexture(this.image, this.glTexture);
-
- // Update all the Frames using this TextureSource
-
- /*
- var index = this.texture.getTextureSourceIndex(this);
-
- var frames = this.texture.getFramesFromTextureSource(index, true);
-
- for (var i = 0; i < frames.length; i++)
- {
- frames[i].glTexture = this.glTexture;
- }
- */
}
},
@@ -71522,7 +73290,7 @@ module.exports = TextureSource;
/***/ }),
-/* 351 */
+/* 354 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -71537,20 +73305,20 @@ module.exports = TextureSource;
module.exports = {
- AtlasXML: __webpack_require__(843),
- Canvas: __webpack_require__(844),
- Image: __webpack_require__(845),
- JSONArray: __webpack_require__(846),
- JSONHash: __webpack_require__(847),
- SpriteSheet: __webpack_require__(848),
- SpriteSheetFromAtlas: __webpack_require__(849),
- UnityYAML: __webpack_require__(850)
+ AtlasXML: __webpack_require__(847),
+ Canvas: __webpack_require__(848),
+ Image: __webpack_require__(849),
+ JSONArray: __webpack_require__(850),
+ JSONHash: __webpack_require__(851),
+ SpriteSheet: __webpack_require__(852),
+ SpriteSheetFromAtlas: __webpack_require__(853),
+ UnityYAML: __webpack_require__(854)
};
/***/ }),
-/* 352 */
+/* 355 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -71560,9 +73328,9 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var HTML5AudioSoundManager = __webpack_require__(353);
-var NoAudioSoundManager = __webpack_require__(355);
-var WebAudioSoundManager = __webpack_require__(357);
+var HTML5AudioSoundManager = __webpack_require__(356);
+var NoAudioSoundManager = __webpack_require__(358);
+var WebAudioSoundManager = __webpack_require__(360);
/**
* Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings.
@@ -71600,7 +73368,7 @@ module.exports = SoundManagerCreator;
/***/ }),
-/* 353 */
+/* 356 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -71610,10 +73378,10 @@ module.exports = SoundManagerCreator;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BaseSoundManager = __webpack_require__(123);
+var BaseSoundManager = __webpack_require__(124);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(65);
-var HTML5AudioSound = __webpack_require__(354);
+var Events = __webpack_require__(66);
+var HTML5AudioSound = __webpack_require__(357);
/**
* HTML5 Audio implementation of the Sound Manager.
@@ -72056,7 +73824,7 @@ module.exports = HTML5AudioSoundManager;
/***/ }),
-/* 354 */
+/* 357 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -72066,9 +73834,9 @@ module.exports = HTML5AudioSoundManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BaseSound = __webpack_require__(124);
+var BaseSound = __webpack_require__(125);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(65);
+var Events = __webpack_require__(66);
/**
* @classdesc
@@ -72983,7 +74751,7 @@ module.exports = HTML5AudioSound;
/***/ }),
-/* 355 */
+/* 358 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -72993,10 +74761,10 @@ module.exports = HTML5AudioSound;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BaseSoundManager = __webpack_require__(123);
+var BaseSoundManager = __webpack_require__(124);
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var NoAudioSound = __webpack_require__(356);
+var EventEmitter = __webpack_require__(10);
+var NoAudioSound = __webpack_require__(359);
var NOOP = __webpack_require__(1);
/**
@@ -73101,7 +74869,7 @@ module.exports = NoAudioSoundManager;
/***/ }),
-/* 356 */
+/* 359 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -73111,10 +74879,10 @@ module.exports = NoAudioSoundManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BaseSound = __webpack_require__(124);
+var BaseSound = __webpack_require__(125);
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var Extend = __webpack_require__(17);
+var EventEmitter = __webpack_require__(10);
+var Extend = __webpack_require__(15);
/**
* @classdesc
@@ -73228,7 +74996,7 @@ module.exports = NoAudioSound;
/***/ }),
-/* 357 */
+/* 360 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -73238,11 +75006,11 @@ module.exports = NoAudioSound;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Base64ToArrayBuffer = __webpack_require__(358);
-var BaseSoundManager = __webpack_require__(123);
+var Base64ToArrayBuffer = __webpack_require__(361);
+var BaseSoundManager = __webpack_require__(124);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(65);
-var WebAudioSound = __webpack_require__(359);
+var Events = __webpack_require__(66);
+var WebAudioSound = __webpack_require__(362);
/**
* @classdesc
@@ -73471,6 +75239,11 @@ var WebAudioSoundManager = new Class({
document.body.removeEventListener('click', unlockHandler);
_this.unlocked = true;
+ }, function ()
+ {
+ document.body.removeEventListener('touchstart', unlockHandler);
+ document.body.removeEventListener('touchend', unlockHandler);
+ document.body.removeEventListener('click', unlockHandler);
});
}
};
@@ -73635,7 +75408,7 @@ module.exports = WebAudioSoundManager;
/***/ }),
-/* 358 */
+/* 361 */
/***/ (function(module, exports) {
/**
@@ -73710,7 +75483,7 @@ module.exports = Base64ToArrayBuffer;
/***/ }),
-/* 359 */
+/* 362 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -73720,9 +75493,9 @@ module.exports = Base64ToArrayBuffer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BaseSound = __webpack_require__(124);
+var BaseSound = __webpack_require__(125);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(65);
+var Events = __webpack_require__(66);
/**
* @classdesc
@@ -74618,7 +76391,7 @@ module.exports = WebAudioSound;
/***/ }),
-/* 360 */
+/* 363 */
/***/ (function(module, exports) {
/**
@@ -74666,7 +76439,7 @@ module.exports = TransposeMatrix;
/***/ }),
-/* 361 */
+/* 364 */
/***/ (function(module, exports) {
/**
@@ -74788,7 +76561,7 @@ module.exports = QuickSelect;
/***/ }),
-/* 362 */
+/* 365 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -74797,8 +76570,8 @@ module.exports = QuickSelect;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetValue = __webpack_require__(6);
-var Shuffle = __webpack_require__(111);
+var GetValue = __webpack_require__(5);
+var Shuffle = __webpack_require__(112);
var BuildChunk = function (a, b, qty)
{
@@ -74926,7 +76699,7 @@ module.exports = Range;
/***/ }),
-/* 363 */
+/* 366 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -75015,7 +76788,7 @@ module.exports = BuildGameObjectAnimation;
/***/ }),
-/* 364 */
+/* 367 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -75024,7 +76797,7 @@ module.exports = BuildGameObjectAnimation;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
+var Rectangle = __webpack_require__(11);
/**
* Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.
@@ -75057,7 +76830,7 @@ module.exports = Union;
/***/ }),
-/* 365 */
+/* 368 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -75068,11 +76841,11 @@ module.exports = Union;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var DOMElementRender = __webpack_require__(916);
+var DOMElementRender = __webpack_require__(920);
var GameObject = __webpack_require__(13);
var IsPlainObject = __webpack_require__(7);
-var RemoveFromDOM = __webpack_require__(174);
-var Vector4 = __webpack_require__(308);
+var RemoveFromDOM = __webpack_require__(175);
+var Vector4 = __webpack_require__(311);
/**
* @classdesc
@@ -76004,7 +77777,7 @@ module.exports = DOMElement;
/***/ }),
-/* 366 */
+/* 369 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -76013,7 +77786,7 @@ module.exports = DOMElement;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CSSBlendModes = __webpack_require__(917);
+var CSSBlendModes = __webpack_require__(921);
var GameObject = __webpack_require__(13);
/**
@@ -76125,7 +77898,7 @@ module.exports = DOMElementCSSRenderer;
/***/ }),
-/* 367 */
+/* 370 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -76137,7 +77910,7 @@ module.exports = DOMElementCSSRenderer;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
var GameObject = __webpack_require__(13);
-var ExternRender = __webpack_require__(921);
+var ExternRender = __webpack_require__(925);
/**
* @classdesc
@@ -76221,7 +77994,7 @@ module.exports = Extern;
/***/ }),
-/* 368 */
+/* 371 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -76230,10 +78003,10 @@ module.exports = Extern;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CircumferencePoint = __webpack_require__(187);
-var FromPercent = __webpack_require__(86);
-var MATH_CONST = __webpack_require__(23);
-var Point = __webpack_require__(3);
+var CircumferencePoint = __webpack_require__(189);
+var FromPercent = __webpack_require__(87);
+var MATH_CONST = __webpack_require__(22);
+var Point = __webpack_require__(4);
/**
* Returns a Point object containing the coordinates of a point on the circumference of the Ellipse
@@ -76264,7 +78037,7 @@ module.exports = GetPoint;
/***/ }),
-/* 369 */
+/* 372 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -76273,10 +78046,10 @@ module.exports = GetPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Circumference = __webpack_require__(370);
-var CircumferencePoint = __webpack_require__(187);
-var FromPercent = __webpack_require__(86);
-var MATH_CONST = __webpack_require__(23);
+var Circumference = __webpack_require__(373);
+var CircumferencePoint = __webpack_require__(189);
+var FromPercent = __webpack_require__(87);
+var MATH_CONST = __webpack_require__(22);
/**
* Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse,
@@ -76318,7 +78091,7 @@ module.exports = GetPoints;
/***/ }),
-/* 370 */
+/* 373 */
/***/ (function(module, exports) {
/**
@@ -76350,7 +78123,7 @@ module.exports = Circumference;
/***/ }),
-/* 371 */
+/* 374 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -76359,8 +78132,8 @@ module.exports = Circumference;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Commands = __webpack_require__(186);
-var SetTransform = __webpack_require__(25);
+var Commands = __webpack_require__(188);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -76600,7 +78373,7 @@ module.exports = GraphicsCanvasRenderer;
/***/ }),
-/* 372 */
+/* 375 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -76819,7 +78592,7 @@ module.exports = GravityWell;
/***/ }),
-/* 373 */
+/* 376 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -76830,7 +78603,7 @@ module.exports = GravityWell;
var Class = __webpack_require__(0);
var DegToRad = __webpack_require__(35);
-var DistanceBetween = __webpack_require__(57);
+var DistanceBetween = __webpack_require__(58);
/**
* @classdesc
@@ -77388,7 +79161,7 @@ module.exports = Particle;
/***/ }),
-/* 374 */
+/* 377 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -77397,22 +79170,22 @@ module.exports = Particle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BlendModes = __webpack_require__(52);
+var BlendModes = __webpack_require__(53);
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var DeathZone = __webpack_require__(375);
-var EdgeZone = __webpack_require__(376);
-var EmitterOp = __webpack_require__(933);
+var DeathZone = __webpack_require__(378);
+var EdgeZone = __webpack_require__(379);
+var EmitterOp = __webpack_require__(937);
var GetFastValue = __webpack_require__(2);
-var GetRandom = __webpack_require__(180);
-var HasAny = __webpack_require__(377);
+var GetRandom = __webpack_require__(182);
+var HasAny = __webpack_require__(380);
var HasValue = __webpack_require__(97);
-var Particle = __webpack_require__(373);
-var RandomZone = __webpack_require__(378);
-var Rectangle = __webpack_require__(10);
-var StableSort = __webpack_require__(127);
-var Vector2 = __webpack_require__(4);
-var Wrap = __webpack_require__(56);
+var Particle = __webpack_require__(376);
+var RandomZone = __webpack_require__(381);
+var Rectangle = __webpack_require__(11);
+var StableSort = __webpack_require__(128);
+var Vector2 = __webpack_require__(3);
+var Wrap = __webpack_require__(57);
/**
* @classdesc
@@ -79427,7 +81200,7 @@ module.exports = ParticleEmitter;
/***/ }),
-/* 375 */
+/* 378 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -79505,7 +81278,7 @@ module.exports = DeathZone;
/***/ }),
-/* 376 */
+/* 379 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -79749,7 +81522,7 @@ module.exports = EdgeZone;
/***/ }),
-/* 377 */
+/* 380 */
/***/ (function(module, exports) {
/**
@@ -79786,7 +81559,7 @@ module.exports = HasAny;
/***/ }),
-/* 378 */
+/* 381 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -79796,7 +81569,7 @@ module.exports = HasAny;
*/
var Class = __webpack_require__(0);
-var Vector2 = __webpack_require__(4);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -79859,7 +81632,7 @@ module.exports = RandomZone;
/***/ }),
-/* 379 */
+/* 382 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -79870,7 +81643,7 @@ module.exports = RandomZone;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var Sprite = __webpack_require__(67);
+var Sprite = __webpack_require__(68);
/**
* @classdesc
@@ -79941,7 +81714,7 @@ module.exports = PathFollower;
/***/ }),
-/* 380 */
+/* 383 */
/***/ (function(module, exports) {
/**
@@ -79976,7 +81749,7 @@ module.exports = UUID;
/***/ }),
-/* 381 */
+/* 384 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -79985,13 +81758,13 @@ module.exports = UUID;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ArcRender = __webpack_require__(953);
+var ArcRender = __webpack_require__(957);
var Class = __webpack_require__(0);
var DegToRad = __webpack_require__(35);
-var Earcut = __webpack_require__(63);
-var GeomCircle = __webpack_require__(77);
-var MATH_CONST = __webpack_require__(23);
-var Shape = __webpack_require__(30);
+var Earcut = __webpack_require__(64);
+var GeomCircle = __webpack_require__(78);
+var MATH_CONST = __webpack_require__(22);
+var Shape = __webpack_require__(29);
/**
* @classdesc
@@ -80147,7 +81920,8 @@ var Arc = new Class({
{
this.geom.radius = value;
- this.setSize(value, value);
+ var diameter = value * 2;
+ this.setSize(diameter, diameter);
this.updateDisplayOrigin();
this.updateData();
}
@@ -80328,8 +82102,8 @@ var Arc = new Class({
var endAngle = DegToRad(this._endAngle);
var anticlockwise = this._anticlockwise;
- var x = radius / 2;
- var y = radius / 2;
+ var x = radius;
+ var y = radius;
endAngle -= startAngle;
@@ -80384,7 +82158,7 @@ module.exports = Arc;
/***/ }),
-/* 382 */
+/* 385 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -80394,10 +82168,10 @@ module.exports = Arc;
*/
var Class = __webpack_require__(0);
-var CurveRender = __webpack_require__(956);
-var Earcut = __webpack_require__(63);
-var Rectangle = __webpack_require__(10);
-var Shape = __webpack_require__(30);
+var CurveRender = __webpack_require__(960);
+var Earcut = __webpack_require__(64);
+var Rectangle = __webpack_require__(11);
+var Shape = __webpack_require__(29);
/**
* @classdesc
@@ -80566,7 +82340,7 @@ module.exports = Curve;
/***/ }),
-/* 383 */
+/* 386 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -80576,10 +82350,10 @@ module.exports = Curve;
*/
var Class = __webpack_require__(0);
-var Earcut = __webpack_require__(63);
-var EllipseRender = __webpack_require__(959);
-var GeomEllipse = __webpack_require__(92);
-var Shape = __webpack_require__(30);
+var Earcut = __webpack_require__(64);
+var EllipseRender = __webpack_require__(963);
+var GeomEllipse = __webpack_require__(93);
+var Shape = __webpack_require__(29);
/**
* @classdesc
@@ -80753,7 +82527,7 @@ module.exports = Ellipse;
/***/ }),
-/* 384 */
+/* 387 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -80763,8 +82537,8 @@ module.exports = Ellipse;
*/
var Class = __webpack_require__(0);
-var Shape = __webpack_require__(30);
-var GridRender = __webpack_require__(962);
+var Shape = __webpack_require__(29);
+var GridRender = __webpack_require__(966);
/**
* @classdesc
@@ -81035,7 +82809,7 @@ module.exports = Grid;
/***/ }),
-/* 385 */
+/* 388 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -81044,9 +82818,9 @@ module.exports = Grid;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var IsoBoxRender = __webpack_require__(965);
+var IsoBoxRender = __webpack_require__(969);
var Class = __webpack_require__(0);
-var Shape = __webpack_require__(30);
+var Shape = __webpack_require__(29);
/**
* @classdesc
@@ -81250,7 +83024,7 @@ module.exports = IsoBox;
/***/ }),
-/* 386 */
+/* 389 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -81260,8 +83034,8 @@ module.exports = IsoBox;
*/
var Class = __webpack_require__(0);
-var IsoTriangleRender = __webpack_require__(968);
-var Shape = __webpack_require__(30);
+var IsoTriangleRender = __webpack_require__(972);
+var Shape = __webpack_require__(29);
/**
* @classdesc
@@ -81496,7 +83270,7 @@ module.exports = IsoTriangle;
/***/ }),
-/* 387 */
+/* 390 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -81506,9 +83280,9 @@ module.exports = IsoTriangle;
*/
var Class = __webpack_require__(0);
-var Shape = __webpack_require__(30);
-var GeomLine = __webpack_require__(54);
-var LineRender = __webpack_require__(971);
+var Shape = __webpack_require__(29);
+var GeomLine = __webpack_require__(55);
+var LineRender = __webpack_require__(975);
/**
* @classdesc
@@ -81663,7 +83437,7 @@ module.exports = Line;
/***/ }),
-/* 388 */
+/* 391 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -81672,13 +83446,13 @@ module.exports = Line;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var PolygonRender = __webpack_require__(974);
+var PolygonRender = __webpack_require__(978);
var Class = __webpack_require__(0);
-var Earcut = __webpack_require__(63);
-var GetAABB = __webpack_require__(389);
-var GeomPolygon = __webpack_require__(192);
-var Shape = __webpack_require__(30);
-var Smooth = __webpack_require__(392);
+var Earcut = __webpack_require__(64);
+var GetAABB = __webpack_require__(392);
+var GeomPolygon = __webpack_require__(194);
+var Shape = __webpack_require__(29);
+var Smooth = __webpack_require__(395);
/**
* @classdesc
@@ -81802,7 +83576,7 @@ module.exports = Polygon;
/***/ }),
-/* 389 */
+/* 392 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -81811,7 +83585,7 @@ module.exports = Polygon;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
+var Rectangle = __webpack_require__(11);
/**
* Calculates the bounding AABB rectangle of a polygon.
@@ -81858,7 +83632,7 @@ module.exports = GetAABB;
/***/ }),
-/* 390 */
+/* 393 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -81867,9 +83641,9 @@ module.exports = GetAABB;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Length = __webpack_require__(55);
-var Line = __webpack_require__(54);
-var Perimeter = __webpack_require__(391);
+var Length = __webpack_require__(56);
+var Line = __webpack_require__(55);
+var Perimeter = __webpack_require__(394);
/**
* Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon,
@@ -81935,7 +83709,7 @@ module.exports = GetPoints;
/***/ }),
-/* 391 */
+/* 394 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -81944,8 +83718,8 @@ module.exports = GetPoints;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Length = __webpack_require__(55);
-var Line = __webpack_require__(54);
+var Length = __webpack_require__(56);
+var Line = __webpack_require__(55);
/**
* Returns the perimeter of the given Polygon.
@@ -81983,7 +83757,7 @@ module.exports = Perimeter;
/***/ }),
-/* 392 */
+/* 395 */
/***/ (function(module, exports) {
/**
@@ -82059,7 +83833,7 @@ module.exports = Smooth;
/***/ }),
-/* 393 */
+/* 396 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -82069,9 +83843,9 @@ module.exports = Smooth;
*/
var Class = __webpack_require__(0);
-var GeomRectangle = __webpack_require__(10);
-var Shape = __webpack_require__(30);
-var RectangleRender = __webpack_require__(977);
+var GeomRectangle = __webpack_require__(11);
+var Shape = __webpack_require__(29);
+var RectangleRender = __webpack_require__(981);
/**
* @classdesc
@@ -82171,7 +83945,7 @@ module.exports = Rectangle;
/***/ }),
-/* 394 */
+/* 397 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -82180,10 +83954,10 @@ module.exports = Rectangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var StarRender = __webpack_require__(980);
+var StarRender = __webpack_require__(984);
var Class = __webpack_require__(0);
-var Earcut = __webpack_require__(63);
-var Shape = __webpack_require__(30);
+var Earcut = __webpack_require__(64);
+var Shape = __webpack_require__(29);
/**
* @classdesc
@@ -82459,7 +84233,7 @@ module.exports = Star;
/***/ }),
-/* 395 */
+/* 398 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -82469,9 +84243,9 @@ module.exports = Star;
*/
var Class = __webpack_require__(0);
-var Shape = __webpack_require__(30);
-var GeomTriangle = __webpack_require__(69);
-var TriangleRender = __webpack_require__(983);
+var Shape = __webpack_require__(29);
+var GeomTriangle = __webpack_require__(70);
+var TriangleRender = __webpack_require__(987);
/**
* @classdesc
@@ -82602,7 +84376,7 @@ module.exports = Triangle;
/***/ }),
-/* 396 */
+/* 399 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -82611,8 +84385,8 @@ module.exports = Triangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
-var Length = __webpack_require__(55);
+var Point = __webpack_require__(4);
+var Length = __webpack_require__(56);
/**
* Returns a Point from around the perimeter of a Triangle.
@@ -82689,7 +84463,7 @@ module.exports = GetPoint;
/***/ }),
-/* 397 */
+/* 400 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -82698,8 +84472,8 @@ module.exports = GetPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Length = __webpack_require__(55);
-var Point = __webpack_require__(3);
+var Length = __webpack_require__(56);
+var Point = __webpack_require__(4);
/**
* Returns an array of evenly spaced points on the perimeter of a Triangle.
@@ -82782,7 +84556,7 @@ module.exports = GetPoints;
/***/ }),
-/* 398 */
+/* 401 */
/***/ (function(module, exports) {
/**
@@ -82865,7 +84639,7 @@ module.exports = SetValue;
/***/ }),
-/* 399 */
+/* 402 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -83128,7 +84902,7 @@ module.exports = Light;
/***/ }),
-/* 400 */
+/* 403 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -83138,7 +84912,7 @@ module.exports = Light;
*/
var Class = __webpack_require__(0);
-var Light = __webpack_require__(399);
+var Light = __webpack_require__(402);
var Utils = __webpack_require__(9);
/**
@@ -83491,7 +85265,7 @@ module.exports = LightsManager;
/***/ }),
-/* 401 */
+/* 404 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -83500,26 +85274,34 @@ module.exports = LightsManager;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
+var CONST = __webpack_require__(47);
+var Extend = __webpack_require__(15);
+
/**
* @namespace Phaser.Geom
*/
-module.exports = {
+var Geom = {
- Circle: __webpack_require__(1039),
- Ellipse: __webpack_require__(1049),
- Intersects: __webpack_require__(402),
- Line: __webpack_require__(1068),
- Point: __webpack_require__(1089),
- Polygon: __webpack_require__(1103),
- Rectangle: __webpack_require__(417),
- Triangle: __webpack_require__(1133)
+ Circle: __webpack_require__(1043),
+ Ellipse: __webpack_require__(1053),
+ Intersects: __webpack_require__(405),
+ Line: __webpack_require__(1072),
+ Point: __webpack_require__(1093),
+ Polygon: __webpack_require__(1107),
+ Rectangle: __webpack_require__(420),
+ Triangle: __webpack_require__(1137)
};
+// Merge in the consts
+Geom = Extend(false, Geom, CONST);
+
+module.exports = Geom;
+
/***/ }),
-/* 402 */
+/* 405 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -83534,35 +85316,35 @@ module.exports = {
module.exports = {
- CircleToCircle: __webpack_require__(403),
- CircleToRectangle: __webpack_require__(404),
- GetCircleToCircle: __webpack_require__(1059),
- GetCircleToRectangle: __webpack_require__(1060),
- GetLineToCircle: __webpack_require__(196),
- GetLineToRectangle: __webpack_require__(198),
- GetRectangleIntersection: __webpack_require__(1061),
- GetRectangleToRectangle: __webpack_require__(1062),
- GetRectangleToTriangle: __webpack_require__(1063),
- GetTriangleToCircle: __webpack_require__(1064),
- GetTriangleToLine: __webpack_require__(409),
- GetTriangleToTriangle: __webpack_require__(1065),
- LineToCircle: __webpack_require__(197),
- LineToLine: __webpack_require__(82),
- LineToRectangle: __webpack_require__(405),
- PointToLine: __webpack_require__(413),
- PointToLineSegment: __webpack_require__(1066),
- RectangleToRectangle: __webpack_require__(130),
- RectangleToTriangle: __webpack_require__(406),
- RectangleToValues: __webpack_require__(1067),
- TriangleToCircle: __webpack_require__(408),
- TriangleToLine: __webpack_require__(410),
- TriangleToTriangle: __webpack_require__(411)
+ CircleToCircle: __webpack_require__(406),
+ CircleToRectangle: __webpack_require__(407),
+ GetCircleToCircle: __webpack_require__(1063),
+ GetCircleToRectangle: __webpack_require__(1064),
+ GetLineToCircle: __webpack_require__(198),
+ GetLineToRectangle: __webpack_require__(200),
+ GetRectangleIntersection: __webpack_require__(1065),
+ GetRectangleToRectangle: __webpack_require__(1066),
+ GetRectangleToTriangle: __webpack_require__(1067),
+ GetTriangleToCircle: __webpack_require__(1068),
+ GetTriangleToLine: __webpack_require__(412),
+ GetTriangleToTriangle: __webpack_require__(1069),
+ LineToCircle: __webpack_require__(199),
+ LineToLine: __webpack_require__(84),
+ LineToRectangle: __webpack_require__(408),
+ PointToLine: __webpack_require__(416),
+ PointToLineSegment: __webpack_require__(1070),
+ RectangleToRectangle: __webpack_require__(131),
+ RectangleToTriangle: __webpack_require__(409),
+ RectangleToValues: __webpack_require__(1071),
+ TriangleToCircle: __webpack_require__(411),
+ TriangleToLine: __webpack_require__(413),
+ TriangleToTriangle: __webpack_require__(414)
};
/***/ }),
-/* 403 */
+/* 406 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -83571,7 +85353,7 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var DistanceBetween = __webpack_require__(57);
+var DistanceBetween = __webpack_require__(58);
/**
* Checks if two Circles intersect.
@@ -83593,7 +85375,7 @@ module.exports = CircleToCircle;
/***/ }),
-/* 404 */
+/* 407 */
/***/ (function(module, exports) {
/**
@@ -83647,7 +85429,7 @@ module.exports = CircleToRectangle;
/***/ }),
-/* 405 */
+/* 408 */
/***/ (function(module, exports) {
/**
@@ -83748,7 +85530,7 @@ module.exports = LineToRectangle;
/***/ }),
-/* 406 */
+/* 409 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -83757,10 +85539,10 @@ module.exports = LineToRectangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var LineToLine = __webpack_require__(82);
-var Contains = __webpack_require__(47);
-var ContainsArray = __webpack_require__(199);
-var Decompose = __webpack_require__(407);
+var LineToLine = __webpack_require__(84);
+var Contains = __webpack_require__(48);
+var ContainsArray = __webpack_require__(201);
+var Decompose = __webpack_require__(410);
/**
* Checks for intersection between Rectangle shape and Triangle shape.
@@ -83841,7 +85623,7 @@ module.exports = RectangleToTriangle;
/***/ }),
-/* 407 */
+/* 410 */
/***/ (function(module, exports) {
/**
@@ -83878,7 +85660,7 @@ module.exports = Decompose;
/***/ }),
-/* 408 */
+/* 411 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -83887,8 +85669,8 @@ module.exports = Decompose;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var LineToCircle = __webpack_require__(197);
-var Contains = __webpack_require__(81);
+var LineToCircle = __webpack_require__(199);
+var Contains = __webpack_require__(83);
/**
* Checks if a Triangle and a Circle intersect.
@@ -83943,7 +85725,7 @@ module.exports = TriangleToCircle;
/***/ }),
-/* 409 */
+/* 412 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -83953,9 +85735,9 @@ module.exports = TriangleToCircle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
-var TriangleToLine = __webpack_require__(410);
-var LineToLine = __webpack_require__(82);
+var Point = __webpack_require__(4);
+var TriangleToLine = __webpack_require__(413);
+var LineToLine = __webpack_require__(84);
/**
* Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array.
@@ -84002,7 +85784,7 @@ module.exports = GetTriangleToLine;
/***/ }),
-/* 410 */
+/* 413 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -84011,8 +85793,8 @@ module.exports = GetTriangleToLine;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Contains = __webpack_require__(81);
-var LineToLine = __webpack_require__(82);
+var Contains = __webpack_require__(83);
+var LineToLine = __webpack_require__(84);
/**
* Checks if a Triangle and a Line intersect.
@@ -84058,7 +85840,7 @@ module.exports = TriangleToLine;
/***/ }),
-/* 411 */
+/* 414 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -84067,9 +85849,9 @@ module.exports = TriangleToLine;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ContainsArray = __webpack_require__(199);
-var Decompose = __webpack_require__(412);
-var LineToLine = __webpack_require__(82);
+var ContainsArray = __webpack_require__(201);
+var Decompose = __webpack_require__(415);
+var LineToLine = __webpack_require__(84);
/**
* Checks if two Triangles intersect.
@@ -84148,7 +85930,7 @@ module.exports = TriangleToTriangle;
/***/ }),
-/* 412 */
+/* 415 */
/***/ (function(module, exports) {
/**
@@ -84183,7 +85965,7 @@ module.exports = Decompose;
/***/ }),
-/* 413 */
+/* 416 */
/***/ (function(module, exports) {
/**
@@ -84253,7 +86035,7 @@ module.exports = PointToLine;
/***/ }),
-/* 414 */
+/* 417 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -84262,9 +86044,9 @@ module.exports = PointToLine;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MATH_CONST = __webpack_require__(23);
-var Wrap = __webpack_require__(56);
-var Angle = __webpack_require__(83);
+var MATH_CONST = __webpack_require__(22);
+var Wrap = __webpack_require__(57);
+var Angle = __webpack_require__(85);
/**
* Get the angle of the normal of the given line in radians.
@@ -84287,7 +86069,7 @@ module.exports = NormalAngle;
/***/ }),
-/* 415 */
+/* 418 */
/***/ (function(module, exports) {
/**
@@ -84315,7 +86097,7 @@ module.exports = GetMagnitude;
/***/ }),
-/* 416 */
+/* 419 */
/***/ (function(module, exports) {
/**
@@ -84343,7 +86125,7 @@ module.exports = GetMagnitudeSq;
/***/ }),
-/* 417 */
+/* 420 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -84352,51 +86134,51 @@ module.exports = GetMagnitudeSq;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
+var Rectangle = __webpack_require__(11);
-Rectangle.Area = __webpack_require__(1108);
-Rectangle.Ceil = __webpack_require__(1109);
-Rectangle.CeilAll = __webpack_require__(1110);
-Rectangle.CenterOn = __webpack_require__(162);
-Rectangle.Clone = __webpack_require__(1111);
-Rectangle.Contains = __webpack_require__(47);
-Rectangle.ContainsPoint = __webpack_require__(1112);
-Rectangle.ContainsRect = __webpack_require__(418);
-Rectangle.CopyFrom = __webpack_require__(1113);
-Rectangle.Decompose = __webpack_require__(407);
-Rectangle.Equals = __webpack_require__(1114);
-Rectangle.FitInside = __webpack_require__(1115);
-Rectangle.FitOutside = __webpack_require__(1116);
-Rectangle.Floor = __webpack_require__(1117);
-Rectangle.FloorAll = __webpack_require__(1118);
-Rectangle.FromPoints = __webpack_require__(172);
-Rectangle.GetAspectRatio = __webpack_require__(201);
-Rectangle.GetCenter = __webpack_require__(1119);
-Rectangle.GetPoint = __webpack_require__(147);
-Rectangle.GetPoints = __webpack_require__(249);
-Rectangle.GetSize = __webpack_require__(1120);
-Rectangle.Inflate = __webpack_require__(1121);
-Rectangle.Intersection = __webpack_require__(1122);
-Rectangle.MarchingAnts = __webpack_require__(260);
-Rectangle.MergePoints = __webpack_require__(1123);
-Rectangle.MergeRect = __webpack_require__(1124);
-Rectangle.MergeXY = __webpack_require__(1125);
-Rectangle.Offset = __webpack_require__(1126);
-Rectangle.OffsetPoint = __webpack_require__(1127);
-Rectangle.Overlaps = __webpack_require__(1128);
-Rectangle.Perimeter = __webpack_require__(108);
-Rectangle.PerimeterPoint = __webpack_require__(1129);
-Rectangle.Random = __webpack_require__(150);
-Rectangle.RandomOutside = __webpack_require__(1130);
-Rectangle.SameDimensions = __webpack_require__(1131);
-Rectangle.Scale = __webpack_require__(1132);
-Rectangle.Union = __webpack_require__(364);
+Rectangle.Area = __webpack_require__(1112);
+Rectangle.Ceil = __webpack_require__(1113);
+Rectangle.CeilAll = __webpack_require__(1114);
+Rectangle.CenterOn = __webpack_require__(163);
+Rectangle.Clone = __webpack_require__(1115);
+Rectangle.Contains = __webpack_require__(48);
+Rectangle.ContainsPoint = __webpack_require__(1116);
+Rectangle.ContainsRect = __webpack_require__(421);
+Rectangle.CopyFrom = __webpack_require__(1117);
+Rectangle.Decompose = __webpack_require__(410);
+Rectangle.Equals = __webpack_require__(1118);
+Rectangle.FitInside = __webpack_require__(1119);
+Rectangle.FitOutside = __webpack_require__(1120);
+Rectangle.Floor = __webpack_require__(1121);
+Rectangle.FloorAll = __webpack_require__(1122);
+Rectangle.FromPoints = __webpack_require__(173);
+Rectangle.GetAspectRatio = __webpack_require__(203);
+Rectangle.GetCenter = __webpack_require__(1123);
+Rectangle.GetPoint = __webpack_require__(148);
+Rectangle.GetPoints = __webpack_require__(252);
+Rectangle.GetSize = __webpack_require__(1124);
+Rectangle.Inflate = __webpack_require__(1125);
+Rectangle.Intersection = __webpack_require__(1126);
+Rectangle.MarchingAnts = __webpack_require__(263);
+Rectangle.MergePoints = __webpack_require__(1127);
+Rectangle.MergeRect = __webpack_require__(1128);
+Rectangle.MergeXY = __webpack_require__(1129);
+Rectangle.Offset = __webpack_require__(1130);
+Rectangle.OffsetPoint = __webpack_require__(1131);
+Rectangle.Overlaps = __webpack_require__(1132);
+Rectangle.Perimeter = __webpack_require__(109);
+Rectangle.PerimeterPoint = __webpack_require__(1133);
+Rectangle.Random = __webpack_require__(151);
+Rectangle.RandomOutside = __webpack_require__(1134);
+Rectangle.SameDimensions = __webpack_require__(1135);
+Rectangle.Scale = __webpack_require__(1136);
+Rectangle.Union = __webpack_require__(367);
module.exports = Rectangle;
/***/ }),
-/* 418 */
+/* 421 */
/***/ (function(module, exports) {
/**
@@ -84436,7 +86218,7 @@ module.exports = ContainsRect;
/***/ }),
-/* 419 */
+/* 422 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -84445,7 +86227,7 @@ module.exports = ContainsRect;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
// The three medians (the lines drawn from the vertices to the bisectors of the opposite sides)
// meet in the centroid or center of mass (center of gravity).
@@ -84480,7 +86262,7 @@ module.exports = Centroid;
/***/ }),
-/* 420 */
+/* 423 */
/***/ (function(module, exports) {
/**
@@ -84521,7 +86303,7 @@ module.exports = Offset;
/***/ }),
-/* 421 */
+/* 424 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -84530,7 +86312,7 @@ module.exports = Offset;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
// The three angle bisectors of a triangle meet in one point called the incenter.
// It is the center of the incircle, the circle inscribed in the triangle.
@@ -84586,7 +86368,7 @@ module.exports = InCenter;
/***/ }),
-/* 422 */
+/* 425 */
/***/ (function(module, exports) {
/**
@@ -84628,6 +86410,7 @@ var CreateInteractiveObject = function (gameObject, hitArea, hitAreaCallback)
hitArea: hitArea,
hitAreaCallback: hitAreaCallback,
+ hitAreaDebug: null,
// Has the dev specified their own shape, or is this bound to the texture size?
customHitArea: false,
@@ -84655,7 +86438,7 @@ module.exports = CreateInteractiveObject;
/***/ }),
-/* 423 */
+/* 426 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -84780,7 +86563,7 @@ module.exports = Axis;
/***/ }),
-/* 424 */
+/* 427 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -84790,7 +86573,7 @@ module.exports = Axis;
*/
var Class = __webpack_require__(0);
-var Events = __webpack_require__(203);
+var Events = __webpack_require__(205);
/**
* @classdesc
@@ -84926,7 +86709,7 @@ module.exports = Button;
/***/ }),
-/* 425 */
+/* 428 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -84935,11 +86718,11 @@ module.exports = Button;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Axis = __webpack_require__(423);
-var Button = __webpack_require__(424);
+var Axis = __webpack_require__(426);
+var Button = __webpack_require__(427);
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var Vector2 = __webpack_require__(4);
+var EventEmitter = __webpack_require__(10);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -85684,7 +87467,7 @@ module.exports = Gamepad;
/***/ }),
-/* 426 */
+/* 429 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -85694,8 +87477,8 @@ module.exports = Gamepad;
*/
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(132);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(133);
/**
* @classdesc
@@ -86086,7 +87869,7 @@ module.exports = Key;
/***/ }),
-/* 427 */
+/* 430 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -86096,10 +87879,10 @@ module.exports = Key;
*/
var Class = __webpack_require__(0);
-var Events = __webpack_require__(132);
+var Events = __webpack_require__(133);
var GetFastValue = __webpack_require__(2);
-var ProcessKeyCombo = __webpack_require__(1172);
-var ResetKeyCombo = __webpack_require__(1174);
+var ProcessKeyCombo = __webpack_require__(1176);
+var ResetKeyCombo = __webpack_require__(1178);
/**
* @classdesc
@@ -86379,7 +88162,7 @@ module.exports = KeyCombo;
/***/ }),
-/* 428 */
+/* 431 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -86388,7 +88171,7 @@ module.exports = KeyCombo;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MergeXHRSettings = __webpack_require__(205);
+var MergeXHRSettings = __webpack_require__(207);
/**
* Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings
@@ -86447,7 +88230,7 @@ module.exports = XHRLoader;
/***/ }),
-/* 429 */
+/* 432 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -86457,11 +88240,11 @@ module.exports = XHRLoader;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(26);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(31);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
-var HTML5AudioFile = __webpack_require__(430);
+var HTML5AudioFile = __webpack_require__(433);
var IsPlainObject = __webpack_require__(7);
/**
@@ -86718,7 +88501,7 @@ module.exports = AudioFile;
/***/ }),
-/* 430 */
+/* 433 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -86728,10 +88511,10 @@ module.exports = AudioFile;
*/
var Class = __webpack_require__(0);
-var Events = __webpack_require__(80);
-var File = __webpack_require__(20);
+var Events = __webpack_require__(81);
+var File = __webpack_require__(21);
var GetFastValue = __webpack_require__(2);
-var GetURL = __webpack_require__(204);
+var GetURL = __webpack_require__(206);
var IsPlainObject = __webpack_require__(7);
/**
@@ -86916,7 +88699,7 @@ module.exports = HTML5AudioFile;
/***/ }),
-/* 431 */
+/* 434 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -86926,8 +88709,8 @@ module.exports = HTML5AudioFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -87087,7 +88870,7 @@ module.exports = ScriptFile;
/***/ }),
-/* 432 */
+/* 435 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -87097,8 +88880,8 @@ module.exports = ScriptFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -87262,7 +89045,7 @@ module.exports = TextFile;
/***/ }),
-/* 433 */
+/* 436 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -87271,12 +89054,12 @@ module.exports = TextFile;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ArcadeImage = __webpack_require__(434);
-var ArcadeSprite = __webpack_require__(134);
+var ArcadeImage = __webpack_require__(437);
+var ArcadeSprite = __webpack_require__(135);
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(50);
-var PhysicsGroup = __webpack_require__(435);
-var StaticPhysicsGroup = __webpack_require__(436);
+var CONST = __webpack_require__(51);
+var PhysicsGroup = __webpack_require__(438);
+var StaticPhysicsGroup = __webpack_require__(439);
/**
* @classdesc
@@ -87533,7 +89316,7 @@ module.exports = Factory;
/***/ }),
-/* 434 */
+/* 437 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -87543,8 +89326,8 @@ module.exports = Factory;
*/
var Class = __webpack_require__(0);
-var Components = __webpack_require__(207);
-var Image = __webpack_require__(95);
+var Components = __webpack_require__(209);
+var Image = __webpack_require__(96);
/**
* @classdesc
@@ -87633,7 +89416,7 @@ module.exports = ArcadeImage;
/***/ }),
-/* 435 */
+/* 438 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -87642,11 +89425,11 @@ module.exports = ArcadeImage;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ArcadeSprite = __webpack_require__(134);
+var ArcadeSprite = __webpack_require__(135);
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(50);
+var CONST = __webpack_require__(51);
var GetFastValue = __webpack_require__(2);
-var Group = __webpack_require__(94);
+var Group = __webpack_require__(95);
var IsPlainObject = __webpack_require__(7);
/**
@@ -87906,7 +89689,7 @@ module.exports = PhysicsGroup;
/***/ }),
-/* 436 */
+/* 439 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -87915,11 +89698,11 @@ module.exports = PhysicsGroup;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ArcadeSprite = __webpack_require__(134);
+var ArcadeSprite = __webpack_require__(135);
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(50);
+var CONST = __webpack_require__(51);
var GetFastValue = __webpack_require__(2);
-var Group = __webpack_require__(94);
+var Group = __webpack_require__(95);
var IsPlainObject = __webpack_require__(7);
/**
@@ -88086,7 +89869,7 @@ module.exports = StaticPhysicsGroup;
/***/ }),
-/* 437 */
+/* 440 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -88095,33 +89878,33 @@ module.exports = StaticPhysicsGroup;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Body = __webpack_require__(438);
-var Clamp = __webpack_require__(22);
+var Body = __webpack_require__(441);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
-var Collider = __webpack_require__(439);
-var CONST = __webpack_require__(50);
-var DistanceBetween = __webpack_require__(57);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(208);
-var FuzzyEqual = __webpack_require__(166);
-var FuzzyGreaterThan = __webpack_require__(295);
-var FuzzyLessThan = __webpack_require__(296);
-var GetOverlapX = __webpack_require__(440);
-var GetOverlapY = __webpack_require__(441);
-var GetValue = __webpack_require__(6);
-var ProcessQueue = __webpack_require__(442);
-var ProcessTileCallbacks = __webpack_require__(1230);
-var Rectangle = __webpack_require__(10);
-var RTree = __webpack_require__(443);
-var SeparateTile = __webpack_require__(1231);
-var SeparateX = __webpack_require__(1236);
-var SeparateY = __webpack_require__(1237);
-var Set = __webpack_require__(105);
-var StaticBody = __webpack_require__(445);
-var TileIntersectsBody = __webpack_require__(444);
+var Collider = __webpack_require__(442);
+var CONST = __webpack_require__(51);
+var DistanceBetween = __webpack_require__(58);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(210);
+var FuzzyEqual = __webpack_require__(167);
+var FuzzyGreaterThan = __webpack_require__(298);
+var FuzzyLessThan = __webpack_require__(299);
+var GetOverlapX = __webpack_require__(443);
+var GetOverlapY = __webpack_require__(444);
+var GetValue = __webpack_require__(5);
+var ProcessQueue = __webpack_require__(445);
+var ProcessTileCallbacks = __webpack_require__(1234);
+var Rectangle = __webpack_require__(11);
+var RTree = __webpack_require__(446);
+var SeparateTile = __webpack_require__(1235);
+var SeparateX = __webpack_require__(1240);
+var SeparateY = __webpack_require__(1241);
+var Set = __webpack_require__(106);
+var StaticBody = __webpack_require__(448);
+var TileIntersectsBody = __webpack_require__(447);
var TransformMatrix = __webpack_require__(32);
-var Vector2 = __webpack_require__(4);
-var Wrap = __webpack_require__(56);
+var Vector2 = __webpack_require__(3);
+var Wrap = __webpack_require__(57);
/**
* @classdesc
@@ -90463,7 +92246,7 @@ module.exports = World;
/***/ }),
-/* 438 */
+/* 441 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -90474,12 +92257,12 @@ module.exports = World;
var CircleContains = __webpack_require__(46);
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(50);
-var Events = __webpack_require__(208);
-var RadToDeg = __webpack_require__(169);
-var Rectangle = __webpack_require__(10);
-var RectangleContains = __webpack_require__(47);
-var Vector2 = __webpack_require__(4);
+var CONST = __webpack_require__(51);
+var Events = __webpack_require__(210);
+var RadToDeg = __webpack_require__(170);
+var Rectangle = __webpack_require__(11);
+var RectangleContains = __webpack_require__(48);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -92651,7 +94434,7 @@ module.exports = Body;
/***/ }),
-/* 439 */
+/* 442 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -92834,7 +94617,7 @@ module.exports = Collider;
/***/ }),
-/* 440 */
+/* 443 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -92843,7 +94626,7 @@ module.exports = Collider;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(50);
+var CONST = __webpack_require__(51);
/**
* Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties
@@ -92942,7 +94725,7 @@ module.exports = GetOverlapX;
/***/ }),
-/* 441 */
+/* 444 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -92951,7 +94734,7 @@ module.exports = GetOverlapX;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(50);
+var CONST = __webpack_require__(51);
/**
* Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties
@@ -93050,7 +94833,7 @@ module.exports = GetOverlapY;
/***/ }),
-/* 442 */
+/* 445 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -93282,7 +95065,7 @@ module.exports = ProcessQueue;
/***/ }),
-/* 443 */
+/* 446 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -93292,7 +95075,7 @@ module.exports = ProcessQueue;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var quickselect = __webpack_require__(361);
+var quickselect = __webpack_require__(364);
/**
* @classdesc
@@ -93893,7 +95676,7 @@ function multiSelect (arr, left, right, n, compare)
module.exports = rbush;
/***/ }),
-/* 444 */
+/* 447 */
/***/ (function(module, exports) {
/**
@@ -93929,7 +95712,7 @@ module.exports = TileIntersectsBody;
/***/ }),
-/* 445 */
+/* 448 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -93940,9 +95723,9 @@ module.exports = TileIntersectsBody;
var CircleContains = __webpack_require__(46);
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(50);
-var RectangleContains = __webpack_require__(47);
-var Vector2 = __webpack_require__(4);
+var CONST = __webpack_require__(51);
+var RectangleContains = __webpack_require__(48);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -94918,10 +96701,10 @@ module.exports = StaticBody;
/***/ }),
-/* 446 */,
-/* 447 */,
-/* 448 */,
-/* 449 */
+/* 449 */,
+/* 450 */,
+/* 451 */,
+/* 452 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95102,7 +96885,7 @@ module.exports = BasePlugin;
/***/ }),
-/* 450 */
+/* 453 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95111,7 +96894,7 @@ module.exports = BasePlugin;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
+var GetTilesWithin = __webpack_require__(23);
/**
* Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
@@ -95147,7 +96930,7 @@ module.exports = ReplaceByIndex;
/***/ }),
-/* 451 */
+/* 454 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95190,7 +96973,7 @@ module.exports = HasTileAt;
/***/ }),
-/* 452 */
+/* 455 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95199,9 +96982,9 @@ module.exports = HasTileAt;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Tile = __webpack_require__(72);
+var Tile = __webpack_require__(73);
var IsInLayerBounds = __webpack_require__(101);
-var CalculateFacesAt = __webpack_require__(210);
+var CalculateFacesAt = __webpack_require__(212);
/**
* Removes the tile at the given tile coordinates in the specified layer and updates the layer's
@@ -95253,7 +97036,7 @@ module.exports = RemoveTileAt;
/***/ }),
-/* 453 */
+/* 456 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95262,11 +97045,11 @@ module.exports = RemoveTileAt;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Formats = __webpack_require__(31);
-var Parse2DArray = __webpack_require__(213);
-var ParseCSV = __webpack_require__(454);
-var ParseJSONTiled = __webpack_require__(455);
-var ParseWeltmeister = __webpack_require__(466);
+var Formats = __webpack_require__(30);
+var Parse2DArray = __webpack_require__(215);
+var ParseCSV = __webpack_require__(457);
+var ParseJSONTiled = __webpack_require__(458);
+var ParseWeltmeister = __webpack_require__(469);
/**
* Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format
@@ -95323,7 +97106,7 @@ module.exports = Parse;
/***/ }),
-/* 454 */
+/* 457 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95332,8 +97115,8 @@ module.exports = Parse;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Formats = __webpack_require__(31);
-var Parse2DArray = __webpack_require__(213);
+var Formats = __webpack_require__(30);
+var Parse2DArray = __webpack_require__(215);
/**
* Parses a CSV string of tile indexes into a new MapData object with a single layer.
@@ -95371,7 +97154,7 @@ module.exports = ParseCSV;
/***/ }),
-/* 455 */
+/* 458 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95380,14 +97163,14 @@ module.exports = ParseCSV;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Formats = __webpack_require__(31);
+var Formats = __webpack_require__(30);
var MapData = __webpack_require__(103);
-var ParseTileLayers = __webpack_require__(456);
-var ParseImageLayers = __webpack_require__(458);
-var ParseTilesets = __webpack_require__(459);
-var ParseObjectLayers = __webpack_require__(462);
-var BuildTilesetIndex = __webpack_require__(464);
-var AssignTileProperties = __webpack_require__(465);
+var ParseTileLayers = __webpack_require__(459);
+var ParseImageLayers = __webpack_require__(461);
+var ParseTilesets = __webpack_require__(462);
+var ParseObjectLayers = __webpack_require__(465);
+var BuildTilesetIndex = __webpack_require__(467);
+var AssignTileProperties = __webpack_require__(468);
/**
* Parses a Tiled JSON object into a new MapData object.
@@ -95449,7 +97232,7 @@ module.exports = ParseJSONTiled;
/***/ }),
-/* 456 */
+/* 459 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95458,11 +97241,11 @@ module.exports = ParseJSONTiled;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Base64Decode = __webpack_require__(457);
+var Base64Decode = __webpack_require__(460);
var GetFastValue = __webpack_require__(2);
var LayerData = __webpack_require__(102);
-var ParseGID = __webpack_require__(214);
-var Tile = __webpack_require__(72);
+var ParseGID = __webpack_require__(216);
+var Tile = __webpack_require__(73);
/**
* [description]
@@ -95659,7 +97442,7 @@ module.exports = ParseTileLayers;
/***/ }),
-/* 457 */
+/* 460 */
/***/ (function(module, exports) {
/**
@@ -95702,7 +97485,7 @@ module.exports = Base64Decode;
/***/ }),
-/* 458 */
+/* 461 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95754,7 +97537,7 @@ module.exports = ParseImageLayers;
/***/ }),
-/* 459 */
+/* 462 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -95763,9 +97546,9 @@ module.exports = ParseImageLayers;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Tileset = __webpack_require__(140);
-var ImageCollection = __webpack_require__(460);
-var ParseObject = __webpack_require__(215);
+var Tileset = __webpack_require__(141);
+var ImageCollection = __webpack_require__(463);
+var ParseObject = __webpack_require__(217);
/**
* Tilesets and Image Collections
@@ -95923,7 +97706,7 @@ module.exports = ParseTilesets;
/***/ }),
-/* 460 */
+/* 463 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -96095,7 +97878,7 @@ module.exports = ImageCollection;
/***/ }),
-/* 461 */
+/* 464 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -96139,7 +97922,7 @@ module.exports = Pick;
/***/ }),
-/* 462 */
+/* 465 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -96149,8 +97932,8 @@ module.exports = Pick;
*/
var GetFastValue = __webpack_require__(2);
-var ParseObject = __webpack_require__(215);
-var ObjectLayer = __webpack_require__(463);
+var ParseObject = __webpack_require__(217);
+var ObjectLayer = __webpack_require__(466);
/**
* Parses a Tiled JSON object into an array of ObjectLayer objects.
@@ -96198,7 +97981,7 @@ module.exports = ParseObjectLayers;
/***/ }),
-/* 463 */
+/* 466 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -96320,7 +98103,7 @@ module.exports = ObjectLayer;
/***/ }),
-/* 464 */
+/* 467 */
/***/ (function(module, exports) {
/**
@@ -96393,7 +98176,7 @@ module.exports = BuildTilesetIndex;
/***/ }),
-/* 465 */
+/* 468 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -96402,7 +98185,7 @@ module.exports = BuildTilesetIndex;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Extend = __webpack_require__(17);
+var Extend = __webpack_require__(15);
/**
* Copy properties from tileset to tiles.
@@ -96466,7 +98249,7 @@ module.exports = AssignTileProperties;
/***/ }),
-/* 466 */
+/* 469 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -96475,10 +98258,10 @@ module.exports = AssignTileProperties;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Formats = __webpack_require__(31);
+var Formats = __webpack_require__(30);
var MapData = __webpack_require__(103);
-var ParseTileLayers = __webpack_require__(467);
-var ParseTilesets = __webpack_require__(468);
+var ParseTileLayers = __webpack_require__(470);
+var ParseTilesets = __webpack_require__(471);
/**
* Parses a Weltmeister JSON object into a new MapData object.
@@ -96533,7 +98316,7 @@ module.exports = ParseWeltmeister;
/***/ }),
-/* 467 */
+/* 470 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -96543,7 +98326,7 @@ module.exports = ParseWeltmeister;
*/
var LayerData = __webpack_require__(102);
-var Tile = __webpack_require__(72);
+var Tile = __webpack_require__(73);
/**
* [description]
@@ -96617,7 +98400,7 @@ module.exports = ParseTileLayers;
/***/ }),
-/* 468 */
+/* 471 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -96626,7 +98409,7 @@ module.exports = ParseTileLayers;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Tileset = __webpack_require__(140);
+var Tileset = __webpack_require__(141);
/**
* [description]
@@ -96668,7 +98451,7 @@ module.exports = ParseTilesets;
/***/ }),
-/* 469 */
+/* 472 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -96679,16 +98462,16 @@ module.exports = ParseTilesets;
var Class = __webpack_require__(0);
var DegToRad = __webpack_require__(35);
-var DynamicTilemapLayer = __webpack_require__(470);
-var Extend = __webpack_require__(17);
-var Formats = __webpack_require__(31);
+var DynamicTilemapLayer = __webpack_require__(473);
+var Extend = __webpack_require__(15);
+var Formats = __webpack_require__(30);
var LayerData = __webpack_require__(102);
-var Rotate = __webpack_require__(305);
-var SpliceOne = __webpack_require__(78);
-var StaticTilemapLayer = __webpack_require__(471);
-var Tile = __webpack_require__(72);
-var TilemapComponents = __webpack_require__(136);
-var Tileset = __webpack_require__(140);
+var Rotate = __webpack_require__(308);
+var SpliceOne = __webpack_require__(79);
+var StaticTilemapLayer = __webpack_require__(474);
+var Tile = __webpack_require__(73);
+var TilemapComponents = __webpack_require__(137);
+var Tileset = __webpack_require__(141);
/**
* @callback TilemapFilterCallback
@@ -97311,7 +99094,7 @@ var Tilemap = new Class({
config.x = obj.x;
config.y = obj.y;
- var sprite = this.scene.make.sprite(config);
+ var sprite = scene.make.sprite(config);
sprite.name = obj.name;
@@ -97848,7 +99631,7 @@ var Tilemap = new Class({
layer = this.getLayer(layer);
if (layer === null) { return null; }
-
+
return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, layer);
},
@@ -98220,7 +100003,7 @@ var Tilemap = new Class({
/**
* Removes the given TilemapLayer from this Tilemap without destroying it.
- *
+ *
* If no layer specified, the map's current layer is used.
*
* @method Phaser.Tilemaps.Tilemap#removeLayer
@@ -98253,7 +100036,7 @@ var Tilemap = new Class({
/**
* Destroys the given TilemapLayer and removes it from this Tilemap.
- *
+ *
* If no layer specified, the map's current layer is used.
*
* @method Phaser.Tilemaps.Tilemap#destroyLayer
@@ -98320,7 +100103,7 @@ var Tilemap = new Class({
/**
* Removes the given Tile, or an array of Tiles, from the layer to which they belong,
* and optionally recalculates the collision information.
- *
+ *
* This cannot be applied to Tiles that belong to Static Tilemap Layers.
*
* @method Phaser.Tilemaps.Tilemap#removeTile
@@ -98448,7 +100231,7 @@ var Tilemap = new Class({
/**
* Draws a debug representation of all layers within this Tilemap to the given Graphics object.
- *
+ *
* This is helpful when you want to get a quick idea of which of your tiles are colliding and which
* have interesting faces. The tiles are drawn starting at (0, 0) in the Graphics, allowing you to
* place the debug representation wherever you want on the screen.
@@ -99125,7 +100908,7 @@ module.exports = Tilemap;
/***/ }),
-/* 470 */
+/* 473 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -99136,9 +100919,9 @@ module.exports = Tilemap;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var DynamicTilemapLayerRender = __webpack_require__(1289);
+var DynamicTilemapLayerRender = __webpack_require__(1293);
var GameObject = __webpack_require__(13);
-var TilemapComponents = __webpack_require__(136);
+var TilemapComponents = __webpack_require__(137);
/**
* @classdesc
@@ -99588,6 +101371,12 @@ var DynamicTilemapLayer = new Class({
{
if (removeFromTilemap === undefined) { removeFromTilemap = true; }
+ if (!this.tilemap)
+ {
+ // Abort, we've already been destroyed
+ return;
+ }
+
// Uninstall this layer only if it is still installed on the LayerData object
if (this.layer.tilemapLayer === this)
{
@@ -100436,7 +102225,7 @@ module.exports = DynamicTilemapLayer;
/***/ }),
-/* 471 */
+/* 474 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -100447,10 +102236,10 @@ module.exports = DynamicTilemapLayer;
var Class = __webpack_require__(0);
var Components = __webpack_require__(12);
-var CONST = __webpack_require__(26);
+var GameEvents = __webpack_require__(18);
var GameObject = __webpack_require__(13);
-var StaticTilemapLayerRender = __webpack_require__(1292);
-var TilemapComponents = __webpack_require__(136);
+var StaticTilemapLayerRender = __webpack_require__(1296);
+var TilemapComponents = __webpack_require__(137);
var TransformMatrix = __webpack_require__(32);
var Utils = __webpack_require__(9);
@@ -100800,13 +102589,10 @@ var StaticTilemapLayer = new Class({
this.initPipeline('TextureTintPipeline');
- if (scene.sys.game.config.renderType === CONST.WEBGL)
+ scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function ()
{
- scene.sys.game.renderer.onContextRestored(function ()
- {
- this.updateVBOData();
- }, this);
- }
+ this.updateVBOData();
+ }, this);
},
/**
@@ -101887,7 +103673,13 @@ var StaticTilemapLayer = new Class({
{
if (removeFromTilemap === undefined) { removeFromTilemap = true; }
- // Uninstall this layer only if it is still installed on the LayerData object
+ if (!this.tilemap)
+ {
+ // Abort, we've already been destroyed
+ return;
+ }
+
+ // Uninstall this layer only if it is still installed on the LayerData object
if (this.layer.tilemapLayer === this)
{
this.layer.tilemapLayer = undefined;
@@ -101925,7 +103717,7 @@ module.exports = StaticTilemapLayer;
/***/ }),
-/* 472 */
+/* 475 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -102204,7 +103996,7 @@ var TimerEvent = new Class({
* @method Phaser.Time.TimerEvent#remove
* @since 3.0.0
*
- * @param {boolean} [dispatchCallback] - If `true` (by default `false`), the function of the Timer Event will be called before its removal from its Clock.
+ * @param {boolean} [dispatchCallback=false] - If `true`, the function of the Timer Event will be called before its removal.
*/
remove: function (dispatchCallback)
{
@@ -102238,7 +104030,7 @@ module.exports = TimerEvent;
/***/ }),
-/* 473 */
+/* 476 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -102247,17 +104039,20 @@ module.exports = TimerEvent;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RESERVED = __webpack_require__(1301);
+var RESERVED = __webpack_require__(1305);
/**
- * [description]
+ * Internal function used by the Tween Builder to return an array of properties
+ * that the Tween will be operating on. It takes a tween configuration object
+ * and then checks that none of the `props` entries start with an underscore, or that
+ * none of the direct properties are on the Reserved list.
*
* @function Phaser.Tweens.Builders.GetProps
* @since 3.0.0
*
- * @param {object} config - The configuration object of the tween to get the target(s) from.
+ * @param {Phaser.Types.Tweens.TweenBuilderConfig} config - The configuration object of the Tween to get the properties from.
*
- * @return {array} An array of all the targets the tween is operating on.
+ * @return {string[]} An array of all the properties the tween will operate on.
*/
var GetProps = function (config)
{
@@ -102296,7 +104091,7 @@ module.exports = GetProps;
/***/ }),
-/* 474 */
+/* 477 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -102305,17 +104100,19 @@ module.exports = GetProps;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
/**
- * Returns an array of all tweens in the given config
+ * Internal function used by the Timeline Builder.
+ *
+ * It returns an array of all tweens in the given timeline config.
*
* @function Phaser.Tweens.Builders.GetTweens
* @since 3.0.0
*
- * @param {object} config - [description]
+ * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline.
*
- * @return {array} [description]
+ * @return {Phaser.Tweens.Tween[]} An array of Tween instances that the Timeline will manage.
*/
var GetTweens = function (config)
{
@@ -102342,7 +104139,7 @@ module.exports = GetTweens;
/***/ }),
-/* 475 */
+/* 478 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -102351,15 +104148,15 @@ module.exports = GetTweens;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Defaults = __webpack_require__(219);
+var Defaults = __webpack_require__(221);
var GetAdvancedValue = __webpack_require__(14);
-var GetBoolean = __webpack_require__(87);
-var GetEaseFunction = __webpack_require__(96);
-var GetNewValue = __webpack_require__(141);
-var GetValue = __webpack_require__(6);
-var GetValueOp = __webpack_require__(218);
-var Tween = __webpack_require__(220);
-var TweenData = __webpack_require__(221);
+var GetBoolean = __webpack_require__(88);
+var GetEaseFunction = __webpack_require__(82);
+var GetNewValue = __webpack_require__(142);
+var GetValue = __webpack_require__(5);
+var GetValueOp = __webpack_require__(220);
+var Tween = __webpack_require__(222);
+var TweenData = __webpack_require__(224);
/**
* Creates a new Number Tween.
@@ -102410,9 +104207,11 @@ var NumberTweenBuilder = function (parent, config, defaults)
var tweenData = TweenData(
targets[0],
+ 0,
'value',
ops.getEnd,
ops.getStart,
+ ops.getActive,
ease,
delay,
duration,
@@ -102470,7 +104269,7 @@ module.exports = NumberTweenBuilder;
/***/ }),
-/* 476 */
+/* 479 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -102479,17 +104278,17 @@ module.exports = NumberTweenBuilder;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clone = __webpack_require__(64);
-var Defaults = __webpack_require__(219);
+var Clone = __webpack_require__(65);
+var Defaults = __webpack_require__(221);
var GetAdvancedValue = __webpack_require__(14);
-var GetBoolean = __webpack_require__(87);
-var GetEaseFunction = __webpack_require__(96);
-var GetNewValue = __webpack_require__(141);
-var GetTargets = __webpack_require__(217);
-var GetTweens = __webpack_require__(474);
-var GetValue = __webpack_require__(6);
-var Timeline = __webpack_require__(477);
-var TweenBuilder = __webpack_require__(142);
+var GetBoolean = __webpack_require__(88);
+var GetEaseFunction = __webpack_require__(82);
+var GetNewValue = __webpack_require__(142);
+var GetTargets = __webpack_require__(219);
+var GetTweens = __webpack_require__(477);
+var GetValue = __webpack_require__(5);
+var Timeline = __webpack_require__(480);
+var TweenBuilder = __webpack_require__(143);
/**
* Builds a Timeline of Tweens based on a configuration object.
@@ -102622,7 +104421,7 @@ module.exports = TimelineBuilder;
/***/ }),
-/* 477 */
+/* 480 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -102632,10 +104431,10 @@ module.exports = TimelineBuilder;
*/
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(478);
-var TweenBuilder = __webpack_require__(142);
-var TWEEN_CONST = __webpack_require__(88);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(223);
+var TweenBuilder = __webpack_require__(143);
+var TWEEN_CONST = __webpack_require__(89);
/**
* @classdesc
@@ -102862,6 +104661,21 @@ var Timeline = new Class({
*/
this.totalProgress = 0;
+ /**
+ * An object containing the different Tween callback functions.
+ *
+ * You can either set these in the Tween config, or by calling the `Tween.setCallback` method.
+ *
+ * `onComplete` When the Timeline finishes playback fully or `Timeline.stop` is called. Never invoked if timeline is set to repeat infinitely.
+ * `onLoop` When a Timeline loops.
+ * `onStart` When the Timeline starts playing.
+ * `onUpdate` When a Timeline updates a child Tween.
+ * `onYoyo` When a Timeline starts a yoyo.
+ *
+ * @name Phaser.Tweens.Timeline#callbacks
+ * @type {object}
+ * @since 3.0.0
+ */
this.callbacks = {
onComplete: null,
onLoop: null,
@@ -102870,9 +104684,37 @@ var Timeline = new Class({
onYoyo: null
};
+ /**
+ * The context in which all callbacks are invoked.
+ *
+ * @name Phaser.Tweens.Timeline#callbackScope
+ * @type {any}
+ * @since 3.0.0
+ */
this.callbackScope;
},
+ /**
+ * Internal method that will emit a Timeline based Event and invoke the given callback.
+ *
+ * @method Phaser.Tweens.Timeline#dispatchTimelineEvent
+ * @since 3.19.0
+ *
+ * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.
+ * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.
+ */
+ dispatchTimelineEvent: function (event, callback)
+ {
+ this.emit(event, this, this.targets);
+
+ if (callback)
+ {
+ callback.params[1] = this.targets;
+
+ callback.func.apply(callback.scope, callback.params);
+ }
+ },
+
/**
* Sets the value of the time scale applied to this Timeline. A value of 1 runs in real-time.
* A value of 0.5 runs 50% slower, and so on.
@@ -103231,14 +105073,7 @@ var Timeline = new Class({
this.state = TWEEN_CONST.ACTIVE;
}
- var onStart = this.callbacks.onStart;
-
- if (onStart)
- {
- onStart.func.apply(onStart.scope, onStart.params);
- }
-
- this.emit(Events.TIMELINE_START, this);
+ this.dispatchTimelineEvent(Events.TIMELINE_START, this.callbacks.onStart);
},
/**
@@ -103261,44 +105096,32 @@ var Timeline = new Class({
this.loopCounter--;
- var onLoop = this.callbacks.onLoop;
-
- if (onLoop)
- {
- onLoop.func.apply(onLoop.scope, onLoop.params);
- }
-
- this.emit(Events.TIMELINE_LOOP, this, this.loopCounter);
-
this.resetTweens(true);
if (this.loopDelay > 0)
{
this.countdown = this.loopDelay;
+
this.state = TWEEN_CONST.LOOP_DELAY;
}
else
{
this.state = TWEEN_CONST.ACTIVE;
+
+ this.dispatchTimelineEvent(Events.TIMELINE_LOOP, this.callbacks.onLoop);
}
}
else if (this.completeDelay > 0)
{
- this.countdown = this.completeDelay;
this.state = TWEEN_CONST.COMPLETE_DELAY;
+
+ this.countdown = this.completeDelay;
}
else
{
this.state = TWEEN_CONST.PENDING_REMOVE;
- var onComplete = this.callbacks.onComplete;
-
- if (onComplete)
- {
- onComplete.func.apply(onComplete.scope, onComplete.params);
- }
-
- this.emit(Events.TIMELINE_COMPLETE, this);
+ this.dispatchTimelineEvent(Events.TIMELINE_COMPLETE, this.callbacks.onComplete);
}
},
@@ -103352,14 +105175,7 @@ var Timeline = new Class({
}
}
- var onUpdate = this.callbacks.onUpdate;
-
- if (onUpdate)
- {
- onUpdate.func.apply(onUpdate.scope, onUpdate.params);
- }
-
- this.emit(Events.TIMELINE_UPDATE, this);
+ this.dispatchTimelineEvent(Events.TIMELINE_UPDATE, this.callbacks.onUpdate);
// Anything still running? If not, we're done
if (stillRunning === 0)
@@ -103376,6 +105192,8 @@ var Timeline = new Class({
if (this.countdown <= 0)
{
this.state = TWEEN_CONST.ACTIVE;
+
+ this.dispatchTimelineEvent(Events.TIMELINE_LOOP, this.callbacks.onLoop);
}
break;
@@ -103388,14 +105206,7 @@ var Timeline = new Class({
{
this.state = TWEEN_CONST.PENDING_REMOVE;
- var onComplete = this.callbacks.onComplete;
-
- if (onComplete)
- {
- onComplete.func.apply(onComplete.scope, onComplete.params);
- }
-
- this.emit(Events.TIMELINE_COMPLETE, this);
+ this.dispatchTimelineEvent(Events.TIMELINE_COMPLETE, this.callbacks.onComplete);
}
break;
@@ -103517,7 +105328,7 @@ module.exports = Timeline;
/***/ }),
-/* 478 */
+/* 481 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -103526,35 +105337,9 @@ module.exports = Timeline;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-/**
- * @namespace Phaser.Tweens.Events
- */
-
-module.exports = {
-
- TIMELINE_COMPLETE: __webpack_require__(1302),
- TIMELINE_LOOP: __webpack_require__(1303),
- TIMELINE_PAUSE: __webpack_require__(1304),
- TIMELINE_RESUME: __webpack_require__(1305),
- TIMELINE_START: __webpack_require__(1306),
- TIMELINE_UPDATE: __webpack_require__(1307)
-
-};
-
-
-/***/ }),
-/* 479 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-var BaseAnimation = __webpack_require__(146);
+var BaseAnimation = __webpack_require__(147);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(107);
+var Events = __webpack_require__(108);
/**
* @classdesc
@@ -104133,6 +105918,11 @@ var Animation = new Class({
var anim = this.currentAnim;
var gameObject = this.parent;
+ if (!anim)
+ {
+ return gameObject;
+ }
+
// Should give us 9,007,199,254,740,991 safe repeats
this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;
@@ -104276,7 +106066,7 @@ var Animation = new Class({
{
this._repeat = value;
- this.repeatCounter = 0;
+ this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;
return this.parent;
},
@@ -104711,7 +106501,7 @@ module.exports = Animation;
/***/ }),
-/* 480 */
+/* 482 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -104721,14 +106511,14 @@ module.exports = Animation;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CanvasSnapshot = __webpack_require__(481);
-var CameraEvents = __webpack_require__(48);
+var CanvasSnapshot = __webpack_require__(483);
+var CameraEvents = __webpack_require__(49);
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(26);
-var GetBlendModes = __webpack_require__(482);
-var ScaleEvents = __webpack_require__(89);
+var CONST = __webpack_require__(31);
+var GetBlendModes = __webpack_require__(484);
+var ScaleEvents = __webpack_require__(90);
var ScaleModes = __webpack_require__(104);
-var Smoothing = __webpack_require__(113);
+var Smoothing = __webpack_require__(114);
var TransformMatrix = __webpack_require__(32);
/**
@@ -104993,30 +106783,6 @@ var CanvasRenderer = new Class({
}
},
- /**
- * A NOOP method for handling lost context. Intentionally empty.
- *
- * @method Phaser.Renderer.Canvas.CanvasRenderer#onContextLost
- * @since 3.0.0
- *
- * @param {function} callback - Ignored parameter.
- */
- onContextLost: function ()
- {
- },
-
- /**
- * A NOOP method for handling restored context. Intentionally empty.
- *
- * @method Phaser.Renderer.Canvas.CanvasRenderer#onContextRestored
- * @since 3.0.0
- *
- * @param {function} callback - Ignored parameter.
- */
- onContextRestored: function ()
- {
- },
-
/**
* Resets the transformation matrix of the current context to the identity matrix, thus resetting any transformation.
*
@@ -105245,6 +107011,46 @@ var CanvasRenderer = new Class({
}
},
+ /**
+ * Takes a snapshot of the given area of the given canvas.
+ *
+ * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.
+ *
+ * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets
+ * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
+ *
+ * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotCanvas
+ * @since 3.19.0
+ *
+ * @param {HTMLCanvasElement} canvas - The canvas to grab from.
+ * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.
+ * @param {boolean} [getPixel=false] - Grab a single pixel as a Color object, or an area as an Image object?
+ * @param {integer} [x=0] - The x coordinate to grab from.
+ * @param {integer} [y=0] - The y coordinate to grab from.
+ * @param {integer} [width=canvas.width] - The width of the area to grab.
+ * @param {integer} [height=canvas.height] - The height of the area to grab.
+ * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.
+ * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.
+ *
+ * @return {this} This Canvas Renderer.
+ */
+ snapshotCanvas: function (canvas, callback, getPixel, x, y, width, height, type, encoderOptions)
+ {
+ if (getPixel === undefined) { getPixel = false; }
+
+ this.snapshotArea(x, y, width, height, callback, type, encoderOptions);
+
+ var state = this.snapshotState;
+
+ state.getPixel = getPixel;
+
+ CanvasSnapshot(this.canvas, state);
+
+ state.callback = null;
+
+ return this;
+ },
+
/**
* Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.
*
@@ -105373,14 +107179,16 @@ var CanvasRenderer = new Class({
var frameY = cd.y;
var frameWidth = frame.cutWidth;
var frameHeight = frame.cutHeight;
+ var customPivot = frame.customPivot;
+
var res = frame.source.resolution;
- var x = -sprite.displayOriginX + frame.x;
- var y = -sprite.displayOriginY + frame.y;
+ var displayOriginX = sprite.displayOriginX;
+ var displayOriginY = sprite.displayOriginY;
+
+ var x = -displayOriginX + frame.x;
+ var y = -displayOriginY + frame.y;
- var fx = (sprite.flipX) ? -1 : 1;
- var fy = (sprite.flipY) ? -1 : 1;
-
if (sprite.isCropped)
{
var crop = sprite._crop;
@@ -105396,10 +107204,10 @@ var CanvasRenderer = new Class({
frameX = crop.cx;
frameY = crop.cy;
- x = -sprite.displayOriginX + crop.x;
- y = -sprite.displayOriginY + crop.y;
+ x = -displayOriginX + crop.x;
+ y = -displayOriginY + crop.y;
- if (fx === -1)
+ if (sprite.flipX)
{
if (x >= 0)
{
@@ -105411,7 +107219,7 @@ var CanvasRenderer = new Class({
}
}
- if (fy === -1)
+ if (sprite.flipY)
{
if (y >= 0)
{
@@ -105424,7 +107232,31 @@ var CanvasRenderer = new Class({
}
}
- spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX, sprite.scaleY);
+ var flipX = 1;
+ var flipY = 1;
+
+ if (sprite.flipX)
+ {
+ if (!customPivot)
+ {
+ x += (-frame.realWidth + (displayOriginX * 2));
+ }
+
+ flipX = -1;
+ }
+
+ // Auto-invert the flipY if this is coming from a GLTexture
+ if (sprite.flipY)
+ {
+ if (!customPivot)
+ {
+ y += (-frame.realHeight + (displayOriginY * 2));
+ }
+
+ flipY = -1;
+ }
+
+ spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY);
camMatrix.copyFrom(camera.matrix);
@@ -105453,8 +107285,6 @@ var CanvasRenderer = new Class({
calcMatrix.setToContext(ctx);
- ctx.scale(fx, fy);
-
ctx.globalCompositeOperation = this.blendModes[sprite.blendMode];
ctx.globalAlpha = alpha;
@@ -105484,7 +107314,7 @@ module.exports = CanvasRenderer;
/***/ }),
-/* 481 */
+/* 483 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -105493,7 +107323,7 @@ module.exports = CanvasRenderer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CanvasPool = __webpack_require__(24);
+var CanvasPool = __webpack_require__(25);
var Color = __webpack_require__(33);
var GetFastValue = __webpack_require__(2);
@@ -105577,7 +107407,7 @@ module.exports = CanvasSnapshot;
/***/ }),
-/* 482 */
+/* 484 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -105586,8 +107416,8 @@ module.exports = CanvasSnapshot;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var modes = __webpack_require__(52);
-var CanvasFeatures = __webpack_require__(291);
+var modes = __webpack_require__(53);
+var CanvasFeatures = __webpack_require__(294);
/**
* Returns an array which maps the default blend modes to supported Canvas blend modes.
@@ -105641,7 +107471,7 @@ module.exports = GetBlendModes;
/***/ }),
-/* 483 */
+/* 485 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -105651,22 +107481,24 @@ module.exports = GetBlendModes;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BaseCamera = __webpack_require__(112);
-var CameraEvents = __webpack_require__(48);
+var BaseCamera = __webpack_require__(113);
+var CameraEvents = __webpack_require__(49);
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(26);
-var IsSizePowerOfTwo = __webpack_require__(117);
-var ScaleEvents = __webpack_require__(89);
-var SpliceOne = __webpack_require__(78);
-var TextureEvents = __webpack_require__(118);
+var CONST = __webpack_require__(31);
+var GameEvents = __webpack_require__(18);
+var IsSizePowerOfTwo = __webpack_require__(118);
+var NOOP = __webpack_require__(1);
+var ScaleEvents = __webpack_require__(90);
+var SpliceOne = __webpack_require__(79);
+var TextureEvents = __webpack_require__(119);
var TransformMatrix = __webpack_require__(32);
var Utils = __webpack_require__(9);
-var WebGLSnapshot = __webpack_require__(484);
+var WebGLSnapshot = __webpack_require__(486);
// Default Pipelines
-var BitmapMaskPipeline = __webpack_require__(485);
-var ForwardDiffuseLightPipeline = __webpack_require__(486);
-var TextureTintPipeline = __webpack_require__(226);
+var BitmapMaskPipeline = __webpack_require__(487);
+var ForwardDiffuseLightPipeline = __webpack_require__(488);
+var TextureTintPipeline = __webpack_require__(229);
/**
* @callback WebGLContextCallback
@@ -105697,9 +107529,6 @@ var WebGLRenderer = new Class({
function WebGLRenderer (game)
{
- // eslint-disable-next-line consistent-this
- var renderer = this;
-
var gameConfig = game.config;
var contextCreationConfig = {
@@ -105780,24 +107609,6 @@ var WebGLRenderer = new Class({
*/
this.canvas = game.canvas;
- /**
- * An array of functions to invoke if the WebGL context is lost.
- *
- * @name Phaser.Renderer.WebGL.WebGLRenderer#lostContextCallbacks
- * @type {WebGLContextCallback[]}
- * @since 3.0.0
- */
- this.lostContextCallbacks = [];
-
- /**
- * An array of functions to invoke if the WebGL context is restored.
- *
- * @name Phaser.Renderer.WebGL.WebGLRenderer#restoredContextCallbacks
- * @type {WebGLContextCallback[]}
- * @since 3.0.0
- */
- this.restoredContextCallbacks = [];
-
/**
* An array of blend modes supported by the WebGL Renderer.
*
@@ -105821,7 +107632,7 @@ var WebGLRenderer = new Class({
this.nativeTextures = [];
/**
- * Set to `true` if the WebGL context of the renderer is lost.
+ * This property is set to `true` if the WebGL context of the renderer is lost.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#contextLost
* @type {boolean}
@@ -105857,7 +107668,10 @@ var WebGLRenderer = new Class({
getPixel: false,
callback: null,
type: 'image/png',
- encoder: 0.92
+ encoder: 0.92,
+ isFramebuffer: false,
+ bufferWidth: 0,
+ bufferHeight: 0
};
// Internal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc)
@@ -105956,7 +107770,6 @@ var WebGLRenderer = new Class({
* @type {Uint32Array}
* @since 3.0.0
*/
- // this.currentScissor = new Uint32Array([ 0, 0, this.width, this.height ]);
this.currentScissor = null;
/**
@@ -105968,32 +107781,25 @@ var WebGLRenderer = new Class({
*/
this.scissorStack = [];
- // Setup context lost and restore event listeners
+ /**
+ * The handler to invoke when the context is lost.
+ * This should not be changed and is set in the boot method.
+ *
+ * @name Phaser.Renderer.WebGL.WebGLRenderer#contextLostHandler
+ * @type {function}
+ * @since 3.19.0
+ */
+ this.contextLostHandler = NOOP;
- this.canvas.addEventListener('webglcontextlost', function (event)
- {
- renderer.contextLost = true;
- event.preventDefault();
-
- for (var index = 0; index < renderer.lostContextCallbacks.length; ++index)
- {
- var callback = renderer.lostContextCallbacks[index];
- callback[0].call(callback[1], renderer);
- }
- }, false);
-
- this.canvas.addEventListener('webglcontextrestored', function ()
- {
- renderer.contextLost = false;
- renderer.init(renderer.config);
- for (var index = 0; index < renderer.restoredContextCallbacks.length; ++index)
- {
- var callback = renderer.restoredContextCallbacks[index];
- callback[0].call(callback[1], renderer);
- }
- }, false);
-
- // These are initialized post context creation
+ /**
+ * The handler to invoke when the context is restored.
+ * This should not be changed and is set in the boot method.
+ *
+ * @name Phaser.Renderer.WebGL.WebGLRenderer#contextRestoredHandler
+ * @type {function}
+ * @since 3.19.0
+ */
+ this.contextRestoredHandler = NOOP;
/**
* The underlying WebGL context of the renderer.
@@ -106164,6 +107970,36 @@ var WebGLRenderer = new Class({
*/
this.glFuncMap = null;
+ /**
+ * The `type` of the Game Object being currently rendered.
+ * This can be used by advanced render functions for batching look-ahead.
+ *
+ * @name Phaser.Renderer.WebGL.WebGLRenderer#currentType
+ * @type {string}
+ * @since 3.19.0
+ */
+ this.currentType = '';
+
+ /**
+ * Is the `type` of the Game Object being currently rendered different than the
+ * type of the object before it in the display list? I.e. it's a 'new' type.
+ *
+ * @name Phaser.Renderer.WebGL.WebGLRenderer#newType
+ * @type {boolean}
+ * @since 3.19.0
+ */
+ this.newType = false;
+
+ /**
+ * Does the `type` of the next Game Object in the display list match that
+ * of the object being currently rendered?
+ *
+ * @name Phaser.Renderer.WebGL.WebGLRenderer#nextTypeMatch
+ * @type {boolean}
+ * @since 3.19.0
+ */
+ this.nextTypeMatch = false;
+
this.init(this.config);
},
@@ -106203,6 +108039,29 @@ var WebGLRenderer = new Class({
this.gl = gl;
+ var _this = this;
+
+ this.contextLostHandler = function (event)
+ {
+ _this.contextLost = true;
+
+ _this.game.events.emit(GameEvents.CONTEXT_LOST, _this);
+
+ event.preventDefault();
+ };
+
+ this.contextRestoredHandler = function ()
+ {
+ _this.contextLost = false;
+
+ _this.init(_this.config);
+
+ _this.game.events.emit(GameEvents.CONTEXT_RESTORED, _this);
+ };
+
+ canvas.addEventListener('webglcontextlost', this.contextLostHandler, false);
+ canvas.addEventListener('webglcontextrestored', this.contextRestoredHandler, false);
+
// Set it back into the Game, so developers can access it from there too
game.context = gl;
@@ -106401,42 +108260,6 @@ var WebGLRenderer = new Class({
return this;
},
- /**
- * Adds a callback to be invoked when the WebGL context has been restored by the browser.
- *
- * @method Phaser.Renderer.WebGL.WebGLRenderer#onContextRestored
- * @since 3.0.0
- *
- * @param {WebGLContextCallback} callback - The callback to be invoked on context restoration.
- * @param {object} target - The context of the callback.
- *
- * @return {this} This WebGLRenderer instance.
- */
- onContextRestored: function (callback, target)
- {
- this.restoredContextCallbacks.push([ callback, target ]);
-
- return this;
- },
-
- /**
- * Adds a callback to be invoked when the WebGL context has been lost by the browser.
- *
- * @method Phaser.Renderer.WebGL.WebGLRenderer#onContextLost
- * @since 3.0.0
- *
- * @param {WebGLContextCallback} callback - The callback to be invoked on context loss.
- * @param {object} target - The context of the callback.
- *
- * @return {this} This WebGLRenderer instance.
- */
- onContextLost: function (callback, target)
- {
- this.lostContextCallbacks.push([ callback, target ]);
-
- return this;
- },
-
/**
* Checks if a WebGL extension is supported
*
@@ -106609,6 +108432,8 @@ var WebGLRenderer = new Class({
*/
setScissor: function (x, y, width, height, drawingBufferHeight)
{
+ if (drawingBufferHeight === undefined) { drawingBufferHeight = this.drawingBufferHeight; }
+
var gl = this.gl;
var current = this.currentScissor;
@@ -106821,12 +108646,14 @@ var WebGLRenderer = new Class({
/**
* Creates a new custom blend mode for the renderer.
+ *
+ * See https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Blending_modes
*
* @method Phaser.Renderer.WebGL.WebGLRenderer#addBlendMode
* @since 3.0.0
*
- * @param {function} func - An array containing the WebGL functions to use for the source and the destination blending factors, respectively. See the possible constants for {@link WebGLRenderingContext#blendFunc()}.
- * @param {function} equation - The equation to use for combining the RGB and alpha components of a new pixel with a rendered one. See the possible constants for {@link WebGLRenderingContext#blendEquation()}.
+ * @param {GLenum[]} func - An array containing the WebGL functions to use for the source and the destination blending factors, respectively. See the possible constants for {@link WebGLRenderingContext#blendFunc()}.
+ * @param {GLenum} equation - The equation to use for combining the RGB and alpha components of a new pixel with a rendered one. See the possible constants for {@link WebGLRenderingContext#blendEquation()}.
*
* @return {integer} The index of the new blend mode, used for referencing it in the future.
*/
@@ -107663,6 +109490,20 @@ var WebGLRenderer = new Class({
// Apply scissor for cam region + render background color, if not transparent
this.preRenderCamera(camera);
+ // Nothing to render, so bail out
+ if (childCount === 0)
+ {
+ this.setBlendMode(CONST.BlendModes.NORMAL);
+
+ // Applies camera effects and pops the scissor, if set
+ this.postRenderCamera(camera);
+
+ return;
+ }
+
+ // Reset the current type
+ this.currentType = '';
+
var current = this.currentMask;
for (var i = 0; i < childCount; i++)
@@ -107694,7 +109535,19 @@ var WebGLRenderer = new Class({
mask.preRenderWebGL(this, child, camera);
}
+ var type = child.type;
+
+ if (type !== this.currentType)
+ {
+ this.newType = true;
+ this.currentType = type;
+ }
+
+ this.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === this.currentType) : false;
+
child.renderWebGL(this, child, interpolationPercentage, camera);
+
+ this.newType = false;
}
current = this.currentMask;
@@ -107841,6 +109694,65 @@ var WebGLRenderer = new Class({
return this;
},
+ /**
+ * Takes a snapshot of the given area of the given frame buffer.
+ *
+ * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.
+ *
+ * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.
+ * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,
+ * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,
+ * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
+ *
+ * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotFramebuffer
+ * @since 3.19.0
+ *
+ * @param {WebGLFramebuffer} framebuffer - The framebuffer to grab from.
+ * @param {integer} bufferWidth - The width of the framebuffer.
+ * @param {integer} bufferHeight - The height of the framebuffer.
+ * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.
+ * @param {boolean} [getPixel=false] - Grab a single pixel as a Color object, or an area as an Image object?
+ * @param {integer} [x=0] - The x coordinate to grab from.
+ * @param {integer} [y=0] - The y coordinate to grab from.
+ * @param {integer} [width=bufferWidth] - The width of the area to grab.
+ * @param {integer} [height=bufferHeight] - The height of the area to grab.
+ * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.
+ * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.
+ *
+ * @return {this} This WebGL Renderer.
+ */
+ snapshotFramebuffer: function (framebuffer, bufferWidth, bufferHeight, callback, getPixel, x, y, width, height, type, encoderOptions)
+ {
+ if (getPixel === undefined) { getPixel = false; }
+ if (x === undefined) { x = 0; }
+ if (y === undefined) { y = 0; }
+ if (width === undefined) { width = bufferWidth; }
+ if (height === undefined) { height = bufferHeight; }
+
+ var currentFramebuffer = this.currentFramebuffer;
+
+ this.snapshotArea(x, y, width, height, callback, type, encoderOptions);
+
+ var state = this.snapshotState;
+
+ state.getPixel = getPixel;
+
+ state.isFramebuffer = true;
+ state.bufferWidth = bufferWidth;
+ state.bufferHeight = bufferHeight;
+
+ this.setFramebuffer(framebuffer);
+
+ WebGLSnapshot(this.canvas, state);
+
+ this.setFramebuffer(currentFramebuffer);
+
+ state.callback = null;
+ state.isFramebuffer = false;
+
+ return this;
+ },
+
/**
* Creates a WebGL Texture based on the given canvas element.
*
@@ -108281,6 +110193,14 @@ var WebGLRenderer = new Class({
destroy: function ()
{
// Clear-up anything that should be cleared :)
+
+ for (var i = 0; i < this.nativeTextures.length; i++)
+ {
+ this.gl.deleteTexture(this.nativeTextures[i]);
+ }
+
+ this.nativeTextures = [];
+
for (var key in this.pipelines)
{
this.pipelines[key].destroy();
@@ -108288,21 +110208,23 @@ var WebGLRenderer = new Class({
delete this.pipelines[key];
}
- for (var index = 0; index < this.nativeTextures.length; index++)
- {
- this.deleteTexture(this.nativeTextures[index]);
+ this.defaultCamera.destroy();
- delete this.nativeTextures[index];
- }
+ this.currentMask = null;
+ this.currentCameraMask = null;
- delete this.gl;
- delete this.game;
+ this.canvas.removeEventListener('webglcontextlost', this.contextLostHandler, false);
+ this.canvas.removeEventListener('webglcontextrestored', this.contextRestoredHandler, false);
- this.maskStack.length = 0;
+ this.game = null;
+ this.gl = null;
+ this.canvas = null;
+
+ this.maskStack = [];
this.contextLost = true;
+
this.extensions = {};
- this.nativeTextures.length = 0;
}
});
@@ -108311,7 +110233,7 @@ module.exports = WebGLRenderer;
/***/ }),
-/* 484 */
+/* 486 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -108320,7 +110242,7 @@ module.exports = WebGLRenderer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CanvasPool = __webpack_require__(24);
+var CanvasPool = __webpack_require__(25);
var Color = __webpack_require__(33);
var GetFastValue = __webpack_require__(2);
@@ -108345,23 +110267,34 @@ var WebGLSnapshot = function (sourceCanvas, config)
var encoderOptions = GetFastValue(config, 'encoder', 0.92);
var x = GetFastValue(config, 'x', 0);
var y = GetFastValue(config, 'y', 0);
- var width = GetFastValue(config, 'width', gl.drawingBufferWidth);
- var height = GetFastValue(config, 'height', gl.drawingBufferHeight);
+
var getPixel = GetFastValue(config, 'getPixel', false);
+ var isFramebuffer = GetFastValue(config, 'isFramebuffer', false);
+
+ var bufferWidth = (isFramebuffer) ? GetFastValue(config, 'bufferWidth', 1) : gl.drawingBufferWidth;
+ var bufferHeight = (isFramebuffer) ? GetFastValue(config, 'bufferHeight', 1) : gl.drawingBufferHeight;
+
if (getPixel)
{
var pixel = new Uint8Array(4);
- gl.readPixels(x, gl.drawingBufferHeight - y, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
+ var destY = (isFramebuffer) ? y : bufferHeight - y;
+
+ gl.readPixels(x, destY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
callback.call(null, new Color(pixel[0], pixel[1], pixel[2], pixel[3] / 255));
}
else
{
- var pixels = new Uint8Array(width * height * 4);
+ var width = GetFastValue(config, 'width', bufferWidth);
+ var height = GetFastValue(config, 'height', bufferHeight);
- gl.readPixels(x, gl.drawingBufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
+ var total = width * height * 4;
+
+ var pixels = new Uint8Array(total);
+
+ gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
var canvas = CanvasPool.createWebGL(this, width, height);
var ctx = canvas.getContext('2d');
@@ -108369,13 +110302,13 @@ var WebGLSnapshot = function (sourceCanvas, config)
var imageData = ctx.getImageData(0, 0, width, height);
var data = imageData.data;
-
+
for (var py = 0; py < height; py++)
{
for (var px = 0; px < width; px++)
{
var sourceIndex = ((height - py) * width + px) * 4;
- var destIndex = (py * width + px) * 4;
+ var destIndex = (isFramebuffer) ? total - ((py * width + (width - px)) * 4) : (py * width + px) * 4;
data[destIndex + 0] = pixels[sourceIndex + 0];
data[destIndex + 1] = pixels[sourceIndex + 1];
@@ -108383,7 +110316,7 @@ var WebGLSnapshot = function (sourceCanvas, config)
data[destIndex + 3] = pixels[sourceIndex + 3];
}
}
-
+
ctx.putImageData(imageData, 0, 0);
var image = new Image();
@@ -108410,7 +110343,7 @@ module.exports = WebGLSnapshot;
/***/ }),
-/* 485 */
+/* 487 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -108421,9 +110354,9 @@ module.exports = WebGLSnapshot;
*/
var Class = __webpack_require__(0);
-var ShaderSourceFS = __webpack_require__(732);
-var ShaderSourceVS = __webpack_require__(733);
-var WebGLPipeline = __webpack_require__(225);
+var ShaderSourceFS = __webpack_require__(737);
+var ShaderSourceVS = __webpack_require__(738);
+var WebGLPipeline = __webpack_require__(228);
/**
* @classdesc
@@ -108673,7 +110606,7 @@ module.exports = BitmapMaskPipeline;
/***/ }),
-/* 486 */
+/* 488 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -108684,8 +110617,8 @@ module.exports = BitmapMaskPipeline;
*/
var Class = __webpack_require__(0);
-var ShaderSourceFS = __webpack_require__(734);
-var TextureTintPipeline = __webpack_require__(226);
+var ShaderSourceFS = __webpack_require__(739);
+var TextureTintPipeline = __webpack_require__(229);
var LIGHT_COUNT = 10;
@@ -109175,7 +111108,7 @@ module.exports = ForwardDiffuseLightPipeline;
/***/ }),
-/* 487 */
+/* 489 */
/***/ (function(module, exports) {
/**
@@ -109925,23 +111858,23 @@ module.exports = ModelViewProjection;
/***/ }),
-/* 488 */,
-/* 489 */,
-/* 490 */
+/* 490 */,
+/* 491 */,
+/* 492 */
/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(491);
-__webpack_require__(492);
__webpack_require__(493);
__webpack_require__(494);
__webpack_require__(495);
__webpack_require__(496);
__webpack_require__(497);
__webpack_require__(498);
+__webpack_require__(499);
+__webpack_require__(500);
/***/ }),
-/* 491 */
+/* 493 */
/***/ (function(module, exports) {
/**
@@ -109981,7 +111914,7 @@ if (!Array.prototype.forEach)
/***/ }),
-/* 492 */
+/* 494 */
/***/ (function(module, exports) {
/**
@@ -109997,7 +111930,7 @@ if (!Array.isArray)
/***/ }),
-/* 493 */
+/* 495 */
/***/ (function(module, exports) {
/* Copyright 2013 Chris Wilson
@@ -110184,7 +112117,7 @@ BiquadFilterNode.type and OscillatorNode.type.
/***/ }),
-/* 494 */
+/* 496 */
/***/ (function(module, exports) {
/**
@@ -110199,7 +112132,7 @@ if (!window.console)
/***/ }),
-/* 495 */
+/* 497 */
/***/ (function(module, exports) {
// ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc
@@ -110211,7 +112144,7 @@ if (!Math.trunc) {
/***/ }),
-/* 496 */
+/* 498 */
/***/ (function(module, exports) {
/**
@@ -110248,7 +112181,7 @@ if (!Math.trunc) {
/***/ }),
-/* 497 */
+/* 499 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {// References:
@@ -110318,10 +112251,10 @@ if (!global.cancelAnimationFrame) {
};
}
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(222)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(225)))
/***/ }),
-/* 498 */
+/* 500 */
/***/ (function(module, exports) {
/**
@@ -110374,7 +112307,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o
/***/ }),
-/* 499 */
+/* 501 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -110415,7 +112348,7 @@ module.exports = Angle;
/***/ }),
-/* 500 */
+/* 502 */
/***/ (function(module, exports) {
/**
@@ -110454,7 +112387,7 @@ module.exports = Call;
/***/ }),
-/* 501 */
+/* 503 */
/***/ (function(module, exports) {
/**
@@ -110512,7 +112445,7 @@ module.exports = GetFirst;
/***/ }),
-/* 502 */
+/* 504 */
/***/ (function(module, exports) {
/**
@@ -110570,7 +112503,7 @@ module.exports = GetLast;
/***/ }),
-/* 503 */
+/* 505 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -110579,11 +112512,11 @@ module.exports = GetLast;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var AlignIn = __webpack_require__(230);
-var CONST = __webpack_require__(143);
+var AlignIn = __webpack_require__(233);
+var CONST = __webpack_require__(144);
var GetFastValue = __webpack_require__(2);
var NOOP = __webpack_require__(1);
-var Zone = __webpack_require__(106);
+var Zone = __webpack_require__(107);
var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1);
@@ -110680,7 +112613,7 @@ module.exports = GridAlign;
/***/ }),
-/* 504 */
+/* 506 */
/***/ (function(module, exports) {
/**
@@ -110707,7 +112640,7 @@ module.exports = 'add';
/***/ }),
-/* 505 */
+/* 507 */
/***/ (function(module, exports) {
/**
@@ -110735,7 +112668,7 @@ module.exports = 'complete';
/***/ }),
-/* 506 */
+/* 508 */
/***/ (function(module, exports) {
/**
@@ -110762,7 +112695,7 @@ module.exports = 'repeat';
/***/ }),
-/* 507 */
+/* 509 */
/***/ (function(module, exports) {
/**
@@ -110790,7 +112723,7 @@ module.exports = 'restart';
/***/ }),
-/* 508 */
+/* 510 */
/***/ (function(module, exports) {
/**
@@ -110818,7 +112751,7 @@ module.exports = 'start';
/***/ }),
-/* 509 */
+/* 511 */
/***/ (function(module, exports) {
/**
@@ -110842,7 +112775,7 @@ module.exports = 'pauseall';
/***/ }),
-/* 510 */
+/* 512 */
/***/ (function(module, exports) {
/**
@@ -110866,7 +112799,7 @@ module.exports = 'remove';
/***/ }),
-/* 511 */
+/* 513 */
/***/ (function(module, exports) {
/**
@@ -110889,7 +112822,7 @@ module.exports = 'resumeall';
/***/ }),
-/* 512 */
+/* 514 */
/***/ (function(module, exports) {
/**
@@ -110918,7 +112851,7 @@ module.exports = 'animationcomplete';
/***/ }),
-/* 513 */
+/* 515 */
/***/ (function(module, exports) {
/**
@@ -110946,7 +112879,7 @@ module.exports = 'animationcomplete-';
/***/ }),
-/* 514 */
+/* 516 */
/***/ (function(module, exports) {
/**
@@ -110975,7 +112908,7 @@ module.exports = 'animationrepeat-';
/***/ }),
-/* 515 */
+/* 517 */
/***/ (function(module, exports) {
/**
@@ -111003,7 +112936,7 @@ module.exports = 'animationrestart-';
/***/ }),
-/* 516 */
+/* 518 */
/***/ (function(module, exports) {
/**
@@ -111031,7 +112964,7 @@ module.exports = 'animationstart-';
/***/ }),
-/* 517 */
+/* 519 */
/***/ (function(module, exports) {
/**
@@ -111060,7 +112993,7 @@ module.exports = 'animationupdate-';
/***/ }),
-/* 518 */
+/* 520 */
/***/ (function(module, exports) {
/**
@@ -111090,7 +113023,7 @@ module.exports = 'animationrepeat';
/***/ }),
-/* 519 */
+/* 521 */
/***/ (function(module, exports) {
/**
@@ -111119,7 +113052,7 @@ module.exports = 'animationrestart';
/***/ }),
-/* 520 */
+/* 522 */
/***/ (function(module, exports) {
/**
@@ -111148,7 +113081,7 @@ module.exports = 'animationstart';
/***/ }),
-/* 521 */
+/* 523 */
/***/ (function(module, exports) {
/**
@@ -111178,7 +113111,7 @@ module.exports = 'animationupdate';
/***/ }),
-/* 522 */
+/* 524 */
/***/ (function(module, exports) {
/**
@@ -111327,7 +113260,7 @@ module.exports = ComputedSize;
/***/ }),
-/* 523 */
+/* 525 */
/***/ (function(module, exports) {
/**
@@ -111452,7 +113385,7 @@ module.exports = Crop;
/***/ }),
-/* 524 */
+/* 526 */
/***/ (function(module, exports) {
/**
@@ -111616,7 +113549,7 @@ module.exports = Flip;
/***/ }),
-/* 525 */
+/* 527 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -111625,9 +113558,9 @@ module.exports = Flip;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
-var RotateAround = __webpack_require__(251);
-var Vector2 = __webpack_require__(4);
+var Rectangle = __webpack_require__(11);
+var RotateAround = __webpack_require__(254);
+var Vector2 = __webpack_require__(3);
/**
* Provides methods used for obtaining the bounds of a Game Object.
@@ -111975,7 +113908,383 @@ module.exports = GetBounds;
/***/ }),
-/* 526 */
+/* 528 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Blur Event.
+ *
+ * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded
+ * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps
+ * tab, or if they simply remove focus from the browser to another app.
+ *
+ * @event Phaser.Core.Events#BLUR
+ * @since 3.0.0
+ */
+module.exports = 'blur';
+
+
+/***/ }),
+/* 529 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Boot Event.
+ *
+ * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.
+ * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.
+ *
+ * @event Phaser.Core.Events#BOOT
+ * @since 3.0.0
+ */
+module.exports = 'boot';
+
+
+/***/ }),
+/* 530 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Context Lost Event.
+ *
+ * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.
+ *
+ * The partner event is `CONTEXT_RESTORED`.
+ *
+ * @event Phaser.Core.Events#CONTEXT_LOST
+ * @since 3.19.0
+ */
+module.exports = 'contextlost';
+
+
+/***/ }),
+/* 531 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Context Restored Event.
+ *
+ * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.
+ *
+ * The partner event is `CONTEXT_LOST`.
+ *
+ * @event Phaser.Core.Events#CONTEXT_RESTORED
+ * @since 3.19.0
+ */
+module.exports = 'contextrestored';
+
+
+/***/ }),
+/* 532 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Destroy Event.
+ *
+ * This event is dispatched when the game instance has been told to destroy itself.
+ * Lots of internal systems listen to this event in order to clear themselves out.
+ * Custom plugins and game code should also do the same.
+ *
+ * @event Phaser.Core.Events#DESTROY
+ * @since 3.0.0
+ */
+module.exports = 'destroy';
+
+
+/***/ }),
+/* 533 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Focus Event.
+ *
+ * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded
+ * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.
+ *
+ * @event Phaser.Core.Events#FOCUS
+ * @since 3.0.0
+ */
+module.exports = 'focus';
+
+
+/***/ }),
+/* 534 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Hidden Event.
+ *
+ * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded
+ * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.
+ *
+ * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which
+ * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something
+ * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)
+ *
+ * @event Phaser.Core.Events#HIDDEN
+ * @since 3.0.0
+ */
+module.exports = 'hidden';
+
+
+/***/ }),
+/* 535 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Pause Event.
+ *
+ * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.
+ *
+ * @event Phaser.Core.Events#PAUSE
+ * @since 3.0.0
+ */
+module.exports = 'pause';
+
+
+/***/ }),
+/* 536 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Post-Render Event.
+ *
+ * This event is dispatched right at the end of the render process.
+ *
+ * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.
+ * Use it for any last minute post-processing before the next game step begins.
+ *
+ * @event Phaser.Core.Events#POST_RENDER
+ * @since 3.0.0
+ *
+ * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.
+ */
+module.exports = 'postrender';
+
+
+/***/ }),
+/* 537 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Post-Step Event.
+ *
+ * This event is dispatched after the Scene Manager has updated.
+ * Hook into it from plugins or systems that need to do things before the render starts.
+ *
+ * @event Phaser.Core.Events#POST_STEP
+ * @since 3.0.0
+ *
+ * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
+ * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
+ */
+module.exports = 'poststep';
+
+
+/***/ }),
+/* 538 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Pre-Render Event.
+ *
+ * This event is dispatched immediately before any of the Scenes have started to render.
+ *
+ * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.
+ *
+ * @event Phaser.Core.Events#PRE_RENDER
+ * @since 3.0.0
+ *
+ * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.
+ */
+module.exports = 'prerender';
+
+
+/***/ }),
+/* 539 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Pre-Step Event.
+ *
+ * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.
+ * Hook into it from plugins or systems that need to update before the Scene Manager does.
+ *
+ * @event Phaser.Core.Events#PRE_STEP
+ * @since 3.0.0
+ *
+ * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
+ * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
+ */
+module.exports = 'prestep';
+
+
+/***/ }),
+/* 540 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Ready Event.
+ *
+ * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,
+ * and all local systems are now able to start.
+ *
+ * @event Phaser.Core.Events#READY
+ * @since 3.0.0
+ */
+module.exports = 'ready';
+
+
+/***/ }),
+/* 541 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Resume Event.
+ *
+ * This event is dispatched when the game loop leaves a paused state and resumes running.
+ *
+ * @event Phaser.Core.Events#RESUME
+ * @since 3.0.0
+ */
+module.exports = 'resume';
+
+
+/***/ }),
+/* 542 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Step Event.
+ *
+ * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.
+ * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.
+ *
+ * @event Phaser.Core.Events#STEP
+ * @since 3.0.0
+ *
+ * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
+ * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
+ */
+module.exports = 'step';
+
+
+/***/ }),
+/* 543 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Game Visible Event.
+ *
+ * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded
+ * enters a visible state, previously having been hidden.
+ *
+ * Only browsers that support the Visibility API will cause this event to be emitted.
+ *
+ * @event Phaser.Core.Events#VISIBLE
+ * @since 3.0.0
+ */
+module.exports = 'visible';
+
+
+/***/ }),
+/* 544 */
/***/ (function(module, exports) {
/**
@@ -112166,8 +114475,8 @@ var Origin = {
*/
updateDisplayOrigin: function ()
{
- this._displayOriginX = Math.round(this.originX * this.width);
- this._displayOriginY = Math.round(this.originY * this.height);
+ this._displayOriginX = this.originX * this.width;
+ this._displayOriginY = this.originY * this.height;
return this;
}
@@ -112178,7 +114487,7 @@ module.exports = Origin;
/***/ }),
-/* 527 */
+/* 545 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -112188,10 +114497,10 @@ module.exports = Origin;
*/
var DegToRad = __webpack_require__(35);
-var GetBoolean = __webpack_require__(87);
-var GetValue = __webpack_require__(6);
-var TWEEN_CONST = __webpack_require__(88);
-var Vector2 = __webpack_require__(4);
+var GetBoolean = __webpack_require__(88);
+var GetValue = __webpack_require__(5);
+var TWEEN_CONST = __webpack_require__(89);
+var Vector2 = __webpack_require__(3);
/**
* Provides methods used for managing a Game Object following a Path.
@@ -112575,7 +114884,7 @@ module.exports = PathFollower;
/***/ }),
-/* 528 */
+/* 546 */
/***/ (function(module, exports) {
/**
@@ -112762,7 +115071,7 @@ module.exports = Size;
/***/ }),
-/* 529 */
+/* 547 */
/***/ (function(module, exports) {
/**
@@ -112892,7 +115201,7 @@ module.exports = Texture;
/***/ }),
-/* 530 */
+/* 548 */
/***/ (function(module, exports) {
/**
@@ -113100,7 +115409,7 @@ module.exports = TextureCrop;
/***/ }),
-/* 531 */
+/* 549 */
/***/ (function(module, exports) {
/**
@@ -113401,6 +115710,7 @@ var Tint = {
/**
* The tint value being applied to the whole of the Game Object.
+ * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.
*
* @name Phaser.GameObjects.Components.Tint#tint
* @type {integer}
@@ -113439,7 +115749,7 @@ module.exports = Tint;
/***/ }),
-/* 532 */
+/* 550 */
/***/ (function(module, exports) {
/**
@@ -113471,7 +115781,7 @@ module.exports = 'changedata';
/***/ }),
-/* 533 */
+/* 551 */
/***/ (function(module, exports) {
/**
@@ -113502,7 +115812,7 @@ module.exports = 'changedata-';
/***/ }),
-/* 534 */
+/* 552 */
/***/ (function(module, exports) {
/**
@@ -113530,7 +115840,7 @@ module.exports = 'removedata';
/***/ }),
-/* 535 */
+/* 553 */
/***/ (function(module, exports) {
/**
@@ -113558,7 +115868,7 @@ module.exports = 'setdata';
/***/ }),
-/* 536 */
+/* 554 */
/***/ (function(module, exports) {
/**
@@ -113583,7 +115893,7 @@ module.exports = 'destroy';
/***/ }),
-/* 537 */
+/* 555 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -113624,7 +115934,7 @@ module.exports = IncAlpha;
/***/ }),
-/* 538 */
+/* 556 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -113665,7 +115975,7 @@ module.exports = IncX;
/***/ }),
-/* 539 */
+/* 557 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -113712,7 +116022,7 @@ module.exports = IncXY;
/***/ }),
-/* 540 */
+/* 558 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -113753,7 +116063,7 @@ module.exports = IncY;
/***/ }),
-/* 541 */
+/* 559 */
/***/ (function(module, exports) {
/**
@@ -113802,7 +116112,7 @@ module.exports = PlaceOnCircle;
/***/ }),
-/* 542 */
+/* 560 */
/***/ (function(module, exports) {
/**
@@ -113854,7 +116164,7 @@ module.exports = PlaceOnEllipse;
/***/ }),
-/* 543 */
+/* 561 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -113863,7 +116173,7 @@ module.exports = PlaceOnEllipse;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetPoints = __webpack_require__(148);
+var GetPoints = __webpack_require__(149);
/**
* Positions an array of Game Objects on evenly spaced points of a Line.
@@ -113898,7 +116208,7 @@ module.exports = PlaceOnLine;
/***/ }),
-/* 544 */
+/* 562 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -113907,9 +116217,9 @@ module.exports = PlaceOnLine;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MarchingAnts = __webpack_require__(260);
-var RotateLeft = __webpack_require__(261);
-var RotateRight = __webpack_require__(262);
+var MarchingAnts = __webpack_require__(263);
+var RotateLeft = __webpack_require__(264);
+var RotateRight = __webpack_require__(265);
/**
* Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle.
@@ -113956,7 +116266,7 @@ module.exports = PlaceOnRectangle;
/***/ }),
-/* 545 */
+/* 563 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -113965,7 +116275,7 @@ module.exports = PlaceOnRectangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BresenhamPoints = __webpack_require__(263);
+var BresenhamPoints = __webpack_require__(266);
/**
* Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle.
@@ -114017,7 +116327,7 @@ module.exports = PlaceOnTriangle;
/***/ }),
-/* 546 */
+/* 564 */
/***/ (function(module, exports) {
/**
@@ -114054,7 +116364,7 @@ module.exports = PlayAnimation;
/***/ }),
-/* 547 */
+/* 565 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114063,7 +116373,7 @@ module.exports = PlayAnimation;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Random = __webpack_require__(145);
+var Random = __webpack_require__(146);
/**
* Takes an array of Game Objects and positions them at random locations within the Circle.
@@ -114094,7 +116404,7 @@ module.exports = RandomCircle;
/***/ }),
-/* 548 */
+/* 566 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114103,7 +116413,7 @@ module.exports = RandomCircle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Random = __webpack_require__(152);
+var Random = __webpack_require__(153);
/**
* Takes an array of Game Objects and positions them at random locations within the Ellipse.
@@ -114134,7 +116444,7 @@ module.exports = RandomEllipse;
/***/ }),
-/* 549 */
+/* 567 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114143,7 +116453,7 @@ module.exports = RandomEllipse;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Random = __webpack_require__(149);
+var Random = __webpack_require__(150);
/**
* Takes an array of Game Objects and positions them at random locations on the Line.
@@ -114174,7 +116484,7 @@ module.exports = RandomLine;
/***/ }),
-/* 550 */
+/* 568 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114183,7 +116493,7 @@ module.exports = RandomLine;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Random = __webpack_require__(150);
+var Random = __webpack_require__(151);
/**
* Takes an array of Game Objects and positions them at random locations within the Rectangle.
@@ -114212,7 +116522,7 @@ module.exports = RandomRectangle;
/***/ }),
-/* 551 */
+/* 569 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114221,7 +116531,7 @@ module.exports = RandomRectangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Random = __webpack_require__(153);
+var Random = __webpack_require__(154);
/**
* Takes an array of Game Objects and positions them at random locations within the Triangle.
@@ -114252,7 +116562,7 @@ module.exports = RandomTriangle;
/***/ }),
-/* 552 */
+/* 570 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114293,7 +116603,7 @@ module.exports = Rotate;
/***/ }),
-/* 553 */
+/* 571 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114302,8 +116612,8 @@ module.exports = Rotate;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RotateAroundDistance = __webpack_require__(154);
-var DistanceBetween = __webpack_require__(57);
+var RotateAroundDistance = __webpack_require__(155);
+var DistanceBetween = __webpack_require__(58);
/**
* Rotates each item around the given point by the given angle.
@@ -114339,7 +116649,7 @@ module.exports = RotateAround;
/***/ }),
-/* 554 */
+/* 572 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114348,7 +116658,7 @@ module.exports = RotateAround;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MathRotateAroundDistance = __webpack_require__(154);
+var MathRotateAroundDistance = __webpack_require__(155);
/**
* Rotates an array of Game Objects around a point by the given angle and distance.
@@ -114388,7 +116698,7 @@ module.exports = RotateAroundDistance;
/***/ }),
-/* 555 */
+/* 573 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114429,7 +116739,7 @@ module.exports = ScaleX;
/***/ }),
-/* 556 */
+/* 574 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114476,7 +116786,7 @@ module.exports = ScaleXY;
/***/ }),
-/* 557 */
+/* 575 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114517,7 +116827,7 @@ module.exports = ScaleY;
/***/ }),
-/* 558 */
+/* 576 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114558,7 +116868,7 @@ module.exports = SetAlpha;
/***/ }),
-/* 559 */
+/* 577 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114598,7 +116908,7 @@ module.exports = SetBlendMode;
/***/ }),
-/* 560 */
+/* 578 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114639,7 +116949,7 @@ module.exports = SetDepth;
/***/ }),
-/* 561 */
+/* 579 */
/***/ (function(module, exports) {
/**
@@ -114678,7 +116988,7 @@ module.exports = SetHitArea;
/***/ }),
-/* 562 */
+/* 580 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114725,7 +117035,7 @@ module.exports = SetOrigin;
/***/ }),
-/* 563 */
+/* 581 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114766,7 +117076,7 @@ module.exports = SetRotation;
/***/ }),
-/* 564 */
+/* 582 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114813,7 +117123,7 @@ module.exports = SetScale;
/***/ }),
-/* 565 */
+/* 583 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114854,7 +117164,7 @@ module.exports = SetScaleX;
/***/ }),
-/* 566 */
+/* 584 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114895,7 +117205,7 @@ module.exports = SetScaleY;
/***/ }),
-/* 567 */
+/* 585 */
/***/ (function(module, exports) {
/**
@@ -114934,7 +117244,7 @@ module.exports = SetTint;
/***/ }),
-/* 568 */
+/* 586 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -114972,7 +117282,7 @@ module.exports = SetVisible;
/***/ }),
-/* 569 */
+/* 587 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115013,7 +117323,7 @@ module.exports = SetX;
/***/ }),
-/* 570 */
+/* 588 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115060,7 +117370,7 @@ module.exports = SetXY;
/***/ }),
-/* 571 */
+/* 589 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115101,7 +117411,7 @@ module.exports = SetY;
/***/ }),
-/* 572 */
+/* 590 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115110,7 +117420,7 @@ module.exports = SetY;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Vector2 = __webpack_require__(4);
+var Vector2 = __webpack_require__(3);
/**
* Iterate through the items array changing the position of each element to be that of the element that came before
@@ -115231,7 +117541,7 @@ module.exports = ShiftPosition;
/***/ }),
-/* 573 */
+/* 591 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115240,7 +117550,7 @@ module.exports = ShiftPosition;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ArrayShuffle = __webpack_require__(111);
+var ArrayShuffle = __webpack_require__(112);
/**
* Shuffles the array in place. The shuffled array is both modified and returned.
@@ -115264,7 +117574,7 @@ module.exports = Shuffle;
/***/ }),
-/* 574 */
+/* 592 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115273,7 +117583,7 @@ module.exports = Shuffle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MathSmootherStep = __webpack_require__(155);
+var MathSmootherStep = __webpack_require__(156);
/**
* Smootherstep is a sigmoid-like interpolation and clamping function.
@@ -115322,7 +117632,7 @@ module.exports = SmootherStep;
/***/ }),
-/* 575 */
+/* 593 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115331,7 +117641,7 @@ module.exports = SmootherStep;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MathSmoothStep = __webpack_require__(156);
+var MathSmoothStep = __webpack_require__(157);
/**
* Smoothstep is a sigmoid-like interpolation and clamping function.
@@ -115380,7 +117690,7 @@ module.exports = SmoothStep;
/***/ }),
-/* 576 */
+/* 594 */
/***/ (function(module, exports) {
/**
@@ -115443,7 +117753,7 @@ module.exports = Spread;
/***/ }),
-/* 577 */
+/* 595 */
/***/ (function(module, exports) {
/**
@@ -115479,7 +117789,7 @@ module.exports = ToggleVisible;
/***/ }),
-/* 578 */
+/* 596 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115489,7 +117799,7 @@ module.exports = ToggleVisible;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Wrap = __webpack_require__(56);
+var Wrap = __webpack_require__(57);
/**
* Wrap each item's coordinates within a rectangle's area.
@@ -115528,7 +117838,7 @@ module.exports = WrapInRectangle;
/***/ }),
-/* 579 */
+/* 597 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115543,346 +117853,16 @@ module.exports = WrapInRectangle;
module.exports = {
- Animation: __webpack_require__(146),
- AnimationFrame: __webpack_require__(246),
- AnimationManager: __webpack_require__(264),
- Events: __webpack_require__(107)
+ Animation: __webpack_require__(147),
+ AnimationFrame: __webpack_require__(249),
+ AnimationManager: __webpack_require__(267),
+ Events: __webpack_require__(108)
};
/***/ }),
-/* 580 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Blur Event.
- *
- * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded
- * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps
- * tab, or if they simply remove focus from the browser to another app.
- *
- * @event Phaser.Core.Events#BLUR
- * @since 3.0.0
- */
-module.exports = 'blur';
-
-
-/***/ }),
-/* 581 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Boot Event.
- *
- * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.
- * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.
- *
- * @event Phaser.Core.Events#BOOT
- * @since 3.0.0
- */
-module.exports = 'boot';
-
-
-/***/ }),
-/* 582 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Destroy Event.
- *
- * This event is dispatched when the game instance has been told to destroy itself.
- * Lots of internal systems listen to this event in order to clear themselves out.
- * Custom plugins and game code should also do the same.
- *
- * @event Phaser.Core.Events#DESTROY
- * @since 3.0.0
- */
-module.exports = 'destroy';
-
-
-/***/ }),
-/* 583 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Focus Event.
- *
- * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded
- * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.
- *
- * @event Phaser.Core.Events#FOCUS
- * @since 3.0.0
- */
-module.exports = 'focus';
-
-
-/***/ }),
-/* 584 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Hidden Event.
- *
- * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded
- * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.
- *
- * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which
- * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something
- * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)
- *
- * @event Phaser.Core.Events#HIDDEN
- * @since 3.0.0
- */
-module.exports = 'hidden';
-
-
-/***/ }),
-/* 585 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Pause Event.
- *
- * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.
- *
- * @event Phaser.Core.Events#PAUSE
- * @since 3.0.0
- */
-module.exports = 'pause';
-
-
-/***/ }),
-/* 586 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Post-Render Event.
- *
- * This event is dispatched right at the end of the render process.
- *
- * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.
- * Use it for any last minute post-processing before the next game step begins.
- *
- * @event Phaser.Core.Events#POST_RENDER
- * @since 3.0.0
- *
- * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.
- */
-module.exports = 'postrender';
-
-
-/***/ }),
-/* 587 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Post-Step Event.
- *
- * This event is dispatched after the Scene Manager has updated.
- * Hook into it from plugins or systems that need to do things before the render starts.
- *
- * @event Phaser.Core.Events#POST_STEP
- * @since 3.0.0
- *
- * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
- * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
- */
-module.exports = 'poststep';
-
-
-/***/ }),
-/* 588 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Pre-Render Event.
- *
- * This event is dispatched immediately before any of the Scenes have started to render.
- *
- * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.
- *
- * @event Phaser.Core.Events#PRE_RENDER
- * @since 3.0.0
- *
- * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.
- */
-module.exports = 'prerender';
-
-
-/***/ }),
-/* 589 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Pre-Step Event.
- *
- * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.
- * Hook into it from plugins or systems that need to update before the Scene Manager does.
- *
- * @event Phaser.Core.Events#PRE_STEP
- * @since 3.0.0
- *
- * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
- * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
- */
-module.exports = 'prestep';
-
-
-/***/ }),
-/* 590 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Ready Event.
- *
- * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,
- * and all local systems are now able to start.
- *
- * @event Phaser.Core.Events#READY
- * @since 3.0.0
- */
-module.exports = 'ready';
-
-
-/***/ }),
-/* 591 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Resume Event.
- *
- * This event is dispatched when the game loop leaves a paused state and resumes running.
- *
- * @event Phaser.Core.Events#RESUME
- * @since 3.0.0
- */
-module.exports = 'resume';
-
-
-/***/ }),
-/* 592 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Step Event.
- *
- * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.
- * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.
- *
- * @event Phaser.Core.Events#STEP
- * @since 3.0.0
- *
- * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
- * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
- */
-module.exports = 'step';
-
-
-/***/ }),
-/* 593 */
-/***/ (function(module, exports) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-/**
- * The Game Visible Event.
- *
- * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded
- * enters a visible state, previously having been hidden.
- *
- * Only browsers that support the Visibility API will cause this event to be emitted.
- *
- * @event Phaser.Core.Events#VISIBLE
- * @since 3.0.0
- */
-module.exports = 'visible';
-
-
-/***/ }),
-/* 594 */
+/* 598 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115897,15 +117877,15 @@ module.exports = 'visible';
module.exports = {
- BaseCache: __webpack_require__(265),
- CacheManager: __webpack_require__(267),
- Events: __webpack_require__(266)
+ BaseCache: __webpack_require__(268),
+ CacheManager: __webpack_require__(270),
+ Events: __webpack_require__(269)
};
/***/ }),
-/* 595 */
+/* 599 */
/***/ (function(module, exports) {
/**
@@ -115930,7 +117910,7 @@ module.exports = 'add';
/***/ }),
-/* 596 */
+/* 600 */
/***/ (function(module, exports) {
/**
@@ -115955,7 +117935,7 @@ module.exports = 'remove';
/***/ }),
-/* 597 */
+/* 601 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115974,14 +117954,14 @@ module.exports = 'remove';
module.exports = {
- Controls: __webpack_require__(598),
- Scene2D: __webpack_require__(601)
+ Controls: __webpack_require__(602),
+ Scene2D: __webpack_require__(605)
};
/***/ }),
-/* 598 */
+/* 602 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -115996,14 +117976,14 @@ module.exports = {
module.exports = {
- FixedKeyControl: __webpack_require__(599),
- SmoothedKeyControl: __webpack_require__(600)
+ FixedKeyControl: __webpack_require__(603),
+ SmoothedKeyControl: __webpack_require__(604)
};
/***/ }),
-/* 599 */
+/* 603 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -116013,7 +117993,7 @@ module.exports = {
*/
var Class = __webpack_require__(0);
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
/**
* @classdesc
@@ -116309,7 +118289,7 @@ module.exports = FixedKeyControl;
/***/ }),
-/* 600 */
+/* 604 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -116319,7 +118299,7 @@ module.exports = FixedKeyControl;
*/
var Class = __webpack_require__(0);
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
/**
* @classdesc
@@ -116760,9 +118740,9 @@ var SmoothedKeyControl = new Class({
{
cam.zoom += this._zoom;
- if (cam.zoom < 0.1)
+ if (cam.zoom < 0.001)
{
- cam.zoom = 0.1;
+ cam.zoom = 0.001;
}
}
},
@@ -116792,7 +118772,7 @@ module.exports = SmoothedKeyControl;
/***/ }),
-/* 601 */
+/* 605 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -116807,16 +118787,16 @@ module.exports = SmoothedKeyControl;
module.exports = {
- Camera: __webpack_require__(268),
- CameraManager: __webpack_require__(654),
- Effects: __webpack_require__(276),
- Events: __webpack_require__(48)
+ Camera: __webpack_require__(271),
+ CameraManager: __webpack_require__(658),
+ Effects: __webpack_require__(279),
+ Events: __webpack_require__(49)
};
/***/ }),
-/* 602 */
+/* 606 */
/***/ (function(module, exports) {
/**
@@ -116839,7 +118819,7 @@ module.exports = 'cameradestroy';
/***/ }),
-/* 603 */
+/* 607 */
/***/ (function(module, exports) {
/**
@@ -116865,7 +118845,7 @@ module.exports = 'camerafadeincomplete';
/***/ }),
-/* 604 */
+/* 608 */
/***/ (function(module, exports) {
/**
@@ -116895,7 +118875,7 @@ module.exports = 'camerafadeinstart';
/***/ }),
-/* 605 */
+/* 609 */
/***/ (function(module, exports) {
/**
@@ -116921,7 +118901,7 @@ module.exports = 'camerafadeoutcomplete';
/***/ }),
-/* 606 */
+/* 610 */
/***/ (function(module, exports) {
/**
@@ -116951,7 +118931,7 @@ module.exports = 'camerafadeoutstart';
/***/ }),
-/* 607 */
+/* 611 */
/***/ (function(module, exports) {
/**
@@ -116975,7 +118955,7 @@ module.exports = 'cameraflashcomplete';
/***/ }),
-/* 608 */
+/* 612 */
/***/ (function(module, exports) {
/**
@@ -117003,7 +118983,7 @@ module.exports = 'cameraflashstart';
/***/ }),
-/* 609 */
+/* 613 */
/***/ (function(module, exports) {
/**
@@ -117027,7 +119007,7 @@ module.exports = 'camerapancomplete';
/***/ }),
-/* 610 */
+/* 614 */
/***/ (function(module, exports) {
/**
@@ -117054,7 +119034,7 @@ module.exports = 'camerapanstart';
/***/ }),
-/* 611 */
+/* 615 */
/***/ (function(module, exports) {
/**
@@ -117080,7 +119060,7 @@ module.exports = 'postrender';
/***/ }),
-/* 612 */
+/* 616 */
/***/ (function(module, exports) {
/**
@@ -117106,7 +119086,7 @@ module.exports = 'prerender';
/***/ }),
-/* 613 */
+/* 617 */
/***/ (function(module, exports) {
/**
@@ -117130,7 +119110,7 @@ module.exports = 'camerashakecomplete';
/***/ }),
-/* 614 */
+/* 618 */
/***/ (function(module, exports) {
/**
@@ -117156,7 +119136,7 @@ module.exports = 'camerashakestart';
/***/ }),
-/* 615 */
+/* 619 */
/***/ (function(module, exports) {
/**
@@ -117180,7 +119160,7 @@ module.exports = 'camerazoomcomplete';
/***/ }),
-/* 616 */
+/* 620 */
/***/ (function(module, exports) {
/**
@@ -117206,7 +119186,7 @@ module.exports = 'camerazoomstart';
/***/ }),
-/* 617 */
+/* 621 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -117215,9 +119195,9 @@ module.exports = 'camerazoomstart';
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(48);
+var Events = __webpack_require__(49);
/**
* @classdesc
@@ -117594,7 +119574,7 @@ module.exports = Fade;
/***/ }),
-/* 618 */
+/* 622 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -117603,9 +119583,9 @@ module.exports = Fade;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(48);
+var Events = __webpack_require__(49);
/**
* @classdesc
@@ -117945,7 +119925,7 @@ module.exports = Flash;
/***/ }),
-/* 619 */
+/* 623 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -117954,11 +119934,11 @@ module.exports = Flash;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
-var EaseMap = __webpack_require__(163);
-var Events = __webpack_require__(48);
-var Vector2 = __webpack_require__(4);
+var EaseMap = __webpack_require__(164);
+var Events = __webpack_require__(49);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -118270,7 +120250,7 @@ module.exports = Pan;
/***/ }),
-/* 620 */
+/* 624 */
/***/ (function(module, exports) {
/**
@@ -118301,7 +120281,7 @@ module.exports = In;
/***/ }),
-/* 621 */
+/* 625 */
/***/ (function(module, exports) {
/**
@@ -118332,7 +120312,7 @@ module.exports = Out;
/***/ }),
-/* 622 */
+/* 626 */
/***/ (function(module, exports) {
/**
@@ -118372,7 +120352,7 @@ module.exports = InOut;
/***/ }),
-/* 623 */
+/* 627 */
/***/ (function(module, exports) {
/**
@@ -118417,7 +120397,7 @@ module.exports = In;
/***/ }),
-/* 624 */
+/* 628 */
/***/ (function(module, exports) {
/**
@@ -118460,7 +120440,7 @@ module.exports = Out;
/***/ }),
-/* 625 */
+/* 629 */
/***/ (function(module, exports) {
/**
@@ -118524,7 +120504,7 @@ module.exports = InOut;
/***/ }),
-/* 626 */
+/* 630 */
/***/ (function(module, exports) {
/**
@@ -118552,7 +120532,7 @@ module.exports = In;
/***/ }),
-/* 627 */
+/* 631 */
/***/ (function(module, exports) {
/**
@@ -118580,7 +120560,7 @@ module.exports = Out;
/***/ }),
-/* 628 */
+/* 632 */
/***/ (function(module, exports) {
/**
@@ -118615,7 +120595,7 @@ module.exports = InOut;
/***/ }),
-/* 629 */
+/* 633 */
/***/ (function(module, exports) {
/**
@@ -118643,7 +120623,7 @@ module.exports = In;
/***/ }),
-/* 630 */
+/* 634 */
/***/ (function(module, exports) {
/**
@@ -118671,7 +120651,7 @@ module.exports = Out;
/***/ }),
-/* 631 */
+/* 635 */
/***/ (function(module, exports) {
/**
@@ -118706,7 +120686,7 @@ module.exports = InOut;
/***/ }),
-/* 632 */
+/* 636 */
/***/ (function(module, exports) {
/**
@@ -118761,7 +120741,7 @@ module.exports = In;
/***/ }),
-/* 633 */
+/* 637 */
/***/ (function(module, exports) {
/**
@@ -118816,7 +120796,7 @@ module.exports = Out;
/***/ }),
-/* 634 */
+/* 638 */
/***/ (function(module, exports) {
/**
@@ -118878,7 +120858,7 @@ module.exports = InOut;
/***/ }),
-/* 635 */
+/* 639 */
/***/ (function(module, exports) {
/**
@@ -118906,7 +120886,7 @@ module.exports = In;
/***/ }),
-/* 636 */
+/* 640 */
/***/ (function(module, exports) {
/**
@@ -118934,7 +120914,7 @@ module.exports = Out;
/***/ }),
-/* 637 */
+/* 641 */
/***/ (function(module, exports) {
/**
@@ -118969,7 +120949,7 @@ module.exports = InOut;
/***/ }),
-/* 638 */
+/* 642 */
/***/ (function(module, exports) {
/**
@@ -118997,7 +120977,7 @@ module.exports = Linear;
/***/ }),
-/* 639 */
+/* 643 */
/***/ (function(module, exports) {
/**
@@ -119025,7 +121005,7 @@ module.exports = In;
/***/ }),
-/* 640 */
+/* 644 */
/***/ (function(module, exports) {
/**
@@ -119053,7 +121033,7 @@ module.exports = Out;
/***/ }),
-/* 641 */
+/* 645 */
/***/ (function(module, exports) {
/**
@@ -119088,7 +121068,7 @@ module.exports = InOut;
/***/ }),
-/* 642 */
+/* 646 */
/***/ (function(module, exports) {
/**
@@ -119116,7 +121096,7 @@ module.exports = In;
/***/ }),
-/* 643 */
+/* 647 */
/***/ (function(module, exports) {
/**
@@ -119144,7 +121124,7 @@ module.exports = Out;
/***/ }),
-/* 644 */
+/* 648 */
/***/ (function(module, exports) {
/**
@@ -119179,7 +121159,7 @@ module.exports = InOut;
/***/ }),
-/* 645 */
+/* 649 */
/***/ (function(module, exports) {
/**
@@ -119207,7 +121187,7 @@ module.exports = In;
/***/ }),
-/* 646 */
+/* 650 */
/***/ (function(module, exports) {
/**
@@ -119235,7 +121215,7 @@ module.exports = Out;
/***/ }),
-/* 647 */
+/* 651 */
/***/ (function(module, exports) {
/**
@@ -119270,7 +121250,7 @@ module.exports = InOut;
/***/ }),
-/* 648 */
+/* 652 */
/***/ (function(module, exports) {
/**
@@ -119309,7 +121289,7 @@ module.exports = In;
/***/ }),
-/* 649 */
+/* 653 */
/***/ (function(module, exports) {
/**
@@ -119348,7 +121328,7 @@ module.exports = Out;
/***/ }),
-/* 650 */
+/* 654 */
/***/ (function(module, exports) {
/**
@@ -119387,7 +121367,7 @@ module.exports = InOut;
/***/ }),
-/* 651 */
+/* 655 */
/***/ (function(module, exports) {
/**
@@ -119429,7 +121409,7 @@ module.exports = Stepped;
/***/ }),
-/* 652 */
+/* 656 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -119438,10 +121418,10 @@ module.exports = Stepped;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(48);
-var Vector2 = __webpack_require__(4);
+var Events = __webpack_require__(49);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -119583,7 +121563,7 @@ var Shake = new Class({
* @since 3.5.0
*
* @param {integer} [duration=100] - The duration of the effect in milliseconds.
- * @param {number} [intensity=0.05] - The intensity of the shake.
+ * @param {(number|Phaser.Math.Vector2)} [intensity=0.05] - The intensity of the shake.
* @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running.
* @param {Phaser.Types.Cameras.Scene2D.CameraShakeCallback} [callback] - This callback will be invoked every frame for the duration of the effect.
* It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
@@ -119748,7 +121728,7 @@ module.exports = Shake;
/***/ }),
-/* 653 */
+/* 657 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -119757,10 +121737,10 @@ module.exports = Shake;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
-var EaseMap = __webpack_require__(163);
-var Events = __webpack_require__(48);
+var EaseMap = __webpack_require__(164);
+var Events = __webpack_require__(49);
/**
* @classdesc
@@ -120041,7 +122021,7 @@ module.exports = Zoom;
/***/ }),
-/* 654 */
+/* 658 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -120050,13 +122030,13 @@ module.exports = Zoom;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Camera = __webpack_require__(268);
+var Camera = __webpack_require__(271);
var Class = __webpack_require__(0);
var GetFastValue = __webpack_require__(2);
-var PluginCache = __webpack_require__(18);
-var RectangleContains = __webpack_require__(47);
-var ScaleEvents = __webpack_require__(89);
-var SceneEvents = __webpack_require__(19);
+var PluginCache = __webpack_require__(19);
+var RectangleContains = __webpack_require__(48);
+var ScaleEvents = __webpack_require__(90);
+var SceneEvents = __webpack_require__(20);
/**
* @classdesc
@@ -120789,7 +122769,7 @@ module.exports = CameraManager;
/***/ }),
-/* 655 */
+/* 659 */
/***/ (function(module, exports) {
/**
@@ -120808,7 +122788,7 @@ module.exports = 'enterfullscreen';
/***/ }),
-/* 656 */
+/* 660 */
/***/ (function(module, exports) {
/**
@@ -120827,7 +122807,7 @@ module.exports = 'fullscreenfailed';
/***/ }),
-/* 657 */
+/* 661 */
/***/ (function(module, exports) {
/**
@@ -120846,7 +122826,7 @@ module.exports = 'fullscreenunsupported';
/***/ }),
-/* 658 */
+/* 662 */
/***/ (function(module, exports) {
/**
@@ -120866,7 +122846,7 @@ module.exports = 'leavefullscreen';
/***/ }),
-/* 659 */
+/* 663 */
/***/ (function(module, exports) {
/**
@@ -120887,7 +122867,7 @@ module.exports = 'orientationchange';
/***/ }),
-/* 660 */
+/* 664 */
/***/ (function(module, exports) {
/**
@@ -120918,7 +122898,7 @@ module.exports = 'resize';
/***/ }),
-/* 661 */
+/* 665 */
/***/ (function(module, exports) {
/**
@@ -120943,7 +122923,7 @@ module.exports = 'boot';
/***/ }),
-/* 662 */
+/* 666 */
/***/ (function(module, exports) {
/**
@@ -120972,7 +122952,7 @@ module.exports = 'create';
/***/ }),
-/* 663 */
+/* 667 */
/***/ (function(module, exports) {
/**
@@ -120999,7 +122979,7 @@ module.exports = 'destroy';
/***/ }),
-/* 664 */
+/* 668 */
/***/ (function(module, exports) {
/**
@@ -121026,7 +123006,7 @@ module.exports = 'pause';
/***/ }),
-/* 665 */
+/* 669 */
/***/ (function(module, exports) {
/**
@@ -121063,7 +123043,7 @@ module.exports = 'postupdate';
/***/ }),
-/* 666 */
+/* 670 */
/***/ (function(module, exports) {
/**
@@ -121100,7 +123080,7 @@ module.exports = 'preupdate';
/***/ }),
-/* 667 */
+/* 671 */
/***/ (function(module, exports) {
/**
@@ -121128,7 +123108,7 @@ module.exports = 'ready';
/***/ }),
-/* 668 */
+/* 672 */
/***/ (function(module, exports) {
/**
@@ -121164,7 +123144,7 @@ module.exports = 'render';
/***/ }),
-/* 669 */
+/* 673 */
/***/ (function(module, exports) {
/**
@@ -121191,7 +123171,7 @@ module.exports = 'resume';
/***/ }),
-/* 670 */
+/* 674 */
/***/ (function(module, exports) {
/**
@@ -121221,7 +123201,7 @@ module.exports = 'shutdown';
/***/ }),
-/* 671 */
+/* 675 */
/***/ (function(module, exports) {
/**
@@ -121248,7 +123228,7 @@ module.exports = 'sleep';
/***/ }),
-/* 672 */
+/* 676 */
/***/ (function(module, exports) {
/**
@@ -121273,7 +123253,7 @@ module.exports = 'start';
/***/ }),
-/* 673 */
+/* 677 */
/***/ (function(module, exports) {
/**
@@ -121309,7 +123289,7 @@ module.exports = 'transitioncomplete';
/***/ }),
-/* 674 */
+/* 678 */
/***/ (function(module, exports) {
/**
@@ -121346,7 +123326,7 @@ module.exports = 'transitioninit';
/***/ }),
-/* 675 */
+/* 679 */
/***/ (function(module, exports) {
/**
@@ -121380,7 +123360,7 @@ module.exports = 'transitionout';
/***/ }),
-/* 676 */
+/* 680 */
/***/ (function(module, exports) {
/**
@@ -121420,7 +123400,7 @@ module.exports = 'transitionstart';
/***/ }),
-/* 677 */
+/* 681 */
/***/ (function(module, exports) {
/**
@@ -121455,7 +123435,7 @@ module.exports = 'transitionwake';
/***/ }),
-/* 678 */
+/* 682 */
/***/ (function(module, exports) {
/**
@@ -121492,7 +123472,7 @@ module.exports = 'update';
/***/ }),
-/* 679 */
+/* 683 */
/***/ (function(module, exports) {
/**
@@ -121519,7 +123499,7 @@ module.exports = 'wake';
/***/ }),
-/* 680 */
+/* 684 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -121534,18 +123514,18 @@ module.exports = 'wake';
module.exports = {
- Config: __webpack_require__(289),
- CreateRenderer: __webpack_require__(312),
- DebugHeader: __webpack_require__(314),
- Events: __webpack_require__(28),
- TimeStep: __webpack_require__(315),
- VisibilityHandler: __webpack_require__(317)
+ Config: __webpack_require__(292),
+ CreateRenderer: __webpack_require__(315),
+ DebugHeader: __webpack_require__(317),
+ Events: __webpack_require__(18),
+ TimeStep: __webpack_require__(318),
+ VisibilityHandler: __webpack_require__(320)
};
/***/ }),
-/* 681 */
+/* 685 */
/***/ (function(module, exports) {
// shim for using process in browser
@@ -121735,7 +123715,7 @@ process.umask = function() { return 0; };
/***/ }),
-/* 682 */
+/* 686 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -121744,7 +123724,7 @@ process.umask = function() { return 0; };
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Browser = __webpack_require__(116);
+var Browser = __webpack_require__(117);
/**
* Determines the input support of the browser running this Phaser Game instance.
@@ -121810,7 +123790,7 @@ module.exports = init();
/***/ }),
-/* 683 */
+/* 687 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -121819,7 +123799,7 @@ module.exports = init();
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Browser = __webpack_require__(116);
+var Browser = __webpack_require__(117);
/**
* Determines the audio playback capabilities of the device running this Phaser Game instance.
@@ -121935,7 +123915,7 @@ module.exports = init();
/***/ }),
-/* 684 */
+/* 688 */
/***/ (function(module, exports) {
/**
@@ -122020,7 +124000,7 @@ module.exports = init();
/***/ }),
-/* 685 */
+/* 689 */
/***/ (function(module, exports) {
/**
@@ -122124,7 +124104,7 @@ module.exports = init();
/***/ }),
-/* 686 */
+/* 690 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122139,23 +124119,23 @@ module.exports = init();
module.exports = {
- Between: __webpack_require__(292),
- BetweenPoints: __webpack_require__(687),
- BetweenPointsY: __webpack_require__(688),
- BetweenY: __webpack_require__(689),
- CounterClockwise: __webpack_require__(690),
- Normalize: __webpack_require__(293),
- Reverse: __webpack_require__(691),
- RotateTo: __webpack_require__(692),
- ShortestBetween: __webpack_require__(693),
- Wrap: __webpack_require__(223),
- WrapDegrees: __webpack_require__(224)
+ Between: __webpack_require__(295),
+ BetweenPoints: __webpack_require__(691),
+ BetweenPointsY: __webpack_require__(692),
+ BetweenY: __webpack_require__(693),
+ CounterClockwise: __webpack_require__(694),
+ Normalize: __webpack_require__(296),
+ Reverse: __webpack_require__(695),
+ RotateTo: __webpack_require__(696),
+ ShortestBetween: __webpack_require__(697),
+ Wrap: __webpack_require__(226),
+ WrapDegrees: __webpack_require__(227)
};
/***/ }),
-/* 687 */
+/* 691 */
/***/ (function(module, exports) {
/**
@@ -122186,7 +124166,7 @@ module.exports = BetweenPoints;
/***/ }),
-/* 688 */
+/* 692 */
/***/ (function(module, exports) {
/**
@@ -122218,7 +124198,7 @@ module.exports = BetweenPointsY;
/***/ }),
-/* 689 */
+/* 693 */
/***/ (function(module, exports) {
/**
@@ -122252,7 +124232,7 @@ module.exports = BetweenY;
/***/ }),
-/* 690 */
+/* 694 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122261,7 +124241,7 @@ module.exports = BetweenY;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(23);
+var CONST = __webpack_require__(22);
/**
* Takes an angle in Phasers default clockwise format and converts it so that
@@ -122285,6 +124265,11 @@ var CONST = __webpack_require__(23);
*/
var CounterClockwise = function (angle)
{
+ if (angle > Math.PI)
+ {
+ angle -= CONST.PI2;
+ }
+
return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);
};
@@ -122292,7 +124277,7 @@ module.exports = CounterClockwise;
/***/ }),
-/* 691 */
+/* 695 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122301,7 +124286,7 @@ module.exports = CounterClockwise;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Normalize = __webpack_require__(293);
+var Normalize = __webpack_require__(296);
/**
* Reverse the given angle.
@@ -122322,7 +124307,7 @@ module.exports = Reverse;
/***/ }),
-/* 692 */
+/* 696 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122331,7 +124316,7 @@ module.exports = Reverse;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MATH_CONST = __webpack_require__(23);
+var MATH_CONST = __webpack_require__(22);
/**
* Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.
@@ -122389,7 +124374,7 @@ module.exports = RotateTo;
/***/ }),
-/* 693 */
+/* 697 */
/***/ (function(module, exports) {
/**
@@ -122438,7 +124423,7 @@ module.exports = ShortestBetween;
/***/ }),
-/* 694 */
+/* 698 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122453,15 +124438,15 @@ module.exports = ShortestBetween;
module.exports = {
- Between: __webpack_require__(57),
- Power: __webpack_require__(695),
- Squared: __webpack_require__(294)
+ Between: __webpack_require__(58),
+ Power: __webpack_require__(699),
+ Squared: __webpack_require__(297)
};
/***/ }),
-/* 695 */
+/* 699 */
/***/ (function(module, exports) {
/**
@@ -122495,7 +124480,7 @@ module.exports = DistancePower;
/***/ }),
-/* 696 */
+/* 700 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122510,24 +124495,24 @@ module.exports = DistancePower;
module.exports = {
- Back: __webpack_require__(277),
- Bounce: __webpack_require__(278),
- Circular: __webpack_require__(279),
- Cubic: __webpack_require__(280),
- Elastic: __webpack_require__(281),
- Expo: __webpack_require__(282),
- Linear: __webpack_require__(283),
- Quadratic: __webpack_require__(284),
- Quartic: __webpack_require__(285),
- Quintic: __webpack_require__(286),
- Sine: __webpack_require__(287),
- Stepped: __webpack_require__(288)
+ Back: __webpack_require__(280),
+ Bounce: __webpack_require__(281),
+ Circular: __webpack_require__(282),
+ Cubic: __webpack_require__(283),
+ Elastic: __webpack_require__(284),
+ Expo: __webpack_require__(285),
+ Linear: __webpack_require__(286),
+ Quadratic: __webpack_require__(287),
+ Quartic: __webpack_require__(288),
+ Quintic: __webpack_require__(289),
+ Sine: __webpack_require__(290),
+ Stepped: __webpack_require__(291)
};
/***/ }),
-/* 697 */
+/* 701 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122542,17 +124527,17 @@ module.exports = {
module.exports = {
- Ceil: __webpack_require__(698),
- Equal: __webpack_require__(166),
- Floor: __webpack_require__(699),
- GreaterThan: __webpack_require__(295),
- LessThan: __webpack_require__(296)
+ Ceil: __webpack_require__(702),
+ Equal: __webpack_require__(167),
+ Floor: __webpack_require__(703),
+ GreaterThan: __webpack_require__(298),
+ LessThan: __webpack_require__(299)
};
/***/ }),
-/* 698 */
+/* 702 */
/***/ (function(module, exports) {
/**
@@ -122583,7 +124568,7 @@ module.exports = Ceil;
/***/ }),
-/* 699 */
+/* 703 */
/***/ (function(module, exports) {
/**
@@ -122614,7 +124599,7 @@ module.exports = Floor;
/***/ }),
-/* 700 */
+/* 704 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122629,19 +124614,19 @@ module.exports = Floor;
module.exports = {
- Bezier: __webpack_require__(701),
- CatmullRom: __webpack_require__(702),
- CubicBezier: __webpack_require__(299),
- Linear: __webpack_require__(703),
- QuadraticBezier: __webpack_require__(300),
- SmoothStep: __webpack_require__(301),
- SmootherStep: __webpack_require__(704)
+ Bezier: __webpack_require__(705),
+ CatmullRom: __webpack_require__(706),
+ CubicBezier: __webpack_require__(302),
+ Linear: __webpack_require__(707),
+ QuadraticBezier: __webpack_require__(303),
+ SmoothStep: __webpack_require__(304),
+ SmootherStep: __webpack_require__(708)
};
/***/ }),
-/* 701 */
+/* 705 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122650,7 +124635,7 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Bernstein = __webpack_require__(297);
+var Bernstein = __webpack_require__(300);
/**
* A bezier interpolation method.
@@ -122680,7 +124665,7 @@ module.exports = BezierInterpolation;
/***/ }),
-/* 702 */
+/* 706 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122689,7 +124674,7 @@ module.exports = BezierInterpolation;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CatmullRom = __webpack_require__(167);
+var CatmullRom = __webpack_require__(168);
/**
* A Catmull-Rom interpolation method.
@@ -122737,7 +124722,7 @@ module.exports = CatmullRomInterpolation;
/***/ }),
-/* 703 */
+/* 707 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122746,7 +124731,7 @@ module.exports = CatmullRomInterpolation;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Linear = __webpack_require__(114);
+var Linear = __webpack_require__(115);
/**
* A linear interpolation method.
@@ -122784,7 +124769,7 @@ module.exports = LinearInterpolation;
/***/ }),
-/* 704 */
+/* 708 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122793,7 +124778,7 @@ module.exports = LinearInterpolation;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SmootherStep = __webpack_require__(155);
+var SmootherStep = __webpack_require__(156);
/**
* A Smoother Step interpolation method.
@@ -122817,7 +124802,7 @@ module.exports = SmootherStepInterpolation;
/***/ }),
-/* 705 */
+/* 709 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122832,15 +124817,15 @@ module.exports = SmootherStepInterpolation;
module.exports = {
- GetNext: __webpack_require__(302),
- IsSize: __webpack_require__(117),
- IsValue: __webpack_require__(706)
+ GetNext: __webpack_require__(305),
+ IsSize: __webpack_require__(118),
+ IsValue: __webpack_require__(710)
};
/***/ }),
-/* 706 */
+/* 710 */
/***/ (function(module, exports) {
/**
@@ -122868,7 +124853,7 @@ module.exports = IsValuePowerOfTwo;
/***/ }),
-/* 707 */
+/* 711 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -122883,15 +124868,15 @@ module.exports = IsValuePowerOfTwo;
module.exports = {
- Ceil: __webpack_require__(303),
- Floor: __webpack_require__(90),
- To: __webpack_require__(708)
+ Ceil: __webpack_require__(306),
+ Floor: __webpack_require__(91),
+ To: __webpack_require__(712)
};
/***/ }),
-/* 708 */
+/* 712 */
/***/ (function(module, exports) {
/**
@@ -122934,7 +124919,7 @@ module.exports = SnapTo;
/***/ }),
-/* 709 */
+/* 713 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -123433,7 +125418,7 @@ module.exports = RandomDataGenerator;
/***/ }),
-/* 710 */
+/* 714 */
/***/ (function(module, exports) {
/**
@@ -123468,7 +125453,7 @@ module.exports = Average;
/***/ }),
-/* 711 */
+/* 715 */
/***/ (function(module, exports) {
/**
@@ -123505,7 +125490,7 @@ module.exports = CeilTo;
/***/ }),
-/* 712 */
+/* 716 */
/***/ (function(module, exports) {
/**
@@ -123534,7 +125519,7 @@ module.exports = Difference;
/***/ }),
-/* 713 */
+/* 717 */
/***/ (function(module, exports) {
/**
@@ -123571,7 +125556,7 @@ module.exports = FloorTo;
/***/ }),
-/* 714 */
+/* 718 */
/***/ (function(module, exports) {
/**
@@ -123600,7 +125585,7 @@ module.exports = GetSpeed;
/***/ }),
-/* 715 */
+/* 719 */
/***/ (function(module, exports) {
/**
@@ -123631,7 +125616,7 @@ module.exports = IsEven;
/***/ }),
-/* 716 */
+/* 720 */
/***/ (function(module, exports) {
/**
@@ -123660,7 +125645,7 @@ module.exports = IsEvenStrict;
/***/ }),
-/* 717 */
+/* 721 */
/***/ (function(module, exports) {
/**
@@ -123690,7 +125675,7 @@ module.exports = MaxAdd;
/***/ }),
-/* 718 */
+/* 722 */
/***/ (function(module, exports) {
/**
@@ -123720,7 +125705,7 @@ module.exports = MinSub;
/***/ }),
-/* 719 */
+/* 723 */
/***/ (function(module, exports) {
/**
@@ -123779,7 +125764,7 @@ module.exports = Percent;
/***/ }),
-/* 720 */
+/* 724 */
/***/ (function(module, exports) {
/**
@@ -123819,7 +125804,7 @@ module.exports = RandomXY;
/***/ }),
-/* 721 */
+/* 725 */
/***/ (function(module, exports) {
/**
@@ -123858,7 +125843,7 @@ module.exports = RandomXYZ;
/***/ }),
-/* 722 */
+/* 726 */
/***/ (function(module, exports) {
/**
@@ -123895,7 +125880,7 @@ module.exports = RandomXYZW;
/***/ }),
-/* 723 */
+/* 727 */
/***/ (function(module, exports) {
/**
@@ -123947,7 +125932,7 @@ module.exports = RoundTo;
/***/ }),
-/* 724 */
+/* 728 */
/***/ (function(module, exports) {
/**
@@ -124000,7 +125985,65 @@ module.exports = SinCosTableGenerator;
/***/ }),
-/* 725 */
+/* 729 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+var Vector2 = __webpack_require__(3);
+
+/**
+ * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid.
+ *
+ * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.
+ *
+ * If the given index is out of range an empty Vec2 is returned.
+ *
+ * @function Phaser.Math.ToXY
+ * @since 3.19.0
+ *
+ * @param {integer} index - The position within the grid to get the x/y value for.
+ * @param {integer} width - The width of the grid.
+ * @param {integer} height - The height of the grid.
+ * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.
+ *
+ * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.
+ */
+var ToXY = function (index, width, height, out)
+{
+ if (out === undefined) { out = new Vector2(); }
+
+ var x = 0;
+ var y = 0;
+ var total = width * height;
+
+ if (index > 0 && index <= total)
+ {
+ if (index > width - 1)
+ {
+ y = Math.floor(index / width);
+ x = index - (y * width);
+ }
+ else
+ {
+ x = index;
+ }
+
+ out.set(x, y);
+ }
+
+ return out;
+};
+
+module.exports = ToXY;
+
+
+/***/ }),
+/* 730 */
/***/ (function(module, exports) {
/**
@@ -124030,7 +126073,7 @@ module.exports = Within;
/***/ }),
-/* 726 */
+/* 731 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -124039,9 +126082,9 @@ module.exports = Within;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Vector3 = __webpack_require__(170);
-var Matrix4 = __webpack_require__(310);
-var Quaternion = __webpack_require__(311);
+var Vector3 = __webpack_require__(171);
+var Matrix4 = __webpack_require__(313);
+var Quaternion = __webpack_require__(314);
var tmpMat4 = new Matrix4();
var tmpQuat = new Quaternion();
@@ -124078,7 +126121,7 @@ module.exports = RotateVec3;
/***/ }),
-/* 727 */
+/* 732 */
/***/ (function(module, exports) {
/**
@@ -124104,7 +126147,7 @@ module.exports = 'addtexture';
/***/ }),
-/* 728 */
+/* 733 */
/***/ (function(module, exports) {
/**
@@ -124130,7 +126173,7 @@ module.exports = 'onerror';
/***/ }),
-/* 729 */
+/* 734 */
/***/ (function(module, exports) {
/**
@@ -124159,7 +126202,7 @@ module.exports = 'onload';
/***/ }),
-/* 730 */
+/* 735 */
/***/ (function(module, exports) {
/**
@@ -124182,7 +126225,7 @@ module.exports = 'ready';
/***/ }),
-/* 731 */
+/* 736 */
/***/ (function(module, exports) {
/**
@@ -124210,7 +126253,7 @@ module.exports = 'removetexture';
/***/ }),
-/* 732 */
+/* 737 */
/***/ (function(module, exports) {
module.exports = [
@@ -124246,7 +126289,7 @@ module.exports = [
/***/ }),
-/* 733 */
+/* 738 */
/***/ (function(module, exports) {
module.exports = [
@@ -124265,7 +126308,7 @@ module.exports = [
/***/ }),
-/* 734 */
+/* 739 */
/***/ (function(module, exports) {
module.exports = [
@@ -124324,7 +126367,7 @@ module.exports = [
/***/ }),
-/* 735 */
+/* 740 */
/***/ (function(module, exports) {
module.exports = [
@@ -124368,7 +126411,7 @@ module.exports = [
/***/ }),
-/* 736 */
+/* 741 */
/***/ (function(module, exports) {
module.exports = [
@@ -124403,7 +126446,7 @@ module.exports = [
/***/ }),
-/* 737 */
+/* 742 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -124418,14 +126461,14 @@ module.exports = [
module.exports = {
- GenerateTexture: __webpack_require__(318),
- Palettes: __webpack_require__(738)
+ GenerateTexture: __webpack_require__(321),
+ Palettes: __webpack_require__(743)
};
/***/ }),
-/* 738 */
+/* 743 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -124440,17 +126483,17 @@ module.exports = {
module.exports = {
- ARNE16: __webpack_require__(319),
- C64: __webpack_require__(739),
- CGA: __webpack_require__(740),
- JMP: __webpack_require__(741),
- MSX: __webpack_require__(742)
+ ARNE16: __webpack_require__(322),
+ C64: __webpack_require__(744),
+ CGA: __webpack_require__(745),
+ JMP: __webpack_require__(746),
+ MSX: __webpack_require__(747)
};
/***/ }),
-/* 739 */
+/* 744 */
/***/ (function(module, exports) {
/**
@@ -124488,7 +126531,7 @@ module.exports = {
/***/ }),
-/* 740 */
+/* 745 */
/***/ (function(module, exports) {
/**
@@ -124526,7 +126569,7 @@ module.exports = {
/***/ }),
-/* 741 */
+/* 746 */
/***/ (function(module, exports) {
/**
@@ -124564,7 +126607,7 @@ module.exports = {
/***/ }),
-/* 742 */
+/* 747 */
/***/ (function(module, exports) {
/**
@@ -124602,7 +126645,7 @@ module.exports = {
/***/ }),
-/* 743 */
+/* 748 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -124616,19 +126659,19 @@ module.exports = {
*/
module.exports = {
- Path: __webpack_require__(744),
+ Path: __webpack_require__(749),
- CubicBezier: __webpack_require__(320),
- Curve: __webpack_require__(79),
- Ellipse: __webpack_require__(321),
- Line: __webpack_require__(322),
- QuadraticBezier: __webpack_require__(323),
- Spline: __webpack_require__(324)
+ CubicBezier: __webpack_require__(323),
+ Curve: __webpack_require__(80),
+ Ellipse: __webpack_require__(324),
+ Line: __webpack_require__(325),
+ QuadraticBezier: __webpack_require__(326),
+ Spline: __webpack_require__(327)
};
/***/ }),
-/* 744 */
+/* 749 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -124640,15 +126683,15 @@ module.exports = {
// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)
var Class = __webpack_require__(0);
-var CubicBezierCurve = __webpack_require__(320);
-var EllipseCurve = __webpack_require__(321);
-var GameObjectFactory = __webpack_require__(5);
-var LineCurve = __webpack_require__(322);
-var MovePathTo = __webpack_require__(745);
-var QuadraticBezierCurve = __webpack_require__(323);
-var Rectangle = __webpack_require__(10);
-var SplineCurve = __webpack_require__(324);
-var Vector2 = __webpack_require__(4);
+var CubicBezierCurve = __webpack_require__(323);
+var EllipseCurve = __webpack_require__(324);
+var GameObjectFactory = __webpack_require__(6);
+var LineCurve = __webpack_require__(325);
+var MovePathTo = __webpack_require__(750);
+var QuadraticBezierCurve = __webpack_require__(326);
+var Rectangle = __webpack_require__(11);
+var SplineCurve = __webpack_require__(327);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -124935,12 +126978,12 @@ var Path = new Class({
* @method Phaser.Curves.Path#ellipseTo
* @since 3.0.0
*
- * @param {number} xRadius - The horizontal radius of the ellipse.
- * @param {number} yRadius - The vertical radius of the ellipse.
- * @param {number} startAngle - The start angle of the ellipse, in degrees.
- * @param {number} endAngle - The end angle of the ellipse, in degrees.
- * @param {boolean} clockwise - Whether the ellipse should be rotated clockwise (`true`) or counter-clockwise (`false`).
- * @param {number} rotation - The rotation of the ellipse, in degrees.
+ * @param {number} [xRadius=0] - The horizontal radius of ellipse.
+ * @param {number} [yRadius=0] - The vertical radius of ellipse.
+ * @param {integer} [startAngle=0] - The start angle of the ellipse, in degrees.
+ * @param {integer} [endAngle=360] - The end angle of the ellipse, in degrees.
+ * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`).
+ * @param {number} [rotation=0] - The rotation of the ellipse, in degrees.
*
* @return {Phaser.Curves.Path} This Path object.
*/
@@ -125323,10 +127366,8 @@ var Path = new Class({
return out.copy(this.startPoint);
},
- // Creates a line curve from the previous end point to x/y
-
/**
- * [description]
+ * Creates a line curve from the previous end point to x/y
*
* @method Phaser.Curves.Path#lineTo
* @since 3.0.0
@@ -125413,10 +127454,8 @@ var Path = new Class({
};
},
- // cacheLengths must be recalculated.
-
/**
- * [description]
+ * cacheLengths must be recalculated.
*
* @method Phaser.Curves.Path#updateArcLengths
* @since 3.0.0
@@ -125471,7 +127510,7 @@ module.exports = Path;
/***/ }),
-/* 745 */
+/* 750 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -125481,7 +127520,7 @@ module.exports = Path;
*/
var Class = __webpack_require__(0);
-var Vector2 = __webpack_require__(4);
+var Vector2 = __webpack_require__(3);
/**
* @classdesc
@@ -125611,7 +127650,7 @@ module.exports = MoveTo;
/***/ }),
-/* 746 */
+/* 751 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -125626,15 +127665,15 @@ module.exports = MoveTo;
module.exports = {
- DataManager: __webpack_require__(109),
- DataManagerPlugin: __webpack_require__(747),
- Events: __webpack_require__(259)
+ DataManager: __webpack_require__(110),
+ DataManagerPlugin: __webpack_require__(752),
+ Events: __webpack_require__(262)
};
/***/ }),
-/* 747 */
+/* 752 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -125644,9 +127683,9 @@ module.exports = {
*/
var Class = __webpack_require__(0);
-var DataManager = __webpack_require__(109);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
+var DataManager = __webpack_require__(110);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
/**
* @classdesc
@@ -125761,7 +127800,7 @@ module.exports = DataManagerPlugin;
/***/ }),
-/* 748 */
+/* 753 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -125776,18 +127815,18 @@ module.exports = DataManagerPlugin;
module.exports = {
- Align: __webpack_require__(749),
- BaseShader: __webpack_require__(325),
- Bounds: __webpack_require__(764),
- Canvas: __webpack_require__(767),
- Color: __webpack_require__(326),
- Masks: __webpack_require__(776)
+ Align: __webpack_require__(754),
+ BaseShader: __webpack_require__(328),
+ Bounds: __webpack_require__(769),
+ Canvas: __webpack_require__(772),
+ Color: __webpack_require__(329),
+ Masks: __webpack_require__(781)
};
/***/ }),
-/* 749 */
+/* 754 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -125796,8 +127835,8 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(143);
-var Extend = __webpack_require__(17);
+var CONST = __webpack_require__(144);
+var Extend = __webpack_require__(15);
/**
* @namespace Phaser.Display.Align
@@ -125805,8 +127844,8 @@ var Extend = __webpack_require__(17);
var Align = {
- In: __webpack_require__(750),
- To: __webpack_require__(751)
+ In: __webpack_require__(755),
+ To: __webpack_require__(756)
};
@@ -125817,7 +127856,7 @@ module.exports = Align;
/***/ }),
-/* 750 */
+/* 755 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -125832,22 +127871,22 @@ module.exports = Align;
module.exports = {
- BottomCenter: __webpack_require__(231),
- BottomLeft: __webpack_require__(232),
- BottomRight: __webpack_require__(233),
- Center: __webpack_require__(234),
- LeftCenter: __webpack_require__(236),
- QuickSet: __webpack_require__(230),
- RightCenter: __webpack_require__(237),
- TopCenter: __webpack_require__(238),
- TopLeft: __webpack_require__(239),
- TopRight: __webpack_require__(240)
+ BottomCenter: __webpack_require__(234),
+ BottomLeft: __webpack_require__(235),
+ BottomRight: __webpack_require__(236),
+ Center: __webpack_require__(237),
+ LeftCenter: __webpack_require__(239),
+ QuickSet: __webpack_require__(233),
+ RightCenter: __webpack_require__(240),
+ TopCenter: __webpack_require__(241),
+ TopLeft: __webpack_require__(242),
+ TopRight: __webpack_require__(243)
};
/***/ }),
-/* 751 */
+/* 756 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -125862,24 +127901,24 @@ module.exports = {
module.exports = {
- BottomCenter: __webpack_require__(752),
- BottomLeft: __webpack_require__(753),
- BottomRight: __webpack_require__(754),
- LeftBottom: __webpack_require__(755),
- LeftCenter: __webpack_require__(756),
- LeftTop: __webpack_require__(757),
- RightBottom: __webpack_require__(758),
- RightCenter: __webpack_require__(759),
- RightTop: __webpack_require__(760),
- TopCenter: __webpack_require__(761),
- TopLeft: __webpack_require__(762),
- TopRight: __webpack_require__(763)
+ BottomCenter: __webpack_require__(757),
+ BottomLeft: __webpack_require__(758),
+ BottomRight: __webpack_require__(759),
+ LeftBottom: __webpack_require__(760),
+ LeftCenter: __webpack_require__(761),
+ LeftTop: __webpack_require__(762),
+ RightBottom: __webpack_require__(763),
+ RightCenter: __webpack_require__(764),
+ RightTop: __webpack_require__(765),
+ TopCenter: __webpack_require__(766),
+ TopLeft: __webpack_require__(767),
+ TopRight: __webpack_require__(768)
};
/***/ }),
-/* 752 */
+/* 757 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -125889,8 +127928,8 @@ module.exports = {
*/
var GetBottom = __webpack_require__(38);
-var GetCenterX = __webpack_require__(73);
-var SetCenterX = __webpack_require__(74);
+var GetCenterX = __webpack_require__(74);
+var SetCenterX = __webpack_require__(75);
var SetTop = __webpack_require__(45);
/**
@@ -125923,7 +127962,7 @@ module.exports = BottomCenter;
/***/ }),
-/* 753 */
+/* 758 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -125967,7 +128006,7 @@ module.exports = BottomLeft;
/***/ }),
-/* 754 */
+/* 759 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126011,7 +128050,7 @@ module.exports = BottomRight;
/***/ }),
-/* 755 */
+/* 760 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126055,7 +128094,7 @@ module.exports = LeftBottom;
/***/ }),
-/* 756 */
+/* 761 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126064,9 +128103,9 @@ module.exports = LeftBottom;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetCenterY = __webpack_require__(76);
+var GetCenterY = __webpack_require__(77);
var GetLeft = __webpack_require__(40);
-var SetCenterY = __webpack_require__(75);
+var SetCenterY = __webpack_require__(76);
var SetRight = __webpack_require__(43);
/**
@@ -126099,7 +128138,7 @@ module.exports = LeftCenter;
/***/ }),
-/* 757 */
+/* 762 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126143,7 +128182,7 @@ module.exports = LeftTop;
/***/ }),
-/* 758 */
+/* 763 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126187,7 +128226,7 @@ module.exports = RightBottom;
/***/ }),
-/* 759 */
+/* 764 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126196,9 +128235,9 @@ module.exports = RightBottom;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetCenterY = __webpack_require__(76);
+var GetCenterY = __webpack_require__(77);
var GetRight = __webpack_require__(42);
-var SetCenterY = __webpack_require__(75);
+var SetCenterY = __webpack_require__(76);
var SetLeft = __webpack_require__(41);
/**
@@ -126231,7 +128270,7 @@ module.exports = RightCenter;
/***/ }),
-/* 760 */
+/* 765 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126275,7 +128314,7 @@ module.exports = RightTop;
/***/ }),
-/* 761 */
+/* 766 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126284,10 +128323,10 @@ module.exports = RightTop;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetCenterX = __webpack_require__(73);
+var GetCenterX = __webpack_require__(74);
var GetTop = __webpack_require__(44);
var SetBottom = __webpack_require__(39);
-var SetCenterX = __webpack_require__(74);
+var SetCenterX = __webpack_require__(75);
/**
* Takes given Game Object and aligns it so that it is positioned next to the top center position of the other.
@@ -126319,7 +128358,7 @@ module.exports = TopCenter;
/***/ }),
-/* 762 */
+/* 767 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126363,7 +128402,7 @@ module.exports = TopLeft;
/***/ }),
-/* 763 */
+/* 768 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126407,7 +128446,7 @@ module.exports = TopRight;
/***/ }),
-/* 764 */
+/* 769 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126422,18 +128461,18 @@ module.exports = TopRight;
module.exports = {
- CenterOn: __webpack_require__(235),
+ CenterOn: __webpack_require__(238),
GetBottom: __webpack_require__(38),
- GetCenterX: __webpack_require__(73),
- GetCenterY: __webpack_require__(76),
+ GetCenterX: __webpack_require__(74),
+ GetCenterY: __webpack_require__(77),
GetLeft: __webpack_require__(40),
- GetOffsetX: __webpack_require__(765),
- GetOffsetY: __webpack_require__(766),
+ GetOffsetX: __webpack_require__(770),
+ GetOffsetY: __webpack_require__(771),
GetRight: __webpack_require__(42),
GetTop: __webpack_require__(44),
SetBottom: __webpack_require__(39),
- SetCenterX: __webpack_require__(74),
- SetCenterY: __webpack_require__(75),
+ SetCenterX: __webpack_require__(75),
+ SetCenterY: __webpack_require__(76),
SetLeft: __webpack_require__(41),
SetRight: __webpack_require__(43),
SetTop: __webpack_require__(45)
@@ -126442,7 +128481,7 @@ module.exports = {
/***/ }),
-/* 765 */
+/* 770 */
/***/ (function(module, exports) {
/**
@@ -126472,7 +128511,7 @@ module.exports = GetOffsetX;
/***/ }),
-/* 766 */
+/* 771 */
/***/ (function(module, exports) {
/**
@@ -126502,7 +128541,7 @@ module.exports = GetOffsetY;
/***/ }),
-/* 767 */
+/* 772 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126517,17 +128556,17 @@ module.exports = GetOffsetY;
module.exports = {
- CanvasInterpolation: __webpack_require__(313),
- CanvasPool: __webpack_require__(24),
- Smoothing: __webpack_require__(113),
- TouchAction: __webpack_require__(768),
- UserSelect: __webpack_require__(769)
+ CanvasInterpolation: __webpack_require__(316),
+ CanvasPool: __webpack_require__(25),
+ Smoothing: __webpack_require__(114),
+ TouchAction: __webpack_require__(773),
+ UserSelect: __webpack_require__(774)
};
/***/ }),
-/* 768 */
+/* 773 */
/***/ (function(module, exports) {
/**
@@ -126562,7 +128601,7 @@ module.exports = TouchAction;
/***/ }),
-/* 769 */
+/* 774 */
/***/ (function(module, exports) {
/**
@@ -126609,7 +128648,7 @@ module.exports = UserSelect;
/***/ }),
-/* 770 */
+/* 775 */
/***/ (function(module, exports) {
/**
@@ -126649,7 +128688,7 @@ module.exports = ColorToRGBA;
/***/ }),
-/* 771 */
+/* 776 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126659,7 +128698,7 @@ module.exports = ColorToRGBA;
*/
var Color = __webpack_require__(33);
-var HueToComponent = __webpack_require__(328);
+var HueToComponent = __webpack_require__(331);
/**
* Converts HSL (hue, saturation and lightness) values to a Phaser Color object.
@@ -126699,7 +128738,7 @@ module.exports = HSLToColor;
/***/ }),
-/* 772 */
+/* 777 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126708,7 +128747,7 @@ module.exports = HSLToColor;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var HSVToRGB = __webpack_require__(161);
+var HSVToRGB = __webpack_require__(162);
/**
* Get HSV color wheel values in an array which will be 360 elements in size.
@@ -126740,7 +128779,7 @@ module.exports = HSVColorWheel;
/***/ }),
-/* 773 */
+/* 778 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126749,7 +128788,7 @@ module.exports = HSVColorWheel;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Linear = __webpack_require__(114);
+var Linear = __webpack_require__(115);
/**
* @namespace Phaser.Display.Color.Interpolate
@@ -126848,7 +128887,7 @@ module.exports = {
/***/ }),
-/* 774 */
+/* 779 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126857,7 +128896,7 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Between = __webpack_require__(168);
+var Between = __webpack_require__(169);
var Color = __webpack_require__(33);
/**
@@ -126884,7 +128923,7 @@ module.exports = RandomRGB;
/***/ }),
-/* 775 */
+/* 780 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126893,7 +128932,7 @@ module.exports = RandomRGB;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ComponentToHex = __webpack_require__(327);
+var ComponentToHex = __webpack_require__(330);
/**
* Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`.
@@ -126928,7 +128967,7 @@ module.exports = RGBToString;
/***/ }),
-/* 776 */
+/* 781 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126943,14 +128982,14 @@ module.exports = RGBToString;
module.exports = {
- BitmapMask: __webpack_require__(253),
- GeometryMask: __webpack_require__(254)
+ BitmapMask: __webpack_require__(256),
+ GeometryMask: __webpack_require__(257)
};
/***/ }),
-/* 777 */
+/* 782 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126965,13 +129004,13 @@ module.exports = {
var Dom = {
- AddToDOM: __webpack_require__(119),
- DOMContentLoaded: __webpack_require__(329),
- GetScreenOrientation: __webpack_require__(330),
- GetTarget: __webpack_require__(335),
- ParseXML: __webpack_require__(336),
- RemoveFromDOM: __webpack_require__(174),
- RequestAnimationFrame: __webpack_require__(316)
+ AddToDOM: __webpack_require__(120),
+ DOMContentLoaded: __webpack_require__(332),
+ GetScreenOrientation: __webpack_require__(333),
+ GetTarget: __webpack_require__(338),
+ ParseXML: __webpack_require__(339),
+ RemoveFromDOM: __webpack_require__(175),
+ RequestAnimationFrame: __webpack_require__(319)
};
@@ -126979,7 +129018,7 @@ module.exports = Dom;
/***/ }),
-/* 778 */
+/* 783 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -126992,11 +129031,11 @@ module.exports = Dom;
* @namespace Phaser.Events
*/
-module.exports = { EventEmitter: __webpack_require__(779) };
+module.exports = { EventEmitter: __webpack_require__(784) };
/***/ }),
-/* 779 */
+/* 784 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -127006,8 +129045,8 @@ module.exports = { EventEmitter: __webpack_require__(779) };
*/
var Class = __webpack_require__(0);
-var EE = __webpack_require__(11);
-var PluginCache = __webpack_require__(18);
+var EE = __webpack_require__(10);
+var PluginCache = __webpack_require__(19);
/**
* @classdesc
@@ -127180,7 +129219,7 @@ module.exports = EventEmitter;
/***/ }),
-/* 780 */
+/* 785 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -127189,33 +129228,33 @@ module.exports = EventEmitter;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var AddToDOM = __webpack_require__(119);
-var AnimationManager = __webpack_require__(264);
-var CacheManager = __webpack_require__(267);
-var CanvasPool = __webpack_require__(24);
+var AddToDOM = __webpack_require__(120);
+var AnimationManager = __webpack_require__(267);
+var CacheManager = __webpack_require__(270);
+var CanvasPool = __webpack_require__(25);
var Class = __webpack_require__(0);
-var Config = __webpack_require__(289);
-var CreateDOMContainer = __webpack_require__(781);
-var CreateRenderer = __webpack_require__(312);
-var DataManager = __webpack_require__(109);
-var DebugHeader = __webpack_require__(314);
-var Device = __webpack_require__(290);
-var DOMContentLoaded = __webpack_require__(329);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(28);
-var InputManager = __webpack_require__(337);
-var PluginCache = __webpack_require__(18);
-var PluginManager = __webpack_require__(342);
-var ScaleManager = __webpack_require__(343);
-var SceneManager = __webpack_require__(345);
-var TextureEvents = __webpack_require__(118);
-var TextureManager = __webpack_require__(349);
-var TimeStep = __webpack_require__(315);
-var VisibilityHandler = __webpack_require__(317);
+var Config = __webpack_require__(292);
+var CreateDOMContainer = __webpack_require__(786);
+var CreateRenderer = __webpack_require__(315);
+var DataManager = __webpack_require__(110);
+var DebugHeader = __webpack_require__(317);
+var Device = __webpack_require__(293);
+var DOMContentLoaded = __webpack_require__(332);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(18);
+var InputManager = __webpack_require__(340);
+var PluginCache = __webpack_require__(19);
+var PluginManager = __webpack_require__(345);
+var ScaleManager = __webpack_require__(346);
+var SceneManager = __webpack_require__(348);
+var TextureEvents = __webpack_require__(119);
+var TextureManager = __webpack_require__(351);
+var TimeStep = __webpack_require__(318);
+var VisibilityHandler = __webpack_require__(320);
if (true)
{
- var SoundManagerCreator = __webpack_require__(352);
+ var SoundManagerCreator = __webpack_require__(355);
}
if (false)
@@ -127431,7 +129470,7 @@ var Game = new Class({
* You can disable the inclusion of the Sound Manager in your build by toggling the webpack `FEATURE_SOUND` flag.
*
* @name Phaser.Game#sound
- * @type {Phaser.Sound.BaseSoundManager}
+ * @type {(Phaser.Sound.NoAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager)}
* @since 3.0.0
*/
this.sound = null;
@@ -127878,7 +129917,7 @@ module.exports = Game;
/***/ }),
-/* 781 */
+/* 786 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -127887,7 +129926,7 @@ module.exports = Game;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var AddToDOM = __webpack_require__(119);
+var AddToDOM = __webpack_require__(120);
var CreateDOMContainer = function (game)
{
@@ -127901,7 +129940,7 @@ var CreateDOMContainer = function (game)
// DOM Element Container
var div = document.createElement('div');
- div.style = [
+ div.style.cssText = [
'display: block;',
'width: ' + game.scale.width + 'px;',
'height: ' + game.scale.height + 'px;',
@@ -127922,7 +129961,7 @@ module.exports = CreateDOMContainer;
/***/ }),
-/* 782 */
+/* 787 */
/***/ (function(module, exports) {
/**
@@ -127943,7 +129982,7 @@ module.exports = 'boot';
/***/ }),
-/* 783 */
+/* 788 */
/***/ (function(module, exports) {
/**
@@ -127964,7 +130003,7 @@ module.exports = 'destroy';
/***/ }),
-/* 784 */
+/* 789 */
/***/ (function(module, exports) {
/**
@@ -127992,7 +130031,7 @@ module.exports = 'dragend';
/***/ }),
-/* 785 */
+/* 790 */
/***/ (function(module, exports) {
/**
@@ -128023,7 +130062,7 @@ module.exports = 'dragenter';
/***/ }),
-/* 786 */
+/* 791 */
/***/ (function(module, exports) {
/**
@@ -128055,7 +130094,7 @@ module.exports = 'drag';
/***/ }),
-/* 787 */
+/* 792 */
/***/ (function(module, exports) {
/**
@@ -128086,7 +130125,7 @@ module.exports = 'dragleave';
/***/ }),
-/* 788 */
+/* 793 */
/***/ (function(module, exports) {
/**
@@ -128120,7 +130159,7 @@ module.exports = 'dragover';
/***/ }),
-/* 789 */
+/* 794 */
/***/ (function(module, exports) {
/**
@@ -128150,7 +130189,7 @@ module.exports = 'dragstart';
/***/ }),
-/* 790 */
+/* 795 */
/***/ (function(module, exports) {
/**
@@ -128179,7 +130218,7 @@ module.exports = 'drop';
/***/ }),
-/* 791 */
+/* 796 */
/***/ (function(module, exports) {
/**
@@ -128206,7 +130245,7 @@ module.exports = 'gameout';
/***/ }),
-/* 792 */
+/* 797 */
/***/ (function(module, exports) {
/**
@@ -128233,7 +130272,7 @@ module.exports = 'gameover';
/***/ }),
-/* 793 */
+/* 798 */
/***/ (function(module, exports) {
/**
@@ -128274,7 +130313,7 @@ module.exports = 'gameobjectdown';
/***/ }),
-/* 794 */
+/* 799 */
/***/ (function(module, exports) {
/**
@@ -128305,7 +130344,7 @@ module.exports = 'dragend';
/***/ }),
-/* 795 */
+/* 800 */
/***/ (function(module, exports) {
/**
@@ -128335,7 +130374,7 @@ module.exports = 'dragenter';
/***/ }),
-/* 796 */
+/* 801 */
/***/ (function(module, exports) {
/**
@@ -128366,7 +130405,7 @@ module.exports = 'drag';
/***/ }),
-/* 797 */
+/* 802 */
/***/ (function(module, exports) {
/**
@@ -128396,7 +130435,7 @@ module.exports = 'dragleave';
/***/ }),
-/* 798 */
+/* 803 */
/***/ (function(module, exports) {
/**
@@ -128429,7 +130468,7 @@ module.exports = 'dragover';
/***/ }),
-/* 799 */
+/* 804 */
/***/ (function(module, exports) {
/**
@@ -128463,7 +130502,7 @@ module.exports = 'dragstart';
/***/ }),
-/* 800 */
+/* 805 */
/***/ (function(module, exports) {
/**
@@ -128493,7 +130532,7 @@ module.exports = 'drop';
/***/ }),
-/* 801 */
+/* 806 */
/***/ (function(module, exports) {
/**
@@ -128534,7 +130573,7 @@ module.exports = 'gameobjectmove';
/***/ }),
-/* 802 */
+/* 807 */
/***/ (function(module, exports) {
/**
@@ -128575,7 +130614,7 @@ module.exports = 'gameobjectout';
/***/ }),
-/* 803 */
+/* 808 */
/***/ (function(module, exports) {
/**
@@ -128616,7 +130655,7 @@ module.exports = 'gameobjectover';
/***/ }),
-/* 804 */
+/* 809 */
/***/ (function(module, exports) {
/**
@@ -128657,7 +130696,7 @@ module.exports = 'pointerdown';
/***/ }),
-/* 805 */
+/* 810 */
/***/ (function(module, exports) {
/**
@@ -128698,7 +130737,7 @@ module.exports = 'pointermove';
/***/ }),
-/* 806 */
+/* 811 */
/***/ (function(module, exports) {
/**
@@ -128737,7 +130776,7 @@ module.exports = 'pointerout';
/***/ }),
-/* 807 */
+/* 812 */
/***/ (function(module, exports) {
/**
@@ -128778,7 +130817,7 @@ module.exports = 'pointerover';
/***/ }),
-/* 808 */
+/* 813 */
/***/ (function(module, exports) {
/**
@@ -128819,7 +130858,7 @@ module.exports = 'pointerup';
/***/ }),
-/* 809 */
+/* 814 */
/***/ (function(module, exports) {
/**
@@ -128861,7 +130900,7 @@ module.exports = 'wheel';
/***/ }),
-/* 810 */
+/* 815 */
/***/ (function(module, exports) {
/**
@@ -128902,7 +130941,7 @@ module.exports = 'gameobjectup';
/***/ }),
-/* 811 */
+/* 816 */
/***/ (function(module, exports) {
/**
@@ -128946,7 +130985,7 @@ module.exports = 'gameobjectwheel';
/***/ }),
-/* 812 */
+/* 817 */
/***/ (function(module, exports) {
/**
@@ -128967,7 +131006,7 @@ module.exports = 'boot';
/***/ }),
-/* 813 */
+/* 818 */
/***/ (function(module, exports) {
/**
@@ -128992,7 +131031,7 @@ module.exports = 'process';
/***/ }),
-/* 814 */
+/* 819 */
/***/ (function(module, exports) {
/**
@@ -129013,7 +131052,7 @@ module.exports = 'update';
/***/ }),
-/* 815 */
+/* 820 */
/***/ (function(module, exports) {
/**
@@ -129048,7 +131087,7 @@ module.exports = 'pointerdown';
/***/ }),
-/* 816 */
+/* 821 */
/***/ (function(module, exports) {
/**
@@ -129082,7 +131121,7 @@ module.exports = 'pointerdownoutside';
/***/ }),
-/* 817 */
+/* 822 */
/***/ (function(module, exports) {
/**
@@ -129117,7 +131156,7 @@ module.exports = 'pointermove';
/***/ }),
-/* 818 */
+/* 823 */
/***/ (function(module, exports) {
/**
@@ -129152,7 +131191,7 @@ module.exports = 'pointerout';
/***/ }),
-/* 819 */
+/* 824 */
/***/ (function(module, exports) {
/**
@@ -129187,7 +131226,7 @@ module.exports = 'pointerover';
/***/ }),
-/* 820 */
+/* 825 */
/***/ (function(module, exports) {
/**
@@ -129222,7 +131261,7 @@ module.exports = 'pointerup';
/***/ }),
-/* 821 */
+/* 826 */
/***/ (function(module, exports) {
/**
@@ -129256,7 +131295,7 @@ module.exports = 'pointerupoutside';
/***/ }),
-/* 822 */
+/* 827 */
/***/ (function(module, exports) {
/**
@@ -129294,7 +131333,7 @@ module.exports = 'wheel';
/***/ }),
-/* 823 */
+/* 828 */
/***/ (function(module, exports) {
/**
@@ -129318,7 +131357,7 @@ module.exports = 'pointerlockchange';
/***/ }),
-/* 824 */
+/* 829 */
/***/ (function(module, exports) {
/**
@@ -129340,7 +131379,7 @@ module.exports = 'preupdate';
/***/ }),
-/* 825 */
+/* 830 */
/***/ (function(module, exports) {
/**
@@ -129361,7 +131400,7 @@ module.exports = 'shutdown';
/***/ }),
-/* 826 */
+/* 831 */
/***/ (function(module, exports) {
/**
@@ -129383,7 +131422,7 @@ module.exports = 'start';
/***/ }),
-/* 827 */
+/* 832 */
/***/ (function(module, exports) {
/**
@@ -129408,7 +131447,7 @@ module.exports = 'update';
/***/ }),
-/* 828 */
+/* 833 */
/***/ (function(module, exports) {
/**
@@ -129467,7 +131506,7 @@ module.exports = GetInnerHeight;
/***/ }),
-/* 829 */
+/* 834 */
/***/ (function(module, exports) {
/**
@@ -129497,7 +131536,7 @@ module.exports = 'addfile';
/***/ }),
-/* 830 */
+/* 835 */
/***/ (function(module, exports) {
/**
@@ -129525,7 +131564,7 @@ module.exports = 'complete';
/***/ }),
-/* 831 */
+/* 836 */
/***/ (function(module, exports) {
/**
@@ -129554,7 +131593,7 @@ module.exports = 'filecomplete';
/***/ }),
-/* 832 */
+/* 837 */
/***/ (function(module, exports) {
/**
@@ -129608,7 +131647,7 @@ module.exports = 'filecomplete-';
/***/ }),
-/* 833 */
+/* 838 */
/***/ (function(module, exports) {
/**
@@ -129633,7 +131672,7 @@ module.exports = 'loaderror';
/***/ }),
-/* 834 */
+/* 839 */
/***/ (function(module, exports) {
/**
@@ -129659,7 +131698,7 @@ module.exports = 'load';
/***/ }),
-/* 835 */
+/* 840 */
/***/ (function(module, exports) {
/**
@@ -129686,7 +131725,7 @@ module.exports = 'fileprogress';
/***/ }),
-/* 836 */
+/* 841 */
/***/ (function(module, exports) {
/**
@@ -129715,7 +131754,7 @@ module.exports = 'postprocess';
/***/ }),
-/* 837 */
+/* 842 */
/***/ (function(module, exports) {
/**
@@ -129740,7 +131779,7 @@ module.exports = 'progress';
/***/ }),
-/* 838 */
+/* 843 */
/***/ (function(module, exports) {
/**
@@ -129767,7 +131806,7 @@ module.exports = 'start';
/***/ }),
-/* 839 */
+/* 844 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -129777,7 +131816,7 @@ module.exports = 'start';
*/
var GetFastValue = __webpack_require__(2);
-var UppercaseFirst = __webpack_require__(347);
+var UppercaseFirst = __webpack_require__(178);
/**
* Builds an array of which physics plugins should be activated for the given Scene.
@@ -129829,7 +131868,7 @@ module.exports = GetPhysicsPlugins;
/***/ }),
-/* 840 */
+/* 845 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -129876,7 +131915,7 @@ module.exports = GetScenePlugins;
/***/ }),
-/* 841 */
+/* 846 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -129937,629 +131976,7 @@ module.exports = InjectionMap;
/***/ }),
-/* 842 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * @author Richard Davey
- * @copyright 2019 Photon Storm Ltd.
- * @license {@link https://opensource.org/licenses/MIT|MIT License}
- */
-
-var Class = __webpack_require__(0);
-var Clamp = __webpack_require__(22);
-var Color = __webpack_require__(33);
-var IsSizePowerOfTwo = __webpack_require__(117);
-var Texture = __webpack_require__(177);
-
-/**
- * @classdesc
- * A Canvas Texture is a special kind of Texture that is backed by an HTML Canvas Element as its source.
- *
- * You can use the properties of this texture to draw to the canvas element directly, using all of the standard
- * canvas operations available in the browser. Any Game Object can be given this texture and will render with it.
- *
- * Note: When running under WebGL the Canvas Texture needs to re-generate its base WebGLTexture and reupload it to
- * the GPU every time you modify it, otherwise the changes you make to this texture will not be visible. To do this
- * you should call `CanvasTexture.refresh()` once you are finished with your changes to the canvas. Try and keep
- * this to a minimum, especially on large canvas sizes, or you may inadvertently thrash the GPU by constantly uploading
- * texture data to it. This restriction does not apply if using the Canvas Renderer.
- *
- * It starts with only one frame that covers the whole of the canvas. You can add further frames, that specify
- * sections of the canvas using the `add` method.
- *
- * Should you need to resize the canvas use the `setSize` method so that it accurately updates all of the underlying
- * texture data as well. Forgetting to do this (i.e. by changing the canvas size directly from your code) could cause
- * graphical errors.
- *
- * @class CanvasTexture
- * @extends Phaser.Textures.Texture
- * @memberof Phaser.Textures
- * @constructor
- * @since 3.7.0
- *
- * @param {Phaser.Textures.CanvasTexture} manager - A reference to the Texture Manager this Texture belongs to.
- * @param {string} key - The unique string-based key of this Texture.
- * @param {HTMLCanvasElement} source - The canvas element that is used as the base of this texture.
- * @param {integer} width - The width of the canvas.
- * @param {integer} height - The height of the canvas.
- */
-var CanvasTexture = new Class({
-
- Extends: Texture,
-
- initialize:
-
- function CanvasTexture (manager, key, source, width, height)
- {
- Texture.call(this, manager, key, source, width, height);
-
- this.add('__BASE', 0, 0, 0, width, height);
-
- /**
- * A reference to the Texture Source of this Canvas.
- *
- * @name Phaser.Textures.CanvasTexture#_source
- * @type {Phaser.Textures.TextureSource}
- * @private
- * @since 3.7.0
- */
- this._source = this.frames['__BASE'].source;
-
- /**
- * The source Canvas Element.
- *
- * @name Phaser.Textures.CanvasTexture#canvas
- * @readonly
- * @type {HTMLCanvasElement}
- * @since 3.7.0
- */
- this.canvas = this._source.image;
-
- /**
- * The 2D Canvas Rendering Context.
- *
- * @name Phaser.Textures.CanvasTexture#context
- * @readonly
- * @type {CanvasRenderingContext2D}
- * @since 3.7.0
- */
- this.context = this.canvas.getContext('2d');
-
- /**
- * The width of the Canvas.
- * This property is read-only, if you wish to change it use the `setSize` method.
- *
- * @name Phaser.Textures.CanvasTexture#width
- * @readonly
- * @type {integer}
- * @since 3.7.0
- */
- this.width = width;
-
- /**
- * The height of the Canvas.
- * This property is read-only, if you wish to change it use the `setSize` method.
- *
- * @name Phaser.Textures.CanvasTexture#height
- * @readonly
- * @type {integer}
- * @since 3.7.0
- */
- this.height = height;
-
- /**
- * The context image data.
- * Use the `update` method to populate this when the canvas changes.
- *
- * @name Phaser.Textures.CanvasTexture#imageData
- * @type {ImageData}
- * @since 3.13.0
- */
- this.imageData = this.context.getImageData(0, 0, width, height);
-
- /**
- * A Uint8ClampedArray view into the `buffer`.
- * Use the `update` method to populate this when the canvas changes.
- * Note that this is unavailable in some browsers, such as Epic Browser, due to their security restrictions.
- *
- * @name Phaser.Textures.CanvasTexture#data
- * @type {Uint8ClampedArray}
- * @since 3.13.0
- */
- this.data = null;
-
- if (this.imageData)
- {
- this.data = this.imageData.data;
- }
-
- /**
- * An Uint32Array view into the `buffer`.
- *
- * @name Phaser.Textures.CanvasTexture#pixels
- * @type {Uint32Array}
- * @since 3.13.0
- */
- this.pixels = null;
-
- /**
- * An ArrayBuffer the same size as the context ImageData.
- *
- * @name Phaser.Textures.CanvasTexture#buffer
- * @type {ArrayBuffer}
- * @since 3.13.0
- */
- this.buffer;
-
- if (this.data)
- {
- if (this.imageData.data.buffer)
- {
- this.buffer = this.imageData.data.buffer;
- this.pixels = new Uint32Array(this.buffer);
- }
- else if (window.ArrayBuffer)
- {
- this.buffer = new ArrayBuffer(this.imageData.data.length);
- this.pixels = new Uint32Array(this.buffer);
- }
- else
- {
- this.pixels = this.imageData.data;
- }
- }
- },
-
- /**
- * This re-creates the `imageData` from the current context.
- * It then re-builds the ArrayBuffer, the `data` Uint8ClampedArray reference and the `pixels` Int32Array.
- *
- * Warning: This is a very expensive operation, so use it sparingly.
- *
- * @method Phaser.Textures.CanvasTexture#update
- * @since 3.13.0
- *
- * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.
- */
- update: function ()
- {
- this.imageData = this.context.getImageData(0, 0, this.width, this.height);
-
- this.data = this.imageData.data;
-
- if (this.imageData.data.buffer)
- {
- this.buffer = this.imageData.data.buffer;
- this.pixels = new Uint32Array(this.buffer);
- }
- else if (window.ArrayBuffer)
- {
- this.buffer = new ArrayBuffer(this.imageData.data.length);
- this.pixels = new Uint32Array(this.buffer);
- }
- else
- {
- this.pixels = this.imageData.data;
- }
-
- return this;
- },
-
- /**
- * Draws the given Image or Canvas element to this CanvasTexture, then updates the internal
- * ImageData buffer and arrays.
- *
- * @method Phaser.Textures.CanvasTexture#draw
- * @since 3.13.0
- *
- * @param {integer} x - The x coordinate to draw the source at.
- * @param {integer} y - The y coordinate to draw the source at.
- * @param {(HTMLImageElement|HTMLCanvasElement)} source - The element to draw to this canvas.
- *
- * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.
- */
- draw: function (x, y, source)
- {
- this.context.drawImage(source, x, y);
-
- return this.update();
- },
-
- /**
- * Draws the given texture frame to this CanvasTexture, then updates the internal
- * ImageData buffer and arrays.
- *
- * @method Phaser.Textures.CanvasTexture#drawFrame
- * @since 3.16.0
- *
- * @param {string} key - The unique string-based key of the Texture.
- * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.
- * @param {integer} [x=0] - The x coordinate to draw the source at.
- * @param {integer} [y=0] - The y coordinate to draw the source at.
- *
- * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.
- */
- drawFrame: function (key, frame, x, y)
- {
- if (x === undefined) { x = 0; }
- if (y === undefined) { y = 0; }
-
- var textureFrame = this.manager.getFrame(key, frame);
-
- if (textureFrame)
- {
- var cd = textureFrame.canvasData;
-
- var width = textureFrame.cutWidth;
- var height = textureFrame.cutHeight;
- var res = textureFrame.source.resolution;
-
- this.context.drawImage(
- textureFrame.source.image,
- cd.x, cd.y,
- width,
- height,
- x, y,
- width / res,
- height / res
- );
-
- return this.update();
- }
- else
- {
- return this;
- }
- },
-
- /**
- * Sets a pixel in the CanvasTexture to the given color and alpha values.
- *
- * This is an expensive operation to run in large quantities, so use sparingly.
- *
- * @method Phaser.Textures.CanvasTexture#setPixel
- * @since 3.16.0
- *
- * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} red - The red color value. A number between 0 and 255.
- * @param {integer} green - The green color value. A number between 0 and 255.
- * @param {integer} blue - The blue color value. A number between 0 and 255.
- * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.
- *
- * @return {this} This CanvasTexture.
- */
- setPixel: function (x, y, red, green, blue, alpha)
- {
- if (alpha === undefined) { alpha = 255; }
-
- x = Math.abs(Math.floor(x));
- y = Math.abs(Math.floor(y));
-
- var index = this.getIndex(x, y);
-
- if (index > -1)
- {
- var imageData = this.context.getImageData(x, y, 1, 1);
-
- imageData.data[0] = red;
- imageData.data[1] = green;
- imageData.data[2] = blue;
- imageData.data[3] = alpha;
-
- this.context.putImageData(imageData, x, y);
- }
-
- return this;
- },
-
- /**
- * Puts the ImageData into the context of this CanvasTexture at the given coordinates.
- *
- * @method Phaser.Textures.CanvasTexture#putData
- * @since 3.16.0
- *
- * @param {ImageData} imageData - The ImageData to put at the given location.
- * @param {integer} x - The x coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} y - The y coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} [dirtyX=0] - Horizontal position (x coordinate) of the top-left corner from which the image data will be extracted.
- * @param {integer} [dirtyY=0] - Vertical position (x coordinate) of the top-left corner from which the image data will be extracted.
- * @param {integer} [dirtyWidth] - Width of the rectangle to be painted. Defaults to the width of the image data.
- * @param {integer} [dirtyHeight] - Height of the rectangle to be painted. Defaults to the height of the image data.
- *
- * @return {this} This CanvasTexture.
- */
- putData: function (imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight)
- {
- if (dirtyX === undefined) { dirtyX = 0; }
- if (dirtyY === undefined) { dirtyY = 0; }
- if (dirtyWidth === undefined) { dirtyWidth = imageData.width; }
- if (dirtyHeight === undefined) { dirtyHeight = imageData.height; }
-
- this.context.putImageData(imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
-
- return this;
- },
-
- /**
- * Gets an ImageData region from this CanvasTexture from the position and size specified.
- * You can write this back using `CanvasTexture.putData`, or manipulate it.
- *
- * @method Phaser.Textures.CanvasTexture#getData
- * @since 3.16.0
- *
- * @param {integer} x - The x coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} y - The y coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} width - The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.
- * @param {integer} height - The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.
- *
- * @return {ImageData} The ImageData extracted from this CanvasTexture.
- */
- getData: function (x, y, width, height)
- {
- x = Clamp(Math.floor(x), 0, this.width - 1);
- y = Clamp(Math.floor(y), 0, this.height - 1);
- width = Clamp(width, 1, this.width - x);
- height = Clamp(height, 1, this.height - y);
-
- var imageData = this.context.getImageData(x, y, width, height);
-
- return imageData;
- },
-
- /**
- * Get the color of a specific pixel from this texture and store it in a Color object.
- *
- * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,
- * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
- *
- * @method Phaser.Textures.CanvasTexture#getPixel
- * @since 3.13.0
- *
- * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {Phaser.Display.Color} [out] - A Color object to store the pixel values in. If not provided a new Color object will be created.
- *
- * @return {Phaser.Display.Color} An object with the red, green, blue and alpha values set in the r, g, b and a properties.
- */
- getPixel: function (x, y, out)
- {
- if (!out)
- {
- out = new Color();
- }
-
- var index = this.getIndex(x, y);
-
- if (index > -1)
- {
- var data = this.data;
-
- var r = data[index + 0];
- var g = data[index + 1];
- var b = data[index + 2];
- var a = data[index + 3];
-
- out.setTo(r, g, b, a);
- }
-
- return out;
- },
-
- /**
- * Returns an array containing all of the pixels in the given region.
- *
- * If the requested region extends outside the bounds of this CanvasTexture,
- * the region is truncated to fit.
- *
- * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,
- * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
- *
- * @method Phaser.Textures.CanvasTexture#getPixels
- * @since 3.16.0
- *
- * @param {integer} x - The x coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} y - The y coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} width - The width of the region to get. Must be an integer.
- * @param {integer} [height] - The height of the region to get. Must be an integer. If not given will be set to the `width`.
- *
- * @return {Phaser.Types.Textures.PixelConfig[]} An array of Pixel objects.
- */
- getPixels: function (x, y, width, height)
- {
- if (height === undefined) { height = width; }
-
- x = Math.abs(Math.round(x));
- y = Math.abs(Math.round(y));
-
- var left = Clamp(x, 0, this.width);
- var right = Clamp(x + width, 0, this.width);
- var top = Clamp(y, 0, this.height);
- var bottom = Clamp(y + height, 0, this.height);
-
- var pixel = new Color();
-
- var out = [];
-
- for (var py = top; py < bottom; py++)
- {
- var row = [];
-
- for (var px = left; px < right; px++)
- {
- pixel = this.getPixel(px, py, pixel);
-
- row.push({ x: px, y: py, color: pixel.color, alpha: pixel.alphaGL });
- }
-
- out.push(row);
- }
-
- return out;
- },
-
- /**
- * Returns the Image Data index for the given pixel in this CanvasTexture.
- *
- * The index can be used to read directly from the `this.data` array.
- *
- * The index points to the red value in the array. The subsequent 3 indexes
- * point to green, blue and alpha respectively.
- *
- * @method Phaser.Textures.CanvasTexture#getIndex
- * @since 3.16.0
- *
- * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
- * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
- *
- * @return {integer}
- */
- getIndex: function (x, y)
- {
- x = Math.abs(Math.round(x));
- y = Math.abs(Math.round(y));
-
- if (x < this.width && y < this.height)
- {
- return (x + y * this.width) * 4;
- }
- else
- {
- return -1;
- }
- },
-
- /**
- * This should be called manually if you are running under WebGL.
- * It will refresh the WebGLTexture from the Canvas source. Only call this if you know that the
- * canvas has changed, as there is a significant GPU texture allocation cost involved in doing so.
- *
- * @method Phaser.Textures.CanvasTexture#refresh
- * @since 3.7.0
- *
- * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.
- */
- refresh: function ()
- {
- this._source.update();
-
- return this;
- },
-
- /**
- * Gets the Canvas Element.
- *
- * @method Phaser.Textures.CanvasTexture#getCanvas
- * @since 3.7.0
- *
- * @return {HTMLCanvasElement} The Canvas DOM element this texture is using.
- */
- getCanvas: function ()
- {
- return this.canvas;
- },
-
- /**
- * Gets the 2D Canvas Rendering Context.
- *
- * @method Phaser.Textures.CanvasTexture#getContext
- * @since 3.7.0
- *
- * @return {CanvasRenderingContext2D} The Canvas Rendering Context this texture is using.
- */
- getContext: function ()
- {
- return this.context;
- },
-
- /**
- * Clears the given region of this Canvas Texture, resetting it back to transparent.
- * If no region is given, the whole Canvas Texture is cleared.
- *
- * @method Phaser.Textures.CanvasTexture#clear
- * @since 3.7.0
- *
- * @param {integer} [x=0] - The x coordinate of the top-left of the region to clear.
- * @param {integer} [y=0] - The y coordinate of the top-left of the region to clear.
- * @param {integer} [width] - The width of the region.
- * @param {integer} [height] - The height of the region.
- *
- * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.
- */
- clear: function (x, y, width, height)
- {
- if (x === undefined) { x = 0; }
- if (y === undefined) { y = 0; }
- if (width === undefined) { width = this.width; }
- if (height === undefined) { height = this.height; }
-
- this.context.clearRect(x, y, width, height);
-
- return this.update();
- },
-
- /**
- * Changes the size of this Canvas Texture.
- *
- * @method Phaser.Textures.CanvasTexture#setSize
- * @since 3.7.0
- *
- * @param {integer} width - The new width of the Canvas.
- * @param {integer} [height] - The new height of the Canvas. If not given it will use the width as the height.
- *
- * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.
- */
- setSize: function (width, height)
- {
- if (height === undefined) { height = width; }
-
- if (width !== this.width || height !== this.height)
- {
- // Update the Canvas
- this.canvas.width = width;
- this.canvas.height = height;
-
- // Update the Texture Source
- this._source.width = width;
- this._source.height = height;
- this._source.isPowerOf2 = IsSizePowerOfTwo(width, height);
-
- // Update the Frame
- this.frames['__BASE'].setSize(width, height, 0, 0);
-
- this.refresh();
- }
-
- return this;
- },
-
- /**
- * Destroys this Texture and releases references to its sources and frames.
- *
- * @method Phaser.Textures.CanvasTexture#destroy
- * @since 3.16.0
- */
- destroy: function ()
- {
- Texture.prototype.destroy.call(this);
-
- this._source = null;
- this.canvas = null;
- this.context = null;
- this.imageData = null;
- this.data = null;
- this.pixels = null;
- this.buffer = null;
- }
-
-});
-
-module.exports = CanvasTexture;
-
-
-/***/ }),
-/* 843 */
+/* 847 */
/***/ (function(module, exports) {
/**
@@ -130640,7 +132057,7 @@ module.exports = AtlasXML;
/***/ }),
-/* 844 */
+/* 848 */
/***/ (function(module, exports) {
/**
@@ -130675,7 +132092,7 @@ module.exports = Canvas;
/***/ }),
-/* 845 */
+/* 849 */
/***/ (function(module, exports) {
/**
@@ -130710,7 +132127,7 @@ module.exports = Image;
/***/ }),
-/* 846 */
+/* 850 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -130719,7 +132136,7 @@ module.exports = Image;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clone = __webpack_require__(64);
+var Clone = __webpack_require__(65);
/**
* Parses a Texture Atlas JSON Array and adds the Frames to the Texture.
@@ -130817,7 +132234,7 @@ module.exports = JSONArray;
/***/ }),
-/* 847 */
+/* 851 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -130826,7 +132243,7 @@ module.exports = JSONArray;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clone = __webpack_require__(64);
+var Clone = __webpack_require__(65);
/**
* Parses a Texture Atlas JSON Hash and adds the Frames to the Texture.
@@ -130916,7 +132333,7 @@ module.exports = JSONHash;
/***/ }),
-/* 848 */
+/* 852 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -131041,7 +132458,7 @@ module.exports = SpriteSheet;
/***/ }),
-/* 849 */
+/* 853 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -131232,7 +132649,7 @@ module.exports = SpriteSheetFromAtlas;
/***/ }),
-/* 850 */
+/* 854 */
/***/ (function(module, exports) {
/**
@@ -131402,7 +132819,7 @@ TextureImporter:
/***/ }),
-/* 851 */
+/* 855 */
/***/ (function(module, exports) {
/**
@@ -131433,7 +132850,7 @@ module.exports = 'complete';
/***/ }),
-/* 852 */
+/* 856 */
/***/ (function(module, exports) {
/**
@@ -131463,7 +132880,7 @@ module.exports = 'decoded';
/***/ }),
-/* 853 */
+/* 857 */
/***/ (function(module, exports) {
/**
@@ -131495,7 +132912,7 @@ module.exports = 'decodedall';
/***/ }),
-/* 854 */
+/* 858 */
/***/ (function(module, exports) {
/**
@@ -131527,7 +132944,7 @@ module.exports = 'destroy';
/***/ }),
-/* 855 */
+/* 859 */
/***/ (function(module, exports) {
/**
@@ -131560,7 +132977,7 @@ module.exports = 'detune';
/***/ }),
-/* 856 */
+/* 860 */
/***/ (function(module, exports) {
/**
@@ -131588,7 +133005,7 @@ module.exports = 'detune';
/***/ }),
-/* 857 */
+/* 861 */
/***/ (function(module, exports) {
/**
@@ -131615,7 +133032,7 @@ module.exports = 'mute';
/***/ }),
-/* 858 */
+/* 862 */
/***/ (function(module, exports) {
/**
@@ -131643,7 +133060,7 @@ module.exports = 'rate';
/***/ }),
-/* 859 */
+/* 863 */
/***/ (function(module, exports) {
/**
@@ -131670,7 +133087,7 @@ module.exports = 'volume';
/***/ }),
-/* 860 */
+/* 864 */
/***/ (function(module, exports) {
/**
@@ -131704,7 +133121,7 @@ module.exports = 'loop';
/***/ }),
-/* 861 */
+/* 865 */
/***/ (function(module, exports) {
/**
@@ -131738,7 +133155,7 @@ module.exports = 'looped';
/***/ }),
-/* 862 */
+/* 866 */
/***/ (function(module, exports) {
/**
@@ -131771,7 +133188,7 @@ module.exports = 'mute';
/***/ }),
-/* 863 */
+/* 867 */
/***/ (function(module, exports) {
/**
@@ -131798,7 +133215,7 @@ module.exports = 'pauseall';
/***/ }),
-/* 864 */
+/* 868 */
/***/ (function(module, exports) {
/**
@@ -131830,7 +133247,7 @@ module.exports = 'pause';
/***/ }),
-/* 865 */
+/* 869 */
/***/ (function(module, exports) {
/**
@@ -131861,7 +133278,7 @@ module.exports = 'play';
/***/ }),
-/* 866 */
+/* 870 */
/***/ (function(module, exports) {
/**
@@ -131894,7 +133311,7 @@ module.exports = 'rate';
/***/ }),
-/* 867 */
+/* 871 */
/***/ (function(module, exports) {
/**
@@ -131921,7 +133338,7 @@ module.exports = 'resumeall';
/***/ }),
-/* 868 */
+/* 872 */
/***/ (function(module, exports) {
/**
@@ -131954,7 +133371,7 @@ module.exports = 'resume';
/***/ }),
-/* 869 */
+/* 873 */
/***/ (function(module, exports) {
/**
@@ -131987,7 +133404,7 @@ module.exports = 'seek';
/***/ }),
-/* 870 */
+/* 874 */
/***/ (function(module, exports) {
/**
@@ -132014,7 +133431,7 @@ module.exports = 'stopall';
/***/ }),
-/* 871 */
+/* 875 */
/***/ (function(module, exports) {
/**
@@ -132046,7 +133463,7 @@ module.exports = 'stop';
/***/ }),
-/* 872 */
+/* 876 */
/***/ (function(module, exports) {
/**
@@ -132073,7 +133490,7 @@ module.exports = 'unlocked';
/***/ }),
-/* 873 */
+/* 877 */
/***/ (function(module, exports) {
/**
@@ -132106,7 +133523,7 @@ module.exports = 'volume';
/***/ }),
-/* 874 */
+/* 878 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -132121,99 +133538,99 @@ module.exports = 'volume';
var GameObjects = {
- Events: __webpack_require__(110),
+ Events: __webpack_require__(111),
- DisplayList: __webpack_require__(875),
- GameObjectCreator: __webpack_require__(15),
- GameObjectFactory: __webpack_require__(5),
- UpdateList: __webpack_require__(903),
+ DisplayList: __webpack_require__(879),
+ GameObjectCreator: __webpack_require__(16),
+ GameObjectFactory: __webpack_require__(6),
+ UpdateList: __webpack_require__(907),
Components: __webpack_require__(12),
- BuildGameObject: __webpack_require__(29),
- BuildGameObjectAnimation: __webpack_require__(363),
+ BuildGameObject: __webpack_require__(28),
+ BuildGameObjectAnimation: __webpack_require__(366),
GameObject: __webpack_require__(13),
- BitmapText: __webpack_require__(128),
- Blitter: __webpack_require__(182),
- Container: __webpack_require__(183),
- DOMElement: __webpack_require__(365),
- DynamicBitmapText: __webpack_require__(184),
- Extern: __webpack_require__(367),
- Graphics: __webpack_require__(185),
- Group: __webpack_require__(94),
- Image: __webpack_require__(95),
- Particles: __webpack_require__(932),
- PathFollower: __webpack_require__(379),
- RenderTexture: __webpack_require__(189),
- RetroFont: __webpack_require__(941),
- Sprite: __webpack_require__(67),
- Text: __webpack_require__(190),
- TileSprite: __webpack_require__(191),
- Zone: __webpack_require__(106),
+ BitmapText: __webpack_require__(129),
+ Blitter: __webpack_require__(184),
+ Container: __webpack_require__(185),
+ DOMElement: __webpack_require__(368),
+ DynamicBitmapText: __webpack_require__(186),
+ Extern: __webpack_require__(370),
+ Graphics: __webpack_require__(187),
+ Group: __webpack_require__(95),
+ Image: __webpack_require__(96),
+ Particles: __webpack_require__(936),
+ PathFollower: __webpack_require__(382),
+ RenderTexture: __webpack_require__(191),
+ RetroFont: __webpack_require__(945),
+ Sprite: __webpack_require__(68),
+ Text: __webpack_require__(192),
+ TileSprite: __webpack_require__(193),
+ Zone: __webpack_require__(107),
// Shapes
- Shape: __webpack_require__(30),
- Arc: __webpack_require__(381),
- Curve: __webpack_require__(382),
- Ellipse: __webpack_require__(383),
- Grid: __webpack_require__(384),
- IsoBox: __webpack_require__(385),
- IsoTriangle: __webpack_require__(386),
- Line: __webpack_require__(387),
- Polygon: __webpack_require__(388),
- Rectangle: __webpack_require__(393),
- Star: __webpack_require__(394),
- Triangle: __webpack_require__(395),
+ Shape: __webpack_require__(29),
+ Arc: __webpack_require__(384),
+ Curve: __webpack_require__(385),
+ Ellipse: __webpack_require__(386),
+ Grid: __webpack_require__(387),
+ IsoBox: __webpack_require__(388),
+ IsoTriangle: __webpack_require__(389),
+ Line: __webpack_require__(390),
+ Polygon: __webpack_require__(391),
+ Rectangle: __webpack_require__(396),
+ Star: __webpack_require__(397),
+ Triangle: __webpack_require__(398),
// Game Object Factories
Factories: {
- Blitter: __webpack_require__(986),
- Container: __webpack_require__(987),
- DOMElement: __webpack_require__(988),
- DynamicBitmapText: __webpack_require__(989),
- Extern: __webpack_require__(990),
- Graphics: __webpack_require__(991),
- Group: __webpack_require__(992),
- Image: __webpack_require__(993),
- Particles: __webpack_require__(994),
- PathFollower: __webpack_require__(995),
- RenderTexture: __webpack_require__(996),
- Sprite: __webpack_require__(997),
- StaticBitmapText: __webpack_require__(998),
- Text: __webpack_require__(999),
- TileSprite: __webpack_require__(1000),
- Zone: __webpack_require__(1001),
+ Blitter: __webpack_require__(990),
+ Container: __webpack_require__(991),
+ DOMElement: __webpack_require__(992),
+ DynamicBitmapText: __webpack_require__(993),
+ Extern: __webpack_require__(994),
+ Graphics: __webpack_require__(995),
+ Group: __webpack_require__(996),
+ Image: __webpack_require__(997),
+ Particles: __webpack_require__(998),
+ PathFollower: __webpack_require__(999),
+ RenderTexture: __webpack_require__(1000),
+ Sprite: __webpack_require__(1001),
+ StaticBitmapText: __webpack_require__(1002),
+ Text: __webpack_require__(1003),
+ TileSprite: __webpack_require__(1004),
+ Zone: __webpack_require__(1005),
// Shapes
- Arc: __webpack_require__(1002),
- Curve: __webpack_require__(1003),
- Ellipse: __webpack_require__(1004),
- Grid: __webpack_require__(1005),
- IsoBox: __webpack_require__(1006),
- IsoTriangle: __webpack_require__(1007),
- Line: __webpack_require__(1008),
- Polygon: __webpack_require__(1009),
- Rectangle: __webpack_require__(1010),
- Star: __webpack_require__(1011),
- Triangle: __webpack_require__(1012)
+ Arc: __webpack_require__(1006),
+ Curve: __webpack_require__(1007),
+ Ellipse: __webpack_require__(1008),
+ Grid: __webpack_require__(1009),
+ IsoBox: __webpack_require__(1010),
+ IsoTriangle: __webpack_require__(1011),
+ Line: __webpack_require__(1012),
+ Polygon: __webpack_require__(1013),
+ Rectangle: __webpack_require__(1014),
+ Star: __webpack_require__(1015),
+ Triangle: __webpack_require__(1016)
},
Creators: {
- Blitter: __webpack_require__(1013),
- Container: __webpack_require__(1014),
- DynamicBitmapText: __webpack_require__(1015),
- Graphics: __webpack_require__(1016),
- Group: __webpack_require__(1017),
- Image: __webpack_require__(1018),
- Particles: __webpack_require__(1019),
- RenderTexture: __webpack_require__(1020),
- Sprite: __webpack_require__(1021),
- StaticBitmapText: __webpack_require__(1022),
- Text: __webpack_require__(1023),
- TileSprite: __webpack_require__(1024),
- Zone: __webpack_require__(1025)
+ Blitter: __webpack_require__(1017),
+ Container: __webpack_require__(1018),
+ DynamicBitmapText: __webpack_require__(1019),
+ Graphics: __webpack_require__(1020),
+ Group: __webpack_require__(1021),
+ Image: __webpack_require__(1022),
+ Particles: __webpack_require__(1023),
+ RenderTexture: __webpack_require__(1024),
+ Sprite: __webpack_require__(1025),
+ StaticBitmapText: __webpack_require__(1026),
+ Text: __webpack_require__(1027),
+ TileSprite: __webpack_require__(1028),
+ Zone: __webpack_require__(1029)
}
};
@@ -132221,29 +133638,29 @@ var GameObjects = {
if (true)
{
// WebGL only Game Objects
- GameObjects.Mesh = __webpack_require__(129);
- GameObjects.Quad = __webpack_require__(194);
- GameObjects.Shader = __webpack_require__(195);
+ GameObjects.Mesh = __webpack_require__(130);
+ GameObjects.Quad = __webpack_require__(196);
+ GameObjects.Shader = __webpack_require__(197);
- GameObjects.Factories.Mesh = __webpack_require__(1032);
- GameObjects.Factories.Quad = __webpack_require__(1033);
- GameObjects.Factories.Shader = __webpack_require__(1034);
+ GameObjects.Factories.Mesh = __webpack_require__(1036);
+ GameObjects.Factories.Quad = __webpack_require__(1037);
+ GameObjects.Factories.Shader = __webpack_require__(1038);
- GameObjects.Creators.Mesh = __webpack_require__(1035);
- GameObjects.Creators.Quad = __webpack_require__(1036);
- GameObjects.Creators.Shader = __webpack_require__(1037);
+ GameObjects.Creators.Mesh = __webpack_require__(1039);
+ GameObjects.Creators.Quad = __webpack_require__(1040);
+ GameObjects.Creators.Shader = __webpack_require__(1041);
- GameObjects.Light = __webpack_require__(399);
+ GameObjects.Light = __webpack_require__(402);
- __webpack_require__(400);
- __webpack_require__(1038);
+ __webpack_require__(403);
+ __webpack_require__(1042);
}
module.exports = GameObjects;
/***/ }),
-/* 875 */
+/* 879 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -132253,10 +133670,10 @@ module.exports = GameObjects;
*/
var Class = __webpack_require__(0);
-var List = __webpack_require__(125);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
-var StableSort = __webpack_require__(127);
+var List = __webpack_require__(126);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
+var StableSort = __webpack_require__(128);
/**
* @classdesc
@@ -132448,7 +133865,7 @@ module.exports = DisplayList;
/***/ }),
-/* 876 */
+/* 880 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -132463,21 +133880,21 @@ module.exports = DisplayList;
module.exports = {
- CheckMatrix: __webpack_require__(179),
- MatrixToString: __webpack_require__(877),
- ReverseColumns: __webpack_require__(878),
- ReverseRows: __webpack_require__(879),
- Rotate180: __webpack_require__(880),
- RotateLeft: __webpack_require__(881),
- RotateMatrix: __webpack_require__(126),
- RotateRight: __webpack_require__(882),
- TransposeMatrix: __webpack_require__(360)
+ CheckMatrix: __webpack_require__(181),
+ MatrixToString: __webpack_require__(881),
+ ReverseColumns: __webpack_require__(882),
+ ReverseRows: __webpack_require__(883),
+ Rotate180: __webpack_require__(884),
+ RotateLeft: __webpack_require__(885),
+ RotateMatrix: __webpack_require__(127),
+ RotateRight: __webpack_require__(886),
+ TransposeMatrix: __webpack_require__(363)
};
/***/ }),
-/* 877 */
+/* 881 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -132486,8 +133903,8 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Pad = __webpack_require__(158);
-var CheckMatrix = __webpack_require__(179);
+var Pad = __webpack_require__(159);
+var CheckMatrix = __webpack_require__(181);
/**
* Generates a string (which you can pass to console.log) from the given Array Matrix.
@@ -132558,7 +133975,7 @@ module.exports = MatrixToString;
/***/ }),
-/* 878 */
+/* 882 */
/***/ (function(module, exports) {
/**
@@ -132589,7 +134006,7 @@ module.exports = ReverseColumns;
/***/ }),
-/* 879 */
+/* 883 */
/***/ (function(module, exports) {
/**
@@ -132625,7 +134042,7 @@ module.exports = ReverseRows;
/***/ }),
-/* 880 */
+/* 884 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -132634,7 +134051,7 @@ module.exports = ReverseRows;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RotateMatrix = __webpack_require__(126);
+var RotateMatrix = __webpack_require__(127);
/**
* Rotates the array matrix 180 degrees.
@@ -132658,7 +134075,7 @@ module.exports = Rotate180;
/***/ }),
-/* 881 */
+/* 885 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -132667,7 +134084,7 @@ module.exports = Rotate180;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RotateMatrix = __webpack_require__(126);
+var RotateMatrix = __webpack_require__(127);
/**
* Rotates the array matrix to the left (or 90 degrees)
@@ -132691,7 +134108,7 @@ module.exports = RotateLeft;
/***/ }),
-/* 882 */
+/* 886 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -132700,7 +134117,7 @@ module.exports = RotateLeft;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RotateMatrix = __webpack_require__(126);
+var RotateMatrix = __webpack_require__(127);
/**
* Rotates the array matrix to the left (or -90 degrees)
@@ -132724,7 +134141,7 @@ module.exports = RotateRight;
/***/ }),
-/* 883 */
+/* 887 */
/***/ (function(module, exports) {
/**
@@ -132841,7 +134258,7 @@ module.exports = Add;
/***/ }),
-/* 884 */
+/* 888 */
/***/ (function(module, exports) {
/**
@@ -132963,7 +134380,7 @@ module.exports = AddAt;
/***/ }),
-/* 885 */
+/* 889 */
/***/ (function(module, exports) {
/**
@@ -133001,7 +134418,7 @@ module.exports = BringToTop;
/***/ }),
-/* 886 */
+/* 890 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133010,7 +134427,7 @@ module.exports = BringToTop;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SafeRange = __webpack_require__(66);
+var SafeRange = __webpack_require__(67);
/**
* Returns the total number of elements in the array which have a property matching the given value.
@@ -133053,7 +134470,7 @@ module.exports = CountAllMatching;
/***/ }),
-/* 887 */
+/* 891 */
/***/ (function(module, exports) {
/**
@@ -133099,7 +134516,7 @@ module.exports = Each;
/***/ }),
-/* 888 */
+/* 892 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133108,7 +134525,7 @@ module.exports = Each;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SafeRange = __webpack_require__(66);
+var SafeRange = __webpack_require__(67);
/**
* Passes each element in the array, between the start and end indexes, to the given callback.
@@ -133155,7 +134572,7 @@ module.exports = EachInRange;
/***/ }),
-/* 889 */
+/* 893 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133164,7 +134581,7 @@ module.exports = EachInRange;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SafeRange = __webpack_require__(66);
+var SafeRange = __webpack_require__(67);
/**
* Returns all elements in the array.
@@ -133217,7 +134634,7 @@ module.exports = GetAll;
/***/ }),
-/* 890 */
+/* 894 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133226,7 +134643,7 @@ module.exports = GetAll;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SafeRange = __webpack_require__(66);
+var SafeRange = __webpack_require__(67);
/**
* Returns the first element in the array.
@@ -133276,7 +134693,7 @@ module.exports = GetFirst;
/***/ }),
-/* 891 */
+/* 895 */
/***/ (function(module, exports) {
/**
@@ -133318,7 +134735,7 @@ module.exports = MoveDown;
/***/ }),
-/* 892 */
+/* 896 */
/***/ (function(module, exports) {
/**
@@ -133365,7 +134782,7 @@ module.exports = MoveTo;
/***/ }),
-/* 893 */
+/* 897 */
/***/ (function(module, exports) {
/**
@@ -133407,7 +134824,7 @@ module.exports = MoveUp;
/***/ }),
-/* 894 */
+/* 898 */
/***/ (function(module, exports) {
/**
@@ -133471,7 +134888,7 @@ module.exports = NumberArray;
/***/ }),
-/* 895 */
+/* 899 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133480,7 +134897,7 @@ module.exports = NumberArray;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RoundAwayFromZero = __webpack_require__(306);
+var RoundAwayFromZero = __webpack_require__(309);
/**
* Create an array of numbers (positive and/or negative) progressing from `start`
@@ -133548,7 +134965,7 @@ module.exports = NumberArrayStep;
/***/ }),
-/* 896 */
+/* 900 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133557,7 +134974,7 @@ module.exports = NumberArrayStep;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SpliceOne = __webpack_require__(78);
+var SpliceOne = __webpack_require__(79);
/**
* Removes the item from the given position in the array.
@@ -133599,7 +135016,7 @@ module.exports = RemoveAt;
/***/ }),
-/* 897 */
+/* 901 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133608,7 +135025,7 @@ module.exports = RemoveAt;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SafeRange = __webpack_require__(66);
+var SafeRange = __webpack_require__(67);
/**
* Removes the item within the given range in the array.
@@ -133662,7 +135079,7 @@ module.exports = RemoveBetween;
/***/ }),
-/* 898 */
+/* 902 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133671,7 +135088,7 @@ module.exports = RemoveBetween;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SpliceOne = __webpack_require__(78);
+var SpliceOne = __webpack_require__(79);
/**
* Removes a random object from the given array and returns it.
@@ -133700,7 +135117,7 @@ module.exports = RemoveRandomElement;
/***/ }),
-/* 899 */
+/* 903 */
/***/ (function(module, exports) {
/**
@@ -133743,7 +135160,7 @@ module.exports = Replace;
/***/ }),
-/* 900 */
+/* 904 */
/***/ (function(module, exports) {
/**
@@ -133781,7 +135198,7 @@ module.exports = SendToBack;
/***/ }),
-/* 901 */
+/* 905 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133790,7 +135207,7 @@ module.exports = SendToBack;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SafeRange = __webpack_require__(66);
+var SafeRange = __webpack_require__(67);
/**
* Scans the array for elements with the given property. If found, the property is set to the `value`.
@@ -133836,7 +135253,7 @@ module.exports = SetAll;
/***/ }),
-/* 902 */
+/* 906 */
/***/ (function(module, exports) {
/**
@@ -133884,7 +135301,7 @@ module.exports = Swap;
/***/ }),
-/* 903 */
+/* 907 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -133894,8 +135311,8 @@ module.exports = Swap;
*/
var Class = __webpack_require__(0);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
/**
* @classdesc
@@ -134082,9 +135499,12 @@ var UpdateList = new Class({
*/
update: function (time, delta)
{
- for (var i = 0; i < this._list.length; i++)
+ var list = this._list;
+ var length = list.length;
+
+ for (var i = 0; i < length; i++)
{
- var gameObject = this._list[i];
+ var gameObject = list[i];
if (gameObject.active)
{
@@ -134105,9 +135525,7 @@ var UpdateList = new Class({
*/
remove: function (child)
{
- var index = this._pendingRemoval.indexOf(child);
-
- if (index !== -1)
+ if (this._list.indexOf(child) !== -1 && this._pendingRemoval.indexOf(child) === -1)
{
this._pendingRemoval.push(child);
}
@@ -134218,7 +135636,7 @@ module.exports = UpdateList;
/***/ }),
-/* 904 */
+/* 908 */
/***/ (function(module, exports) {
/**
@@ -134431,7 +135849,7 @@ module.exports = GetBitmapTextSize;
/***/ }),
-/* 905 */
+/* 909 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -134440,7 +135858,7 @@ module.exports = GetBitmapTextSize;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ParseXMLBitmapFont = __webpack_require__(181);
+var ParseXMLBitmapFont = __webpack_require__(183);
/**
* Parse an XML Bitmap Font from an Atlas.
@@ -134484,7 +135902,7 @@ module.exports = ParseFromAtlas;
/***/ }),
-/* 906 */
+/* 910 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -134498,12 +135916,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(907);
+ renderWebGL = __webpack_require__(911);
}
if (true)
{
- renderCanvas = __webpack_require__(908);
+ renderCanvas = __webpack_require__(912);
}
module.exports = {
@@ -134515,7 +135933,7 @@ module.exports = {
/***/ }),
-/* 907 */
+/* 911 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -134744,7 +136162,7 @@ module.exports = BitmapTextWebGLRenderer;
/***/ }),
-/* 908 */
+/* 912 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -134753,7 +136171,7 @@ module.exports = BitmapTextWebGLRenderer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SetTransform = __webpack_require__(25);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -134919,7 +136337,7 @@ module.exports = BitmapTextCanvasRenderer;
/***/ }),
-/* 909 */
+/* 913 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -134933,12 +136351,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(910);
+ renderWebGL = __webpack_require__(914);
}
if (true)
{
- renderCanvas = __webpack_require__(911);
+ renderCanvas = __webpack_require__(915);
}
module.exports = {
@@ -134950,7 +136368,7 @@ module.exports = {
/***/ }),
-/* 910 */
+/* 914 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -135080,7 +136498,7 @@ module.exports = BlitterWebGLRenderer;
/***/ }),
-/* 911 */
+/* 915 */
/***/ (function(module, exports) {
/**
@@ -135208,7 +136626,7 @@ module.exports = BlitterCanvasRenderer;
/***/ }),
-/* 912 */
+/* 916 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -135218,7 +136636,7 @@ module.exports = BlitterCanvasRenderer;
*/
var Class = __webpack_require__(0);
-var Frame = __webpack_require__(91);
+var Frame = __webpack_require__(92);
/**
* @classdesc
@@ -135592,7 +137010,7 @@ module.exports = Bob;
/***/ }),
-/* 913 */
+/* 917 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -135607,12 +137025,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(914);
+ renderWebGL = __webpack_require__(918);
}
if (true)
{
- renderCanvas = __webpack_require__(915);
+ renderCanvas = __webpack_require__(919);
}
module.exports = {
@@ -135624,7 +137042,7 @@ module.exports = {
/***/ }),
-/* 914 */
+/* 918 */
/***/ (function(module, exports) {
/**
@@ -135694,7 +137112,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent
continue;
}
- var childAlpha = child._alpha;
+ var childAlpha = child.alpha;
var childScrollFactorX = child.scrollFactorX;
var childScrollFactorY = child.scrollFactorY;
@@ -135731,7 +137149,7 @@ module.exports = ContainerWebGLRenderer;
/***/ }),
-/* 915 */
+/* 919 */
/***/ (function(module, exports) {
/**
@@ -135801,7 +137219,7 @@ var ContainerCanvasRenderer = function (renderer, container, interpolationPercen
continue;
}
- var childAlpha = child._alpha;
+ var childAlpha = child.alpha;
var childBlendMode = child._blendMode;
var childScrollFactorX = child.scrollFactorX;
var childScrollFactorY = child.scrollFactorY;
@@ -135829,7 +137247,7 @@ module.exports = ContainerCanvasRenderer;
/***/ }),
-/* 916 */
+/* 920 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -135843,12 +137261,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(366);
+ renderWebGL = __webpack_require__(369);
}
if (true)
{
- renderCanvas = __webpack_require__(366);
+ renderCanvas = __webpack_require__(369);
}
module.exports = {
@@ -135860,7 +137278,7 @@ module.exports = {
/***/ }),
-/* 917 */
+/* 921 */
/***/ (function(module, exports) {
/**
@@ -135901,7 +137319,7 @@ module.exports = [
/***/ }),
-/* 918 */
+/* 922 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -135915,12 +137333,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(919);
+ renderWebGL = __webpack_require__(923);
}
if (true)
{
- renderCanvas = __webpack_require__(920);
+ renderCanvas = __webpack_require__(924);
}
module.exports = {
@@ -135932,7 +137350,7 @@ module.exports = {
/***/ }),
-/* 919 */
+/* 923 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -136238,7 +137656,7 @@ module.exports = DynamicBitmapTextWebGLRenderer;
/***/ }),
-/* 920 */
+/* 924 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -136247,7 +137665,7 @@ module.exports = DynamicBitmapTextWebGLRenderer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SetTransform = __webpack_require__(25);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -136417,7 +137835,7 @@ module.exports = DynamicBitmapTextCanvasRenderer;
/***/ }),
-/* 921 */
+/* 925 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -136431,12 +137849,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(922);
+ renderWebGL = __webpack_require__(926);
}
if (true)
{
- renderCanvas = __webpack_require__(923);
+ renderCanvas = __webpack_require__(927);
}
module.exports = {
@@ -136448,7 +137866,7 @@ module.exports = {
/***/ }),
-/* 922 */
+/* 926 */
/***/ (function(module, exports) {
/**
@@ -136517,13 +137935,13 @@ module.exports = ExternWebGLRenderer;
/***/ }),
-/* 923 */
+/* 927 */
/***/ (function(module, exports) {
/***/ }),
-/* 924 */
+/* 928 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -136537,15 +137955,15 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(925);
+ renderWebGL = __webpack_require__(929);
// Needed for Graphics.generateTexture
- renderCanvas = __webpack_require__(371);
+ renderCanvas = __webpack_require__(374);
}
if (true)
{
- renderCanvas = __webpack_require__(371);
+ renderCanvas = __webpack_require__(374);
}
module.exports = {
@@ -136557,7 +137975,7 @@ module.exports = {
/***/ }),
-/* 925 */
+/* 929 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -136566,7 +137984,7 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Commands = __webpack_require__(186);
+var Commands = __webpack_require__(188);
var Utils = __webpack_require__(9);
// TODO: Remove the use of this
@@ -136922,7 +138340,7 @@ module.exports = GraphicsWebGLRenderer;
/***/ }),
-/* 926 */
+/* 930 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -136936,12 +138354,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(927);
+ renderWebGL = __webpack_require__(931);
}
if (true)
{
- renderCanvas = __webpack_require__(928);
+ renderCanvas = __webpack_require__(932);
}
module.exports = {
@@ -136953,7 +138371,7 @@ module.exports = {
/***/ }),
-/* 927 */
+/* 931 */
/***/ (function(module, exports) {
/**
@@ -136986,7 +138404,7 @@ module.exports = SpriteWebGLRenderer;
/***/ }),
-/* 928 */
+/* 932 */
/***/ (function(module, exports) {
/**
@@ -137019,7 +138437,7 @@ module.exports = SpriteCanvasRenderer;
/***/ }),
-/* 929 */
+/* 933 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -137033,12 +138451,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(930);
+ renderWebGL = __webpack_require__(934);
}
if (true)
{
- renderCanvas = __webpack_require__(931);
+ renderCanvas = __webpack_require__(935);
}
module.exports = {
@@ -137050,7 +138468,7 @@ module.exports = {
/***/ }),
-/* 930 */
+/* 934 */
/***/ (function(module, exports) {
/**
@@ -137083,7 +138501,7 @@ module.exports = ImageWebGLRenderer;
/***/ }),
-/* 931 */
+/* 935 */
/***/ (function(module, exports) {
/**
@@ -137116,7 +138534,7 @@ module.exports = ImageCanvasRenderer;
/***/ }),
-/* 932 */
+/* 936 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -137131,17 +138549,17 @@ module.exports = ImageCanvasRenderer;
module.exports = {
- GravityWell: __webpack_require__(372),
- Particle: __webpack_require__(373),
- ParticleEmitter: __webpack_require__(374),
- ParticleEmitterManager: __webpack_require__(188),
- Zones: __webpack_require__(937)
+ GravityWell: __webpack_require__(375),
+ Particle: __webpack_require__(376),
+ ParticleEmitter: __webpack_require__(377),
+ ParticleEmitterManager: __webpack_require__(190),
+ Zones: __webpack_require__(941)
};
/***/ }),
-/* 933 */
+/* 937 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -137151,10 +138569,10 @@ module.exports = {
*/
var Class = __webpack_require__(0);
-var FloatBetween = __webpack_require__(304);
-var GetEaseFunction = __webpack_require__(96);
+var FloatBetween = __webpack_require__(307);
+var GetEaseFunction = __webpack_require__(82);
var GetFastValue = __webpack_require__(2);
-var Wrap = __webpack_require__(56);
+var Wrap = __webpack_require__(57);
/**
* @classdesc
@@ -137732,7 +139150,7 @@ module.exports = EmitterOp;
/***/ }),
-/* 934 */
+/* 938 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -137746,12 +139164,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(935);
+ renderWebGL = __webpack_require__(939);
}
if (true)
{
- renderCanvas = __webpack_require__(936);
+ renderCanvas = __webpack_require__(940);
}
module.exports = {
@@ -137763,7 +139181,7 @@ module.exports = {
/***/ }),
-/* 935 */
+/* 939 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -137922,7 +139340,7 @@ module.exports = ParticleManagerWebGLRenderer;
/***/ }),
-/* 936 */
+/* 940 */
/***/ (function(module, exports) {
/**
@@ -138043,7 +139461,7 @@ module.exports = ParticleManagerCanvasRenderer;
/***/ }),
-/* 937 */
+/* 941 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -138058,15 +139476,15 @@ module.exports = ParticleManagerCanvasRenderer;
module.exports = {
- DeathZone: __webpack_require__(375),
- EdgeZone: __webpack_require__(376),
- RandomZone: __webpack_require__(378)
+ DeathZone: __webpack_require__(378),
+ EdgeZone: __webpack_require__(379),
+ RandomZone: __webpack_require__(381)
};
/***/ }),
-/* 938 */
+/* 942 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -138080,12 +139498,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(939);
+ renderWebGL = __webpack_require__(943);
}
if (true)
{
- renderCanvas = __webpack_require__(940);
+ renderCanvas = __webpack_require__(944);
}
module.exports = {
@@ -138097,7 +139515,7 @@ module.exports = {
/***/ }),
-/* 939 */
+/* 943 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -138160,7 +139578,7 @@ module.exports = RenderTextureWebGLRenderer;
/***/ }),
-/* 940 */
+/* 944 */
/***/ (function(module, exports) {
/**
@@ -138193,7 +139611,7 @@ module.exports = RenderTextureCanvasRenderer;
/***/ }),
-/* 941 */
+/* 945 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -138202,15 +139620,15 @@ module.exports = RenderTextureCanvasRenderer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RETRO_FONT_CONST = __webpack_require__(942);
-var Extend = __webpack_require__(17);
+var RETRO_FONT_CONST = __webpack_require__(946);
+var Extend = __webpack_require__(15);
/**
* @namespace Phaser.GameObjects.RetroFont
* @since 3.6.0
*/
-var RetroFont = { Parse: __webpack_require__(943) };
+var RetroFont = { Parse: __webpack_require__(947) };
// Merge in the consts
RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST);
@@ -138219,7 +139637,7 @@ module.exports = RetroFont;
/***/ }),
-/* 942 */
+/* 946 */
/***/ (function(module, exports) {
/**
@@ -138335,7 +139753,7 @@ module.exports = RETRO_FONT_CONST;
/***/ }),
-/* 943 */
+/* 947 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -138344,7 +139762,7 @@ module.exports = RETRO_FONT_CONST;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
/**
* Parses a Retro Font configuration object so you can pass it to the BitmapText constructor
@@ -138451,7 +139869,7 @@ module.exports = ParseRetroFont;
/***/ }),
-/* 944 */
+/* 948 */
/***/ (function(module, exports) {
/**
@@ -138533,7 +139951,7 @@ module.exports = GetTextSize;
/***/ }),
-/* 945 */
+/* 949 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -138547,12 +139965,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(946);
+ renderWebGL = __webpack_require__(950);
}
if (true)
{
- renderCanvas = __webpack_require__(947);
+ renderCanvas = __webpack_require__(951);
}
module.exports = {
@@ -138564,7 +139982,7 @@ module.exports = {
/***/ }),
-/* 946 */
+/* 950 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -138629,7 +140047,7 @@ module.exports = TextWebGLRenderer;
/***/ }),
-/* 947 */
+/* 951 */
/***/ (function(module, exports) {
/**
@@ -138667,7 +140085,7 @@ module.exports = TextCanvasRenderer;
/***/ }),
-/* 948 */
+/* 952 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -138678,8 +140096,8 @@ module.exports = TextCanvasRenderer;
var Class = __webpack_require__(0);
var GetAdvancedValue = __webpack_require__(14);
-var GetValue = __webpack_require__(6);
-var MeasureText = __webpack_require__(949);
+var GetValue = __webpack_require__(5);
+var MeasureText = __webpack_require__(953);
// Key: [ Object Key, Default Value ]
@@ -138726,7 +140144,7 @@ var propertyMap = {
* @since 3.0.0
*
* @param {Phaser.GameObjects.Text} text - The Text object that this TextStyle is styling.
- * @param {Phaser.Types.GameObjects.Text.TextSyle} style - The style settings to set.
+ * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set.
*/
var TextStyle = new Class({
@@ -139012,7 +140430,7 @@ var TextStyle = new Class({
* @method Phaser.GameObjects.TextStyle#setStyle
* @since 3.0.0
*
- * @param {Phaser.Types.GameObjects.Text.TextSyle} style - The style settings to set.
+ * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set.
* @param {boolean} [updateText=true] - Whether to update the text immediately.
* @param {boolean} [setDefaults=false] - Use the default values is not set, or the local values.
*
@@ -139720,7 +141138,7 @@ module.exports = TextStyle;
/***/ }),
-/* 949 */
+/* 953 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -139729,7 +141147,7 @@ module.exports = TextStyle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CanvasPool = __webpack_require__(24);
+var CanvasPool = __webpack_require__(25);
/**
* Calculates the ascent, descent and fontSize of a given font style.
@@ -139855,7 +141273,7 @@ module.exports = MeasureText;
/***/ }),
-/* 950 */
+/* 954 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -139869,12 +141287,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(951);
+ renderWebGL = __webpack_require__(955);
}
if (true)
{
- renderCanvas = __webpack_require__(952);
+ renderCanvas = __webpack_require__(956);
}
module.exports = {
@@ -139886,7 +141304,7 @@ module.exports = {
/***/ }),
-/* 951 */
+/* 955 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -139946,7 +141364,7 @@ module.exports = TileSpriteWebGLRenderer;
/***/ }),
-/* 952 */
+/* 956 */
/***/ (function(module, exports) {
/**
@@ -139981,7 +141399,7 @@ module.exports = TileSpriteCanvasRenderer;
/***/ }),
-/* 953 */
+/* 957 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -139995,12 +141413,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(954);
+ renderWebGL = __webpack_require__(958);
}
if (true)
{
- renderCanvas = __webpack_require__(955);
+ renderCanvas = __webpack_require__(959);
}
module.exports = {
@@ -140012,7 +141430,7 @@ module.exports = {
/***/ }),
-/* 954 */
+/* 958 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140022,7 +141440,7 @@ module.exports = {
*/
var FillPathWebGL = __webpack_require__(98);
-var StrokePathWebGL = __webpack_require__(68);
+var StrokePathWebGL = __webpack_require__(69);
/**
* Renders this Game Object with the WebGL Renderer to the given Camera.
@@ -140090,7 +141508,7 @@ module.exports = ArcWebGLRenderer;
/***/ }),
-/* 955 */
+/* 959 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140101,8 +141519,8 @@ module.exports = ArcWebGLRenderer;
var DegToRad = __webpack_require__(35);
var FillStyleCanvas = __webpack_require__(36);
-var LineStyleCanvas = __webpack_require__(49);
-var SetTransform = __webpack_require__(25);
+var LineStyleCanvas = __webpack_require__(50);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -140166,7 +141584,7 @@ module.exports = ArcCanvasRenderer;
/***/ }),
-/* 956 */
+/* 960 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140180,12 +141598,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(957);
+ renderWebGL = __webpack_require__(961);
}
if (true)
{
- renderCanvas = __webpack_require__(958);
+ renderCanvas = __webpack_require__(962);
}
module.exports = {
@@ -140197,7 +141615,7 @@ module.exports = {
/***/ }),
-/* 957 */
+/* 961 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140207,7 +141625,7 @@ module.exports = {
*/
var FillPathWebGL = __webpack_require__(98);
-var StrokePathWebGL = __webpack_require__(68);
+var StrokePathWebGL = __webpack_require__(69);
/**
* Renders this Game Object with the WebGL Renderer to the given Camera.
@@ -140275,7 +141693,7 @@ module.exports = CurveWebGLRenderer;
/***/ }),
-/* 958 */
+/* 962 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140285,8 +141703,8 @@ module.exports = CurveWebGLRenderer;
*/
var FillStyleCanvas = __webpack_require__(36);
-var LineStyleCanvas = __webpack_require__(49);
-var SetTransform = __webpack_require__(25);
+var LineStyleCanvas = __webpack_require__(50);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -140363,7 +141781,7 @@ module.exports = CurveCanvasRenderer;
/***/ }),
-/* 959 */
+/* 963 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140377,12 +141795,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(960);
+ renderWebGL = __webpack_require__(964);
}
if (true)
{
- renderCanvas = __webpack_require__(961);
+ renderCanvas = __webpack_require__(965);
}
module.exports = {
@@ -140394,7 +141812,7 @@ module.exports = {
/***/ }),
-/* 960 */
+/* 964 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140404,7 +141822,7 @@ module.exports = {
*/
var FillPathWebGL = __webpack_require__(98);
-var StrokePathWebGL = __webpack_require__(68);
+var StrokePathWebGL = __webpack_require__(69);
/**
* Renders this Game Object with the WebGL Renderer to the given Camera.
@@ -140472,7 +141890,7 @@ module.exports = EllipseWebGLRenderer;
/***/ }),
-/* 961 */
+/* 965 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140482,8 +141900,8 @@ module.exports = EllipseWebGLRenderer;
*/
var FillStyleCanvas = __webpack_require__(36);
-var LineStyleCanvas = __webpack_require__(49);
-var SetTransform = __webpack_require__(25);
+var LineStyleCanvas = __webpack_require__(50);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -140557,7 +141975,7 @@ module.exports = EllipseCanvasRenderer;
/***/ }),
-/* 962 */
+/* 966 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140571,12 +141989,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(963);
+ renderWebGL = __webpack_require__(967);
}
if (true)
{
- renderCanvas = __webpack_require__(964);
+ renderCanvas = __webpack_require__(968);
}
module.exports = {
@@ -140588,7 +142006,7 @@ module.exports = {
/***/ }),
-/* 963 */
+/* 967 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140814,7 +142232,7 @@ module.exports = GridWebGLRenderer;
/***/ }),
-/* 964 */
+/* 968 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -140824,8 +142242,8 @@ module.exports = GridWebGLRenderer;
*/
var FillStyleCanvas = __webpack_require__(36);
-var LineStyleCanvas = __webpack_require__(49);
-var SetTransform = __webpack_require__(25);
+var LineStyleCanvas = __webpack_require__(50);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -141003,7 +142421,7 @@ module.exports = GridCanvasRenderer;
/***/ }),
-/* 965 */
+/* 969 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141017,12 +142435,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(966);
+ renderWebGL = __webpack_require__(970);
}
if (true)
{
- renderCanvas = __webpack_require__(967);
+ renderCanvas = __webpack_require__(971);
}
module.exports = {
@@ -141034,7 +142452,7 @@ module.exports = {
/***/ }),
-/* 966 */
+/* 970 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141192,7 +142610,7 @@ module.exports = IsoBoxWebGLRenderer;
/***/ }),
-/* 967 */
+/* 971 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141202,7 +142620,7 @@ module.exports = IsoBoxWebGLRenderer;
*/
var FillStyleCanvas = __webpack_require__(36);
-var SetTransform = __webpack_require__(25);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -141293,7 +142711,7 @@ module.exports = IsoBoxCanvasRenderer;
/***/ }),
-/* 968 */
+/* 972 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141307,12 +142725,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(969);
+ renderWebGL = __webpack_require__(973);
}
if (true)
{
- renderCanvas = __webpack_require__(970);
+ renderCanvas = __webpack_require__(974);
}
module.exports = {
@@ -141324,7 +142742,7 @@ module.exports = {
/***/ }),
-/* 969 */
+/* 973 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141501,7 +142919,7 @@ module.exports = IsoTriangleWebGLRenderer;
/***/ }),
-/* 970 */
+/* 974 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141511,7 +142929,7 @@ module.exports = IsoTriangleWebGLRenderer;
*/
var FillStyleCanvas = __webpack_require__(36);
-var SetTransform = __webpack_require__(25);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -141615,7 +143033,7 @@ module.exports = IsoTriangleCanvasRenderer;
/***/ }),
-/* 971 */
+/* 975 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141629,12 +143047,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(972);
+ renderWebGL = __webpack_require__(976);
}
if (true)
{
- renderCanvas = __webpack_require__(973);
+ renderCanvas = __webpack_require__(977);
}
module.exports = {
@@ -141646,7 +143064,7 @@ module.exports = {
/***/ }),
-/* 972 */
+/* 976 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141739,7 +143157,7 @@ module.exports = LineWebGLRenderer;
/***/ }),
-/* 973 */
+/* 977 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141748,8 +143166,8 @@ module.exports = LineWebGLRenderer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var LineStyleCanvas = __webpack_require__(49);
-var SetTransform = __webpack_require__(25);
+var LineStyleCanvas = __webpack_require__(50);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -141796,7 +143214,7 @@ module.exports = LineCanvasRenderer;
/***/ }),
-/* 974 */
+/* 978 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141810,12 +143228,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(975);
+ renderWebGL = __webpack_require__(979);
}
if (true)
{
- renderCanvas = __webpack_require__(976);
+ renderCanvas = __webpack_require__(980);
}
module.exports = {
@@ -141827,7 +143245,7 @@ module.exports = {
/***/ }),
-/* 975 */
+/* 979 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141837,7 +143255,7 @@ module.exports = {
*/
var FillPathWebGL = __webpack_require__(98);
-var StrokePathWebGL = __webpack_require__(68);
+var StrokePathWebGL = __webpack_require__(69);
/**
* Renders this Game Object with the WebGL Renderer to the given Camera.
@@ -141905,7 +143323,7 @@ module.exports = PolygonWebGLRenderer;
/***/ }),
-/* 976 */
+/* 980 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -141915,8 +143333,8 @@ module.exports = PolygonWebGLRenderer;
*/
var FillStyleCanvas = __webpack_require__(36);
-var LineStyleCanvas = __webpack_require__(49);
-var SetTransform = __webpack_require__(25);
+var LineStyleCanvas = __webpack_require__(50);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -141990,7 +143408,7 @@ module.exports = PolygonCanvasRenderer;
/***/ }),
-/* 977 */
+/* 981 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142004,12 +143422,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(978);
+ renderWebGL = __webpack_require__(982);
}
if (true)
{
- renderCanvas = __webpack_require__(979);
+ renderCanvas = __webpack_require__(983);
}
module.exports = {
@@ -142021,7 +143439,7 @@ module.exports = {
/***/ }),
-/* 978 */
+/* 982 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142030,7 +143448,7 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var StrokePathWebGL = __webpack_require__(68);
+var StrokePathWebGL = __webpack_require__(69);
var Utils = __webpack_require__(9);
/**
@@ -142113,7 +143531,7 @@ module.exports = RectangleWebGLRenderer;
/***/ }),
-/* 979 */
+/* 983 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142123,8 +143541,8 @@ module.exports = RectangleWebGLRenderer;
*/
var FillStyleCanvas = __webpack_require__(36);
-var LineStyleCanvas = __webpack_require__(49);
-var SetTransform = __webpack_require__(25);
+var LineStyleCanvas = __webpack_require__(50);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -142187,7 +143605,7 @@ module.exports = RectangleCanvasRenderer;
/***/ }),
-/* 980 */
+/* 984 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142201,12 +143619,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(981);
+ renderWebGL = __webpack_require__(985);
}
if (true)
{
- renderCanvas = __webpack_require__(982);
+ renderCanvas = __webpack_require__(986);
}
module.exports = {
@@ -142218,7 +143636,7 @@ module.exports = {
/***/ }),
-/* 981 */
+/* 985 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142228,7 +143646,7 @@ module.exports = {
*/
var FillPathWebGL = __webpack_require__(98);
-var StrokePathWebGL = __webpack_require__(68);
+var StrokePathWebGL = __webpack_require__(69);
/**
* Renders this Game Object with the WebGL Renderer to the given Camera.
@@ -142296,7 +143714,7 @@ module.exports = StarWebGLRenderer;
/***/ }),
-/* 982 */
+/* 986 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142306,8 +143724,8 @@ module.exports = StarWebGLRenderer;
*/
var FillStyleCanvas = __webpack_require__(36);
-var LineStyleCanvas = __webpack_require__(49);
-var SetTransform = __webpack_require__(25);
+var LineStyleCanvas = __webpack_require__(50);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -142381,7 +143799,7 @@ module.exports = StarCanvasRenderer;
/***/ }),
-/* 983 */
+/* 987 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142395,12 +143813,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(984);
+ renderWebGL = __webpack_require__(988);
}
if (true)
{
- renderCanvas = __webpack_require__(985);
+ renderCanvas = __webpack_require__(989);
}
module.exports = {
@@ -142412,7 +143830,7 @@ module.exports = {
/***/ }),
-/* 984 */
+/* 988 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142421,7 +143839,7 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var StrokePathWebGL = __webpack_require__(68);
+var StrokePathWebGL = __webpack_require__(69);
var Utils = __webpack_require__(9);
/**
@@ -142515,7 +143933,7 @@ module.exports = TriangleWebGLRenderer;
/***/ }),
-/* 985 */
+/* 989 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142525,8 +143943,8 @@ module.exports = TriangleWebGLRenderer;
*/
var FillStyleCanvas = __webpack_require__(36);
-var LineStyleCanvas = __webpack_require__(49);
-var SetTransform = __webpack_require__(25);
+var LineStyleCanvas = __webpack_require__(50);
+var SetTransform = __webpack_require__(26);
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@@ -142590,7 +144008,7 @@ module.exports = TriangleCanvasRenderer;
/***/ }),
-/* 986 */
+/* 990 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142599,8 +144017,8 @@ module.exports = TriangleCanvasRenderer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Blitter = __webpack_require__(182);
-var GameObjectFactory = __webpack_require__(5);
+var Blitter = __webpack_require__(184);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Blitter Game Object and adds it to the Scene.
@@ -142632,7 +144050,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame)
/***/ }),
-/* 987 */
+/* 991 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142642,8 +144060,8 @@ GameObjectFactory.register('blitter', function (x, y, key, frame)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Container = __webpack_require__(183);
-var GameObjectFactory = __webpack_require__(5);
+var Container = __webpack_require__(185);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Container Game Object and adds it to the Scene.
@@ -142666,7 +144084,7 @@ GameObjectFactory.register('container', function (x, y, children)
/***/ }),
-/* 988 */
+/* 992 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142675,8 +144093,8 @@ GameObjectFactory.register('container', function (x, y, children)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var DOMElement = __webpack_require__(365);
-var GameObjectFactory = __webpack_require__(5);
+var DOMElement = __webpack_require__(368);
+var GameObjectFactory = __webpack_require__(6);
/**
* DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.
@@ -142756,7 +144174,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText)
/***/ }),
-/* 989 */
+/* 993 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142765,8 +144183,8 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var DynamicBitmapText = __webpack_require__(184);
-var GameObjectFactory = __webpack_require__(5);
+var DynamicBitmapText = __webpack_require__(186);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene.
@@ -142825,7 +144243,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size
/***/ }),
-/* 990 */
+/* 994 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142834,8 +144252,8 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Extern = __webpack_require__(367);
-var GameObjectFactory = __webpack_require__(5);
+var Extern = __webpack_require__(370);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Extern Game Object and adds it to the Scene.
@@ -142867,7 +144285,7 @@ GameObjectFactory.register('extern', function ()
/***/ }),
-/* 991 */
+/* 995 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142876,8 +144294,8 @@ GameObjectFactory.register('extern', function ()
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Graphics = __webpack_require__(185);
-var GameObjectFactory = __webpack_require__(5);
+var Graphics = __webpack_require__(187);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Graphics Game Object and adds it to the Scene.
@@ -142906,7 +144324,7 @@ GameObjectFactory.register('graphics', function (config)
/***/ }),
-/* 992 */
+/* 996 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142915,8 +144333,8 @@ GameObjectFactory.register('graphics', function (config)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Group = __webpack_require__(94);
-var GameObjectFactory = __webpack_require__(5);
+var Group = __webpack_require__(95);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Group Game Object and adds it to the Scene.
@@ -142938,7 +144356,7 @@ GameObjectFactory.register('group', function (children, config)
/***/ }),
-/* 993 */
+/* 997 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142947,8 +144365,8 @@ GameObjectFactory.register('group', function (children, config)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Image = __webpack_require__(95);
-var GameObjectFactory = __webpack_require__(5);
+var Image = __webpack_require__(96);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Image Game Object and adds it to the Scene.
@@ -142980,7 +144398,7 @@ GameObjectFactory.register('image', function (x, y, key, frame)
/***/ }),
-/* 994 */
+/* 998 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -142989,8 +144407,8 @@ GameObjectFactory.register('image', function (x, y, key, frame)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var ParticleEmitterManager = __webpack_require__(188);
+var GameObjectFactory = __webpack_require__(6);
+var ParticleEmitterManager = __webpack_require__(190);
/**
* Creates a new Particle Emitter Manager Game Object and adds it to the Scene.
@@ -143026,7 +144444,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters)
/***/ }),
-/* 995 */
+/* 999 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143035,8 +144453,8 @@ GameObjectFactory.register('particles', function (key, frame, emitters)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var PathFollower = __webpack_require__(379);
+var GameObjectFactory = __webpack_require__(6);
+var PathFollower = __webpack_require__(382);
/**
* Creates a new PathFollower Game Object and adds it to the Scene.
@@ -143074,7 +144492,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame)
/***/ }),
-/* 996 */
+/* 1000 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143083,8 +144501,8 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var RenderTexture = __webpack_require__(189);
+var GameObjectFactory = __webpack_require__(6);
+var RenderTexture = __webpack_require__(191);
/**
* Creates a new Render Texture Game Object and adds it to the Scene.
@@ -143114,7 +144532,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key,
/***/ }),
-/* 997 */
+/* 1001 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143123,8 +144541,8 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key,
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var Sprite = __webpack_require__(67);
+var GameObjectFactory = __webpack_require__(6);
+var Sprite = __webpack_require__(68);
/**
* Creates a new Sprite Game Object and adds it to the Scene.
@@ -143161,7 +144579,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame)
/***/ }),
-/* 998 */
+/* 1002 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143170,8 +144588,8 @@ GameObjectFactory.register('sprite', function (x, y, key, frame)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BitmapText = __webpack_require__(128);
-var GameObjectFactory = __webpack_require__(5);
+var BitmapText = __webpack_require__(129);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Bitmap Text Game Object and adds it to the Scene.
@@ -143225,7 +144643,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align
/***/ }),
-/* 999 */
+/* 1003 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143234,8 +144652,8 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Text = __webpack_require__(190);
-var GameObjectFactory = __webpack_require__(5);
+var Text = __webpack_require__(192);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Text Game Object and adds it to the Scene.
@@ -143290,7 +144708,7 @@ GameObjectFactory.register('text', function (x, y, text, style)
/***/ }),
-/* 1000 */
+/* 1004 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143299,8 +144717,8 @@ GameObjectFactory.register('text', function (x, y, text, style)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var TileSprite = __webpack_require__(191);
-var GameObjectFactory = __webpack_require__(5);
+var TileSprite = __webpack_require__(193);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new TileSprite Game Object and adds it to the Scene.
@@ -143334,7 +144752,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra
/***/ }),
-/* 1001 */
+/* 1005 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143343,8 +144761,8 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Zone = __webpack_require__(106);
-var GameObjectFactory = __webpack_require__(5);
+var Zone = __webpack_require__(107);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Zone Game Object and adds it to the Scene.
@@ -143376,7 +144794,7 @@ GameObjectFactory.register('zone', function (x, y, width, height)
/***/ }),
-/* 1002 */
+/* 1006 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143385,8 +144803,8 @@ GameObjectFactory.register('zone', function (x, y, width, height)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Arc = __webpack_require__(381);
-var GameObjectFactory = __webpack_require__(5);
+var Arc = __webpack_require__(384);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Arc Shape Game Object and adds it to the Scene.
@@ -143449,7 +144867,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph
/***/ }),
-/* 1003 */
+/* 1007 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143458,8 +144876,8 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var Curve = __webpack_require__(382);
+var GameObjectFactory = __webpack_require__(6);
+var Curve = __webpack_require__(385);
/**
* Creates a new Curve Shape Game Object and adds it to the Scene.
@@ -143499,7 +144917,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha)
/***/ }),
-/* 1004 */
+/* 1008 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143508,8 +144926,8 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Ellipse = __webpack_require__(383);
-var GameObjectFactory = __webpack_require__(5);
+var Ellipse = __webpack_require__(386);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Ellipse Shape Game Object and adds it to the Scene.
@@ -143551,7 +144969,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor,
/***/ }),
-/* 1005 */
+/* 1009 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143560,8 +144978,8 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor,
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var Grid = __webpack_require__(384);
+var GameObjectFactory = __webpack_require__(6);
+var Grid = __webpack_require__(387);
/**
* Creates a new Grid Shape Game Object and adds it to the Scene.
@@ -143606,7 +145024,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel
/***/ }),
-/* 1006 */
+/* 1010 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143615,8 +145033,8 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var IsoBox = __webpack_require__(385);
+var GameObjectFactory = __webpack_require__(6);
+var IsoBox = __webpack_require__(388);
/**
* Creates a new IsoBox Shape Game Object and adds it to the Scene.
@@ -143657,7 +145075,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill
/***/ }),
-/* 1007 */
+/* 1011 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143666,8 +145084,8 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var IsoTriangle = __webpack_require__(386);
+var GameObjectFactory = __webpack_require__(6);
+var IsoTriangle = __webpack_require__(389);
/**
* Creates a new IsoTriangle Shape Game Object and adds it to the Scene.
@@ -143710,7 +145128,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed
/***/ }),
-/* 1008 */
+/* 1012 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143719,8 +145137,8 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var Line = __webpack_require__(387);
+var GameObjectFactory = __webpack_require__(6);
+var Line = __webpack_require__(390);
/**
* Creates a new Line Shape Game Object and adds it to the Scene.
@@ -143761,7 +145179,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor,
/***/ }),
-/* 1009 */
+/* 1013 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143770,8 +145188,8 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor,
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var Polygon = __webpack_require__(388);
+var GameObjectFactory = __webpack_require__(6);
+var Polygon = __webpack_require__(391);
/**
* Creates a new Polygon Shape Game Object and adds it to the Scene.
@@ -143814,7 +145232,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp
/***/ }),
-/* 1010 */
+/* 1014 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143823,8 +145241,8 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var Rectangle = __webpack_require__(393);
+var GameObjectFactory = __webpack_require__(6);
+var Rectangle = __webpack_require__(396);
/**
* Creates a new Rectangle Shape Game Object and adds it to the Scene.
@@ -143859,7 +145277,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor
/***/ }),
-/* 1011 */
+/* 1015 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143868,8 +145286,8 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Star = __webpack_require__(394);
-var GameObjectFactory = __webpack_require__(5);
+var Star = __webpack_require__(397);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Star Shape Game Object and adds it to the Scene.
@@ -143911,7 +145329,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad
/***/ }),
-/* 1012 */
+/* 1016 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143920,8 +145338,8 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var Triangle = __webpack_require__(395);
+var GameObjectFactory = __webpack_require__(6);
+var Triangle = __webpack_require__(398);
/**
* Creates a new Triangle Shape Game Object and adds it to the Scene.
@@ -143962,7 +145380,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f
/***/ }),
-/* 1013 */
+/* 1017 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -143971,9 +145389,9 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Blitter = __webpack_require__(182);
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var Blitter = __webpack_require__(184);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
/**
@@ -144012,7 +145430,7 @@ GameObjectCreator.register('blitter', function (config, addToScene)
/***/ }),
-/* 1014 */
+/* 1018 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144022,9 +145440,9 @@ GameObjectCreator.register('blitter', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BuildGameObject = __webpack_require__(29);
-var Container = __webpack_require__(183);
-var GameObjectCreator = __webpack_require__(15);
+var BuildGameObject = __webpack_require__(28);
+var Container = __webpack_require__(185);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
/**
@@ -144061,7 +145479,7 @@ GameObjectCreator.register('container', function (config, addToScene)
/***/ }),
-/* 1015 */
+/* 1019 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144070,9 +145488,9 @@ GameObjectCreator.register('container', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BitmapText = __webpack_require__(184);
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var BitmapText = __webpack_require__(186);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
/**
@@ -144112,7 +145530,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene)
/***/ }),
-/* 1016 */
+/* 1020 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144121,8 +145539,8 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectCreator = __webpack_require__(15);
-var Graphics = __webpack_require__(185);
+var GameObjectCreator = __webpack_require__(16);
+var Graphics = __webpack_require__(187);
/**
* Creates a new Graphics Game Object and returns it.
@@ -144160,7 +145578,7 @@ GameObjectCreator.register('graphics', function (config, addToScene)
/***/ }),
-/* 1017 */
+/* 1021 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144169,8 +145587,8 @@ GameObjectCreator.register('graphics', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectCreator = __webpack_require__(15);
-var Group = __webpack_require__(94);
+var GameObjectCreator = __webpack_require__(16);
+var Group = __webpack_require__(95);
/**
* Creates a new Group Game Object and returns it.
@@ -144193,7 +145611,7 @@ GameObjectCreator.register('group', function (config)
/***/ }),
-/* 1018 */
+/* 1022 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144202,10 +145620,10 @@ GameObjectCreator.register('group', function (config)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var Image = __webpack_require__(95);
+var Image = __webpack_require__(96);
/**
* Creates a new Image Game Object and returns it.
@@ -144243,7 +145661,7 @@ GameObjectCreator.register('image', function (config, addToScene)
/***/ }),
-/* 1019 */
+/* 1023 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144252,10 +145670,10 @@ GameObjectCreator.register('image', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectCreator = __webpack_require__(15);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
var GetFastValue = __webpack_require__(2);
-var ParticleEmitterManager = __webpack_require__(188);
+var ParticleEmitterManager = __webpack_require__(190);
/**
* Creates a new Particle Emitter Manager Game Object and returns it.
@@ -144300,7 +145718,7 @@ GameObjectCreator.register('particles', function (config, addToScene)
/***/ }),
-/* 1020 */
+/* 1024 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144309,10 +145727,10 @@ GameObjectCreator.register('particles', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var RenderTexture = __webpack_require__(189);
+var RenderTexture = __webpack_require__(191);
/**
* Creates a new Render Texture Game Object and returns it.
@@ -144352,7 +145770,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene)
/***/ }),
-/* 1021 */
+/* 1025 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144361,11 +145779,11 @@ GameObjectCreator.register('renderTexture', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BuildGameObject = __webpack_require__(29);
-var BuildGameObjectAnimation = __webpack_require__(363);
-var GameObjectCreator = __webpack_require__(15);
+var BuildGameObject = __webpack_require__(28);
+var BuildGameObjectAnimation = __webpack_require__(366);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var Sprite = __webpack_require__(67);
+var Sprite = __webpack_require__(68);
/**
* Creates a new Sprite Game Object and returns it.
@@ -144405,7 +145823,7 @@ GameObjectCreator.register('sprite', function (config, addToScene)
/***/ }),
-/* 1022 */
+/* 1026 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144414,11 +145832,11 @@ GameObjectCreator.register('sprite', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BitmapText = __webpack_require__(128);
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var BitmapText = __webpack_require__(129);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var GetValue = __webpack_require__(6);
+var GetValue = __webpack_require__(5);
/**
* Creates a new Bitmap Text Game Object and returns it.
@@ -144458,7 +145876,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene)
/***/ }),
-/* 1023 */
+/* 1027 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144467,10 +145885,10 @@ GameObjectCreator.register('bitmapText', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var Text = __webpack_require__(190);
+var Text = __webpack_require__(192);
/**
* Creates a new Text Game Object and returns it.
@@ -144545,7 +145963,7 @@ GameObjectCreator.register('text', function (config, addToScene)
/***/ }),
-/* 1024 */
+/* 1028 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144554,10 +145972,10 @@ GameObjectCreator.register('text', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var TileSprite = __webpack_require__(191);
+var TileSprite = __webpack_require__(193);
/**
* Creates a new TileSprite Game Object and returns it.
@@ -144597,7 +146015,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene)
/***/ }),
-/* 1025 */
+/* 1029 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144606,9 +146024,9 @@ GameObjectCreator.register('tileSprite', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectCreator = __webpack_require__(15);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var Zone = __webpack_require__(106);
+var Zone = __webpack_require__(107);
/**
* Creates a new Zone Game Object and returns it.
@@ -144636,7 +146054,7 @@ GameObjectCreator.register('zone', function (config)
/***/ }),
-/* 1026 */
+/* 1030 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144650,12 +146068,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(1027);
+ renderWebGL = __webpack_require__(1031);
}
if (true)
{
- renderCanvas = __webpack_require__(1028);
+ renderCanvas = __webpack_require__(1032);
}
module.exports = {
@@ -144667,7 +146085,7 @@ module.exports = {
/***/ }),
-/* 1027 */
+/* 1031 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144785,7 +146203,7 @@ module.exports = MeshWebGLRenderer;
/***/ }),
-/* 1028 */
+/* 1032 */
/***/ (function(module, exports) {
/**
@@ -144814,7 +146232,7 @@ module.exports = MeshCanvasRenderer;
/***/ }),
-/* 1029 */
+/* 1033 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144828,12 +146246,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(1030);
+ renderWebGL = __webpack_require__(1034);
}
if (true)
{
- renderCanvas = __webpack_require__(1031);
+ renderCanvas = __webpack_require__(1035);
}
module.exports = {
@@ -144845,7 +146263,7 @@ module.exports = {
/***/ }),
-/* 1030 */
+/* 1034 */
/***/ (function(module, exports) {
/**
@@ -144880,40 +146298,48 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came
renderer.clearPipeline();
- var camMatrix = src._tempMatrix1;
- var shapeMatrix = src._tempMatrix2;
- var calcMatrix = src._tempMatrix3;
-
- shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);
-
- camMatrix.copyFrom(camera.matrix);
-
- if (parentMatrix)
+ if (src.renderToTexture)
{
- // Multiply the camera by the parent matrix
- camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);
-
- // Undo the camera scroll
- shapeMatrix.e = src.x;
- shapeMatrix.f = src.y;
+ src.load();
+ src.flush();
}
else
{
- shapeMatrix.e -= camera.scrollX * src.scrollFactorX;
- shapeMatrix.f -= camera.scrollY * src.scrollFactorY;
+ var camMatrix = src._tempMatrix1;
+ var shapeMatrix = src._tempMatrix2;
+ var calcMatrix = src._tempMatrix3;
+
+ shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);
+
+ camMatrix.copyFrom(camera.matrix);
+
+ if (parentMatrix)
+ {
+ // Multiply the camera by the parent matrix
+ camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);
+
+ // Undo the camera scroll
+ shapeMatrix.e = src.x;
+ shapeMatrix.f = src.y;
+ }
+ else
+ {
+ shapeMatrix.e -= camera.scrollX * src.scrollFactorX;
+ shapeMatrix.f -= camera.scrollY * src.scrollFactorY;
+ }
+
+ camMatrix.multiply(shapeMatrix, calcMatrix);
+
+ // Renderer size changed?
+ if (renderer.width !== src._rendererWidth || renderer.height !== src._rendererHeight)
+ {
+ src.projOrtho(0, renderer.width, renderer.height, 0);
+ }
+
+ src.load(calcMatrix.matrix);
+ src.flush();
}
- camMatrix.multiply(shapeMatrix, calcMatrix);
-
- // Renderer size changed?
- if (renderer.width !== src._rendererWidth || renderer.height !== src._rendererHeight)
- {
- src.projOrtho(0, renderer.width, renderer.height, 0);
- }
-
- src.load(calcMatrix.matrix);
- src.flush();
-
renderer.rebindPipeline(pipeline);
};
@@ -144921,7 +146347,7 @@ module.exports = ShaderWebGLRenderer;
/***/ }),
-/* 1031 */
+/* 1035 */
/***/ (function(module, exports) {
/**
@@ -144950,7 +146376,7 @@ module.exports = ShaderCanvasRenderer;
/***/ }),
-/* 1032 */
+/* 1036 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -144959,8 +146385,8 @@ module.exports = ShaderCanvasRenderer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Mesh = __webpack_require__(129);
-var GameObjectFactory = __webpack_require__(5);
+var Mesh = __webpack_require__(130);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Mesh Game Object and adds it to the Scene.
@@ -145000,7 +146426,7 @@ if (true)
/***/ }),
-/* 1033 */
+/* 1037 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145009,8 +146435,8 @@ if (true)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Quad = __webpack_require__(194);
-var GameObjectFactory = __webpack_require__(5);
+var Quad = __webpack_require__(196);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Quad Game Object and adds it to the Scene.
@@ -145046,7 +146472,7 @@ if (true)
/***/ }),
-/* 1034 */
+/* 1038 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145055,8 +146481,8 @@ if (true)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Shader = __webpack_require__(195);
-var GameObjectFactory = __webpack_require__(5);
+var Shader = __webpack_require__(197);
+var GameObjectFactory = __webpack_require__(6);
/**
* Creates a new Shader Game Object and adds it to the Scene.
@@ -145086,7 +146512,7 @@ if (true)
/***/ }),
-/* 1035 */
+/* 1039 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145095,11 +146521,11 @@ if (true)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var GetValue = __webpack_require__(6);
-var Mesh = __webpack_require__(129);
+var GetValue = __webpack_require__(5);
+var Mesh = __webpack_require__(130);
/**
* Creates a new Mesh Game Object and returns it.
@@ -145141,7 +146567,7 @@ GameObjectCreator.register('mesh', function (config, addToScene)
/***/ }),
-/* 1036 */
+/* 1040 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145150,10 +146576,10 @@ GameObjectCreator.register('mesh', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var Quad = __webpack_require__(194);
+var Quad = __webpack_require__(196);
/**
* Creates a new Quad Game Object and returns it.
@@ -145191,7 +146617,7 @@ GameObjectCreator.register('quad', function (config, addToScene)
/***/ }),
-/* 1037 */
+/* 1041 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145200,10 +146626,10 @@ GameObjectCreator.register('quad', function (config, addToScene)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var BuildGameObject = __webpack_require__(29);
-var GameObjectCreator = __webpack_require__(15);
+var BuildGameObject = __webpack_require__(28);
+var GameObjectCreator = __webpack_require__(16);
var GetAdvancedValue = __webpack_require__(14);
-var Shader = __webpack_require__(195);
+var Shader = __webpack_require__(197);
/**
* Creates a new Shader Game Object and returns it.
@@ -145244,7 +146670,7 @@ GameObjectCreator.register('shader', function (config, addToScene)
/***/ }),
-/* 1038 */
+/* 1042 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145254,9 +146680,9 @@ GameObjectCreator.register('shader', function (config, addToScene)
*/
var Class = __webpack_require__(0);
-var LightsManager = __webpack_require__(400);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
+var LightsManager = __webpack_require__(403);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
/**
* @classdesc
@@ -145360,7 +146786,7 @@ module.exports = LightsPlugin;
/***/ }),
-/* 1039 */
+/* 1043 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145369,29 +146795,29 @@ module.exports = LightsPlugin;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Circle = __webpack_require__(77);
+var Circle = __webpack_require__(78);
-Circle.Area = __webpack_require__(1040);
-Circle.Circumference = __webpack_require__(243);
-Circle.CircumferencePoint = __webpack_require__(144);
-Circle.Clone = __webpack_require__(1041);
+Circle.Area = __webpack_require__(1044);
+Circle.Circumference = __webpack_require__(246);
+Circle.CircumferencePoint = __webpack_require__(145);
+Circle.Clone = __webpack_require__(1045);
Circle.Contains = __webpack_require__(46);
-Circle.ContainsPoint = __webpack_require__(1042);
-Circle.ContainsRect = __webpack_require__(1043);
-Circle.CopyFrom = __webpack_require__(1044);
-Circle.Equals = __webpack_require__(1045);
-Circle.GetBounds = __webpack_require__(1046);
-Circle.GetPoint = __webpack_require__(241);
-Circle.GetPoints = __webpack_require__(242);
-Circle.Offset = __webpack_require__(1047);
-Circle.OffsetPoint = __webpack_require__(1048);
-Circle.Random = __webpack_require__(145);
+Circle.ContainsPoint = __webpack_require__(1046);
+Circle.ContainsRect = __webpack_require__(1047);
+Circle.CopyFrom = __webpack_require__(1048);
+Circle.Equals = __webpack_require__(1049);
+Circle.GetBounds = __webpack_require__(1050);
+Circle.GetPoint = __webpack_require__(244);
+Circle.GetPoints = __webpack_require__(245);
+Circle.Offset = __webpack_require__(1051);
+Circle.OffsetPoint = __webpack_require__(1052);
+Circle.Random = __webpack_require__(146);
module.exports = Circle;
/***/ }),
-/* 1040 */
+/* 1044 */
/***/ (function(module, exports) {
/**
@@ -145419,7 +146845,7 @@ module.exports = Area;
/***/ }),
-/* 1041 */
+/* 1045 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145428,7 +146854,7 @@ module.exports = Area;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Circle = __webpack_require__(77);
+var Circle = __webpack_require__(78);
/**
* Creates a new Circle instance based on the values contained in the given source.
@@ -145449,7 +146875,7 @@ module.exports = Clone;
/***/ }),
-/* 1042 */
+/* 1046 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145480,7 +146906,7 @@ module.exports = ContainsPoint;
/***/ }),
-/* 1043 */
+/* 1047 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145516,7 +146942,7 @@ module.exports = ContainsRect;
/***/ }),
-/* 1044 */
+/* 1048 */
/***/ (function(module, exports) {
/**
@@ -145548,7 +146974,7 @@ module.exports = CopyFrom;
/***/ }),
-/* 1045 */
+/* 1049 */
/***/ (function(module, exports) {
/**
@@ -145582,7 +147008,7 @@ module.exports = Equals;
/***/ }),
-/* 1046 */
+/* 1050 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145591,7 +147017,7 @@ module.exports = Equals;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
+var Rectangle = __webpack_require__(11);
/**
* Returns the bounds of the Circle object.
@@ -145622,7 +147048,7 @@ module.exports = GetBounds;
/***/ }),
-/* 1047 */
+/* 1051 */
/***/ (function(module, exports) {
/**
@@ -145657,7 +147083,7 @@ module.exports = Offset;
/***/ }),
-/* 1048 */
+/* 1052 */
/***/ (function(module, exports) {
/**
@@ -145691,7 +147117,7 @@ module.exports = OffsetPoint;
/***/ }),
-/* 1049 */
+/* 1053 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145700,29 +147126,29 @@ module.exports = OffsetPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Ellipse = __webpack_require__(92);
+var Ellipse = __webpack_require__(93);
-Ellipse.Area = __webpack_require__(1050);
-Ellipse.Circumference = __webpack_require__(370);
-Ellipse.CircumferencePoint = __webpack_require__(187);
-Ellipse.Clone = __webpack_require__(1051);
-Ellipse.Contains = __webpack_require__(93);
-Ellipse.ContainsPoint = __webpack_require__(1052);
-Ellipse.ContainsRect = __webpack_require__(1053);
-Ellipse.CopyFrom = __webpack_require__(1054);
-Ellipse.Equals = __webpack_require__(1055);
-Ellipse.GetBounds = __webpack_require__(1056);
-Ellipse.GetPoint = __webpack_require__(368);
-Ellipse.GetPoints = __webpack_require__(369);
-Ellipse.Offset = __webpack_require__(1057);
-Ellipse.OffsetPoint = __webpack_require__(1058);
-Ellipse.Random = __webpack_require__(152);
+Ellipse.Area = __webpack_require__(1054);
+Ellipse.Circumference = __webpack_require__(373);
+Ellipse.CircumferencePoint = __webpack_require__(189);
+Ellipse.Clone = __webpack_require__(1055);
+Ellipse.Contains = __webpack_require__(94);
+Ellipse.ContainsPoint = __webpack_require__(1056);
+Ellipse.ContainsRect = __webpack_require__(1057);
+Ellipse.CopyFrom = __webpack_require__(1058);
+Ellipse.Equals = __webpack_require__(1059);
+Ellipse.GetBounds = __webpack_require__(1060);
+Ellipse.GetPoint = __webpack_require__(371);
+Ellipse.GetPoints = __webpack_require__(372);
+Ellipse.Offset = __webpack_require__(1061);
+Ellipse.OffsetPoint = __webpack_require__(1062);
+Ellipse.Random = __webpack_require__(153);
module.exports = Ellipse;
/***/ }),
-/* 1050 */
+/* 1054 */
/***/ (function(module, exports) {
/**
@@ -145756,7 +147182,7 @@ module.exports = Area;
/***/ }),
-/* 1051 */
+/* 1055 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145765,7 +147191,7 @@ module.exports = Area;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Ellipse = __webpack_require__(92);
+var Ellipse = __webpack_require__(93);
/**
* Creates a new Ellipse instance based on the values contained in the given source.
@@ -145786,7 +147212,7 @@ module.exports = Clone;
/***/ }),
-/* 1052 */
+/* 1056 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145795,7 +147221,7 @@ module.exports = Clone;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Contains = __webpack_require__(93);
+var Contains = __webpack_require__(94);
/**
* Check to see if the Ellipse contains the given Point object.
@@ -145817,7 +147243,7 @@ module.exports = ContainsPoint;
/***/ }),
-/* 1053 */
+/* 1057 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145826,7 +147252,7 @@ module.exports = ContainsPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Contains = __webpack_require__(93);
+var Contains = __webpack_require__(94);
/**
* Check to see if the Ellipse contains all four points of the given Rectangle object.
@@ -145853,7 +147279,7 @@ module.exports = ContainsRect;
/***/ }),
-/* 1054 */
+/* 1058 */
/***/ (function(module, exports) {
/**
@@ -145885,7 +147311,7 @@ module.exports = CopyFrom;
/***/ }),
-/* 1055 */
+/* 1059 */
/***/ (function(module, exports) {
/**
@@ -145920,7 +147346,7 @@ module.exports = Equals;
/***/ }),
-/* 1056 */
+/* 1060 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -145929,7 +147355,7 @@ module.exports = Equals;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
+var Rectangle = __webpack_require__(11);
/**
* Returns the bounds of the Ellipse object.
@@ -145960,7 +147386,7 @@ module.exports = GetBounds;
/***/ }),
-/* 1057 */
+/* 1061 */
/***/ (function(module, exports) {
/**
@@ -145995,7 +147421,7 @@ module.exports = Offset;
/***/ }),
-/* 1058 */
+/* 1062 */
/***/ (function(module, exports) {
/**
@@ -146029,7 +147455,7 @@ module.exports = OffsetPoint;
/***/ }),
-/* 1059 */
+/* 1063 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146039,8 +147465,8 @@ module.exports = OffsetPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
-var CircleToCircle = __webpack_require__(403);
+var Point = __webpack_require__(4);
+var CircleToCircle = __webpack_require__(406);
/**
* Checks if two Circles intersect and returns the intersection points as a Point object array.
@@ -146123,7 +147549,7 @@ module.exports = GetCircleToCircle;
/***/ }),
-/* 1060 */
+/* 1064 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146133,8 +147559,8 @@ module.exports = GetCircleToCircle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetLineToCircle = __webpack_require__(196);
-var CircleToRectangle = __webpack_require__(404);
+var GetLineToCircle = __webpack_require__(198);
+var CircleToRectangle = __webpack_require__(407);
/**
* Checks for intersection between a circle and a rectangle,
@@ -146173,7 +147599,7 @@ module.exports = GetCircleToRectangle;
/***/ }),
-/* 1061 */
+/* 1065 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146182,8 +147608,8 @@ module.exports = GetCircleToRectangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
-var RectangleToRectangle = __webpack_require__(130);
+var Rectangle = __webpack_require__(11);
+var RectangleToRectangle = __webpack_require__(131);
/**
* Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object.
@@ -146222,7 +147648,7 @@ module.exports = GetRectangleIntersection;
/***/ }),
-/* 1062 */
+/* 1066 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146232,8 +147658,8 @@ module.exports = GetRectangleIntersection;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetLineToRectangle = __webpack_require__(198);
-var RectangleToRectangle = __webpack_require__(130);
+var GetLineToRectangle = __webpack_require__(200);
+var RectangleToRectangle = __webpack_require__(131);
/**
* Checks if two Rectangles intersect and returns the intersection points as a Point object array.
@@ -146273,7 +147699,7 @@ module.exports = GetRectangleToRectangle;
/***/ }),
-/* 1063 */
+/* 1067 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146283,8 +147709,8 @@ module.exports = GetRectangleToRectangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RectangleToTriangle = __webpack_require__(406);
-var GetLineToRectangle = __webpack_require__(198);
+var RectangleToTriangle = __webpack_require__(409);
+var GetLineToRectangle = __webpack_require__(200);
/**
* Checks for intersection between Rectangle shape and Triangle shape,
@@ -146321,7 +147747,7 @@ module.exports = GetRectangleToTriangle;
/***/ }),
-/* 1064 */
+/* 1068 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146331,8 +147757,8 @@ module.exports = GetRectangleToTriangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetLineToCircle = __webpack_require__(196);
-var TriangleToCircle = __webpack_require__(408);
+var GetLineToCircle = __webpack_require__(198);
+var TriangleToCircle = __webpack_require__(411);
/**
* Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array.
@@ -146370,7 +147796,7 @@ module.exports = GetTriangleToCircle;
/***/ }),
-/* 1065 */
+/* 1069 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146380,8 +147806,8 @@ module.exports = GetTriangleToCircle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var TriangleToTriangle = __webpack_require__(411);
-var GetTriangleToLine = __webpack_require__(409);
+var TriangleToTriangle = __webpack_require__(414);
+var GetTriangleToLine = __webpack_require__(412);
/**
* Checks if two Triangles intersect, and returns the intersection points as a Point object array.
@@ -146419,7 +147845,7 @@ module.exports = GetTriangleToTriangle;
/***/ }),
-/* 1066 */
+/* 1070 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146428,7 +147854,7 @@ module.exports = GetTriangleToTriangle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var PointToLine = __webpack_require__(413);
+var PointToLine = __webpack_require__(416);
/**
* Checks if a Point is located on the given line segment.
@@ -146460,7 +147886,7 @@ module.exports = PointToLineSegment;
/***/ }),
-/* 1067 */
+/* 1071 */
/***/ (function(module, exports) {
/**
@@ -146500,7 +147926,7 @@ module.exports = RectangleToValues;
/***/ }),
-/* 1068 */
+/* 1072 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146509,42 +147935,42 @@ module.exports = RectangleToValues;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Line = __webpack_require__(54);
+var Line = __webpack_require__(55);
-Line.Angle = __webpack_require__(83);
-Line.BresenhamPoints = __webpack_require__(263);
-Line.CenterOn = __webpack_require__(1069);
-Line.Clone = __webpack_require__(1070);
-Line.CopyFrom = __webpack_require__(1071);
-Line.Equals = __webpack_require__(1072);
-Line.Extend = __webpack_require__(1073);
-Line.GetMidPoint = __webpack_require__(1074);
-Line.GetNearestPoint = __webpack_require__(1075);
-Line.GetNormal = __webpack_require__(1076);
-Line.GetPoint = __webpack_require__(250);
-Line.GetPoints = __webpack_require__(148);
-Line.GetShortestDistance = __webpack_require__(1077);
-Line.Height = __webpack_require__(1078);
-Line.Length = __webpack_require__(55);
-Line.NormalAngle = __webpack_require__(414);
-Line.NormalX = __webpack_require__(1079);
-Line.NormalY = __webpack_require__(1080);
-Line.Offset = __webpack_require__(1081);
-Line.PerpSlope = __webpack_require__(1082);
-Line.Random = __webpack_require__(149);
-Line.ReflectAngle = __webpack_require__(1083);
-Line.Rotate = __webpack_require__(1084);
-Line.RotateAroundPoint = __webpack_require__(1085);
-Line.RotateAroundXY = __webpack_require__(200);
-Line.SetToAngle = __webpack_require__(1086);
-Line.Slope = __webpack_require__(1087);
-Line.Width = __webpack_require__(1088);
+Line.Angle = __webpack_require__(85);
+Line.BresenhamPoints = __webpack_require__(266);
+Line.CenterOn = __webpack_require__(1073);
+Line.Clone = __webpack_require__(1074);
+Line.CopyFrom = __webpack_require__(1075);
+Line.Equals = __webpack_require__(1076);
+Line.Extend = __webpack_require__(1077);
+Line.GetMidPoint = __webpack_require__(1078);
+Line.GetNearestPoint = __webpack_require__(1079);
+Line.GetNormal = __webpack_require__(1080);
+Line.GetPoint = __webpack_require__(253);
+Line.GetPoints = __webpack_require__(149);
+Line.GetShortestDistance = __webpack_require__(1081);
+Line.Height = __webpack_require__(1082);
+Line.Length = __webpack_require__(56);
+Line.NormalAngle = __webpack_require__(417);
+Line.NormalX = __webpack_require__(1083);
+Line.NormalY = __webpack_require__(1084);
+Line.Offset = __webpack_require__(1085);
+Line.PerpSlope = __webpack_require__(1086);
+Line.Random = __webpack_require__(150);
+Line.ReflectAngle = __webpack_require__(1087);
+Line.Rotate = __webpack_require__(1088);
+Line.RotateAroundPoint = __webpack_require__(1089);
+Line.RotateAroundXY = __webpack_require__(202);
+Line.SetToAngle = __webpack_require__(1090);
+Line.Slope = __webpack_require__(1091);
+Line.Width = __webpack_require__(1092);
module.exports = Line;
/***/ }),
-/* 1069 */
+/* 1073 */
/***/ (function(module, exports) {
/**
@@ -146584,7 +148010,7 @@ module.exports = CenterOn;
/***/ }),
-/* 1070 */
+/* 1074 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146593,7 +148019,7 @@ module.exports = CenterOn;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Line = __webpack_require__(54);
+var Line = __webpack_require__(55);
/**
* Clone the given line.
@@ -146614,7 +148040,7 @@ module.exports = Clone;
/***/ }),
-/* 1071 */
+/* 1075 */
/***/ (function(module, exports) {
/**
@@ -146645,7 +148071,7 @@ module.exports = CopyFrom;
/***/ }),
-/* 1072 */
+/* 1076 */
/***/ (function(module, exports) {
/**
@@ -146679,7 +148105,7 @@ module.exports = Equals;
/***/ }),
-/* 1073 */
+/* 1077 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146688,7 +148114,7 @@ module.exports = Equals;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Length = __webpack_require__(55);
+var Length = __webpack_require__(56);
/**
* Extends the start and end points of a Line by the given amounts.
@@ -146737,7 +148163,7 @@ module.exports = Extend;
/***/ }),
-/* 1074 */
+/* 1078 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146746,7 +148172,7 @@ module.exports = Extend;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Get the midpoint of the given line.
@@ -146775,7 +148201,7 @@ module.exports = GetMidPoint;
/***/ }),
-/* 1075 */
+/* 1079 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146785,7 +148211,7 @@ module.exports = GetMidPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Get the nearest point on a line perpendicular to the given point.
@@ -146830,7 +148256,7 @@ module.exports = GetNearestPoint;
/***/ }),
-/* 1076 */
+/* 1080 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146839,9 +148265,9 @@ module.exports = GetNearestPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MATH_CONST = __webpack_require__(23);
-var Angle = __webpack_require__(83);
-var Point = __webpack_require__(3);
+var MATH_CONST = __webpack_require__(22);
+var Angle = __webpack_require__(85);
+var Point = __webpack_require__(4);
/**
* Calculate the normal of the given line.
@@ -146874,7 +148300,7 @@ module.exports = GetNormal;
/***/ }),
-/* 1077 */
+/* 1081 */
/***/ (function(module, exports) {
/**
@@ -146921,7 +148347,7 @@ module.exports = GetShortestDistance;
/***/ }),
-/* 1078 */
+/* 1082 */
/***/ (function(module, exports) {
/**
@@ -146949,7 +148375,7 @@ module.exports = Height;
/***/ }),
-/* 1079 */
+/* 1083 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146958,8 +148384,8 @@ module.exports = Height;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MATH_CONST = __webpack_require__(23);
-var Angle = __webpack_require__(83);
+var MATH_CONST = __webpack_require__(22);
+var Angle = __webpack_require__(85);
/**
* [description]
@@ -146980,7 +148406,7 @@ module.exports = NormalX;
/***/ }),
-/* 1080 */
+/* 1084 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -146989,8 +148415,8 @@ module.exports = NormalX;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var MATH_CONST = __webpack_require__(23);
-var Angle = __webpack_require__(83);
+var MATH_CONST = __webpack_require__(22);
+var Angle = __webpack_require__(85);
/**
* The Y value of the normal of the given line.
@@ -147012,7 +148438,7 @@ module.exports = NormalY;
/***/ }),
-/* 1081 */
+/* 1085 */
/***/ (function(module, exports) {
/**
@@ -147050,7 +148476,7 @@ module.exports = Offset;
/***/ }),
-/* 1082 */
+/* 1086 */
/***/ (function(module, exports) {
/**
@@ -147078,7 +148504,7 @@ module.exports = PerpSlope;
/***/ }),
-/* 1083 */
+/* 1087 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147087,8 +148513,8 @@ module.exports = PerpSlope;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Angle = __webpack_require__(83);
-var NormalAngle = __webpack_require__(414);
+var Angle = __webpack_require__(85);
+var NormalAngle = __webpack_require__(417);
/**
* Calculate the reflected angle between two lines.
@@ -147112,7 +148538,7 @@ module.exports = ReflectAngle;
/***/ }),
-/* 1084 */
+/* 1088 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147121,7 +148547,7 @@ module.exports = ReflectAngle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RotateAroundXY = __webpack_require__(200);
+var RotateAroundXY = __webpack_require__(202);
/**
* Rotate a line around its midpoint by the given angle in radians.
@@ -147148,7 +148574,7 @@ module.exports = Rotate;
/***/ }),
-/* 1085 */
+/* 1089 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147157,7 +148583,7 @@ module.exports = Rotate;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RotateAroundXY = __webpack_require__(200);
+var RotateAroundXY = __webpack_require__(202);
/**
* Rotate a line around a point by the given angle in radians.
@@ -147182,7 +148608,7 @@ module.exports = RotateAroundPoint;
/***/ }),
-/* 1086 */
+/* 1090 */
/***/ (function(module, exports) {
/**
@@ -147222,7 +148648,7 @@ module.exports = SetToAngle;
/***/ }),
-/* 1087 */
+/* 1091 */
/***/ (function(module, exports) {
/**
@@ -147250,7 +148676,7 @@ module.exports = Slope;
/***/ }),
-/* 1088 */
+/* 1092 */
/***/ (function(module, exports) {
/**
@@ -147278,7 +148704,7 @@ module.exports = Width;
/***/ }),
-/* 1089 */
+/* 1093 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147287,29 +148713,29 @@ module.exports = Width;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
-Point.Ceil = __webpack_require__(1090);
-Point.Clone = __webpack_require__(1091);
-Point.CopyFrom = __webpack_require__(1092);
-Point.Equals = __webpack_require__(1093);
-Point.Floor = __webpack_require__(1094);
-Point.GetCentroid = __webpack_require__(1095);
-Point.GetMagnitude = __webpack_require__(415);
-Point.GetMagnitudeSq = __webpack_require__(416);
-Point.GetRectangleFromPoints = __webpack_require__(1096);
-Point.Interpolate = __webpack_require__(1097);
-Point.Invert = __webpack_require__(1098);
-Point.Negative = __webpack_require__(1099);
-Point.Project = __webpack_require__(1100);
-Point.ProjectUnit = __webpack_require__(1101);
-Point.SetMagnitude = __webpack_require__(1102);
+Point.Ceil = __webpack_require__(1094);
+Point.Clone = __webpack_require__(1095);
+Point.CopyFrom = __webpack_require__(1096);
+Point.Equals = __webpack_require__(1097);
+Point.Floor = __webpack_require__(1098);
+Point.GetCentroid = __webpack_require__(1099);
+Point.GetMagnitude = __webpack_require__(418);
+Point.GetMagnitudeSq = __webpack_require__(419);
+Point.GetRectangleFromPoints = __webpack_require__(1100);
+Point.Interpolate = __webpack_require__(1101);
+Point.Invert = __webpack_require__(1102);
+Point.Negative = __webpack_require__(1103);
+Point.Project = __webpack_require__(1104);
+Point.ProjectUnit = __webpack_require__(1105);
+Point.SetMagnitude = __webpack_require__(1106);
module.exports = Point;
/***/ }),
-/* 1090 */
+/* 1094 */
/***/ (function(module, exports) {
/**
@@ -147339,7 +148765,7 @@ module.exports = Ceil;
/***/ }),
-/* 1091 */
+/* 1095 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147348,7 +148774,7 @@ module.exports = Ceil;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Clone the given Point.
@@ -147369,7 +148795,7 @@ module.exports = Clone;
/***/ }),
-/* 1092 */
+/* 1096 */
/***/ (function(module, exports) {
/**
@@ -147400,7 +148826,7 @@ module.exports = CopyFrom;
/***/ }),
-/* 1093 */
+/* 1097 */
/***/ (function(module, exports) {
/**
@@ -147429,7 +148855,7 @@ module.exports = Equals;
/***/ }),
-/* 1094 */
+/* 1098 */
/***/ (function(module, exports) {
/**
@@ -147459,7 +148885,7 @@ module.exports = Floor;
/***/ }),
-/* 1095 */
+/* 1099 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147468,7 +148894,7 @@ module.exports = Floor;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Get the centroid or geometric center of a plane figure (the arithmetic mean position of all the points in the figure).
@@ -147523,7 +148949,7 @@ module.exports = GetCentroid;
/***/ }),
-/* 1096 */
+/* 1100 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147532,7 +148958,7 @@ module.exports = GetCentroid;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
+var Rectangle = __webpack_require__(11);
/**
* Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.
@@ -147593,7 +149019,7 @@ module.exports = GetRectangleFromPoints;
/***/ }),
-/* 1097 */
+/* 1101 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147602,7 +149028,7 @@ module.exports = GetRectangleFromPoints;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* [description]
@@ -147634,7 +149060,7 @@ module.exports = Interpolate;
/***/ }),
-/* 1098 */
+/* 1102 */
/***/ (function(module, exports) {
/**
@@ -147664,7 +149090,7 @@ module.exports = Invert;
/***/ }),
-/* 1099 */
+/* 1103 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147673,7 +149099,7 @@ module.exports = Invert;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Inverts a Point's coordinates.
@@ -147699,7 +149125,7 @@ module.exports = Negative;
/***/ }),
-/* 1100 */
+/* 1104 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147708,8 +149134,8 @@ module.exports = Negative;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
-var GetMagnitudeSq = __webpack_require__(416);
+var Point = __webpack_require__(4);
+var GetMagnitudeSq = __webpack_require__(419);
/**
* [description]
@@ -147745,7 +149171,7 @@ module.exports = Project;
/***/ }),
-/* 1101 */
+/* 1105 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147754,7 +149180,7 @@ module.exports = Project;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* [description]
@@ -147789,7 +149215,7 @@ module.exports = ProjectUnit;
/***/ }),
-/* 1102 */
+/* 1106 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147798,7 +149224,7 @@ module.exports = ProjectUnit;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetMagnitude = __webpack_require__(415);
+var GetMagnitude = __webpack_require__(418);
/**
* Changes the magnitude (length) of a two-dimensional vector without changing its direction.
@@ -147833,7 +149259,7 @@ module.exports = SetMagnitude;
/***/ }),
-/* 1103 */
+/* 1107 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147842,23 +149268,23 @@ module.exports = SetMagnitude;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Polygon = __webpack_require__(192);
+var Polygon = __webpack_require__(194);
-Polygon.Clone = __webpack_require__(1104);
-Polygon.Contains = __webpack_require__(193);
-Polygon.ContainsPoint = __webpack_require__(1105);
-Polygon.GetAABB = __webpack_require__(389);
-Polygon.GetNumberArray = __webpack_require__(1106);
-Polygon.GetPoints = __webpack_require__(390);
-Polygon.Perimeter = __webpack_require__(391);
-Polygon.Reverse = __webpack_require__(1107);
-Polygon.Smooth = __webpack_require__(392);
+Polygon.Clone = __webpack_require__(1108);
+Polygon.Contains = __webpack_require__(195);
+Polygon.ContainsPoint = __webpack_require__(1109);
+Polygon.GetAABB = __webpack_require__(392);
+Polygon.GetNumberArray = __webpack_require__(1110);
+Polygon.GetPoints = __webpack_require__(393);
+Polygon.Perimeter = __webpack_require__(394);
+Polygon.Reverse = __webpack_require__(1111);
+Polygon.Smooth = __webpack_require__(395);
module.exports = Polygon;
/***/ }),
-/* 1104 */
+/* 1108 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147867,7 +149293,7 @@ module.exports = Polygon;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Polygon = __webpack_require__(192);
+var Polygon = __webpack_require__(194);
/**
* Create a new polygon which is a copy of the specified polygon
@@ -147888,7 +149314,7 @@ module.exports = Clone;
/***/ }),
-/* 1105 */
+/* 1109 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -147897,7 +149323,7 @@ module.exports = Clone;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Contains = __webpack_require__(193);
+var Contains = __webpack_require__(195);
/**
* [description]
@@ -147919,7 +149345,7 @@ module.exports = ContainsPoint;
/***/ }),
-/* 1106 */
+/* 1110 */
/***/ (function(module, exports) {
/**
@@ -147962,7 +149388,7 @@ module.exports = GetNumberArray;
/***/ }),
-/* 1107 */
+/* 1111 */
/***/ (function(module, exports) {
/**
@@ -147994,7 +149420,7 @@ module.exports = Reverse;
/***/ }),
-/* 1108 */
+/* 1112 */
/***/ (function(module, exports) {
/**
@@ -148022,7 +149448,7 @@ module.exports = Area;
/***/ }),
-/* 1109 */
+/* 1113 */
/***/ (function(module, exports) {
/**
@@ -148055,7 +149481,7 @@ module.exports = Ceil;
/***/ }),
-/* 1110 */
+/* 1114 */
/***/ (function(module, exports) {
/**
@@ -148090,7 +149516,7 @@ module.exports = CeilAll;
/***/ }),
-/* 1111 */
+/* 1115 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148099,7 +149525,7 @@ module.exports = CeilAll;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
+var Rectangle = __webpack_require__(11);
/**
* Creates a new Rectangle which is identical to the given one.
@@ -148120,7 +149546,7 @@ module.exports = Clone;
/***/ }),
-/* 1112 */
+/* 1116 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148129,7 +149555,7 @@ module.exports = Clone;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Contains = __webpack_require__(47);
+var Contains = __webpack_require__(48);
/**
* Determines whether the specified point is contained within the rectangular region defined by this Rectangle object.
@@ -148151,7 +149577,7 @@ module.exports = ContainsPoint;
/***/ }),
-/* 1113 */
+/* 1117 */
/***/ (function(module, exports) {
/**
@@ -148182,7 +149608,7 @@ module.exports = CopyFrom;
/***/ }),
-/* 1114 */
+/* 1118 */
/***/ (function(module, exports) {
/**
@@ -148216,7 +149642,7 @@ module.exports = Equals;
/***/ }),
-/* 1115 */
+/* 1119 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148225,7 +149651,7 @@ module.exports = Equals;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetAspectRatio = __webpack_require__(201);
+var GetAspectRatio = __webpack_require__(203);
/**
* Adjusts the target rectangle, changing its width, height and position,
@@ -148240,7 +149666,7 @@ var GetAspectRatio = __webpack_require__(201);
* @generic {Phaser.Geom.Rectangle} O - [target,$return]
*
* @param {Phaser.Geom.Rectangle} target - The target rectangle to adjust.
- * @param {Phaser.Geom.Rectangle} source - The source rectangle to envlope the target in.
+ * @param {Phaser.Geom.Rectangle} source - The source rectangle to envelop the target in.
*
* @return {Phaser.Geom.Rectangle} The modified target rectangle instance.
*/
@@ -148269,7 +149695,7 @@ module.exports = FitInside;
/***/ }),
-/* 1116 */
+/* 1120 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148278,7 +149704,7 @@ module.exports = FitInside;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetAspectRatio = __webpack_require__(201);
+var GetAspectRatio = __webpack_require__(203);
/**
* Adjusts the target rectangle, changing its width, height and position,
@@ -148322,7 +149748,7 @@ module.exports = FitOutside;
/***/ }),
-/* 1117 */
+/* 1121 */
/***/ (function(module, exports) {
/**
@@ -148355,7 +149781,7 @@ module.exports = Floor;
/***/ }),
-/* 1118 */
+/* 1122 */
/***/ (function(module, exports) {
/**
@@ -148390,7 +149816,7 @@ module.exports = FloorAll;
/***/ }),
-/* 1119 */
+/* 1123 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148399,7 +149825,7 @@ module.exports = FloorAll;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
/**
* Returns the center of a Rectangle as a Point.
@@ -148428,7 +149854,7 @@ module.exports = GetCenter;
/***/ }),
-/* 1120 */
+/* 1124 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148437,13 +149863,12 @@ module.exports = GetCenter;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
-// The size of the Rectangle object, expressed as a Point object
-// with the values of the width and height properties.
/**
- * [description]
+ * The size of the Rectangle object, expressed as a Point object
+ * with the values of the width and height properties.
*
* @function Phaser.Geom.Rectangle.GetSize
* @since 3.0.0
@@ -148469,7 +149894,7 @@ module.exports = GetSize;
/***/ }),
-/* 1121 */
+/* 1125 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148478,7 +149903,7 @@ module.exports = GetSize;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CenterOn = __webpack_require__(162);
+var CenterOn = __webpack_require__(163);
/**
@@ -148511,7 +149936,7 @@ module.exports = Inflate;
/***/ }),
-/* 1122 */
+/* 1126 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148520,8 +149945,8 @@ module.exports = Inflate;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Rectangle = __webpack_require__(10);
-var Intersects = __webpack_require__(130);
+var Rectangle = __webpack_require__(11);
+var Intersects = __webpack_require__(131);
/**
* Takes two Rectangles and first checks to see if they intersect.
@@ -148562,7 +149987,7 @@ module.exports = Intersection;
/***/ }),
-/* 1123 */
+/* 1127 */
/***/ (function(module, exports) {
/**
@@ -148611,7 +150036,7 @@ module.exports = MergePoints;
/***/ }),
-/* 1124 */
+/* 1128 */
/***/ (function(module, exports) {
/**
@@ -148658,7 +150083,7 @@ module.exports = MergeRect;
/***/ }),
-/* 1125 */
+/* 1129 */
/***/ (function(module, exports) {
/**
@@ -148702,7 +150127,7 @@ module.exports = MergeXY;
/***/ }),
-/* 1126 */
+/* 1130 */
/***/ (function(module, exports) {
/**
@@ -148737,7 +150162,7 @@ module.exports = Offset;
/***/ }),
-/* 1127 */
+/* 1131 */
/***/ (function(module, exports) {
/**
@@ -148771,7 +150196,7 @@ module.exports = OffsetPoint;
/***/ }),
-/* 1128 */
+/* 1132 */
/***/ (function(module, exports) {
/**
@@ -148805,7 +150230,7 @@ module.exports = Overlaps;
/***/ }),
-/* 1129 */
+/* 1133 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148814,7 +150239,7 @@ module.exports = Overlaps;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Point = __webpack_require__(3);
+var Point = __webpack_require__(4);
var DegToRad = __webpack_require__(35);
/**
@@ -148862,7 +150287,7 @@ module.exports = PerimeterPoint;
/***/ }),
-/* 1130 */
+/* 1134 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -148871,9 +150296,9 @@ module.exports = PerimeterPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Between = __webpack_require__(168);
-var ContainsRect = __webpack_require__(418);
-var Point = __webpack_require__(3);
+var Between = __webpack_require__(169);
+var ContainsRect = __webpack_require__(421);
+var Point = __webpack_require__(4);
/**
* Calculates a random point that lies within the `outer` Rectangle, but outside of the `inner` Rectangle.
@@ -148933,7 +150358,7 @@ module.exports = RandomOutside;
/***/ }),
-/* 1131 */
+/* 1135 */
/***/ (function(module, exports) {
/**
@@ -148962,7 +150387,7 @@ module.exports = SameDimensions;
/***/ }),
-/* 1132 */
+/* 1136 */
/***/ (function(module, exports) {
/**
@@ -149001,7 +150426,7 @@ module.exports = Scale;
/***/ }),
-/* 1133 */
+/* 1137 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149010,38 +150435,38 @@ module.exports = Scale;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Triangle = __webpack_require__(69);
+var Triangle = __webpack_require__(70);
-Triangle.Area = __webpack_require__(1134);
-Triangle.BuildEquilateral = __webpack_require__(1135);
-Triangle.BuildFromPolygon = __webpack_require__(1136);
-Triangle.BuildRight = __webpack_require__(1137);
-Triangle.CenterOn = __webpack_require__(1138);
-Triangle.Centroid = __webpack_require__(419);
-Triangle.CircumCenter = __webpack_require__(1139);
-Triangle.CircumCircle = __webpack_require__(1140);
-Triangle.Clone = __webpack_require__(1141);
-Triangle.Contains = __webpack_require__(81);
-Triangle.ContainsArray = __webpack_require__(199);
-Triangle.ContainsPoint = __webpack_require__(1142);
-Triangle.CopyFrom = __webpack_require__(1143);
-Triangle.Decompose = __webpack_require__(412);
-Triangle.Equals = __webpack_require__(1144);
-Triangle.GetPoint = __webpack_require__(396);
-Triangle.GetPoints = __webpack_require__(397);
-Triangle.InCenter = __webpack_require__(421);
-Triangle.Perimeter = __webpack_require__(1145);
-Triangle.Offset = __webpack_require__(420);
-Triangle.Random = __webpack_require__(153);
-Triangle.Rotate = __webpack_require__(1146);
-Triangle.RotateAroundPoint = __webpack_require__(1147);
-Triangle.RotateAroundXY = __webpack_require__(202);
+Triangle.Area = __webpack_require__(1138);
+Triangle.BuildEquilateral = __webpack_require__(1139);
+Triangle.BuildFromPolygon = __webpack_require__(1140);
+Triangle.BuildRight = __webpack_require__(1141);
+Triangle.CenterOn = __webpack_require__(1142);
+Triangle.Centroid = __webpack_require__(422);
+Triangle.CircumCenter = __webpack_require__(1143);
+Triangle.CircumCircle = __webpack_require__(1144);
+Triangle.Clone = __webpack_require__(1145);
+Triangle.Contains = __webpack_require__(83);
+Triangle.ContainsArray = __webpack_require__(201);
+Triangle.ContainsPoint = __webpack_require__(1146);
+Triangle.CopyFrom = __webpack_require__(1147);
+Triangle.Decompose = __webpack_require__(415);
+Triangle.Equals = __webpack_require__(1148);
+Triangle.GetPoint = __webpack_require__(399);
+Triangle.GetPoints = __webpack_require__(400);
+Triangle.InCenter = __webpack_require__(424);
+Triangle.Perimeter = __webpack_require__(1149);
+Triangle.Offset = __webpack_require__(423);
+Triangle.Random = __webpack_require__(154);
+Triangle.Rotate = __webpack_require__(1150);
+Triangle.RotateAroundPoint = __webpack_require__(1151);
+Triangle.RotateAroundXY = __webpack_require__(204);
module.exports = Triangle;
/***/ }),
-/* 1134 */
+/* 1138 */
/***/ (function(module, exports) {
/**
@@ -149080,7 +150505,7 @@ module.exports = Area;
/***/ }),
-/* 1135 */
+/* 1139 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149089,7 +150514,7 @@ module.exports = Area;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Triangle = __webpack_require__(69);
+var Triangle = __webpack_require__(70);
/**
* Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent).
@@ -149124,7 +150549,7 @@ module.exports = BuildEquilateral;
/***/ }),
-/* 1136 */
+/* 1140 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149133,8 +150558,8 @@ module.exports = BuildEquilateral;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var EarCut = __webpack_require__(63);
-var Triangle = __webpack_require__(69);
+var EarCut = __webpack_require__(64);
+var Triangle = __webpack_require__(70);
/**
* [description]
@@ -149199,7 +150624,7 @@ module.exports = BuildFromPolygon;
/***/ }),
-/* 1137 */
+/* 1141 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149208,7 +150633,7 @@ module.exports = BuildFromPolygon;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Triangle = __webpack_require__(69);
+var Triangle = __webpack_require__(70);
// Builds a right triangle, with one 90 degree angle and two acute angles
// The x/y is the coordinate of the 90 degree angle (and will map to x1/y1 in the resulting Triangle)
@@ -149248,7 +150673,7 @@ module.exports = BuildRight;
/***/ }),
-/* 1138 */
+/* 1142 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149257,8 +150682,8 @@ module.exports = BuildRight;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Centroid = __webpack_require__(419);
-var Offset = __webpack_require__(420);
+var Centroid = __webpack_require__(422);
+var Offset = __webpack_require__(423);
/**
* @callback CenterFunction
@@ -149301,7 +150726,7 @@ module.exports = CenterOn;
/***/ }),
-/* 1139 */
+/* 1143 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149310,7 +150735,7 @@ module.exports = CenterOn;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Vector2 = __webpack_require__(4);
+var Vector2 = __webpack_require__(3);
// Adapted from http://bjornharrtell.github.io/jsts/doc/api/jsts_geom_Triangle.js.html
@@ -149377,7 +150802,7 @@ module.exports = CircumCenter;
/***/ }),
-/* 1140 */
+/* 1144 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149386,7 +150811,7 @@ module.exports = CircumCenter;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Circle = __webpack_require__(77);
+var Circle = __webpack_require__(78);
// Adapted from https://gist.github.com/mutoo/5617691
@@ -149460,7 +150885,7 @@ module.exports = CircumCircle;
/***/ }),
-/* 1141 */
+/* 1145 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149469,7 +150894,7 @@ module.exports = CircumCircle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Triangle = __webpack_require__(69);
+var Triangle = __webpack_require__(70);
/**
* Clones a Triangle object.
@@ -149490,7 +150915,7 @@ module.exports = Clone;
/***/ }),
-/* 1142 */
+/* 1146 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149499,7 +150924,7 @@ module.exports = Clone;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Contains = __webpack_require__(81);
+var Contains = __webpack_require__(83);
/**
* Tests if a triangle contains a point.
@@ -149521,7 +150946,7 @@ module.exports = ContainsPoint;
/***/ }),
-/* 1143 */
+/* 1147 */
/***/ (function(module, exports) {
/**
@@ -149552,7 +150977,7 @@ module.exports = CopyFrom;
/***/ }),
-/* 1144 */
+/* 1148 */
/***/ (function(module, exports) {
/**
@@ -149588,7 +151013,7 @@ module.exports = Equals;
/***/ }),
-/* 1145 */
+/* 1149 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149597,7 +151022,7 @@ module.exports = Equals;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Length = __webpack_require__(55);
+var Length = __webpack_require__(56);
// The 2D area of a triangle. The area value is always non-negative.
@@ -149624,7 +151049,7 @@ module.exports = Perimeter;
/***/ }),
-/* 1146 */
+/* 1150 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149633,8 +151058,8 @@ module.exports = Perimeter;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RotateAroundXY = __webpack_require__(202);
-var InCenter = __webpack_require__(421);
+var RotateAroundXY = __webpack_require__(204);
+var InCenter = __webpack_require__(424);
/**
* Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet.
@@ -149660,7 +151085,7 @@ module.exports = Rotate;
/***/ }),
-/* 1147 */
+/* 1151 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149669,7 +151094,7 @@ module.exports = Rotate;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RotateAroundXY = __webpack_require__(202);
+var RotateAroundXY = __webpack_require__(204);
/**
* Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties.
@@ -149694,7 +151119,7 @@ module.exports = RotateAroundPoint;
/***/ }),
-/* 1148 */
+/* 1152 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149703,8 +151128,8 @@ module.exports = RotateAroundPoint;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(175);
-var Extend = __webpack_require__(17);
+var CONST = __webpack_require__(176);
+var Extend = __webpack_require__(15);
/**
* @namespace Phaser.Input
@@ -149712,16 +151137,16 @@ var Extend = __webpack_require__(17);
var Input = {
- CreateInteractiveObject: __webpack_require__(422),
- Events: __webpack_require__(53),
- Gamepad: __webpack_require__(1149),
- InputManager: __webpack_require__(337),
- InputPlugin: __webpack_require__(1161),
- InputPluginCache: __webpack_require__(131),
- Keyboard: __webpack_require__(1163),
- Mouse: __webpack_require__(1180),
- Pointer: __webpack_require__(340),
- Touch: __webpack_require__(1181)
+ CreateInteractiveObject: __webpack_require__(425),
+ Events: __webpack_require__(54),
+ Gamepad: __webpack_require__(1153),
+ InputManager: __webpack_require__(340),
+ InputPlugin: __webpack_require__(1165),
+ InputPluginCache: __webpack_require__(132),
+ Keyboard: __webpack_require__(1167),
+ Mouse: __webpack_require__(1184),
+ Pointer: __webpack_require__(343),
+ Touch: __webpack_require__(1185)
};
@@ -149732,7 +151157,7 @@ module.exports = Input;
/***/ }),
-/* 1149 */
+/* 1153 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149747,18 +151172,18 @@ module.exports = Input;
module.exports = {
- Axis: __webpack_require__(423),
- Button: __webpack_require__(424),
- Events: __webpack_require__(203),
- Gamepad: __webpack_require__(425),
- GamepadPlugin: __webpack_require__(1156),
+ Axis: __webpack_require__(426),
+ Button: __webpack_require__(427),
+ Events: __webpack_require__(205),
+ Gamepad: __webpack_require__(428),
+ GamepadPlugin: __webpack_require__(1160),
- Configs: __webpack_require__(1157)
+ Configs: __webpack_require__(1161)
};
/***/ }),
-/* 1150 */
+/* 1154 */
/***/ (function(module, exports) {
/**
@@ -149787,7 +151212,7 @@ module.exports = 'down';
/***/ }),
-/* 1151 */
+/* 1155 */
/***/ (function(module, exports) {
/**
@@ -149816,7 +151241,7 @@ module.exports = 'up';
/***/ }),
-/* 1152 */
+/* 1156 */
/***/ (function(module, exports) {
/**
@@ -149847,7 +151272,7 @@ module.exports = 'connected';
/***/ }),
-/* 1153 */
+/* 1157 */
/***/ (function(module, exports) {
/**
@@ -149873,7 +151298,7 @@ module.exports = 'disconnected';
/***/ }),
-/* 1154 */
+/* 1158 */
/***/ (function(module, exports) {
/**
@@ -149905,7 +151330,7 @@ module.exports = 'down';
/***/ }),
-/* 1155 */
+/* 1159 */
/***/ (function(module, exports) {
/**
@@ -149937,7 +151362,7 @@ module.exports = 'up';
/***/ }),
-/* 1156 */
+/* 1160 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -149947,12 +151372,12 @@ module.exports = 'up';
*/
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(203);
-var Gamepad = __webpack_require__(425);
-var GetValue = __webpack_require__(6);
-var InputPluginCache = __webpack_require__(131);
-var InputEvents = __webpack_require__(53);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(205);
+var Gamepad = __webpack_require__(428);
+var GetValue = __webpack_require__(5);
+var InputPluginCache = __webpack_require__(132);
+var InputEvents = __webpack_require__(54);
/**
* @classdesc
@@ -150577,7 +152002,7 @@ module.exports = GamepadPlugin;
/***/ }),
-/* 1157 */
+/* 1161 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -150592,15 +152017,15 @@ module.exports = GamepadPlugin;
module.exports = {
- DUALSHOCK_4: __webpack_require__(1158),
- SNES_USB: __webpack_require__(1159),
- XBOX_360: __webpack_require__(1160)
+ DUALSHOCK_4: __webpack_require__(1162),
+ SNES_USB: __webpack_require__(1163),
+ XBOX_360: __webpack_require__(1164)
};
/***/ }),
-/* 1158 */
+/* 1162 */
/***/ (function(module, exports) {
/**
@@ -150650,7 +152075,7 @@ module.exports = {
/***/ }),
-/* 1159 */
+/* 1163 */
/***/ (function(module, exports) {
/**
@@ -150689,7 +152114,7 @@ module.exports = {
/***/ }),
-/* 1160 */
+/* 1164 */
/***/ (function(module, exports) {
/**
@@ -150740,7 +152165,7 @@ module.exports = {
/***/ }),
-/* 1161 */
+/* 1165 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -150749,26 +152174,27 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Circle = __webpack_require__(77);
+var Circle = __webpack_require__(78);
var CircleContains = __webpack_require__(46);
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(175);
-var CreateInteractiveObject = __webpack_require__(422);
-var CreatePixelPerfectHandler = __webpack_require__(1162);
-var DistanceBetween = __webpack_require__(57);
-var Ellipse = __webpack_require__(92);
-var EllipseContains = __webpack_require__(93);
-var Events = __webpack_require__(53);
-var EventEmitter = __webpack_require__(11);
+var CONST = __webpack_require__(176);
+var CreateInteractiveObject = __webpack_require__(425);
+var CreatePixelPerfectHandler = __webpack_require__(1166);
+var DistanceBetween = __webpack_require__(58);
+var Ellipse = __webpack_require__(93);
+var EllipseContains = __webpack_require__(94);
+var Events = __webpack_require__(54);
+var EventEmitter = __webpack_require__(10);
var GetFastValue = __webpack_require__(2);
-var InputPluginCache = __webpack_require__(131);
+var GEOM_CONST = __webpack_require__(47);
+var InputPluginCache = __webpack_require__(132);
var IsPlainObject = __webpack_require__(7);
-var PluginCache = __webpack_require__(18);
-var Rectangle = __webpack_require__(10);
-var RectangleContains = __webpack_require__(47);
-var SceneEvents = __webpack_require__(19);
-var Triangle = __webpack_require__(69);
-var TriangleContains = __webpack_require__(81);
+var PluginCache = __webpack_require__(19);
+var Rectangle = __webpack_require__(11);
+var RectangleContains = __webpack_require__(48);
+var SceneEvents = __webpack_require__(20);
+var Triangle = __webpack_require__(70);
+var TriangleContains = __webpack_require__(83);
/**
* @classdesc
@@ -151289,17 +152715,35 @@ var InputPlugin = new Class({
return false;
}
- // So the Gamepad and Keyboard update, regardless
+ // The plugins should update every frame, regardless if there has been
+ // any DOM input events or not (such as the Gamepad and Keyboard)
this.pluginEvents.emit(Events.UPDATE, time, delta);
- // Nothing else? Let's leave
- if (this._list.length === 0 || this._updatedThisFrame)
+ // We can leave now if we've already updated once this frame via the immediate DOM event handlers
+ if (this._updatedThisFrame)
{
this._updatedThisFrame = false;
return false;
}
+ var i;
+ var manager = this.manager;
+
+ var pointers = manager.pointers;
+ var pointersTotal = manager.pointersTotal;
+
+ for (i = 0; i < pointersTotal; i++)
+ {
+ pointers[i].updateMotion();
+ }
+
+ // No point going any further if there aren't any interactive objects
+ if (this._list.length === 0)
+ {
+ return false;
+ }
+
var rate = this.pollRate;
if (rate === -1)
@@ -151323,15 +152767,12 @@ var InputPlugin = new Class({
}
// We got this far? Then we should poll for movement
- var manager = this.manager;
-
- var pointers = manager.pointers;
- var pointersTotal = manager.pointersTotal;
var captured = false;
- for (var i = 0; i < pointersTotal; i++)
+ for (i = 0; i < pointersTotal; i++)
{
var total = 0;
+
var pointer = pointers[i];
// Always reset this array
@@ -151714,7 +153155,7 @@ var InputPlugin = new Class({
}
// If they released outside the canvas, but pressed down inside it, we'll still dispatch the event.
- if (!aborted)
+ if (!aborted && this.manager)
{
if (pointer.downElement === this.manager.game.canvas)
{
@@ -152666,7 +154107,7 @@ var InputPlugin = new Class({
}
// If they released outside the canvas, but pressed down inside it, we'll still dispatch the event.
- if (!aborted)
+ if (!aborted && this.manager)
{
if (pointer.upElement === this.manager.game.canvas)
{
@@ -152846,6 +154287,7 @@ var InputPlugin = new Class({
var cursor = false;
var useHandCursor = false;
var pixelPerfect = false;
+ var customHitArea = true;
// Config object?
if (IsPlainObject(shape))
@@ -152872,6 +154314,7 @@ var InputPlugin = new Class({
if (!shape || !callback)
{
this.setHitAreaFromTexture(gameObjects);
+ customHitArea = false;
}
}
else if (typeof shape === 'function' && !callback)
@@ -152892,7 +154335,7 @@ var InputPlugin = new Class({
var io = (!gameObject.input) ? CreateInteractiveObject(gameObject, shape, callback) : gameObject.input;
- io.customHitArea = true;
+ io.customHitArea = customHitArea;
io.dropZone = dropZone;
io.cursor = (useHandCursor) ? 'pointer' : cursor;
@@ -153068,6 +154511,145 @@ var InputPlugin = new Class({
return this.setHitArea(gameObjects, shape, callback);
},
+ /**
+ * Creates an Input Debug Shape for the given Game Object.
+ *
+ * The Game Object must have _already_ been enabled for input prior to calling this method.
+ *
+ * This is intended to assist you during development and debugging.
+ *
+ * Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input,
+ * including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle.
+ *
+ * Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work.
+ *
+ * The Debug Shape is created and added to the display list and is then kept in sync with the Game Object
+ * it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via
+ * the Game Object property: `GameObject.input.hitAreaDebug`.
+ *
+ * Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape,
+ * before creating a new one. If you wish to remove the Debug Shape entirely, you should call the
+ * method `InputPlugin.removeDebug`.
+ *
+ * Note that the debug shape will only show the outline of the input area. If the input test is using a
+ * pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that
+ * doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not
+ * work.
+ *
+ * @method Phaser.Input.InputPlugin#enableDebug
+ * @since 3.19.0
+ *
+ * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to create the input debug shape for.
+ * @param {number} [color=0x00ff00] - The outline color of the debug shape.
+ *
+ * @return {Phaser.Input.InputPlugin} This Input Plugin.
+ */
+ enableDebug: function (gameObject, color)
+ {
+ if (color === undefined) { color = 0x00ff00; }
+
+ var input = gameObject.input;
+
+ if (!input || !input.hitArea)
+ {
+ return this;
+ }
+
+ var shape = input.hitArea;
+ var shapeType = shape.type;
+ var debug = input.hitAreaDebug;
+ var factory = this.systems.add;
+ var updateList = this.systems.updateList;
+
+ if (debug)
+ {
+ updateList.remove(debug);
+
+ debug.destroy();
+
+ debug = null;
+ }
+
+ switch (shapeType)
+ {
+ case GEOM_CONST.CIRCLE:
+ debug = factory.arc(0, 0, shape.radius);
+ break;
+
+ case GEOM_CONST.ELLIPSE:
+ debug = factory.ellipse(0, 0, shape.width, shape.height);
+ break;
+
+ case GEOM_CONST.LINE:
+ debug = factory.line(0, 0, shape.x1, shape.y1, shape.x2, shape.y2);
+ break;
+
+ case GEOM_CONST.POLYGON:
+ debug = factory.polygon(0, 0, shape.points);
+ break;
+
+ case GEOM_CONST.RECTANGLE:
+ debug = factory.rectangle(0, 0, shape.width, shape.height);
+ break;
+
+ case GEOM_CONST.TRIANGLE:
+ debug = factory.triangle(0, 0, shape.x1, shape.y1, shape.x2, shape.y2, shape.x3, shape.y3);
+ break;
+ }
+
+ if (debug)
+ {
+ debug.isFilled = false;
+
+ debug.preUpdate = function ()
+ {
+ debug.setStrokeStyle(1 / gameObject.scale, color);
+
+ debug.setDisplayOrigin(gameObject.displayOriginX, gameObject.displayOriginY);
+ debug.setRotation(gameObject.rotation);
+ debug.setScale(gameObject.scaleX, gameObject.scaleY);
+ debug.setPosition(gameObject.x, gameObject.y);
+ debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY);
+ };
+
+ updateList.add(debug);
+
+ input.hitAreaDebug = debug;
+ }
+
+ return this;
+ },
+
+ /**
+ * Removes an Input Debug Shape from the given Game Object.
+ *
+ * The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`.
+ *
+ * @method Phaser.Input.InputPlugin#removeDebug
+ * @since 3.19.0
+ *
+ * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to remove the input debug shape from.
+ *
+ * @return {Phaser.Input.InputPlugin} This Input Plugin.
+ */
+ removeDebug: function (gameObject)
+ {
+ var input = gameObject.input;
+
+ if (input && input.hitAreaDebug)
+ {
+ var debug = input.hitAreaDebug;
+
+ this.systems.updateList.remove(debug);
+
+ debug.destroy();
+
+ input.hitAreaDebug = null;
+ }
+
+ return this;
+ },
+
/**
* Sets the Pointers to always poll.
*
@@ -153709,7 +155291,7 @@ module.exports = InputPlugin;
/***/ }),
-/* 1162 */
+/* 1166 */
/***/ (function(module, exports) {
/**
@@ -153745,7 +155327,7 @@ module.exports = CreatePixelPerfectHandler;
/***/ }),
-/* 1163 */
+/* 1167 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -153760,26 +155342,26 @@ module.exports = CreatePixelPerfectHandler;
module.exports = {
- Events: __webpack_require__(132),
+ Events: __webpack_require__(133),
- KeyboardManager: __webpack_require__(338),
- KeyboardPlugin: __webpack_require__(1171),
+ KeyboardManager: __webpack_require__(341),
+ KeyboardPlugin: __webpack_require__(1175),
- Key: __webpack_require__(426),
- KeyCodes: __webpack_require__(121),
+ Key: __webpack_require__(429),
+ KeyCodes: __webpack_require__(122),
- KeyCombo: __webpack_require__(427),
+ KeyCombo: __webpack_require__(430),
- JustDown: __webpack_require__(1176),
- JustUp: __webpack_require__(1177),
- DownDuration: __webpack_require__(1178),
- UpDuration: __webpack_require__(1179)
+ JustDown: __webpack_require__(1180),
+ JustUp: __webpack_require__(1181),
+ DownDuration: __webpack_require__(1182),
+ UpDuration: __webpack_require__(1183)
};
/***/ }),
-/* 1164 */
+/* 1168 */
/***/ (function(module, exports) {
/**
@@ -153815,7 +155397,7 @@ module.exports = 'keydown';
/***/ }),
-/* 1165 */
+/* 1169 */
/***/ (function(module, exports) {
/**
@@ -153844,7 +155426,7 @@ module.exports = 'keyup';
/***/ }),
-/* 1166 */
+/* 1170 */
/***/ (function(module, exports) {
/**
@@ -153878,7 +155460,7 @@ module.exports = 'keycombomatch';
/***/ }),
-/* 1167 */
+/* 1171 */
/***/ (function(module, exports) {
/**
@@ -153912,7 +155494,7 @@ module.exports = 'down';
/***/ }),
-/* 1168 */
+/* 1172 */
/***/ (function(module, exports) {
/**
@@ -153951,7 +155533,7 @@ module.exports = 'keydown-';
/***/ }),
-/* 1169 */
+/* 1173 */
/***/ (function(module, exports) {
/**
@@ -153983,7 +155565,7 @@ module.exports = 'keyup-';
/***/ }),
-/* 1170 */
+/* 1174 */
/***/ (function(module, exports) {
/**
@@ -154017,7 +155599,7 @@ module.exports = 'up';
/***/ }),
-/* 1171 */
+/* 1175 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -154027,17 +155609,17 @@ module.exports = 'up';
*/
var Class = __webpack_require__(0);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(132);
-var GameEvents = __webpack_require__(28);
-var GetValue = __webpack_require__(6);
-var InputEvents = __webpack_require__(53);
-var InputPluginCache = __webpack_require__(131);
-var Key = __webpack_require__(426);
-var KeyCodes = __webpack_require__(121);
-var KeyCombo = __webpack_require__(427);
-var KeyMap = __webpack_require__(1175);
-var SnapFloor = __webpack_require__(90);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(133);
+var GameEvents = __webpack_require__(18);
+var GetValue = __webpack_require__(5);
+var InputEvents = __webpack_require__(54);
+var InputPluginCache = __webpack_require__(132);
+var Key = __webpack_require__(429);
+var KeyCodes = __webpack_require__(122);
+var KeyCombo = __webpack_require__(430);
+var KeyMap = __webpack_require__(1179);
+var SnapFloor = __webpack_require__(91);
/**
* @classdesc
@@ -154903,7 +156485,7 @@ module.exports = KeyboardPlugin;
/***/ }),
-/* 1172 */
+/* 1176 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -154912,7 +156494,7 @@ module.exports = KeyboardPlugin;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var AdvanceKeyCombo = __webpack_require__(1173);
+var AdvanceKeyCombo = __webpack_require__(1177);
/**
* Used internally by the KeyCombo class.
@@ -154984,7 +156566,7 @@ module.exports = ProcessKeyCombo;
/***/ }),
-/* 1173 */
+/* 1177 */
/***/ (function(module, exports) {
/**
@@ -155026,7 +156608,7 @@ module.exports = AdvanceKeyCombo;
/***/ }),
-/* 1174 */
+/* 1178 */
/***/ (function(module, exports) {
/**
@@ -155061,7 +156643,7 @@ module.exports = ResetKeyCombo;
/***/ }),
-/* 1175 */
+/* 1179 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -155070,7 +156652,7 @@ module.exports = ResetKeyCombo;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var KeyCodes = __webpack_require__(121);
+var KeyCodes = __webpack_require__(122);
var KeyMap = {};
@@ -155083,7 +156665,7 @@ module.exports = KeyMap;
/***/ }),
-/* 1176 */
+/* 1180 */
/***/ (function(module, exports) {
/**
@@ -155125,7 +156707,7 @@ module.exports = JustDown;
/***/ }),
-/* 1177 */
+/* 1181 */
/***/ (function(module, exports) {
/**
@@ -155167,7 +156749,7 @@ module.exports = JustUp;
/***/ }),
-/* 1178 */
+/* 1182 */
/***/ (function(module, exports) {
/**
@@ -155201,7 +156783,7 @@ module.exports = DownDuration;
/***/ }),
-/* 1179 */
+/* 1183 */
/***/ (function(module, exports) {
/**
@@ -155235,7 +156817,7 @@ module.exports = UpDuration;
/***/ }),
-/* 1180 */
+/* 1184 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -155251,14 +156833,14 @@ module.exports = UpDuration;
/* eslint-disable */
module.exports = {
- MouseManager: __webpack_require__(339)
+ MouseManager: __webpack_require__(342)
};
/* eslint-enable */
/***/ }),
-/* 1181 */
+/* 1185 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -155274,14 +156856,14 @@ module.exports = {
/* eslint-disable */
module.exports = {
- TouchManager: __webpack_require__(341)
+ TouchManager: __webpack_require__(344)
};
/* eslint-enable */
/***/ }),
-/* 1182 */
+/* 1186 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -155290,8 +156872,8 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(16);
-var Extend = __webpack_require__(17);
+var CONST = __webpack_require__(17);
+var Extend = __webpack_require__(15);
/**
* @namespace Phaser.Loader
@@ -155299,18 +156881,18 @@ var Extend = __webpack_require__(17);
var Loader = {
- Events: __webpack_require__(80),
+ Events: __webpack_require__(81),
- FileTypes: __webpack_require__(1183),
+ FileTypes: __webpack_require__(1187),
- File: __webpack_require__(20),
+ File: __webpack_require__(21),
FileTypesManager: __webpack_require__(8),
- GetURL: __webpack_require__(204),
- LoaderPlugin: __webpack_require__(1206),
- MergeXHRSettings: __webpack_require__(205),
- MultiFile: __webpack_require__(59),
- XHRLoader: __webpack_require__(428),
- XHRSettings: __webpack_require__(133)
+ GetURL: __webpack_require__(206),
+ LoaderPlugin: __webpack_require__(1210),
+ MergeXHRSettings: __webpack_require__(207),
+ MultiFile: __webpack_require__(60),
+ XHRLoader: __webpack_require__(431),
+ XHRSettings: __webpack_require__(134)
};
@@ -155321,7 +156903,7 @@ module.exports = Loader;
/***/ }),
-/* 1183 */
+/* 1187 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -155336,41 +156918,41 @@ module.exports = Loader;
module.exports = {
- AnimationJSONFile: __webpack_require__(1184),
- AtlasJSONFile: __webpack_require__(1185),
- AtlasXMLFile: __webpack_require__(1186),
- AudioFile: __webpack_require__(429),
- AudioSpriteFile: __webpack_require__(1187),
- BinaryFile: __webpack_require__(1188),
- BitmapFontFile: __webpack_require__(1189),
- CSSFile: __webpack_require__(1190),
- GLSLFile: __webpack_require__(1191),
- HTML5AudioFile: __webpack_require__(430),
- HTMLFile: __webpack_require__(1192),
- HTMLTextureFile: __webpack_require__(1193),
- ImageFile: __webpack_require__(70),
- JSONFile: __webpack_require__(58),
- MultiAtlasFile: __webpack_require__(1194),
- MultiScriptFile: __webpack_require__(1195),
- PackFile: __webpack_require__(1196),
- PluginFile: __webpack_require__(1197),
- SceneFile: __webpack_require__(1198),
- ScenePluginFile: __webpack_require__(1199),
- ScriptFile: __webpack_require__(431),
- SpriteSheetFile: __webpack_require__(1200),
- SVGFile: __webpack_require__(1201),
- TextFile: __webpack_require__(432),
- TilemapCSVFile: __webpack_require__(1202),
- TilemapImpactFile: __webpack_require__(1203),
- TilemapJSONFile: __webpack_require__(1204),
- UnityAtlasFile: __webpack_require__(1205),
- XMLFile: __webpack_require__(206)
+ AnimationJSONFile: __webpack_require__(1188),
+ AtlasJSONFile: __webpack_require__(1189),
+ AtlasXMLFile: __webpack_require__(1190),
+ AudioFile: __webpack_require__(432),
+ AudioSpriteFile: __webpack_require__(1191),
+ BinaryFile: __webpack_require__(1192),
+ BitmapFontFile: __webpack_require__(1193),
+ CSSFile: __webpack_require__(1194),
+ GLSLFile: __webpack_require__(1195),
+ HTML5AudioFile: __webpack_require__(433),
+ HTMLFile: __webpack_require__(1196),
+ HTMLTextureFile: __webpack_require__(1197),
+ ImageFile: __webpack_require__(71),
+ JSONFile: __webpack_require__(59),
+ MultiAtlasFile: __webpack_require__(1198),
+ MultiScriptFile: __webpack_require__(1199),
+ PackFile: __webpack_require__(1200),
+ PluginFile: __webpack_require__(1201),
+ SceneFile: __webpack_require__(1202),
+ ScenePluginFile: __webpack_require__(1203),
+ ScriptFile: __webpack_require__(434),
+ SpriteSheetFile: __webpack_require__(1204),
+ SVGFile: __webpack_require__(1205),
+ TextFile: __webpack_require__(435),
+ TilemapCSVFile: __webpack_require__(1206),
+ TilemapImpactFile: __webpack_require__(1207),
+ TilemapJSONFile: __webpack_require__(1208),
+ UnityAtlasFile: __webpack_require__(1209),
+ XMLFile: __webpack_require__(208)
};
/***/ }),
-/* 1184 */
+/* 1188 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -155381,8 +156963,8 @@ module.exports = {
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
-var JSONFile = __webpack_require__(58);
-var LoaderEvents = __webpack_require__(80);
+var JSONFile = __webpack_require__(59);
+var LoaderEvents = __webpack_require__(81);
/**
* @classdesc
@@ -155573,7 +157155,7 @@ module.exports = AnimationJSONFile;
/***/ }),
-/* 1185 */
+/* 1189 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -155585,10 +157167,10 @@ module.exports = AnimationJSONFile;
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
-var ImageFile = __webpack_require__(70);
+var ImageFile = __webpack_require__(71);
var IsPlainObject = __webpack_require__(7);
-var JSONFile = __webpack_require__(58);
-var MultiFile = __webpack_require__(59);
+var JSONFile = __webpack_require__(59);
+var MultiFile = __webpack_require__(60);
/**
* @classdesc
@@ -155822,7 +157404,7 @@ module.exports = AtlasJSONFile;
/***/ }),
-/* 1186 */
+/* 1190 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -155834,10 +157416,10 @@ module.exports = AtlasJSONFile;
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
-var ImageFile = __webpack_require__(70);
+var ImageFile = __webpack_require__(71);
var IsPlainObject = __webpack_require__(7);
-var MultiFile = __webpack_require__(59);
-var XMLFile = __webpack_require__(206);
+var MultiFile = __webpack_require__(60);
+var XMLFile = __webpack_require__(208);
/**
* @classdesc
@@ -156065,7 +157647,7 @@ module.exports = AtlasXMLFile;
/***/ }),
-/* 1187 */
+/* 1191 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -156074,13 +157656,13 @@ module.exports = AtlasXMLFile;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var AudioFile = __webpack_require__(429);
+var AudioFile = __webpack_require__(432);
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
-var JSONFile = __webpack_require__(58);
-var MultiFile = __webpack_require__(59);
+var JSONFile = __webpack_require__(59);
+var MultiFile = __webpack_require__(60);
/**
* @classdesc
@@ -156355,7 +157937,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio
/***/ }),
-/* 1188 */
+/* 1192 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -156365,8 +157947,8 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -156537,7 +158119,7 @@ module.exports = BinaryFile;
/***/ }),
-/* 1189 */
+/* 1193 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -156549,11 +158131,11 @@ module.exports = BinaryFile;
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
-var ImageFile = __webpack_require__(70);
+var ImageFile = __webpack_require__(71);
var IsPlainObject = __webpack_require__(7);
-var MultiFile = __webpack_require__(59);
-var ParseXMLBitmapFont = __webpack_require__(181);
-var XMLFile = __webpack_require__(206);
+var MultiFile = __webpack_require__(60);
+var ParseXMLBitmapFont = __webpack_require__(183);
+var XMLFile = __webpack_require__(208);
/**
* @classdesc
@@ -156780,7 +158362,7 @@ module.exports = BitmapFontFile;
/***/ }),
-/* 1190 */
+/* 1194 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -156790,8 +158372,8 @@ module.exports = BitmapFontFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -156948,7 +158530,7 @@ module.exports = CSSFile;
/***/ }),
-/* 1191 */
+/* 1195 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -156958,12 +158540,12 @@ module.exports = CSSFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
-var Shader = __webpack_require__(325);
+var Shader = __webpack_require__(328);
/**
* @classdesc
@@ -157359,7 +158941,7 @@ module.exports = GLSLFile;
/***/ }),
-/* 1192 */
+/* 1196 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -157369,8 +158951,8 @@ module.exports = GLSLFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -157534,7 +159116,7 @@ module.exports = HTMLFile;
/***/ }),
-/* 1193 */
+/* 1197 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -157544,8 +159126,8 @@ module.exports = HTMLFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -157792,7 +159374,7 @@ module.exports = HTMLTextureFile;
/***/ }),
-/* 1194 */
+/* 1198 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -157804,10 +159386,10 @@ module.exports = HTMLTextureFile;
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
-var ImageFile = __webpack_require__(70);
+var ImageFile = __webpack_require__(71);
var IsPlainObject = __webpack_require__(7);
-var JSONFile = __webpack_require__(58);
-var MultiFile = __webpack_require__(59);
+var JSONFile = __webpack_require__(59);
+var MultiFile = __webpack_require__(60);
/**
* @classdesc
@@ -158116,7 +159698,7 @@ module.exports = MultiAtlasFile;
/***/ }),
-/* 1195 */
+/* 1199 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -158129,8 +159711,8 @@ var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
-var MultiFile = __webpack_require__(59);
-var ScriptFile = __webpack_require__(431);
+var MultiFile = __webpack_require__(60);
+var ScriptFile = __webpack_require__(434);
/**
* @classdesc
@@ -158333,7 +159915,7 @@ module.exports = MultiScriptFile;
/***/ }),
-/* 1196 */
+/* 1200 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -158343,9 +159925,9 @@ module.exports = MultiScriptFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
+var CONST = __webpack_require__(17);
var FileTypesManager = __webpack_require__(8);
-var JSONFile = __webpack_require__(58);
+var JSONFile = __webpack_require__(59);
/**
* @classdesc
@@ -158551,7 +160133,7 @@ module.exports = PackFile;
/***/ }),
-/* 1197 */
+/* 1201 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -158561,8 +160143,8 @@ module.exports = PackFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -158763,7 +160345,7 @@ module.exports = PluginFile;
/***/ }),
-/* 1198 */
+/* 1202 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -158773,8 +160355,8 @@ module.exports = PluginFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -158981,7 +160563,7 @@ module.exports = SceneFile;
/***/ }),
-/* 1199 */
+/* 1203 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -158991,8 +160573,8 @@ module.exports = SceneFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -159187,7 +160769,7 @@ module.exports = ScenePluginFile;
/***/ }),
-/* 1200 */
+/* 1204 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -159198,7 +160780,7 @@ module.exports = ScenePluginFile;
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
-var ImageFile = __webpack_require__(70);
+var ImageFile = __webpack_require__(71);
/**
* @classdesc
@@ -159378,7 +160960,7 @@ module.exports = SpriteSheetFile;
/***/ }),
-/* 1201 */
+/* 1205 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -159388,8 +160970,8 @@ module.exports = SpriteSheetFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
@@ -159717,7 +161299,7 @@ module.exports = SVGFile;
/***/ }),
-/* 1202 */
+/* 1206 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -159727,12 +161309,12 @@ module.exports = SVGFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var File = __webpack_require__(20);
+var CONST = __webpack_require__(17);
+var File = __webpack_require__(21);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
var IsPlainObject = __webpack_require__(7);
-var TILEMAP_FORMATS = __webpack_require__(31);
+var TILEMAP_FORMATS = __webpack_require__(30);
/**
* @classdesc
@@ -159912,7 +161494,7 @@ module.exports = TilemapCSVFile;
/***/ }),
-/* 1203 */
+/* 1207 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -159923,8 +161505,8 @@ module.exports = TilemapCSVFile;
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
-var JSONFile = __webpack_require__(58);
-var TILEMAP_FORMATS = __webpack_require__(31);
+var JSONFile = __webpack_require__(59);
+var TILEMAP_FORMATS = __webpack_require__(30);
/**
* @classdesc
@@ -160068,7 +161650,7 @@ module.exports = TilemapImpactFile;
/***/ }),
-/* 1204 */
+/* 1208 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -160079,8 +161661,8 @@ module.exports = TilemapImpactFile;
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
-var JSONFile = __webpack_require__(58);
-var TILEMAP_FORMATS = __webpack_require__(31);
+var JSONFile = __webpack_require__(59);
+var TILEMAP_FORMATS = __webpack_require__(30);
/**
* @classdesc
@@ -160224,7 +161806,7 @@ module.exports = TilemapJSONFile;
/***/ }),
-/* 1205 */
+/* 1209 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -160236,10 +161818,10 @@ module.exports = TilemapJSONFile;
var Class = __webpack_require__(0);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
-var ImageFile = __webpack_require__(70);
+var ImageFile = __webpack_require__(71);
var IsPlainObject = __webpack_require__(7);
-var MultiFile = __webpack_require__(59);
-var TextFile = __webpack_require__(432);
+var MultiFile = __webpack_require__(60);
+var TextFile = __webpack_require__(435);
/**
* @classdesc
@@ -160466,7 +162048,7 @@ module.exports = UnityAtlasFile;
/***/ }),
-/* 1206 */
+/* 1210 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -160476,15 +162058,15 @@ module.exports = UnityAtlasFile;
*/
var Class = __webpack_require__(0);
-var CONST = __webpack_require__(16);
-var CustomSet = __webpack_require__(105);
-var EventEmitter = __webpack_require__(11);
-var Events = __webpack_require__(80);
+var CONST = __webpack_require__(17);
+var CustomSet = __webpack_require__(106);
+var EventEmitter = __webpack_require__(10);
+var Events = __webpack_require__(81);
var FileTypesManager = __webpack_require__(8);
var GetFastValue = __webpack_require__(2);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
-var XHRSettings = __webpack_require__(133);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
+var XHRSettings = __webpack_require__(134);
/**
* @classdesc
@@ -161533,7 +163115,7 @@ module.exports = LoaderPlugin;
/***/ }),
-/* 1207 */
+/* 1211 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -161542,8 +163124,8 @@ module.exports = LoaderPlugin;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(50);
-var Extend = __webpack_require__(17);
+var CONST = __webpack_require__(51);
+var Extend = __webpack_require__(15);
/**
* @callback ArcadePhysicsCallback
@@ -161558,18 +163140,18 @@ var Extend = __webpack_require__(17);
var Arcade = {
- ArcadePhysics: __webpack_require__(1208),
- Body: __webpack_require__(438),
- Collider: __webpack_require__(439),
- Components: __webpack_require__(207),
- Events: __webpack_require__(208),
- Factory: __webpack_require__(433),
- Group: __webpack_require__(435),
- Image: __webpack_require__(434),
- Sprite: __webpack_require__(134),
- StaticBody: __webpack_require__(445),
- StaticGroup: __webpack_require__(436),
- World: __webpack_require__(437)
+ ArcadePhysics: __webpack_require__(1212),
+ Body: __webpack_require__(441),
+ Collider: __webpack_require__(442),
+ Components: __webpack_require__(209),
+ Events: __webpack_require__(210),
+ Factory: __webpack_require__(436),
+ Group: __webpack_require__(438),
+ Image: __webpack_require__(437),
+ Sprite: __webpack_require__(135),
+ StaticBody: __webpack_require__(448),
+ StaticGroup: __webpack_require__(439),
+ World: __webpack_require__(440)
};
@@ -161580,7 +163162,7 @@ module.exports = Arcade;
/***/ }),
-/* 1208 */
+/* 1212 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -161591,16 +163173,16 @@ module.exports = Arcade;
var Class = __webpack_require__(0);
var DegToRad = __webpack_require__(35);
-var DistanceBetween = __webpack_require__(57);
-var DistanceSquared = __webpack_require__(294);
-var Factory = __webpack_require__(433);
+var DistanceBetween = __webpack_require__(58);
+var DistanceSquared = __webpack_require__(297);
+var Factory = __webpack_require__(436);
var GetFastValue = __webpack_require__(2);
-var Merge = __webpack_require__(85);
-var OverlapRect = __webpack_require__(1221);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
-var Vector2 = __webpack_require__(4);
-var World = __webpack_require__(437);
+var Merge = __webpack_require__(105);
+var OverlapRect = __webpack_require__(1225);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
+var Vector2 = __webpack_require__(3);
+var World = __webpack_require__(440);
/**
* @classdesc
@@ -162207,7 +163789,7 @@ module.exports = ArcadePhysics;
/***/ }),
-/* 1209 */
+/* 1213 */
/***/ (function(module, exports) {
/**
@@ -162282,7 +163864,7 @@ module.exports = Acceleration;
/***/ }),
-/* 1210 */
+/* 1214 */
/***/ (function(module, exports) {
/**
@@ -162364,7 +163946,7 @@ module.exports = Angular;
/***/ }),
-/* 1211 */
+/* 1215 */
/***/ (function(module, exports) {
/**
@@ -162463,7 +164045,7 @@ module.exports = Bounce;
/***/ }),
-/* 1212 */
+/* 1216 */
/***/ (function(module, exports) {
/**
@@ -162590,7 +164172,7 @@ module.exports = Debug;
/***/ }),
-/* 1213 */
+/* 1217 */
/***/ (function(module, exports) {
/**
@@ -162723,7 +164305,7 @@ module.exports = Drag;
/***/ }),
-/* 1214 */
+/* 1218 */
/***/ (function(module, exports) {
/**
@@ -162847,7 +164429,7 @@ module.exports = Enable;
/***/ }),
-/* 1215 */
+/* 1219 */
/***/ (function(module, exports) {
/**
@@ -162925,7 +164507,7 @@ module.exports = Friction;
/***/ }),
-/* 1216 */
+/* 1220 */
/***/ (function(module, exports) {
/**
@@ -163003,7 +164585,7 @@ module.exports = Gravity;
/***/ }),
-/* 1217 */
+/* 1221 */
/***/ (function(module, exports) {
/**
@@ -163045,7 +164627,7 @@ module.exports = Immovable;
/***/ }),
-/* 1218 */
+/* 1222 */
/***/ (function(module, exports) {
/**
@@ -163085,7 +164667,7 @@ module.exports = Mass;
/***/ }),
-/* 1219 */
+/* 1223 */
/***/ (function(module, exports) {
/**
@@ -163167,7 +164749,7 @@ module.exports = Size;
/***/ }),
-/* 1220 */
+/* 1224 */
/***/ (function(module, exports) {
/**
@@ -163266,7 +164848,7 @@ module.exports = Velocity;
/***/ }),
-/* 1221 */
+/* 1225 */
/***/ (function(module, exports) {
/**
@@ -163351,7 +164933,7 @@ module.exports = OverlapRect;
/***/ }),
-/* 1222 */
+/* 1226 */
/***/ (function(module, exports) {
/**
@@ -163384,7 +164966,7 @@ module.exports = 'collide';
/***/ }),
-/* 1223 */
+/* 1227 */
/***/ (function(module, exports) {
/**
@@ -163417,7 +164999,7 @@ module.exports = 'overlap';
/***/ }),
-/* 1224 */
+/* 1228 */
/***/ (function(module, exports) {
/**
@@ -163440,7 +165022,7 @@ module.exports = 'pause';
/***/ }),
-/* 1225 */
+/* 1229 */
/***/ (function(module, exports) {
/**
@@ -163463,7 +165045,7 @@ module.exports = 'resume';
/***/ }),
-/* 1226 */
+/* 1230 */
/***/ (function(module, exports) {
/**
@@ -163495,7 +165077,7 @@ module.exports = 'tilecollide';
/***/ }),
-/* 1227 */
+/* 1231 */
/***/ (function(module, exports) {
/**
@@ -163527,7 +165109,7 @@ module.exports = 'tileoverlap';
/***/ }),
-/* 1228 */
+/* 1232 */
/***/ (function(module, exports) {
/**
@@ -163559,7 +165141,7 @@ module.exports = 'worldbounds';
/***/ }),
-/* 1229 */
+/* 1233 */
/***/ (function(module, exports) {
/**
@@ -163585,7 +165167,7 @@ module.exports = 'worldstep';
/***/ }),
-/* 1230 */
+/* 1234 */
/***/ (function(module, exports) {
/**
@@ -163626,7 +165208,7 @@ module.exports = ProcessTileCallbacks;
/***/ }),
-/* 1231 */
+/* 1235 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -163635,9 +165217,9 @@ module.exports = ProcessTileCallbacks;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var TileCheckX = __webpack_require__(1232);
-var TileCheckY = __webpack_require__(1234);
-var TileIntersectsBody = __webpack_require__(444);
+var TileCheckX = __webpack_require__(1236);
+var TileCheckY = __webpack_require__(1238);
+var TileIntersectsBody = __webpack_require__(447);
/**
* The core separation function to separate a physics body and a tile.
@@ -163746,7 +165328,7 @@ module.exports = SeparateTile;
/***/ }),
-/* 1232 */
+/* 1236 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -163755,7 +165337,7 @@ module.exports = SeparateTile;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ProcessTileSeparationX = __webpack_require__(1233);
+var ProcessTileSeparationX = __webpack_require__(1237);
/**
* Check the body against the given tile on the X axis.
@@ -163836,7 +165418,7 @@ module.exports = TileCheckX;
/***/ }),
-/* 1233 */
+/* 1237 */
/***/ (function(module, exports) {
/**
@@ -163883,7 +165465,7 @@ module.exports = ProcessTileSeparationX;
/***/ }),
-/* 1234 */
+/* 1238 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -163892,7 +165474,7 @@ module.exports = ProcessTileSeparationX;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ProcessTileSeparationY = __webpack_require__(1235);
+var ProcessTileSeparationY = __webpack_require__(1239);
/**
* Check the body against the given tile on the Y axis.
@@ -163973,7 +165555,7 @@ module.exports = TileCheckY;
/***/ }),
-/* 1235 */
+/* 1239 */
/***/ (function(module, exports) {
/**
@@ -164020,7 +165602,7 @@ module.exports = ProcessTileSeparationY;
/***/ }),
-/* 1236 */
+/* 1240 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -164029,7 +165611,7 @@ module.exports = ProcessTileSeparationY;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetOverlapX = __webpack_require__(440);
+var GetOverlapX = __webpack_require__(443);
/**
* Separates two overlapping bodies on the X-axis (horizontally).
@@ -164111,7 +165693,7 @@ module.exports = SeparateX;
/***/ }),
-/* 1237 */
+/* 1241 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -164120,7 +165702,7 @@ module.exports = SeparateX;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetOverlapY = __webpack_require__(441);
+var GetOverlapY = __webpack_require__(444);
/**
* Separates two overlapping bodies on the Y-axis (vertically).
@@ -164202,17 +165784,17 @@ module.exports = SeparateY;
/***/ }),
-/* 1238 */,
-/* 1239 */,
-/* 1240 */,
-/* 1241 */,
/* 1242 */,
/* 1243 */,
/* 1244 */,
/* 1245 */,
/* 1246 */,
/* 1247 */,
-/* 1248 */
+/* 1248 */,
+/* 1249 */,
+/* 1250 */,
+/* 1251 */,
+/* 1252 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -164227,17 +165809,17 @@ module.exports = SeparateY;
module.exports = {
- BasePlugin: __webpack_require__(449),
- DefaultPlugins: __webpack_require__(171),
- PluginCache: __webpack_require__(18),
- PluginManager: __webpack_require__(342),
- ScenePlugin: __webpack_require__(1249)
+ BasePlugin: __webpack_require__(452),
+ DefaultPlugins: __webpack_require__(172),
+ PluginCache: __webpack_require__(19),
+ PluginManager: __webpack_require__(345),
+ ScenePlugin: __webpack_require__(1253)
};
/***/ }),
-/* 1249 */
+/* 1253 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -164246,9 +165828,9 @@ module.exports = {
* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
*/
-var BasePlugin = __webpack_require__(449);
+var BasePlugin = __webpack_require__(452);
var Class = __webpack_require__(0);
-var SceneEvents = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
/**
* @classdesc
@@ -164326,7 +165908,7 @@ module.exports = ScenePlugin;
/***/ }),
-/* 1250 */
+/* 1254 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -164335,8 +165917,8 @@ module.exports = ScenePlugin;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Extend = __webpack_require__(17);
-var CONST = __webpack_require__(173);
+var Extend = __webpack_require__(15);
+var CONST = __webpack_require__(174);
/**
* @namespace Phaser.Scale
@@ -164364,12 +165946,12 @@ var CONST = __webpack_require__(173);
var Scale = {
- Center: __webpack_require__(331),
- Events: __webpack_require__(89),
- Orientation: __webpack_require__(332),
- ScaleManager: __webpack_require__(343),
- ScaleModes: __webpack_require__(333),
- Zoom: __webpack_require__(334)
+ Center: __webpack_require__(334),
+ Events: __webpack_require__(90),
+ Orientation: __webpack_require__(335),
+ ScaleManager: __webpack_require__(346),
+ ScaleModes: __webpack_require__(336),
+ Zoom: __webpack_require__(337)
};
@@ -164382,7 +165964,7 @@ module.exports = Scale;
/***/ }),
-/* 1251 */
+/* 1255 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -164391,8 +165973,8 @@ module.exports = Scale;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(122);
-var Extend = __webpack_require__(17);
+var CONST = __webpack_require__(123);
+var Extend = __webpack_require__(15);
/**
* @namespace Phaser.Scenes
@@ -164400,11 +165982,11 @@ var Extend = __webpack_require__(17);
var Scene = {
- Events: __webpack_require__(19),
- SceneManager: __webpack_require__(345),
- ScenePlugin: __webpack_require__(1252),
- Settings: __webpack_require__(348),
- Systems: __webpack_require__(176)
+ Events: __webpack_require__(20),
+ SceneManager: __webpack_require__(348),
+ ScenePlugin: __webpack_require__(1256),
+ Settings: __webpack_require__(350),
+ Systems: __webpack_require__(177)
};
@@ -164415,7 +165997,7 @@ module.exports = Scene;
/***/ }),
-/* 1252 */
+/* 1256 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -164424,11 +166006,11 @@ module.exports = Scene;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clamp = __webpack_require__(22);
+var Clamp = __webpack_require__(24);
var Class = __webpack_require__(0);
-var Events = __webpack_require__(19);
+var Events = __webpack_require__(20);
var GetFastValue = __webpack_require__(2);
-var PluginCache = __webpack_require__(18);
+var PluginCache = __webpack_require__(19);
/**
* @classdesc
@@ -165409,7 +166991,7 @@ module.exports = ScenePlugin;
/***/ }),
-/* 1253 */
+/* 1257 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -165424,18 +167006,18 @@ module.exports = ScenePlugin;
module.exports = {
- List: __webpack_require__(125),
- Map: __webpack_require__(157),
- ProcessQueue: __webpack_require__(442),
- RTree: __webpack_require__(443),
- Set: __webpack_require__(105),
- Size: __webpack_require__(344)
+ List: __webpack_require__(126),
+ Map: __webpack_require__(158),
+ ProcessQueue: __webpack_require__(445),
+ RTree: __webpack_require__(446),
+ Set: __webpack_require__(106),
+ Size: __webpack_require__(347)
};
/***/ }),
-/* 1254 */
+/* 1258 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -165444,8 +167026,8 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Extend = __webpack_require__(17);
-var FilterMode = __webpack_require__(1255);
+var Extend = __webpack_require__(15);
+var FilterMode = __webpack_require__(1259);
/**
* @namespace Phaser.Textures
@@ -165471,13 +167053,14 @@ var FilterMode = __webpack_require__(1255);
var Textures = {
- Events: __webpack_require__(118),
+ CanvasTexture: __webpack_require__(352),
+ Events: __webpack_require__(119),
FilterMode: FilterMode,
- Frame: __webpack_require__(91),
- Parsers: __webpack_require__(351),
- Texture: __webpack_require__(177),
- TextureManager: __webpack_require__(349),
- TextureSource: __webpack_require__(350)
+ Frame: __webpack_require__(92),
+ Parsers: __webpack_require__(354),
+ Texture: __webpack_require__(179),
+ TextureManager: __webpack_require__(351),
+ TextureSource: __webpack_require__(353)
};
@@ -165487,7 +167070,7 @@ module.exports = Textures;
/***/ }),
-/* 1255 */
+/* 1259 */
/***/ (function(module, exports) {
/**
@@ -165531,7 +167114,7 @@ module.exports = CONST;
/***/ }),
-/* 1256 */
+/* 1260 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -165546,30 +167129,30 @@ module.exports = CONST;
module.exports = {
- Components: __webpack_require__(136),
- Parsers: __webpack_require__(1286),
+ Components: __webpack_require__(137),
+ Parsers: __webpack_require__(1290),
- Formats: __webpack_require__(31),
- ImageCollection: __webpack_require__(460),
- ParseToTilemap: __webpack_require__(216),
- Tile: __webpack_require__(72),
- Tilemap: __webpack_require__(469),
- TilemapCreator: __webpack_require__(1295),
- TilemapFactory: __webpack_require__(1296),
- Tileset: __webpack_require__(140),
+ Formats: __webpack_require__(30),
+ ImageCollection: __webpack_require__(463),
+ ParseToTilemap: __webpack_require__(218),
+ Tile: __webpack_require__(73),
+ Tilemap: __webpack_require__(472),
+ TilemapCreator: __webpack_require__(1299),
+ TilemapFactory: __webpack_require__(1300),
+ Tileset: __webpack_require__(141),
LayerData: __webpack_require__(102),
MapData: __webpack_require__(103),
- ObjectLayer: __webpack_require__(463),
+ ObjectLayer: __webpack_require__(466),
- DynamicTilemapLayer: __webpack_require__(470),
- StaticTilemapLayer: __webpack_require__(471)
+ DynamicTilemapLayer: __webpack_require__(473),
+ StaticTilemapLayer: __webpack_require__(474)
};
/***/ }),
-/* 1257 */
+/* 1261 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -165578,8 +167161,8 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
-var CalculateFacesWithin = __webpack_require__(51);
+var GetTilesWithin = __webpack_require__(23);
+var CalculateFacesWithin = __webpack_require__(52);
/**
* Copies the tiles in the source rectangular area to a new destination (all specified in tile
@@ -165634,7 +167217,7 @@ module.exports = Copy;
/***/ }),
-/* 1258 */
+/* 1262 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -165643,10 +167226,10 @@ module.exports = Copy;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var TileToWorldX = __webpack_require__(138);
-var TileToWorldY = __webpack_require__(139);
-var GetTilesWithin = __webpack_require__(21);
-var ReplaceByIndex = __webpack_require__(450);
+var TileToWorldX = __webpack_require__(139);
+var TileToWorldY = __webpack_require__(140);
+var GetTilesWithin = __webpack_require__(23);
+var ReplaceByIndex = __webpack_require__(453);
/**
* Creates a Sprite for every object matching the given tile indexes in the layer. You can
@@ -165719,7 +167302,7 @@ module.exports = CreateFromTiles;
/***/ }),
-/* 1259 */
+/* 1263 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -165728,8 +167311,8 @@ module.exports = CreateFromTiles;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SnapFloor = __webpack_require__(90);
-var SnapCeil = __webpack_require__(303);
+var SnapFloor = __webpack_require__(91);
+var SnapCeil = __webpack_require__(306);
/**
* Returns the tiles in the given layer that are within the camera's viewport. This is used internally.
@@ -165876,7 +167459,7 @@ module.exports = CullTiles;
/***/ }),
-/* 1260 */
+/* 1264 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -165885,9 +167468,9 @@ module.exports = CullTiles;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
-var CalculateFacesWithin = __webpack_require__(51);
-var SetTileCollision = __webpack_require__(71);
+var GetTilesWithin = __webpack_require__(23);
+var CalculateFacesWithin = __webpack_require__(52);
+var SetTileCollision = __webpack_require__(72);
/**
* Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the
@@ -165930,7 +167513,7 @@ module.exports = Fill;
/***/ }),
-/* 1261 */
+/* 1265 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -165939,7 +167522,7 @@ module.exports = Fill;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
+var GetTilesWithin = __webpack_require__(23);
/**
* For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
@@ -165978,7 +167561,7 @@ module.exports = FilterTiles;
/***/ }),
-/* 1262 */
+/* 1266 */
/***/ (function(module, exports) {
/**
@@ -166066,7 +167649,7 @@ module.exports = FindByIndex;
/***/ }),
-/* 1263 */
+/* 1267 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166075,7 +167658,7 @@ module.exports = FindByIndex;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
+var GetTilesWithin = __webpack_require__(23);
/**
* @callback FindTileCallback
@@ -166120,7 +167703,7 @@ module.exports = FindTile;
/***/ }),
-/* 1264 */
+/* 1268 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166129,7 +167712,7 @@ module.exports = FindTile;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
+var GetTilesWithin = __webpack_require__(23);
/**
* @callback EachTileCallback
@@ -166170,7 +167753,7 @@ module.exports = ForEachTile;
/***/ }),
-/* 1265 */
+/* 1269 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166179,9 +167762,9 @@ module.exports = ForEachTile;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTileAt = __webpack_require__(137);
-var WorldToTileX = __webpack_require__(61);
-var WorldToTileY = __webpack_require__(62);
+var GetTileAt = __webpack_require__(138);
+var WorldToTileX = __webpack_require__(62);
+var WorldToTileY = __webpack_require__(63);
/**
* Gets a tile at the given world coordinates from the given layer.
@@ -166211,7 +167794,7 @@ module.exports = GetTileAtWorldXY;
/***/ }),
-/* 1266 */
+/* 1270 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166220,14 +167803,14 @@ module.exports = GetTileAtWorldXY;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Geom = __webpack_require__(401);
-var GetTilesWithin = __webpack_require__(21);
-var Intersects = __webpack_require__(402);
+var Geom = __webpack_require__(404);
+var GetTilesWithin = __webpack_require__(23);
+var Intersects = __webpack_require__(405);
var NOOP = __webpack_require__(1);
-var TileToWorldX = __webpack_require__(138);
-var TileToWorldY = __webpack_require__(139);
-var WorldToTileX = __webpack_require__(61);
-var WorldToTileY = __webpack_require__(62);
+var TileToWorldX = __webpack_require__(139);
+var TileToWorldY = __webpack_require__(140);
+var WorldToTileX = __webpack_require__(62);
+var WorldToTileY = __webpack_require__(63);
var TriangleToRectangle = function (triangle, rect)
{
@@ -166308,7 +167891,7 @@ module.exports = GetTilesWithinShape;
/***/ }),
-/* 1267 */
+/* 1271 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166317,9 +167900,9 @@ module.exports = GetTilesWithinShape;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
-var WorldToTileX = __webpack_require__(61);
-var WorldToTileY = __webpack_require__(62);
+var GetTilesWithin = __webpack_require__(23);
+var WorldToTileX = __webpack_require__(62);
+var WorldToTileY = __webpack_require__(63);
/**
* Gets the tiles in the given rectangular area (in world coordinates) of the layer.
@@ -166358,7 +167941,7 @@ module.exports = GetTilesWithinWorldXY;
/***/ }),
-/* 1268 */
+/* 1272 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166367,9 +167950,9 @@ module.exports = GetTilesWithinWorldXY;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var HasTileAt = __webpack_require__(451);
-var WorldToTileX = __webpack_require__(61);
-var WorldToTileY = __webpack_require__(62);
+var HasTileAt = __webpack_require__(454);
+var WorldToTileX = __webpack_require__(62);
+var WorldToTileY = __webpack_require__(63);
/**
* Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns
@@ -166398,7 +167981,7 @@ module.exports = HasTileAtWorldXY;
/***/ }),
-/* 1269 */
+/* 1273 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166407,9 +167990,9 @@ module.exports = HasTileAtWorldXY;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var PutTileAt = __webpack_require__(211);
-var WorldToTileX = __webpack_require__(61);
-var WorldToTileY = __webpack_require__(62);
+var PutTileAt = __webpack_require__(213);
+var WorldToTileX = __webpack_require__(62);
+var WorldToTileY = __webpack_require__(63);
/**
* Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either
@@ -166441,7 +168024,7 @@ module.exports = PutTileAtWorldXY;
/***/ }),
-/* 1270 */
+/* 1274 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166450,8 +168033,8 @@ module.exports = PutTileAtWorldXY;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CalculateFacesWithin = __webpack_require__(51);
-var PutTileAt = __webpack_require__(211);
+var CalculateFacesWithin = __webpack_require__(52);
+var PutTileAt = __webpack_require__(213);
/**
* Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified
@@ -166505,7 +168088,7 @@ module.exports = PutTilesAt;
/***/ }),
-/* 1271 */
+/* 1275 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166514,8 +168097,8 @@ module.exports = PutTilesAt;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
-var GetRandom = __webpack_require__(180);
+var GetTilesWithin = __webpack_require__(23);
+var GetRandom = __webpack_require__(182);
/**
* Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
@@ -166563,7 +168146,7 @@ module.exports = Randomize;
/***/ }),
-/* 1272 */
+/* 1276 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166572,9 +168155,9 @@ module.exports = Randomize;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var RemoveTileAt = __webpack_require__(452);
-var WorldToTileX = __webpack_require__(61);
-var WorldToTileY = __webpack_require__(62);
+var RemoveTileAt = __webpack_require__(455);
+var WorldToTileX = __webpack_require__(62);
+var WorldToTileY = __webpack_require__(63);
/**
* Removes the tile at the given world coordinates in the specified layer and updates the layer's
@@ -166604,7 +168187,7 @@ module.exports = RemoveTileAtWorldXY;
/***/ }),
-/* 1273 */
+/* 1277 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166613,8 +168196,8 @@ module.exports = RemoveTileAtWorldXY;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
-var Color = __webpack_require__(326);
+var GetTilesWithin = __webpack_require__(23);
+var Color = __webpack_require__(329);
var defaultTileColor = new Color(105, 210, 231, 150);
var defaultCollidingTileColor = new Color(243, 134, 48, 200);
@@ -166651,8 +168234,8 @@ var RenderDebug = function (graphics, styleConfig, layer)
var tiles = GetTilesWithin(0, 0, layer.width, layer.height, null, layer);
- graphics.translate(layer.tilemapLayer.x, layer.tilemapLayer.y);
- graphics.scale(layer.tilemapLayer.scaleX, layer.tilemapLayer.scaleY);
+ graphics.translateCanvas(layer.tilemapLayer.x, layer.tilemapLayer.y);
+ graphics.scaleCanvas(layer.tilemapLayer.scaleX, layer.tilemapLayer.scaleY);
for (var i = 0; i < tiles.length; i++)
{
@@ -166693,7 +168276,7 @@ module.exports = RenderDebug;
/***/ }),
-/* 1274 */
+/* 1278 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166702,9 +168285,9 @@ module.exports = RenderDebug;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SetTileCollision = __webpack_require__(71);
-var CalculateFacesWithin = __webpack_require__(51);
-var SetLayerCollisionIndex = __webpack_require__(212);
+var SetTileCollision = __webpack_require__(72);
+var CalculateFacesWithin = __webpack_require__(52);
+var SetLayerCollisionIndex = __webpack_require__(214);
/**
* Sets collision on the given tile or tiles within a layer by index. You can pass in either a
@@ -166756,7 +168339,7 @@ module.exports = SetCollision;
/***/ }),
-/* 1275 */
+/* 1279 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166765,9 +168348,9 @@ module.exports = SetCollision;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SetTileCollision = __webpack_require__(71);
-var CalculateFacesWithin = __webpack_require__(51);
-var SetLayerCollisionIndex = __webpack_require__(212);
+var SetTileCollision = __webpack_require__(72);
+var CalculateFacesWithin = __webpack_require__(52);
+var SetLayerCollisionIndex = __webpack_require__(214);
/**
* Sets collision on a range of tiles in a layer whose index is between the specified `start` and
@@ -166824,7 +168407,7 @@ module.exports = SetCollisionBetween;
/***/ }),
-/* 1276 */
+/* 1280 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166833,9 +168416,9 @@ module.exports = SetCollisionBetween;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SetTileCollision = __webpack_require__(71);
-var CalculateFacesWithin = __webpack_require__(51);
-var SetLayerCollisionIndex = __webpack_require__(212);
+var SetTileCollision = __webpack_require__(72);
+var CalculateFacesWithin = __webpack_require__(52);
+var SetLayerCollisionIndex = __webpack_require__(214);
/**
* Sets collision on all tiles in the given layer, except for tiles that have an index specified in
@@ -166881,7 +168464,7 @@ module.exports = SetCollisionByExclusion;
/***/ }),
-/* 1277 */
+/* 1281 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166890,8 +168473,8 @@ module.exports = SetCollisionByExclusion;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SetTileCollision = __webpack_require__(71);
-var CalculateFacesWithin = __webpack_require__(51);
+var SetTileCollision = __webpack_require__(72);
+var CalculateFacesWithin = __webpack_require__(52);
var HasValue = __webpack_require__(97);
/**
@@ -166956,7 +168539,7 @@ module.exports = SetCollisionByProperty;
/***/ }),
-/* 1278 */
+/* 1282 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -166965,8 +168548,8 @@ module.exports = SetCollisionByProperty;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var SetTileCollision = __webpack_require__(71);
-var CalculateFacesWithin = __webpack_require__(51);
+var SetTileCollision = __webpack_require__(72);
+var CalculateFacesWithin = __webpack_require__(52);
/**
* Sets collision on the tiles within a layer by checking each tile's collision group data
@@ -167016,7 +168599,7 @@ module.exports = SetCollisionFromCollisionGroup;
/***/ }),
-/* 1279 */
+/* 1283 */
/***/ (function(module, exports) {
/**
@@ -167063,7 +168646,7 @@ module.exports = SetTileIndexCallback;
/***/ }),
-/* 1280 */
+/* 1284 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167072,7 +168655,7 @@ module.exports = SetTileIndexCallback;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
+var GetTilesWithin = __webpack_require__(23);
/**
* Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.
@@ -167106,7 +168689,7 @@ module.exports = SetTileLocationCallback;
/***/ }),
-/* 1281 */
+/* 1285 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167115,8 +168698,8 @@ module.exports = SetTileLocationCallback;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
-var ShuffleArray = __webpack_require__(111);
+var GetTilesWithin = __webpack_require__(23);
+var ShuffleArray = __webpack_require__(112);
/**
* Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given
@@ -167151,7 +168734,7 @@ module.exports = Shuffle;
/***/ }),
-/* 1282 */
+/* 1286 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167160,7 +168743,7 @@ module.exports = Shuffle;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
+var GetTilesWithin = __webpack_require__(23);
/**
* Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
@@ -167202,7 +168785,7 @@ module.exports = SwapByIndex;
/***/ }),
-/* 1283 */
+/* 1287 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167211,9 +168794,9 @@ module.exports = SwapByIndex;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var TileToWorldX = __webpack_require__(138);
-var TileToWorldY = __webpack_require__(139);
-var Vector2 = __webpack_require__(4);
+var TileToWorldX = __webpack_require__(139);
+var TileToWorldY = __webpack_require__(140);
+var Vector2 = __webpack_require__(3);
/**
* Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
@@ -167246,7 +168829,7 @@ module.exports = TileToWorldXY;
/***/ }),
-/* 1284 */
+/* 1288 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167255,7 +168838,7 @@ module.exports = TileToWorldXY;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetTilesWithin = __webpack_require__(21);
+var GetTilesWithin = __webpack_require__(23);
/**
* Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
@@ -167326,7 +168909,7 @@ module.exports = WeightedRandomize;
/***/ }),
-/* 1285 */
+/* 1289 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167335,9 +168918,9 @@ module.exports = WeightedRandomize;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var WorldToTileX = __webpack_require__(61);
-var WorldToTileY = __webpack_require__(62);
-var Vector2 = __webpack_require__(4);
+var WorldToTileX = __webpack_require__(62);
+var WorldToTileY = __webpack_require__(63);
+var Vector2 = __webpack_require__(3);
/**
* Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the
@@ -167371,7 +168954,7 @@ module.exports = WorldToTileXY;
/***/ }),
-/* 1286 */
+/* 1290 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167386,18 +168969,18 @@ module.exports = WorldToTileXY;
module.exports = {
- Parse: __webpack_require__(453),
- Parse2DArray: __webpack_require__(213),
- ParseCSV: __webpack_require__(454),
+ Parse: __webpack_require__(456),
+ Parse2DArray: __webpack_require__(215),
+ ParseCSV: __webpack_require__(457),
- Impact: __webpack_require__(1287),
- Tiled: __webpack_require__(1288)
+ Impact: __webpack_require__(1291),
+ Tiled: __webpack_require__(1292)
};
/***/ }),
-/* 1287 */
+/* 1291 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167412,15 +168995,15 @@ module.exports = {
module.exports = {
- ParseTileLayers: __webpack_require__(467),
- ParseTilesets: __webpack_require__(468),
- ParseWeltmeister: __webpack_require__(466)
+ ParseTileLayers: __webpack_require__(470),
+ ParseTilesets: __webpack_require__(471),
+ ParseWeltmeister: __webpack_require__(469)
};
/***/ }),
-/* 1288 */
+/* 1292 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167435,22 +169018,22 @@ module.exports = {
module.exports = {
- AssignTileProperties: __webpack_require__(465),
- Base64Decode: __webpack_require__(457),
- BuildTilesetIndex: __webpack_require__(464),
- ParseGID: __webpack_require__(214),
- ParseImageLayers: __webpack_require__(458),
- ParseJSONTiled: __webpack_require__(455),
- ParseObject: __webpack_require__(215),
- ParseObjectLayers: __webpack_require__(462),
- ParseTileLayers: __webpack_require__(456),
- ParseTilesets: __webpack_require__(459)
+ AssignTileProperties: __webpack_require__(468),
+ Base64Decode: __webpack_require__(460),
+ BuildTilesetIndex: __webpack_require__(467),
+ ParseGID: __webpack_require__(216),
+ ParseImageLayers: __webpack_require__(461),
+ ParseJSONTiled: __webpack_require__(458),
+ ParseObject: __webpack_require__(217),
+ ParseObjectLayers: __webpack_require__(465),
+ ParseTileLayers: __webpack_require__(459),
+ ParseTilesets: __webpack_require__(462)
};
/***/ }),
-/* 1289 */
+/* 1293 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167464,12 +169047,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(1290);
+ renderWebGL = __webpack_require__(1294);
}
if (true)
{
- renderCanvas = __webpack_require__(1291);
+ renderCanvas = __webpack_require__(1295);
}
module.exports = {
@@ -167481,7 +169064,7 @@ module.exports = {
/***/ }),
-/* 1290 */
+/* 1294 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167598,7 +169181,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer;
/***/ }),
-/* 1291 */
+/* 1295 */
/***/ (function(module, exports) {
/**
@@ -167725,7 +169308,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer;
/***/ }),
-/* 1292 */
+/* 1296 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167739,12 +169322,12 @@ var renderCanvas = __webpack_require__(1);
if (true)
{
- renderWebGL = __webpack_require__(1293);
+ renderWebGL = __webpack_require__(1297);
}
if (true)
{
- renderCanvas = __webpack_require__(1294);
+ renderCanvas = __webpack_require__(1298);
}
module.exports = {
@@ -167756,7 +169339,7 @@ module.exports = {
/***/ }),
-/* 1293 */
+/* 1297 */
/***/ (function(module, exports) {
/**
@@ -167828,7 +169411,7 @@ module.exports = StaticTilemapLayerWebGLRenderer;
/***/ }),
-/* 1294 */
+/* 1298 */
/***/ (function(module, exports) {
/**
@@ -167959,7 +169542,7 @@ module.exports = StaticTilemapLayerCanvasRenderer;
/***/ }),
-/* 1295 */
+/* 1299 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -167968,8 +169551,8 @@ module.exports = StaticTilemapLayerCanvasRenderer;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectCreator = __webpack_require__(15);
-var ParseToTilemap = __webpack_require__(216);
+var GameObjectCreator = __webpack_require__(16);
+var ParseToTilemap = __webpack_require__(218);
/**
* Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.
@@ -168003,7 +169586,7 @@ GameObjectCreator.register('tilemap', function (config)
/***/ }),
-/* 1296 */
+/* 1300 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -168012,8 +169595,8 @@ GameObjectCreator.register('tilemap', function (config)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GameObjectFactory = __webpack_require__(5);
-var ParseToTilemap = __webpack_require__(216);
+var GameObjectFactory = __webpack_require__(6);
+var ParseToTilemap = __webpack_require__(218);
/**
* Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.
@@ -168069,7 +169652,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt
/***/ }),
-/* 1297 */
+/* 1301 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -168084,14 +169667,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt
module.exports = {
- Clock: __webpack_require__(1298),
- TimerEvent: __webpack_require__(472)
+ Clock: __webpack_require__(1302),
+ TimerEvent: __webpack_require__(475)
};
/***/ }),
-/* 1298 */
+/* 1302 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -168101,9 +169684,9 @@ module.exports = {
*/
var Class = __webpack_require__(0);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
-var TimerEvent = __webpack_require__(472);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
+var TimerEvent = __webpack_require__(475);
/**
* @classdesc
@@ -168497,7 +170080,7 @@ module.exports = Clock;
/***/ }),
-/* 1299 */
+/* 1303 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -168506,8 +170089,8 @@ module.exports = Clock;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var CONST = __webpack_require__(88);
-var Extend = __webpack_require__(17);
+var CONST = __webpack_require__(89);
+var Extend = __webpack_require__(15);
/**
* @namespace Phaser.Tweens
@@ -168515,13 +170098,13 @@ var Extend = __webpack_require__(17);
var Tweens = {
- Builders: __webpack_require__(1300),
- Events: __webpack_require__(478),
+ Builders: __webpack_require__(1304),
+ Events: __webpack_require__(223),
- TweenManager: __webpack_require__(1308),
- Tween: __webpack_require__(220),
- TweenData: __webpack_require__(221),
- Timeline: __webpack_require__(477)
+ TweenManager: __webpack_require__(1319),
+ Tween: __webpack_require__(222),
+ TweenData: __webpack_require__(224),
+ Timeline: __webpack_require__(480)
};
@@ -168532,7 +170115,7 @@ module.exports = Tweens;
/***/ }),
-/* 1300 */
+/* 1304 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -168547,22 +170130,22 @@ module.exports = Tweens;
module.exports = {
- GetBoolean: __webpack_require__(87),
- GetEaseFunction: __webpack_require__(96),
- GetNewValue: __webpack_require__(141),
- GetProps: __webpack_require__(473),
- GetTargets: __webpack_require__(217),
- GetTweens: __webpack_require__(474),
- GetValueOp: __webpack_require__(218),
- NumberTweenBuilder: __webpack_require__(475),
- TimelineBuilder: __webpack_require__(476),
- TweenBuilder: __webpack_require__(142)
+ GetBoolean: __webpack_require__(88),
+ GetEaseFunction: __webpack_require__(82),
+ GetNewValue: __webpack_require__(142),
+ GetProps: __webpack_require__(476),
+ GetTargets: __webpack_require__(219),
+ GetTweens: __webpack_require__(477),
+ GetValueOp: __webpack_require__(220),
+ NumberTweenBuilder: __webpack_require__(478),
+ TimelineBuilder: __webpack_require__(479),
+ TweenBuilder: __webpack_require__(143)
};
/***/ }),
-/* 1301 */
+/* 1305 */
/***/ (function(module, exports) {
/**
@@ -168605,6 +170188,9 @@ module.exports = [
'loop',
'loopDelay',
'offset',
+ 'onActive',
+ 'onActiveParams',
+ 'onActiveScope',
'onComplete',
'onCompleteParams',
'onCompleteScope',
@@ -168634,7 +170220,7 @@ module.exports = [
/***/ }),
-/* 1302 */
+/* 1306 */
/***/ (function(module, exports) {
/**
@@ -168670,7 +170256,7 @@ module.exports = 'complete';
/***/ }),
-/* 1303 */
+/* 1307 */
/***/ (function(module, exports) {
/**
@@ -168702,13 +170288,12 @@ module.exports = 'complete';
* @since 3.0.0
*
* @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.
- * @param {integer} loopCount - The number of loops left before this Timeline completes.
*/
module.exports = 'loop';
/***/ }),
-/* 1304 */
+/* 1308 */
/***/ (function(module, exports) {
/**
@@ -168745,7 +170330,7 @@ module.exports = 'pause';
/***/ }),
-/* 1305 */
+/* 1309 */
/***/ (function(module, exports) {
/**
@@ -168782,7 +170367,7 @@ module.exports = 'resume';
/***/ }),
-/* 1306 */
+/* 1310 */
/***/ (function(module, exports) {
/**
@@ -168818,7 +170403,7 @@ module.exports = 'start';
/***/ }),
-/* 1307 */
+/* 1311 */
/***/ (function(module, exports) {
/**
@@ -168855,7 +170440,304 @@ module.exports = 'update';
/***/ }),
-/* 1308 */
+/* 1312 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Tween Active Event.
+ *
+ * This event is dispatched by a Tween when it becomes active within the Tween Manager.
+ *
+ * An 'active' Tween is one that is now progressing, although it may not yet be updating
+ * any target properties, due to settings such as `delay`. If you need an event for when
+ * the Tween starts actually updating its first property, see `TWEEN_START`.
+ *
+ * Listen to it from a Tween instance using `Tween.on('active', listener)`, i.e.:
+ *
+ * ```javascript
+ * var tween = this.tweens.add({
+ * targets: image,
+ * x: 500,
+ * ease: 'Power1',
+ * duration: 3000
+ * });
+ * tween.on('active', listener);
+ * ```
+ *
+ * @event Phaser.Tweens.Events#TWEEN_ACTIVE
+ * @since 3.19.0
+ *
+ * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.
+ * @param {any[]} targets - An array of references to the target/s the Tween is operating on.
+ */
+module.exports = 'active';
+
+
+/***/ }),
+/* 1313 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Tween Complete Event.
+ *
+ * This event is dispatched by a Tween when it completes playback entirely, factoring in repeats and loops.
+ *
+ * If the Tween has been set to loop or repeat infinitely, this event will not be dispatched
+ * unless the `Tween.stop` method is called.
+ *
+ * If a Tween has a `completeDelay` set, this event will fire after that delay expires.
+ *
+ * Listen to it from a Tween instance using `Tween.on('complete', listener)`, i.e.:
+ *
+ * ```javascript
+ * var tween = this.tweens.add({
+ * targets: image,
+ * x: 500,
+ * ease: 'Power1',
+ * duration: 3000
+ * });
+ * tween.on('complete', listener);
+ * ```
+ *
+ * @event Phaser.Tweens.Events#TWEEN_COMPLETE
+ * @since 3.19.0
+ *
+ * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.
+ * @param {any[]} targets - An array of references to the target/s the Tween is operating on.
+ */
+module.exports = 'complete';
+
+
+/***/ }),
+/* 1314 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Tween Loop Event.
+ *
+ * This event is dispatched by a Tween when it loops.
+ *
+ * This event will only be dispatched if the Tween has a loop count set.
+ *
+ * If a Tween has a `loopDelay` set, this event will fire after that delay expires.
+ *
+ * The difference between `loop` and `repeat` is that `repeat` is a property setting,
+ * where-as `loop` applies to the entire Tween.
+ *
+ * Listen to it from a Tween instance using `Tween.on('loop', listener)`, i.e.:
+ *
+ * ```javascript
+ * var tween = this.tweens.add({
+ * targets: image,
+ * x: 500,
+ * ease: 'Power1',
+ * duration: 3000,
+ * loop: 6
+ * });
+ * tween.on('loop', listener);
+ * ```
+ *
+ * @event Phaser.Tweens.Events#TWEEN_LOOP
+ * @since 3.19.0
+ *
+ * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.
+ * @param {any[]} targets - An array of references to the target/s the Tween is operating on.
+ */
+module.exports = 'loop';
+
+
+/***/ }),
+/* 1315 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Tween Repeat Event.
+ *
+ * This event is dispatched by a Tween when one of the properties it is tweening repeats.
+ *
+ * This event will only be dispatched if the Tween has a property with a repeat count set.
+ *
+ * If a Tween has a `repeatDelay` set, this event will fire after that delay expires.
+ *
+ * The difference between `loop` and `repeat` is that `repeat` is a property setting,
+ * where-as `loop` applies to the entire Tween.
+ *
+ * Listen to it from a Tween instance using `Tween.on('repeat', listener)`, i.e.:
+ *
+ * ```javascript
+ * var tween = this.tweens.add({
+ * targets: image,
+ * x: 500,
+ * ease: 'Power1',
+ * duration: 3000,
+ * repeat: 4
+ * });
+ * tween.on('repeat', listener);
+ * ```
+ *
+ * @event Phaser.Tweens.Events#TWEEN_REPEAT
+ * @since 3.19.0
+ *
+ * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.
+ * @param {string} key - The key of the property that just repeated.
+ * @param {any} target - The target that the property just repated on.
+ */
+module.exports = 'repeat';
+
+
+/***/ }),
+/* 1316 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Tween Start Event.
+ *
+ * This event is dispatched by a Tween when it starts tweening its first property.
+ *
+ * A Tween will only emit this event once, as it can only start once.
+ *
+ * If a Tween has a `delay` set, this event will fire after that delay expires.
+ *
+ * Listen to it from a Tween instance using `Tween.on('start', listener)`, i.e.:
+ *
+ * ```javascript
+ * var tween = this.tweens.add({
+ * targets: image,
+ * x: 500,
+ * ease: 'Power1',
+ * duration: 3000
+ * });
+ * tween.on('start', listener);
+ * ```
+ *
+ * @event Phaser.Tweens.Events#TWEEN_START
+ * @since 3.19.0
+ *
+ * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.
+ * @param {any[]} targets - An array of references to the target/s the Tween is operating on.
+ */
+module.exports = 'start';
+
+
+/***/ }),
+/* 1317 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Tween Update Event.
+ *
+ * This event is dispatched by a Tween every time it updates _any_ of the properties it is tweening.
+ *
+ * A Tween that is changing 3 properties of a target will emit this event 3 times per change, once per property.
+ *
+ * **Note:** This is a very high frequency event and may be dispatched multiple times, every single frame.
+ *
+ * Listen to it from a Tween instance using `Tween.on('update', listener)`, i.e.:
+ *
+ * ```javascript
+ * var tween = this.tweens.add({
+ * targets: image,
+ * x: 500,
+ * ease: 'Power1',
+ * duration: 3000,
+ * });
+ * tween.on('update', listener);
+ * ```
+ *
+ * @event Phaser.Tweens.Events#TWEEN_UPDATE
+ * @since 3.19.0
+ *
+ * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.
+ * @param {string} key - The property that was updated, i.e. `x` or `scale`.
+ * @param {any} target - The target object that was updated. Usually a Game Object, but can be of any type.
+ */
+module.exports = 'update';
+
+
+/***/ }),
+/* 1318 */
+/***/ (function(module, exports) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+/**
+ * The Tween Yoyo Event.
+ *
+ * This event is dispatched by a Tween whenever a property it is tweening yoyos.
+ *
+ * This event will only be dispatched if the Tween has a property with `yoyo` set.
+ *
+ * If the Tween has a `hold` value, this event is dispatched when the hold expires.
+ *
+ * This event is dispatched for every property, and for every target, that yoyos.
+ * For example, if a Tween was updating 2 properties and had 10 targets, this event
+ * would be dispatched 20 times (twice per target). So be careful how you use it!
+ *
+ * Listen to it from a Tween instance using `Tween.on('yoyo', listener)`, i.e.:
+ *
+ * ```javascript
+ * var tween = this.tweens.add({
+ * targets: image,
+ * x: 500,
+ * ease: 'Power1',
+ * duration: 3000,
+ * yoyo: true
+ * });
+ * tween.on('yoyo', listener);
+ * ```
+ *
+ * @event Phaser.Tweens.Events#TWEEN_YOYO
+ * @since 3.19.0
+ *
+ * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.
+ * @param {string} key - The property that yoyo'd, i.e. `x` or `scale`.
+ * @param {any} target - The target object that was yoyo'd. Usually a Game Object, but can be of any type.
+ */
+module.exports = 'yoyo';
+
+
+/***/ }),
+/* 1319 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -168864,14 +170746,15 @@ module.exports = 'update';
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var ArrayRemove = __webpack_require__(120);
+var ArrayRemove = __webpack_require__(121);
var Class = __webpack_require__(0);
-var NumberTweenBuilder = __webpack_require__(475);
-var PluginCache = __webpack_require__(18);
-var SceneEvents = __webpack_require__(19);
-var TimelineBuilder = __webpack_require__(476);
-var TWEEN_CONST = __webpack_require__(88);
-var TweenBuilder = __webpack_require__(142);
+var NumberTweenBuilder = __webpack_require__(478);
+var PluginCache = __webpack_require__(19);
+var SceneEvents = __webpack_require__(20);
+var StaggerBuilder = __webpack_require__(1320);
+var TimelineBuilder = __webpack_require__(479);
+var TWEEN_CONST = __webpack_require__(89);
+var TweenBuilder = __webpack_require__(143);
/**
* @classdesc
@@ -169123,6 +171006,51 @@ var TweenManager = new Class({
return tween;
},
+ /**
+ * Creates a Stagger function to be used by a Tween property.
+ *
+ * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.
+ *
+ * This is only worth using if the tween has multiple targets.
+ *
+ * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2
+ * over the duration specified:
+ *
+ * ```javascript
+ * this.tweens.add({
+ * targets: [ ... ],
+ * scale: 0.2,
+ * ease: 'linear',
+ * duration: 1000,
+ * delay: this.tweens.stagger(100)
+ * });
+ * ```
+ *
+ * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering
+ * from the center out, using a cubic ease.
+ *
+ * ```javascript
+ * this.tweens.add({
+ * targets: [ ... ],
+ * scale: 0.2,
+ * ease: 'linear',
+ * duration: 1000,
+ * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })
+ * });
+ * ```
+ *
+ * @method Phaser.Tweens.TweenManager#stagger
+ * @since 3.19.0
+ *
+ * @param {Phaser.Types.Tweens.StaggerConfig} config - The configuration object for the Stagger function.
+ *
+ * @return {function} The stagger function.
+ */
+ stagger: function (value, options)
+ {
+ return StaggerBuilder(value, options);
+ },
+
/**
* Updates the Tween Manager's internal lists at the start of the frame.
*
@@ -169580,7 +171508,252 @@ module.exports = TweenManager;
/***/ }),
-/* 1309 */
+/* 1320 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @author Richard Davey
+ * @copyright 2019 Photon Storm Ltd.
+ * @license {@link https://opensource.org/licenses/MIT|MIT License}
+ */
+
+var GetEaseFunction = __webpack_require__(82);
+var GetValue = __webpack_require__(5);
+
+/**
+ * Creates a Stagger function to be used by a Tween property.
+ *
+ * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.
+ *
+ * This is only worth using if the tween has multiple targets.
+ *
+ * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2
+ * over the duration specified:
+ *
+ * ```javascript
+ * this.tweens.add({
+ * targets: [ ... ],
+ * scale: 0.2,
+ * ease: 'linear',
+ * duration: 1000,
+ * delay: this.tweens.stagger(100)
+ * });
+ * ```
+ *
+ * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering
+ * from the center out, using a cubic ease.
+ *
+ * ```javascript
+ * this.tweens.add({
+ * targets: [ ... ],
+ * scale: 0.2,
+ * ease: 'linear',
+ * duration: 1000,
+ * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })
+ * });
+ * ```
+ *
+ * @function Phaser.Tweens.Builders.StaggerBuilder
+ * @since 3.19.0
+ *
+ * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between.
+ * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object.
+ *
+ * @return {function} The stagger function.
+ */
+var StaggerBuilder = function (value, options)
+{
+ if (options === undefined) { options = {}; }
+
+ var result;
+
+ var start = GetValue(options, 'start', 0);
+ var ease = GetValue(options, 'ease', null);
+ var grid = GetValue(options, 'grid', null);
+
+ var from = GetValue(options, 'from', 0);
+
+ var fromFirst = (from === 'first');
+ var fromCenter = (from === 'center');
+ var fromLast = (from === 'last');
+ var fromValue = (typeof(from) === 'number');
+
+ var isRange = (Array.isArray(value));
+ var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value);
+ var value2 = (isRange) ? parseFloat(value[1]) : 0;
+ var maxValue = Math.max(value1, value2);
+
+ if (isRange)
+ {
+ start += value1;
+ }
+
+ if (grid)
+ {
+ // Pre-calc the grid to save doing it for ever tweendata update
+ var gridWidth = grid[0];
+ var gridHeight = grid[1];
+
+ var fromX = 0;
+ var fromY = 0;
+
+ var distanceX = 0;
+ var distanceY = 0;
+
+ var gridValues = [];
+
+ if (fromLast)
+ {
+ fromX = gridWidth - 1;
+ fromY = gridHeight - 1;
+ }
+ else if (fromValue)
+ {
+ fromX = from % gridWidth;
+ fromY = Math.floor(from / gridWidth);
+ }
+ else if (fromCenter)
+ {
+ fromX = (gridWidth - 1) / 2;
+ fromY = (gridHeight - 1) / 2;
+ }
+
+ var gridMax = Number.MIN_SAFE_INTEGER;
+
+ for (var toY = 0; toY < gridHeight; toY++)
+ {
+ gridValues[toY] = [];
+
+ for (var toX = 0; toX < gridWidth; toX++)
+ {
+ distanceX = fromX - toX;
+ distanceY = fromY - toY;
+
+ var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY);
+
+ if (dist > gridMax)
+ {
+ gridMax = dist;
+ }
+
+ gridValues[toY][toX] = dist;
+ }
+ }
+ }
+
+ var easeFunction = (ease) ? GetEaseFunction(ease) : null;
+
+ if (grid)
+ {
+ result = function (target, key, value, index)
+ {
+ var gridSpace = 0;
+ var toX = index % gridWidth;
+ var toY = Math.floor(index / gridWidth);
+
+ if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight)
+ {
+ gridSpace = gridValues[toY][toX];
+ }
+
+ var output;
+
+ if (isRange)
+ {
+ var diff = (value2 - value1);
+
+ if (easeFunction)
+ {
+ output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax);
+ }
+ else
+ {
+ output = (gridSpace / gridMax) * diff;
+ }
+ }
+ else if (easeFunction)
+ {
+ output = (gridSpace * value1) * easeFunction(gridSpace / gridMax);
+ }
+ else
+ {
+ output = gridSpace * value1;
+ }
+
+ return output + start;
+ };
+ }
+ else
+ {
+ result = function (target, key, value, index, total)
+ {
+ // zero offset
+ total--;
+
+ var fromIndex;
+
+ if (fromFirst)
+ {
+ fromIndex = index;
+ }
+ else if (fromCenter)
+ {
+ fromIndex = Math.abs((total / 2) - index);
+ }
+ else if (fromLast)
+ {
+ fromIndex = total - index;
+ }
+ else if (fromValue)
+ {
+ fromIndex = Math.abs(from - index);
+ }
+
+ var output;
+
+ if (isRange)
+ {
+ var spacing;
+
+ if (fromCenter)
+ {
+ spacing = ((value2 - value1) / total) * (fromIndex * 2);
+ }
+ else
+ {
+ spacing = ((value2 - value1) / total) * fromIndex;
+ }
+
+ if (easeFunction)
+ {
+ output = spacing * easeFunction(fromIndex / total);
+ }
+ else
+ {
+ output = spacing;
+ }
+ }
+ else if (easeFunction)
+ {
+ output = (total * maxValue) * easeFunction(fromIndex / total);
+ }
+ else
+ {
+ output = fromIndex * value1;
+ }
+
+ return output + start;
+ };
+ }
+
+ return result;
+};
+
+module.exports = StaggerBuilder;
+
+
+/***/ }),
+/* 1321 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -169595,16 +171768,16 @@ module.exports = TweenManager;
module.exports = {
- Array: __webpack_require__(178),
- Base64: __webpack_require__(1310),
- Objects: __webpack_require__(1312),
- String: __webpack_require__(1316)
+ Array: __webpack_require__(180),
+ Base64: __webpack_require__(1322),
+ Objects: __webpack_require__(1324),
+ String: __webpack_require__(1328)
};
/***/ }),
-/* 1310 */
+/* 1322 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -169619,14 +171792,14 @@ module.exports = {
module.exports = {
- ArrayBufferToBase64: __webpack_require__(1311),
- Base64ToArrayBuffer: __webpack_require__(358)
+ ArrayBufferToBase64: __webpack_require__(1323),
+ Base64ToArrayBuffer: __webpack_require__(361)
};
/***/ }),
-/* 1311 */
+/* 1323 */
/***/ (function(module, exports) {
/**
@@ -169684,7 +171857,7 @@ module.exports = ArrayBufferToBase64;
/***/ }),
-/* 1312 */
+/* 1324 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -169699,26 +171872,26 @@ module.exports = ArrayBufferToBase64;
module.exports = {
- Clone: __webpack_require__(64),
- Extend: __webpack_require__(17),
+ Clone: __webpack_require__(65),
+ Extend: __webpack_require__(15),
GetAdvancedValue: __webpack_require__(14),
GetFastValue: __webpack_require__(2),
- GetMinMaxValue: __webpack_require__(1313),
- GetValue: __webpack_require__(6),
- HasAll: __webpack_require__(1314),
- HasAny: __webpack_require__(377),
+ GetMinMaxValue: __webpack_require__(1325),
+ GetValue: __webpack_require__(5),
+ HasAll: __webpack_require__(1326),
+ HasAny: __webpack_require__(380),
HasValue: __webpack_require__(97),
IsPlainObject: __webpack_require__(7),
- Merge: __webpack_require__(85),
- MergeRight: __webpack_require__(1315),
- Pick: __webpack_require__(461),
- SetValue: __webpack_require__(398)
+ Merge: __webpack_require__(105),
+ MergeRight: __webpack_require__(1327),
+ Pick: __webpack_require__(464),
+ SetValue: __webpack_require__(401)
};
/***/ }),
-/* 1313 */
+/* 1325 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -169727,8 +171900,8 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var GetValue = __webpack_require__(6);
-var Clamp = __webpack_require__(22);
+var GetValue = __webpack_require__(5);
+var Clamp = __webpack_require__(24);
/**
* Retrieves and clamps a numerical value from an object.
@@ -169757,7 +171930,7 @@ module.exports = GetMinMaxValue;
/***/ }),
-/* 1314 */
+/* 1326 */
/***/ (function(module, exports) {
/**
@@ -169794,7 +171967,7 @@ module.exports = HasAll;
/***/ }),
-/* 1315 */
+/* 1327 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -169803,7 +171976,7 @@ module.exports = HasAll;
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-var Clone = __webpack_require__(64);
+var Clone = __webpack_require__(65);
/**
* Creates a new Object using all values from obj1.
@@ -169837,7 +172010,7 @@ module.exports = MergeRight;
/***/ }),
-/* 1316 */
+/* 1328 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -169852,17 +172025,17 @@ module.exports = MergeRight;
module.exports = {
- Format: __webpack_require__(1317),
- Pad: __webpack_require__(158),
- Reverse: __webpack_require__(1318),
- UppercaseFirst: __webpack_require__(347),
- UUID: __webpack_require__(380)
+ Format: __webpack_require__(1329),
+ Pad: __webpack_require__(159),
+ Reverse: __webpack_require__(1330),
+ UppercaseFirst: __webpack_require__(178),
+ UUID: __webpack_require__(383)
};
/***/ }),
-/* 1317 */
+/* 1329 */
/***/ (function(module, exports) {
/**
@@ -169897,7 +172070,7 @@ module.exports = Format;
/***/ }),
-/* 1318 */
+/* 1330 */
/***/ (function(module, exports) {
/**
@@ -169926,7 +172099,7 @@ module.exports = Reverse;
/***/ }),
-/* 1319 */
+/* 1331 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -169942,38 +172115,26 @@ module.exports = Reverse;
module.exports = {
- SoundManagerCreator: __webpack_require__(352),
+ SoundManagerCreator: __webpack_require__(355),
- Events: __webpack_require__(65),
+ Events: __webpack_require__(66),
- BaseSound: __webpack_require__(124),
- BaseSoundManager: __webpack_require__(123),
+ BaseSound: __webpack_require__(125),
+ BaseSoundManager: __webpack_require__(124),
- WebAudioSound: __webpack_require__(359),
- WebAudioSoundManager: __webpack_require__(357),
+ WebAudioSound: __webpack_require__(362),
+ WebAudioSoundManager: __webpack_require__(360),
- HTML5AudioSound: __webpack_require__(354),
- HTML5AudioSoundManager: __webpack_require__(353),
+ HTML5AudioSound: __webpack_require__(357),
+ HTML5AudioSoundManager: __webpack_require__(356),
- NoAudioSound: __webpack_require__(356),
- NoAudioSoundManager: __webpack_require__(355)
+ NoAudioSound: __webpack_require__(359),
+ NoAudioSoundManager: __webpack_require__(358)
};
/***/ }),
-/* 1320 */,
-/* 1321 */,
-/* 1322 */,
-/* 1323 */,
-/* 1324 */,
-/* 1325 */,
-/* 1326 */,
-/* 1327 */,
-/* 1328 */,
-/* 1329 */,
-/* 1330 */,
-/* 1331 */,
/* 1332 */,
/* 1333 */,
/* 1334 */,
@@ -170044,7 +172205,19 @@ module.exports = {
/* 1399 */,
/* 1400 */,
/* 1401 */,
-/* 1402 */
+/* 1402 */,
+/* 1403 */,
+/* 1404 */,
+/* 1405 */,
+/* 1406 */,
+/* 1407 */,
+/* 1408 */,
+/* 1409 */,
+/* 1410 */,
+/* 1411 */,
+/* 1412 */,
+/* 1413 */,
+/* 1414 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/**
@@ -170053,10 +172226,10 @@ module.exports = {
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
-__webpack_require__(490);
+__webpack_require__(492);
-var CONST = __webpack_require__(26);
-var Extend = __webpack_require__(17);
+var CONST = __webpack_require__(31);
+var Extend = __webpack_require__(15);
/**
* @namespace Phaser
@@ -170071,37 +172244,37 @@ var Extend = __webpack_require__(17);
var Phaser = {
- Actions: __webpack_require__(229),
- Animations: __webpack_require__(579),
- Cache: __webpack_require__(594),
- Cameras: __webpack_require__(597),
- Core: __webpack_require__(680),
+ Actions: __webpack_require__(232),
+ Animations: __webpack_require__(597),
+ Cache: __webpack_require__(598),
+ Cameras: __webpack_require__(601),
+ Core: __webpack_require__(684),
Class: __webpack_require__(0),
- Create: __webpack_require__(737),
- Curves: __webpack_require__(743),
- Data: __webpack_require__(746),
- Display: __webpack_require__(748),
- DOM: __webpack_require__(777),
- Events: __webpack_require__(778),
- Game: __webpack_require__(780),
- GameObjects: __webpack_require__(874),
- Geom: __webpack_require__(401),
- Input: __webpack_require__(1148),
- Loader: __webpack_require__(1182),
- Math: __webpack_require__(165),
+ Create: __webpack_require__(742),
+ Curves: __webpack_require__(748),
+ Data: __webpack_require__(751),
+ Display: __webpack_require__(753),
+ DOM: __webpack_require__(782),
+ Events: __webpack_require__(783),
+ Game: __webpack_require__(785),
+ GameObjects: __webpack_require__(878),
+ Geom: __webpack_require__(404),
+ Input: __webpack_require__(1152),
+ Loader: __webpack_require__(1186),
+ Math: __webpack_require__(166),
Physics: {
- Arcade: __webpack_require__(1207)
+ Arcade: __webpack_require__(1211)
},
- Plugins: __webpack_require__(1248),
- Scale: __webpack_require__(1250),
- Scene: __webpack_require__(346),
- Scenes: __webpack_require__(1251),
- Structs: __webpack_require__(1253),
- Textures: __webpack_require__(1254),
- Tilemaps: __webpack_require__(1256),
- Time: __webpack_require__(1297),
- Tweens: __webpack_require__(1299),
- Utils: __webpack_require__(1309)
+ Plugins: __webpack_require__(1252),
+ Scale: __webpack_require__(1254),
+ Scene: __webpack_require__(349),
+ Scenes: __webpack_require__(1255),
+ Structs: __webpack_require__(1257),
+ Textures: __webpack_require__(1258),
+ Tilemaps: __webpack_require__(1260),
+ Time: __webpack_require__(1301),
+ Tweens: __webpack_require__(1303),
+ Utils: __webpack_require__(1321)
};
@@ -170111,7 +172284,7 @@ Phaser = Extend(false, Phaser, CONST);
if (true)
{
- Phaser.Sound = __webpack_require__(1319);
+ Phaser.Sound = __webpack_require__(1331);
}
// Export it
@@ -170126,7 +172299,7 @@ global.Phaser = Phaser;
* -- Dick Brandon
*/
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(222)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(225)))
/***/ })
/******/ ]);
diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js
index ed56c74e9..0726e1255 100644
--- a/dist/phaser-arcade-physics.min.js
+++ b/dist/phaser-arcade-physics.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1402)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},function(t,e,i){var n=i(0),s=i(18),r=i(19),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,n||t,r),a=s?s+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function h(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,o=new Array(r);n=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height);var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){t.exports={BLUR:i(580),BOOT:i(581),DESTROY:i(582),FOCUS:i(583),HIDDEN:i(584),PAUSE:i(585),POST_RENDER:i(586),POST_STEP:i(587),PRE_RENDER:i(588),PRE_STEP:i(589),READY:i(590),RESUME:i(591),STEP:i(592),VISIBLE:i(593)}},function(t,e,i){var n=i(52),s=i(14),r=i(104);t.exports=function(t,e,i){e.x=s(i,"x",0),e.y=s(i,"y",0),e.depth=s(i,"depth",0),e.flipX=s(i,"flipX",!1),e.flipY=s(i,"flipY",!1);var o=s(i,"scale",null);"number"==typeof o?e.setScale(o):null!==o&&(e.scaleX=s(o,"x",1),e.scaleY=s(o,"y",1));var a=s(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=s(a,"x",1),e.scrollFactorY=s(a,"y",1)),e.rotation=s(i,"rotation",0);var h=s(i,"angle",null);null!==h&&(e.angle=h),e.alpha=s(i,"alpha",1);var l=s(i,"origin",null);if("number"==typeof l)e.setOrigin(l);else if(null!==l){var u=s(l,"x",.5),c=s(l,"y",.5);e.setOrigin(u,c)}return e.scaleMode=s(i,"scaleMode",r.DEFAULT),e.blendMode=s(i,"blendMode",n.NORMAL),e.visible=s(i,"visible",!0),s(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,i){var n=i(0),s=i(12),r=i(13),o=i(54),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Transform,s.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]}});t.exports=a},function(t,e){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,n,s,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},scaleY:{get:function(){return Math.sqrt(this.b*this.b+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(r*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=r*c*e+-o*c*t+(-u*r+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(160),r=i(270),o=i(161),a=i(271),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(23);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},,function(t,e){t.exports=function(t){return t.y+t.height-t.height*t.originY}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t){return t.x+t.width-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY}},function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){t.exports={DESTROY:i(602),FADE_IN_COMPLETE:i(603),FADE_IN_START:i(604),FADE_OUT_COMPLETE:i(605),FADE_OUT_START:i(606),FLASH_COMPLETE:i(607),FLASH_START:i(608),PAN_COMPLETE:i(609),PAN_START:i(610),POST_RENDER:i(611),PRE_RENDER:i(612),SHAKE_COMPLETE:i(613),SHAKE_START:i(614),ZOOM_COMPLETE:i(615),ZOOM_START:i(616)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(137),s=i(21);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;dthis.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=h},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e,i){var n=i(0),s=i(16),r=i(20),o=i(8),a=i(2),h=i(6),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s80*i){n=h=t[0],a=l=t[1];for(var T=i;Th&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===S(t,e,i,n)>0)for(r=e;r=e;r-=n)o=E(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(_(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(_(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),_(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&m(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),_(n),_(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||m(t,e,i)>0!=m(t,e,n)>0&&m(i,n,t)>0!=m(i,n,e)>0}function T(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var i=new b(t.i,t.x,t.y),n=new b(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function E(t,e,i,n){var s=new b(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function _(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function b(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e,i){t.exports={COMPLETE:i(851),DECODED:i(852),DECODED_ALL:i(853),DESTROY:i(854),DETUNE:i(855),GLOBAL_DETUNE:i(856),GLOBAL_MUTE:i(857),GLOBAL_RATE:i(858),GLOBAL_VOLUME:i(859),LOOP:i(860),LOOPED:i(861),MUTE:i(862),PAUSE_ALL:i(863),PAUSE:i(864),PLAY:i(865),RATE:i(866),RESUME_ALL:i(867),RESUME:i(868),SEEK:i(869),STOP_ALL:i(870),STOP:i(871),UNLOCKED:i(872),VOLUME:i(873)}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var n=i(0),s=i(12),r=i(13),o=i(926),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=l},function(t,e,i){var n=i(0),s=i(16),r=i(20),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e,i){var n=i(0),s=i(46),r=i(241),o=i(242),a=i(145),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;si&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(829),COMPLETE:i(830),FILE_COMPLETE:i(831),FILE_KEY_COMPLETE:i(832),FILE_LOAD_ERROR:i(833),FILE_LOAD:i(834),FILE_PROGRESS:i(835),POST_PROCESS:i(836),PROGRESS:i(837),START:i(838)}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,m=(l*f-u*c)*g;return v>=0&&m>=0&&v+m<1}},function(t,e,i){var n=i(3);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},,function(t,e,i){var n=i(64);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)||(i[s]=e[s]);return i}},function(t,e,i){var n=i(22);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(655),FULLSCREEN_FAILED:i(656),FULLSCREEN_UNSUPPORTED:i(657),LEAVE_FULLSCREEN:i(658),ORIENTATION_CHANGE:i(659),RESIZE:i(660)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=i(0),s=i(22),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),m=r=s(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(!(x.rT||x.y>w)){var E=Math.max(x.x,e),_=Math.max(x.y,i),b=Math.min(x.r,T)-E,S=Math.min(x.b,w)-_;v=b,m=S,p=o?h+(u-(E-x.x)-b):h+(E-x.x),g=a?l+(c-(_-x.y)-S):l+(_-x.y),e=E,i=_,n=b,r=S}else p=0,g=0,v=0,m=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var A=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/A),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/A),t.v1=Math.min(1,(g+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=m,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(0),s=i(93),r=i(368),o=i(369),a=i(152),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(229),s=i(0),r=i(110),o=i(2),a=i(6),h=i(7),l=i(362),u=i(105),c=i(67),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.classType=o(i,"classType",c),this.name=o(i,"name",""),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=0&&t=0&&e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return t0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(12),r=i(35),o=i(11),a=i(48),h=i(10),l=i(32),u=i(159),c=i(4),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._cx=0,this._cy=0,this._cw=0,this._ch=0,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;gC&&wS&&Es&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras;var i=this.scaleManager.resolution;return this.resolution=i,this._cx=this._x*i,this._cy=this._y*i,this._cw=this._width*i,this._ch=this._height*i,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){t.exports={ADD:i(727),ERROR:i(728),LOAD:i(729),READY:i(730),REMOVE:i(731)}},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){var n=i(78);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(64),r=i(11),o=i(65),a=i(28),h=i(1),l=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on(a.FOCUS,function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},unlock:h,onBlur:h,onFocus:h,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=l},function(t,e,i){var n=i(0),s=i(11),r=i(65),o=i(17),a=i(1),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){var n=i(178),s=i(0),r=i(1),o=i(127),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(179),s=i(360);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&o.length0&&a.lengthe.right||t.y>e.bottom)}},function(t,e,i){var n=i(6),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1164),ANY_KEY_UP:i(1165),COMBO_MATCH:i(1166),DOWN:i(1167),KEY_DOWN:i(1168),KEY_UP:i(1169),UP:i(1170)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(207),r=i(67),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},,function(t,e,i){t.exports={CalculateFacesAt:i(210),CalculateFacesWithin:i(51),Copy:i(1257),CreateFromTiles:i(1258),CullTiles:i(1259),Fill:i(1260),FilterTiles:i(1261),FindByIndex:i(1262),FindTile:i(1263),ForEachTile:i(1264),GetTileAt:i(137),GetTileAtWorldXY:i(1265),GetTilesWithin:i(21),GetTilesWithinShape:i(1266),GetTilesWithinWorldXY:i(1267),HasTileAt:i(451),HasTileAtWorldXY:i(1268),IsInLayerBounds:i(101),PutTileAt:i(211),PutTileAtWorldXY:i(1269),PutTilesAt:i(1270),Randomize:i(1271),RemoveTileAt:i(452),RemoveTileAtWorldXY:i(1272),RenderDebug:i(1273),ReplaceByIndex:i(450),SetCollision:i(1274),SetCollisionBetween:i(1275),SetCollisionByExclusion:i(1276),SetCollisionByProperty:i(1277),SetCollisionFromCollisionGroup:i(1278),SetTileIndexCallback:i(1279),SetTileLocationCallback:i(1280),Shuffle:i(1281),SwapByIndex:i(1282),TileToWorldX:i(138),TileToWorldXY:i(1283),TileToWorldY:i(139),WeightedRandomize:i(1284),WorldToTileX:i(61),WorldToTileXY:i(1285),WorldToTileY:i(62)}},function(t,e,i){var n=i(101);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(22),s=i(0),r=i(11),o=i(107),a=i(245),h=i(246),l=i(6),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t.forward=e,void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(55),s=i(3);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(269),s=i(272),r=i(274),o=i(275);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(160);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e,i){var n=i(277),s=i(278),r=i(279),o=i(280),a=i(281),h=i(282),l=i(283),u=i(284),c=i(285),d=i(286),f=i(287),p=i(288);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e,i){var n=i(115),s=i(116),r=i(24),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),n=i.getContext("2d").createImageData(1,1);return a=n.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(o.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},function(t,e,i){var n=i(23),s=i(17),r={Angle:i(686),Distance:i(694),Easing:i(696),Fuzzy:i(697),Interpolation:i(700),Pow2:i(705),Snap:i(707),RandomDataGenerator:i(709),Average:i(710),Bernstein:i(297),Between:i(168),CatmullRom:i(167),CeilTo:i(711),Clamp:i(22),DegToRad:i(35),Difference:i(712),Factorial:i(298),FloatBetween:i(304),FloorTo:i(713),FromPercent:i(86),GetSpeed:i(714),IsEven:i(715),IsEvenStrict:i(716),Linear:i(114),MaxAdd:i(717),MinSub:i(718),Percent:i(719),RadToDeg:i(169),RandomXY:i(720),RandomXYZ:i(721),RandomXYZW:i(722),Rotate:i(305),RotateAround:i(251),RotateAroundDistance:i(154),RoundAwayFromZero:i(306),RoundTo:i(723),SinCosTableGenerator:i(724),SmootherStep:i(155),SmoothStep:i(156),TransformXY:i(307),Within:i(725),Wrap:i(56),Vector2:i(4),Vector3:i(170),Vector4:i(308),Matrix3:i(309),Matrix4:i(310),Quaternion:i(311),RotateVec3:i(726)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],m=s[12],y=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+m)*T,this.y=(e*o+i*u+n*p+y)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n=i(10);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,s,r,o=Number.MAX_VALUE,a=Number.MAX_VALUE,h=Number.MIN_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,u=0;u0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(178),s=i(52),r=i(0),o=i(12),a=i(110),h=i(13),l=i(10),u=i(913),c=i(364),d=i(4),f=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.list.length>0)for(var e=this.list,i=new l,n=0;n-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){var n=i(128),s=i(0),r=i(918),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(112),s=i(0),r=i(186),o=i(244),a=i(247),h=i(248),l=i(252),u=i(151),c=i(257),d=i(258),f=i(255),p=i(32),g=i(92),v=i(13),m=i(2),y=i(6),x=i(23),T=i(924),w=new s({Extends:v,Mixins:[o,a,h,l,u,c,d,f,T],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),w.TargetCamera.setScene(this.scene),w.TargetCamera.setViewport(0,0,e,i),w.TargetCamera.scrollX=this.x,w.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,w.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});w.TargetCamera=new n,t.exports=w},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(3);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(13),o=i(372),a=i(125),h=i(374),l=i(934),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;sn.width&&(t=n.width-this.frame.cutX),this.frame.cutY+e>n.height&&(e=n.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)}return this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o=255&(t>>16|0),a=255&(t>>8|0),h=255&(0|t),l=this.gl,u=this.frame;if(l){var c=this.renderer,f=this.getBounds();c.setFramebuffer(this.framebuffer,!0),s===u.source.width&&r===u.source.height||l.scissor(i+u.cutX,n+u.cutY,s,r),this.pipeline.drawFillRect(f.x,f.y,f.right,f.bottom,d.getTintFromFloats(o/255,a/255,h/255,1),e),s===u.source.width&&r===u.source.height||l.scissor(0,0,u.source.width,u.source.height),this.renderer.setFramebuffer(null,!0)}else this.context.fillStyle="rgba("+o+","+a+","+h+","+e+")",this.context.fillRect(i+u.cutX,n+u.cutY,s,r);return this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),d.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;rl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=l,n+=a[h],h0&&(d+=h.lineSpacing*g),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[g];else if("center"===i.align)c+=(o-h.lineWidths[g])/2;else if("justify"===i.align){if(h.lineWidths[g]/h.width>=.85){var v=h.width-h.lineWidths[g],m=e.measureText(" ").width,y=a[g].trim(),x=y.split(" ");v+=(a[g].length-y.length)*m;for(var T=Math.floor(v/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[g]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[g],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[g],c,d))}e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var E=this.input;return E&&!E.customHitArea&&(E.hitArea.width=this.width,E.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(24),s=i(0),r=i(12),o=i(26),a=i(13),h=i(302),l=i(113),u=i(950),c=i(4),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.displayFrame=this.displayTexture.get(t),this.displayFrame.cutWidth&&this.displayFrame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame,e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(193),r=i(390),o=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var E=(-x-Math.sqrt(T))/(2*y);r=a+E*p,o=h+E*g,E>=0&&E<=1&&i.push(new n(r,o));var _=(-x+Math.sqrt(T))/(2*y);r=a+_*p,o=h+_*g,_>=0&&_<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(46),s=new(i(3));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(3),s=i(82),r=i(405);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,m=p*v-g*g,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1150),BUTTON_UP:i(1151),CONNECTED:i(1152),DISCONNECTED:i(1153),GAMEPAD_BUTTON_DOWN:i(1154),GAMEPAD_BUTTON_UP:i(1155)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,i){var n=i(17),s=i(133);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e,i){var n=i(0),s=i(16),r=i(20),o=i(8),a=i(2),h=i(7),l=i(336),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=Math.max(t,.001),this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){return this.state===o.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this)},play:function(t){if(void 0===t&&(t=!1),this.state===o.ACTIVE||this.state===o.PENDING_ADD&&this._pausedState===o.PENDING_ADD)return this;if(!this.parentIsTimeline&&(this.state===o.PENDING_REMOVE||this.state===o.REMOVED))return this.seek(0),this.parent.makeActive(this),this;var e=this.callbacks.onStart;return this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.parent.makeActive(this)),this},resetTweenData:function(t){for(var e=this.data,i=0;i0&&(n.elapsed=n.delay,n.state=o.DELAY)}},resume:function(){return this.state===o.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}return this},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}return this},remove:function(){return this.parent.remove(this),this},stop:function(t){return this.state===o.ACTIVE&&void 0!==t&&this.seek(t),this.state!==o.REMOVED&&(this.state!==o.PAUSED&&this.state!==o.PENDING_ADD||(this.parentIsTimeline?(this.parent.manager._destroy.push(this),this.parent.manager._toProcess++):(this.parent._destroy.push(this),this.parent._toProcess++)),this.state=o.PENDING_REMOVE),this},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var n=i(56);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(56);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n=i(0),s=i(9),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,s){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:s}),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):-1!==h&&t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n=i(0),s=i(63),r=i(2),o=i(487),a=i(735),h=i(736),l=i(32),u=i(9),c=i(225),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0)||!((e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,m=-t.displayOriginX+f,y=-t.displayOriginY+p;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,l=x.v0,c=x.u1,d=x.v1,g=x.width,v=x.height,f=x.x,p=x.y,m=-t.displayOriginX+f,y=-t.displayOriginY+p}t.flipX&&(m+=g,g*=-1),t.flipY&&(y+=v,v*=-1);var T=m+g,w=y+v;s.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var E=r.getX(m,y),_=r.getY(m,y),b=r.getX(m,w),S=r.getY(m,w),A=r.getX(T,w),C=r.getY(T,w),M=r.getX(T,y),O=r.getY(T,y),P=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),R=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),L=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),D=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(E=Math.round(E),_=Math.round(_),b=Math.round(b),S=Math.round(S),A=Math.round(A),C=Math.round(C),M=Math.round(M),O=Math.round(O)),this.setTexture2D(a,0);var F=t._isTinted&&t.tintFill;this.batchQuad(E,_,b,S,A,C,M,O,h,l,c,d,P,R,L,D,F,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(m,y));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=l,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=u,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=l,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=u,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=u,T[++E]=l,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,E,_,b,S,A,C,M,O,P){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,F=m/i+A,k=y/n+C,I=(m+x)/i+A,B=(y+T)/n+C,Y=o,N=a,X=-g,z=-v;if(t.isCropped){var U=t._crop;Y=U.width,N=U.height,o=U.width,a=U.height;var G=m=U.x,W=y=U.y;c&&(G=x-U.x-U.width),d&&!e.isRenderTexture&&(W=T-U.y-U.height),F=G/i+A,k=W/n+C,I=(G+U.width)/i+A,B=(W+U.height)/n+C,X=-g+m,z=-v+y}d^=!P&&e.isRenderTexture?1:0,c&&(Y*=-1,X+=o),d&&(N*=-1,z+=a);var H=X+Y,V=z+N;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),O?(R.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,z),q=D.getY(X,z),K=D.getX(X,V),J=D.getY(X,V),Z=D.getX(H,V),Q=D.getY(H,V),$=D.getX(H,z),tt=D.getY(H,z);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,F,k,I,B,w,E,_,b,S,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),m=h.getY(l,c),y=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,m,y,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f0&&V[4]?this.batchQuad(D,F,O,P,V[0],V[1],V[2],V[3],U,G,W,H,B,Y,N,X,I):(j[0]=D,j[1]=F,j[2]=O,j[3]=P,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],U,G,W,H,B,Y,N,X,I):(V[0]=C,V[1]=M,V[2]=R,V[3]=L,V[4]=1)}}});t.exports=d},,,function(t,e,i){t.exports={Angle:i(499),Call:i(500),GetFirst:i(501),GetLast:i(502),GridAlign:i(503),IncAlpha:i(537),IncX:i(538),IncXY:i(539),IncY:i(540),PlaceOnCircle:i(541),PlaceOnEllipse:i(542),PlaceOnLine:i(543),PlaceOnRectangle:i(544),PlaceOnTriangle:i(545),PlayAnimation:i(546),PropertyValueInc:i(34),PropertyValueSet:i(27),RandomCircle:i(547),RandomEllipse:i(548),RandomLine:i(549),RandomRectangle:i(550),RandomTriangle:i(551),Rotate:i(552),RotateAround:i(553),RotateAroundDistance:i(554),ScaleX:i(555),ScaleXY:i(556),ScaleY:i(557),SetAlpha:i(558),SetBlendMode:i(559),SetDepth:i(560),SetHitArea:i(561),SetOrigin:i(562),SetRotation:i(563),SetScale:i(564),SetScaleX:i(565),SetScaleY:i(566),SetTint:i(567),SetVisible:i(568),SetX:i(569),SetXY:i(570),SetY:i(571),ShiftPosition:i(572),Shuffle:i(573),SmootherStep:i(574),SmoothStep:i(575),Spread:i(576),ToggleVisible:i(577),WrapInRectangle:i(578)}},function(t,e,i){var n=i(143),s=[];s[n.BOTTOM_CENTER]=i(231),s[n.BOTTOM_LEFT]=i(232),s[n.BOTTOM_RIGHT]=i(233),s[n.CENTER]=i(234),s[n.LEFT_CENTER]=i(236),s[n.RIGHT_CENTER]=i(237),s[n.TOP_CENTER]=i(238),s[n.TOP_LEFT]=i(239),s[n.TOP_RIGHT]=i(240);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(38),s=i(73),r=i(39),o=i(74);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(40),r=i(39),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(42),r=i(39),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(235),s=i(73),r=i(76);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(74),s=i(75);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(76),s=i(40),r=i(75),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(76),s=i(42),r=i(75),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(73),s=i(44),r=i(74),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(44),r=i(41),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(44),r=i(43),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(144),s=i(86),r=i(23),o=i(3);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(243),s=i(144),r=i(86),o=i(23);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;he.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(52),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(147),s=i(108);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),fd.right&&(f=u(f,f+(g-d.right),this.lerp.x)),vd.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var m=f+n,y=p+s;this.midPoint.set(m,y);var x=e/o,T=i/o;this.worldView.setTo(m-x/2,y-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(33);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(617),Flash:i(618),Pan:i(619),Shake:i(652),Zoom:i(653)}},function(t,e,i){t.exports={In:i(620),Out:i(621),InOut:i(622)}},function(t,e,i){t.exports={In:i(623),Out:i(624),InOut:i(625)}},function(t,e,i){t.exports={In:i(626),Out:i(627),InOut:i(628)}},function(t,e,i){t.exports={In:i(629),Out:i(630),InOut:i(631)}},function(t,e,i){t.exports={In:i(632),Out:i(633),InOut:i(634)}},function(t,e,i){t.exports={In:i(635),Out:i(636),InOut:i(637)}},function(t,e,i){t.exports=i(638)},function(t,e,i){t.exports={In:i(639),Out:i(640),InOut:i(641)}},function(t,e,i){t.exports={In:i(642),Out:i(643),InOut:i(644)}},function(t,e,i){t.exports={In:i(645),Out:i(646),InOut:i(647)}},function(t,e,i){t.exports={In:i(648),Out:i(649),InOut:i(650)}},function(t,e,i){t.exports=i(651)},function(t,e,i){var n=i(0),s=i(26),r=i(290),o=i(2),a=i(6),h=i(7),l=i(165),u=i(1),c=i(171),d=i(159),f=new n({initialize:function(t){void 0===t&&(t={});this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(115),browser:i(116),features:i(164),input:i(682),audio:i(683),video:i(684),fullscreen:i(685),canvasFeatures:i(291)}},function(t,e,i){var n,s,r,o=i(24),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(4);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*l,e[5]=g*s+v*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*n+x*o+T*l,e[8]=y*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+f),m[7]=d+p,m[2]=u+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,E=s*l-r*h,_=s*u-o*h,b=r*u-o*l,S=c*v-d*g,A=c*m-f*g,C=c*y-p*g,M=d*m-f*v,O=d*y-p*v,P=f*y-p*m,R=x*P-T*O+w*M+E*C-_*A+b*S;return R?(R=1/R,i[0]=(h*P-l*O+u*M)*R,i[1]=(l*C-a*P-u*A)*R,i[2]=(a*O-h*C+u*S)*R,i[3]=(r*O-s*P-o*M)*R,i[4]=(n*P-r*C+o*A)*R,i[5]=(s*C-n*O-o*S)*R,i[6]=(v*b-m*_+y*E)*R,i[7]=(m*w-g*b-y*T)*R,i[8]=(g*_-v*w+y*x)*R,this):null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,E=n*h-s*a,_=l*p-u*f,b=l*g-c*f,S=l*v-d*f,A=u*g-c*p,C=u*v-d*p,M=c*v-d*g,O=m*M-y*C+x*A+T*S-w*b+E*_;return O?(O=1/O,t[0]=(o*M-a*C+h*A)*O,t[1]=(n*C-i*M-s*A)*O,t[2]=(p*E-g*w+v*T)*O,t[3]=(c*w-u*E-d*T)*O,t[4]=(a*S-r*M-h*b)*O,t[5]=(e*M-n*S+s*b)*O,t[6]=(g*x-f*E-v*y)*O,t[7]=(l*E-c*x+d*y)*O,t[8]=(r*C-o*S+h*_)*O,t[9]=(i*S-e*C-s*_)*O,t[10]=(f*w-p*x+v*m)*O,t[11]=(u*x-l*w-d*m)*O,t[12]=(o*b-r*A-a*_)*O,t[13]=(e*A-i*b+n*_)*O,t[14]=(p*y-f*T-g*m)*O,t[15]=(l*T-u*y+c*m)*O,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],E=y[3];return e[0]=x*i+T*o+w*u+E*p,e[1]=x*n+T*a+w*c+E*g,e[2]=x*s+T*h+w*d+E*v,e[3]=x*r+T*l+w*f+E*m,x=y[4],T=y[5],w=y[6],E=y[7],e[4]=x*i+T*o+w*u+E*p,e[5]=x*n+T*a+w*c+E*g,e[6]=x*s+T*h+w*d+E*v,e[7]=x*r+T*l+w*f+E*m,x=y[8],T=y[9],w=y[10],E=y[11],e[8]=x*i+T*o+w*u+E*p,e[9]=x*n+T*a+w*c+E*g,e[10]=x*s+T*h+w*d+E*v,e[11]=x*r+T*l+w*f+E*m,x=y[12],T=y[13],w=y[14],E=y[15],e[12]=x*i+T*o+w*u+E*p,e[13]=x*n+T*a+w*c+E*g,e[14]=x*s+T*h+w*d+E*v,e[15]=x*r+T*l+w*f+E*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],T=i[10],w=i[11],E=n*n*l+h,_=s*n*l+r*a,b=r*n*l-s*a,S=n*s*l-r*a,A=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,O=s*r*l-n*a,P=r*r*l+h;return i[0]=u*E+p*_+y*b,i[1]=c*E+g*_+x*b,i[2]=d*E+v*_+T*b,i[3]=f*E+m*_+w*b,i[4]=u*S+p*A+y*C,i[5]=c*S+g*A+x*C,i[6]=d*S+v*A+T*C,i[7]=f*S+m*A+w*C,i[8]=u*M+p*O+y*P,i[9]=c*M+g*O+x*P,i[10]=d*M+v*O+T*P,i[11]=f*M+m*O+w*P,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,m=o*h,y=o*l;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=u+m,e[2]=c-v,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-l*(p*=v),y=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var T=p*x-g*y,w=g*m-f*x,E=f*y-p*m;return(v=Math.sqrt(T*T+w*w+E*E))?(T*=v=1/v,w*=v,E*=v):(T=0,w=0,E=0),n[0]=m,n[1]=T,n[2]=f,n[3]=0,n[4]=y,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=E,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(T*s+w*r+E*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(170),r=i(309),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=i(313),s=i(24),r=i(26),o=i(164);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(480),h=i(483),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var n=i(26);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),l.push("background: "+t),a=t}),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+" ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(316),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step()},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(28);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(319),s=i(24),r=i(6);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(115);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e,i){var n=i(173);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.PORTRAIT:n.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.PORTRAIT:n.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.LANDSCAPE}return e>t?n.PORTRAIT:n.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){var n=i(0),s=i(175),r=i(11),o=i(53),a=i(28),h=i(338),l=i(339),u=i(340),c=i(341),d=i(32),f=i(307),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(164),r=i(53),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseDownWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseDown(i)},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseUpWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseUp(i)},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)},this.onMouseWheel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onMouseWheel(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),n.addEventListener("wheel",this.onMouseWheel,this.capture?o:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.queue.push(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(292),s=i(0),r=i(57),o=i(166),a=i(301),h=i(4),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.time=0,this.deltaX=0,this.deltaY=0,this.deltaZ=0},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.manager.mouse.locked&&(this.movementX+=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY+=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=t.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e(t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t,e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,o=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,h=t*i,l=e*i;return s&&(h=Math.floor(h),l=Math.floor(l)),h===t&&l===e||(a.width=h+"px",a.height=l+"px"),this.refresh(r,o)},setZoom:function(t){return this.zoom=t,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),o>1&&(i.width=t+"px",i.height=e+"px")):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();this._requestedFullscreenChange=!0,"undefined"!=typeof Promise?e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT).then(this.fullscreenSuccessHandler).catch(this.fullscreenErrorHandler):i[e.request](t).then(this.fullscreenSuccessHandler).catch(this.fullscreenErrorHandler):(e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t),e.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler())}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&(this._requestedFullscreenChange=!0,document[t.cancel]()),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;if(e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){this._requestedFullscreenChange||this.stopFullscreen(),this._requestedFullscreenChange=!1},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy(),this.fullscreenTarget=null},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(22),s=i(0),r=i(90),o=i(4),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(122),r=i(19),o=i(28),a=i(6),h=i(80),l=i(1),u=i(346),c=i(176),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=r.x&&t=r.y&&e=r.x&&t=r.y&&e0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(123),s=i(0),r=i(11),o=i(356),a=i(1),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(124),s=i(0),r=i(11),o=i(17),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(358),s=i(123),r=i(0),o=i(65),a=i(359),h=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(124),s=i(0),r=i(65),o=new s({Extends:n,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,m=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v0;)m--}0===a(t[r],g)?i(t,r,m):i(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};t.exports=s},function(t,e,i){var n=i(6),s=i(111),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(10);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(12),r=i(916),o=i(13),a=i(7),h=i(174),l=i(308),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r)},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(52),s=i(0),r=i(12),o=i(375),a=i(376),h=i(933),l=i(2),u=i(180),c=i(377),d=i(97),f=i(373),p=i(378),g=i(10),v=i(127),m=i(4),y=i(56),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(956),r=i(63),o=i(10),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;sc+v)){var m=g.getPoint((u-c)/v);o.push(m);break}c+=v}return o}},function(t,e,i){var n=i(55),s=i(54);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(10),r=i(30),o=i(977),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(980),s=i(0),r=i(63),o=i(30),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(55),s=i(3);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){t.exports={Circle:i(1039),Ellipse:i(1049),Intersects:i(402),Line:i(1068),Point:i(1089),Polygon:i(1103),Rectangle:i(417),Triangle:i(1133)}},function(t,e,i){t.exports={CircleToCircle:i(403),CircleToRectangle:i(404),GetCircleToCircle:i(1059),GetCircleToRectangle:i(1060),GetLineToCircle:i(196),GetLineToRectangle:i(198),GetRectangleIntersection:i(1061),GetRectangleToRectangle:i(1062),GetRectangleToTriangle:i(1063),GetTriangleToCircle:i(1064),GetTriangleToLine:i(409),GetTriangleToTriangle:i(1065),LineToCircle:i(197),LineToLine:i(82),LineToRectangle:i(405),PointToLine:i(413),PointToLineSegment:i(1066),RectangleToRectangle:i(130),RectangleToTriangle:i(406),RectangleToValues:i(1067),TriangleToCircle:i(408),TriangleToLine:i(410),TriangleToTriangle:i(411)}},function(t,e,i){var n=i(57);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(82),s=i(47),r=i(199),o=i(407);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(197),s=i(81);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(23),s=i(56),r=i(83);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(10);n.Area=i(1108),n.Ceil=i(1109),n.CeilAll=i(1110),n.CenterOn=i(162),n.Clone=i(1111),n.Contains=i(47),n.ContainsPoint=i(1112),n.ContainsRect=i(418),n.CopyFrom=i(1113),n.Decompose=i(407),n.Equals=i(1114),n.FitInside=i(1115),n.FitOutside=i(1116),n.Floor=i(1117),n.FloorAll=i(1118),n.FromPoints=i(172),n.GetAspectRatio=i(201),n.GetCenter=i(1119),n.GetPoint=i(147),n.GetPoints=i(249),n.GetSize=i(1120),n.Inflate=i(1121),n.Intersection=i(1122),n.MarchingAnts=i(260),n.MergePoints=i(1123),n.MergeRect=i(1124),n.MergeXY=i(1125),n.Offset=i(1126),n.OffsetPoint=i(1127),n.Overlaps=i(1128),n.Perimeter=i(108),n.PerimeterPoint=i(1129),n.Random=i(150),n.RandomOutside=i(1130),n.SameDimensions=i(1131),n.Scale=i(1132),n.Union=i(364),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(423),s=i(424),r=i(0),o=i(11),a=i(4),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t=r;for(i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=h.entries).length,t=0;t-1&&p>g&&(t.velocity.normalize().scale(g),p=g),t.speed=p},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)r.right&&(s=h(o.x,o.y,r.right,r.y)-o.radius):o.y>r.bottom&&(o.xr.right&&(s=h(o.x,o.y,r.right,r.bottom)-o.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var a=t.position.x-e.position.x,l=t.position.y-e.position.y,c=Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),d=(e.position.x-t.position.x)/c||0,f=(e.position.y-t.position.y)/c||0,v=2*(t.velocity.x*d+t.velocity.y*f-e.velocity.x*d-e.velocity.y*f)/(t.mass+e.mass);t.immovable||(t.velocity.x=(t.velocity.x-v*t.mass*d)*t.bounce.x,t.velocity.y=(t.velocity.y-v*t.mass*f)*t.bounce.y),e.immovable||(e.velocity.x=(e.velocity.x+v*e.mass*d)*e.bounce.x,e.velocity.y=(e.velocity.y+v*e.mass*f)*e.bounce.y);var m=e.velocity.x-t.velocity.x,y=e.velocity.y-t.velocity.y,x=Math.atan2(y,m),T=this._frameTime;return t.immovable||(t.x+=t.velocity.x*T-s*Math.cos(x),t.y+=t.velocity.y*T-s*Math.sin(x)),e.immovable||(e.x+=e.velocity.x*T+s*Math.cos(x),e.y+=e.velocity.y*T+s*Math.sin(x)),(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(a,h,l,u);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e,this._reset=!0}t<0?this.facing=r.FACING_LEFT:t>0&&(this.facing=r.FACING_RIGHT),e<0?this.facing=r.FACING_UP:e>0&&(this.facing=r.FACING_DOWN),this._dx=t,this._dy=e,this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):l(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,s=void 0!==i;return(n||s)&&(this.worldBounce||(this.worldBounce=new u),n&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=c},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,m,y;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,m-g)*Math.max(0,y-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(46),s=i(0),r=i(50),o=i(47),a=i(4),h=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},,,,function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(72),s=i(101),r=i(210);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(31),s=i(213),r=i(454),o=i(455),a=i(466);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(31),s=i(213);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(31),s=i(103),r=i(456),o=i(458),a=i(459),h=i(462),l=i(464),u=i(465);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){var n=i(457),s=i(2),r=i(102),o=i(214),a=i(72);t.exports=function(t,e){for(var i=s(t,"infinite",!1),h=[],l=0;l0?((f=new a(c,d.gid,C,M,t.tilewidth,t.tileheight)).rotation=d.rotation,f.flipX=d.flipped,g[M][C]=f):(p=e?null:new a(c,-1,C,M,t.tilewidth,t.tileheight),g[M][C]=p),++v===w.width&&(b++,v=0)}}else{c=new r({name:u.name,x:s(u,"offsetx",0)+u.x,y:s(u,"offsety",0)+u.y,width:u.width,height:u.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:u.opacity,visible:u.visible,properties:s(u,"properties",{})});for(var O=[],P=0,R=u.data.length;P0?((f=new a(c,d.gid,v,g.length,t.tilewidth,t.tileheight)).rotation=d.rotation,f.flipX=d.flipped,O.push(f)):(p=e?null:new a(c,-1,v,g.length,t.tilewidth,t.tileheight),O.push(p)),++v===u.width&&(g.push(O),v=0,O=[])}c.data=g,h.push(c)}}return h}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(2);t.exports=function(t){for(var e=[],i=0;i1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f=this.firstgid&&ta&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(102),s=i(72);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(140);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new p(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new c(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:null!==a?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===a&&(a=this.tileWidth),void 0===l&&(l=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,c=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")?null:null===r?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(t){void 0===t&&(t=!0),this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this)},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i){return a.SetCollision(t,e,i,this.layer),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){var n=i(0),s=i(12),r=i(26),o=i(13),a=i(1292),h=i(136),l=i(32),u=i(9),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.config.renderType===r.WEBGL&&t.sys.game.renderer.onContextRestored(function(){this.updateVBOData()},this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;sv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===m?(m=i.createVertexBuffer(y,n.STATIC_DRAW),this.vertexBuffer[e]=m):(i.setVertexBuffer(m),n.bufferSubData(n.ARRAY_BUFFER,0,y))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,m=this._tempMatrix,y=-c,x=-d;e.flipX&&(h*=-1,y+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=y+h,w=x+l;m.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var E=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),_=m.getX(y,x),b=m.getY(y,x),S=m.getX(y,w),A=m.getY(y,w),C=m.getX(T,w),M=m.getY(T,w),O=m.getX(T,x),P=m.getY(T,x);r.roundPixels&&(_=Math.round(_),b=Math.round(b),S=Math.round(S),A=Math.round(A),C=Math.round(C),M=Math.round(M),O=Math.round(O),P=Math.round(P));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=_,R[++t]=b,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=E,R[++t]=S,R[++t]=A,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=E,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=E,R[++t]=_,R[++t]=b,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=E,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=E,R[++t]=O,R[++t]=P,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=E,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(1301);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(6);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(219),s=i(14),r=i(87),o=i(96),a=i(141),h=i(6),l=i(218),u=i(220),c=i(221);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),m=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),m),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),E=r(e,"yoyo",i.yoyo),_=[],b=l("value",f),S=c(p[0],"value",b.getEnd,b.getStart,y,g,v,E,x,T,w,!1,!1);S.start=d,S.current=d,S.to=f,_.push(S);var A=new u(t,_,p);A.offset=s(e,"offset",null),A.completeDelay=s(e,"completeDelay",0),A.loop=Math.round(s(e,"loop",0)),A.loopDelay=Math.round(s(e,"loopDelay",0)),A.paused=r(e,"paused",!1),A.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",A),M=[A,null],O=u.TYPES,P=0;P0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var m=0;m0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit(r.TIMELINE_LOOP,this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):this.state=a.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=a.COMPLETE_DELAY;else{this.state=a.PENDING_REMOVE;var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit(r.TIMELINE_COMPLETE,this)}},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var n=i(481),s=i(48),r=i(0),o=i(26),a=i(482),h=i(89),l=i(104),u=i(113),c=i(32),d=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.scaleMode=t.config.antialias?l.LINEAR:l.NEAREST,this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.blendModes=a(),this.currentScaleMode=0,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new c,this._tempMatrix2=new c,this._tempMatrix3=new c,this._tempMatrix4=new c,this.init()},init:function(){this.game.scale.on(h.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.scaleMode===l.NEAREST&&u.disable(this.gameContext)},onContextLost:function(){},onContextRestored:function(){},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c;var d=n.mask;d&&d.preRenderCanvas(this,null,n._maskCamera),n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var f=0;f=0?g=-(g+d):g<0&&(g=Math.abs(g)-d)),-1===y&&(v>=0?v=-(v+f):v<0&&(v=Math.abs(v)-f))}a.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.scale(m,y),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.drawImage(e.source.image,u,c,d,f,g,v,d/p,f/p),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=d},function(t,e,i){var n=i(24),s=i(33),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(52),s=i(291);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(112),s=i(48),r=i(0),o=i(26),a=i(117),h=i(89),l=i(78),u=i(118),c=i(32),d=i(9),f=i(484),p=i(485),g=i(486),v=i(226),m=new r({initialize:function(t){var e=this,i=t.config,s={alpha:i.transparent,desynchronized:i.desynchronized,depth:!1,antialias:i.antialias,premultipliedAlpha:i.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:i.failIfMajorPerformanceCaveat,powerPreference:i.powerPreference};this.config={clearBeforeRender:i.clearBeforeRender,antialias:i.antialias,backgroundColor:i.backgroundColor,contextCreation:s,resolution:i.resolution,roundPixels:i.roundPixels,maxTextures:i.maxTextures,maxTextureSize:i.maxTextureSize,batchSize:i.batchSize,maxLights:i.maxLights},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),this.hasActiveStencilMask()?e.clear(e.DEPTH_BUFFER_BIT):(e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT)),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,h=s.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,a(e,i)&&(h=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,r,h,h,s.RGBA,t):this.createTexture2D(0,r,r,h,h,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){l=void 0===l||null===l||l;var u=this.gl,c=u.createTexture();return this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null===o||void 0===o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&l(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,d.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n,r,d.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,d.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,d.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=d.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera))},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=this.currentMask,u=0;u>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="destroy"},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(268),CameraManager:i(654),Effects:i(276),Events:i(48)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(22),s=i(0),r=i(48),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(22),s=i(0),r=i(48),o=i(4),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t