Adding a Pusher container as a middleware/dispatcher between front and back
This commit is contained in:
parent
6c6d046891
commit
4c1e566a6c
86 changed files with 12172 additions and 983 deletions
|
@ -13,7 +13,7 @@ import {PositionInterface} from "_Model/PositionInterface";
|
|||
export class ProtobufUtils {
|
||||
|
||||
public static toPositionMessage(point: PointInterface): PositionMessage {
|
||||
let direction: PositionMessage.DirectionMap[keyof PositionMessage.DirectionMap];
|
||||
let direction: Direction;
|
||||
switch (point.direction) {
|
||||
case 'up':
|
||||
direction = Direction.UP;
|
||||
|
@ -105,4 +105,14 @@ export class ProtobufUtils {
|
|||
return message;
|
||||
});
|
||||
}
|
||||
|
||||
public static toCharacterLayerObjects(characterLayers: CharacterLayerMessage[]): CharacterLayer[] {
|
||||
return characterLayers.map(function(characterLayer): CharacterLayer {
|
||||
const url = characterLayer.getUrl();
|
||||
return {
|
||||
name: characterLayer.getName(),
|
||||
url: url ? url : undefined,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue