File tree 10 files changed +16
-10
lines changed
10 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,16 @@ This file has about 80 lines of code total.
71
71
72
72
This is the same app, but using a Multisynq Model for the asteroids.
73
73
74
- A session name and password is automatically appended to the URL.
74
+ When you ttry it, a session name and password are automatically appended to the URL.
75
75
If you open that session URL in another window or on another device,
76
76
the asteroids will float exactly the same in both.
77
77
78
+ The HTML imports the Multisynq client via a CDN. That way we don't need a bundler:
79
+
80
+ ``` html
81
+ <
script src =
" https://cdn.jsdelivr.net/npm/@multisynq/[email protected] /bundled/multisynq-client.min.js" ></
script >
82
+ ```
83
+
78
84
The app is devided into two parts: The "model" is the part that is synchronized
79
85
by Multisynq for all users. It is like a shared computer that all users directly
80
86
interact with. The other part is the "view", which displays the model to the user
Original file line number Diff line number Diff line change 16
16
max-height : 100% ;
17
17
}
18
18
</ style >
19
- < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1/bundled/multisynq-client.min.js "> </ script >
19
+ < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1.0.1 /bundled/multisynq-client.min.js "> </ script >
20
20
</ head >
21
21
< body >
22
22
< canvas id ="canvas " width ="1000 " height ="1000 "> </ canvas >
Original file line number Diff line number Diff line change 16
16
max-height : 100% ;
17
17
}
18
18
</ style >
19
- < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1/bundled/multisynq-client.min.js "> </ script >
19
+ < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1.0.1 /bundled/multisynq-client.min.js "> </ script >
20
20
</ head >
21
21
< body >
22
22
< canvas id ="canvas " width ="1000 " height ="1000 "> </ canvas >
Original file line number Diff line number Diff line change 16
16
max-height : 100% ;
17
17
}
18
18
</ style >
19
- < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1/bundled/multisynq-client.min.js "> </ script >
19
+ < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1.0.1 /bundled/multisynq-client.min.js "> </ script >
20
20
</ head >
21
21
< body >
22
22
< canvas id ="canvas " width ="1000 " height ="1000 "> </ canvas >
Original file line number Diff line number Diff line change 16
16
max-height : 100% ;
17
17
}
18
18
</ style >
19
- < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1/bundled/multisynq-client.min.js "> </ script >
19
+ < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1.0.1 /bundled/multisynq-client.min.js "> </ script >
20
20
</ head >
21
21
< body >
22
22
< canvas id ="canvas " width ="1000 " height ="1000 "> </ canvas >
Original file line number Diff line number Diff line change 16
16
max-height : 100% ;
17
17
}
18
18
</ style >
19
- < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1/bundled/multisynq-client.min.js "> </ script >
19
+ < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1.0.1 /bundled/multisynq-client.min.js "> </ script >
20
20
</ head >
21
21
< body >
22
22
< canvas id ="canvas " width ="1000 " height ="1000 "> </ canvas >
Original file line number Diff line number Diff line change 16
16
max-height : 100% ;
17
17
}
18
18
</ style >
19
- < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1/bundled/multisynq-client.min.js "> </ script >
19
+ < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1.0.1 /bundled/multisynq-client.min.js "> </ script >
20
20
</ head >
21
21
< body >
22
22
< canvas id ="canvas " width ="1000 " height ="1000 "> </ canvas >
Original file line number Diff line number Diff line change 16
16
max-height : 100% ;
17
17
}
18
18
</ style >
19
- < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1/bundled/multisynq-client.min.js "> </ script >
19
+ < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1.0.1 /bundled/multisynq-client.min.js "> </ script >
20
20
</ head >
21
21
< body >
22
22
< canvas id ="canvas " width ="1000 " height ="1000 "> </ canvas >
Original file line number Diff line number Diff line change 21
21
border : none; color : # 000 ; text-align : center; font-size : 1.2em ;
22
22
}
23
23
</ style >
24
- < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1/bundled/multisynq-client.min.js "> </ script >
24
+ < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1.0.1 /bundled/multisynq-client.min.js "> </ script >
25
25
</ head >
26
26
< body >
27
27
< canvas id ="canvas " width ="1000 " height ="1000 "> </ canvas >
Original file line number Diff line number Diff line change 47
47
48
48
}
49
49
</ style >
50
- < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1/bundled/multisynq-client.min.js "> </ script >
50
+ < script src ="https://cdn.jsdelivr.net/npm/@multisynq/client@1.0.1 /bundled/multisynq-client.min.js "> </ script >
51
51
</ head >
52
52
< body >
53
53
< canvas id ="canvas " width ="1000 " height ="1000 "> </ canvas >
You can’t perform that action at this time.
0 commit comments