Commit Graph
100 Commits
Author SHA1 Message Date
photonstorm a6d77d00a0 World gravity restored. 2014-02-23 11:42:24 +00:00
Richard Davey 94133e4c11 Updated Sound.play loop check 2014-02-22 03:05:41 +00:00
Richard Davey b2da49eefa Enhanced page visibility checks added 2014-02-22 02:36:02 +00:00
Richard Davey bd24dab2f6 Merge branch '1.2' of https://github.com/photonstorm/phaser into 1.2 2014-02-22 00:46:48 +00:00
photonstorm e266ecfe00 Starting timer tests. 2014-02-22 00:17:41 +00:00
photonstorm be4d42a1c2 The StateManager now looks for a function called 'resumed' which is called when a game un-pauses (fixes #358) 2014-02-22 00:01:19 +00:00
photonstorm ea4873e286 SoundManager.play() does not do anything with destroyOnComplete (fix #333) 2014-02-21 23:55:11 +00:00
photonstorm 57796a60be TileSprites can now receive full Input events, dragging, etc and be positioned in-world and fixed to cameras (fixes #321) 2014-02-21 19:21:00 +00:00
Richard Davey ee1a1cd1c9 Merge pull request #468 from alvinsight/1.2
Examples updated :)
2014-02-21 18:59:34 +00:00
photonstorm 1448562abd Loader can now load JSON files specifically (game.load.json) and they are parsed and stored in the Game.Cache. Retrieve with game.cache.getJSON(key) (#329)
Also fixed UTF encoding on the animation file.
2014-02-21 18:48:06 +00:00
photonstorm fb5920feec We now force IE11 into Canvas mode to avoid a Pixi bug with pre-multiplied alpha. Will remove once that is fixed, sorry, but it's better than no game at all, right? :(
Loader.setPreloadSprite() will now set sprite.visible = true once the crop has been applied. Should help avoid issues (#430) on super-slow connections.
2014-02-21 17:29:51 +00:00
photonstorm 5a00a0ad97 TilemapParser will now throw a warning if the tileset image isn't the right size for the tile dimensions (fixes #377) 2014-02-21 16:57:45 +00:00
photonstorm 3ac8fba9e8 Body.x/y didn't use pxpi. Also fixed out of bounds example. 2014-02-21 16:35:37 +00:00
photonstorm 5c4dd26d25 Fixed for renderSpriteInfo. 2014-02-21 15:50:02 +00:00
photonstorm 3ead8aee7b Updated Mouse to use event.button not event.which, so the const references are correct (fix #464) 2014-02-21 15:47:00 +00:00
photonstorm e9e5bf9436 Updated docs - they now actually list the new body methods :) 2014-02-21 15:37:26 +00:00
photonstorm 7ee0c20bb3 Added Debug.renderSpriteBounds() back and wrapped Body.velocity and force in px2p calls. 2014-02-21 15:34:15 +00:00
photonstorm d7ababa398 BitmapData.alphaMask will draw the given image onto a BitmapData using an image as an alpha mask. 2014-02-21 15:09:04 +00:00
photonstorm 07af06fc4e Fixing up documentation, missing functions, examples and alpha masks. 2014-02-21 14:50:18 +00:00
photonstorm eb38ae35f8 renderXY added back into RenderTexture. 2014-02-21 13:44:39 +00:00
photonstorm a61d030256 Display Objects now clean-up their children properly on destroy. 2014-02-21 13:25:08 +00:00
photonstorm dd8a393bc9 Updated version of p2 2014-02-21 12:40:49 +00:00
photonstorm 066a625d17 When adding a Group if the parent value is null the Group won't be added to the World, so you can add it when ready. If parent is undefined it's added to World by default. 2014-02-21 12:35:30 +00:00
photonstorm 5f6fc9db05 When adding a Group if the parent value is null the Group won't be added to the World, so it's up to you to add it when ready. If parent is undefined it's added to World. 2014-02-21 12:33:15 +00:00
photonstorm efd760479d Sprite and Image now remove any masks that may have been set when they are destroyed. 2014-02-21 12:18:23 +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 251b819bdb Fixed InputHandler group check #463 2014-02-21 10:06:53 +00:00
Richard Davey 008badcf79 Merge pull request #463 from georgiee/fix-group
Fixed Phaser.Group#destroy(true)
2014-02-21 10:04:33 +00:00
Richard Davey 26b24b491d Merge branch '1.2' of https://github.com/photonstorm/phaser into 1.2 2014-02-20 10:32:24 +00:00
photonstorm 34fa6ffaeb Final tweaks. 2014-02-20 04:38:45 +00:00
photonstorm c48e685802 Minor labs updates. 2014-02-20 04:28:19 +00:00
photonstorm 91c0299d4c Fixed issues with the contacts and world bounds. New labs demo created. 2014-02-20 04:21:14 +00:00
photonstorm 9fcab5ef26 Lots of doc fixes (thanks nhowell) 2014-02-20 03:44:44 +00:00
photonstorm 4ad7b304c6 Added Game configuration option: forceSetTimeOut 2014-02-20 01:31:13 +00:00
photonstorm f07c10e38e Fix typo for Phaser.InputHandler#pointerDragged for docs #451 2014-02-19 19:05:54 +00:00
photonstorm 1762983bc0 Fixed loadPolygon reference. Need to test decomp data next. 2014-02-19 17:09:01 +00:00
photonstorm 95b3872508 Fixing documentation errors #450 2014-02-19 16:59:27 +00:00
photonstorm aac31bdaa4 debug#renderShapeConvex fixed, fix in p2 physics body creation #446 2014-02-19 15:43:05 +00:00
photonstorm 1d3616f52c Do not invert (physics) shape size data for circle, rectangle, capsuel & line #445 2014-02-19 15:21:03 +00:00
photonstorm 812de7d994 Fix typos in Phaser.Group#forEachExists for docs #447 2014-02-19 15:06:22 +00:00
photonstorm 5f79bb4330 Fix typos of method names in Button.js for doc #444 2014-02-19 15:01:59 +00:00
photonstorm 7394403bb6 Fresh build. Updated docs and re-built phaser.js. 2014-02-19 05:28:19 +00:00
photonstorm d9080052c3 Disabled World bounds by default.
Body.collides now takes a group level callback.
Added Body.createBodyCallback and Body.createGroupCallback.
2014-02-19 05:22:37 +00:00
photonstorm f6807e23c6 Fixed Body.removeFromWorld 2014-02-19 04:05:12 +00:00
photonstorm 7373db6e8c Upgraded p2 to latest build. 2014-02-19 03:58:24 +00:00
photonstorm 08e5f18257 Fixed some doc typos.
You can now pass a physicsConfig object with the game constructor that is given to p2.World, allowing you to set the broadphase, etc.
2014-02-19 03:51:48 +00:00
photonstorm d057a9fe11 Device, Canvas and GamePad classes all updated for better CocoonJS support (thanks Videlais) 2014-02-19 02:45:42 +00:00
photonstorm 14646e811c QuadTree deprecated and moved to plugins. Body.collideWorldBounds added back and working. CollisionGroups pretty much finished. 2014-02-19 02:12:27 +00:00
photonstorm 5968dd053b CollisionGroup and collision masks working. Need to refine a little, but all the essentials are there. 2014-02-19 01:51:14 +00:00
photonstorm 7a8c96db37 Working gravity + contacts + platformer demo :) 2014-02-18 17:25:54 +00:00
photonstorm 1e29e28333 Added ContactMaterials and lots of new World help functions for assigning and creating them. 2014-02-18 16:37:53 +00:00
photonstorm 15be3f86f3 Added ContactMaterial support. 2014-02-18 15:28:42 +00:00
photonstorm 3d0b5bde75 Updated World vastly. No longer extends p2.World due to a few vars we can't alias cleanly, adds in lots of new helper methods.
Ready for Materials and Constraints.
InversePointProxy is for aliasing a p2 typed array when the values need reversing before applying (gravity for example).
2014-02-18 15:16:26 +00:00
photonstorm 335684ac57 Removed width/height parameters from addParticle, not needed. 2014-02-18 12:32:26 +00:00
photonstorm 63145d7735 New labs demo. Added moveForward and moveBackward to Body. 2014-02-18 04:49:03 +00:00
photonstorm 5d5c64d22f Tilemap.createCollisionObjects will parse Tiled data for objectgroups and convert polyline instances into physics objects you can collide with in the world.
After defining tiles that collide on a Tilemap, you need to call Tilemap.generateCollisionData(layer) to populate the physics world with the data required.
Debug.renderPhysicsBody updated to take camera location and body rotation into account.
Body movement functions put back to velocity :)
Updated to latest dev version of pixi and latest p2.js
Updated docs
2014-02-18 03:01:51 +00:00
photonstorm 375e9e379a Fixed issue with trimmed JSON Hash texture atlases not parsing correctly. 2014-02-17 19:58:45 +00:00
photonstorm cad14848e8 Removed input handler from Graphics as it's just meant to be used as a texture really, if you need input events you can apply Graphics to a Sprite.
You can now create a Physics Body directly via game.physics.createBody(), and Body has been updated so it's no longer always bound to a Sprite.
Debug.renderPhysicsBody now works with Rectangles, Lines and multiple Convex shapes.
Starting to get the Tiled polyline parsing working nicely. Not too far off a complete tilemap collision.
2014-02-17 17:54:10 +00:00
photonstorm 78bf874888 Fresh build. Added pre/post update hooks to Graphics. 2014-02-17 11:27:31 +00:00
photonstorm d026f968de You can now set the Stage.backgroundColor using either hex or numeric values. 2014-02-16 14:54:04 +00:00
photonstorm cfa2c96637 Updated to latest pixi and p2.js 2014-02-16 14:32:16 +00:00
Richard Davey 06273211ad Merge pull request #428 from JoeAnzalone/1.2
Make header image on labs site responsive
2014-02-16 03:12:27 +00:00
photonstorm 3a59c13a71 Added hostname: '*' to the grunt-connect in Gruntfile.js (fixes #426) 2014-02-15 19:03:43 +00:00
photonstorm 85eaaef688 Filters fixed to work with Pixi 1.5. 2014-02-15 03:12:24 +00:00
photonstorm 9837984a4d Working Springs demo. 2014-02-15 02:56:24 +00:00
photonstorm e5812710cc Added Spring class. Fixed reason why World wasn't pre and post updating (Stage didn't have an exists property). 2014-02-15 02:19:37 +00:00
photonstorm e922bbdfd3 New build files 2014-02-15 01:36:07 +00:00
photonstorm e5e643b103 fixedToCamera now works across all display objects. When enabled it will fix at its current x/y coordinate, but can be changed via cameraOffset.
fixedToCamrea now works for Groups as well :) You can fix a Group to the camera and it will influence its children.
Also fixed the issue with World.preUpdate/postUpdate not being called and various small documentation issues.
2014-02-15 01:27:42 +00:00
photonstorm e5a4620b87 Loader.physics now lets you load Lime + Corona JSON Physics data, which can be used with Body.loadPolygon and Body.loadData.
Cache.addPhysicsData and Cache.getPhysicsData allow you to store parsed JSON physics data in the cache, for sharing between Bodies.
2014-02-14 23:51:49 +00:00
photonstorm b94c78cf61 Removed loads of old Debug methods and fixed up Debug.renderPhysicsBody so it iterates through and renders the shapes of a Body. 2014-02-14 22:30:24 +00:00
photonstorm 8fcf5ee415 Debug rendering of physics bodies. 2014-02-14 21:49:02 +00:00
photonstorm 1cb40b6df1 Packaged builds for anyone wanting to test this weekend :) 2014-02-14 18:07:17 +00:00
photonstorm 1097a699c3 Fixed anchor issue with Sprite.body. 2014-02-14 18:06:00 +00:00
photonstorm 291f8ef14c Fixed issue with physics world not being centered if you resized it. 2014-02-14 17:52:59 +00:00
photonstorm 1b5837d71d World preUpdate, update and postUpdate have all been moved to Stage. So all children are updated regardless where on the display list they live. Fixes #419 2014-02-14 17:29:31 +00:00
photonstorm bcd31499c4 Couple of new labs tests. 2014-02-14 17:08:25 +00:00
photonstorm 539a0f2256 BitmapFont fixes and updates and Cache support for it added. Working sweet now. 2014-02-14 16:38:06 +00:00
photonstorm ef95fbaa00 BitmapFont moved to extending RenderTexture instead of BitmapData. Now applied as a texture to a Sprite/Image. 2014-02-14 13:50:50 +00:00
photonstorm c3f306c795 Testing BitmapFont as a texture. 2014-02-14 12:07:04 +00:00
photonstorm 7d2a818d0d Added BitmapFont to the GameObjectFactory. 2014-02-14 06:16:36 +00:00
photonstorm 15b83e1c88 Added the new BitmapFont class. This is for rendering retro style fixed-width bitmap fonts into an Image object. 2014-02-14 06:04:29 +00:00
photonstorm b38b00c2c1 Loader.bitmapFont now has 2 extra parameters: xSpacing and ySpacing. These allow you to add extra spacing to each letter or line of the font. 2014-02-14 04:34:57 +00:00
photonstorm 24f2e2a46d BitmapText updated and bought in-line with the new Text class. Moved to use the new Bitmap Text XML loader which should work fine on CocoonJS now and also supports multiple bitmap fonts per cache. 2014-02-14 03:34:35 +00:00
photonstorm 58e44f75e3 SpriteBatch converted. It's an extended Group and Batch merged and works amazingly :) Ported over the maggots demo to test and wow! 2014-02-14 01:39:01 +00:00
photonstorm 3e99391cbf Updated all Game Objects so they all have preUpdate, update and postUpdate functions (even if empty). Updated World so when it iterates through them all it no longer checks if those functions are present before calling them. Was wasting a lot of time doing that before. 2014-02-14 01:09:52 +00:00
photonstorm f9a4beb608 Text update. 2014-02-14 00:15:36 +00:00
photonstorm 87fce63a23 Updated. 2014-02-13 23:47:25 +00:00
Richard Davey ec4eab07a7 Merge pull request #413 from Fishrock123/1.2-return-type
Strict type return (boolean) for `Sprite.exists` getter.
2014-02-13 23:29:08 +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 5bbb7e390b Tilesprite test. 2014-02-13 15:04:01 +00:00
photonstorm 90e9edbf05 Updated TileSprite so it just directly extends the Pixi original. This means no input events or body for a TileSprite.
Removed un-needed stuff from Graphics.
Removed un-used events.
Made docs in StateManager more clear re: shutdown (#410)
2014-02-13 15:03:46 +00:00
photonstorm 30fbbec675 BitmapData.addTo removed and enhanced BitmapData.add so it can accept either a single Sprite/Image or an Array of them.
BitmapData has had all of the EaselJS functions removed. It was just taking up space and you can do it all via BitmapData.context directly.
Camera following now working again.
2014-02-13 14:19:41 +00:00
photonstorm 9d6d3127ad Few more reference fixes. 2014-02-13 13:00:15 +00:00
photonstorm e9fb8f6389 Updates across the board moving Stage.canvas to Game.canvas 2014-02-13 12:55:58 +00:00
photonstorm 0786e86ee5 Stage.scale has been moved to Game.scale. The same game scaling properties exist as before, but now accessed via Game.scale instead.
Stage.aspectRatio has been moved to StageScaleMode.sourceAspectRatio (so now game.scale.sourceAspectRatio)
Stage.scaleMode has been moved to StageScaleMode.scaleMode (so now game.scale.scaleMode)
Stage.fullScreenScaleMode has been moved to StageScaleMode.fullScreenScaleMode (so now game.scale.fullScreenScaleMode)
Stage.canvas has been removed. It was only ever an alias for Game.canvas anyway, so access it via that instead.
2014-02-13 12:50:10 +00:00
photonstorm 175584469a Updated README. Previous commit fixes #406. 2014-02-13 12:28:13 +00:00
photonstorm bdb8908fee Groups now update their children across preUpdate, update and postUpdate.
Sprite.exists = false removes Body from world.
2014-02-13 12:26:39 +00:00
photonstorm 312ec462bc Sprite.exists now toggles the Body as well. Sprite.exists = false will remove an active Body from the World. 2014-02-13 09:55:46 +00:00
photonstorm b85f40df12 Phaser.Stage now extends PIXI.Stage, rather than containing a _stage object.
(Warning: currently breaks camera based code and pointers, as the scale property is removed).
2014-02-12 23:12:36 +00:00
photonstorm f6113ac6c4 Physics World events added.
Group has new 'addToWorld' parameter, which fulfills the same function as the old useStage.
Stage now extends PIXI.Stage rather than owns one.
2014-02-12 19:45:09 +00:00