threepipe
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

index.html 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>MSAA Test</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, Mesh, SphereGeometry, ThreeViewer, UnlitMaterial} from 'threepipe'
  27. const viewer = new ThreeViewer({
  28. canvas: document.getElementById('mcanvas'),
  29. msaa: true,
  30. })
  31. const sphere = new Mesh(new SphereGeometry(1, 32, 32), new UnlitMaterial({color: '#ff0000'}))
  32. viewer.scene.addObject(sphere)
  33. _testFinish()
  34. </script>
  35. </head>
  36. <body>
  37. <div id="canvas-container">
  38. <canvas id="mcanvas"></canvas>
  39. </div>
  40. </body>