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

3 лет назад
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>FBX Load</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, ThreeViewer, HemisphereLight} from 'threepipe'
  25. const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')})
  26. async function init() {
  27. viewer.scene.addObject(new HemisphereLight(0xffffff, 0x444444, 10))
  28. const result = await viewer.load('https://threejs.org/examples/models/fbx/Samba Dancing.fbx', {
  29. autoCenter: true,
  30. autoScale: true,
  31. })
  32. console.log(result)
  33. }
  34. init().then(_testFinish)
  35. </script>
  36. </head>
  37. <body>
  38. <div id="canvas-container">
  39. <canvas id="mcanvas"></canvas>
  40. </div>
  41. </body>