three.js-顶点
点
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210401190305944.png)
let geometry = new THREE.BufferGeometry();
let vertices = new Float32Array([
0, 0, 0,
50, 0, 0,
0, 100, 0,
0, 0, 10,
0, 0, 100,
50, 0, 10,
]);
let attribue = new THREE.BufferAttribute(vertices, 3);
geometry.attributes.position = attribue;
let material = new THREE.PointsMaterial({
color: 0x6c92fa,
size: 10.0
});
let point = new THREE.Points(geometry, material);
this.scene.add(point);
线
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210401190329370.png)
let geometry = new THREE.BufferGeometry();
let vertices = new Float32Array([
0, 0, 0,
50, 0, 0,
0, 100, 0,
0, 0, 10,
0, 0, 100,
50, 0, 10,
]);
let attribue = new THREE.BufferAttribute(vertices, 3);
geometry.attributes.position = attribue;
let material = new THREE.LineBasicMaterial({
color: 0x6c92fa,
});
let line = new THREE.Line(geometry, material);