设置顶点创建矩形
const geometry3 = new THREE.BufferGeometry(); const vertices = new Float32Array([ -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, // 第二个三角形 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0 ]); geometry3.setAttribute('position', new THREE.BufferAttribute(vertices, 3)); const material3 = new THREE.MeshBasicMaterial({ color: 0xff9900 }); const mesh = new THREE.Mesh(geometry3, material3); scene.add(mesh);
标签:Threejs,1.0,创建,矩阵,THREE,new,geometry3,const From: https://www.cnblogs.com/LIXI-/p/16967626.html