Commit graph

125 commits

Author SHA1 Message Date
Richard Davey
4b1c762296 Updated @memberOf to @memberof 2018-10-10 10:49:13 +01:00
Richard Davey
3944e580cc Fixed an error in the batchSprite methods in the Canvas and WebGL Renderers that would incorrectly set the frame dimensions on Sprites with the crop component. This was particularly noticeable on Sprites with trimmed animation frames 2018-09-27 16:49:52 +01:00
Richard Davey
5ec26fa62d Cameras now emit prerender and postrender events if they are set to render to textures. 2018-09-14 15:53:06 +01:00
Richard Davey
9aeba9e73e Fixed jsdoc 2018-09-10 23:30:42 +01:00
Richard Davey
f9e498353d Fixed lack of TempMatrix for Graphics generateTexture 2018-08-06 16:19:30 +01:00
Richard Davey
faeed47b5e eslint fixes 2018-08-06 15:32:08 +01:00
Richard Davey
e3f5590fc3 Use var to cut down on bytes 2018-08-06 15:29:36 +01:00
Richard Davey
26cc84522d The CanvasRenderer.BlitImage function has been removed, as has the associated blitImage property from the Canvas Renderer as they're no longer used. 2018-08-06 15:29:27 +01:00
Richard Davey
fbb67ac201 The CanvasRenderer.DrawImage function has been removed, as has the associated drawImage property from the Canvas Renderer as they're no longer used. 2018-08-06 15:24:51 +01:00
Richard Davey
708a857a26 SetTransform is a new Canvas Renderer function that consolidates the process of preparing a Game Object for rendering, without actually rendering it. This is used internally by the Graphics and Bitmap Text classes. 2018-08-03 19:02:43 +01:00
Richard Davey
ca68904953 The Canvas Renderer has a new batchSprite method that consolidates the process of drawing a texture-based Game Object to the canvas. It processes the alpha, blend mode and matrix calculations in a single function and now is used by nearly all Game Object canvas renderers. 2018-08-03 18:53:50 +01:00
Richard Davey
fc0dc13930 Removed use of currentBlendMode and currentAlpha 2018-08-03 01:53:51 +01:00
Richard Davey
9f44896a3f The Blend Mode is now set directly in all Canvas Renderers without comparing it to what's stored in the Canvas Renderer. This fixes problems where the blend mode would be lost between two different Game Objects because they restored the context, but didn't update the renderer flag. Game Objects in Canvas can now mix and match blend modes across the display list. 2018-08-03 01:29:18 +01:00
Richard Davey
286f36cd1e Added ability for the Canvas Renderer to change context. 2018-08-02 14:57:37 +01:00
Richard Davey
a4db967b19 Added 4 temp matrices to the Canvas renderer. 2018-07-31 23:23:04 +01:00
Richard Davey
ec5bd1912e GameObject.willRender now takes a Camera as its only argument and uses it within the check. This has allowed me to remove 23 duplicate checks spread across the various Game Objects, all of which did the same thing, saving both KB and CPU time as the flags were being checked twice in most cases. 2018-07-19 13:19:02 +01:00
Richard Davey
b6a1033dbd Fixed Camera FX for scaled camera sizes 2018-07-18 15:03:06 +01:00
Richard Davey
0db16889e6 Use new Camera viewport values 2018-07-18 14:32:06 +01:00
Richard Davey
1c473afa84 Cameras draw their backgrounds correctly at higher resolutions 2018-07-17 23:26:30 +01:00
Richard Davey
072cc0e21b Added dirty Camera support and updated internal properties to set the flag 2018-07-12 01:13:34 +01:00
Richard Davey
fdd4a8f8f3 Tidied up DrawImage to re-use vars and cut down code 2018-07-06 15:55:20 +01:00
Richard Davey
e620f3e308 Updated to use matrix and support crop 2018-07-06 15:34:25 +01:00
Richard Davey
9bd8fb34a4 Changed canvasData to remove duplicate properties. 2018-07-04 17:01:29 +01:00
Richard Davey
8c312090da Solidified use of pixelArt mode 2018-06-27 15:27:16 +01:00
Richard Davey
7a23378015 Unified use of roundPixels, antialias and pixelArt modes 2018-06-27 15:15:00 +01:00
Richard Davey
7aa46657c2 Tidying up jsdocs and changing float to number 2018-06-26 23:19:14 +01:00
Richard Davey
c6c9b25fdc Camera.alpha (and its related method Camera.setAlpha) allows you to get an alpha level for the entire camera. This impacts everything it is rendering, even if those objects also have their own alpha values too. You can tween the property to make the camera contents fade in / out, or you can set it as needed in your game. 2018-06-25 17:35:36 +01:00
Richard Davey
90ba2608fa Added in Camera alpha support to all canvas renderers 2018-06-25 16:24:08 +01:00
Richard Davey
7a4b29872e Allow for custom canvas and context game config options. Game.context now set in WebGL mode. Allows WebGL2 contexts to be passed in. Fix #3653 2018-05-10 12:25:33 +01:00
Richard Davey
e37b183038 Completed all jsdocs for the Camera class 2018-04-15 05:05:03 +01:00
Richard Davey
380d4afb92 Swapping to new camera effects system 2018-04-14 17:38:48 +01:00
Richard Davey
b7ae0295bc No need to use globalAlpha or run fillRect twice. 2018-04-07 17:52:10 +01:00
Richard Davey
57c5ca657b Small refactoring 2018-04-05 11:01:24 +01:00
Richard Davey
4f6239dadb jsdoc and eslint fixes 2018-04-05 09:02:36 +01:00
Felipe Alfonso
7b275e2c62 DrawImage works with parent matrix 2018-04-04 12:31:45 -03:00
Richard Davey
66c2c7a359 change types 2018-03-30 13:51:32 +01:00
Richard Davey
f1e646c9ee jsdoc fixes 2018-03-28 15:39:57 +01:00
orblazer
dcd80375c0 Fix "object" types on Renderer and Scene 2018-03-21 14:41:17 +01:00
orblazer
8fdedabaeb Add callbacks on Renderer 2018-03-19 21:41:24 +01:00
orblazer
6a4dd8db8f Update JSDoc on Renderer and Scene 2018-03-19 01:59:59 +01:00
Richard Davey
2c10ac328c Added roundPixels support for the Canvas renderer 2018-02-28 22:32:59 +00:00
Richard Davey
d23688c3e4 Added eslint fixes and overrides 2018-02-16 18:44:07 +00:00
Richard Davey
86f00eeb52 eslint fixes 2018-02-16 18:17:51 +00:00
Felipe Alfonso
9b2741387b Resolution affecting camera display 2018-02-12 16:03:13 -03:00
Richard Davey
d1f5f8a82b Added jsdocs 2018-02-12 16:01:21 +00:00
Richard Davey
403a9363fd Updated jsdocs 2018-02-12 13:48:47 +00:00
Richard Davey
b525ecb502 Added jsdocs 2018-02-09 13:46:04 +00:00
Felipe Alfonso
cffc40b834 Fixed flip on blitter game object. Added camera scrollFactor to blitter canvas renderer 2018-02-06 17:19:11 -03:00
Richard Davey
2a86400a28 Added in jsdocs 2018-01-31 13:54:44 +00:00
Richard Davey
a802914243 Added in destroy methods for all managers and invoked them from Game 2018-01-31 03:38:10 +00:00
Felipe Alfonso
99d850346f Text rendering added 2018-01-23 21:40:20 -03:00
Richard Davey
39b1f35a20 Removed call to render and tidied up a little 2018-01-20 04:45:14 +00:00
Richard Davey
d8f1ba03e9 Moved repository location 2018-01-09 21:43:56 +00:00
Richard Davey
0d90f75b5f Splitting the dev branch up into versions. 2016-11-22 01:36:56 +00:00
photonstorm
15fbd0962d Renamed to Update Manager. 2016-10-14 08:58:12 +01:00
photonstorm
9fcfa86cbf Forced alpha context. 2016-10-14 06:31:53 +01:00
photonstorm
ff2caeeb1c Some quick Image tests (will need to move to Sprite soon) 2016-10-14 02:21:21 +01:00
photonstorm
ce3308ea1d Hooking the Loader and Cache into the new Texture Manager. 2016-10-11 14:52:17 +01:00
Richard Davey
729020477a New Game Objects structure in place, and starting to take shape.
Moved BitmapData and RenderTexture into the textures folder for now.

