const schema = require("@colyseus/schema"); const Schema = schema.Schema; class GazePoint extends Schema { constructor(screenX, screenY, createdAt, player, id) { super(); this.screenX = screenX; this.screenY = screenY; this.createdAt = createdAt; this.player = player; this.id = id; this.relativeAge = 0; } static fromClientData(data) { return new GazePoint(data.screenX, data.screenY, data.createdAt, data.player, data.id); } } schema.defineTypes(GazePoint, { screenX: "number", screenY: "number", createdAt: "number", relativeAge: "number", player: "string", id: "number", }); module.exports = GazePoint;