获得徽章 0
#新人报道# 代码片段1:【const geometry = 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,
])
geometry.setAttribute('position',new THREE.BufferAttribute(vertices,3))】
代码片段2:【const geometry = 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,
])
geometry.setAttribute('position',new THREE.BufferAttribute(vertices,3))】为什么代码片段1是三角形,代码片段2是矩形
展开
评论