05 Data becomes vertices
vec3: three numbers place a point in space
Pick a row, then drag X / Y / Z; the array and its vertex change together.
-1.21.2
-1.21.2
-1.21.2
Exercise
Drag the underlined numbers left and rightDrag numbers, or edit the code
// selected vertex p2vec3 point = vec3(, , );
Click a row to pick a vertex; X is left/right, Y up/down, Z front/back.
JS side
gl.uniformMatrix4fv(uModel, …) // rotation -0.55 / 0.35A vec3 places a point in space with three numbers: X left/right, Y up/down, Z front/back.
Try it
- Pick p6 and push Z to the maximum
- Pull one vertex away and watch its triangles stretch with it