fffiloni commited on
Commit
67e3776
1 Parent(s): ebdf1e4

Update public/sketch.js

Browse files
Files changed (1) hide show
  1. public/sketch.js +17 -16
public/sketch.js CHANGED
@@ -18,6 +18,10 @@ let hf_tkn;
18
  //-----------------------------------------------------
19
 
20
  function preload(){
 
 
 
 
21
  const socket = io();
22
  // client-side
23
  socket.on("connect", () => {
@@ -25,22 +29,19 @@ function preload(){
25
 
26
  });
27
  socket.on("hello", (arg) => {
28
- //console.log(arg)
29
- space_uri = arg[0];
30
- hf_tkn = arg[1];
31
- console.log(space_uri)
32
- grAPI = new GRAPI(space_uri, hf_tkn);
33
- Draws = new DrawHandler();
34
- AS = new AnimSys(12, 12, 30, 8);
35
-
36
- for (let i = 0; i < AS.initial_frame_nb; i++) {
37
- AS.create_new_frame();
38
- AS.display_frame(0);
39
- }
40
- });
41
- }
42
- function setup() {
43
-
44
 
45
  canvas = createCanvas(512, 512);
46
  canvas.id('canvas');
 
18
  //-----------------------------------------------------
19
 
20
  function preload(){
21
+
22
+ }
23
+
24
+ function setup() {
25
  const socket = io();
26
  // client-side
27
  socket.on("connect", () => {
 
29
 
30
  });
31
  socket.on("hello", (arg) => {
32
+ //console.log(arg)
33
+ space_uri = arg[0];
34
+ hf_tkn = arg[1];
35
+ console.log(space_uri)
36
+ grAPI = new GRAPI(space_uri, hf_tkn);
37
+ Draws = new DrawHandler();
38
+ AS = new AnimSys(12, 12, 30, 8);
39
+
40
+ for (let i = 0; i < AS.initial_frame_nb; i++) {
41
+ AS.create_new_frame();
42
+ AS.display_frame(0);
43
+ }
44
+ });
 
 
 
45
 
46
  canvas = createCanvas(512, 512);
47
  canvas.id('canvas');