index.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>BabylonJS - Build validation page</title>
  5. <link href="index.css" rel="stylesheet" />
  6. <script src="https://preview.babylonjs.com/draco_decoder.js" type="text/x-draco-decoder"></script>
  7. <script src="https://preview.babylonjs.com/draco_decoder.wasm" type="text/x-draco-decoder-wasm-binary"></script>
  8. <script src="https://preview.babylonjs.com/draco_wasm_wrapper.js" type="text/x-draco-decoder-wasm-wrapper"></script>
  9. <script src="https://unpkg.com/earcut@2.1.1/dist/earcut.min.js"></script>
  10. <script src="../../Tools/DevLoader/BabylonLoader.js"></script>
  11. </head>
  12. <body>
  13. <script>
  14. BABYLONDEVTOOLS.Loader.require('validation.js')
  15. .load(function() {
  16. // Loading tests
  17. var xhr = new XMLHttpRequest();
  18. xhr.open("GET", "config.json", true);
  19. xhr.addEventListener("load", function () {
  20. if (xhr.status === 200) {
  21. config = JSON.parse(xhr.responseText);
  22. // Run tests
  23. var index = 0;
  24. if (window.location.search) {
  25. justOnce = true;
  26. var title = window.location.search.replace("?", "").replace(/%20/g, " ");
  27. for (var index = 0; index < config.tests.length; index++) {
  28. if (config.tests[index].title === title) {
  29. break;
  30. }
  31. }
  32. }
  33. var recursiveRunTest = function(i) {
  34. runTest(i, function() {
  35. i++;
  36. if (justOnce || i >= config.tests.length) {
  37. return;
  38. }
  39. recursiveRunTest(i);
  40. });
  41. }
  42. recursiveRunTest(index);
  43. }
  44. }, false);
  45. xhr.send();
  46. });
  47. </script>
  48. </body>
  49. </html>