workadventure/front/src/Phaser
David Négrier 0c5e5ef578 Skip "render" if nothing changed on screen
For each requested animation frame (RAF) in Phaser, Phaser calls the "update" method, then the "render" method of each scenes.
The "render" method takes some time (and energy) to perform the rendering.

The fact is we probably don't need to call "render" if nothing changed on the screen (which happens most of the frames in a typical WorkAdventure game).

This commit is therefore overloading the "Game" class of Phaser to add a "dirty" flag.

Scenes can now add a "isDirty()" method. If all displayed scenes are pristine (not dirty), Phaser will skip rendering the frame altogether.

This saves "a lot" of energy, resulting in laptops that are not overheating when using WorkAdventure \o/
2021-05-06 15:36:45 +02:00
..
Companion added companion compatibility with phaser 3.54.0 2021-04-09 18:30:30 +02:00
Components Make login text input field touch capable (thx @TabscoEye) 2021-04-13 00:19:06 +02:00
Entity added companion compatibility with phaser 3.54.0 2021-04-09 18:30:30 +02:00
Game Skip "render" if nothing changed on screen 2021-05-06 15:36:45 +02:00
Items Removing pipeline related code 2021-01-27 11:18:07 +01:00
Login Add touch support to companion selection scene 2021-04-13 02:00:02 +02:00
Map Adding the ability to register a single script using the "script" attribute at the map property level. 2021-03-07 21:02:38 +01:00
Menu Skip "render" if nothing changed on screen 2021-05-06 15:36:45 +02:00
Player Skip "render" if nothing changed on screen 2021-05-06 15:36:45 +02:00
Reconnecting Disabling explicit any check on error handling 2021-01-18 15:36:02 +01:00
Shaders Bump Phaser version 2021-04-21 10:35:38 +02:00
UserInput Make movement speed depend on joystick force 2021-04-13 02:00:05 +02:00