Commit graph

328 commits

Author SHA1 Message Date
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
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
3a59c13a71 Added hostname: '*' to the grunt-connect in Gruntfile.js (fixes #426) 2014-02-15 19:03:43 +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
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
539a0f2256 BitmapFont fixes and updates and Cache support for it added. Working sweet now. 2014-02-14 16:38:06 +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
f9a4beb608 Text update. 2014-02-14 00:15:36 +00:00
photonstorm
87fce63a23 Updated. 2014-02-13 23:47:25 +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
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
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
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
d26bda2736 Small textual changes. 2014-02-10 02:32:56 +00:00
photonstorm
d2366d5fa5 Fix for issue #376 - IE11 didn't populate the Device.ieVersion value. Now extracted from Trident revision, but still use Device.trident instead for IE11+ checks. 2014-02-10 02:23:45 +00:00
photonstorm
ae74cb02dd Fixes #382 Error when using InputHandler#onInputUp & sprite destroys itself during the event. 2014-02-10 02:14:59 +00:00
photonstorm
0294a4735d Fixes issues reported in #389 2014-02-10 01:49:58 +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
e15bebd269 Text.lineSpacing allows you to control the spacing between each line that is rendered.
Text.inputEnabled allows you to enable all input events over Text objects: dragging, clicking, etc - anything that works on a Sprite works on Text now too.
2014-02-09 22:48:35 +00:00
photonstorm
bca64c2adb Huge update to Phaser.Text. Much more lean, but loads of great new options added including drop shadows, gradient fills, fonts with spaces in the name, etc. 2014-02-09 13:36:02 +00:00
photonstorm
e8b432f518 Fixed bug where changing State would cause the camera to not reset if it was following an object.
World.reset now calls Camera.reset which sends the camera back to 0,0 and un-follows any object it may have been tracking.
2014-02-08 13:45:18 +00:00
photonstorm
ee3f6d8e7f Tilemap had the wrong @method signatures so most were missing from the docs. 2014-02-08 07:24:40 +00:00
photonstorm
c429787877 Button now extends Phaser.Image not Phaser.Sprite, all the same functionality as before remains, just no animations or physics body. 2014-02-07 18:55:29 +00:00
photonstorm
dd43d59cce InputManager.getLocalPosition(displayObject, pointer, output) will return the local coordinates of the specified displayObject and pointer.
InputManager.hitTest will test for pointer hits against a Sprite/Image, its hitArea (if set) or any of its children.
2014-02-07 18:01:58 +00:00
photonstorm
bc3a3fd43d You can now use the hitArea property on Sprites and Image objects. hitArea can be a geometry object (Rectangle, Circle, Polygon, Ellipse) and is used in pointerOver checks. 2014-02-07 17:14: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
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
6cabb03a82 Sprite.crop() now takes a Phaser.Rectangle instead of explicit parameters.
Phaser.Image is a brand new display object perfect for logos, backgrounds, etc. You can scale, rotate, tint and blend and Image, but it has no animation, physics body or input events.
Previously if you used Sprite.crop() it would crop all Sprites using the same base image. It now takes a local copy of the texture data and crops just that.
2014-02-06 23:13:39 +00:00
photonstorm
7ba1196c0d Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy) 2014-02-06 22:42:35 +00:00
photonstorm
3748811d11 Testing new Image object. 2014-02-06 19:34:05 +00:00
photonstorm
4ed20e0f77 Removed all intances of Sprite.group from Group and replaced with the already existing parent property. 2014-02-06 13:15:45 +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
9737710200 Upgraded to Pixi.js 1.4.4 2014-02-06 00:19:46 +00:00
photonstorm
68d5c73fea Explicitly paused Timer continues if you un-focus and focus the browser window.
Added TimerEvent.pendingDelete and checks in Timer.update, so that removing an event in a callback no longer throws an exception.
2014-02-05 22:35:35 +00:00
photonstorm
eddce653e9 Preparing for 1.1.5 development. 2014-02-05 21:02:41 +00:00
photonstorm
e7a9b96d27 Final release 1.1.4 examples finished. 2014-02-05 16:55:02 +00:00
photonstorm
02b75b9e23 Updated doc files. 2014-02-05 16:55:02 +00:00
photonstorm
0896c2fac7 Updating copyright year and README. 2014-02-05 16:54:59 +00:00
photonstorm
84f0f00f49 n-way collision checks and onBeginContact and onEndContact done and working. Also fixed issue in TweenManager.removeAll. 2014-02-05 16:54:58 +00:00
photonstorm
3488880956 Sprite vs. Sprite Group Body Tests. 2014-02-03 04:09:45 +00:00
photonstorm
5e182d317b Fixed lots of examples and added the missing Line.js. 2014-01-31 14:12:20 +00:00
photonstorm
27fc447928 New polygon collision object examples and Body scale fixes. 2014-01-31 10:34:18 +00:00
photonstorm
45b6d5a741 Removed: Debug.renderSpriteTouching, Debug.renderLocalTransformInfo, Debug.renderWorldTransformInfo, Debug.renderSpriteCollision and Debug.dumpLinkedList.
Debug.renderPhysicsBody(body, color) is extremely useful for debugging the new physics bodies. Will draw the outline + points in the color given.
Debug.renderBodyInfo(sprite, x, y, color) will display lots of Sprite body data.
2014-01-31 05:42:20 +00:00
photonstorm
13a86765cb Phaser.CANVAS_PX_ROUND is a boolean. If 'true' the Canvas renderer will Math.floor() all coordinates before drawImage, stopping pixel interpolation. Defaults to false.
Phaser.CANVAS_CLEAR_RECT is a boolean. If 'true' (the default) it will context.clearRect() every frame. If false this is skipped (useful if you know you don't need it)
Collision now works between Sprites positioned via sprite.x/y, sprite.body.x/y or sprite.body.velocity.
If you are tweening a sprite and still want physics collision, set `sprite.body.moves = false` otherwise it will fight against the tween motion.
2014-01-31 04:14:02 +00:00