workadventure/front/src/Phaser/Game
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
..
AddPlayerInterface.ts transmit companion to remote players 2021-04-02 21:21:11 +02:00
Game.ts Skip "render" if nothing changed on screen 2021-05-06 15:36:45 +02:00
GameManager.ts Merge pull request #870 from joberthel/feature/player-companion 2021-04-12 18:11:07 +02:00
GameMap.ts Fix last properties changed after trigger change position 2021-02-18 11:32:37 +01:00
GameScene.ts Skip "render" if nothing changed on screen 2021-05-06 15:36:45 +02:00
PlayerMovement.ts rewrote the login workflow 2020-09-25 19:23:33 +02:00
PlayersPositionInterpolator.ts Migrating userId to "int32" to save some space and adding userMoves message in protobuf 2020-09-18 13:57:38 +02:00