Просмотр исходного кода

fix camera orientation.

now it's more like looking around and less like rotating around the
focus.
Lucas Stadler лет назад: 12
Родитель
Сommit
b2051da386
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      js/pixl/public/trixl.html

+ 1 - 2
js/pixl/public/trixl.html

@ -146,8 +146,7 @@
146 146
		var offset = {x: 0, y: 0, z: 0};
147 147
		program.transform = gl.getUniformLocation(program, 'transform');
148 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 151
			var aspect = trixl.window.w / trixl.window.h;
153 152
			var transform = function(pos) {