Commit graph

3361 commits

Author SHA1 Message Date
photonstorm
cfbad72881 Documentation - general
Updated some documentation for formatting, consistency, and minor
corrections.
2014-11-30 04:02:45 -08:00
Paul
bf16b97bdf jsdoc - namealias fix
Fixed issue with namealias and class doclects without names.
2014-11-30 03:06:28 -08:00
Paul
c8b0052743 jsdoc - sourceproxy docs and cleanup 2014-11-30 02:32:29 -08:00
Paul
2f6c109901 jsdoc - short/friendly @link plugin
Added support for short `{@link #member}` markup. This makes interlinking
much cleaner and shorter; similar short-link support was available in
previous versions of jsdoc.
2014-11-30 02:32:10 -08:00
Paul
352d53802f jsdoc - added namealias
The namealias plugin gets jsdoc to detect lots of documentation it was not
correctly picking up due to the application of the `name` property. This
can be read about in
https://github.com/jsdoc3/jsdoc/issues/804#event-195287680 - this results
in _much_ more complete documentation generation, especially when
properties are defined in constructors.
2014-11-30 02:32:09 -08:00
Paul
6203ae0722 jsdoc - PIXI documentation filtering
Added the filterpixi.js jsdoc plugin which marks some PIXI
interaction-related methods and properties as private. This ensures that
they do not show up in the final Phaser documentation.
2014-11-30 02:31:55 -08:00
Paul
3299588326 Sprite - removed comment
The comment was no longer valid after the previos changes.
2014-11-29 14:12:14 -08:00
photonstorm
0744dddbc0 Small defs fix. 2014-11-29 19:40:50 +00:00
photonstorm
d5dfa464c0 Added alpha setting to getContext. 2014-11-29 19:40:50 +00:00
photonstorm
af4e3b1cb5 Added optional 'no physics' flags. 2014-11-29 19:40:50 +00:00
photonstorm
a012d8caa2 jsdoc update 2014-11-29 19:40:50 +00:00
Paul
dfe7279090 Minor logic fix for Sprite life update
The substraction of `physicsElapsedMS` needs to be done for all individual
updates. (When current FPS ~ target FPS this is a 1-1 mapping, but catchup
updates can throw off the calculations.)

Also renamed `Game#updateNumber` (a poor initial name on my part) to
`currentUpdateID`. This matches the naming of
`Stage#currentRenderOrderID`.
2014-11-28 23:02:31 -08:00
Richard Davey
157fce81a9 Merge pull request #1374 from pnstickne/wip-time-quibs
Time/Time - documentation updates and minor cleanup
2014-11-28 18:25:17 +00:00
Paul
e8da5e73f8 Loader - IE9 XDR used for all XHR when requested
Previously XHD was special-cased for 'json' file assets, but not all JSON
requests. Now it is used for all XHR transfers when `useXDomainRequest` is
enabled.

If XDR is used outside of IE 9 then a warning is emitted to the console.
The `useXDomainRequest` property has also been deprecated

This may address consistency issues as mentioned in
https://github.com/photonstorm/phaser/issues/1361
2014-11-28 04:21:17 -08:00
Paul
83cbbf1d21 Text - font component cleanup
Some minor cleanup of font component handling and comments.

Also adds a warning if an "unparsable font" string is encountered. Might
save someone some trouble.
2014-11-28 03:50:52 -08:00
Paul
bf3d5aa22e Text - consistency updates
Added `cssFont`, `fontStyle`, and `fontVariant` properties for better
consistency and control.
2014-11-28 02:56:44 -08:00
Paul
8eb7594b29 Text - font size/weight can be specified as style
Fulfills: https://github.com/photonstorm/phaser/issues/1370

This allows `fontSize` and `fontWeight` to be specified as part of the
style as supplied to the Text constructor (and `setStyle` method). In
addition the `fontStyle` and `fontVariant` properties can also be set -
although these are not exposed later.

This also fixes edge cases that could be caused if `Text#fontSize` was
used without `Text#fontWeight`, where the applied style defaults would be
overwritten/reset.
2014-11-28 02:20:18 -08:00
Paul
5fbbeca7ab Text - documentation updates 2014-11-28 00:12:10 -08:00
Paul
fb5a1b9946 TimerEvent - tabs to spaces
Converted tabs to spaces, for consistency
2014-11-27 23:57:42 -08:00
Paul
c5381f96ef Time/Time - documentation updates and minor cleanup
- Removed `Time.pausedTime`

  Time.pausedTime has not been used / updated since
  b255fea85f in Feb 2014.

  There might be a case to re-explore how pause time is
  reported/observable, possibly with a distinction of 'current' and 'last'
  and the semantics of such. For instance, pause duration is only updated
  after the resume occurs and reflects the duration-of-the-last-pause..

- Removed `Time` _i and _len properties These are better suited by local
  variables.

- General documentation updates.

- Marked several methods such as `Timer.order` as protected - there are
  advanced use-cases for them, but different user-facing methods and
  documentations are likely in order. Also marked `Timer.sortHandler` as
  private; but did not change any interfaces.
2014-11-27 23:54:42 -08:00
Paul
ad08c7dff2 Merge remote-tracking branch 'upstream/dev' into wip-loader 2014-11-27 22:19:24 -08:00
photonstorm
8ffd686fe1 Phaser 2.2.0-RC12 Release 2014-11-27 21:33:21 +00:00
photonstorm
30d2d1973a readme update. 2014-11-27 21:33:21 +00:00
Richard Davey
c3fc3ec089 Merge pull request #1373 from clark-stevenson/dev
Small Updates
2014-11-27 19:25:06 +00:00
Clark Stevenson
977f576c11 Small Updates 2014-11-27 16:01:02 +00:00
Richard Davey
42066f20dd Merge pull request #1372 from pnstickne/wip-tileset-non-even
Tilemap - Tiled image size calculation
2014-11-27 13:10:04 +00:00
Paul
47c49b18cf Tilemap - Tiled image size calculation
Addresses https://github.com/photonstorm/phaser/issues/1371 - where Tiled
used floor calculations and Phaser used round calculations.

