Commit graph

3477 commits

Author SHA1 Message Date
Paul
a0dcc61df2 Mouse Scroll Events - quibbles 2014-11-12 04:01:50 -08:00
Paul
796b2a7f2f Mouse Scroll Events - added support for WheelEvent, fixes
- Added support for the Wheel Event, which is the DOM3 spec.

- Wheel Scroll Event (old non-FF) and DOM Mouse Wheel (old FF) are
  supported via a non-exported reused wrapper object, WheelEventProxy.
  The proxy methods are generated one-time dynamically; future changes
  to the Mouse class (such as requiring an opt-in for mouse scroll events)
  could bypass secondary stub generation.

- FIX: Only ONE of the mouse wheel events is listened too, newest standard first.
  This fixes a bug in FF where it would use the default DOMMouseWheel.
2014-11-12 03:53:26 -08:00
Pete Baron
7bd0a8db71 Temporary fix to prevent huge numbers of catch-up frames happening all at once if the user navigates away from the game. Limits them to 3 now (which allows it to still detect and react to spiralling).
A proper fix involves putting the physics collision into the same update as the physics motion.
2014-11-13 00:00:13 +13:00
Richard Davey
26e74fef18 Merge pull request #1315 from pjbaron/dev
Minor logic fix and updateRender change
2014-11-12 09:18:36 +00:00
Richard Davey
b5ed3324b2 Merge pull request #1316 from pnstickne/wip-1306
ScaleManager - orientation updates/fixes
2014-11-12 09:17:47 +00:00
Paul
cf3bebd00c ScaleManager - orientation, minor 2014-11-11 23:02:43 -08:00
Paul
59dddece0b ScaleManager - orientation
- A few minor quibbles
2014-11-11 22:53:00 -08:00
Paul
e36027f599 ScaleManager - orientation
- Removed some "debug" logging, oops.

- And a dab of documentation updates while I'm at it..
2014-11-11 22:41:53 -08:00
Paul
0fd6a4a5b6 ScaleManager - orientation
- FIX #1306, hopefully, where an orientation change did not correclty
  cause a screen/layout update.

- FIX/CHANGE where Paused games would not update the scale
  - The new behavior "runs" the ScaleManager in a paused state via
    `pauseUpdate`; a User paused game will now correctly track scale
    changes. This is closer to the 2.1.3 behavior in some cases, such as
    window resizing, when the updates were done in the DOM event.
  - This change also affects device orientation change monitoring and
    events, which are also deferred to the update cycle
  - The update cycle is set to the maximum and is still dependent on the
    RAF / primary loop running, so it should not affect background
    apps/tabs

- FIX/CHANGE New better backoff timing; ie. continuous window resizing is
  limited to ~10 fps update calculations. This makes it much harder to
  crash Chrome by rapidly and continously resizing the window.  Also
  increases the scaling from 0..10..20..40 to 0..25..50..100.

- FIX an issue where the incorrect orientation was "one frame behind" the
  scaling.

- UPDATE The contract for when the change orientation events occurs is
  better defined - it now always happens in the update context as with
  game sizing.

- UPDATE Unifies orientation-change code / handling and duplicate.

- CHANGE Added DOM.getScreenOrientation which obtains the orientation via
  the Device Orientation API (WD) and provides comprehensive fallbacks
  - This should cover all modern browsers
  - FIX: Orientation on desktops now computed as screen ratio by default
    which fixesi the false-portrait chain/detection when the page is made
    more narrow than it is tall.
  - CHANGE/FIX: window.orientation is now only used as fallback, if
    requested (due to device differences). It may be appropriate to enable
    this (via `scale.compatibility` on boot, for instance) in some
    environments.

Signed-off-by: Paul <pstickne@gmail.com>
2014-11-11 22:30:07 -08:00
Paul
ae6cba5928 Math/Utils - various cleanup and deprecations/moves
- FIX/CHANGE - Math.wrapAngle over radians; it would convert radians to degrees
  - No internal code relies on unexpected the radians-to-degrees behavior

