我正试着用一个铺层加载器在three.js中加载一个彩色的点云。我关注this example,但它与我的用例不同。我使用的是点云,而不是网格。
你可以看到它是什么looks like from here.
和我上传ply文件的代码部分:
const loader = new PLYLoader();
loader.load( 'samplePcd/fragment.ply', function ( geometry ) {
const material = new THREE.PointsMaterial( {size: 0.01} );
material.vertexColors = true;
const mesh = new THREE.Points( geometry, material );
mesh.position.x = 0;
mesh.position.y = -1;
mesh.position.z = 0;
mesh.scale.multiplyScalar(0.2 );
mesh.castShadow = true;
mesh.receiveShadow = true;
scene.add( mesh );
} );结果是什么都没有。我不能显示任何东西。怎样才能从他们的颜色中获得分数呢?
要进行复制,您可以创建一个本地服务器并使用this html。
发布于 2021-07-11 01:08:59
这确实是我的错。我无法以正确的方式下载ply文件。因此,上面的代码很适合彩色铺层点云。
https://stackoverflow.com/questions/68329448
复制相似问题