indexStable.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" />
  9. <link rel="stylesheet" href="/css/index.css" />
  10. <link rel="stylesheet" href="/css/index_mobile.css" />
  11. <link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
  12. <meta name="msapplication-TileColor" content="#ffffff">
  13. <meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
  14. <meta name="msapplication-config" content="https://www.babylonjs.com/img/favicon/browserconfig.xml">
  15. <meta name="theme-color" content="#ffffff">
  16. </head>
  17. <body>
  18. <!-- Big screens -->
  19. <div class="navbar navBar1280 languageJS">
  20. <div class="categoryTitle">
  21. <img class="logo" src="/css/img/logo_v4.svg">
  22. <div class="version">Playground <span class="versionSub" id="mainTitle1280"></span></div>
  23. </div>
  24. <div class="category languageJS" id="JStoTSbar">
  25. <div class="buttonJStoTS languageTS" id="toTSbutton1280" title="Switch to TypeScript">Typescript</div>
  26. <div class="buttonJStoTS languageJS" id="toJSbutton1280" title="Switch to JavaScript">Javascript</div>
  27. <div class="buttonPG run removeOnDiff" id="runButton1280" title="Run&#10;(Alt+Enter)"><img
  28. src="/css/img/playButton.svg"></div>
  29. <div class="buttonPG removeOnDiff" id="saveButton1280" title="Save&#10;(Ctrl+S)"><img
  30. src="/css/img/saveButton.svg"></div>
  31. <div class="buttonPG removeOnPhone removeOnDiff" id="zipButton1280"
  32. title="Download ZIP&#10;(Ctrl+Shift+S)"><img src="/css/img/downloadButton.svg"></div>
  33. <div class="buttonPG removeOnDiff" id="newButton1280" title="Create new"><img
  34. src="/css/img/newButton.svg"></div>
  35. <div class="buttonPG removeOnPhone removeOnDiff" id="clearButton1280" title="Clear"><img
  36. src="/css/img/clearButton.svg"></div>
  37. <div class="buttonPG removeOnPhone removeOnDiff" id="diffButton1280" title="Compare"><img
  38. src="/css/img/diffButton.svg"></div>
  39. <div class="buttonPG removeOnPhone displayOnDiff" id="previousButton1280"
  40. title="Previous difference&#10;(Shift+Alt+F5)"><img src="/css/img/previousButton.svg"></div>
  41. <div class="buttonPG removeOnPhone displayOnDiff" id="nextButton1280"
  42. title="Next difference&#10;(Alt+F5)"><img src="/css/img/nextButton.svg"></div>
  43. <div class="buttonPG removeOnPhone displayOnDiff" id="exitButton1280" title="Exit&#10;(Esc)"><img
  44. src="/css/img/exitButton.svg"></div>
  45. <div class="buttonPG select removeOnDiff" id="menuButton1280" title="Options"><img
  46. src="/css/img/optionsButton.svg">
  47. <div class="toDisplay languageJS">
  48. <div class="option subSelect">Theme <i class="fa fa-chevron-right" aria-hidden="true"></i>
  49. <div class="toDisplaySub languageJS">
  50. <div class="option selected" id="darkTheme1280">Dark</div>
  51. <div class="option" id="lightTheme1280">Light</div>
  52. </div>
  53. </div>
  54. <div class="option subSelect">Font size <i class="fa fa-chevron-right" aria-hidden="true"></i>
  55. <div class="toDisplaySub displayFontSize languageJS">
  56. <div class="option">12</div>
  57. <div class="option selected">14</div>
  58. <div class="option">16</div>
  59. <div class="option">18</div>
  60. <div class="option">20</div>
  61. <div class="option">22</div>
  62. </div>
  63. </div>
  64. <div class="option noSubSelect" id="safemodeToggle1280">Safe mode
  65. <i class="fa fa-square" aria-hidden="true"></i>
  66. </div>
  67. <div class="option checked noSubSelect" id="editorButton1280">Editor
  68. <i class="fa fa-check-square" aria-hidden="true"></i>
  69. </div>
  70. <div class="option noSubSelect" id="ctrlsToggle1280">CTRL+S to save
  71. <i class="fa fa-square" aria-hidden="true"></i>
  72. </div>
  73. <div class="option noSubSelect" id="fullscreenButton1280">Fullscreen</div>
  74. <div class="option noSubSelect" id="editorFullscreenButton1280">Editor Fullscreen</div>
  75. <div class="option noSubSelect" id="formatButton1280">Format code</div>
  76. <div class="option noSubSelect" id="minimapToggle1280">Minimap
  77. <i class="fa fa-square" aria-hidden="true"></i>
  78. </div>
  79. <div class="option subSelect" id="qrCodeHover1280">QR Code Link <i class="fa fa-chevron-right"
  80. aria-hidden="true"></i>
  81. <div class="toDisplaySub qrCodeImage">
  82. <div class="option" id="qrCodeImage1280">[QR Code Image]</div>
  83. </div>
  84. </div>
  85. <div class="option uncheck noSubSelect" id="debugButton1280">Inspector</div>
  86. <div class="option nosubselect" id="metadataButton1280">Metadata</div>
  87. </div>
  88. </div>
  89. </div>
  90. <div class="category right">
  91. <div class="button select">
  92. <span id="currentVersion1280"></span>
  93. <div class="toDisplay currentVersionDisplay" style="display: none"></div>
  94. </div>
  95. <div class="button select"><img class="examplesButton" src="/css/img/examplesButton.svg"></div>
  96. </div>
  97. </div>
  98. <!-- Mid-size screens -->
  99. <div class="navbar navBar1024 languageJS">
  100. <div class="categoryTitle">
  101. <img class="logo" src="/css/img/logo_v4.svg">
  102. <div class="version"><span class="versionSub" id="mainTitle1024"></span></div>
  103. </div>
  104. <div class="category languageJS" id="JStoTSbar">
  105. <div class="buttonJStoTS languageTS" id="toTSbutton1024" title="Switch to TypeScript">TS</div>
  106. <div class="buttonJStoTS languageJS" id="toJSbutton1024" title="Switch to JavaScript">JS</div>
  107. <div class="buttonSpaceKiller"></div>
  108. <div class="buttonPG run removeOnDiff" id="runButton1024" title="Run&#10;(Alt+Enter)"><img
  109. src="/css/img/playButton.svg"></div>
  110. <div class="buttonPG removeOnDiff" id="saveButton1024" title="Save&#10;(Ctrl+S)"><img
  111. src="/css/img/saveButton.svg"></div>
  112. <div class="buttonPG removeOnPhone removeOnDiff" id="zipButton1024"
  113. title="Download ZIP&#10;(Ctrl+Shift+S)"><img src="/css/img/downloadButton.svg"></div>
  114. <div class="buttonPG removeOnDiff" id="newButton1024" title="Create new"><img
  115. src="/css/img/newButton.svg"></div>
  116. <div class="buttonPG removeOnPhone removeOnDiff" id="clearButton1024" title="Clear"><img
  117. src="/css/img/clearButton.svg"></div>
  118. <div class="buttonPG removeOnPhone removeOnDiff" id="diffButton1024" title="Compare"><img
  119. src="/css/img/diffButton.svg"></div>
  120. <div class="buttonPG removeOnPhone displayOnDiff" id="previousButton1024"><img
  121. src="/css/img/previousButton.svg"></div>
  122. <div class="buttonPG removeOnPhone displayOnDiff" id="nextButton1024"><img
  123. src="/css/img/nextButton.svg"></div>
  124. <div class="buttonPG removeOnPhone displayOnDiff" id="exitButton1024"><img
  125. src="/css/img/exitButton.svg"></div>
  126. <div class="buttonPG select removeOnDiff" id="menuButton1024" title="Options"><img
  127. src="/css/img/optionsButton.svg">
  128. <div class="toDisplay">
  129. <div class="option subSelect">Theme <i class="fa fa-chevron-right" aria-hidden="true"></i>
  130. <div class="toDisplaySub">
  131. <div class="option selected" id="darkTheme1024">Dark</div>
  132. <div class="option" id="lightTheme1024">Light</div>
  133. </div>
  134. </div>
  135. <div class="option subSelect">Font size <i class="fa fa-chevron-right" aria-hidden="true"></i>
  136. <div class="toDisplaySub displayFontSize">
  137. <div class="option">12</div>
  138. <div class="option selected">14</div>
  139. <div class="option">16</div>
  140. <div class="option">18</div>
  141. <div class="option">20</div>
  142. <div class="option">22</div>
  143. </div>
  144. </div>
  145. <div class="option noSubSelect" id="safemodeToggle1024">Safe mode
  146. <i class="fa fa-square" aria-hidden="true"></i>
  147. </div>
  148. <div class="option checked noSubSelect" id="editorButton1024">Editor
  149. <i class="fa fa-check-square" aria-hidden="true"></i>
  150. </div>
  151. <div class="option noSubSelect" id="ctrlsToggle1024">CTRL+S to save
  152. <i class="fa fa-square" aria-hidden="true"></i>
  153. </div>
  154. <div class="option noSubSelect" id="fullscreenButton1024">Fullscreen</div>
  155. <div class="option noSubSelect" id="editorFullscreenButton1024">Editor Fullscreen</div>
  156. <div class="option noSubSelect" id="formatButton1024">Format code</div>
  157. <div class="option noSubSelect" id="minimapToggle1024">Minimap
  158. <i class="fa fa-square" aria-hidden="true"></i>
  159. </div>
  160. <div class="option subSelect" id="qrCodeHover1024">QR Code Link <i class="fa fa-chevron-right"
  161. aria-hidden="true"></i>
  162. <div class="toDisplaySub qrCodeImage">
  163. <div class="option" id="qrCodeImage1024">[QR Code Image]</div>
  164. </div>
  165. </div>
  166. <div class="option uncheck noSubSelect" id="debugButton1024">Inspector</div>
  167. <div class="option noSubSelect" id="metadataButton1024">Metadata</div>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="category right">
  172. <div class="button select">
  173. <span id="currentVersion1024"></span>
  174. <div class="toDisplay currentVersionDisplay" style="display: none">
  175. </div>
  176. </div>
  177. <div class="button select"><img class="examplesButton" src="/css/img/examplesButton.svg"></div>
  178. </div>
  179. </div>
  180. <!-- Mobile -->
  181. <div class="navbar navBarMobile languageJS">
  182. <div class="category languageJS" id="JStoTSbar">
  183. <div class="button select" id="menuButtonMobile"><img src="/css/img/hamburgerButton.svg">
  184. <div class="toDisplay">
  185. <div class="option noSubSelect languageTS" id="toTSbuttonMobile">TypeScript</div>
  186. <div class="option noSubSelect languageJS" id="toJSbuttonMobile">JavaScript</div>
  187. <div class="option noSubSelect run" id="runButtonMobile"><img src="/css/img/playButton.svg">Run
  188. </div>
  189. <div class="option noSubSelect" id="saveButtonMobile"><img src="/css/img/saveButton.svg">Save
  190. </div>
  191. <div class="option noSubSelect" id="zipButtonMobile"><img
  192. src="/css/img/downloadButton.svg">Download
  193. </div>
  194. <div class="option noSubSelect" id="newButtonMobile"><img src="/css/img/newButton.svg">New</div>
  195. <div class="option noSubSelect" id="clearButtonMobile"><img src="/css/img/clearButton.svg">Clear
  196. </div>
  197. <div class="option noSubSelect" id="debugButtonMobile"><img
  198. src="/css/img/inspectorButton.svg">Inspector</div>
  199. <div class="option subSelect">
  200. <img src="/css/img/optionsButton.svg">
  201. Version<div id="currentVersionMobile"></div>
  202. <div class="toDisplaySub currentVersionDisplay">
  203. </div>
  204. </div>
  205. <div class="option subSelect"><img src="/css/img/optionsButton.svg">Theme
  206. <div class="toDisplaySub">
  207. <div class="option selected" id="darkThemeMobile">Dark</div>
  208. <div class="option" id="lightThemeMobile">Light</div>
  209. </div>
  210. </div>
  211. <div class="option subSelect"><img src="/css/img/optionsButton.svg">Font size
  212. <div class="toDisplaySub displayFontSize">
  213. <div class="option">8</div>
  214. <div class="option">10</div>
  215. <div class="option selected">12</div>
  216. <div class="option">14</div>
  217. <div class="option">16</div>
  218. <div class="option">18</div>
  219. <div class="option">20</div>
  220. <div class="option">22</div>
  221. </div>
  222. </div>
  223. <div style="display: none;" class="option noSubSelect" id="safemodeToggleMobile">Safe mode
  224. <i class="fa fa-square" aria-hidden="true"></i>
  225. </div>
  226. <div style="display: none;" class="option checked noSubSelect" id="editorButtonMobile">Editor
  227. <i class="fa fa-check-square" aria-hidden="true"></i>
  228. </div>
  229. <div style="display: none;" class="option noSubSelect" id="ctrlsToggleMobile">CTRL+S to save
  230. <i class="fa fa-square" aria-hidden="true"></i>
  231. </div>
  232. <div style="display: none;" class="option nosubselect" id="fullscreenButtonMobile"
  233. style="display: none">Fullscreen</div>
  234. <div style="display: none;" class="option nosubselect" id="editorFullscreenButtonMobile"
  235. style="display: none">Editor
  236. Fullscreen</div>
  237. <div class="option nosubselect" id="formatButtonMobile"><img
  238. src="/css/img/optionsButton.svg">Format
  239. code</div>
  240. <div style="display: none;" class="option nosubselect" id="minimapToggleMobile">Minimap
  241. <i class="fa fa-square" aria-hidden="true"></i>
  242. </div>
  243. <!-- <div class="option subSelect" id="qrCodeHoverMobile"><img src="/css/img/optionsButton.svg">QR Code Link
  244. <div class="toDisplaySub qrCodeImage">
  245. <div class="option" id="qrCodeImageMobile">[QR Code Image]</div>
  246. </div>
  247. </div> -->
  248. <div class="option nosubselect" id="metadataButtonMobile"><img
  249. src="/css/img/metadataButton.svg">Metadata</div>
  250. <div class="option nosubselect"><img class="examplesButton"
  251. src="/css/img/examplesButton.svg">Examples</div>
  252. <div class="option subSelect"><img src="/css/img/examplesButton.svg">Links / Tools
  253. <div class="toDisplaySub displayFooterLinks">
  254. <div class="option link">
  255. <a target='_new' href="https://www.netlify.com/">Deployed by Netlify</a>
  256. </div>
  257. <div class="option link">
  258. <a target='_new' href="https://forum.babylonjs.com/">Forum</a>
  259. </div>
  260. <div class="option link">
  261. <a target='_new' href="https://www.babylonjs.com/sandbox">Sandbox</a>
  262. </div>
  263. <div class="option link">
  264. <a target='_new' href="https://doc.babylonjs.com">Documentation</a>
  265. </div>
  266. <div class="option link">
  267. <a target='_new' href="https://doc.babylonjs.com/playground">Search</a>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. </div>
  273. <div class="categoryTitle">
  274. <img class="logo" src="/css/img/logo_v4.svg">
  275. <div class="version"><span class="versionSub" id="mainTitleMobile"></span></div>
  276. </div>
  277. </div>
  278. <div id="switchWrapper" class="languageJS">
  279. <img id="switchWrapperCode" src="/css/img/codeButton.svg">
  280. <img id="switchWrapperCanvas" src="/css/img/canvas3Dbutton.svg">
  281. </div>
  282. </div>
  283. <!-- Common things -->
  284. <div class="wrapper">
  285. <div id="jsEditor"></div>
  286. <div id="canvasZone">
  287. <canvas touch-action="none" id="renderCanvas"></canvas>
  288. </div>
  289. </div>
  290. <div id="exampleList" class="javascript">
  291. <div id="exampleBanner" class="languageJS">
  292. <h1>Examples<img id="examplesButtonClose" src="/css/img/clearButton.svg"></h1>
  293. </div>
  294. <div class="horizontalSeparator"></div>
  295. <input id="filterBar" type="text" placeholder="Filter examples...">
  296. <img id="filterBarClear"
  297. src="/css/img/clear_button.png">
  298. </div>
  299. <div class="fpsLabel languageJS" id="fpsLabel"></div>
  300. <div id="errorZone">
  301. </div>
  302. <div class="navbarBottom">
  303. <div id="statusBar"></div>
  304. <div class="links">
  305. <div class='link'>
  306. <a target='_new' href="https://www.netlify.com/">Deployed by Netlify</a>
  307. </div>
  308. <div class='link'>
  309. <a target='_new' href="https://forum.babylonjs.com/">Forum</a>
  310. </div>
  311. <div class='link'>
  312. <a target='_new' href="https://www.babylonjs.com/sandbox">Sandbox</a>
  313. </div>
  314. <div class='link'>
  315. <a target='_new' href="https://doc.babylonjs.com">Documentation</a>
  316. </div>
  317. <div class='link'>
  318. <a target='_new' href="https://doc.babylonjs.com/playground">Search</a>
  319. </div>
  320. </div>
  321. </div>
  322. <div id="saveLayer" class="save-layer">
  323. <div class="save-form languageJS ">
  324. <img id="saveFormButtonClose" src="/css/img/clearButton.svg">
  325. <label for="saveFormTitle">TITLE</label>
  326. <div class="separator"></div>
  327. <input type="text" maxlength="120" id="saveFormTitle" class="save-form-title">
  328. <label for="saveFormDescription">DESCRIPTION</label>
  329. <div class="separator"></div>
  330. <textarea id="saveFormDescription" rows="4" cols="10"></textarea>
  331. <label for="saveFormTags">TAGS (separated by comma)</label>
  332. <div class="separator"></div>
  333. <textarea id="saveFormTags" rows="4" cols="10"></textarea>
  334. <div class="save-form-buttons" id="saveFormButtons">
  335. <div id="saveFormButtonOk">OK</div>
  336. <div id="saveFormButtonCancel">Cancel</div>
  337. </div>
  338. </div>
  339. </div>
  340. <div id="waitDiv">
  341. <div id="logo-part">
  342. <img src="/css/img/v4.svg" id="waitLogo" />
  343. <img src="/css/img/spinner.svg" id="waitSpinner" />
  344. </div>
  345. </div>
  346. <!-- Pep -->
  347. <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
  348. <!--For canvas/code separator-->
  349. <script src="/js/libs/split.js"></script>
  350. <!-- DatGUI -->
  351. <script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
  352. <!-- jszip -->
  353. <script src="/js/libs/jszip.min.js"></script>
  354. <script src="/js/libs/fileSaver.js"></script>
  355. <!-- Dependencies -->
  356. <script src="https://cdn.babylonjs.com/ammo.js"></script>
  357. <script src="https://cdn.babylonjs.com/cannon.js"></script>
  358. <script src="https://cdn.babylonjs.com/Oimo.js"></script>
  359. <script src="https://cdn.babylonjs.com/gltf_validator.js"></script>
  360. <script src="https://cdn.babylonjs.com/earcut.min.js"></script>
  361. <!-- Babylon.js -->
  362. <script src="https://cdn.babylonjs.com/babylon.js"></script>
  363. <script src="https://cdn.babylonjs.com/gui/babylon.gui.min.js"></script>
  364. <script src="https://cdn.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script>
  365. <script src="https://cdn.babylonjs.com/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js"></script>
  366. <script src="https://cdn.babylonjs.com/postProcessesLibrary/babylonjs.postProcess.min.js"></script>
  367. <script src="https://cdn.babylonjs.com/loaders/babylonjs.loaders.js"></script>
  368. <script src="https://cdn.babylonjs.com/serializers/babylonjs.serializers.min.js"></script>
  369. <script src="https://cdn.babylonjs.com/inspector/babylon.inspector.bundle.js"></script>
  370. <!-- Monaco -->
  371. <script src="/node_modules/monaco-editor/dev/vs/loader.js"></script>
  372. <!-- Extensions -->
  373. <script
  374. src="https://rawcdn.githack.com/BabylonJS/Extensions/f43ab677b4bca0a6ab77132d3f785be300382760/ClonerSystem/src/babylonx.cloner.js"
  375. async>
  376. </script>
  377. <script
  378. src="https://rawcdn.githack.com/BabylonJS/Extensions/785013ec55b210d12263c91f3f0a2ae70cf0bc8a/CompoundShader/src/babylonx.CompoundShader.js"
  379. async></script>
  380. <!-- Scene Manager -->
  381. <script
  382. src="https://rawcdn.githack.com/MackeyK24/MackeyK24.github.io/14fda491c50cfca6d3e2f6cbc5e6afe22cc455d6/toolkit/babylon.manager.js">
  383. </script>
  384. <script
  385. src="https://rawcdn.githack.com/MackeyK24/MackeyK24.github.io/14fda491c50cfca6d3e2f6cbc5e6afe22cc455d6/toolkit/babylon.navmesh.js">
  386. </script>
  387. <!-- jQuery -->
  388. <script src="https://code.jquery.com/jquery.min.js"></script>
  389. <script src="https://rawcdn.githack.com/jeromeetienne/jquery-qrcode/master/jquery.qrcode.min.js"></script>
  390. <!-- TO DO - Why is this a split here ? It's already in the JS code (index.js) -->
  391. <script>
  392. Split(['#jsEditor', '#canvasZone']);
  393. </script>
  394. <!-- Main scripts -->
  395. <script src="/js/config_versions.js"></script>
  396. <script src="/js/examples.js"></script>
  397. <script src="/js/main.js"></script>
  398. <script src="/js/menuPG.js"></script>
  399. <script src="/js/monacoCreator.js"></script>
  400. <script src="/js/settingsPG.js"></script>
  401. <script src="/js/utils.js"></script>
  402. <script src="/js/zipTool.js"></script>
  403. <script src="/js/index.js"></script>
  404. </body>
  405. </html>