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

12345678910111213141516171819202122
  1. import {_testFinish, ContactShadowGroundPlugin, IObject3D, ThreeViewer} from 'threepipe'
  2. import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane'
  3. async function init() {
  4. const viewer = new ThreeViewer({
  5. canvas: document.getElementById('mcanvas') as HTMLCanvasElement,
  6. })
  7. viewer.addPluginSync(ContactShadowGroundPlugin)
  8. await Promise.all([
  9. viewer.setEnvironmentMap('https://threejs.org/examples/textures/equirectangular/venice_sunset_1k.hdr'),
  10. viewer.load<IObject3D>('https://threejs.org/examples/models/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf'),
  11. ])
  12. const ui = viewer.addPluginSync(new TweakpaneUiPlugin(true))
  13. ui.setupPluginUi(ContactShadowGroundPlugin, {expanded: true})
  14. }
  15. init().finally(_testFinish)