Commit graph

117 commits

Author SHA1 Message Date
Richard Davey
3a4bfa679b Added experimental Camera to Render Texture 2018-08-07 16:27:21 +01:00
Richard Davey
8573e60273 No config, no update 2018-08-07 16:25:55 +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
9675c269e6 Split Camera up into BaseCamera, which Camera now extends. 2018-08-04 13:05:41 +01:00
Richard Davey
fa2b78192c The CameraManager was accidentally adding extra destroy event calls when a Scene was restarted, causing an Uncaught TypeError: Cannot read property 'events' of null when trying to destroy a game instance having swapped from a Scene to another, and back again. Fix #3878 2018-07-31 11:34:59 +01:00
Richard Davey
4bdecf488b jsdocs tweaks 2018-07-26 23:41:52 +01:00
Richard Davey
1a62a3563e Added refs to config and Scene Manager and new customViewport bool 2018-07-26 23:04:53 +01:00
Richard Davey
e851209b41 Camera effects using the new drawFillRect method. 2018-07-26 16:32:31 +01:00
Richard Davey
b6a1033dbd Fixed Camera FX for scaled camera sizes 2018-07-18 15:03:06 +01:00
Richard Davey
25e4993e6f Added x and y getters and new scaled viewport values 2018-07-18 14:32:47 +01:00
Richard Davey
16d597c983 Fixed jsdoc references 2018-07-17 11:43:09 +01:00
Richard Davey
646861425f Added Camera.worldView property and adjusted it to the correct values each frame. 2018-07-12 15:08:29 +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
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
a6ab61dd99 Fixed id use 2018-06-27 13:16:11 +01:00
Richard Davey
ee8e264d5e Return removed total 2018-06-27 13:16:01 +01:00
Richard Davey
2888fe94bd Tweak 2018-06-27 13:05:06 +01:00
Richard Davey
1bfe58ab55 remove can take an array of cameras and also no longer needs total to be > 0 2018-06-27 13:03:40 +01:00
Richard Davey
183f5c4260 CameraManager.getTotal is a new method that will return the total number of Cameras being managed, with an optional isVisible argument, that only counts visible cameras if set. 2018-06-27 12:45:54 +01:00
Richard Davey
f2b7fd0a32 Removed the cameraX properties because they fall out of sync on camera remove 2018-06-27 12:13:37 +01:00
Richard Davey
7aa46657c2 Tidying up jsdocs and changing float to number 2018-06-26 23:19:14 +01:00
Richard Davey
c2fbad8356 Added jsdocs. Now 100% complete! 2018-06-26 17:24:51 +01:00
Richard Davey
ba9890e9f1 lint fix 2018-06-26 16:41:37 +01:00
Richard Davey
237368161b Added Camera.setAlpha method 2018-06-25 16:31:54 +01:00
Richard Davey
51468fdefc Merge branch 'master' of https://github.com/photonstorm/phaser 2018-06-25 16:25:42 +01:00
Richard Davey
6dff47b71d Added Camera.alpha property 2018-06-25 16:11:09 +01:00
Richard Davey
d20188b75d Removed camera pool, renamed current ID and added accessor properties 2018-06-25 16:10:50 +01:00
Richard Davey
6df877cfa3 Docs update 2018-06-23 12:33:20 +01:00
Richard Davey
e53f61d068 CameraManager.resetAll now destroys all current Cameras, resets the camera ID marker to 1 and adds a single new Camera. 2018-06-23 12:33:10 +01:00
Richard Davey
932737343b Added centerOn argument to setBounds and bumped Camera id to be public 2018-06-23 12:18:44 +01:00
Chris Andrew
2388707379 Fixed lint error. Minor documentation fix in 2D camera. 2018-06-21 18:17:00 +01:00
Richard Davey
53cf7d847b Fixed Pan so it updates constantly, allowing Pan + Zoom together 2018-06-21 17:56:27 +01:00
Richard Davey
f4f9a98ac1 Added Camera Zoom Effect 2018-06-21 17:48:11 +01:00
Richard Davey
ec168c4b9b Removed dead code and added jsdocs 2018-06-21 17:19:58 +01:00
Richard Davey
3ece90ad75 Added Camera.getScroll and the new Pan Effect 2018-06-21 17:15:43 +01:00
Richard Davey
472df6a7be Camera.centerOn is a new method that will move the camera so its viewport is centered on the given coordinates. A handy way of jumping to different points around a map without needing to calculate the scroll offsets. 2018-06-21 15:54:54 +01:00
Richard Davey
2ff6845360 Camera.centerToBounds didn't take the bounds offset into account, so bounds at non-zero positions wouldn't center properly. All bounds now center correctly. Fix #3706 2018-06-21 14:03:31 +01:00
Richard Davey
3e3b0d6397 Fixed issue where negative camera bounds wouldn't clamp properly 2018-06-21 12:33:20 +01:00
Richard Davey
c02c9cf2da Fixed camera bounds when bounds are smaller than the viewport 2018-06-21 02:32:24 +01:00
Richard Davey
0b3392fab4 Fixed Camera roundPixels stuttering 2018-06-21 01:59:12 +01:00
Richard Davey
99eb565520 Fixed camera bounds with zoom issue and added new displayWidth / displayHeight properties 2018-06-20 17:42:20 +01:00
Richard Davey
92d06d4742 Removed incorrect application of zoom 2018-06-20 14:52:22 +01:00
Richard Davey
e1151fe436 Removed merge conflicts 2018-06-20 14:29:36 +01:00
Richard Davey
7d573a35eb Added Camera.setDeadzone method, updated startFollow and added jsdocs. 2018-06-20 14:26:36 +01:00
Richard Davey
2b9be45741 Starting Camera.deadzone support 2018-06-19 12:29:04 +01:00
Richard Davey
ccf50ff8dc Added Camera.visible property and setter. 2018-06-04 22:12:20 +01:00
Richard Davey
bf2af95930 CameraManager.getCameraBelowPointer has been renamed to getCamerasBelowPointer and it now returns an array of all the cameras below the given pointer, not just the top-most one. The array is sorted so that the top-most camera is at the start of the array. 2018-06-04 22:10:13 +01:00
samme
68ebce077e Add Camera#centerX, Camera#centerY 2018-06-02 21:04:56 -07:00