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
@@ -179,7 +179,7 @@ export class IoSocketController {
|
||||
//add function to refresh position user in real time.
|
||||
//this.refreshUserPosition(Client);
|
||||
|
||||
const messageUserJoined = new MessageUserJoined(Client.userId, Client.name, Client.character, Client.position);
|
||||
const messageUserJoined = new MessageUserJoined(Client.userId, Client.name, Client.characterLayers, Client.position);
|
||||
|
||||
socket.to(roomId).emit(SockerIoEvent.JOIN_ROOM, messageUserJoined);
|
||||
|
||||
@@ -190,7 +190,7 @@ export class IoSocketController {
|
||||
console.warn('Something went wrong. The World contains a user "'+user.id+"' but this user does not exist in the sockets list!");
|
||||
return null;
|
||||
}
|
||||
return new MessageUserPosition(user.id, player.name, player.character, player.position);
|
||||
return new MessageUserPosition(user.id, player.name, player.characterLayers, player.position);
|
||||
}).filter((item: MessageUserPosition|null) => item !== null);
|
||||
|
||||
const listOfItems: {[itemId: string]: unknown} = {};
|
||||
@@ -289,7 +289,7 @@ export class IoSocketController {
|
||||
}
|
||||
const Client = (socket as ExSocketInterface);
|
||||
Client.name = playerDetails.name;
|
||||
Client.character = playerDetails.character;
|
||||
Client.characterLayers = playerDetails.characterLayers;
|
||||
answerFn(Client.userId);
|
||||
});
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@ export interface ExSocketInterface extends Socket, Identificable {
|
||||
webRtcRoomId: string;
|
||||
userId: string;
|
||||
name: string;
|
||||
character: string;
|
||||
characterLayers: string[];
|
||||
position: PointInterface;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {PointInterface} from "_Model/Websocket/PointInterface";
|
||||
|
||||
export class MessageUserJoined {
|
||||
constructor(public userId: string, public name: string, public character: string, public position: PointInterface) {
|
||||
constructor(public userId: string, public name: string, public characterLayers: string[], public position: PointInterface) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ export class Point implements PointInterface{
|
||||
}
|
||||
|
||||
export class MessageUserPosition {
|
||||
constructor(public userId: string, public name: string, public character: string, public position: PointInterface) {
|
||||
constructor(public userId: string, public name: string, public characterLayers: string[], public position: PointInterface) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ import * as tg from "generic-type-guard";
|
||||
export const isSetPlayerDetailsMessage =
|
||||
new tg.IsInterface().withProperties({
|
||||
name: tg.isString,
|
||||
character: tg.isString
|
||||
characterLayers: tg.isArray(tg.isString)
|
||||
}).get();
|
||||
export type SetPlayerDetailsMessage = tg.GuardedType<typeof isSetPlayerDetailsMessage>;
|
||||
|
||||
@@ -39,7 +39,53 @@
|
||||
<title>WorkAdventure</title>
|
||||
</head>
|
||||
<body id="body" style="margin: 0">
|
||||
<div id="webRtc" class="webrtc">
|
||||
<div class="main-container">
|
||||
<div id="game" class="game" style="/*background: red;*/">
|
||||
<div id="game-overlay" class="game-overlay" style="/*background: violet*/;">
|
||||
<div id="main-section" class="main-section">
|
||||
<!--<div style="background: lightpink;">a</div>
|
||||
<div style="background: lightpink;">a</div> -->
|
||||
</div>
|
||||
<aside id="sidebar" class="sidebar">
|
||||
<!--<div style="background: lightgreen;">a</div>
|
||||
<div style="background: green;">b</div>
|
||||
<div style="background: darkgreen;">c</div>
|
||||
<div style="background: darkgreen;">d</div>-->
|
||||
</aside>
|
||||
<div id="chat-mode" class="chat-mode three-col" style="display: none;">
|
||||
<!--<div style="background: lightgreen;">a</div>
|
||||
<div style="background: green;">b</div>
|
||||
<div style="background: darkgreen;">c</div>
|
||||
<div style="background: darkolivegreen;">d</div>
|
||||
<div style="background: darkolivegreen;">d</div>
|
||||
<div style="background: darkgreen;">c</div>
|
||||
<div style="background: green;">b</div>
|
||||
<div style="background: lightgreen;">last elem for game</div>-->
|
||||
</div>
|
||||
|
||||
|
||||
<div id="activeCam" class="activeCam">
|
||||
<div id="div-myCamVideo" class="video-container">
|
||||
<video id="myCamVideo" autoplay muted></video>
|
||||
</div>
|
||||
<div class="btn-cam-action">
|
||||
<div class="btn-micro">
|
||||
<img id="microphone" src="resources/logos/microphone.svg">
|
||||
<img id="microphone-close" src="resources/logos/microphone-close.svg">
|
||||
</div>
|
||||
<div class="btn-video">
|
||||
<img id="cinema" src="resources/logos/cinema.svg">
|
||||
<img id="cinema-close" src="resources/logos/cinema-close.svg">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="cowebsite" class="cowebsite"></div>
|
||||
</div>
|
||||
<!--
|
||||
<div id="webRtc" class="webrtc">
|
||||
<div id="activeCam" class="activeCam">
|
||||
<div id="div-myCamVideo" class="video-container">
|
||||
<video id="myCamVideo" autoplay muted></video>
|
||||
@@ -54,11 +100,9 @@
|
||||
<img id="cinema" src="resources/logos/cinema.svg">
|
||||
<img id="cinema-close" src="resources/logos/cinema-close.svg">
|
||||
</div>
|
||||
<!--<div class="btn-call">
|
||||
<img src="resources/logos/phone.svg">
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div id="webRtcSetup" class="webrtcsetup">
|
||||
<img id="webRtcSetupNoVideo" class="background-img" src="resources/logos/cinema-close.svg">
|
||||
<video id="myCamVideoSetup" autoplay muted></video>
|
||||
|
||||
|
After Width: | Height: | Size: 293 B |
|
After Width: | Height: | Size: 517 B |
|
After Width: | Height: | Size: 517 B |
|
After Width: | Height: | Size: 524 B |
|
After Width: | Height: | Size: 505 B |
|
After Width: | Height: | Size: 525 B |
|
After Width: | Height: | Size: 517 B |
|
After Width: | Height: | Size: 743 B |
|
After Width: | Height: | Size: 798 B |
|
After Width: | Height: | Size: 754 B |
|
After Width: | Height: | Size: 814 B |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 810 B |
|
After Width: | Height: | Size: 827 B |
|
After Width: | Height: | Size: 451 B |
|
After Width: | Height: | Size: 451 B |
|
After Width: | Height: | Size: 451 B |
|
After Width: | Height: | Size: 451 B |
|
After Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 276 B |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 450 B |
|
After Width: | Height: | Size: 324 B |
|
After Width: | Height: | Size: 349 B |
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 486 B |
|
After Width: | Height: | Size: 390 B |
|
After Width: | Height: | Size: 495 B |
|
After Width: | Height: | Size: 389 B |
|
After Width: | Height: | Size: 516 B |
|
After Width: | Height: | Size: 505 B |
|
After Width: | Height: | Size: 454 B |
|
After Width: | Height: | Size: 454 B |
|
After Width: | Height: | Size: 1000 B |
|
After Width: | Height: | Size: 1011 B |
|
After Width: | Height: | Size: 965 B |
|
After Width: | Height: | Size: 965 B |
|
After Width: | Height: | Size: 910 B |
|
After Width: | Height: | Size: 980 B |
|
After Width: | Height: | Size: 938 B |
|
After Width: | Height: | Size: 961 B |
|
After Width: | Height: | Size: 977 B |
|
After Width: | Height: | Size: 977 B |
|
After Width: | Height: | Size: 388 B |
|
After Width: | Height: | Size: 977 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 388 B |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 354 B |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 922 B |
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 955 B |
|
After Width: | Height: | Size: 972 B |
|
After Width: | Height: | Size: 866 B |
|
After Width: | Height: | Size: 877 B |
|
After Width: | Height: | Size: 905 B |
|
After Width: | Height: | Size: 388 B |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 550 B |
|
After Width: | Height: | Size: 550 B |
|
After Width: | Height: | Size: 469 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 529 B |
|
After Width: | Height: | Size: 529 B |