- Moved additional methods over to ArrayUtils, only marked deprecated in Math

- Removed some private annotations; e.g. linear / factorial public, but bernstein / catmullRom still protected

- Marked additional duplicates deprecated; e.g linearValue, angleLimit

- Documentation updates

- Fixed some accidental "Utils.Arrays" usage (oops!)

- Bumped deprecations from 2.1.4 to 2.2.0
2014-11-11 21:28:25 -08:00
Pete Baron
1c5a106b17 Modify updateRender call to use desiredFps rate when spiralling is detected. 2014-11-12 15:01:09 +13:00
Pete Baron
bc70ce74b5 Minor logic fix to nested loop counters. 2014-11-12 15:00:26 +13:00
Richard Davey
52a39cd123 Merge pull request #1314 from pjbaron/dev
getObjectsAtLocation method for Arcade Physics
2014-11-12 00:30:09 +00:00
Pete Baron
4d0fcd2165 Paste over to fix unwanted HEAD entries 2014-11-12 13:26:12 +13:00
Pete Baron
1c7059ea6c Merge remote-tracking branch 'phaser-github/dev' into dev
Conflicts:
	src/animation/FrameData.js
	src/core/Game.js
	src/particles/arcade/Emitter.js
	src/time/Time.js
	src/tween/Tween.js
2014-11-12 13:03:52 +13:00
photonstorm
788fc7e00f Because Texture.js dies without it. 2014-11-11 23:24:51 +00:00
photonstorm
1352b526c7 Merged final Pixi v2.1.0 release. 2014-11-11 23:24:50 +00:00
Pete Baron
af09290cbf Add getObjectsAtLocation method in Arcade physics. 2014-11-12 11:24:38 +13:00
Richard Davey
7d0dc68a30 Merge pull request #1308 from pnstickne/wip-jsdoc-format
JSDoc template updates - cleanup and some changes
2014-11-11 14:39:07 +00:00
photonstorm
a4e049ac63 RC3 Build files. 2014-11-11 14:31:31 +00:00
photonstorm
da031d8bbb Phaser games should now work again from the CocoonJS Launcher. 2014-11-11 14:31:20 +00:00
photonstorm
7c9dfefc8f Loader resize handler. 2014-11-11 14:00:07 +00:00
photonstorm
e63988fe6e Additional RESIZE handler. 2014-11-11 13:59:56 +00:00
photonstorm
b6001c8f21 Latest Pixi v2 fixes. 2014-11-11 13:59:43 +00:00
photonstorm
642d5355d6 Added missing DOM.js 2014-11-11 06:01:34 +00:00
photonstorm
042ceeb59d Docs update. 2014-11-11 05:56:38 +00:00
photonstorm
bc5a3287a6 Added DOM.js 2014-11-11 05:56:32 +00:00
photonstorm
bf70df2658 Game.forceSingleUpdate will force just a single logic update, regardless of the delta timer values. You can use this in extremely heavy CPU situations where you know you're about to flood the CPU but don't want Phaser to get stuck in a spiral. 2014-11-11 05:51:56 +00:00
Richard Davey
0504fa7969 Merge pull request #1309 from pnstickne/wip-scalemanager-bp2
DOM Functions - their own space
2014-11-11 01:31:39 +00:00
photonstorm
dbd2957884 Phaser 2.2.0 RC2 build. 2014-11-11 01:10:47 +00:00
photonstorm
a2aa987920 jshint fixes 2014-11-11 01:09:57 +00:00
photonstorm
d37fdd4217 Latest Pixi dev release. 2014-11-11 01:07:52 +00:00
photonstorm
9606384598 Added RC version. 2014-11-11 01:05:59 +00:00
photonstorm
a2b7d339a2 Tilemap.createFromTiles will convert all tiles matching the given tile index (or an array of indexes) into Sprites. You can optionally then replace these tiles if you wish. This is perfect for games when you want to turn specific tiles into Sprites for extra control. The Sprites have an optional properties object which they can be populated with. 2014-11-11 01:05:59 +00:00
photonstorm
347978679d docs update 2014-11-11 01:05:59 +00:00
photonstorm
8bf93fb658 ArcadePhysics.skipQuadTree is now set to true by default. A QuadTree is a wonderful thing if the objects in your game are well spaced out. But in tightly packed games, especially those with tilemaps or single-screen games, they are a considerable performance drain and eat up CPU. We've taken the decision to disable the Arcade Physics QuadTree by default. It's all still in there and can be re-enabled via game.physics.arcade.skipQuadTree = false, but please only do so if you're sure your game benefits from this. 2014-11-11 01:05:58 +00:00
Richard Davey
53caac2008 Merge pull request #1312 from DaanHaaz/patch-1
Removed an unnecessary if-statement.
2014-11-10 23:37:49 +00:00
Sheepolution
266adf06d8 Removed an unnecessary if-statement.
Not sure if it had any purpose. Maybe to make it more clear?