All Game Objects now have their own sub-folder, with their Factory and renderer functions alongside them, plus any other files they need.

New Factory class added. Currently hooked into `game.factory` for testing, but will swap to `game.add` when complete.
2016-10-08 03:05:42 +01:00
Richard Davey
85c580ac61 Starting porting RenderTexture over. 2016-10-07 03:55:55 +01:00
Richard Davey
f9fe6a3e94 Fixed canvas SpriteBatch and removed duplicate render functions. 2016-10-07 03:41:48 +01:00
Richard Davey
98d2bdf03b Fixed rotation! and setting Canvas tint modes. 2016-10-07 03:08:51 +01:00
Richard Davey
f6047763fa Fixed Graphics rendering. 2016-10-07 02:53:34 +01:00
Richard Davey
2630a48266 Added TileSprite to the renderer. 2016-10-07 02:09:12 +01:00
Richard Davey
ea9c9ae7b3 Removed gl texture ID. 2016-10-07 00:59:10 +01:00
Richard Davey
4cd0e833d5 Sorted out the mixin needed for the Canvas renderer. 2016-10-05 01:09:23 +01:00
Richard Davey
047a994334 Canvas and WebGL rendering Text again. 2016-10-04 22:47:05 +01:00
Richard Davey
28eb7a5f40 Adding in more renderer game objects. 2016-10-04 22:36:07 +01:00
photonstorm
03f67a2677 Refactored WebGL renderer working for Sprites and Containers. 2016-10-04 15:39:54 +01:00
Richard Davey
d55cc215ee Moving more rendering functionality over. 2016-10-04 00:58:52 +01:00
Richard Davey
0142997787 Merged Tint functions into Canvas Renderer. 2016-10-03 22:31:10 +01:00
Richard Davey
40bef9543a Updated Game Object renderer blocks to use 'this'.
Split out the Graphics renderer to avoid being a giant if/else loop.
2016-10-03 21:46:39 +01:00
photonstorm
7b40711418 Moved the Mask related features from Graphics into the Canvas Renderer. 2016-10-03 17:14:44 +01:00
photonstorm
1da95994a5 First pass of the newly re-structured Canvas Renderer (still using old texture system though). 2016-10-03 12:44:54 +01:00
Richard Davey
2590e67e2b First pass at the new consolidated Texture classes. Ultimately these will replace PIXI.BaseTexture, PIXI.Texture and Phaser.Frame. Objects will grab frame references, rather than creating their own Texture objects all the time. 2016-09-29 04:21:12 +01:00