* Point.rotate uses a faster and simpler rotation function when no distance argument is specified.
* Line.rotate used a calculation method which resulted in the line growing (or shrinking) in length over time, the more it was rotated. The new method never changes the lines length.
Phaser.Matrix.copyFrom and copyTo allow you to copy Matrix values from and to other Matrix objects.
Phaser.Matrix.setTo allows you to set all properties of a Matrix in a single call.
The Phaser.Matrix constructor now allows you to optionally set all Matrix properties on instantiation.
Line.normalX and Line.normalY contain the x and y components of the left-hand normal of the line.
Line.fromAngle will sets this line to start at the given `x` and `y` coordinates and for the segment to extend at `angle` for the given `length`.
- Updated `readOnly` doclet to `readonly`
- `array` refined to `type[]`, where such information was immediately
determinable.
- Updated {Any}/{*} to {any}; {...*} is standard exception
- Udated {Object} to {object}
There are no known breaking changes.
- Timer
- Uses standard Math.min/Math.max (it's better 2, 3 items).
- Math
- Updated documentation
- Marked various Math functions as deprecated, proxying as appropriate
- Array-based functions -> ArrayUtils
- RNG-based functions -> Utils
- Updated core-usage
- floor/ceil should not be used (alternatives provided)
- Altered for some equivalencies
- Also fixes some assorted issues
- Marked a few internal functions as private
- Utils
- Moved polyfills to their own file for better visibility
- Moved array functions to ArrayUtils and marked proxies as deprecated
- Created Phaser.ArrayUtils for array-related functions
- polyfills moved to their own file
- Functions given function names
- Added Math.trunc
- Added `compatibility` settings
- CHANGE (2.1.2-4): moved `supportsFullScreen` and `noMargins` into it
- Added additional properties for greater control and up-front settings.
- `scrollTo`: where the browser will scrollTo, if anywhere
- `forceMinimumDocumentHeight`: apply document element style?
- `allowShowAllExpand`: allow SHOW_ALL to try to expand? (It already
could, this allows configuration.)
- Removed `windowConstraints.top/left`. This may be a feature in the
future, but scrubbed for now.
- Added `USER_SCALE` scale mode. This is like NO_SCALE but it scales off
of a user-specified scale factor, as set by `setUserScale`. This is
marked as "experimental" as the exactly semantics of non-adjusting modes
(e.g. NO_SCALE and USER_SCALE) wrt. Canvas and "maximum" size clamps
need to be re-examined.
- FIX: `onSizeChange` now works as documented, which means it is also
fired if the game size changes even though the game canvas size does
not.
- CHANGE (no known breaking): `margins` is now non-Point/non-Rectangle
that uses top/left/bottom/right properties (any quasi-updated x/y). This
is to get around the issue that Rectangle is only designed for positive
width/height cases.
- Cleaned up property access / quotes for consistency
- Various documentation cleanup and consistency
- Fixed issue with not clearing an unparented `_createdFullScreenTarget`
- Added Phaser.Rectangle.sameDimensions which does a strict equality check
over the `width` and `height` properties of two objects, perhaps
Rectangles.
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)