Just a suggestion of something I noticed.
2014-11-10 23:28:20 +01:00
Richard Davey
1de09ed20f Merge pull request #1311 from clark-stevenson/dev
Pixi updates now includes Spine. Phaser updates.
2014-11-10 22:18:06 +00:00
Clark Stevenson
1ba17ae086 Pixi updates now includes Spine. Phaser updates. 2014-11-10 21:15:52 +00:00
Paul
50729b33a2 DOM Functions
No known breaking changes - as it's still dev/internal stuff.

- Added Phaser.DOM to house new DOM functions, moved stuff
  over from ScaleManager as appropriate

- Fixed a fiew cases of missing functions

- Changed some of the new signatures to protected for the interim.
  (Maybe a `beta` tag would fit better? Public is promises!)

- Moved generic support from Canvas to DOM and added proxy/notes
  - Updated internal usages

- Updated some comments for consistency
  - Access always on bottom for members/properties, public assumed
2014-11-10 00:45:13 -08:00
Paul
4ba8fe15f7 JSDoc/Docstrap generation
- "Source" section doesn't invoke a bullet, "src/" leading path removed
- Minor styles
2014-11-09 22:04:20 -08:00
Paul
69415550c1 JSDoc/Docstrap generation - cleanup
- Reverted unecessary change
2014-11-09 21:46:28 -08:00
Paul
6d274a312f JSDoc/Docstrap generation
- Made deprecated entries more apparent
  - A deprecation notice is moved above the description to make
    it actually obvious
  - The navigation item is marked (currently with line-through)
    to visual discourage even thinking about it.

- "protected" members are displayed as "internal"
  - Enforces the idea that using them from outside the core library
    is possible even though there is no public guarantee
  - There is also and advice note added to the "Deprecated/Internal"
    section reminding the users of such.

- The "Type" heading is removed when such is trivially visible in the
  type-signature of the item.

- The "Returns" section for methods is moved before the details
  (So it is displayed about the "Source" and other details.)

- The type is better integrated into "Returns"
2014-11-09 21:41:21 -08:00
photonstorm
69ec5efc29 Phaser 2.2.0-Release Candidate build. 2014-11-10 01:41:41 +00:00
Paul
d941e285a3 Math/Utils - various cleanup and deprecations/moves
- And one last before..
2014-11-09 17:40:54 -08:00
Paul
a35d032238 Math/Utils - various cleanup and deprecations/moves
- Put in the missing changes..
2014-11-09 17:26:07 -08:00
Paul
a6d2da2a8a Math/Utils - various cleanup and deprecations/moves
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
2014-11-09 16:17:18 -08:00
photonstorm
547e7a4d1d docs update 2014-11-09 23:15:30 +00:00
Richard Davey
88df59a17d Merge pull request #1302 from pnstickne/wip-scalemanager
ScaleManager: more cleanup, pre-merged
2014-11-09 23:06:22 +00:00