Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Eye-Tracking Classroom
/
Live-Gaze-Analyser
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b610e1ab
authored
Oct 14, 2019
by
Alexander Bazo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add optional debug mode for server
parent
e95888cb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
index.js
+4
-0
lib/rooms/ImageViewerRoom.js
+1
-0
package.json
+1
-0
No files found.
index.js
View file @
b610e1ab
...
@@ -12,6 +12,10 @@ const http = require("http"),
...
@@ -12,6 +12,10 @@ const http = require("http"),
Logger
.
disable
();
Logger
.
disable
();
if
(
process
.
argv
[
2
]
===
"debug"
)
{
Logger
.
enable
();
}
var
app
=
express
(),
var
app
=
express
(),
server
=
http
.
createServer
(
app
),
server
=
http
.
createServer
(
app
),
imageServer
;
imageServer
;
...
...
lib/rooms/ImageViewerRoom.js
View file @
b610e1ab
...
@@ -50,6 +50,7 @@ class ImageViewerRoom extends colyseus.Room {
...
@@ -50,6 +50,7 @@ class ImageViewerRoom extends colyseus.Room {
if
(
message
.
type
===
"gaze"
)
{
if
(
message
.
type
===
"gaze"
)
{
if
(
client
.
color
===
undefined
)
{
if
(
client
.
color
===
undefined
)
{
client
.
color
=
Colors
.
createRandomColor
();
client
.
color
=
Colors
.
createRandomColor
();
Logger
.
log
(
`Assign clien color:
${
clien
.
color
}
`
,
"ImageViewer Room"
);
}
}
message
.
data
.
color
=
client
.
color
;
message
.
data
.
color
=
client
.
color
;
let
point
=
GazePoint
.
fromClientData
(
message
.
data
);
let
point
=
GazePoint
.
fromClientData
(
message
.
data
);
...
...
package.json
View file @
b610e1ab
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"scripts"
:
{
"scripts"
:
{
"start"
:
"node index.js"
,
"start"
:
"node index.js"
,
"debug"
:
"node index.js debug"
,
"loadtest"
:
"colyseus-loadtest loadtest/example.js --room my_room --numClients 2"
,
"loadtest"
:
"colyseus-loadtest loadtest/example.js --room my_room --numClients 2"
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment