Richard Davey
7fe4abc5c4
Merge pull request #1059 from lucbloom/spritesheet-to-framecount
...
Sprite Sheet => frame count
2014-08-28 01:49:15 +01:00
Luc Bloom
0fc30e839e
Removed some more checks
2014-07-22 10:42:47 +02:00
Richard Davey
91eb2ff842
Merge pull request #1033 from lucbloom/updateFrameData-fix
...
Frame data guards
2014-07-18 00:16:17 +01:00
Charles Black
31cc247462
AnimationManager.currentFrame update on play
2014-07-16 23:05:27 -04:00
Luc Bloom
ccd4b502d7
Fram data guards
...
Sometimes, this._frameData is null. Guard agains it.
Sometimes, we transfer to an animation that contains lesser frames.
Guard against it.
2014-07-16 12:00:30 +02:00
photonstorm
90eec97707
Animation.updateFrameData allows you to load a new FrameData object into an existing animation, even if currently running (based on #1029 )
...
AnimationManager.loadFrameData will now update all existing Animations to use the newly loaded FrameData (based on #1029 )
2014-07-16 00:55:12 +01:00
Richard Davey
615d1b6526
Merge pull request #1026 from lucbloom/spritesheet-report-key
...
Report key when failing
2014-07-15 16:13:39 +01:00
Luc Bloom
7498e6aa6e
Report key when failing
...
While loading sprite sheet.
2014-07-15 16:47:49 +02:00
photonstorm
e5078a2197
Fixed missing cacheKey parameter.
2014-07-14 12:56:05 +01:00
photonstorm
22462566b4
Restored old Image object.
2014-07-11 18:02:40 +01:00
photonstorm
0966971427
jshint fixes and tidying up for release
2014-07-10 16:21:50 +01:00
photonstorm
006d40f452
Updated docs for loadFrameData and removed debug line.
2014-07-10 14:46:28 +01:00
photonstorm
813de7c125
More crop work.
2014-07-10 10:46:19 +01:00
photonstorm
77d5be1d8e
When adding a new Animation to a Sprite it would incorrectly reset the current Sprite frame to the first frame of the animation sequence, it is now left un-touched until you call play
on the animation.
2014-07-08 12:59:35 +01:00
photonstorm
14109aeeb1
Animation.next will advance to the next frame in the animation, even if it's not currently playing. You can optionally define the number of frames to advance, but the default is 1. This is also aliased from the AnimationManager, so you can do Sprite.animations.next()
.
...
Animation.previous will rewind to the previous frame in the animation, even if it's not currently playing. You can optionally define the number of frames to rewind, but the default is 1. This is also aliased from the AnimationManager, so you can do `Sprite.animations.previous()`.
2014-07-03 16:23:36 +01:00
Greg Tatum
26a177d9a1
Fix null returns for play()
...
The play() method in the AnimationManager could return null for a valid animation name.
2014-06-14 23:59:57 -05:00
photonstorm
b979243a8d
Removed the cacheKey parameters from the AnimationParser methods as they're no longer used.
2014-06-10 23:50:12 +01:00
photonstorm
7c7d9153e6
Sprite.crop (and Image.crop) has been completely overhauled. You can now crop animated sprites (sprite sheet and texture atlas), you can define the x/y crop offset and the crop rectangle is exposed in the Sprite.cropRect property.
...
Sprite.updateCrop is available if you wish to update an externally referenced crop rectangle.
Sprites and Images now have their own textures objects, they are no longer references to those stored in the global Pixi.TextureCache. This allows you to redefine the texture frame dynamically without messing up any other Sprites in your game, such as via cropping. They still share global Base Textures, so image references are kept to a minimum.
Sprite.resetFrame will revert the Sprites texture frame back to its defaults dimensions. This is called when you call Sprite.crop with no rectangle, to reset the crop effect, but can be userful in other situations so we've left it as a public method.
2014-06-10 23:37:33 +01:00
photonstorm
6d10be6baa
When creating a Sprite or Image using a texture atlas it would set the frame twice, once in loadTexture and once when the initial frame is set. This has been reduced down to just a single setting now.
2014-06-10 11:21:07 +01:00
photonstorm
622978fa77
Finally managed to get crop x/y/width/height working across all texture types. Needs optimising for the trim rect, but works.
2014-06-06 04:12:16 +01:00
photonstorm
b63900f669
Testing frame crop support.
2014-06-05 02:33:29 +01:00
photonstorm
a8256f4ef7
defs typo fix
2014-05-20 00:08:39 +01:00
photonstorm
b32312dca5
Animation.setFrame allows you to set the animation to a specific frame (thanks @adamholdenyall, #706 )
2014-04-28 23:35:08 +01:00
photonstorm
f24622191d
Small jsdoc fix.
2014-04-20 10:47:09 +01:00
Georgios Kaleadis
41095c2933
change order in destroy method, first clear references then null all values
2014-04-17 13:16:24 +02:00
photonstorm
563e581049
Tidied up jsdoc blocks.
2014-04-15 00:57:35 +01:00
photonstorm
25a93cf4af
AnimationManager.play will now call Animation.stop on the current animation before switching to the new one (thanks @nihakue, #713 )
2014-04-14 23:29:09 +01:00
photonstorm
5d0ea6453b
AnimationManager.destroy now iterates through child animations calling destroy on all of them, avoiding a memory leak (thanks stauzs)
...
Animation.destroy didn't correctly clear the onStart, onLoop and onComplete signals.
2014-04-14 22:53:05 +01:00
Christian Wesselhoeft
9faa27ce4f
Fix jshint issues in src/animation
2014-03-25 14:56:05 -07:00
Christian Wesselhoeft
61f18b675c
Trim trailing whitespace.
2014-03-25 14:56:04 -07:00
photonstorm
85d5fdfb2f
Sorted out orientationImage in ScaleManager, throwing a preUpdate error ( fix #534 )
...
Tightened up the currentFrame allocation in AnimationManager.
2014-03-10 19:06:16 +00:00
photonstorm
22b1ce9b9d
Added Phasers new Physics Manager and restored the pre-1.1.4 ArcadePhysics system. The new manager can handle multiple physics systems running in parallel, which could be extremely useful for lots of games.
2014-03-05 02:36:08 +00:00
photonstorm
833960b3c8
Animation.looped has been renamed to Animation.loop. It's a boolean you can toggle at run-time to turn on/off animation looping.
...
A single Animation object now has 3 new events: onStart, onLoop and onComplete.
Animation.loopCount holds the number of times the animation has looped since it last started.
Animation.stop has a new parameter: dispatchComplete. If true it'll dispatch an Animation.onComplete event.
2014-03-03 16:05:55 +00:00
photonstorm
8dc28f4800
Animation.speed added. You can now change the animation speed on the fly, without re-starting the animation (feature request #458 )
2014-02-28 04:32:12 +00:00
photonstorm
1aea08d0f7
AnimationParser.spriteSheet wasn't taking the margin or spacing into account when calculating the numbers of sprites per row/column, nor was it allowing for extra power-of-two padding at the end ( fix #482 , thanks yig)
...
AnimationManager.add documentation said that 'frames' could be null, but the code couldn't handle this so it defaults to an empty array if none given (thanks yig)
Also updated TypeScript definitions and StateManager.add docs.
2014-02-26 01:32:38 +00:00
photonstorm
beaac18b8f
Active animations now monitor if the game pauses, and resume normally when the game un-pauses ( fixes #179 )
2014-02-24 23:06:45 +00:00
photonstorm
cf3796d60c
Phaser.Animation.frame now returns the frame of the current animation, rather than the global frame from the sprite sheet / atlas ( fix #466 )
2014-02-21 10:31:17 +00:00
photonstorm
375e9e379a
Fixed issue with trimmed JSON Hash texture atlases not parsing correctly.
2014-02-17 19:58:45 +00:00
photonstorm
35e4c03bad
TileSprites are now much more tidy and can run from a frame in a texture. They can also be animated. New TileSprite.autoScroll function added.
2014-02-13 23:13:10 +00:00
photonstorm
ab5c07dfe8
Updated to Pixi 1.5 final.
...
InputHandler.pixelPerfectOver - performs a pixel perfect check to see if any pointer is over the current object (warning: very expensive!)
InputHandler.pixelPerfectClick - performs a pixel perfect check but only when the pointer touches/clicks on the current object.
2014-02-12 01:25:36 +00:00
photonstorm
773b4d5ed1
More animation tests.
2014-02-07 04:12:23 +00:00
photonstorm
3cae06d1ad
Phaser.AnimationParser now sets the trimmed data directly for Pixi Texture frames. Tested across JSON Hash, JSON Data, Sprite Sheet and XML.
2014-02-07 00:57:41 +00:00
photonstorm
3748811d11
Testing new Image object.
2014-02-06 19:34:05 +00:00
photonstorm
e7a9b96d27
Final release 1.1.4 examples finished.
2014-02-05 16:55:02 +00:00
photonstorm
0896c2fac7
Updating copyright year and README.
2014-02-05 16:54:59 +00:00
photonstorm
ce4cf531d4
Added class constructors, fixed Stripshader, added relative Tween example and updated Tween source.
2013-12-30 16:54:00 +00:00
photonstorm
fdbdd81b7b
Updated some docs, added the new renderHidden parameter for Canvas and updated the RenderTexture examples as a result.
2013-12-27 00:26:21 +00:00
photonstorm
a361a18616
Updated IE11 check, forces IE11 to use Canvas renderer even in AUTO mode.
2013-12-13 14:04:14 +00:00
photonstorm
13a2cc2feb
Updating all files to adhere to the JSHint settings and fixing lots of documentation errors on the way.
2013-11-25 03:13:04 +00:00
photonstorm
d30e2974c4
Updated JSHint configuration, README and started working through source files against JSHint.
2013-11-24 12:51:20 +00:00
photonstorm
46cf024a35
filter test updates
2013-11-09 02:16:52 +00:00
Richard Davey
c1d60d7e19
getAnimation and RAF callback ID checks added
2013-11-04 00:04:19 +00:00
photonstorm
6f93a2ec94
Multiple Anims update, Tilemap fixes and some new examples.
2013-10-31 15:45:19 +00:00
photonstorm
7ceb11ae49
New: You'll now find a complete Basic project Template in the resources/Project Templates folder. Will add more complex ones soon.
2013-10-28 23:29:34 +00:00
photonstorm
a6fac64248
Loads of issues reported on Github resolved (sprite crop, music resume, etc).
2013-10-24 04:27:28 +01:00
photonstorm
8ed783802e
New examples page
2013-10-18 15:12:32 +01:00
photonstorm
a97f271de7
Fixed Animation index 0 issue and hooked TilemapLayer to camera.
2013-10-16 02:09:12 +01:00
photonstorm
f10f9324ad
Animation.killOnComplete added and fixed a few issues in the Tanks game.
2013-10-09 13:36:57 +01:00
photonstorm
f5584bdfe5
Lots of fixes and updates to ArcadePhysics and Group, plus more examples.
2013-10-08 21:09:46 +01:00
Richard Davey
96da57cac0
Fixed up the namespace in the documentation and finished off all sections other than Game Objects and Physics (yuck).
2013-10-03 02:38:35 +01:00
Richard Davey
f832bacfd6
More Docs!
2013-10-03 01:21:08 +01:00
Richard Davey
852e82d0ca
More docs.
2013-10-02 12:11:22 +01:00
Richard Davey
e5b1faace6
Preparing more documentation.
2013-10-02 01:16:40 +01:00
Richard Davey
ca113b85aa
More docs coming on.
2013-10-01 16:39:39 +01:00
Richard Davey
9b4b267e7a
Working through building the docs.
2013-10-01 16:15:45 +01:00
Richard Davey
305b12d76b
Adding docs.
2013-10-01 15:01:46 +01:00
Richard Davey
b0a9c646c9
Merge pull request #76 from XekeDeath/dev
...
Fix for particles emitting in the wrong area when using emitter.width/height. And small change to make animation looping more robust.
2013-09-30 03:16:33 -07:00
Richard Davey
31bbf05ace
* Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly.
...
* Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue.
* Change: When you swap State all active tweens are now purged.
2013-09-30 11:15:50 +01:00
XekeDeath
62b5aa9bd9
Removed redundant assignment.
2013-09-30 13:28:17 +10:00
XekeDeath
ce3e1708e0
Merge branch 'dev' of https://github.com/XekeDeath/phaser into dev
2013-09-30 13:04:29 +10:00
XekeDeath
80e80ddccb
Make animation looping robust when skipping frames.
2013-09-30 13:04:22 +10:00
Richard Davey
18c695e9dd
PixiPatch and other 1.0.7 features
2013-09-27 09:57:08 +01:00
Richard Davey
891369b197
Preparing for 1.0.6 release, but moving physics changes to dev.
2013-09-24 15:28:29 +01:00
TheJare
15ad941908
Alternative way to specify tile size in spritesheets: negative means how many tiles there are
2013-09-21 19:23:25 +02:00
Cameron Foale
61b9e119cb
Incorrect input array in FrameData.getFrames
2013-09-20 17:48:38 +10:00
Cameron Foale
ec3fc8f307
Fixes numeric frame indexes on animations
2013-09-20 17:39:02 +10:00
Richard Davey
9e88da5c66
Multiple animation fixes in place.
2013-09-19 23:47:50 +01:00
Richard Davey
c5fc5e3394
Fixed various issues in the TweenManager, added length property to Group and improved the build script.
2013-09-19 04:45:08 +01:00
Richard Davey
47834ad478
Fixed issue in FrameData.getFrameIndexes where the input array was being ignored.
2013-09-18 14:02:31 +01:00
Richard Davey
91c07ea37d
Animation delay put back to normal
2013-09-18 06:41:41 +01:00
Richard Davey
d9a49797c4
1.0.4 release
2013-09-18 06:34:56 +01:00
Richard Davey
3c5ea01e09
1.0.3 release - fixed Text and Bitmap Fonts, Animation documentation and more examples
2013-09-17 16:50:47 +01:00
Richard Davey
e3869ff3ac
* Fixed a bug in the AnimationManager where useNumericIndex was always set to true
...
* Added in lots of Particle examples
* Added in the start of a Breakout game
* Added in the start of a Platformer game
2013-09-16 01:52:15 +01:00
Richard Davey
8c9a7c8bc7
Adding more examples in.
2013-09-15 20:45:00 +01:00
Richard Davey
f069107e55
1.0.1 release - fixes issues in tile map collision, additional Animation stop checks and updated package license.
2013-09-15 03:58:38 +01:00
Richard Davey
f664a4971b
Tidying up for 1.0 release push to master.
2013-09-13 16:16:48 +01:00
Richard Davey
f260108433
Tidying up source code for release. Also refactored World to use a Group instance, rather tha duplicate functions.
2013-09-11 13:21:07 +01:00
Richard Davey
e41e35fd09
Fixed an error that stopped 2 tweens from being able to run on the same object. Also refactored a lot of the classes to remove prototype properties and move them to local instance properties.
2013-09-10 20:40:34 +01:00
Richard Davey
4f950ae801
Fixed a fantastic FrameData bug. Also added support to the Emitter to handle multiple image keys and/or frames.
2013-09-10 11:09:25 +01:00
Richard Davey
bdc1c2ceb9
Sorted out the bounds for when sprites are in trimmed texture atlases to stop the physics checks going insane. Also bundled in Advanced Physics lib, although not hooked up yet.
2013-09-03 15:35:40 +01:00
Richard Davey
7c597999d4
Camera culling now in and working, although you need to enable it on a per sprite basis. Also fixed a few small bugs in the Animation Manager.
2013-09-02 23:22:24 +01:00
Richard Davey
7bdcbf5c2a
getBounds update.
2013-09-01 13:17:44 +01:00
Richard Davey
e77f5da2cd
Fixed the TweenManager and added support to GameObjectFactory, so you can create tweens easily now all hooked in to the internal game clock. Also added the AnimationManager into Sprite, so you can create and play animations directly from sprites nice and easily.
2013-08-30 17:09:43 +01:00
Richard Davey
936118bd91
AnimationManager done and in, need to fix texture update bug, otherwise finished.
2013-08-30 04:20:14 +01:00
Richard Davey
a81a8effb4
Sprite Sheets now parse and render correctly too.
2013-08-30 02:18:00 +01:00
Richard Davey
559d75eba1
When Phaser loads images they are now added to the PIXI.BaseTextureCache. Also when it loads atlas data (regardless of the 3 formats) they are converted into PIXI TextureCache entries using UUIDs to avoid name clashes and to support index based atlases.
2013-08-30 01:50:17 +01:00
Richard Davey
4c1dacfa02
Loader can now parse both JSON Hash and JSON Array formated texture atlas files.
2013-08-29 22:53:55 +01:00
Richard Davey
09def364c3
Farewell TypeScript, see you on the other side.
2013-08-28 07:02:57 +01:00