diff --git a/src/scene/mesh.js b/src/scene/mesh.js index bbd87687e0e..7de14cd0bf4 100644 --- a/src/scene/mesh.js +++ b/src/scene/mesh.js @@ -124,16 +124,17 @@ class GeometryVertexStream { * 0, 1, 0 // pos 3 * ]); * const uvs = new Float32Array([ - * 0, 0, // uv 0 - * 1, 0, // uv 1 - * 1, 1, // uv 2 * 0, 1 // uv 3 + * 1, 1, // uv 2 + * 1, 0, // uv 1 + * 0, 0, // uv 0 * ]); * const indices = [ * 0, 1, 2, // triangle 0 * 0, 2, 3 // triangle 1 * ]; * mesh.setPositions(positions); + * mesh.setNormals(pc.calculateNormals(positions, indices)); * mesh.setUvs(0, uvs); * mesh.setIndices(indices); * mesh.update();