Browse Source

fix: minor stuff

bdestombes 3 years ago
parent
commit
b51cb1624e
3 changed files with 14 additions and 15 deletions
  1. 1 1
      backend/server.js
  2. 12 12
      frontend/assets/config.json
  3. 1 2
      frontend/index.html

+ 1 - 1
backend/server.js

@@ -52,7 +52,7 @@ receiverIo.sockets.on('connection', (socket) =>{
 	console.log(`Connecté au client ${socket.id}`);
 
 	const dgramCallback = function (buf) {
-		if (config.app.debugLog.backend.receiver.oscDatagram) {
+		if (config.app.debug && config.app.debugLog.backend.receiver.oscDatagram) {
 			console.log(oscParser.decode(buf));
 		}
 		socket.emit('osc', oscParser.decode(buf));

+ 12 - 12
frontend/assets/config.json

@@ -4,32 +4,32 @@
 		"httpPort": 5000,
 		"timerRefresh": 50,
 		"maxDistanceBetweenPoints": 750,
-		"debug": true,
+		"debug": false,
 		"debugLog": {
 			"backend": {
 				"emitter": {
-					"httpRequest": false,
-					"dots": false,
+					"httpRequest": true,
+					"dots": true,
 					"segments": true,
-					"triangles": false
+					"triangles": true
 				},
 				"receiver": {
-					"oscDatagram": false
+					"oscDatagram": true
 				}
 			},
 			"frontend": {
 				"emitter": {
 					"screen": true,
-					"events": false
+					"events": true
 				},
 				"receiver": {
-					"onAddTuioCursor": false,
-					"onUpdateTuioCursor": false,
-					"onRemoveTuioCursor": false,
-					"onAddTuioObject": false,
+					"onAddTuioCursor": true,
+					"onUpdateTuioCursor": true,
+					"onRemoveTuioCursor": true,
+					"onAddTuioObject": true,
 					"onUpdateTuioObject": true,
-					"onRemoveTuioObject": false,
-					"onRefresh": false
+					"onRemoveTuioObject": true,
+					"onRefresh": true
 				}
 			}
 		},

+ 1 - 2
frontend/index.html

@@ -15,7 +15,6 @@
 			#box {
 				width: 100%;
 				height: 100%;
-				border: 1px solid red;
 			}
 			.tuioCursor {
 				background: #111;
@@ -147,7 +146,7 @@
 				context = canvas.getContext('2d');
 
 				const drawTriangle = (a, b, c) => {
-					console.log(context, Math.round(a.x), Math.round(a.y), Math.round(b.x), Math.round(b.y), Math.round(c.x), Math.round(c.y));
+					// console.log(context, Math.round(a.x), Math.round(a.y), Math.round(b.x), Math.round(b.y), Math.round(c.x), Math.round(c.y));
 
 					const path = new Path2D();
 					path.moveTo(Math.round(a.x), Math.round(a.y));