indexStable.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Babylon.js Playground</title>
  5. <meta charset='utf-8' />
  6. <meta name="viewport" content="width=device-width, user-scalable=no">
  7. <link rel="shortcut icon" href="https://www.babylonjs.com/img/favicon/favicon.ico">
  8. <link rel="apple-touch-icon" sizes="57x57" href="https://www.babylonjs.com/img/favicon/apple-icon-57x57.png">
  9. <link rel="apple-touch-icon" sizes="60x60" href="https://www.babylonjs.com/img/favicon/apple-icon-60x60.png">
  10. <link rel="apple-touch-icon" sizes="72x72" href="https://www.babylonjs.com/img/favicon/apple-icon-72x72.png">
  11. <link rel="apple-touch-icon" sizes="76x76" href="https://www.babylonjs.com/img/favicon/apple-icon-76x76.png">
  12. <link rel="apple-touch-icon" sizes="114x114" href="https://www.babylonjs.com/img/favicon/apple-icon-114x114.png">
  13. <link rel="apple-touch-icon" sizes="120x120" href="https://www.babylonjs.com/img/favicon/apple-icon-120x120.png">
  14. <link rel="apple-touch-icon" sizes="144x144" href="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png">
  15. <link rel="apple-touch-icon" sizes="152x152" href="https://www.babylonjs.com/img/favicon/apple-icon-152x152.png">
  16. <link rel="apple-touch-icon" sizes="180x180" href="https://www.babylonjs.com/img/favicon/apple-icon-180x180.png">
  17. <link rel="icon" type="image/png" sizes="192x192" href="https://www.babylonjs.com/img/favicon/android-icon-192x192.png">
  18. <link rel="icon" type="image/png" sizes="32x32" href="https://www.babylonjs.com/img/favicon/favicon-32x32.png">
  19. <link rel="icon" type="image/png" sizes="96x96" href="https://www.babylonjs.com/img/favicon/favicon-96x96.png">
  20. <link rel="icon" type="image/png" sizes="16x16" href="https://www.babylonjs.com/img/favicon/favicon-16x16.png">
  21. <link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
  22. <meta name="msapplication-TileColor" content="#ffffff">
  23. <meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
  24. <meta name="msapplication-config" content="https://www.babylonjs.com/img/favicon/browserconfig.xml">
  25. <meta name="theme-color" content="#ffffff">
  26. <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
  27. <!--For canvas/code separator-->
  28. <script src="js/libs/split.js"></script>
  29. <script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
  30. <!-- jszip -->
  31. <script src="js/libs/jszip.min.js"></script>
  32. <script src="js/libs/fileSaver.js"></script>
  33. <!--Monaco-->
  34. <script src="node_modules/monaco-editor/min/vs/loader.js"></script>
  35. <!-- Babylon.js -->
  36. <script src="https://cdn.babylonjs.com/cannon.js"></script>
  37. <script src="https://cdn.babylonjs.com/Oimo.js"></script>
  38. <script src="https://cdn.babylonjs.com/babylon.js"></script>
  39. <script src="https://cdn.babylonjs.com/inspector/babylon.inspector.bundle.js"></script>
  40. <script src="https://cdn.babylonjs.com/loaders/babylon.glTFFileLoader.js"></script>
  41. <script src="https://cdn.babylonjs.com/loaders/babylon.objFileLoader.js"></script>
  42. <script src="https://cdn.babylonjs.com/loaders/babylon.stlFileLoader.js"></script>
  43. <script src="https://cdn.babylonjs.com/gui/babylon.gui.min.js"></script>
  44. <script src="https://rawgit.com/BabylonJS/Extensions/master/ClonerSystem/src/babylonx.cloner.js"></script>
  45. <link href="css/index.css" rel="stylesheet" />
  46. </head>
  47. <body>
  48. <div class="navbar navBar1600">
  49. <div class="title">
  50. Babylon.js Playground
  51. </div>
  52. <div class="version" id="mainTitle">
  53. </div>
  54. <div class="category">
  55. <div class="button run" id="runButton1600">Run <i class="fa fa-play" aria-hidden="true"></i></div>
  56. </div>
  57. <div class="category">
  58. <div class="button" id="newButton1600">New<i class="fa fa-file" aria-hidden="true"></i></div>
  59. <div class="button removeOnPhone" id="clearButton1600">Clear<i class="fa fa-trash" aria-hidden="true"></i></div>
  60. </div>
  61. <div class="category">
  62. <div class="button" id="saveButton1600">Save <i class="fa fa-floppy-o" aria-hidden="true"></i></div>
  63. <div class="button removeOnPhone" id="zipButton1600">Zip<i class="fa fa-download" aria-hidden="true"></i></div>
  64. </div>
  65. <div class="category">
  66. <div class="button select">Settings
  67. <div class="toDisplay">
  68. <div class="option subSelect">Theme <i class="fa fa-chevron-right" aria-hidden="true"></i>
  69. <div class="toDisplaySub">
  70. <div class="option" id="darkTheme1600">Dark</div>
  71. <div class="option" id="lightTheme1600">Light</div>
  72. </div>
  73. </div>
  74. <div class="option subSelect"><span id="currentFontSize1600">Font: 14</span><i class="fa fa-chevron-right" aria-hidden="true"></i>
  75. <div class="toDisplaySub">
  76. <div class="option" onclick="setFontSize(12);">12</div>
  77. <div class="option" onclick="setFontSize(14);">14</div>
  78. <div class="option" onclick="setFontSize(16);">16</div>
  79. <div class="option" onclick="setFontSize(18);">18</div>
  80. <div class="option" onclick="setFontSize(20);">20</div>
  81. <div class="option" onclick="setFontSize(22);">22</div>
  82. </div>
  83. </div>
  84. <div class="option" id="safemodeToggle1600">Safe mode <i class="fa fa-square-o" aria-hidden="true"></i></div>
  85. <div class="option checked" id="editorButton1600">Editor <i class="fa fa-check-square" aria-hidden="true"></i>
  86. </div>
  87. <div class="option" id="fullscreenButton1600">Fullscreen</div>
  88. <div class="option" id="editorFullscreenButton1600">Editor Fullscreen</div>
  89. <div class="option" id="formatButton1600">Format code</div>
  90. <div class="option" id="minimapToggle1600">Minimap
  91. <i class="fa fa-square-o" aria-hidden="true"></i>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="button uncheck" id="debugButton1600">Debug layer <i class="fa fa-square-o" aria-hidden="true"></i></div>
  96. <div class="button" id="metadataButton1600">Metadata</div>
  97. </div>
  98. <div class="category right">
  99. <div class="button select"><span id="currentVersion1600">Version: Latest</span>
  100. <div class="toDisplay">
  101. <div class="option" onclick="setVersion('latest');">Latest</div>
  102. <div class="option" onclick="setVersion('stable');">Stable</div>
  103. </div>
  104. </div>
  105. <div class="button select"> <span id="currentScript1600">Scenes</span>
  106. <div class="toDisplayBig">
  107. <ul id="scriptsList1600">
  108. </ul>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="save-message" id="saveMessage">
  113. This PG has missing metadata. Click save to add them.
  114. </div>
  115. </div>
  116. <div class="navbar navBar1475">
  117. <div class="title">
  118. Babylon.js Playground
  119. </div>
  120. <div class="version" id="mainTitle">
  121. </div>
  122. <div class="category">
  123. <div class="button run" id="runButton1475">Run <i class="fa fa-play" aria-hidden="true"></i></div>
  124. </div>
  125. <div class="category">
  126. <div class="button" id="newButton1475">New<i class="fa fa-file" aria-hidden="true"></i></div>
  127. <div class="button removeOnPhone" id="clearButton1475">Clear<i class="fa fa-trash" aria-hidden="true"></i></div>
  128. </div>
  129. <div class="category">
  130. <div class="button" id="saveButton1475">Save <i class="fa fa-floppy-o" aria-hidden="true"></i></div>
  131. <div class="button removeOnPhone" id="zipButton1475">Zip<i class="fa fa-download" aria-hidden="true"></i></div>
  132. </div>
  133. <div class="category">
  134. <div class="button select">Settings
  135. <div class="toDisplay">
  136. <div class="option subSelect">Theme <i class="fa fa-chevron-right" aria-hidden="true"></i>
  137. <div class="toDisplaySub">
  138. <div class="option" id="darkTheme1475">Dark</div>
  139. <div class="option" id="lightTheme1475">Light</div>
  140. </div>
  141. </div>
  142. <div class="option subSelect"><span id="currentFontSize1475">Font: 14</span><i class="fa fa-chevron-right" aria-hidden="true"></i>
  143. <div class="toDisplaySub">
  144. <div class="option" onclick="setFontSize(12);">12</div>
  145. <div class="option" onclick="setFontSize(14);">14</div>
  146. <div class="option" onclick="setFontSize(16);">16</div>
  147. <div class="option" onclick="setFontSize(18);">18</div>
  148. <div class="option" onclick="setFontSize(20);">20</div>
  149. <div class="option" onclick="setFontSize(22);">22</div>
  150. </div>
  151. </div>
  152. <div class="option" id='safemodeToggle1475'>Safe mode <i class="fa fa-square-o" aria-hidden="true"></i></div>
  153. <div class="option checked" id="editorButton1475">Editor <i class="fa fa-check-square" aria-hidden="true"></i>
  154. </div>
  155. <div class="option" id="fullscreenButton1475">Fullscreen</div>
  156. <div class="option" id="editorFullscreenButton1475">Editor Fullscreen</div>
  157. <div class="option" id="formatButton1475">Format code</div><div class="option" id="minimapToggle1475">Minimap
  158. <i class="fa fa-square-o" aria-hidden="true"></i>
  159. </div>
  160. <div class="option" id="debugButton1475">Debug layer<i class="fa fa-square-o" aria-hidden="true"></i></div>
  161. <div class="option" id="metadataButton1475">Metadata</div>
  162. <div class="option subSelect"><span id="currentVersion1475">Vers. : Latest</span><i class="fa fa-chevron-right" aria-hidden="true"></i>
  163. <div class="toDisplaySub">
  164. <div class="option" onclick="setVersion('latest');">Latest</div>
  165. <div class="option" onclick="setVersion('stable');">Stable</div>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="category right">
  172. <div class="button select"> <span id="currentScript1475">Scenes</span>
  173. <div class="toDisplayBig">
  174. <ul id="scriptsList1475">
  175. </ul>
  176. </div>
  177. </div>
  178. </div>
  179. <div class="save-message" id="saveMessage">
  180. This PG has missing metadata. Click save to add them.
  181. </div>
  182. </div>
  183. <div class="navbar navBar1030">
  184. <div class="category">
  185. <div class="button run" id="runButton1030">Run <i class="fa fa-play" aria-hidden="true"></i></div>
  186. </div>
  187. <div class="category">
  188. <div class="button" id="newButton1030">New<i class="fa fa-file" aria-hidden="true"></i></div>
  189. <div class="button removeOnPhone" id="clearButton1030">Clear<i class="fa fa-trash" aria-hidden="true"></i></div>
  190. </div>
  191. <div class="category">
  192. <div class="button" id="saveButton1030">Save <i class="fa fa-floppy-o" aria-hidden="true"></i></div>
  193. <div class="button removeOnPhone" id="zipButton1030">Zip<i class="fa fa-download" aria-hidden="true"></i></div>
  194. </div>
  195. <div class="category">
  196. <div class="button select">Settings
  197. <div class="toDisplay">
  198. <div class="option subSelect">Theme <i class="fa fa-chevron-right" aria-hidden="true"></i>
  199. <div class="toDisplaySub">
  200. <div class="option" id="darkTheme1030">Dark</div>
  201. <div class="option" id="lightTheme1030">Light</div>
  202. </div>
  203. </div>
  204. <div class="option subSelect"><span id="currentFontSize1030">Font: 14</span><i class="fa fa-chevron-right" aria-hidden="true"></i>
  205. <div class="toDisplaySub">
  206. <div class="option" onclick="setFontSize(12);">12</div>
  207. <div class="option" onclick="setFontSize(14);">14</div>
  208. <div class="option" onclick="setFontSize(16);">16</div>
  209. <div class="option" onclick="setFontSize(18);">18</div>
  210. <div class="option" onclick="setFontSize(20);">20</div>
  211. <div class="option" onclick="setFontSize(22);">22</div>
  212. </div>
  213. </div>
  214. <div class="option" id="safemodeToggle1030">Safe mode <i class="fa fa-square-o" aria-hidden="true"></i></div>
  215. <div class="option checked" id="editorButton1030">Editor <i class="fa fa-check-square" aria-hidden="true"></i>
  216. </div>
  217. <div class="option" id="fullscreenButton1030">Fullscreen</div>
  218. <div class="option" id="editorFullscreenButton1030">Editor Fullscreen</div>
  219. <div class="option" id="formatButton1030">Format code</div><div class="option" id="minimapToggle1030">Minimap
  220. <i class="fa fa-square-o" aria-hidden="true"></i>
  221. </div>
  222. <div class="option" id="debugButton1030">Debug layer<i class="fa fa-square-o" aria-hidden="true"></i></div>
  223. <div class="option" id="metadataButton1030">Metadata</div>
  224. <div class="option subSelect"><span id="currentVersion1030">Vers. : Latest</span><i class="fa fa-chevron-right" aria-hidden="true"></i>
  225. <div class="toDisplaySub">
  226. <div class="option" onclick="setVersion('latest');">Latest</div>
  227. <div class="option" onclick="setVersion('stable');">Stable</div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. <div class="category right">
  234. <div class="button select"> <span id="currentScript1030">Scenes</span>
  235. <div class="toDisplayBig">
  236. <ul id="scriptsList1030">
  237. </ul>
  238. </div>
  239. </div>
  240. </div>
  241. <div class="save-message" id="saveMessage">
  242. This PG has missing metadata. Click save to add them.
  243. </div>
  244. </div>
  245. <div class="navbar navBar750">
  246. <div class="category">
  247. <div class="button select">File
  248. <div class="toDisplay">
  249. <div class="option" id="runButton750">Run <i class="fa fa-play" aria-hidden="true"></i></div>
  250. <div class="option" id="newButton750">New <i class="fa fa-file" aria-hidden="true"></i></div>
  251. <div class="option" id="clearButton750">Clear <i class="fa fa-trash" aria-hidden="true"></i></div>
  252. <div class="option" id="saveButton750">Save <i class="fa fa-floppy-o" aria-hidden="true"></i></div>
  253. <div class="option" id="zipButton750">Zip <i class="fa fa-download" aria-hidden="true"></i></div>
  254. </div>
  255. </div>
  256. </div>
  257. <div class="category">
  258. <div class="button select">Settings
  259. <div class="toDisplay">
  260. <div class="option subSelect">Theme <i class="fa fa-chevron-right" aria-hidden="true"></i>
  261. <div class="toDisplaySub">
  262. <div class="option" id="darkTheme750">Dark</div>
  263. <div class="option" id="lightTheme750">Light</div>
  264. </div>
  265. </div>
  266. <div class="option subSelect"><span id="currentFontSize750">Font: 14</span><i class="fa fa-chevron-right" aria-hidden="true"></i>
  267. <div class="toDisplaySub">
  268. <div class="option" onclick="setFontSize(12);">12</div>
  269. <div class="option" onclick="setFontSize(14);">14</div>
  270. <div class="option" onclick="setFontSize(16);">16</div>
  271. <div class="option" onclick="setFontSize(18);">18</div>
  272. <div class="option" onclick="setFontSize(20);">20</div>
  273. <div class="option" onclick="setFontSize(22);">22</div>
  274. </div>
  275. </div>
  276. <div class="option" id="safemodeToggle750">Safe mode <i class="fa fa-square-o" aria-hidden="true"></i></div>
  277. <div style="display:none;" class="option checked" id="editorButton750">Editor <i class="fa fa-check-square" aria-hidden="true"></i>
  278. </div>
  279. <div class="option" id="fullscreenButton750">Fullscreen</div>
  280. <div class="option" id="editorFullscreenButton750">Editor Fullscreen</div>
  281. <div class="option" id="formatButton750">Format code</div><div class="option" id="minimapToggle750">Minimap
  282. <i class="fa fa-square-o" aria-hidden="true"></i>
  283. </div>
  284. <div class="option" id="debugButton750">Debug layer<i class="fa fa-square-o" aria-hidden="true"></i></div>
  285. <div class="option" id="metadataButton750">Metadata</div>
  286. <div class="option subSelect"><span id="currentVersion750">Vers. : Latest</span><i class="fa fa-chevron-right" aria-hidden="true"></i>
  287. <div class="toDisplaySub">
  288. <div class="option" onclick="setVersion('latest');">Latest</div>
  289. <div class="option" onclick="setVersion('stable');">Stable</div>
  290. </div>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. <div class="category right">
  296. <div class="button select"> <span id="currentScript750">Scenes</span>
  297. <div class="toDisplayBig">
  298. <ul id="scriptsList750">
  299. </ul>
  300. </div>
  301. </div>
  302. </div>
  303. <div class="save-message" id="saveMessage">
  304. This PG has missing metadata. Click save to add them.
  305. </div>
  306. </div>
  307. <div class="wrapper">
  308. <div id="jsEditor"></div>
  309. <div id="canvasZone">
  310. <canvas touch-action="none" id="renderCanvas"></canvas>
  311. </div>
  312. </div>
  313. <span class="label" id="fpsLabel">FPS</span>
  314. <div id="errorZone">
  315. </div>
  316. <div class="navbarBottom">
  317. <div id="statusBar"></div>
  318. <div class="links">
  319. <div class='link'><a target='_new' href="https://www.netlify.com/">Deployed by Netlify</a></div>
  320. <div class='link'> <a target='_new' href="http://www.html5gamedevs.com/forum/16-babylonjs/">Forum</a></div>
  321. <div class='link'><a target='_new' href="https://www.babylonjs.com/sandbox">Sandbox</a></div>
  322. <div class='link'><a target='_new' href="https://doc.babylonjs.com">Documentation</a></div>
  323. <div class='link'><a target='_new' href="https://doc.babylonjs.com/playground">Search</a></div>
  324. </div>
  325. </div>
  326. <div id="saveLayer" class="save-layer">
  327. <div class="save-form">
  328. <label for="saveFormTitle">TITLE</label>
  329. <div class="separator"></div>
  330. <input type="text" maxlength="120" id="saveFormTitle" class="save-form-title">
  331. <label for="saveFormDescription">DESCRIPTION</label>
  332. <div class="separator"></div>
  333. <textarea id="saveFormDescription" rows="4" cols="10"></textarea>
  334. <label for="saveFormTags">TAGS (separated by comma)</label>
  335. <div class="separator"></div>
  336. <textarea id="saveFormTags" rows="4" cols="10"></textarea>
  337. <div class="save-form-buttons" id="saveFormButtons">
  338. <div id="saveFormButtonOk" class="button">OK</div>
  339. <div id="saveFormButtonCancel" class="button">Cancel</div>
  340. </div>
  341. </div>
  342. </div>
  343. <script src="https://code.jquery.com/jquery.js"></script>
  344. <script>
  345. Split(['#jsEditor', '#canvasZone']);
  346. </script>
  347. <script src="js/actions.js"></script>
  348. <script src="js/pbt.js"></script>
  349. <script src="js/index.js"></script>
  350. </body>
  351. </html>