|
|
|
|
|
|
146
|
var offset = {x: 0, y: 0, z: 0};
|
146
|
var offset = {x: 0, y: 0, z: 0};
|
|
147
|
program.transform = gl.getUniformLocation(program, 'transform');
|
147
|
program.transform = gl.getUniformLocation(program, 'transform');
|
|
148
|
trixl.redraw = function() {
|
148
|
trixl.redraw = function() {
|
|
149
|
var camera = mat4.lookAt([], trixl.camera.pos, trixl.camera.focus, trixl.camera.up);
|
|
|
|
150
|
var view = mat4.invert([], camera);
|
|
|
|
|
|
149
|
var view = mat4.lookAt([], trixl.camera.pos, trixl.camera.focus, trixl.camera.up);
|
|
151
|
|
150
|
|
|
152
|
var aspect = trixl.window.w / trixl.window.h;
|
151
|
var aspect = trixl.window.w / trixl.window.h;
|
|
153
|
var transform = function(pos) {
|
152
|
var transform = function(pos) {
|