THREE.ExtrudeBufferGeometry is not a constructor

threejs yekong

threejs 项目从123升级版本到154后报错

THREE.ExtrudeBufferGeometry is not a constructor

根据在github查看到的消息,方法从THREE.ExtrudeBufferGeometry 改名为了THREE.ExtrudeGeometry

改名前的方法

const geometry = new THREE.ExtrudeBufferGeometry(shapeArr, {
    depth: height,
    bevelEnabled: false
});

改名后的方法

const geometry = new THREE.ExtrudeGeometry(shapeArr, {
    depth: height,
    bevelEnabled: false
});
喜欢