Send event and play animation with user frame
This commit is contained in:
parent
b51ce51847
commit
5a6415607d
12 changed files with 128 additions and 84 deletions
|
@ -7,5 +7,6 @@ export interface ExSocketInterface extends Socket {
|
|||
webRtcRoomId: string;
|
||||
userId: string;
|
||||
name: string;
|
||||
frame: string;
|
||||
position: PointInterface;
|
||||
}
|
|
@ -25,6 +25,7 @@ let RefreshUserPositionFunction = function(rooms : ExtRooms, Io: socketIO.Server
|
|||
roomId: socket.roomId,
|
||||
position: socket.position,
|
||||
name: socket.name,
|
||||
frame: socket.frame,
|
||||
};
|
||||
let dataArray = <any>[];
|
||||
if (mapPositionUserByRoom.get(data.roomId)) {
|
||||
|
|
|
@ -2,6 +2,7 @@ export class Message {
|
|||
userId: string;
|
||||
roomId: string;
|
||||
name: string;
|
||||
frame: string;
|
||||
|
||||
constructor(data: any) {
|
||||
if (!data.userId || !data.roomId) {
|
||||
|
@ -10,13 +11,15 @@ export class Message {
|
|||
this.userId = data.userId;
|
||||
this.roomId = data.roomId;
|
||||
this.name = data.name;
|
||||
this.frame = data.frame;
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
userId: this.userId,
|
||||
roomId: this.roomId,
|
||||
name: this.name
|
||||
name: this.name,
|
||||
frame: this.frame
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue