Update public/sketch.js
Browse files- public/sketch.js +11 -12
public/sketch.js
CHANGED
@@ -2,18 +2,7 @@
|
|
2 |
// ERASER is binded to the frameGraphics, and all the drawings operations works on the drawGraphic
|
3 |
// Each path is displayed on the frameGraphics before being deleted to make the eraser working properly
|
4 |
//Systeme à reproduire pour les autres projet, c'est le plus efficace, et le plus maniable ;)
|
5 |
-
|
6 |
-
let hf_tkn;
|
7 |
-
const socket = io();
|
8 |
-
// client-side
|
9 |
-
socket.on("connect", () => {
|
10 |
-
console.log(socket.id); // x8WIv7-mJelg7on_ALbx
|
11 |
-
socket.on("hello", (arg) => {
|
12 |
-
//console.log(arg)
|
13 |
-
space_uri = arg[0];
|
14 |
-
hf_tkn = arg[1];
|
15 |
-
});
|
16 |
-
});
|
17 |
|
18 |
let canvas;
|
19 |
let Cursor;
|
@@ -29,6 +18,16 @@ let show_diffused = false;
|
|
29 |
|
30 |
function preload() {
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
|
34 |
function setup() {
|
|
|
2 |
// ERASER is binded to the frameGraphics, and all the drawings operations works on the drawGraphic
|
3 |
// Each path is displayed on the frameGraphics before being deleted to make the eraser working properly
|
4 |
//Systeme à reproduire pour les autres projet, c'est le plus efficace, et le plus maniable ;)
|
5 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
let canvas;
|
8 |
let Cursor;
|
|
|
18 |
|
19 |
function preload() {
|
20 |
|
21 |
+
const socket = io();
|
22 |
+
// client-side
|
23 |
+
socket.on("connect", () => {
|
24 |
+
console.log(socket.id); // x8WIv7-mJelg7on_ALbx
|
25 |
+
socket.on("hello", (arg) => {
|
26 |
+
//console.log(arg)
|
27 |
+
space_uri = arg[0];
|
28 |
+
hf_tkn = arg[1];
|
29 |
+
});
|
30 |
+
});
|
31 |
}
|
32 |
|
33 |
function setup() {
|