Commit graph

376 commits

Author SHA1 Message Date
photonstorm
b4dbaf9950 StateManager.start can now have as many parameters as you like. The order is: start(key, clearWorld, clearCache, ...) - they are passed to State.init() (NOT create!) 2014-02-25 11:56:57 +00:00
photonstorm
07af06fc4e Fixing up documentation, missing functions, examples and alpha masks. 2014-02-21 14:50:18 +00:00
photonstorm
dd8a393bc9 Updated version of p2 2014-02-21 12:40:49 +00:00
photonstorm
7394403bb6 Fresh build. Updated docs and re-built phaser.js. 2014-02-19 05:28:19 +00:00
photonstorm
7373db6e8c Upgraded p2 to latest build. 2014-02-19 03:58:24 +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
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
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
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
cfa2c96637 Updated to latest pixi and p2.js 2014-02-16 14:32:16 +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
1cb40b6df1 Packaged builds for anyone wanting to test this weekend :) 2014-02-14 18:07:17 +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
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
c6cc2c9d71 Updated p2.js to latest build. Checked tests. Added Debug draw (needs rotation support). 2014-02-12 05:34:31 +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
da878b2181 Updated the Gruntfile. Also:
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.
Previously using a Pixel Perfect check didn't work if the Sprite was rotated or had a non-zero anchor point, now works under all conditions + atlas frames.
2014-02-11 13:23:54 +00:00
photonstorm
1184d8bd76 PointProxy added to allow for easy setting of force and velocity. More p2 tests done. World update done. 2014-02-10 22:54:56 +00:00
photonstorm
47e23096bd Integrating p2.js. 2014-02-10 16:01:30 +00:00
photonstorm
6f835d7696 Added Tileset to TypeScript defs. 2014-02-10 02:42:28 +00:00
photonstorm
d44775c095 Phaser.Ellipse added. A fully compatible port of the PIXI.Ellipse class, can be used in Sprite/Image hitArea tests.
Phaser.Polygon added. A fully compatible port of the PIXI.Polygon class, can be used in Sprite/Image hitArea tests.
2014-02-10 01:37:50 +00:00
photonstorm
f9f2f2a9ae Converted the Pixi.Ellipse class. 2014-02-10 01:18:53 +00:00
photonstorm
9ee5cdaded Merge branch 'origin/dev' 2014-02-09 19:59:03 +00:00
clark-stevenson
e9ab2d30b6 Update phaser.d.ts
Sprite was missing height property
2014-02-09 17:00:07 +00:00
clark-stevenson
27bca6a8c2 Update phaser.d.ts
atlasJSONArray, atlasJSONHash should have optional parameters when it comes to URL/Object? Please disregard this if this is incorrect.
2014-02-09 16:15:10 +00:00
photonstorm
d583b364bd Game.add.renderTexture now has the addToCache parameter. If set the texture will be stored in Game.Cache and can be retrieved with Cache.getTexture(key).
Game.add.bitmapData now has the addToCache parameter. If set the texture will be stored in Game.Cache and can be retrieved with Cache.getBitmapData(key).
2014-02-07 06:25:28 +00:00
photonstorm
773b4d5ed1 More animation tests. 2014-02-07 04:12:23 +00:00
photonstorm
6958ac73d3 Added the SAT class to the TypeScript defs file. Also this fixes #369. 2014-02-07 04:12:04 +00:00
photonstorm
e11cae5373 Added the SAT class to the TypeScript defs file. Also this fixes #369. 2014-02-07 02:50:36 +00:00
photonstorm
4b7fc8d506 Change to boot order to try and resolve short-TTL timers. 2014-02-06 22:42:35 +00:00
photonstorm
7ba1196c0d Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy) 2014-02-06 22:42:35 +00:00
photonstorm
9e5e30bb12 Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy) 2014-02-06 19:36:33 +00:00
photonstorm
3748811d11 Testing new Image object. 2014-02-06 19:34:05 +00:00
photonstorm
e88b10323a Updated Phaser geometry classes so they over-ride the PIXI native ones, means we can do away with a whole bunch of over-rides and object changes in Sprite, etc. 2014-02-06 12:29:07 +00:00
photonstorm
8eae8feecc More Group fixes to the new format. Updated list of included Pixi files to remove un-needed ones. 2014-02-06 03:34:27 +00:00
photonstorm
4cfce8b4d2 Group now extends PIXI.DisplayObjectContainer, rather than owning a _container property, which makes life a whole lot easier re: nesting. 2014-02-06 02:31:36 +00:00
photonstorm
e7a9b96d27 Final release 1.1.4 examples finished. 2014-02-05 16:55:02 +00:00
photonstorm
8e77e8cedb Lots of TypeScript defs updates for the new Physics / Body classes. 2014-02-05 16:54:58 +00:00
photonstorm
846e9c5061 Removed debug info and tidying up ready for release. 2014-02-05 16:54:58 +00:00
Richard Davey
4502ca1bf6 Merge pull request #359 from qdrj/patch-7
Update phaser.d.ts
2014-02-05 12:33:30 +00:00
qdrj
a1ccddcd7e Update phaser.d.ts
Added BitmapText definitions
2014-02-05 01:19:04 -08:00
qdrj
82c39d0866 Update phaser.d.ts
It is a bit confusing that AnimationManager.getAnimation can return animation object or false. Maybe it will better if this method will be returning null instead of false.
2014-02-04 23:24:28 -08:00
qdrj
09d4b2bb8b Update phaser.d.ts 2014-02-04 01:32:06 -08:00
Richard Davey
33d47cf9e9 Merge pull request #344 from qdrj/patch-1
Update phaser.d.ts
2014-01-31 10:28:21 -08:00
qdrj
30af712d6a Update phaser.d.ts
Fix typo StageScaleMode.pageAlignVeritcally
2014-01-31 07:32:17 -08:00
qdrj
e5dc16b68d Update phaser.d.ts
Fix incorrect Loader.checkKeyExists declaration
2014-01-31 04:53:19 -08:00
photonstorm
27fc447928 New polygon collision object examples and Body scale fixes. 2014-01-31 10:34:18 +00:00
photonstorm
d51a37211c Phaser.Line added to the group of geometry classes, with full point on line/segment and intersection tests (see new examples) 2014-01-29 00:21:28 +00:00
qdrj
e5f52e8ae8 Update phaser.d.ts
GameObjectFactory.add.existing should return added object
2014-01-27 23:57:28 -08:00
Richard Davey
4432d37e6e Merge pull request #312 from miguelangelgonzalez/dev
Added missing Typescript definitions
2014-01-27 07:40:45 -08:00
Richard Davey
511858e3f5 Merge pull request #340 from qdrj/patch-2
Update phaser.d.ts
2014-01-27 07:40:25 -08:00
Richard Davey
d37ec40d72 Merge pull request #339 from qdrj/patch-1
Update phaser.d.ts
2014-01-27 07:39:54 -08:00
Richard Davey
912551a45d Merge pull request #323 from hstolte/patch-1
removed duplicate line in Timer class
2014-01-27 07:37:55 -08:00
photonstorm
4505aa50f6 Integrated SAT. Fixed lots of examples. Fixed documentation. Added new examples and built new phaser.js file for testing. 2014-01-27 06:29:26 +00:00
qdrj
3fb2eb23cd Update phaser.d.ts
Incorrect TilemapLayer constructor
2014-01-24 01:13:09 -08:00
qdrj
8b06f9cd86 Update phaser.d.ts
Remove duplicated Timer.create signature
2014-01-23 22:50:02 -08:00
hstolte
971e17fabe removed duplicate line in Timer class
The method create(...) was defined twice (line 1357 and line 1360). I removed line 1360.
2014-01-18 22:34:28 +01:00
Richard Davey
2532df8793 Merge pull request #317 from gareththegeek/patch-3
Allow Text.style to be any type
2014-01-16 07:28:37 -08:00
Richard Davey
c5840f4f6f Merge pull request #316 from gareththegeek/patch-2
Add missing addKey method to Keyboard
2014-01-16 07:28:17 -08:00
gareththegeek
47ee5a2c88 Allow Text.style to be any type
To allow a configuration object to be used rather than a string
2014-01-16 14:48:13 +00:00
gareththegeek
ca1f24868a Add missing addKey method to Keyboard 2014-01-16 14:46:12 +00:00
gareththegeek
1f9df6e3f4 Fix typescript compile error in 0.9.5
Explicitly specify type for parameters array
2014-01-16 14:43:28 +00:00
Miguel Angel Gonzalez
ac310ab881 Added missing Typescript definitions 2014-01-15 12:15:59 -03:00
photonstorm
32f5a2fa36 More examples updates. Fixed Starstruck tilemap code, removed un-needed ArcadePhysics methods and rebuilt the js files for testing. 2014-01-14 03:33:03 +00:00
photonstorm
c6fa2cb7b6 Added the new Timer, TimerEvent and Time methods to the TypeScript definitions files. 2014-01-13 14:18:15 +00:00
photonstorm
35cef4e529 Updated Body file and compiled + minified builds for those wanting to test. 2014-01-09 18:24:12 +00:00
Richard Davey
5f9acdca4b Merge pull request #299 from Niondir/dev
Phaser Definitions Update
2014-01-08 17:02:59 -08:00
photonstorm
c6c579e6b3 Phaser.Timer is now feature complete and fully documented. You can create Phaser.TimerEvents on a Timer and lots of new examples have been provided. 2014-01-09 00:59:37 +00:00
Tarion
c21365703d Phaser Definitions Update
Added "GetCurrentState" to StateManager
2014-01-08 22:57:13 +01:00
niondir
1aabb6b93d World is a Group. Needed to remove stuff again e.g. a "BitmapText" 2014-01-07 19:54:04 +01:00
niondir
77a8dc321f phaser.d.ts corrections 2014-01-07 10:58:00 +01:00
photonstorm
29d7cc36a0 Merge branch 'gamepadsupport' of https://github.com/karlmacklin/phaser into karlmacklin-gamepadsupport
Conflicts:
	README.md
