Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

video.html 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>MARTINS.js WebAR demo with A-Frame</title>
  7. <link href="demo.css" rel="stylesheet">
  8. <script src="../../dist/martins.min.js"></script>
  9. <script src="https://cdn.jsdelivr.net/npm/aframe@1.4.2/dist/aframe-v1.4.2.min.js"></script>
  10. <script src="../assets/aframe-particle-system-component.min.js"></script>
  11. <script src="demo.js"></script>
  12. <script src="../assets/aframe-with-martins.js"></script>
  13. </head>
  14. <body>
  15. <div id="ar-viewport">
  16. <div id="ar-hud" hidden>
  17. <img id="scan" src="../assets/scan.png">
  18. <a id="about" href="NOTICE.html"></a>
  19. </div>
  20. </div>
  21. <img id="my-reference-image" src="../assets/my-reference-image.webp" hidden>
  22. <video id="my-video" hidden muted loop playsinline autoplay>
  23. <source src="../assets/my-video.webm" type="video/webm" />
  24. <source src="../assets/my-video.mp4" type="video/mp4" />
  25. </video>
  26. <!-- This is a scene -->
  27. <a-scene ar-scene>
  28. <a-camera ar-camera></a-camera>
  29. <!-- Whatever you add to <ar-root> will appear in AR -->
  30. <ar-root>
  31. <!-- Ground plane -->
  32. <a-plane position="0 -0.5 -0.5" rotation="-90 0 0" width="2" height="1" color="indigo">
  33. <!-- 3D model -->
  34. <a-entity gltf-model="#my-3d-model"></a-entity>
  35. <!-- Particles -->
  36. <a-entity rotation="90 0 0">
  37. <a-entity position="0.75 0 0" particle-system="texture: ../assets/particle.png; color: #03f; opacity: 0.33; size: 20; maxAge: 0.64; velocityValue: 0 6.5 0; velocitySpread: 0 0 0; accelerationSpread: 2 0 2; particleCount: 2000"></a-entity>
  38. <a-entity position="-0.75 0 0" particle-system="texture: ../assets/particle.png; color: #f70; opacity: 0.33; size: 20; maxAge: 0.64; velocityValue: 0 6.5 0; velocitySpread: 0 0 0; accelerationSpread: 2 0 2; particleCount: 2000"></a-entity>
  39. </a-entity>
  40. <!-- Rotating text -->
  41. <a-entity animation="property: rotation.z; from: 0; to: 360; dur: 2000; loop: true; easing: linear">
  42. <a-text value="It works!" font="mozillavr" color="#fe3" scale="-1 -1 1" rotation="-90 0 0" position="0 0.40 1" align="center"></a-text>
  43. <a-text value="Cool!" font="mozillavr" color="#8ef" scale="1 1 1" rotation="90 0 0" position="0 -0.40 1" align="center"></a-text>
  44. </a-entity>
  45. </a-plane>
  46. </ar-root>
  47. <!-- Declare external media files here -->
  48. <a-assets>
  49. <a-asset-item id="my-3d-model" src="../assets/my-3d-model.glb"></a-asset-item>
  50. </a-assets>
  51. </a-scene>
  52. </body>
  53. </html>