Polygon.area is now only calculated when the Polygon points list is modified, rather than on every call.
Phaser.Polygon can now accept the points list in a variety of formats: Arrays of Points, numbers, objects with public x/y properties or any combination of, or as a parameter list (thanks @pnstickne for the original implementation #1267)
Polygon.contains now correctly calculates the result (thanks @pnstickne @BurnedToast #1267)
- Fix incorrect passing of "was clicked" to processInteractiveObjects
- Button would not return to Over/Out state because of strict too check to catch `undefined`
- Removed [undocumented] property usage from processInteractiveObjects and slight reformatting
- Update Button state frames/sounds to remove duplication
- Updated documentation in Button for consistency
- Added `enabled` getter; this resets the key (soft) and then disables they key
- Added `_enabled` property and updated internal usage
- Updated document for `reset`.
- backgroundColor now uses valueToColor which supports hex strings, web/rgba strings, and hex numbers.
- valueToColor normalizes across hexToColor/webToColor/getRGB; see comments
- hexToColor now documents the prefix being optional and allows the `0x` prefix.
- webToColor now exctracts an alpha channel if present - as a slight misfeature it will also accept `rgb(..,a)`.
In function override Phaser.Text.prototype.updateText(), don't include this.context.lineWidth in width calculation as it's already incorporated by this.style.strokeThickness.
Particle.Emitter.explode (or `Emitter.start` with the `explode` parameter set to `true`) will immediately emit the required quantity of particles and not delay until the next frame to do so. This means you can re-use a single emitter across multiple places in your game that require explode-style emissions, just by adjusting the `emitter.x` and `emitter.y` properties before calling explode (thanks Insanehero)
Cache.autoResolveURL is a new boolean (default `false`) that automatically builds a cached map of all loaded assets vs. their absolute URLs, for use with Cache.getURL and Cache.checkURL. Note that in 2.1.3 and earlier this was enabled by default, but has since been moved behind this property which needs to be set to `true` *before* you load any assets to enable.
Cache._resolveUrl has been renamed to Cache._resolveURL internally and gained a new parameter. This method is a private internal one.
Cache.getUrl is deprecated. The same method is now available as Cache.getURL.
XML files weren't being added to the URL map.
Cache._resolveURL was causing a Sound double-load in Firefox and causing errors (thanks @domonyiv #1253)