index.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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"></script>
  7. <script src="https://unpkg.com/earcut@2.1.1/dist/earcut.min.js"></script>
  8. <script src="../../Tools/DevLoader/BabylonLoader.js"></script>
  9. </head>
  10. <body>
  11. <script>
  12. BABYLONDEVTOOLS.Loader.require('validation.js')
  13. .load(function() {
  14. // Loading tests
  15. var xhr = new XMLHttpRequest();
  16. xhr.open("GET", "config.json", true);
  17. xhr.addEventListener("load", function () {
  18. if (xhr.status === 200) {
  19. config = JSON.parse(xhr.responseText);
  20. // Run tests
  21. var index = 0;
  22. if (window.location.search) {
  23. justOnce = true;
  24. var title = window.location.search.replace("?", "").replace(/%20/g, " ");
  25. for (var index = 0; index < config.tests.length; index++) {
  26. if (config.tests[index].title === title) {
  27. break;
  28. }
  29. }
  30. }
  31. var recursiveRunTest = function(i) {
  32. runTest(i, function() {
  33. i++;
  34. if (justOnce || i >= config.tests.length) {
  35. return;
  36. }
  37. recursiveRunTest(i);
  38. });
  39. }
  40. recursiveRunTest(index);
  41. }
  42. }, false);
  43. xhr.send();
  44. });
  45. </script>
  46. </body>
  47. </html>