threepipe
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

index.html 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>RGBM Render pipeline test</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <!-- Import maps polyfill -->
  8. <!-- Remove this when import maps will be widely supported -->
  9. <script async src="https://unpkg.com/es-module-shims@1.6.3/dist/es-module-shims.js"></script>
  10. <script type="importmap">
  11. {
  12. "imports": {
  13. "threepipe": "./../../dist/index.mjs"
  14. }
  15. }
  16. </script>
  17. <style id="example-style">
  18. html, body, #canvas-container, #mcanvas {
  19. width: 100%;
  20. height: 100%;
  21. margin: 0;
  22. overflow: hidden;
  23. }
  24. </style>
  25. <script type="module" src="../examples-utils/simple-code-preview.mjs"></script>
  26. <script id="example-script" type="module">
  27. import {_testFinish, Mesh, SphereGeometry, ThreeViewer, UnlitMaterial} from 'threepipe'
  28. const viewer = new ThreeViewer({
  29. canvas: document.getElementById('mcanvas'),
  30. rgbm: true,
  31. })
  32. const sphere = new Mesh(new SphereGeometry(1, 32, 32), new UnlitMaterial({color: '#ff0000'}))
  33. viewer.scene.addObject(sphere)
  34. _testFinish()
  35. </script>
  36. </head>
  37. <body>
  38. <div id="canvas-container">
  39. <canvas id="mcanvas"></canvas>
  40. </div>
  41. </body>