fffiloni commited on
Commit
eee864a
·
1 Parent(s): 9612cc4

Update public/sketch.js

Browse files
Files changed (1) hide show
  1. public/sketch.js +14 -12
public/sketch.js CHANGED
@@ -2,6 +2,18 @@
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 canvas;
7
  let Cursor;
@@ -11,8 +23,7 @@ let Pencil;
11
  let brushesPoints = [];
12
  let show_diffused = false;
13
 
14
- let space_uri;
15
- let hf_tkn;
16
  //-----------------------------------------------------
17
  //-----------------------------------------------------
18
 
@@ -21,16 +32,7 @@ function preload() {
21
  }
22
 
23
  function setup() {
24
- const socket = io();
25
- // client-side
26
- socket.on("connect", () => {
27
- console.log(socket.id); // x8WIv7-mJelg7on_ALbx
28
- socket.on("hello", (arg) => {
29
- //console.log(arg)
30
- space_uri = arg[0];
31
- hf_tkn = arg[1];
32
- });
33
- });
34
 
35
  canvas = createCanvas(512, 512);
36
  canvas.id('canvas');
 
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
+ let space_uri;
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;
 
23
  let brushesPoints = [];
24
  let show_diffused = false;
25
 
26
+
 
27
  //-----------------------------------------------------
28
  //-----------------------------------------------------
29
 
 
32
  }
33
 
34
  function setup() {
35
+
 
 
 
 
 
 
 
 
 
36
 
37
  canvas = createCanvas(512, 512);
38
  canvas.id('canvas');