Lucas Stadler лет назад: 12
Родитель
Сommit
e7ed70ea53
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      js/pixl/public/matrix.js
  2. 1 1
      js/pixl/public/trixl.html

+ 1 - 1
js/pixl/public/matrix.js

101
	];
101
	];
102
}
102
}
103
103
104
matrix.persective = function(fov, aspect) {
104
matrix.perspective = function(fov, aspect) {
105
	return [
105
	return [
106
		Math.PI / 3 / aspect, 0, 0, 0,
106
		Math.PI / 3 / aspect, 0, 0, 0,
107
		0, Math.PI / 3, 0, 0,
107
		0, Math.PI / 3, 0, 0,

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

157
					matrix.rotateX(angle.x / 10),
157
					matrix.rotateX(angle.x / 10),
158
					matrix.translate(pos[0] + offset.x, pos[1] + offset.y, pos[2] + offset.z),
158
					matrix.translate(pos[0] + offset.x, pos[1] + offset.y, pos[2] + offset.z),
159
					view,
159
					view,
160
					matrix.persective(Math.PI / 3, aspect)
160
					matrix.perspective(Math.PI / 3, aspect)
161
				);
161
				);
162
			}
162
			}
163
			var t = transform([0.0, 0.0, 2]);
163
			var t = transform([0.0, 0.0, 2]);