three 154 找不到PlaneBufferGeometry

threejs yekong 761℃

Three.js的版本154中没有PlaneBufferGeometry类。

在版本154中,你可能需要使用PlaneGeometry代替。你可以尝试如下代码:

import * as THREE from 'three';

const geometry = new THREE.PlaneGeometry(5, 5);

请注意,PlaneGeometryPlaneBufferGeometry可能在API和性能方面有所不同,所以根据你的具体需求和使用场景,你可能需要对代码进行相应调整。

如果你的项目不依赖于特定版本的Three.js,并且你希望使用PlaneBufferGeometry,可以考虑将Three.js改为129版本。但请注意,修改版本会导致其他部分的代码与当前版本不兼容,所以请确保仔细测试你的项目以确认一切都能正常工作。

喜欢 (0)