index.html 1.3 KB

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