photonstorm
d45a7bae8e
Fixed constructor.
2015-03-25 12:59:41 +00:00
photonstorm
e7400be625
Formatting updates.
2015-03-25 12:59:31 +00:00
photonstorm
b1cdb358bb
Merging in fixes from Pixi 3.
2015-03-25 11:04:58 +00:00
photonstorm
17b2eafbf3
Split GraphicsData to its own file.
2015-03-25 11:04:48 +00:00
photonstorm
93ed950f89
Small geom tidy-up.
2015-03-25 11:04:31 +00:00
photonstorm
f4d55b7785
When an Emitter is destroyed via Emitter.destroy it now removes itself from the Phaser Particle Manager, freeing it up for garbage collection and stopping it from being processed.
2015-03-25 05:07:39 +00:00
photonstorm
aa13ec0165
Animation.play wouldn't correctly set the play state on the Game Objects AnimationManager causing the animation to fail to start (calling AnimationManager.play did work however), now they're both consistently working.
2015-03-25 03:59:36 +00:00
photonstorm
244372384e
When an Animation completes playback and isn't set to loop it would change the currentFrame
property to be the first frame in the set after the onComplete
callback had fired. This meant if you set a Sprite to a new frame within an Animation onComplete callback then your change would have been overwritten by the animation itself. This is now no longer the case.
2015-03-24 23:17:13 +00:00
photonstorm
83adc51698
Fixed the FixedToCamera :)
2015-03-24 21:35:09 +00:00
photonstorm
c4b83a1394
Phaser 2.3 Release Candidate 1.
2015-03-24 16:05:52 +00:00
photonstorm
96e313e768
If you paused a Sound object that is using audio markers and then resumed it, it wouldn't correctly calculate the resume duration - causing the sound to sometimes play into the marker that followed it (thanks @AnderbergE #1669 )
2015-03-24 14:43:35 +00:00
photonstorm
7e19f45350
When the Game first boots it will now call window.focus()
. This allows keyboard events to work properly in IE when the game is running inside an iframe. You can stop this from happening by setting window.PhaserGlobal.stopFocus = true
(thanks @webholics #1681 )
2015-03-24 13:27:27 +00:00
photonstorm
ebdb6d028f
The Physics Manager now has a new reset
method which will reset the active physics systems. This is called automatically on a State swap (thanks @englercj #1691 )
2015-03-24 10:21:12 +00:00
photonstorm
7aa4d0ad0d
When a State is started and linked to Phaser it has a new property created on it: key
, which is the string identifier used by the State.
2015-03-24 10:21:03 +00:00
photonstorm
12fc424305
Huge amount of jsdoc updates.
2015-03-23 23:46:09 +00:00
photonstorm
08c9513f98
Improving the Component documentation.
2015-03-23 19:56:23 +00:00
photonstorm
85c8f60d7c
Removed 'global' component arrays.
2015-03-23 19:19:07 +00:00
photonstorm
b7b622a556
Text style has a new optional property: backgroundColor
which is a Canvas fill style that is set behind all Text in the Text object. It allows you to set a background color without having to use an additional Graphics object.
...
Text.lineSpacing can now accept negative values without cutting the bottom of the Text object off. The value can never be less than the height of a single line of text.
Text.lineSpacing is no longer applied to the first line of Text, which prevents text from being cut off further down the Text object.
2015-03-23 16:12:23 +00:00
photonstorm
7010883bc3
Tidying up.
2015-03-23 15:07:09 +00:00
photonstorm
77eaa7e707
Optimised World.collideHandler and added SORT_NONE option.
2015-03-23 15:05:57 +00:00
photonstorm
b07ce89236
sourceWidth / Height now only set from the texture if the object has a texture.
2015-03-23 15:05:39 +00:00
photonstorm
1486e166bd
Added physicsType property.
2015-03-23 15:04:27 +00:00
photonstorm
55048a4b25
BitmapText objects now have an anchor
property. This works in a similar way to Sprite.anchor except that it offsets the position of each letter of the BitmapText by the given amount, based on the overall BitmapText width - whereas Sprite.anchor offsets the position the texture is drawn at.
2015-03-23 15:03:53 +00:00
photonstorm
506ff8843e
Fixed incorrect use of this.response which broke Binary files with callbacks. Should be all of them caught now - ProTracker example now works again as a result too.
2015-03-23 10:52:43 +00:00
photonstorm
35a9bdcfc9
Fixed loading of physics json data (old responseText reference)
2015-03-23 10:46:38 +00:00
photonstorm
ba052389a3
New version of p2.js merged for testing.
2015-03-23 10:11:49 +00:00
photonstorm
3f30a3d0d2
jsdocs updates.
2015-03-23 10:11:39 +00:00
photonstorm
ca752cc59c
jsdoc updates.
2015-03-23 08:13:59 +00:00
photonstorm
a190823dad
jsdoc fix.
2015-03-23 08:13:59 +00:00
photonstorm
4e3d189678
Updated Pixi version.
2015-03-23 08:13:59 +00:00
Richard Davey
ae72107de8
Merge pull request #1685 from pnstickne/wip-1679
...
Animation - guard around destroy
2015-03-23 07:53:59 +00:00
Richard Davey
a10a18277a
Merge pull request #1686 from englercj/dev
...
Add debug drawing for p2 capsule shape
2015-03-23 07:47:30 +00:00
Chad Engler
f5af981da3
fix missing semicolon
2015-03-22 21:28:27 -07:00
Chad Engler
97410f8907
add debug drawing for p2 capsule shape
2015-03-22 19:45:18 -07:00
Paul
6225bb0e94
Animation - guard around destroy
...
- Allows sprites (and/or the animation) to be destroyed from within
the onUpdate, onLoop, or onComplete events
2015-03-22 17:01:37 -07:00
photonstorm
cb9ef4f12e
Text.padding specifies a padding value which is added to the line width and height when calculating the Text size. ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions ( #1561 #1518 )
2015-03-19 01:54:14 +00:00
photonstorm
b13acdb23b
TilingSprite.destroy fixed if TilingSprite hasn't ever been rendered ( #1663 )
2015-03-19 01:39:39 +00:00
photonstorm
5a9b509b44
ArraySet.removeAll allows you to remove all members of an ArraySet and optionally call destroy
on them as well.
...
GameObject.input.dragStartPoint now stores the coordinates the object was at when the drag started. This value is populated when the drag starts. It can be used to return an object to its pre-drag position, for example if it was dropped in an invalid place in-game.
2015-03-19 00:51:13 +00:00
breakosaur
bb600b4319
Fixed a few documentation typos.
2015-03-18 21:07:36 +00:00
Richard Davey
358e0a6675
Merge pull request #1674 from englercj/dev
...
Fix debug drawing for p2 physics bodies
2015-03-18 19:21:59 +00:00
photonstorm
165e5935c2
JSDoc fixes.
2015-03-18 19:14:58 +00:00
Chad Engler
0b3850cc0c
Fix debug drawing for p2 physics bodies
2015-03-18 01:19:32 -07:00
Paul
dcc83ec793
Tilemap renderer - context save/restore
...
- Added context save/restore; the secondary issue when the canvas
is copied from later, and if any alpha is applied
2015-03-16 22:05:46 -07:00
Paul
54dba67f50
Tilemap rendering sets initial state better
...
- #1666 - previous alpha state could bleed through.
Now the initial alpha and composite modes are set explicitly.
2015-03-16 21:35:39 -07:00
Paul
cc5d1d02e5
Loader: loading from pack data
...
- Corrected logic where packs added via data would still try to be loaded.
This makes the behavior correct per the documentation and v2.2
2015-03-15 20:26:37 -07:00
photonstorm
6cf982a4a0
Fixed to Destroy component if still in render loop.
2015-03-11 01:44:46 +00:00
photonstorm
ee61d95980
Tidying up the Pixi source.
...
Added DisplayObject.destroy to cleanly remove all references, callbacks and cached textures (fixes #1656 )
2015-03-10 15:13:37 +00:00
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
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
Richard Davey
7eb73e99a8
Merge pull request #1648 from pnstickne/wip-components-docs
...
Component documentation
2015-03-01 10:46:55 +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
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
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
42b316473d
jsdoc fix.
2015-02-23 13:58:57 +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
photonstorm
e93ded324f
Added missing class var.
2015-02-22 19:30:34 +00:00
photonstorm
5fd066c610
ArraySet.getByKey gets an item from the set based on the property strictly equaling the value given.
2015-02-22 19:30:23 +00:00
photonstorm
8d71e8a32c
Animation.update skips ahead frames when the system is lagging, however it failed to set the animation to the final frame in the sequence if the animation skipped ahead too far (thanks @richpixel #1628 )
2015-02-22 19:26:56 +00:00
photonstorm
ba08498e73
Fixed bug with the watch list not checking decode status by key properly.
2015-02-20 00:58:05 +00:00
photonstorm
bec18cb46c
Removed redundant event call.
2015-02-19 15:27:59 +00:00
photonstorm
babd303a2a
Manager stubs for new custom build process.
2015-02-19 05:01:12 +00:00
photonstorm
3d0bc682f0
Moved Events.
2015-02-19 05:00:55 +00:00
photonstorm
f613e5882e
Allowed Keyboard and Gamepad to be optional.
2015-02-19 05:00:41 +00:00
photonstorm
a7bdce1806
Moved collideSpriteVsTilemapLayer to here.
2015-02-19 05:00:22 +00:00
photonstorm
eb732e1d90
Refactored ArcadePhysics.World to remove global property use and array length caches.
2015-02-19 04:59:55 +00:00
photonstorm
02ef1555c5
A TweenData wouldn't take into account the repeatDelay
property when repeating the tween, but now does. A TweenData also has a new property yoyoDelay
which controls the delay before the yoyo will start, allowing you to set both independently (thanks @DreadKnight #1469 )
...
Tween.updateTweenData allows you to set a property to the given value across one or all of the current tweens. All of the Tween methods like Tween.delay and Tween.repeat have been updated to use this.
Tween.repeat has a new parameter `repeatDelay` which allows you to set the delay (in ms) before a tween will repeat itself.
Tween.yoyo has a new parameter `yoyoDelay` which allows you to set the delay (in ms) before a tween will start a yoyo.
Tween.interpolation has a new parameter `context` which allows you to define the context in which the interpolation function will run.
2015-02-19 00:51:32 +00:00
photonstorm
35b4926eb8
Undoing previous change - doesn't actually work at all! #1620
2015-02-18 23:32:12 +00:00
photonstorm
4699770520
Adjusted function order.
2015-02-18 23:15:54 +00:00
photonstorm
9effb4a946
Stage.visibilityChange now has a second parameter fromPhaser
. This is set to true
by the Stage._onChange
callback. This should mean that when Phaser is listening for window.onblur
and window.onfocus
events it will only trigger the visibilityChange if that event was generated by Phaser itself. If it was generated by something else on the page or iframe it should now be ignored (thanks @austinhallock #1620 )
2015-02-18 23:12:08 +00:00
photonstorm
88f10f7f89
Updated fixedToCamera docs to reflect non-nesting ( #1596 )
2015-02-18 22:58:48 +00:00
photonstorm
b0261e4a5f
Group.cursorIndex is the index of the item the Group cursor points to. This replaces Group._cache[8].
2015-02-18 22:54:19 +00:00
photonstorm
88ab104da4
BitmapText has a new maxWidth
property that will attempt to wrap the text if it exceeds the width specified.
2015-02-18 22:36:12 +00:00
photonstorm
ba727555c8
Emitter.flow now works in a slightly different (and more useful!) way. You can now specify a quantity
and a total
. The quantity
controls how many particles are emitted every time the flow frequency is met. The total
controls how many particles will be emitted in total. You can set total
to be -1 and it will carry on emitting at the given frequency forever (also fixes #1598 thanks @brianbunch)
2015-02-18 22:35:05 +00:00
photonstorm
9879fc6387
If you load an image and provide a key that was already in-use in the Cache, then the old image is now destroyed (via Cache.removeImage
) and the new image takes its place.
2015-02-18 16:58:08 +00:00
photonstorm
72d1c13b6b
Fixed jshint error.
2015-02-18 14:54:19 +00:00
photonstorm
58d37b51fe
Fixed canvas destroy if undefined.
2015-02-18 14:54:11 +00:00
photonstorm
ef3cb1f31d
Sound in Web Audio now uses AudioContext.onended to trigger when it will stop playing instead of using a time based value. This is only used if the sound doesn't loop and isn't an audio sprite, but will give a much more accurate Sound.onStop
event. It also prevents short audio files from being cut off during playback ( #1471 ) and accounts for time spent decoding.
2015-02-18 11:25:17 +00:00
photonstorm
eba1743404
jshint fixes.
2015-02-18 10:25:27 +00:00
photonstorm
f47fb7a7c7
jshint fixes.
2015-02-17 18:16:12 +00:00
photonstorm
819826ce08
Added Polygon.flatten and Polygon.toNumberArray.
...
Fixed Graphics.lineTo if no moveTo has been specified.
Fixed Graphics.drawShape if a mixed-type Polygon has been given.
2015-02-17 18:03:15 +00:00
photonstorm
97ebfce7a6
Fixed Matrix.apply.
2015-02-17 18:02:40 +00:00
photonstorm
f59d7e3430
Working through Graphics class updates.
2015-02-17 16:40:41 +00:00
photonstorm
8b2f5fc98b
Added the missing Geom types.
2015-02-17 16:39:49 +00:00
photonstorm
11889cd6b5
Added the Graphics consts.
2015-02-17 16:39:40 +00:00
photonstorm
8f86f911af
Formatting.
2015-02-17 16:39:29 +00:00
photonstorm
872048eb6c
Commented-out all EventListener related code for testing.
2015-02-17 16:39:14 +00:00
photonstorm
7b9ae51f6f
Removed duplicate polyfills.
2015-02-17 16:38:44 +00:00
photonstorm
41e2fbff55
TilemapLayer no longer extends Image, but is a GameObject of its own.
2015-02-17 16:38:27 +00:00
photonstorm
e100f2f528
Added in type properties.
2015-02-17 16:38:07 +00:00
photonstorm
f561659367
Removed sayHello (covered in Phaser banner)
2015-02-17 15:50:31 +00:00
photonstorm
5b8635d334
Removed all Stage interaction related code.
2015-02-17 15:50:12 +00:00
photonstorm
052b9a7e06
Separated the Tilemap specific code from World.
2015-02-17 15:49:53 +00:00
photonstorm
fa7fee99b6
Moved Matrix and RoundedRectangle into Phaser geom structure.
2015-02-17 15:49:30 +00:00
photonstorm
77a3bfea23
loadTexture guard.
2015-02-17 15:48:54 +00:00
photonstorm
5b0c751647
Animation component guard.
2015-02-17 15:48:43 +00:00
photonstorm
b2cfb29740
Moved all code that modified Pixi globals into its own file, so we can call it after the Phaser overrides are in place.
2015-02-17 15:48:33 +00:00
photonstorm
075347c1e8
jsdocs tidying.
2015-02-17 15:47:50 +00:00
photonstorm
8c786a2df5
Removing Pixi files no longer used in this build of Phaser.
2015-02-17 15:46:52 +00:00
photonstorm
17e2d22962
mixinPrototype can now clone objects that support it.
2015-02-17 15:45:37 +00:00
photonstorm
52f4a037a3
Added 'replace' parameter to mixinPrototype.
2015-02-17 06:01:25 +00:00
photonstorm
9fd5ae119b
jsdocs update.
2015-02-17 06:01:09 +00:00
photonstorm
6a0a44d47e
Small code update.
2015-02-17 06:00:55 +00:00
photonstorm
167bbde8d4
Game Objects all now using the new Components mixins.
2015-02-17 06:00:41 +00:00
photonstorm
4bb1adcf36
Typo fix.
2015-02-17 06:00:18 +00:00
photonstorm
166c0363fc
jshint fixes
2015-02-17 05:59:54 +00:00
photonstorm
bf4c1d0620
Split out all the common GameObject features into components.
2015-02-17 05:15:04 +00:00
photonstorm
f64f9c1d15
Added mixinPrototype.
2015-02-17 05:14:23 +00:00
photonstorm
57ff6f4176
Fixed applyInverse point cache bug.
2015-02-17 05:14:09 +00:00
photonstorm
1229c791b3
Added Body.dirty flag (reserved for future use)
2015-02-17 05:13:54 +00:00
photonstorm
0588f95f4c
Body.phase renamed to Body.dirty.
2015-02-17 05:13:36 +00:00
photonstorm
86f05160b7
Removed array length vars and added strict equalities.
2015-02-17 05:13:12 +00:00
photonstorm
8483eac6aa
Removing all use of _cache from all Game Objects.
2015-02-16 17:22:51 +00:00
photonstorm
9670c8aa86
InputHandler.enableDrag with a boundsRect set now takes into account the Sprites anchor when limiting the drag (thanks @unindented #1593 )
...
InputHandler.enableDrag with a boundsSprite set now takes into account both the Sprites anchor and the boundsSprite anchor when limiting the drag.
2015-02-16 15:49:46 +00:00
photonstorm
8c23bca62d
Sprite.left, Sprite.right, Sprite.top, Sprite.bottom are new properties that contain the totals of the Sprite position and dimensions, adjusted for the anchor.
...
Sprite.offsetX and Sprite.offsetY contain the offsets from the Sprite.x/y coordinates to the top-left of the Sprite, taking anchor into consideration.
2015-02-16 15:47:55 +00:00
photonstorm
01a23b7d91
Tween.to now correctly accepts arrays are destination values, which makes the Tween interpolate through each value specified in the array using the defined Tween.interpolation method (see new example, thanks @FridayMarch26th #1619 )
...
Tween.interpolationFunction was using the incorrect context to invoke the function. This is now defined in `TweenData.interpolationFunctionContext` and defaults to `Phaser.Math`. If you provide your own interpolation function then please adjust the context accordingly (thanks @FridayMarch26th #1618 )
2015-02-16 12:23:54 +00:00
photonstorm
ae198e9364
InputHandler was using the wrong property in checkBoundsSprite
when fixedToCamera (thanks @yig #1613 )
2015-02-14 19:10:06 +00:00
photonstorm
e9a77d95eb
Deviations, oh the horror!
2015-02-12 09:44:53 +00:00
photonstorm
f60b2b7635
World.setBounds if called after you had already started P2 Physics would incorrectly create a new collision group for the wall objects. P2.World now remembers the settings you provide for each wall and the collision group, and re-applies these settings should the world dimensions ever change (thanks @nextht #1455 )
2015-02-11 22:33:29 +00:00
photonstorm
b692d3b456
PIXI.TextureSilentFail is a boolean that defaults to false
. If true
then PIXI.Texture.setFrame
will no longer throw an error if the texture dimensions are incorrect. Instead Texture.valid
will be set to false
( #1556 )
2015-02-11 22:10:53 +00:00
photonstorm
daf8440247
Tile.properties is now unique to that specific Tile, and not a reference to the Tileset index bound properties object. Tile.properties can now be modified freely without impacting other tiles sharing the same id ( #1254 )
2015-02-11 21:40:37 +00:00
photonstorm
8892f46a83
PIXI.WebGLRenderer.destroy has been fixed to decrement the glContextId
and remove it from the PIXI.instances global. Game.destroy
now hooks into this. This now means that you can now delete and create your Phaser game over and over without it crashing WebGL after the 4th attempt ( #1260 )
2015-02-11 21:02:15 +00:00
photonstorm
b68c3071a6
Phaser.Ellipse.contains is now working again (thanks @spayton)
2015-02-11 18:51:35 +00:00
photonstorm
0e7820bde5
Group.forEach (and many other Group methods) now uses the children.length
value directly instead of caching it, which both helps performance and stops the loop from breaking should you remove a Group child in the invoked callback.
2015-02-11 17:19:56 +00:00
photonstorm
5967f01a49
jshint fix.
2015-02-11 16:57:24 +00:00
photonstorm
c243222889
Docs update #1231
2015-02-11 16:41:56 +00:00
photonstorm
599bcf5f97
Loader.audiosprite has a new jsonData
parameter. It allows you to pass a pre-existing JSON object (or a string which will be parsed as JSON) to use as the audiosprite data, instead of specifying a URL to a JSON file on the server (thanks @jounii #1447 )
...
Loader.audiosprite has a new `autoDecode` parameter. If `true` the audio file will be decoded immediately upon load.
2015-02-11 16:16:58 +00:00
photonstorm
aa2df803b7
Pointer.stop would call event.preventDefault
if Pointer._stateReset
was true
, which is always true
after a State has changed and before Pointer.start has been called. However this broken interacting with DOM elements in the case where the State changes and you immediately try to use the DOM element without first having clicked on the Phaser game. An additional guard was added so preventDefault
will now only be called if both _stateReste
and Pointer.withinGame
are true (thanks @satan6 #1509 )
2015-02-11 16:03:24 +00:00
photonstorm
42c75c0ad2
Updated jsdocs to mention roundPixels ( #1377 )
2015-02-11 15:32:52 +00:00
Richard Davey
b560af992f
Merge pull request #1375 from pnstickne/wip-text-consistency
...
Text - font components can be specified as part of "style"
2015-02-11 15:06:48 +00:00
photonstorm
6b8622a336
Timer.update was calling the TimerEvent callback even if TimerEvent.pendingDelete
was already set to true
, causing timer events to stack-up in cases where a new TimerEvent was generated in the callback (thanks @clowerweb #838 )
2015-02-11 14:43:23 +00:00
photonstorm
74bee324a5
Sound.fadeIn now supports fading from a marker, as well as the entire audio clip, so now works with audio sprites (thanks @vorrin #1413 )
2015-02-11 13:52:16 +00:00
photonstorm
6506e8d7e6
JSdocs update ( fix #1520 )
2015-02-11 13:47:58 +00:00
photonstorm
ff76cf75ad
jsdoc fixes.
2015-02-11 05:19:09 +00:00
photonstorm
29fd37aed7
Formatting update.
2015-02-11 05:19:00 +00:00
photonstorm
ea86bc85b4
jsdoc typo / spelling fixes.
...
Also all audio decoding is now passed to the SoundManager to handle, rather than duplicate the effort in the Loader.
2015-02-11 05:18:52 +00:00
photonstorm
dfee82834d
Sound.loop even when set for WebAudio wouldn't use the AudioContext loop property because Sound.start was being invoked with an offset and duration. Now if loop
is true and no marker is being used it will use the native Web Audio loop support ( #1431 )
...
SoundManager.setDecodedCallback lets you specify a list of Sound files, or keys, and a callback. Once all of the Sound files have finished decoding the callback will be invoked. The amount of time spent decoding depends on the codec used and file size. If all of the files given have already decoded the callback is triggered immediately.
Sound.loopFull is a new method that will start playback of the Sound and set it to loop in its entirety.
2015-02-11 05:17:53 +00:00
photonstorm
18ff04810f
ArcadePhysics.distanceToPointer now calculates the distance in world space values.
...
ArcadePhysics.moveToPointer no longer goes crazy if the maxTime parameter is given and the Sprite is positioned in a larger game world (thanks @AnderbergE #1472 )
2015-02-10 22:16:35 +00:00
photonstorm
7a066a3a8c
World.setBounds will now adjust the World.x/y values to match those given ( #1555 )
2015-02-10 21:40:53 +00:00
photonstorm
cc7096b045
jsdoc fix #1543
2015-02-10 21:22:36 +00:00
photonstorm
0054dc996b
The Loader now directly calls StateManager.loadComplete rather than the StateManager listening for the loadComplete event, because Loader.reset unbinds this event (and it's easy to accidentally remove it too)
...
Loader.onLoadComplete is dispatched *before* the Loader is reset. If you have a `create` method in your State please note that the Loader will have been reset before this method is called. This allows you to immediately re-use the Loader without having to first reset it manually.
2015-02-10 17:04:04 +00:00
photonstorm
dfc8ff32d2
You can now tint animated Sprites in Canvas mode. Or change the texture atlas frame of a tinted Sprite or Image. Please note that this is pretty expensive (depending in the browser), as the tint is re-applied every time the *frame changes*. The Pixi tint cache has also been removed to allow for subtle tint color shifts and to avoid blowing up memory. So use this feature sparingly! But at least it does now work ( #1070 )
2015-02-10 14:53:55 +00:00
photonstorm
823997744b
Docs update.
2015-02-10 14:53:55 +00:00
Richard Davey
960383818b
Merge pull request #1609 from mikaturunen/dev
...
Read ObjectLayer Objects .type property for Tiles
2015-02-10 13:50:36 +00:00
photonstorm
816a80f39a
If Body.customSeparateX
or customSeparateY
is true
then the Body will no longer be automatically separated from a **Tilemap** collision or exchange any velocity. The amount of pixels that the Body has intersected the tile is available in Body.overlapX
and overlapY
, so you can use these values to perform your own separation in your collision callback ( #992 )
2015-02-10 12:58:12 +00:00
Mika Turunen
be3edd8437
Now the backwards compatibility is not broken
...
As implementation is leaning on 0.11.0 feature of Tiled, I made sure the earlier Tiled files that might be used are not going to break from this. Defaulting to empty string if the .type property is not defined by Tiled (for Tiled < 0.11.0), otherwise we use the provided value.
2015-02-10 14:54:14 +02:00
photonstorm
4489a12fd8
Sprite.loadTexture and Image.loadTexture now no longer call updateTexture
if the texture given is a RenderTexture. This fixes issues with RetroFonts in IE11 WebGL as well as other RenderTexture related IE11 problems ( #1310 #1381 #1523 )
2015-02-10 12:27:55 +00:00
photonstorm
c154b8c785
Loader.resetLocked is a boolean that allows you to control what happens when the loader is reset, *which happens automatically on a State change*. If you set resetLocked
to true
it allows you to populate the loader queue in one State, then swap to another State without having the queue erased, and start the load going from there. After the load has completed you could then disable the lock again as needed.
...
Loader.reset has a new optional 2nd parameter `clearEvents` which if set to `true` (the default is false) will reset all event listeners bound to the Loader.
2015-02-10 11:58:17 +00:00
Mika Turunen
8a197b6023
Read ObjectLayer Objects .type property for Tiles
...
Why isn't the .type already read from the objects details as it's there? Latest release version of Tiled 0.11.0 has this field for Objects and it's quite extensively used by other frameworks.
Well, I need this and I suppose there are other people too who might be interested in having this in here too. Currently I go around this by creating a custom property of "type" and setting my value on it but that's just extremely silly.
2015-02-10 11:05:28 +02:00
photonstorm
c42954ae59
Condensed Cache.destroy method.
2015-02-09 20:27:58 +00:00
photonstorm
2cb9ea312b
extension URL fix, jsdoc fix and small format changes.
2015-02-09 20:27:47 +00:00
photonstorm
2b2ee27912
If for whatever reason you wish to hide the Phaser banner in the console.log you can set window.PhaserGlobal.hideBanner
to true
and it will skip the output. Honestly I'd rather if you didn't, but the option is now there.
2015-02-09 20:10:51 +00:00
Richard Davey
8340d56cd6
Merge pull request #1356 from pnstickne/wip-loader
...
Loader - parallel / extensible / documentation
2015-02-09 20:10:22 +00:00
Richard Davey
b66a0aa11a
Merge pull request #1605 from mickez/tilemaplayer_scale
...
Added scaling capability to TilemapLayer
2015-02-09 20:02:48 +00:00
Paul
367d976061
Loader: documentation
...
- Corrected some documentation wrt. parallel downloading
2015-02-08 20:40:54 -08:00
Paul
b63f6873e5
Loader: better audio selection
...
- Fixed bug where `.` in query portion of URI could throw off
auto-detection
- Allow `Loader#audio` to accept `{uri..,type..}` objects to blobs (and
data) URIs can also be used to auto-format detection / fallbacks.
2015-02-08 20:22:09 -08:00
Paul
86dc43874c
Loader: enabled parallel-by-default
...
- Minor cleanup to parallel: enabled by default, limit of 4 (hard-limit
max 12)
2015-02-08 19:42:34 -08:00
Paul
8d61441844
Merge remote-tracking branch 'upstream/dev' into wip-loader
...
- Added changes/support for 'blob:' uri's in upstream, extended to 'data:'
- Added upstream documentation
- Some small fixes for XHD from upstream
Conflicts:
src/loader/Loader.js
2015-02-08 19:42:22 -08:00
photonstorm
35a04b2f1e
TilemapParser now supports Tiled 0.11 version maps which includes the rotation
property on all Object types.
...
Tilemap.createFromObjects now checks for a `rotation` property on the Object and if present will set it as the Sprite.angle (#1433 )
2015-02-08 23:25:41 +00:00
photonstorm
ff04754bb8
Text width calculation strings made consistent.
2015-02-08 22:07:47 +00:00
photonstorm
e85be1f1d8
BitmapText.font wouldn't update an internal Pixi property (fontName) causing the text to fail to change font (thanks @starnut #1602 )
2015-02-08 22:07:36 +00:00
photonstorm
6d86952f98
JSDoc fix.
2015-02-08 21:57:09 +00:00
photonstorm
c891d617d9
Swapped back to 2.2.2 expected setting.
2015-02-08 21:57:09 +00:00
photonstorm
6081aa360f
P2.Body.clearCollision default values were incorrectly set to false
if no parameters were provided, even though the docs said they were true
(thanks @brianbunch #1597 )
2015-02-08 21:57:08 +00:00
Richard Davey
fed997a5a1
Merge pull request #1601 from draconisNoctis/dev
...
use XDomainRequest in Loader.xhrLoad
2015-02-08 21:51:12 +00:00
emailto@niklasberg.se
a0ea73a4cd
Support for tiles rotated and/or flipped in Tiled
2015-02-08 21:21:39 +01:00
emailto@niklasberg.se
a70dd81a80
Support for tiles rotated and/or flipped in Tiled
2015-02-08 21:03:19 +01:00
Michael Rehn
bb2e263345
Changed to bracket on new line to follow the rest of the codes style
2015-02-07 21:31:17 +01:00
Michael Rehn
e600cb89b7
Added scaling capability to TilemapLayer via the setScale method
2015-02-07 19:48:44 +01:00
Mark Wecke
3a70677a05
use XDomainRequest in Loader.xhrLoad
2015-02-06 13:52:24 +01:00
photonstorm
9cdcdc7bc5
Device.touch checks if window.navigator.maxTouchPoints
is >= 1
rather than > 1, which now allows touch events to work properly in Chrome mobile emulation.
2015-02-05 06:12:20 +00:00
photonstorm
5bd231d532
JSDoc fixes.
2015-02-05 05:13:22 +00:00
photonstorm
569483ab17
Game._kickstart forces Phaser to always call at least one logic update before being allowed to render.
2015-02-05 05:12:59 +00:00
photonstorm
d710caed9e
Body.reset now resets the Body.speed value to zero.
2015-02-05 05:12:31 +00:00
photonstorm
8dec37107e
MSPointer.capture allows you to optionally event.preventDefault the pointer events (was previously always on)
...
MSPointer.event now stores the most recent pointer event.
MSPointer.pointerDownCallback, pointerMoveCallback and pointerUpCallback all allow you to set your own event based callbacks.
2015-02-05 05:12:00 +00:00
photonstorm
336fdfa672
TileSprites weren't destroying WebGL textures, leading to eventual out of memory errors (thanks @chacal #1563 )
2015-02-03 21:32:39 +00:00
photonstorm
f55ba6755f
jsdoc fix
2015-02-03 21:32:39 +00:00
photonstorm
3eba508382
Sprite.events.onDragStart has 2 new parameters x
and y
which is the position of the Sprite before the drag was started. The full list of parameters is: (sprite, pointer, x, y)
. This allows you to retain the position of the Sprite prior to dragging should dragFromCenter
have been enabled (thanks @vulvulune #1583 )
2015-02-03 21:32:39 +00:00
photonstorm
2ba6e0528e
TilemapLayer.getTiles now returns a copy of the Tiles found by the method, rather than references to the original Tile objects, so you're free to modify them without corrupting the source (thanks @Leekao #1585 )
2015-02-03 21:32:39 +00:00
Richard Davey
a2854d21fd
Merge pull request #1580 from integricho/fix#1551
...
fix #1551 - detect mouseup on tilesprites
2015-02-03 21:16:33 +00:00
Richard Davey
41d9a42a02
Merge pull request #1565 from abtion/master
...
Fix CORS loading BitmapFonts with IE9
2015-02-03 21:14:45 +00:00
Richard Davey
66ad09ebd0
Merge pull request #1549 from tomlarkworthy/fixAdjustMass
...
Bug fix: adjust mass and debug body gfx
2015-02-03 21:12:15 +00:00
Richard Davey
0953e927b4
Merge pull request #1559 from vulvulune/dev
...
Complete "tsdocs" tasks to download plugins + improve ts doc + grunt:jsdoc
2015-02-03 21:04:30 +00:00
Richard Davey
e6b5806c26
Merge pull request #1581 from jromer94/master
...
fixed index out of bound error
2015-02-03 20:52:04 +00:00
Richard Davey
ecdbb35009
Merge pull request #1577 from Marchys/patch-4
...
Correct documentation Emitter.js
2015-02-03 20:51:28 +00:00
Richard Davey
21823f65e3
Merge pull request #1576 from vulvulune/jsdoc
...
Correct comments
2015-02-03 20:47:32 +00:00
Richard Davey
9efca46021
Merge pull request #1582 from micahjohnston/dev
...
Fix doc comment on Phaser.Physics.Arcade#getObjectsAtLocation.
2015-02-03 20:45:33 +00:00
Richard Davey
ad9b8ae8e1
Merge pull request #1568 from Bilge/patch-1
...
Added missing plugins member in Phaser.Game class.
2015-02-03 20:31:26 +00:00
photonstorm
7003b65df6
Added missing properties to the InputHandler prototype, reducing hidden class modifications.
2015-02-03 20:28:18 +00:00
zekoff
0ccd225e08
Allow max of 0 in computeVelocity
...
Previous method of setting default max did not allow falsey values.
2015-02-03 11:36:53 -06:00
photonstorm
2b74d903d4
jsdoc fix.
2015-02-03 16:17:14 +00:00
photonstorm
ac14edae94
Sound.stop and Sound.destroy now halt a fade tween if in effect.
2015-02-03 16:17:03 +00:00
photonstorm
260490fe06
Fixed issue in PIXI.canUseNewCanvasBlendModes which would create false positives in browsers that supported multiply
in Canvas path/fill ops, but not for drawImage
(Samsung S5 for example). Now uses more accurate magenta / yellow mix test.
2015-02-03 16:16:25 +00:00
Micah Johnston
34d443153f
fix argument name in comment on Phaser.Physics.Arcade#getObjectsAtLocation.
2015-01-30 05:48:34 -07:00
Micah Johnston
401d2fe847
Fix doc comment on Phaser.Physics.Arcade#getObjectsAtLocation.
2015-01-29 18:13:03 -07:00
Bilge
92b89fb549
Added plugins property to Phaser.Game.
...
Property was previously being declared late without initialization at allocation time.
2015-01-29 22:51:38 +00:00
Josh
755653439a
fixed index out of bound error
2015-01-28 23:39:23 -05:00
Andrean Franc
b52b765c53
fix #1551 - detect mouseup on tilesprites
2015-01-28 19:31:36 +01:00
photonstorm
d6ea8fb956
jsdoc updates (spelling mistakes, code formatting, etc)
2015-01-28 17:18:33 +00:00
photonstorm
d37ffe6a8f
Sound.fadeTween is now used for Sound.fadeIn and Sound.fadeOut audio tweens.
...
Sound.stop and Sound.destroy now halt a fade tween if in effect.
2015-01-28 17:18:32 +00:00
vulvulune
d65225e9eb
Merge pull request #1 from photonstorm/dev
...
Update from photonstorm
2015-01-27 16:07:41 +01:00
Marchys
f79d10f378
Correct Documentation Emitter.js
...
setScale and setAlpha parameter are not numbers (now on dev branch sorry :( )
2015-01-27 15:33:00 +01:00
vulvulune
1aab540a6f
Correct comment Phaser.Physics.P2.BodyDebug
...
Set correct method name in comments
2015-01-27 15:26:05 +01:00
vulvulune
2e49f07b77
Correct comment Phaser.Stage
...
Replace @name => @method on some functions
2015-01-27 14:05:47 +01:00
vulvulune
8dcd61aebb
Correct comments Phaser.ArrayUtils
...
Replace Phaser.Math => Phaser.ArrayUtils in the comments of the class
Phaser.ArrayUtils
2015-01-27 13:59:15 +01:00
vulvulune
8ef32f044c
Correct comments
...
Correct comments:
-Phaser.Camera: checkWorldBounds =>checkBounds
-Phaser.RetroFont: Set correct @name for name and smoothed
-Phaser.DOM: inViewport => inLayoutViewport
2015-01-27 13:46:18 +01:00
Paul
ad9245caeb
TilemapLayer - {missing changes}
2015-01-24 18:37:28 -08:00
Paul
818d5bcdcc
Tilemaps - removed N-slice support
...
- Since N-slicing doesn't work in Safari, which is what the
double-copy fix is for, it is simply removed.
2015-01-24 18:35:11 -08:00
Paul
4845c2054b
TilemapLayer - quibbles
...
- Removed accidental change
2015-01-24 17:49:20 -08:00
Paul
11c78f11b0
TilemapLayer - Safari fix
...
- Changed default slice count to 1: this fixes yet another Safari-specific
issue.
2015-01-24 17:43:08 -08:00
jeppester
b29d2b8b23
Missing semicolons added
2015-01-24 19:48:52 +01:00
jeppester
242e3cc7c3
Indentation errors fixed
2015-01-24 19:43:49 +01:00
jeppester
d7cd76efe7
More cosmetic changes
2015-01-24 18:36:58 +01:00
jeppester
a722293786
Cosmetic pull request preparations
2015-01-24 18:31:02 +01:00
jeppester
067dcc4332
Fix CORS loading BitmapFonts with IE9
2015-01-23 17:17:50 +01:00
vulvulune
7be4b8d7a9
Replace the grunt docs tasks with grunt-jsdoc
...
Replace builddoc and exportdocjson grunt tasks with grunt-jsdoc.
To avoid an error I added a fake comment to a @todo param in the p2.js
file.
2015-01-22 16:22:51 +01:00
photonstorm
6d967b6545
Error in diffX and diffY calculation in Tilemap.paste (thanks @amelia410 #1446 )
2015-01-20 10:49:15 +00:00
photonstorm
a67d2df6f0
BitmapData.text will render the given string to the BitmapData, with optional font, color and shadow settings.
2015-01-18 12:24:00 +00:00
photonstorm
3c2725addc
Typo.
2015-01-18 12:24:00 +00:00
photonstorm
587c3e5f6a
Arcade.Body.friction
allows you to have more fine-grained control over the amount of velocity passed between bodies on collision.
2015-01-18 12:24:00 +00:00
Tom Larkworthy
4b32505383
calling adjust mass desyncs the debug graphics from the real positions of bodies
2015-01-17 21:15:10 -08:00
photonstorm
48f590c180
Added tools links.
2015-01-10 00:30:13 +00:00
photonstorm
0f42b530eb
Physics.Arcade.isPaused
allows you to toggle Arcade Physics processing on and off. If true
the Body.preUpdate
method will be skipped, halting all motion for all bodies. Note that other methods such as collide
will still work, so be careful not to call them on paused bodies.
2015-01-10 00:30:02 +00:00
photonstorm
801f387f75
Updated docs.
2015-01-08 01:28:38 +00:00
photonstorm
8973423e98
Sprite.frame and AnimationManager.frame wouldn't return the correct index if a sprite sheet was being used unless it had first been set via the setter.
2015-01-08 01:28:38 +00:00
photonstorm
65f8820514
SoundManager.unlock checks for audio start
support and falls back to noteOn
if not found.
2015-01-06 13:50:15 +00:00
photonstorm
30ef362e59
jsdoc fixes / typos.
2015-01-06 12:58:19 +00:00
photonstorm
413a59c516
Preparing for 2.3.0 development.
2015-01-06 07:24:28 +00:00
photonstorm
74951a41b4
Update for 2.2.2.
2015-01-06 06:20:46 +00:00
Paul
c361e6f535
TilemapLayer - fix for regression typo
2015-01-05 20:37:00 -08:00
photonstorm
4e9291eadc
TileSprite.loadTexture crashed when textures were updated in WebGL (thanks @pandavigoureux29 #1495 )
2015-01-05 19:00:42 +00:00
photonstorm
741131312a
BitmapData.drawGroup draws the immediate children of a Phaser.Group to a BitmapData. Children are only drawn if they have their exists
property set to true
. The children will be drawn at their x
and y
world space coordinates. When drawing it will take into account the child's rotation, scale and alpha values. No iteration takes place. Groups nested inside other Groups will not be iterated through.
...
BitmapData.copy `tx` parameter if `null` and `source` is a Display Object, it will default to `source.x`.
BitmapData.copy `ty` parameter if `null` and `source` is a Display Object, it will default to `source.y`.
2015-01-05 14:28:16 +00:00
photonstorm
4a27130e10
Commented out crashing call.
2015-01-05 13:24:49 +00:00
photonstorm
689501c15c
Phaser.Point.angleSq removed. It didn't work so any code relying on it would be broken, and it's unclear what it was meant for (thanks @nextht #1396 )
2015-01-05 13:00:07 +00:00
photonstorm
fc63d0a33a
Ellipse.right and Ellipse.bottom setters fixed (thanks @nextht #1397 )
...
Fixed double Ellipse.getBounds definition (thanks @nextht #1397 )
2015-01-05 12:36:35 +00:00
photonstorm
4bc8fb3c8f
Docs update #1489
2015-01-05 11:57:46 +00:00
photonstorm
35c68d4c9e
Tidied up Emitter.update.
2015-01-05 11:43:24 +00:00
photonstorm
9f6b7b49e5
Particles.Arcade.Emitter.makeParticles now checks the given quantity
value against Emitter.maxParticles
. If quantity
is more than maxParticles
then the maxParticles
value is used instead.
2015-01-05 11:22:07 +00:00
Richard Davey
b4678b6b56
Merge pull request #1474 from nextht/remove-tw-and-th-init
...
Remove tw and th init
2015-01-05 11:15:28 +00:00
Richard Davey
ebf650c1a1
Merge pull request #1498 from pnstickne/wip-tilelayer-safaribug
...
Fix / double-copy for Safari tilemap bug when rendering with delta scrolling
2015-01-05 11:11:40 +00:00
photonstorm
8cd98e2e36
jsdocs fixes.
2015-01-05 10:59:10 +00:00
Richard Davey
cf83e14e8d
Updated Line.reflect to remove intersects check.
...
Line.normalAngle gets the angle of the line normal in radians.
2015-01-04 12:38:40 +00:00
photonstorm
af15b9b4e7
Line.reflect will calculate the reflected, or outgoing angle of the line and a given line if they intersect. This can be used for Body vs. Line collision responses and rebounds.
...
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`.
2015-01-04 05:11:19 +00:00
Richard Davey
b3f322469b
Added Events.onEnterBounds to the destroy method (thanks @legendary-mich #1497 )
2015-01-02 21:53:20 +00:00
Richard Davey
5e976b9028
Merge pull request #1504 from flashspys/flashspys-dev
...
minor documentation update
2015-01-02 16:39:13 +00:00
Felix Wehnert
e7d8d29cd9
minor documentation update
2015-01-02 14:02:05 +01:00
photonstorm
15d5b54c26
Removed redundant updateTransform call.
2015-01-02 04:15:27 +00:00
photonstorm
c1eb456ed2
Mouse.mouseMoveCallback is flagged as deprecated.
2015-01-02 04:14:44 +00:00
photonstorm
b22233a0bc
docs update and sound marker check.
2015-01-02 04:14:44 +00:00
Richard Davey
97cf7f7581
Merge pull request #1502 from pnstickne/wip-1424-r
...
Simplified call to updateTransform - unified and verified fix for 1424
2015-01-02 04:13:31 +00:00
Paul
81c872adf1
Simplified call to updateTransform
...
This change implements the original suggestion of using `updateTransform`,
but applies so globally instead of within a particular postUpdate
function.
Now the game loop calls `updateTransform` after each `updateLogic` call
unconditionally; it is updates that change the world that are accounted
for, not the rendering. This removes some previous checks that were
preventing correct behavior with the previous patch.
This makes the assumption that game objects (eg. Sprites) are only
modified within callbacks triggered before the completion of the
`postUpdate` walking of the scene graph.
- User code that runs outside of the "game update", such as a `setTimeout`
timer, will need to explicitly update transformations so that the world
is synced by the next `preUpdate`: but this is not the expected case and
is already outside the Phaser update model.
- If this assumption does not hold or is too weak, the transformations
could also be applied once at the start of every game update loop
(before any render or update). This change would at most double the time
spent on apply the transformations.
The constant application of `updateTransform` passes all reported failing
cases and resolves #1424 just as the original proposal of having the
change performed in the Sprite postUpdate but will work more consistently
across all scene-bound game objects.
On a desktop Chrome browser the inclusion also has minimal relative impact
as shown by the summarized results. The percentages given are the summed
CPU time of relevant required operations along with that of the
updateTransform itself:
- 10,000 non-collision particles:
- 12% pre/post update, 2.4% updateTransform
- 100 colliding particles:
- 2% pre/post update & collision, 0.3% updateTransform
- 1000 colliding particles:
- 40% pre/post update & collision, 1% updateTransform
With this patch the updateTransform time does creep up _slightly_ (vs just
in `Sprite.postUpdate`) but it is still dominated by required game
updates, and more so, by any actual work like Physics.
2015-01-01 18:01:23 -08:00
Paul
2bbbc64830
Device update for canvasBitBltShift - real
...
(Previous changeset not pushed correctly)
2015-01-01 17:38:22 -08:00
Paul
7213bb1b5e
Device update for canvasBitBltShift
...
The `canvasBitBltShift` detection is updated not to pick up any iOS
browsers. This should eliminate false-positives for Chrome for iOS, eg.
Defaulting to using the double-copy is "safer", even if slightly less
optimal.
(A proper feature check should still be added.)
2015-01-01 16:16:13 -08:00
Richard Davey
725fe261be
Merge pull request #1500 from pnstickne/wip-1494
...
Fix for Event changes
2015-01-01 22:25:48 +00:00
Paul
a070e8db8f
Fix for Event changes
...
This replaces 'eval' with closures (that should have probably
been used to begin with) to avoid warnings generated by some tools.
This change does not affect the approach used.
- Ref. #1494
2015-01-01 13:50:07 -08:00
Richard Davey
da27373c90
Device.webAudio check inversed to avoid throwing a warning in Chrome.
2015-01-01 21:38:02 +00:00
Richard Davey
3c4a9720c6
Body updateTransform patch re: #1493 and #1490
2015-01-01 12:33:43 +00:00
Paul
114d967272
TilemapLayer - quibbles
...
- Updated shiftCanvas usage for consistency with renderSetting access
2014-12-31 10:06:48 -08:00
Paul
76aa601d47
TilemapLayer rendering double-copy
...
- Memory optimization of delta-scroll shifting.
- The copy canvas is shared between all TilemapLayers
- The copy is done in segments to reduce the memory usage of the copy
canvas. Currently this is a 1/4 ratio.
- Device has the feature (by browser) check to see if bitblt works
- TilemapLayer will automatically enable the double-copy as needed
- Device.whenReady can be used to override the device value
2014-12-31 09:54:37 -08:00
Paul
0ad21e3c84
Merge remote-tracking branch 'upstream/dev' into wip-tilelayer-safaribug
2014-12-30 23:07:55 -08:00
Jouni Airaksinen
11cf7c4923
Fix floating point inaccuracy in edge cases, behavior not consistent across different browsers and/or devices
2014-12-29 14:38:18 +02:00
nextht
18b3a3cc5b
Remove useless initilization for tw and th code
...
tw and th have been initialized twice, the first time is useless.
2014-12-20 17:45:27 +08:00
photonstorm
fa40b3a7a9
Removed readyState check as it breaks overlapping sounds.
2014-12-18 11:14:45 +00:00
photonstorm
a6c6bf8e06
Time.reset would incorrectly reset the _started
property, now maps it to Time.time
(thanks @XekeDeath #1467 )
2014-12-18 08:07:38 +00:00
nextht
aa80074ec1
Emitter.start should Setting quantity Not Adding
...
I think Emitter.start should Setting quantity Not Adding, maybe "+=" is a mistake?
2014-12-17 22:39:11 +08:00
photonstorm
eff9759f8c
Updated to Pixi 2.2.0 release.
2014-12-17 13:50:28 +00:00
photonstorm
c6c5856dec
Phaser.Graphics.drawCircle now overrides PIXI.drawCircle which means the docs are now correct re: diameter not radius (thanks @ethankaminski #1454 )
2014-12-17 13:44:12 +00:00
photonstorm
f23c0aa24b
Removed redundant tolerance
parameter from Rectangle.intersects (thanks @toolness #1463 )
2014-12-17 13:25:21 +00:00
photonstorm
ef610c7c10
Added init to State template class.
2014-12-17 13:07:19 +00:00
photonstorm
269af69da5
Added extra checks to Sound.play to stop it throwing DOM Exception Error 11 if the sound.readyState
wasn't set or the sound was invalid. Also wrapped stop()
call in a
try catch`.
2014-12-17 13:07:19 +00:00
aressler38
c9984633b5
fixing documentation typo
2014-12-15 14:12:09 -08:00
aressler38
f1bdd174b2
[ISSUE 1458] Allow BLOB urls when loading audio files
2014-12-15 12:57:30 -08:00