Commit Graph

90 Commits

Author SHA1 Message Date
GRL
9a5300dd2d helpCameraSettingPopup in svelte with nes-css 2021-06-01 11:07:52 +02:00
GRL
b8873d1277 selectCompanionScene work with svelte 2021-05-31 12:06:11 +02:00
kharhamel
12da6ddd6c FEATURE: improved the display of player names, with the font-family 'Press start 2P' and gray outlines 2021-05-28 15:33:10 +02:00
David Négrier
c9eb5691b5
Merge pull request #1045 from thecodingmachine/svelte
Installing Svelte in front container
2021-05-18 10:25:54 +02:00
David Négrier
24dfa2703d Set a global dirty flag on resize
This adds a global "Dirty" flag at the Game level and sets it each time the ScaleManager is modified.
This fixes a bug where the game was not redrawn when a CoWebsite was opening/closing.
2021-05-18 09:20:38 +02:00
David Négrier
7cc1e5b2c6 Moving styles out of the "dist/" directory 2021-05-17 16:41:40 +02:00
David Négrier
1885ea42a4 First working example with Svelte (the menu icon shows up on entering the game) 2021-05-17 16:39:56 +02:00
David Négrier
9bc79c3ed3 Adding Svelte to the project 2021-05-17 16:39:55 +02:00
David Négrier
6b4d064f19 Merge branch 'develop' of github.com:thecodingmachine/workadventure into skiprender2
# Conflicts:
#	front/src/Phaser/Game/GameScene.ts
#	front/src/index.ts
2021-05-06 16:25:13 +02:00
David Négrier
6d3cbc573c Instruct systems with 2 GPUs to use the low power GPU (to save battery) 2021-05-06 15:36:49 +02:00
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
David Négrier
3751b0e2bc Removing RESOLUTION and ZOOM_LEVEL settings: they are no more needed or supported 2021-05-05 17:11:03 +02:00
David Négrier
82073098e0 Merge branch 'develop' of github.com:thecodingmachine/workadventure into resolution 2021-05-05 11:01:11 +02:00
David Négrier
a6ad1674e3 Fixing broken resize 2021-05-05 09:51:04 +02:00
David Négrier
59b391e983 Prevent WA scale manager from zooming too much 2021-05-04 14:08:40 +02:00
David Négrier
04d3cf8593 Adding HdpiManager to start and scale from a default resolution that is correct by default for the game.
Fixing VirtualJoystick on resize.
2021-05-04 11:35:33 +02:00
Gregoire Parant
f11e936143 Refactoring & fix feedback WorkAdventure 2021-04-23 03:59:14 +02:00
kharhamel
6a2326c4b3 WIP: testing new resolution config 2021-04-21 18:04:00 +02:00
David Négrier
f9f6abe7b3 Switching setTimeout to false 2021-04-21 10:37:20 +02:00
Kharhamel
5dc2f0ac47
Merge pull request #898 from thecodingmachine/touchZoom
FEATURE: add the ability to zoom in and out using touch screen
2021-04-20 14:51:08 +02:00
Gregoire Parant
5e8951fdaa Merge branch 'master' into develop 2021-04-19 21:19:35 +02:00
Gregoire Parant
e7b5bb261d HotFix performance
- Change forceSetTimeOut to false and permit to freeze the scene.
 - Fix style sending audio message
 - Fix banned message from admin console