There are no breaking changes with the demos; however, if there was code
that relied on behavior that _deviated_ from the defactor Tilemap behavior
then may be prone to "incorrect results" if using tileset images that are
not correctly aligned to tilesize multiples.

This also adds/corrects some warnings:
- A warning when the tileset size is not an even multiple (it was
  suppressed due to using `round` prior to the checks.
- A warning if loading an image changes the cols/rows of a Tileset
- A specific warning for Tileset Image Collections which are not yet
  supported
2014-11-26 19:50:07 -08:00
photonstorm
2488359277 RC12 Prep. 2014-11-26 13:13:50 +00:00
photonstorm
471ad20b4a Added Time.physicsElapsedMS and used in Sprite lifespan and Tweens. 2014-11-26 13:13:25 +00:00
photonstorm
fb733ddcca onPreRenderCallback wasn't being cleared on a State swap. 2014-11-26 13:12:51 +00:00
photonstorm
fc457f5aca Added missing docs. 2014-11-26 04:16:52 +00:00
Richard Davey
4f88ec06c5 Merge pull request #1364 from pnstickne/wip-doc-fixes
yuidoc-to-jsdoc - bug fix and jsobj-like mapping
2014-11-26 00:44:37 +00:00
photonstorm
667d477a16 P2.BodyDebug always lagged behind the position of the Body it was tracking by one frame, which became visible at high speeds. It now syncs its position in the Body.postUpdate which prevents this from happening (thanks @valueerror) 2014-11-25 22:21:11 +00:00
photonstorm
3d3920efab Various jsdoc fixes. 2014-11-25 21:13:25 +00:00
Richard Davey
9880ccbfe6 Merge pull request #1369 from clark-stevenson/dev
Fixed #1368
2014-11-25 19:15:01 +00:00
Paul
056d18cb43 yuidoc-to-jsdoc - jshint fix 2014-11-25 10:15:29 -08:00
Clark Stevenson
e0270fdbb9 Fixed #1368 2014-11-25 17:30:33 +00:00
photonstorm
e86f00eb55 Text.lineSpacing works correctly again. Before no space was added between the lines (thanks @intimidate #1367 and @brejep #1366) 2014-11-25 17:06:17 +00:00
Richard Davey
bc588ef09f Merge pull request #1367 from Gynzy/dev
fix issue with lineSpacing, no space was added between the lines. The co...
2014-11-25 16:39:11 +00:00
Tim van den Eijnden
990867547e fix issue with lineSpacing, no space was added between the lines. The complete text moved down instead 2014-11-25 16:45:29 +01:00
Tim van den Eijnden
7880fdec5f Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/loader/Cache.js
2014-11-25 16:26:49 +01:00
photonstorm
72eaee3139 Adjusted Sprite.preUpdate to remove the lifespan calculation. 2014-11-25 14:18:18 +00:00
photonstorm
1068563914 jsdoc fixes. 2014-11-25 14:15:55 +00:00
Richard Davey
eec846666a Merge pull request #1363 from pnstickne/wip-time-clarify
Time - clarify, Game update expose, and Sprite lifespan update
2014-11-25 14:15:41 +00:00
photonstorm
7aaa63e7a5 When you change State the P2 Physics world is no longer fully cleared. All of the bodies, springs, fixtures, materials and constraints are removed - but config settings such as gravity, restitution, the contact solver, etc are all retained. The P2.World object is only created the very first time you call Physics.startSystem. Every subsequent call hits P2.World.reset instead (#1292) 2014-11-25 12:09:03 +00:00
Paul
12b2d4485c yuidoc-to-jsdoc - bug fix and jsobj-like mapping
Fixed bug with incorrect generation of "Array<>".

Added a primitive type-accepter for jsobject-like (for some very primitive
value); but it covers the PIXI case.
2014-11-25 02:34:59 -08:00
Paul
e28197e6fa Time - documentation
- Removed previous elapsed/elapsedMS deprecation as they act differently
  when the game has been resumed, assuming that it has been properly
  paused.

- Refined documentation

- Moved a few properties for better logical grouping

- Annotated timeToCall and timeExpected as protected
2014-11-25 01:46:30 -08:00
Paul
e8869e057a Game/Time - updateNumber and updatesThsiFrame
- Changed `count` from 0d9678e512 to
  `updateNumber` and expanded documentation; also moved primary usage back
  to local variable.

- Added `updatesThisFrame` which allows (logic) code to detect if it is
  the last update, or if there are pending updates the same frame. While
  it could be adventageous in certain cases it will be problematic if such
  update logic relies in the supplied delta time, as such should change if
  fixed-timing is deviated from or extended updates are done.

- Formatting and documentation.
2014-11-25 01:04:36 -08:00
Paul
e2f65f58a8 Merge commit '0d9678e512f9037b686ca480907c90f82d5b631e' into wip-time-clarify 2014-11-25 00:35:31 -08:00
Paul
5f9025f800 Sprite/Time - lifespan based on physicsTime
- Lifespan is updated based on physics time which makes this consistent
  with fixed-step updates and tweens, etc.
2014-11-25 00:33:13 -08:00