threepipe
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index.html 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>RGBM Render pipeline test</title>
  6. <!-- Import map -->
  7. <script type="importmap">
  8. {
  9. "imports": {
  10. "threepipe": "./../../dist/index.mjs"
  11. }
  12. }
  13. </script>
  14. <style id="example-style">
  15. html, body, #canvas-container, #mcanvas {
  16. width: 100%;
  17. height: 100%;
  18. margin: 0;
  19. overflow: hidden;
  20. }
  21. </style>
  22. <script type="module" src="../js-utils/simple-code-preview.mjs"> </script>
  23. <script id="example-script" type="module">
  24. import {_testFinish, Mesh, SphereGeometry, UnlitMaterial, ThreeViewer} from 'threepipe'
  25. const viewer = new ThreeViewer({
  26. canvas: document.getElementById('mcanvas'),
  27. rgbm: true,
  28. })
  29. const sphere = new Mesh(new SphereGeometry(1, 32, 32), new UnlitMaterial({color: '#ff0000'}))
  30. viewer.scene.addObject(sphere)
  31. _testFinish()
  32. </script>
  33. </head>
  34. <body>
  35. <div id="canvas-container">
  36. <canvas id="mcanvas"></canvas>
  37. </div>
  38. </body>