2021-04-19 20:19:40 +02:00
kharhamel
d7a74baa9d FEATURE: add the ability to zoom in and out using touch screen 2021-04-15 16:37:58 +02:00
Johannes Berthel
52303c0bd6 added select companion scene 2021-04-02 23:00:51 +02:00
David Négrier
aaaa192b71 Merge branch 'develop' of github.com:thecodingmachine/workadventure into iframe_api
# Conflicts:
#	front/dist/.gitignore
#	front/dist/index.tmpl.html
#	front/src/Phaser/Game/GameScene.ts
#	front/src/WebRtc/CoWebsiteManager.ts
2021-03-28 16:53:15 +02:00
David Négrier
f9a2097bc9
Merge pull request #828 from thecodingmachine/develop
Deploy 2021-03-22
2021-03-22 16:42:28 +01:00
GRL
1cfb22f695 Creation of the HelpCameraSettingsScene
Update of GameManager and index to include the new scene
Change title of helpCameraSettings
Suppression function reset
2021-03-19 15:40:07 +01:00
kharhamel
32fdfaab35 edited CoWebsiteManager to manage vertical resizing 2021-03-18 16:11:22 +01:00
kharhamel
0701e607fa added sass loader to the project and put the cowebsite style in its own sass file 2021-03-18 12:37:05 +01:00
kharhamel
272be3eba0 improve the visual of the cowebsite 2021-03-17 18:35:19 +01:00
kharhamel
3f6c61633a FEATURE: complete control over the iframe size 2021-03-17 18:34:12 +01:00
David Négrier
ffb5823b2a Adding the ability to specify a custom Jitsi URL directly in the map
This feature allows to add a "jitsiUrl" property in the map.
As a result, you can use for a given Jitsi room a custom instance of Jitsi.
Using "jitsiUrl" will only work with public Jitsi instances (authentication is not supported when "jitsiUrl" property is provided)

The Jitsi external_api.js script is now lazily loaded.
2021-03-16 20:37:12 +01:00
David Négrier
eb93a04341 Adding an API for inter-iframe communication
Adds a first version of an API to communicate between an iFrame opened by WorkAdventure and WorkAdventure itself.
The first API method is a method allowing to add messages in the chat, from the iFrame.

Comes with a test file.
2021-03-04 19:00:00 +01:00
David Négrier
e757d63924 Switching Phaser to pixelart mode
To be honest, I'm not sure what it does exactly (it is supposed to prevent antialiasing and it is rounding coordinates for rendering sprites, but I don't see a difference yet.
2021-02-02 12:04:50 +01:00
Kharhamel
9849e70613
Merge pull request #670 from thecodingmachine/httpCypress
Removed cypress from the project
2021-01-28 15:03:12 +01:00
kharhamel
ca231eee4a remove cypress from the project :( 2021-01-28 14:56:24 +01:00
David Négrier
8eebed1829 Removing pipeline related code
This code is broken since Phaser 3.50 and we are facing weird issues with MacOS memory leaks and crashes.
Removing this code will remove one potential suspect.
2021-01-27 11:18:07 +01:00
David Négrier
c2c8680dae Fix linting 2021-01-25 12:02:00 +01:00
David Négrier
8609cda0d0 Add a parameter to allow changing phaser renderer
Recently, some Macs have been crashing running WorkAdventure.
Hard to say if this is related to Phaser 3.50 upgrade or to the new MacOS version.

It happens mostly on Mac Air and might be related to WebGL rendering.

This commit allows to switch to CANVAS renderer by adding `?phaserMode=canvas` in the URL
2021-01-25 11:18:48 +01:00
David Négrier
adca51f6de Replacing FourOFourScene with more generic ErrorScene 2021-01-17 20:42:45 +01:00
David Négrier
8cf481ec49 Fixing bug when no WebGL is available
The switch to Phaser 3.50 introduced a bug when WebGL is not available in a browser.
The changes in this commit prevent calls to the WebGL pipeline if the pipeline is not available.
2021-01-13 18:39:28 +01:00
kharhamel
1359fbe977 updated phaser to version 3.51 and fixed the BC 2021-01-06 15:00:54 +01:00
kharhamel
069f2f1cec FEAT: prototype game menu using html elements, better icon for text chat 2020-12-15 16:37:57 +01:00
Gregoire Parant
27634a61ee Create menu to set your quality video and game 2020-11-27 16:24:07 +01:00
Gregoire Parant
26b81cc788 Decrease fps 2020-11-27 12:44:32 +01:00
Gregoire Parant
961e4d3f57 Decrease fps 2020-11-27 12:13:46 +01:00
Gregoire Parant
f596f613e8 Try to decrease phaser config fps 2020-11-25 01:35:42 +01:00
Gregoire Parant
4aca04d03a Try to decrease phaser config fps 2020-11-25 01:19:19 +01:00
Gregoire Parant
08d8222ed5 level up fps to decrease GPU use in the browser 2020-11-25 00:47:21 +01:00
kharhamel
67aa2f4b6c opening and closing jitsi windows now trigger some transitions 2020-10-27 17:44:57 +01:00