Update public/sketch.js
Browse files- 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 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
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');
|