nodeskini 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/README.md +31 -0
  2. package/client/archive/bundle.js +11528 -0
  3. package/client/archive/golem.html +60 -0
  4. package/client/archive/golemClient.js +595 -0
  5. package/client/archive/golembundle.js +11634 -0
  6. package/client/archive/sequencer.html +43 -0
  7. package/client/archive/sequenceurClient.js +815 -0
  8. package/client/archive/stylegolem.css +158 -0
  9. package/client/archive/stylesequenceur.css +204 -0
  10. package/client/clientListe/Sortable-master/.circleci/config.yml +33 -0
  11. package/client/clientListe/Sortable-master/.editorconfig +15 -0
  12. package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/bug-report.md +73 -0
  13. package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/custom-template.md +48 -0
  14. package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/feature-request.md +41 -0
  15. package/client/clientListe/Sortable-master/.jshintrc +25 -0
  16. package/client/clientListe/Sortable-master/.testcaferc.json +7 -0
  17. package/client/clientListe/Sortable-master/CONTRIBUTING.md +26 -0
  18. package/client/clientListe/Sortable-master/LICENSE +21 -0
  19. package/client/clientListe/Sortable-master/README.md +813 -0
  20. package/client/clientListe/Sortable-master/Sortable.js +3709 -0
  21. package/client/clientListe/Sortable-master/Sortable.min.js +2 -0
  22. package/client/clientListe/Sortable-master/Sortable.min.old.js +2 -0
  23. package/client/clientListe/Sortable-master/Sortable.min.old.old.js +2 -0
  24. package/client/clientListe/Sortable-master/babel.config.js +27 -0
  25. package/client/clientListe/Sortable-master/bower.json +30 -0
  26. package/client/clientListe/Sortable-master/entry/entry-complete.js +8 -0
  27. package/client/clientListe/Sortable-master/entry/entry-core.js +19 -0
  28. package/client/clientListe/Sortable-master/entry/entry-defaults.js +19 -0
  29. package/client/clientListe/Sortable-master/index.html +460 -0
  30. package/client/clientListe/Sortable-master/modular/sortable.complete.esm.js +3701 -0
  31. package/client/clientListe/Sortable-master/modular/sortable.core.esm.js +3698 -0
  32. package/client/clientListe/Sortable-master/modular/sortable.esm.js +3699 -0
  33. package/client/clientListe/Sortable-master/package-lock.json +5704 -0
  34. package/client/clientListe/Sortable-master/package.json +56 -0
  35. package/client/clientListe/Sortable-master/plugins/AutoScroll/AutoScroll.js +270 -0
  36. package/client/clientListe/Sortable-master/plugins/AutoScroll/README.md +80 -0
  37. package/client/clientListe/Sortable-master/plugins/AutoScroll/index.js +1 -0
  38. package/client/clientListe/Sortable-master/plugins/MultiDrag/MultiDrag.js +617 -0
  39. package/client/clientListe/Sortable-master/plugins/MultiDrag/README.md +96 -0
  40. package/client/clientListe/Sortable-master/plugins/MultiDrag/index.js +1 -0
  41. package/client/clientListe/Sortable-master/plugins/OnSpill/OnSpill.js +79 -0
  42. package/client/clientListe/Sortable-master/plugins/OnSpill/README.md +60 -0
  43. package/client/clientListe/Sortable-master/plugins/OnSpill/index.js +1 -0
  44. package/client/clientListe/Sortable-master/plugins/README.md +178 -0
  45. package/client/clientListe/Sortable-master/plugins/Swap/README.md +55 -0
  46. package/client/clientListe/Sortable-master/plugins/Swap/Swap.js +90 -0
  47. package/client/clientListe/Sortable-master/plugins/Swap/index.js +1 -0
  48. package/client/clientListe/Sortable-master/scripts/banner.js +8 -0
  49. package/client/clientListe/Sortable-master/scripts/build.js +17 -0
  50. package/client/clientListe/Sortable-master/scripts/esm-build.js +28 -0
  51. package/client/clientListe/Sortable-master/scripts/minify.js +11 -0
  52. package/client/clientListe/Sortable-master/scripts/test-compat.js +30 -0
  53. package/client/clientListe/Sortable-master/scripts/test.js +21 -0
  54. package/client/clientListe/Sortable-master/scripts/umd-build.js +15 -0
  55. package/client/clientListe/Sortable-master/src/Animation.js +175 -0
  56. package/client/clientListe/Sortable-master/src/BrowserInfo.js +12 -0
  57. package/client/clientListe/Sortable-master/src/EventDispatcher.js +57 -0
  58. package/client/clientListe/Sortable-master/src/PluginManager.js +87 -0
  59. package/client/clientListe/Sortable-master/src/Sortable.js +1971 -0
  60. package/client/clientListe/Sortable-master/src/utils.js +556 -0
  61. package/client/clientListe/Sortable-master/st/app.js +224 -0
  62. package/client/clientListe/Sortable-master/st/iframe/frame.html +32 -0
  63. package/client/clientListe/Sortable-master/st/iframe/index.html +49 -0
  64. package/client/clientListe/Sortable-master/st/logo.png +0 -0
  65. package/client/clientListe/Sortable-master/st/og-image.png +0 -0
  66. package/client/clientListe/Sortable-master/st/prettify/prettify.css +1 -0
  67. package/client/clientListe/Sortable-master/st/prettify/prettify.js +46 -0
  68. package/client/clientListe/Sortable-master/st/prettify/run_prettify.js +64 -0
  69. package/client/clientListe/Sortable-master/st/saucelabs.svg +1 -0
  70. package/client/clientListe/Sortable-master/st/theme.css +254 -0
  71. package/client/clientListe/Sortable-master/tests/Sortable.compat.test.js +39 -0
  72. package/client/clientListe/Sortable-master/tests/Sortable.test.js +386 -0
  73. package/client/clientListe/Sortable-master/tests/dual-list.html +34 -0
  74. package/client/clientListe/Sortable-master/tests/empty-list.html +30 -0
  75. package/client/clientListe/Sortable-master/tests/filter.html +27 -0
  76. package/client/clientListe/Sortable-master/tests/handles.html +27 -0
  77. package/client/clientListe/Sortable-master/tests/nested.html +67 -0
  78. package/client/clientListe/Sortable-master/tests/single-list.html +25 -0
  79. package/client/clientListe/Sortable-master/tests/style.css +18 -0
  80. package/client/clientListe/clientListe.html +148 -0
  81. package/client/clientListe/clientListe.js +1508 -0
  82. package/client/clientListe/clientListebundle.js +13164 -0
  83. package/client/clientListe/images/poubelle.png +0 -0
  84. package/client/clientListe/images/start.png +0 -0
  85. package/client/clientListe/images/stop.png +0 -0
  86. package/client/clientListe/images/submit.png +0 -0
  87. package/client/clientListe/sortable-theme-bootstrap.css +90 -0
  88. package/client/configurateur/configReact.js +273 -0
  89. package/client/configurateur/configReactbundle.js +295 -0
  90. package/client/configurateur/configurateur.css +95 -0
  91. package/client/configurateur/configurateur.html +48 -0
  92. package/client/configurateur/lib/jexcel.css +755 -0
  93. package/client/configurateur/lib/jexcel.js +14970 -0
  94. package/client/configurateur/lib/jsuites.css +2801 -0
  95. package/client/configurateur/lib/jsuites.js +11822 -0
  96. package/client/configurateur/lib/react-dom.production.min.js +239 -0
  97. package/client/configurateur/lib/react.production.min.js +32 -0
  98. package/client/configurateur/src/configReact.js +247 -0
  99. package/client/controleur/clientcontroleur.js +536 -0
  100. package/client/controleur/clientcontroleur.test.js +282 -0
  101. package/client/controleur/controleur.html +51 -0
  102. package/client/controleur/controleurbundle.js +565 -0
  103. package/client/controleur/stylecontroleur.css +236 -0
  104. package/client/controleurHH/controleurHH.html +71 -0
  105. package/client/controleurHH/controleurHH.js +252 -0
  106. package/client/controleurHH/styles/index.css +320 -0
  107. package/client/controleurHH/styles/material.css +11552 -0
  108. package/client/parametrage/paramReact.js +473 -0
  109. package/client/parametrage/paramReactbundle.js +500 -0
  110. package/client/parametrage/parametrage.css +111 -0
  111. package/client/parametrage/parametrage.html +163 -0
  112. package/client/parametrage/src/paramReact.js +459 -0
  113. package/client/score/hash.js +83 -0
  114. package/client/score/p5.min.js +3 -0
  115. package/client/score/parto1.js +1171 -0
  116. package/client/score/parto1bundle.js +1181 -0
  117. package/client/score/processing.min.js +431 -0
  118. package/client/score/score.html +15 -0
  119. package/client/score/score.js +34 -0
  120. package/client/simulateurListe/simulateurFork.js +750 -0
  121. package/client/simulateurListe/simulateurFork.mjs +681 -0
  122. package/client/simulateurListe/simulateurForkSansReorg.js +569 -0
  123. package/client/simulateurListe/simulateurListe.js +628 -0
  124. package/myReact/archive/Nodeemitvaluedlocal1.hh.js +52 -0
  125. package/myReact/archive/abort-parNode.js +79 -0
  126. package/myReact/archive/abroNode.js +169 -0
  127. package/myReact/archive/abroNode2.js +80 -0
  128. package/myReact/archive/atom.compile.hh.js +51 -0
  129. package/myReact/archive/await-countNode.js +67 -0
  130. package/myReact/archive/await-nowvalNode.js +44 -0
  131. package/myReact/archive/callHH.js +96 -0
  132. package/myReact/archive/emit-if2.hh.compiled.js +113 -0
  133. package/myReact/archive/every1Node.js +35 -0
  134. package/myReact/archive/if-runNode.js +74 -0
  135. package/myReact/archive/if1Node.js +43 -0
  136. package/myReact/archive/makeawait.js +0 -0
  137. package/myReact/archive/myReact.old.js +684 -0
  138. package/myReact/archive/orchestration.js +281 -0
  139. package/myReact/archive/orchestration1.js +132 -0
  140. package/myReact/archive/orchestration1.xml +465 -0
  141. package/myReact/archive/orchestration2.js +161 -0
  142. package/myReact/archive/orchestrationHH.mano.js +280 -0
  143. package/myReact/archive/orchestrationHHTest.js +428 -0
  144. package/myReact/archive/orchestrationHHTest.xml +234 -0
  145. package/myReact/archive/orchestrationHHTestRun.js +104 -0
  146. package/myReact/archive/orchestrationHHTestRun.xml +34 -0
  147. package/myReact/archive/orchestrationTest0.js +178 -0
  148. package/myReact/archive/orchestrationTest1.js +181 -0
  149. package/myReact/archive/orchestrationTest2.js +281 -0
  150. package/myReact/archive/run3pointsNode.js +59 -0
  151. package/myReact/archive/runNode.js +123 -0
  152. package/myReact/archive/runNode2.js +91 -0
  153. package/myReact/archive/testAwait1.js +141 -0
  154. package/myReact/archive/testAwait1.xml +86 -0
  155. package/myReact/archive/testEvery1.js +122 -0
  156. package/myReact/archive/testEvery1.xml +79 -0
  157. package/myReact/archive/testHH1.js +135 -0
  158. package/myReact/archive/testHH1.xml +86 -0
  159. package/myReact/archive/testHH1revu.js +104 -0
  160. package/myReact/archive/testHH2.js +122 -0
  161. package/myReact/archive/testHH2.xml +79 -0
  162. package/myReact/archive/testHH3.js +130 -0
  163. package/myReact/archive/testHH3.xml +86 -0
  164. package/myReact/archive/testHHabort.js +121 -0
  165. package/myReact/archive/testHHabort.xml +83 -0
  166. package/myReact/archive/testMakeawait.js +202 -0
  167. package/myReact/archive/testRun1.js +168 -0
  168. package/myReact/archive/testRun1.xml +142 -0
  169. package/myReact/archive/titi.js +28 -0
  170. package/myReact/archive/titi.xml +110 -0
  171. package/myReact/archive/toto.js +73 -0
  172. package/myReact/archive/toto.xml +198 -0
  173. package/myReact/archive/trap-await-parallelNode.js +123 -0
  174. package/myReact/inutiles/hiver2022.xml +804 -0
  175. package/myReact/inutiles/hopeNode.xml +459 -0
  176. package/myReact/inutiles/mars2022.xml +871 -0
  177. package/myReact/inutiles/mystique1.xml +318 -0
  178. package/myReact/inutiles/mystiqueOSC.xml +277 -0
  179. package/myReact/inutiles/opus5Node.xml +1271 -0
  180. package/myReact/inutiles/opus5NodeLinux.xml +1241 -0
  181. package/myReact/inutiles/orchestrationHH.xml +541 -0
  182. package/myReact/inutiles/orchestrationHH2.xml +547 -0
  183. package/myReact/inutiles/testHH.xml +95 -0
  184. package/myReact/inutiles/trouveLaPercuTenor.xml +349 -0
  185. package/myReact/myReact.js +744 -0
  186. package/myReact/myReact.min.js +1 -0
  187. package/myReact/orchestrationHH.js +311 -0
  188. package/myReact/orchestrationHH.mjs +436 -0
  189. package/myReact/orchestrationHH.mjs.map +1 -0
  190. package/package.json +46 -0
  191. package/serveur/OSCandMidi.mjs +361 -0
  192. package/serveur/computeScore.mjs +415 -0
  193. package/serveur/controleDAW.mjs +1149 -0
  194. package/serveur/defaultSession.csv +2 -0
  195. package/serveur/defaultSkiniParametres.js +119 -0
  196. package/serveur/gameOSC.mjs +96 -0
  197. package/serveur/groupeClientsSons.mjs +1014 -0
  198. package/serveur/ipConfig.json +24 -0
  199. package/serveur/ipConfig127.json +19 -0
  200. package/serveur/ipConfig75.json +17 -0
  201. package/serveur/ipConfigBH.json +19 -0
  202. package/serveur/ipConfigLocal.json +19 -0
  203. package/serveur/midiConfig.json +26 -0
  204. package/serveur/midiConfigBH.json +26 -0
  205. package/serveur/midiConfigVoid.json +3 -0
  206. package/serveur/midimix.mjs +570 -0
  207. package/serveur/saveParam.mjs +159 -0
  208. package/serveur/skiniParametres.good.js +132 -0
  209. package/serveur/skiniParametres.js +106 -0
  210. package/serveur/utilsHHSkini.hh.js +64 -0
  211. package/serveur/utilsSkini.mjs +137 -0
  212. package/serveur/websocketServer.mjs +2052 -0
  213. package/serveur/workerInterfaceZ.mjs +327 -0
  214. package/serveur/workerSynchro.mjs +49 -0
  215. package/skini.mjs +141 -0
