Commit graph

91 commits

Author SHA1 Message Date
David Négrier d37165219c Migrating followStates and followRoles from a const object to a type restricted to only the string values allowed.
This allows for more secure code (compilation checks) and simpler code too (we can pass strings instead of const values)
2021-12-24 15:49:25 +01:00
PizZaKatZe 50147db895 Block running in follow mode 2021-12-20 13:36:29 +01:00
PizZaKatZe 21b1313a18 Get rid of buggy open state 2021-12-20 12:50:43 +01:00
Lurkars 3916d9c58e Add follow button to ui, improved flow 2021-12-20 11:35:06 +01:00
Lurkars 2cd088c049 Change follow request to "F" button, use nes-css buttons 2021-12-18 11:58:30 +01:00
PizZaKatZe e3e7fba539 Rename InteractMenu/-Store => FollowMenu/-Store 2021-12-15 18:50:59 +01:00
PizZaKatZe 2bd71790b5 Use user IDs instead of names 2021-12-15 18:42:24 +01:00
PizZaKatZe 1ab8165951 Process input events in follow mode as well 2021-12-15 18:42:24 +01:00
PizZaKatZe 290e5131e9 Clean up follow implementation; stop following when leader leaves the scene 2021-12-15 18:42:24 +01:00
PizZaKatZe 0a410d289d Implement follow request / confirmation UI 2021-12-15 18:42:22 +01:00
PizZaKatZe e7f1395809 Stop before running into followed Avatar; stop sprite animation 2021-12-15 18:36:12 +01:00
danb 372dda792f Fix issue of interrupted conversation in follow-mode 2021-12-15 18:36:12 +01:00
danb 7c7144527c Add minimum distance to enable following 2021-12-15 18:36:12 +01:00
danb f340e8114d Implement automatic following of other players.
* initiate following by reacting to the interact event
* subscribe to remote player and update positions in relation to them
  instead of reacting to user input
* cancel following if the user moves actively again
2021-12-15 18:36:12 +01:00
Alexis Faizeau 624593e425 Implement twemoji on emote 2021-11-10 16:55:20 +01:00
Alexis Faizeau 934e24f837 Implement on enter/leave layer events 2021-10-29 19:44:58 +02:00
Lurkars 3080e1fdc7 improvements on svelte store + handling 2021-09-12 11:11:52 +02:00
Lurkars e553392d9d move twemoji menu to svelte 2021-09-10 16:57:21 +02:00
Lurkars d23820227e Merge branch 'twemojiEmoteMenu' of github.com:Lurkars/workadventure into twemojiEmoteMenuSvelte 2021-09-10 14:58:49 +02:00
grégoire parant 4f0bb95a38
Emote silent zone (#1342)
* Add an emote when the user is in silent zone

* Update silent icon strategy

* Update strategy for silent zone

 - Add svelte store
 - Show silent zone indication and replace camera

This update permit to hide silent zone when user is in Jitsi discussion

* Fix css silent zone

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
2021-09-05 18:36:22 +02:00
Lurkars d43202d90d fix userInput 2021-07-21 10:17:46 +02:00
Lurkars f43deff626 use emote button 2021-07-21 09:41:22 +02:00
Lurkars c264364752 Twemoji Emote Menu 2021-06-29 08:37:01 +02:00
kharhamel dd45996f9c FIX: improved the visit card, cleanup the code 2021-06-08 16:39:22 +02:00
David Négrier d32df13f1b Camera now show up when someone is moving and hides 5 seconds after we stop moving.
Also, added an animation to show/hide the webcam.
2021-05-26 12:12:46 +02:00
kharhamel d93b30f982 improved radial menu 2021-05-19 18:11:51 +02:00
kharhamel 35b37a6a88 Added a radial menu to run emotes 2021-05-19 15:17:50 +02:00
David Négrier 4d4f845b9e Setting "importsNotUsedAsValues": "error"
Turning the "importsNotUsedAsValues" TS config value to "error".
This will require us to use `import type` instead of `import` when we are importing a value that is only used as a type (and therefore that is dropped by the Typescript compiler).

Why this change?
This is a requirement to be able to use Svelte in the future. See https://github.com/sveltejs/svelte-preprocess/issues/206#issuecomment-663193798
2021-05-12 09:13:25 +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
PizZaKatZe 9c9d262782 Make movement speed depend on joystick force 2021-04-13 02:00:05 +02:00
Johannes Berthel 187e21eed9 load texture inside game scene instead inside of inside companion class 2021-04-06 19:10:18 +02:00
Johannes Berthel c07079051a transmit companion to remote players 2021-04-02 21:21:11 +02:00
Johannes Berthel 2ad712807b add companion only on local player 2021-04-02 17:14:34 +02:00
Johannes Berthel 5a91e15580 add companion to remote player 2021-04-01 18:51:51 +02:00
Johannes Berthel 80a5d2e30e added random companion to player 2021-04-01 00:33:05 +02:00
kharhamel fe8c75610d FIX: player anims correctly stop on the idle frame 2021-03-11 16:21:02 +01:00
kharhamel 472fbb1de0 All player textures are now lazy-loaded 2021-01-08 11:44:41 +01:00
arp af4611ed29 rewrote the login workflow 2020-09-25 19:23:33 +02:00
David Négrier 6b970adc6c Merge branch 'develop' of github.com:thecodingmachine/workadventure into outline
# Conflicts:
#	front/src/Phaser/Game/GameScene.ts
#	front/src/Phaser/Player/Player.ts
#	front/src/index.ts
#	front/yarn.lock
2020-08-17 22:51:37 +02:00
David Négrier 24fb605f50 Switching to definitely assigned parameters
This allows us to go in "full strict mode" (yeah!)
See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#strict-class-initialization
2020-08-07 23:39:06 +02:00
David Négrier 84529d6e99 Propagating customized sprites all over the game 2020-07-28 17:45:55 +02:00
David Négrier ee612f6585 Adding event support to items 2020-07-27 22:36:58 +02:00
David Négrier ed146226cf Adding Outline capabilities and a ActionableItem notion. 2020-07-23 18:09:24 +02:00
David Négrier f7466994c5 Playing with pipeline to display outline 2020-07-15 23:44:01 +02:00
David Négrier 8348d13bfe Fixing use const instead of let 2020-06-19 14:30:34 +02:00
David Négrier b82b13e351 Finalizing strict mode fixes 2020-06-04 18:56:59 +02:00
David Négrier 6f69a62d4d More strict fixes 2020-06-04 18:56:59 +02:00
Gregoire Parant b931a8f117 Fix animation player 2020-06-01 13:20:45 +02:00
David Négrier f36bd240a7 Fix lint 2020-05-26 17:43:25 +02:00
David Négrier 0492dfdf3a Fixing import 2020-05-26 17:37:26 +02:00