workadventure/front
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
..
dist Bump Phaser version 2021-04-21 10:35:38 +02:00
packages/iframe-api-typings Dynamically fetching correct version and generating declarations only for npm lib 2021-04-11 11:32:56 +02:00
src Skip "render" if nothing changed on screen 2021-05-06 15:36:45 +02:00
tests/Phaser FIX: improved the validation from localstorage for username and characterLayers 2021-04-12 14:48:00 +02:00
.dockerignore Fixing Dockerfiles 2020-04-11 15:11:22 +02:00
.eslintrc.json Enabling stricter lint on front 2020-06-19 14:29:29 +02:00
.gitignore Template google analytics data 2021-01-19 12:17:05 +01:00
Dockerfile [Breaking change] UPLOADER_URL and ADMIN_URL are now true URLs (and not only host name) and API_URL is replaced by PUSHER_URL 2021-03-31 16:00:14 +02:00
jasmine.json Adding PlayerMovement class to interpolate/extrapolate position along tests (installing Jasmine) 2020-06-02 10:48:04 +02:00
LICENSE.txt Changing license to AGPL + Commons Clause 2020-06-09 10:17:21 +02:00
package.json Bump Phaser version 2021-04-21 10:35:38 +02:00
templater.sh Fixing GA tag not included in play domain 2021-03-05 10:00:11 +01:00
tsconfig.json Integrate virtual joystick 2021-04-13 02:00:03 +02:00
webpack.config.js Fixing broken live-reload 2021-03-31 16:20:21 +02:00
webpack.prod.js Sending the source map out of the main JS file to reduce size 2020-07-02 10:38:36 +02:00
yarn.lock Bump Phaser version 2021-04-21 10:35:38 +02:00