@@ -0,0 +1,236 @@
1
+ .button {
2
+ background-color: #4CAF50; /* Green */
3
+ border: 4px;
4
+ color: white;
5
+ margin: 2px;
6
+ /* text-align: center; */
7
+ text-decoration: none;
8
+ /* display: inline-block; */
9
+ font-size: 12px;
10
+ border-radius: 4px;
11
+ width:70px;
12
+ height:70px;
13
+ font-family: "Arial", Georgia, Serif;
14
+ }
15
+
16
+ .buttonLarge {
17
+ background-color: #4CAF50; /* Green */
18
+ border: 4px;
19
+ color: white;
20
+ margin: 2px;
21
+ /* text-align: center; */
22
+ text-decoration: none;
23
+ /* display: inline-block; */
24
+ font-size: 12px;
25
+ border-radius: 4px;
26
+ width:120px;
27
+ height:70px;
28
+ font-family: "Arial", Georgia, Serif;
29
+ }
30
+
31
+ /*
32
+ .boutonsCommande {
33
+ text-align: center;
34
+ } */
35
+
36
+ .buttonStartAbleton {
37
+ background-color: #4CAF50; /* vert */
38
+ }
39
+
40
+ .buttonStopAbleton {
41
+ background-color: #CF1919; /* Red */
42
+ }
43
+
44
+ .buttonStartAutomate {
45
+ background-color: #4CAF50; /* vert */
46
+ }
47
+
48
+ .buttonStopAutomate {
49
+ background-color: #CF1919; /* Red */
50
+ }
51
+
52
+ .texteSon {
53
+ /*background-color: #ffffff; */ /* blanc */
54
+ color: white;
55
+ font-family: "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace;
56
+ }
57
+
58
+ .numColone {
59
+ /* background-color: #ffffff; */ /* blanc */
60
+ color: black;
61
+ width:64px;
62
+ height:40px;
63
+ font-family: "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace;
64
+ }
65
+
66
+ .listBoutonsPad {
67
+ white-space: nowrap;
68
+ /* text-align: center; */
69
+ overflow: auto;
70
+ width:2200px;
71
+ /* height: 500px; */
72
+ }
73
+
74
+ .padBouton {
75
+ background-color: #636f64; /* gris léger */
76
+ border: 4px;
77
+ color: white;
78
+ margin: 2px;
79
+ text-decoration: none;
80
+ font-size: 12px;
81
+ border-radius: 4px;
82
+ width:60px;
83
+ height:60px;
84
+ font-family: "Arial", Georgia, Serif;
85
+ }
86
+
87
+ .etatScrut {
88
+ /*background-color: #bbb; */ /* gris léger */
89
+ color: black;
90
+ border: 4px;
91
+ margin: 2px;
92
+ text-decoration: none;
93
+ font-size: 12px;
94
+ border-radius: 4px;
95
+ width:60px;
96
+ height:30px;
97
+ font-family: "Arial", Georgia, Serif;
98
+ }
99
+
100
+ .padBoutonVert {
101
+ background-color: #4CAF50; /* vert */
102
+ border: 4px;
103
+ color: white;
104
+ margin: 2px;
105
+ text-decoration: none;
106
+ font-size: 12px;
107
+ border-radius: 4px;
108
+ width:60px;
109
+ height:60px;
110
+ font-family: "Arial", Georgia, Serif;
111
+ }
112
+
113
+ .padBoutonBleu {
114
+ background-color: #008CBA;
115
+ border: 4px;
116
+ color: white;
117
+ margin: 2px;
118
+ text-decoration: none;
119
+ font-size: 12px;
120
+ border-radius: 4px;
121
+ width:60px;
122
+ height:60px;
123
+ font-family: "Arial", Georgia, Serif;
124
+ }
125
+
126
+ .wrapButtons {
127
+ /* text-align: center; */
128
+ overflow: auto;
129
+ /* width:1200px; */
130
+ height: 400px;
131
+ }
132
+
133
+ .boutonsSons {
134
+ width:308px;
135
+ font-size: 20px;
136
+ background-color: #464545;
137
+ color: white;
138
+ border: 4px;
139
+ text-align: center;
140
+ font-family: "Arial", Georgia, Serif;
141
+ }
142
+
143
+ .boutonsResolution {
144
+ background-color: #797bbf;
145
+ }
146
+
147
+ .boutonsSons1 {
148
+ background-color: #797bbf;
149
+ }
150
+
151
+ .boutonsSons2 {
152
+ background-color: #4CAF50;
153
+ }
154
+
155
+ .boutonsSons3 {
156
+ background-color: #666633;
157
+ }
158
+
159
+ .button:active {
160
+ background-color: #3e8e41;
161
+ box-shadow: 0 5px #666;
162
+ transform: translateY(4px);
163
+ }
164
+
165
+ .button1 {
166
+ background-color: #CF1919; /* red */
167
+ }
168
+
169
+ .button2 {
170
+ background-color: #008CBA; /* Blue */
171
+ }
172
+
173
+ .buttonListen {
174
+ background-color: #008CBA; /* Blue */
175
+ }
176
+
177
+ .buttonStop {
178
+ background-color: #CF1919; /* Red */
179
+ }
180
+
181
+ .button3 {
182
+ background-color: #666633; /* caca d'oie */
183
+ }
184
+
185
+ .buttonPseudo {
186
+ background-color: #4CAF50; /* Green */
187
+ width:250px;
188
+ height:55px;
189
+ font-size: 24px;
190
+ font-family: "Arial", Georgia, Serif;
191
+ }
192
+
193
+ /*
194
+ .wrapper {
195
+ text-align: center;
196
+ }
197
+ */
198
+
199
+ body {
200
+ margin: 0 auto;
201
+ background-color: #222;
202
+ padding: 0 20px 20px 20px;
203
+ font-family: "Arial", Georgia, Serif;
204
+ /* border: 5px solid #111; */
205
+ }
206
+
207
+ body.inplay {
208
+ background-color: #e8dfdf;
209
+ transition: none;
210
+ color: white;
211
+ }
212
+
213
+ body.black-again {
214
+ background-color: #222;
215
+ transition: 2s all;
216
+ }
217
+
218
+ .text-spectacle {
219
+ font-size: 24px;
220
+ color: white;
221
+ font-family: "Arial", Georgia, Serif;
222
+ }
223
+
224
+ .info-spectateur {
225
+ font-size: 24px;
226
+ /* text-align: center; */
227
+ color: white;
228
+ font-family: "Arial", Georgia, Serif;
229
+ }
230
+
231
+ .em {
232
+ font-style: normal;
233
+ color: white;
234
+ font-size: 20px;
235
+ font-family: "Arial", Georgia, Serif;
236
+ }
@@ -0,0 +1,71 @@
1
+ <html>
2
+
3
+ <head>
4
+ <link rel="stylesheet" href="./client/controleurHH/styles/index.css">
5
+ <meta charset="UTF-8" name="viewport" />
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
+ <meta name="viewport" content="width=device-width">
8
+ <title>HipHop for Skini </title>
9
+ </head>
10
+
11
+ <body onload="init(window.location.hostname);">
12
+ <table>
13
+ <thead>
14
+ <tr>
15
+ <td>
16
+ <header class="mdl-color--cyan-500">
17
+ <h2 class="mode-maker">Skini HipHop <i id="synchro">@</i></h2>
18
+
19
+ <div id="menubar">
20
+ <label for="loadFile" class="button">Load HipHop and config.</label>
21
+ <input type="file" id="loadFile" oninput="loadHHFile();" />
22
+ <input class="inputText" type="text" id="HHFile" />
23
+
24
+ <button class="button" id="compileHH" onclick="compileHH();">Compile</button>
25
+
26
+ <br>
27
+ <button class="button" id="buttonCreateSession" onclick="createSession()">Create descr.</button>
28
+
29
+ <label for="loadSession" class="button">Load descr.</label>
30
+ <input type="file" id="loadSession" onchange="loadSession();" />
31
+
32
+ <button class="button" id="buttonSaveSessionAs" onclick="saveSessionAs()">Save descr. as </button>
33
+
34
+ <input class="inputText" type="text" id="loadSessionTxt" />
35
+ <br>
36
+ <button id="buttonStopAutomate" class="button red" style="display:none"
37
+ onclick="stopAutomate();">Stop</button>
38
+ <button id="buttonStartAutomate" class="button blue" onclick="startAutomate();">Start</button>
39
+ <br>
40
+ <button type="button" class="button" onclick="window.open('http://' + window.location.hostname + ':' + window.location.port + '/contr','Controleur',
41
+ 'height=400, width=700, top=200, left=300, toolbar=no, menubar=no, directories=no, location=no, resizable=yes, scrollbars=yes, status=no');
42
+ return false;">Controler</button>
43
+
44
+ <button type="button" class="button" onclick="window.open('http://' + window.location.hostname + ':' + window.location.port + '/conf','Patterns',
45
+ 'height=400, width=800, top=200, left=300, toolbar=no, menubar=no, directories=no, location=no, resizable=yes, scrollbars=yes, status=no');
46
+ return false;">Patterns</button>
47
+
48
+ <button type="button" class="button" onclick="window.open('http://' + window.location.hostname + ':' + window.location.port + '/score','Score',
49
+ 'height=400, width=700, top=200, left=300, toolbar=no, menubar=no, directories=no, location=no, resizable=yes, scrollbars=yes, status=no');
50
+ return false;">Score</button>
51
+
52
+ <button type="button" class="button" onclick="window.open('http://' + window.location.hostname + ':' + window.location.port + '/param','Parameters',
53
+ 'height=400, width=600, top=200, left=300, toolbar=no, menubar=no, directories=no, location=no, resizable=yes, scrollbars=yes, status=no');
54
+ return false;">Parameters</button>
55
+
56
+ <button class="button" id="launchSimulator" onclick="launchSimulator()">Start Simulator</button>
57
+ <button id="stopSimulator" class="small button red" style="display:none" onclick="stopSimulator();">Stop
58
+ Simulator</button>
59
+ <br>
60
+ <input class="inputText" type="text" id="consoleArea" />
61
+ </div>
62
+ </header>
63
+ </td>
64
+ </tr>
65
+ </thead>
66
+ </table>
67
+
68
+ <script src="./client/controleurHH/controleurHH.js"></script>
69
+ </body>
70
+
71
+ </html>
@@ -0,0 +1,252 @@
1
+ "use strict"
2
+ /**************************************************
3
+ Controler Skini for HipHop files
4
+ © Copyright 2017-2024, Bertrand Petit-Hédelin
5
+ ****************************************************/
6
+
7
+ var myBlocks;
8
+ var myServeur;
9
+ var debug = false;
10
+ var debug1 = true;
11
+ var ws;
12
+ var workspace;
13
+ var prog;
14
+ var websocketServeurPort = 8383;
15
+
16
+ var DAWTableEnCours = 1; // Est-ce bien utile pour HH !! à revoir globalement
17
+ var automateEncours = false;
18
+ var descriptorLoaded = false;
19
+
20
+ var options = {
21
+ comments: true,
22
+ collapse: true,
23
+ disable: true,
24
+ maxBlocks: Infinity,
25
+ media: '',
26
+ oneBasedIndex: true,
27
+ readOnly: false,
28
+ //rtl: false,
29
+ scrollbars: true,
30
+ trashcan: true,
31
+ //toolbox: null,
32
+ //horizontalLayout: false,
33
+ //toolboxPosition: 'start',
34
+ zoom: {
35
+ controls: true,
36
+ wheel: false,
37
+ startScale: 1.0,
38
+ maxScale: 4,
39
+ minScale: 0.25,
40
+ scaleSpeed: 1.1
41
+ }
42
+ };
43
+
44
+ function initWSSocket(serverIPAddress) {
45
+ var toggle = true;
46
+ console.log("initWSSocket", serverIPAddress);
47
+
48
+ ws = new WebSocket("ws://" + serverIPAddress + ":" + websocketServeurPort);
49
+
50
+ ws.onopen = function (event) {
51
+ var id = Math.floor((Math.random() * 1000000) + 1); // Pour identifier le client
52
+ var msg = {
53
+ type: "startSpectateur",
54
+ text: "controleurHH",
55
+ id: id
56
+ }
57
+ ws.send(JSON.stringify(msg));
58
+ };
59
+
60
+ //Traitement de la Réception sur le client
61
+ ws.onmessage = function (event) {
62
+ var msgRecu = JSON.parse(event.data);
63
+
64
+ //console.log( "Client: received [%s]", event.data );
65
+ switch (msgRecu.type) {
66
+ case "message":
67
+ break;
68
+
69
+ case "blocksLoaded":
70
+ if (debug1) console.log("blocksLoaded:\n", msgRecu.data);
71
+ Blockly.Xml.clearWorkspaceAndLoadFromXml(Blockly.Xml.textToDom(msgRecu.data), workspace);
72
+ break;
73
+
74
+ case "consoleBlocklySkini":
75
+ document.getElementById('consoleArea').value = msgRecu.text;
76
+ break;
77
+
78
+ case "alertBlocklySkini":
79
+ alert(msgRecu.text)
80
+ document.getElementById('consoleArea').value = msgRecu.text;
81
+ break;
82
+
83
+ case "synchroSkini":
84
+ if (debug) console.log("Reçu synchro Skini");
85
+ if (toggle) {
86
+ document.getElementById('synchro').style.display = "none";
87
+ toggle = false;
88
+ } else {
89
+ document.getElementById('synchro').style.display = "inline";
90
+ toggle = true;
91
+ }
92
+ break;
93
+
94
+ default: if (debug) console.log("Le Client reçoit un message inconnu", msgRecu);
95
+ }
96
+ };
97
+ ws.onerror = function (event) {
98
+ console.log("controleurHH.js : received error on WS", ws.socket, " ", event);
99
+ }
100
+ ws.onclose = function (event) {
101
+ }
102
+ }
103
+ window.initWSSocket = initWSSocket;
104
+
105
+ function init(host) {
106
+ console.log("init");
107
+ initWSSocket(host);
108
+
109
+ function loadHHFile() {
110
+ let fichierSelectionne = document.getElementById('loadFile').files[0].name;
111
+ console.log("loadHHFile fichier:", fichierSelectionne);
112
+ document.getElementById("HHFile").value = fichierSelectionne; //.slice(0, -4);
113
+ var msg = {
114
+ type: "loadHHFile",
115
+ fileName: fichierSelectionne
116
+ }
117
+ ws.send(JSON.stringify(msg));
118
+ console.log("loadHHFile", fichierSelectionne);
119
+
120
+ // To allow a reload of the same file
121
+ document.getElementById('loadFile').value = "";
122
+ }
123
+ window.loadHHFile = loadHHFile;
124
+
125
+ function compileHH() {
126
+ let fichierSelectionne = document.getElementById("HHFile").value;
127
+ console.log("compileHHEditionFile");
128
+ var msg = {
129
+ type: "compileHHEditionFile",
130
+ fileName: fichierSelectionne
131
+ }
132
+ ws.send(JSON.stringify(msg));
133
+ }
134
+ window.compileHH = compileHH;
135
+
136
+ function launchSimulator() {
137
+ document.getElementById("launchSimulator").style.display = "none";
138
+ document.getElementById("stopSimulator").style.display = "inline";
139
+ var msg = {
140
+ type: "startSimulator",
141
+ }
142
+ ws.send(JSON.stringify(msg));
143
+ }
144
+ window.launchSimulator = launchSimulator;
145
+
146
+ function stopSimulator() {
147
+ document.getElementById("launchSimulator").style.display = "inline";
148
+ document.getElementById("stopSimulator").style.display = "none";
149
+ var msg = {
150
+ type: "stopSimulator",
151
+ }
152
+ ws.send(JSON.stringify(msg));
153
+ }
154
+ window.stopSimulator = stopSimulator;
155
+
156
+ function cleanQueues() {
157
+ var msg = {
158
+ type: "cleanQueues",
159
+ };
160
+ ws.send(JSON.stringify(msg));
161
+ }
162
+ cleanQueues = cleanQueues;
163
+
164
+ function startAutomate() {
165
+ if (DAWTableEnCours !== 0 && !automateEncours && descriptorLoaded) {
166
+ var msg = {
167
+ type: "setDAWON",
168
+ value: DAWTableEnCours
169
+ }
170
+ ws.send(JSON.stringify(msg));
171
+
172
+ document.getElementById("buttonStartAutomate").style.display = "none";
173
+ document.getElementById("buttonStopAutomate").style.display = "inline";
174
+
175
+ msg.type = "startAutomate";
176
+ ws.send(JSON.stringify(msg));
177
+ automateEncours = true;
178
+ } else {
179
+ alert("WARNING: Orchestration not compiled or no descriptor ");
180
+ }
181
+ }
182
+ window.startAutomate = startAutomate;
183
+
184
+ function stopAutomate() {
185
+ document.getElementById("buttonStartAutomate").style.display = "inline";
186
+ document.getElementById("buttonStopAutomate").style.display = "none";
187
+ var msg = {
188
+ type: "stopAutomate"
189
+ }
190
+ ws.send(JSON.stringify(msg));
191
+ automateEncours = false;
192
+ cleanQueues();
193
+ }
194
+ window.stopAutomate = stopAutomate;
195
+
196
+ function loadSession() {
197
+ let fichierSelectionne = document.getElementById('loadSession').files[0].name;
198
+ console.log("loadSession fichier:", fichierSelectionne);
199
+ document.getElementById("loadSessionTxt").value = fichierSelectionne;
200
+
201
+ if (fichierSelectionne === undefined || fichierSelectionne === '') return;
202
+
203
+ var fileName;
204
+ fileName = fichierSelectionne;
205
+ if (debug1) console.log("loadSession:", fileName);
206
+ var msg = {
207
+ type: "loadSession",
208
+ fileName: fileName
209
+ }
210
+ ws.send(JSON.stringify(msg));
211
+ descriptorLoaded = true;
212
+
213
+ // To allow a reload of the same file
214
+ document.getElementById('loadSession').value = "";
215
+ }
216
+ window.loadSession = loadSession;
217
+
218
+ function createSession() {
219
+ console.log("createSession");
220
+ var fileName = window.prompt('Give a descriptor name');
221
+ if (fileName === undefined || fileName === '') return;
222
+ document.getElementById("loadSessionTxt").value = fileName + ".csv";
223
+
224
+ if (debug1) console.log("createDescriptors:", fileName);
225
+ var msg = {
226
+ type: "createSession",
227
+ fileName: fileName
228
+ }
229
+ ws.send(JSON.stringify(msg));
230
+ descriptorLoaded = true;
231
+
232
+ // To allow a reload of the same file
233
+ document.getElementById('loadSession').value = "";
234
+ }
235
+ window.createSession = createSession;
236
+
237
+ function saveSessionAs() {
238
+ var fileName = document.getElementById("loadSessionTxt").value;
239
+ console.log("Save As:", fileName);
240
+ if (fileName === undefined || fileName === '') {
241
+ alert("The descriptor must be a csv file with a name");
242
+ return;
243
+ }
244
+ var msg = {
245
+ type: "saveSessionAs",
246
+ fileName: fileName
247
+ }
248
+ ws.send(JSON.stringify(msg));
249
+ }
250
+ window.saveSessionAs = saveSessionAs;
251
+ }
252
+ window.init = init;