当我用:
创建PBG时var geometry = new THREE.PlaneBufferGeometry(gs,gs, size - 1, size - 1);
geometry.rotateX(-Math.PI / 2);
var vertices = geometry.attributes.position.array;
for (var i = 0, j = 0, l = vertices.length; i < l; i++, j += 3) {
vertices[j + 1] = data.map[0][i];
}
我没有颜色属性:
不知道警告是否有事可做或我遗失了什么。对于我在代码中可以看到的内容,PlaneBufferGeometry从BufferAttribute扩展而且应该有颜色。
提示?
谢谢!
编辑:材料:
var material = new THREE.MeshPhongMaterial({
color: 0xaaaaff,
vertexColors: THREE.FaceColors,
shading: THREE.FlatShading,
side: THREE.DoubleSide
});