Commit graph

3717 commits

Author SHA1 Message Date
photonstorm
0516167c3d Finally tracked down the rogue bug causing Graphics objects to not work with various components (fix #1654) 2015-03-10 14:23:49 +00:00
photonstorm
fe9a9fcd63 More Pixi updates. 2015-03-05 19:26:53 +00:00
photonstorm
f4eff6359c Added isArray check. 2015-03-05 14:02:24 +00:00
photonstorm
889c85cd81 Updated copyright year. 2015-03-05 14:02:15 +00:00
photonstorm
364f3b3cb8 Formatting. 2015-03-05 14:02:04 +00:00
photonstorm
893d36f128 jsdoc fix. 2015-03-05 14:01:52 +00:00
photonstorm
d717c5c180 Removed final traces of _interactive properties and checks. Also added preUpdate catch. 2015-03-05 14:01:43 +00:00
photonstorm
ed3afed2ff Fixed spelling mistake. 2015-03-05 14:00:57 +00:00
photonstorm
0a45223cd4 Resuming a sound needs the onended handler adding back in again. 2015-03-04 00:32:33 +00:00
photonstorm
59a72ffa80 Grunt file now properly includes stub files for Game core managers. 2015-03-04 00:32:33 +00:00
Richard Davey
cc8653ff65 Merge pull request #1652 from clark-stevenson/dev
Minor Updates
2015-03-04 00:09:42 +00:00
Clark Stevenson
c350d21b0b Minor Updates 2015-03-03 21:15:11 +00:00
Richard Davey
7eb73e99a8 Merge pull request #1648 from pnstickne/wip-components-docs
Component documentation
2015-03-01 10:46:55 +00:00
Richard Davey
5a620f93fd Merge pull request #1647 from pnstickne/wip-components-toproto
Moved component installation out of constructors
2015-03-01 10:44:56 +00:00
Paul
4de95c09b5 Component documentation
- Required changes for documentation to show up correctly
  - Uses multiple @extends, which currently [mostly] works in jsdoc
    and like closure compiler
2015-02-28 23:00:17 -08:00
Paul
ee34327c93 Components: bug fixes
- Use property check ('in') to avoid property access

- Promoted 'body' property for physics
2015-02-28 17:49:45 -08:00
Paul
0e5272b217 Merge remote-tracking branch 'upstream/dev' into wip-components-toproto
Conflicts:
	src/gameobjects/Image.js
	src/gameobjects/Rope.js
	src/gameobjects/Sprite.js
	src/gameobjects/Text.js
	src/gameobjects/TileSprite.js
	src/gameobjects/components/Core.js
2015-02-28 15:51:47 -08:00
photonstorm
2483cd5df4 Various readonly Body properties flagged as 'readonly' in the jsdocs (#1643) 2015-02-26 23:32:14 +00:00
photonstorm
53b1562eb6 jshint fix 2015-02-26 23:12:26 +00:00
Richard Davey
c819f0b508 Merge pull request #1642 from zekoff/tileset-render-fix
Fix row/col count formula.
2015-02-26 21:28:21 +00:00
Richard Davey
ef5d7a9b3b Merge pull request #1638 from clark-stevenson/dev
Weekly Review
2015-02-26 21:25:00 +00:00
photonstorm
f99f182a6f Arcade Physics is now using a spacial pre-sort for all Sprite vs. Group and Group vs. Group collisions. You can define the direction the sort will prioritise via the new sortDirection property. By default it is set to Phaser.Physics.Arcade.LEFT_RIGHT. For example if you are making a horizontally scrolling game, where the player starts on the left and moves to the right, then this sort order will allow the physics system to quickly eliminate any object to the right of the players bounds. This cuts down on the sheer volume of actual collision checks needing to be made. In a densely populated level it can improve fps rate dramatically.
There are 3 other directions available (`RIGHT_LEFT`, `TOP_BOTTOM` and `BOTTOM_TOP`) and which one you need will depend on your game type. If you were making a vertically scrolling shoot-em-up then you'd pick `BOTTOM_TOP` so it sorts all objects above and can bail out quickly.

More importantly you can switch the `sortDirection` at run-time with no loss of performance. Just make sure you do it *before* running any collision checks. So if you had a large 8-way scrolling world you could set the `sortDirection` to match the direction the player was moving in and adjust it in real-time, getting the benefits as you go. My thanks to Aaron Lahman for inspiring this update.
2015-02-26 21:24:07 +00:00
photonstorm
74eeddf956 You can now set a resolution property in your Game Configuration object. This will be read when the Pixi renderer instance is created and used to set the resolution within that (#1621) 2015-02-26 10:52:30 +00:00
Michael Zekoff
510353f6fb Fix row/col count formula.
This fixes the rendering issue for tilesets with margin/spacing
as described in photonstorm/phaser#1641.
2015-02-26 04:34:41 +00:00
photonstorm
41396d5ad2 Merged all of the relevant Pixi 2.2.7 fixes in (#1621) 2015-02-25 17:04:48 +00:00
photonstorm
03a2db18cb Added extra protection in the case of mixed-type Groups.
Removed window vars and replaced with stats property.
Removed redundant if/else checks.
2015-02-25 06:06:40 +00:00
photonstorm
8aec760cd5 First pass at spacial sorting in World.collide. 2015-02-25 05:39:02 +00:00
photonstorm
321e11d0a5 A State swap now sets the Loader.reset hard parameter to true by default. This will null any Loader.preloadSprite that may have been set (#1636) 2015-02-25 05:18:49 +00:00
photonstorm
a69e53f901 Copyright date change. 2015-02-25 03:36:23 +00:00
photonstorm
466a4d11bb Loader.preloadSprite had an extra guard added to ensure it didn't try to updateCrop a non-existent sprite (thanks @noidexe #1636) 2015-02-25 03:08:37 +00:00
photonstorm
eb8e99021b Updated Grunt script with 'build' task back + new dist builds. 2015-02-25 02:59:00 +00:00
photonstorm
dee13d52d8 jshint fix. 2015-02-25 02:50:57 +00:00
photonstorm
ae7a1fda05 Optimised preUpdate callbacks. 2015-02-25 02:49:50 +00:00
photonstorm
ee48675a28 Fixed trimmed TileSprites in Canvas (WebGL still broken, as it's broken in Pixi also) 2015-02-25 02:49:38 +00:00
photonstorm
72530d963b Default exists should be true! 2015-02-25 02:49:19 +00:00
photonstorm
c799dfe7da Fixed physics postUpdate issue causing particles and all kinds of things to go awry. 2015-02-25 02:18:05 +00:00
photonstorm
ec19abb91c Component preUpdate changes. 2015-02-25 00:59:27 +00:00
photonstorm
3d399f1b14 Removed the final few private vars from computeVelocity 2015-02-25 00:04:53 +00:00
photonstorm
c9939f8691 Tilemap fix #1635 2015-02-24 22:57:59 +00:00
photonstorm
1dee5f260b Updated config handler to go with new Debug page. 2015-02-24 21:28:44 +00:00
Clark Stevenson
7994427583 Weekly Review 2015-02-24 01:22:13 +00:00
photonstorm
4750cc9527 And actually commit it too. 2015-02-23 15:07:22 +00:00
photonstorm
5635bed54f Docs update. 2015-02-23 13:58:57 +00:00
photonstorm
42b316473d jsdoc fix. 2015-02-23 13:58:57 +00:00
Richard Davey
78800b7c38 Merge pull request #1623 from zeh/patch-1
Updated to Pixi 2.2.5
2015-02-23 13:54:55 +00:00
Richard Davey
46c6a86e06 Merge pull request #1634 from pnstickne/wip-jsdoc-fix3
Corrected comment causing jsdoc-abort
2015-02-23 13:54:35 +00:00
Paul
3e5c1532d8 Fixed jsdoc-abort bug with "||" in jsdoc type
- jsdoc aborts on x||y found in types..
2015-02-22 20:51:00 -08:00
Paul
4f747a1c00 Components - moving install to prototype
- This ensures the components are regsitered once per type
  instead of once per instance (which is duplicate work)
2015-02-22 20:44:11 -08:00
photonstorm
a75e28d2b8 jshint fixes. 2015-02-22 20:08:44 +00:00
photonstorm
8b7085e20a RenderTexture guards. 2015-02-22 19:30:43 +00:00