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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>HDR Load</title>
  6. <!-- Import maps polyfill -->
  7. <!-- Remove this when import maps will be widely supported -->
  8. <script async src="https://unpkg.com/es-module-shims@1.6.3/dist/es-module-shims.js"></script>
  9. <script type="importmap">
  10. {
  11. "imports": {
  12. "threepipe": "./../../dist/index.mjs"
  13. }
  14. }
  15. </script>
  16. <style id="example-style">
  17. html, body, #canvas-container, #mcanvas {
  18. width: 100%;
  19. height: 100%;
  20. margin: 0;
  21. overflow: hidden;
  22. }
  23. </style>
  24. <script type="module" src="../examples-utils/simple-code-preview.mjs"></script>
  25. <script id="example-script" type="module">
  26. import {_testFinish, ThreeViewer} from 'threepipe'
  27. const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')})
  28. async function init() {
  29. await viewer.setEnvironmentMap('https://threejs.org/examples/textures/equirectangular/venice_sunset_1k.hdr')
  30. viewer.scene.background = viewer.scene.environment
  31. }
  32. init().then(_testFinish)
  33. </script>
  34. </head>
  35. <body>
  36. <div id="canvas-container">
  37. <canvas id="mcanvas"></canvas>
  38. </div>
  39. </body>