index.html 1.5 KB

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