Commit graph

236 commits

Author SHA1 Message Date
photonstorm
3a61fa35f0 RenderTexture.render now takes a Matrix as its second parameter, not a Point object. This brings it in line with Pixi and allows you to perform much more complex transformations on the object being rendered. If you need to replicate the old behavior please use RenderTexture.renderXY(sprite, point.x, point.y) instead.
RenderTexture.render and `renderXY` would ignore the Sprites rotation or scale. The full Sprite transform is now used correctly when the Sprite is drawn to the texture. If you wish to replicate the old behavior please use `RenderTexture.renderRawXY` instead.

RenderTexture.matrix has been removed as it's no longer used.

Fixed bug in Pixi where RenderTexture.render would ignore the given matrix.

Fixed a bug in Pixi where drawing a Sprite to a RenderTexture would reset the Sprites transform to an identity Matrix.
2015-04-17 03:22:07 +01:00
photonstorm
cdfc4ff45b Pixi.Sprite.renderCanvas and renderWebGL now has a new optional matrix parameter. You can use this to render the Sprite with an alternative transform matrix without actually adjusting the Sprite matrix at all. 2015-04-17 03:20:44 +01:00
photonstorm
1f4e54eec9 Removed duplicate methods from PIXI.Text such as wordWrap and updateText as Phaser overrides them, so it was wasting bytes. 2015-04-13 21:54:14 +01:00
photonstorm
eb506e2698 PIXI.Graphics in Canvas mode wouldn't respect the objects visible or alpha zero properties, rendering it regardless (thanks @TimvdEijnden #1720) 2015-04-13 14:19:44 +01:00
photonstorm
bb8b0d04fc Graphics.drawPolygon can now accept a Phaser.Polygon or PIXI.Polygon object, as well as a points array (#1712) 2015-04-13 13:00:52 +01:00
photonstorm
36c064511c Added guards around context.getImageData calls in BitmapData, Text and Canvas Tinting classes to avoid crashing restricted browsers like Epic Browser. Please understand that several Phaser features won't work correctly with this browser (thanks @Erik3000 #1714) 2015-04-02 14:47:44 +01:00
photonstorm
c1366c2f4f Arc comment. 2015-03-25 16:13:21 +00:00
photonstorm
93dc67be71 Graphics.drawArc would fail to draw any subsequent arcs if you set beginFill on it after drawing the first arc.
Graphics.drawArc would only move to the center position of the first arc created and ignore any subsequent arcs.
Graphics.drawArc now correctly renders multiple arcs across both WebGL and Canvas. You no longer need to specifically call moveTo to move into the correct place to draw the arc.
Graphics.drawArc now bails out if the startAngle = the endAngle and/or the sweep is invalid *before* adjusting any points.
Graphics.drawArc now correctly handles the fill on the CanvasRenderer if the arc is a subsequent arc and no line style is set.
2015-03-25 13:00:08 +00:00
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
7010883bc3 Tidying up. 2015-03-23 15:07:09 +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
4e3d189678 Updated Pixi version. 2015-03-23 08:13:59 +00:00
photonstorm
b13acdb23b TilingSprite.destroy fixed if TilingSprite hasn't ever been rendered (#1663) 2015-03-19 01:39:39 +00: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
d717c5c180 Removed final traces of _interactive properties and checks. Also added preUpdate catch. 2015-03-05 14:01:43 +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
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
bec18cb46c Removed redundant event call. 2015-02-19 15:27:59 +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
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
f59d7e3430 Working through Graphics class updates. 2015-02-17 16:40:41 +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
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
8c786a2df5 Removing Pixi files no longer used in this build of Phaser. 2015-02-17 15:46:52 +00:00
photonstorm
57ff6f4176 Fixed applyInverse point cache bug. 2015-02-17 05:14:09 +00:00
photonstorm
e9a77d95eb Deviations, oh the horror! 2015-02-12 09:44:53 +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
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
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
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
ff04754bb8 Text width calculation strings made consistent. 2015-02-08 22:07:47 +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
2b74d903d4 jsdoc fix. 2015-02-03 16:17:14 +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
photonstorm
4e9291eadc TileSprite.loadTexture crashed when textures were updated in WebGL (thanks @pandavigoureux29 #1495) 2015-01-05 19:00:42 +00:00
photonstorm
4a27130e10 Commented out crashing call. 2015-01-05 13:24:49 +00:00
photonstorm
eff9759f8c Updated to Pixi 2.2.0 release. 2014-12-17 13:50:28 +00:00
photonstorm
22e8340df7 Fixes issue where Pixi CanvasTint didn't allow for browsers that bit-shift the alpha value on putImageData (Android Stock Browser, I'm looking at you!) 2014-12-09 15:27:26 +00:00
photonstorm
b0d8e43128 And Pixi fixed the premult alpha issue properly. Back in again! 2014-12-03 21:20:41 +00:00
photonstorm
b05d745c40 Reverted changes as they broke all alpha support. Will put back once fixed in Pixi. 2014-12-03 20:54:25 +00:00
photonstorm
eb6a09ca0a Pixi update. 2014-12-03 09:18:43 +00:00
photonstorm
9d79605447 Pixi 2.2.0 merged. 2014-12-02 11:01:57 +00:00
photonstorm
2380d1827b Updated to latest Pixi dev branch. 2014-12-02 09:03:55 +00:00
photonstorm
0ff7fbbe42 Merged latest Pixi fixes. 2014-11-23 12:47:55 +00:00
photonstorm
395171b660 Added renderable check to Pixi.Sprite. 2014-11-18 12:36:11 +00:00
photonstorm
9caa13e489 Fixed TileSprite rendering issue. 2014-11-18 09:22:24 +00:00
photonstorm
09e6839c63 Pixi update 2014-11-17 13:07:53 +00:00
photonstorm
8622d91dea Pixi update. 2014-11-15 19:53:38 +00:00
photonstorm
e7356fc575 Pixi 2.1.1 merge. 2014-11-12 22:38:51 +00:00
photonstorm
1352b526c7 Merged final Pixi v2.1.0 release. 2014-11-11 23:24:50 +00:00
photonstorm
b6001c8f21 Latest Pixi v2 fixes. 2014-11-11 13:59:43 +00:00
photonstorm
d37fdd4217 Latest Pixi dev release. 2014-11-11 01:07:52 +00:00
photonstorm
c47d9ea238 Integrated latest development build of Pixi (lots of v2 specific bugs fixed) 2014-11-08 19:26:16 +00:00
photonstorm
e5810f1316 Added DisplayObject.transformCallback 2014-11-08 13:31:35 +00:00
photonstorm
f3f022b74a Final Pixi v2 updates. 2014-10-23 12:32:56 +01:00
photonstorm
73f210257a Removed duplicate Pixi classes and updated the build manifests to pull-in the correct Pixi Matrix class. 2014-10-22 21:20:38 +01:00
photonstorm
474fd8e055 JSDoc fixes. 2014-10-21 23:08:16 +01:00
photonstorm
54570a2b27 Small jsdoc fixes. 2014-10-21 22:48:06 +01:00
photonstorm
b9d10f5b7f Pixi v2 updates. 2014-10-20 01:26:12 +01:00
photonstorm
35d29170d0 Lots of small jsdoc fixes and DocGen updates. 2014-10-20 00:54:56 +01:00
photonstorm
f75c95144f Pixi v2 update. 2014-10-17 16:55:15 +01:00
photonstorm
3965862b82 More pixi v2 updates. 2014-10-15 22:12:38 +01:00
photonstorm
0501ca69ae Merged latest Pixi dev build. 2014-10-13 23:54:22 +01:00
photonstorm
88a97b935b Pixi v2 weekend updates. 2014-10-13 12:23:24 +01:00
photonstorm
163a6c46f3 Updated to Pixi 2.0.0-dev. 2014-10-10 20:36:04 +01:00
photonstorm
cca955f1fd Updated to latest version of Pixi. 2014-08-28 23:11:13 +01:00
photonstorm
f9a6d1f376 Updating to Pixi 1.6.1 2014-07-18 11:22:55 +01:00
Richard Davey
053f862b6b Merge pull request #1023 from lucbloom/sprite-textureChange-obsolete
Removed obsolete code in setTexture
2014-07-15 15:14:36 +01:00
Luc Bloom
5328069329 Removed obsolete code in setTexture
This code has no side-effects besides assigning “textureChange”, which
is used nor reset anywhere else.
2014-07-15 13:28:31 +02:00
photonstorm
f0365835c9 Pixi 1.6.1 2014-07-14 12:56:05 +01:00
photonstorm
79c5544869 Pixi 1.6 patches for RenderTextures and IE9 Float32 calls. 2014-07-11 18:02:24 +01:00
photonstorm
ded5eac8c7 Updated build files with patched Pixi UMD statement. 2014-07-11 11:53:44 +01:00
photonstorm
46eb906253 Pixi 1.6 merge. 2014-07-10 20:39:13 +01:00
photonstorm
78759260de Updated Pixi.Sprite 2014-07-10 14:46:48 +01:00
photonstorm
73e8a9763b Pixi updates 2014-07-10 10:46:18 +01:00
photonstorm
4fc26e4a26 Updated to the latest version of Pixi. 2014-07-09 05:40:50 +01:00
photonstorm
86f972a765 Updated to latest Pixi dev branch. 2014-07-03 10:49:58 +01:00
photonstorm
181fd1ae56 Merged Pixi 1.5.4 with Phaser - all of the lovely new Pixi features are in, like complex Graphics objects and masking. 2014-07-01 15:03:46 +01:00
photonstorm
2650e6c47e RetroFont.text would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
RenderTexture.resize would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
2014-05-15 15:32:59 +01:00
photonstorm
3db5d27c82 ArrayList.callAll check added (ping @jflowers45 #746) 2014-04-25 19:38:10 +01:00
photonstorm
b6c2b4e0bf Updated to [Pixi.js 1.5.3](https://github.com/GoodBoyDigital/pixi.js/releases/tag/v1.5.3) 2014-04-25 16:55:09 +01:00
photonstorm
4f5b329c07 Fixed Pixi UMD wrapper. 2014-03-31 11:06:15 +01:00
photonstorm
16853d0e82 Updated to Pixi 1.5.2 release. 2014-03-31 11:04:02 +01:00
Christian Wesselhoeft
61f18b675c Trim trailing whitespace. 2014-03-25 14:56:04 -07:00
photonstorm
bc8b2424ce Removed the examples build script from the Gruntfile (fix #592) 2014-03-17 16:10:19 +00:00
photonstorm
c4183d200f Changed the define function calls to use named modules, allows pixi, phaser and p2 to reside in 1 file and still be located by requirejs (thanks brejep, #531) 2014-03-10 01:39:36 +00:00
photonstorm
051526bedd Updated Pixi and P2. 2014-03-10 01:13:57 +00:00
photonstorm
6cc09fce67 Updated Pixi to fix roundToPixel error. 2014-03-03 16:13:50 +00:00
photonstorm
33da238e97 Updated pixi.js 2014-03-02 10:58:51 +00:00
photonstorm
8dcfef8db0 Updated to latest Pixi build (can do away with our own local patch now).
Group.sendToBottom(child) is the handy opposite of Group.bringToTop()
Group.moveUp(child) will move a child up the display list, swapping with the child above it.
Group.moveDown(child) will move a child down the display list, swapping with the child below it.
2014-02-28 18:55:07 +00:00
photonstorm
43cd5e4b3f Fixed the Tunnel filter. Had to patch Pixi to do it :( But no other choice for now until they merge my pull request. 2014-02-27 23:28:28 +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
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
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
424d1126bc Fixed updateTransform and added Body shape methods. 2014-02-12 14:50:32 +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
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
4aa945f991 Removed PixiPatch as it's no longer needed. Re-worked all of the Sprite autoCull and inWorld checks and cached the bounds. Fixed the Body calculations so physics is working again. 2014-02-09 03:48:31 +00:00
photonstorm
243820c973 Fixing up Pixis setBackgroundColor. 2014-02-08 09:14:44 +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
9737710200 Upgraded to Pixi.js 1.4.4 2014-02-06 00:19:46 +00:00
photonstorm
0896c2fac7 Updating copyright year and README. 2014-02-05 16:54:59 +00:00
Adam Nalisnick
7c66a6b6cc Removed an errant ';' from the end of an 'else if' causing a circle to be drawn each time a graphics object is updated 2014-01-14 20:54:50 -05: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
0acef49a7c RenderTexture now displays correctly in Canvas games.
Stage.display property added. A direct reference to the root Pixi Stage object (very useful for RenderTexture manipulation)
2013-12-23 04:20:09 +00:00
photonstorm
dd7ae12271 ArcadePhysics.overlap and collide now recognise TileSprites in the collision checks. 2013-12-17 16:48:03 +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
Josh Shepard (jcs)
8ade29d982 fix Pixi bug (#425) - fix incorrect width property for multi-line BitmapText
(Pixi has already merged the fix)
2013-12-08 09:50:21 -08:00
photonstorm
cd314cd03e Group.length now returns the number of children in the Group regardless of their exists/alive state, or 0 if the Group is has no children. 2013-12-05 09:14:49 +00:00
photonstorm
666df67453 Tidying up the wip folder and updating pixi. 2013-12-03 20:50:34 +00:00
photonstorm
42c0bed502 Fixed World.scale and Group.scale. 2013-12-03 02:13:57 +00:00
photonstorm
2fc5c89c1e Preparing to extend the Loader to handle script loading. 2013-11-26 17:14:21 +00:00
photonstorm
141337bed9 Heavily optimised PixiShader. 2013-11-26 05:13:56 +00:00
photonstorm
299115ca5d The entire Phaser library has been updated to match the new JSHint configuration. 2013-11-25 04:40:04 +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
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
93fcb7acbf Loads more shaders and some fixes and enhancements to PixiShader 2013-11-20 04:04:48 +00:00
photonstorm
e620c99479 ShaderToy convertor up and working, lots of shaders being turned into Pixi filters :) 2013-11-20 02:28:28 +00:00
photonstorm
46cf024a35 filter test updates 2013-11-09 02:16:52 +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
Richard Davey
ca113b85aa More docs coming on. 2013-10-01 16:39:39 +01:00
TheJare
a4bc69c2f7 Fix box dimensions in PIXI.BitmapText. Support anchor in Phaser.BitmapText 2013-09-21 01:03:19 +01:00
Richard Davey
89b00db103 Tilemap Rendering is working :) 2013-09-12 00:55:27 +01:00
Richard Davey
8a90a87492 Text converted and a couple of examples created. Using new extend system, so much smaller classes now. 2013-09-03 06:02:47 +01:00
Richard Davey
22847f6ade DebugUtils converted, re-name spaced the Input classes and started on Camera culling. 2013-08-31 21:50:34 +01:00
Richard Davey
09def364c3 Farewell TypeScript, see you on the other side. 2013-08-28 07:02:57 +01:00