You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
export const SESSION = Object.freeze({
|
|
|
|
OPENED: 0, // nothing sent/recved yet
|
|
|
|
READY: 1, // init complete
|
|
|
|
CLOSED: 2, // socket closed, but we might continute this same session on another socket
|
|
|
|
});
|
|
|
|
|
|
|
|
export const EVENT = Object.freeze({
|
|
|
|
PREDRAW: 10,
|
|
|
|
SET_COLOR: 11,
|
|
|
|
SET_WIDTH: 12,
|
|
|
|
CLEAR: 13,
|
|
|
|
MOVE_CURSOR: 14,
|
|
|
|
LIFT: 15,
|
|
|
|
|
|
|
|
LEAVE: 16,
|
|
|
|
MOVE_CANVAS: 17,
|
|
|
|
USER_JOINED: 18,
|
|
|
|
ZOOM_CANVAS: 19,
|
|
|
|
|
|
|
|
STROKE: 20,
|
|
|
|
UNDO: 30,
|
|
|
|
REDO: 31,
|
|
|
|
IMAGE: 40,
|
|
|
|
IMAGE_MOVE: 41,
|
|
|
|
IMAGE_SCALE: 42,
|
|
|
|
ERASER: 50,
|
|
|
|
});
|
|
|
|
|
|
|
|
export const MESSAGE = Object.freeze({
|
|
|
|
INIT: 100,
|
|
|
|
SYN: 101,
|
|
|
|
ACK: 102,
|
|
|
|
FULL: 103,
|
|
|
|
FIRE: 104,
|
|
|
|
JOIN: 105,
|
|
|
|
FOLLOW: 106,
|
|
|
|
});
|