Three.js - 景深

时间:2017-08-23 14:05:31

标签: javascript three.js

我正在尝试在我的项目中制作景深,并且我从官方的三个例子中受到启发https://threejs.org/examples/webgl_postprocessing_dof.html

方法BokehPass有问题。有我的代码:

const bokehPass = new THREE.BokehPass( this.scene, this.camera, {
  focus: 1.0,
  aperture: 0.025,
  maxblur: 1.0,
  width: window.innerWidth,
  height: window.innerHeight
} );

当我想初始化它时,我有错误:

Uncaught TypeError: Cannot set property 'value' of undefined

这种方法中第三个参数的错误。有人知道它有什么问题吗?

0 个答案:

没有答案