var projection = glMatrix.mat4.create()
var modelView = glMatrix.mat4.create();
var modelViewProjection = glMatrix.mat4.create();
glMatrix.mat4.perspective(projection, { 0: 120 }, 4 / 3, .1, 10000.);
glMatrix.mat4.lookAt(modelView, [ x, y, z ], [ x + cf(lx), y + cf(ly), z + sf(lx) ], [0, 1, 0]);
glMatrix.mat4.translate(modelView, modelView, [0, 0, 0]);
var k = glMatrix.mat4.multiply(modelViewProjection, modelView, projection);
var loc_modelView = gl.getUniformLocation(shaderProgram, "modelView");
var loc_projection = gl.getUniformLocation(shaderProgram, "projection");
gl.uniformMatrix4fv(loc_modelView, false, modelView);
gl.uniformMatrix4fv(loc_projection, false, projection);
gl.drawElements(gl.TRIANGLES, indices.length, gl.UNSIGNED_SHORT, 0);
Shaders are linked correct and o tested using others codes i’m here only for no repeat the process, probabily something like identity of lookAt or not fitting right the sequence of matrix
I tested the thing i Said before!