threepipe
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

script.ts 792B

123456789101112131415161718192021
  1. import {_testFinish, IObject3D, ThreeViewer, VignettePlugin} 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. // A GBuffer(depth buffer here) is required for the `tonemapBackground` flag in TonemapPlugin to work
  8. viewer.addPluginSync(VignettePlugin)
  9. await viewer.setEnvironmentMap('https://threejs.org/examples/textures/equirectangular/venice_sunset_1k.hdr')
  10. await viewer.load<IObject3D>('https://threejs.org/examples/models/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf')
  11. const ui = viewer.addPluginSync(new TweakpaneUiPlugin(true))
  12. ui.setupPluginUi(VignettePlugin)
  13. }
  14. init().then(_testFinish)