model.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <script src="./js/4dage.js"></script>
  8. <title>Document</title>
  9. <style>
  10. html {
  11. overflow: hidden;
  12. }
  13. .bacBox {
  14. opacity: 1;
  15. pointer-events: auto;
  16. position: absolute;
  17. z-index: 998;
  18. top: 0;
  19. left: 0;
  20. width: 100%;
  21. height: 100%;
  22. transition: all 1s;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. <div id="ui"></div>
  28. <div class="bacBox"></div>
  29. <script>
  30. let loaded = false;
  31. const number = getQueryVariable("m");
  32. window.autoRotate = true; // 是否自动旋转
  33. function initModel(isDev) {
  34. if (loaded) return;
  35. fdage.embed(isDev ? "https://sit-shgybwg.4dage.com" + number : number, {
  36. transparentBackground: true,
  37. width: 800,
  38. height: 600,
  39. autoStart: true,
  40. fullFrame: true,
  41. pagePreset: false,
  42. });
  43. loaded = true;
  44. }
  45. window.parent.postMessage("modelPageLoaded", location.origin);
  46. </script>
  47. </body>
  48. </html>