Commit graph

3063 commits

Author SHA1 Message Date
photonstorm
30159691fa Fixed onClickTrampoline jsdocs. 2014-11-02 12:20:19 +00:00
photonstorm
97edb7b830 Pointer.addClickTrampoline now adds in support for click trampolines. These raise pointer events into click events, which are required internally for a few edge cases like IE11 full screen mode support, but are also useful if you know you specifically need a DOM click event from a pointer (thanks @pnstickne #1282) 2014-11-02 12:18:23 +00:00
Richard Davey
21a47faaed Merge pull request #1282 from pnstickne/wip-trampoline-click
Click Trampolines - support to trampoline pointer events into 'click' events
2014-11-02 12:15:37 +00:00
photonstorm
8b2628d99c All of the Input classes now use the more consistent enabled property instead of disabled. I.e. you can now check if (input.mouse.enabled) rather than if (!input.mouse.disabled). The disabled property has been moved to a getter for backwards compatibility but is deprecated and will be removed in a future version (thanks @pnstickne #1257) 2014-11-02 12:14:47 +00:00
Richard Davey
5a23b77ec9 Merge pull request #1257 from pnstickne/wip-1191
Input "enabled/disabled" API and documentation consistency updates
2014-11-02 12:12:19 +00:00
photonstorm
65618a7ec6 docs fix. 2014-11-02 12:08:54 +00:00
photonstorm
e853cb14bb readme update 2014-11-02 11:04:03 +00:00
photonstorm
59b25ab6bb Animation.setFrame used the wrong frames array if useLocalFrameIndex was false and a numeric frame ID was given (thanks @Skeptron #1284) 2014-11-02 11:04:03 +00:00
photonstorm
e57c700816 The Gamepad.addCallbacks context parameter was never actually remembered, causing the callbacks to run in the wrong context (thanks @englercj #1285) 2014-11-02 11:04:02 +00:00
Paul
2f460aaf8a Browser incompatibility fix - MAX_SAFE_INTEGER
- Number.MAX_SAFE_INTEGER is only defined in ES6 and not currently cross-browser
2014-11-01 09:50:28 -07:00
Paul
5ec14929de Input - Minor Pointer refactor and documentation updates
- `pointerN` are aliases to backed `pointers[N-1]` array.
  This simplifies (and increases the efficiency of) looping through all the pointers when applicable; also eliminates pointer-existance checks
  Removes various hard-coded limits (added MAX_POINTERS); changed `maxPointers` default
- Removed some special-casing from cases where it did not matter
- Removed `=== false/true`, `==` usage for consistency, changed missing value check to `typeof`, etc.
- Updated documentation for specificty; added `@public\@protected`
- `@deprecated` currentPointers due to odd set pattern; `totalCurrentPointers` is more appropriate.
2014-11-01 09:45:12 -07:00
Paul
31061775d7 Pointe - removed extra whitespace 2014-11-01 01:25:01 -07:00
Paul
5b16bd45a5 ScaleManager - minor fullscreenerror fixes
- IE9 compatibility (no setWindow arguments)
- And removed code that assumpted event.target was the canvas..

(Actually adding the changes this time..)
2014-11-01 01:23:14 -07:00
Paul
14002ca02d Pointer - minor documentation update for click trampolines 2014-11-01 01:11:26 -07:00
Paul
3005419435 Click Trampolines - support to trampoline pointer events into 'click' events
- This is needed to support Fullscreen on IE11 because IE only trusts 'click' events for this operation; click trampolines as a general solution, although they are only required in some "special" cases.
2014-11-01 01:04:17 -07:00
Paul
d89c709020 ScaleManager - minor fullscreenerror fixes
- IE9 compatibility (no setWindow arguments)
- And removed code that assumpted event.target was the canvas..
2014-10-31 19:41:55 -07:00
Paul
9b319019e7 ScaleManager - backport for API compatibility
- "Backported" some changed API, all marked as @deprecated
- Minor regression fix for `supportsFullScreen`.
2014-10-31 18:06:36 -07:00
Paul
6e9f435245 ScaleManager - IE11 & Fullscreen error updates
- Added prefixed event handlers for IE; it still doesn't work in IE, but that is for other reasons
- Added monitoring of the fullscreenerror event, exposed as a fullScreenFailed signal
- Added `supportsFullScreen` a read-only flag that indicates that this ScaleManager even attempts to support such
2014-10-31 15:31:03 -07:00
Lewis Lane
1b1f78a331 Fixed some formatting/typos 2014-10-31 11:55:32 +00:00
Lewis Lane
bfb39a2864 Added removeFrom method
Allows the removal of all Tweens from a specific object, array of objects or group of objects.
2014-10-31 11:52:05 +00:00
Paul
6144b57651 ScaleManager - documentation updates 2014-10-31 03:29:54 -07:00
Paul
53541529e9 ScaleManager
- Specific bug fixes (example)
   - Scale modes can now be set independently
   - Switching between fullscreen and normal correctly restores modes
   - Alignment does not incorrectly offset in fullscreen mode
   - Changing scale/alignment promptly refreshes layout
   - `isFullScreen` returns a boolean, as it should
   - Faster parent checks (if required)
   - NO_SCALE should not not scale (vs previous behavior of having no behavior)
   - Correct usage of scaleMode depending on mode

 - Removed / unified code-paths, which helped address several issues
 - fullScreenTarget adjustment/restoration is less brutal
 - Updated documentation
 - pageAlign* works as alignment on the containing element. It should still work were it worked before (so this is not a breaking change) as well as being more universal.
 - Added @protected and @private attributes
   - Some methods were (implicitly) @public even though using them out of context is invalid

 - API Breaking:
   - Renamed some INTERNAL/@private methods
     - Should only affect methods that were not valid/sane to use publically
     - Event callbacks (ie. checkResize changed to resizeWindow) renamed for meaning
   - Changed some INTERNAL semantics to better align with usage
     - eg. `check*` methods separated from response-to-check
2014-10-31 01:41:06 -07:00
Pete Baron
7bf529b817 RAF timer being used when RAF controlling loops.
Time.time used for Date.now but Time.now may hold RAF hi-res value.
Start of separation of game/render update.
Minor adjustments to Time.update for clarity.
2014-10-31 16:59:55 +13:00
Richard Davey
c37173a513 Merge pull request #1276 from clark-stevenson/patch-5
Update phaser.d.ts
2014-10-30 10:02:33 +00:00
Paul
03af5e1582 TilemapLayer/Tileset - Documentation consistency updates for Phaser 2014-10-30 02:00:20 -07:00
Clark Stevenson
9445f19414 Update phaser.d.ts 2014-10-30 08:56:24 +00:00
Paul
60268dd048 Changes to preserve original API
- Added @deprecated/@readonly to various some properties but public properties maintain the same semantics
- Also removed some "cleverness"
- Still same good fixes ..
2014-10-29 19:31:03 -07:00
Paul
136af47064 Merge remote-tracking branch 'upstream/dev' into wip-1246b 2014-10-29 18:09:04 -07:00
photonstorm
98993365d4 Small refactor to pass jshint. 2014-10-29 07:46:56 +00:00
photonstorm
ce32d492af Phaser.Polygon has been refactored to address some Pixi v2 migration issues (thanks @pnstickne for the original implementation #1267)
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)
2014-10-29 07:46:56 +00:00
photonstorm
dc20ab6020 Text.updateText was incorrectly increasing the size of the texture each time it was called (thanks @spayton #1261) 2014-10-29 07:46:56 +00:00
photonstorm
d1b79f90a5 Polygon.contains was toggling the return value on each valid hit (thanks @Singularetantum #1265 #1266) 2014-10-29 07:46:56 +00:00
Paul
5d04c62b33 Button - bug fixes, issue #1246
- 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
2014-10-28 23:26:35 -07:00
Richard Davey
bda3637176 Merge pull request #1271 from pnstickne/wip-1190
Fix for Key.enabled issue #1190
2014-10-29 06:26:24 +00:00
Paul
2a933093d9 Comment fix
- Added `@private`
2014-10-28 22:47:44 -07:00
Paul
100b69eb99 Fix for Key.enabled issue #1190
- Added `enabled` getter; this resets the key (soft) and then disables they key
- Added `_enabled` property and updated internal usage
- Updated document for `reset`.
2014-10-28 22:45:30 -07:00
Paul
75f13cfe44 TilemapLayer / Tileset documentation to Phaser conventions
- Reverted @member to @property for uniformity
- Expanded some comments
2014-10-28 22:21:47 -07:00
Paul
84363d9f36 Updated documentation per current Phaser tag usage 2014-10-28 21:46:33 -07:00
Richard Davey
cee5e2a6c0 Merge pull request #1261 from spayton/dev
Texture width is recalculated larger on subsequent call to updateText() ...
2014-10-28 15:47:08 +00:00
Richard Davey
84d6b164c0 Merge pull request #1264 from pnstickne/wip-1234
Add support for "rgba" to Phaser.Stage.backgroundColor
2014-10-28 15:45:34 +00:00
Richard Davey
84de75e7bd Merge pull request #1265 from Singularetantum/dev
Fixed return value of Polygon.contains
2014-10-28 15:37:18 +00:00
Paul
e08e99ea6a Updated Color.webToColor to accept [more] spaces
- webToColor now accepts arbitrary spaces, which are allowed per CSS rules (percents still not supported)
2014-10-28 06:25:20 -07:00
Paul
3cfe200ed1 Minor documentation cleanup 2014-10-28 06:12:48 -07:00
Sebastian Bombitzky
1e3c7cfee7 Fixed return value of Polygon.contains
Polygon.contains was toggling the return value on each valid hit.
2014-10-28 14:04:33 +01:00
Paul
37a77c674f Add support for "rgba" to Phaser.Stage.backgroundColor
- 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)`.
2014-10-28 05:45:00 -07:00
spayton
a942a03631 Texture width is recalculated larger on subsequent call to updateText() when text has a stroke thickness > 1
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.
2014-10-28 11:48:57 +00:00
photonstorm
98e6f155de New build files. 2014-10-28 01:50:25 +00:00
photonstorm
1df98d82e3 You can now call Tween.to again on a Tween that has already completed. This will re-use the same tween, on the original object, without having to recreate the Tween again. This allows a single tween instance to be re-used multiple times, providing they are linked to the same object (thanks InsaneHero) 2014-10-28 01:49:20 +00:00
photonstorm
26a1a080d2 Buttons are now waiting to be told when they're removed from the World. 2014-10-28 01:49:14 +00:00
photonstorm
08a2b12d7d Tidied up the jsdocs. 2014-10-28 01:48:56 +00:00