basicExample.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>BabylonJS Viewer - Basic usage</title>
  8. <style>
  9. babylon {
  10. width: 300px;
  11. height: 200px;
  12. }
  13. </style>
  14. </head>
  15. <body>
  16. <babylon id="babylon-viewer" model="https://models.babylonjs.com/boombox.glb">
  17. <!-- Setting the vr object (or vr="true" in the <babylon tag) is enough to enable VR.
  18. The object-scale-factor is optional an can be used to scale the model in VR mode.
  19. If setting "2", the model will be twice the size of its normalized size.
  20. -->
  21. <vr object-scale-factor="2">
  22. </vr>
  23. <!-- This is needed in order to show the VR button. It is also possible to toggleVR() using javascript -->
  24. <templates>
  25. <nav-bar>
  26. <params hide-vr="false"></params>
  27. </nav-bar>
  28. </templates>
  29. </babylon>
  30. <script src="viewer.js"></script>
  31. <script>
  32. </script>
  33. </body>
  34. </html>