2013-12-31 00:44:11 +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
inductible.dev
9a968bc5bb TypeScript defs: TileSprite now extends Sprite, and added 'fixedToCamera' property to Sprite definition 2013-12-23 09:48:07 +00:00
inductible.dev
6be31e0f69 added TypeScript definitions for Key and CursorKeys object 2013-12-22 13:34:52 +00:00
photonstorm
5cf7ed4fdb More TypeScript updates. 2013-12-18 16:56:14 +00:00
photonstorm
50eee95c99 Improved TilemapLayer rendering and debug rendering significantly. Cleared out some old assets and added a new map. 2013-12-18 00:44:04 +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
19759699df More TypeScript definitions fixes (for Easing and Animation data). 2013-12-10 14:34:22 +00:00
photonstorm
669570c701 Tidying up the examples and more Tilemap work. 2013-12-10 12:23:42 +00:00
photonstorm
13a03f3620 TypeScript file updated, now compiles without error in VS and FlashDevelop. 2013-12-06 13:48:40 +00:00
photonstorm
d9ffd6afd4 Final version of the Getting Started guide. 2013-11-29 18:28:55 +00:00
photonstorm
b2fc6c422a Fixed filters for new shader code. 2013-11-28 21:29:16 +00:00
photonstorm
f22159e257 Updated documentation. 2013-11-28 15:57:09 +00:00
photonstorm
a9a46bfbbf Lots of documentation updates and new Loader examples. 2013-11-27 16:33:49 +00:00
photonstorm
141337bed9 Heavily optimised PixiShader. 2013-11-26 05:13:56 +00:00
photonstorm
86584a636c Added new Phaser.HEADLESS render mode (doesn't output anything). 2013-11-25 14:53:30 +00:00
photonstorm
06a17b4b26 Fixed an issue in Text. Fixed the background color issue with Canvas games. Updated the Examples viewer so the side-by-side focuses the iframe now. Added new "Extend Group" example. 2013-11-25 13:12:03 +00:00
Richard Davey
373b97648d Documentation updates 2013-11-24 23:52:31 +00:00
photonstorm
155c863d69 New Timer class and scale event updates. 2013-11-24 11:04:58 +00:00
photonstorm
496639ff25 Added Phaser.Filter and started moving the shaders over into their own filter classes, so they won't all get bundled in unless needed. 2013-11-21 05:00:07 +00:00
photonstorm
b63bd14172 ScaleMode fix, BitmapData change and Device updates. 2013-11-18 20:27:40 +00:00
Louis Tovar
4d80d6c9b2 Merge remote-tracking branch 'photonstorm_phaser/dev' into dev 2013-11-15 14:21:00 -08:00
Louis Tovar
0dab85c853 latest version of typescript definitions, manual changes to get it to code hint properly. 2013-11-15 13:50:16 -08:00
photonstorm
83cacb93a0 More updates to BitmapData. 2013-11-15 20:40:55 +00:00
Richard Davey
ebe441666c BitmapData object added 2013-11-13 20:57:09 +00:00
Louis Tovar
f71b8d4df1 Manual fixes for TypeScript definitions file. Not Complete, more to come 2013-11-13 01:24:26 -08:00
photonstorm
3f99b691c9 Added in a Group.sort demo, also updated the documentation and build files. 2013-11-07 06:10:15 +00:00
photonstorm
8b793cd8d7 Updated to latest version of Pixi.js. Lovely new WebGL filters now working happily :) 2013-11-06 04:51:23 +00:00
photonstorm
3e9777e6f4 Updated docs for 1.1.2 release. 2013-11-01 18:16:52 +00:00
photonstorm
6f93a2ec94 Multiple Anims update, Tilemap fixes and some new examples. 2013-10-31 15:45:19 +00:00
photonstorm
9261160571 1.1.1 release with fix for Phaser.AUTO and a new text example. 2013-10-26 19:14:13 +01:00
photonstorm
6994e4be5e Merge branch 'dev' 2013-10-25 18:50:14 +01:00
photonstorm
34736fbde5 Final 1.1 release. Here goes nothing :) 2013-10-25 18:35:49 +01:00
Tomas Morris
d30f709208 Manually created a more accurate TypeScript definition file 2013-10-24 21:24:35 -06:00
photonstorm
4a51ac4671 Updated README and sorting out folder case issue. 2013-10-23 13:30:23 +01:00
photonstorm
cab3b53cf0 SideView example viewer finished. 2013-10-23 02:14:51 +01:00
photonstorm
07724e5001 Revamping the examples area. 2013-10-22 03:58:20 +01:00
photonstorm
8ed783802e New examples page 2013-10-18 15:12:32 +01:00
photonstorm
dabda516c2 Compiled build. 2013-10-17 22:56:20 +01:00
photonstorm
9c1fdb371c Nearly finished Tilemap integration into the core. 2013-10-16 06:33:39 +01:00
photonstorm
31018b9295 Star Struck game back and working again, plus finished the level design. 2013-10-16 03:37:15 +01:00
photonstorm
a97f271de7 Fixed Animation index 0 issue and hooked TilemapLayer to camera. 2013-10-16 02:09:12 +01:00
photonstorm
dd695e066f More tilemap tweaks. 2013-10-14 19:37:52 +01:00
photonstorm
b868c2cb1b Started revamp of the Tilemap system. Also removed old 'Advanced Physics' and dropped in p2.js which is what I hope we'll eventually use. 2013-10-11 04:42:11 +01:00
photonstorm
a7230aa769 Sprite.loadTexture added. 2013-10-10 09:03:38 +01:00
Richard Davey
e85643abf4 Yet more documentation done. 2013-10-02 20:18:24 +01:00
Richard Davey
480d90b009 * Removed the callbackContext parameter from Group.callAll because it's no longer needed.
* Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child.
* Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg)
2013-10-01 02:19:08 +01:00
Richard Davey
8668b82ef6 * Fixed issue causing Keyboard.justPressed to always fire (thanks stemkoski)
* Added Keyboard.addKey() which creates a new Phaser.Key object that can be polled for updates, pressed states, etc. See the 2 new examples showing use.
2013-10-01 01:18:29 +01:00
Richard Davey
fa1ed04aa8 Build 2013-09-30 19:54:43 +01: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
Richard Davey
9642d4994a 1.0.6a release to fix an issue in the StateManager. 2013-09-26 11:49:58 +01:00
Richard Davey
c29fcfb510 1.0.6 release to fix a few important issues and prepare for the dev branch. 2013-09-24 15:53:20 +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
Richard Davey
b69b3db486 1.0.6a 2013-09-22 23:07:12 +01:00
TheJare
4b6147d3e3 Fix bug in StateManager where a state's update function might not get called if it has an empty preload function 2013-09-20 22:42:04 +01:00
Richard Davey
8c41b3253c 1.0.5 package 2013-09-20 14:00:49 +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
d9a49797c4 1.0.4 release 2013-09-18 06:34:56 +01:00
Richard Davey
17e208a95e 1.0.2 build 2013-09-16 01:53:53 +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
48161f5c24 1.0 release versions ready. 2013-09-13 17:52:01 +01:00
Richard Davey
62d77e7038 Small new demo and refactored collision list - now far less comparisons to perform! 2013-09-13 04:22:12 +01:00
Richard Davey
79dc3566f4 Fixed some issues in Tilemap collision, updated the Emitter so x/y controls the point of emission (to stop collision getting out of whack) and fixed the postUpdate in body. 2013-09-12 20:59:56 +01:00
Richard Davey
92e86494e3 Tilemap Collision in and working :) Needs testing against Groups now. 2013-09-12 15:39:52 +01:00
Richard Davey
9b6c819e0e Input Component done and new Button object done and included. Also finished the build script. 2013-09-09 00:30:44 +01:00
Richard Davey
09def364c3 Farewell TypeScript, see you on the other side. 2013-08-28 07:02:57 +01:00
Richard Davey
8a85155c08 Fixed the tilemap pre/post update hooks. 2013-08-25 10:35:58 +01:00
Richard Davey
ecf61fc80c Updated Game.switchState to accept state objects and fixed the OrientationScreen. 2013-08-25 09:59:23 +01:00
Richard Davey
c884bab7ec Fixed instance check issue in Game and tidied up the stageScaleMode inner loop. 2013-08-16 02:18:12 +01:00
Richard Davey
f76ba6840f Animation and Input related fixes 2013-08-16 00:14:57 +01:00
Richard Davey
619b8415ed Reverting back to the only version of TypeScript that really works :( 2013-08-13 04:22:24 +01:00
Richard Davey
91dc7a4acf Tidying up and trying to fix more stupid TypeScript errors. 2013-08-12 04:08:15 +01:00
Richard Davey
142348f70b Updates 2013-08-11 21:31:35 +01:00
Richard Davey
7aa82a1cb0 All physics projections added. 2013-08-11 19:02:10 +01:00
Richard Davey
c2d7fb7fab Merged N+ physics in and tidied up the Docs folder and logos. 2013-08-11 12:15:53 +01:00