Minor visual improvements
This commit is contained in:
parent
0307759a8d
commit
4752146630
|
@ -410,6 +410,7 @@ async function init() {
|
||||||
gl.enable( gl.POLYGON_SMOOTH );
|
gl.enable( gl.POLYGON_SMOOTH );
|
||||||
gl.hint( gl.LINE_SMOOTH_HINT, gl.NICEST );
|
gl.hint( gl.LINE_SMOOTH_HINT, gl.NICEST );
|
||||||
gl.hint( gl.POLYGON_SMOOTH_HINT, gl.NICEST )
|
gl.hint( gl.POLYGON_SMOOTH_HINT, gl.NICEST )
|
||||||
|
gl.lineWidth(3.0);
|
||||||
|
|
||||||
// start drawing
|
// start drawing
|
||||||
requestAnimationFrame(draw);
|
requestAnimationFrame(draw);
|
||||||
|
@ -480,7 +481,7 @@ async function draw() {
|
||||||
|
|
||||||
// Real Matrices
|
// Real Matrices
|
||||||
let realProjectionMatrix = [];
|
let realProjectionMatrix = [];
|
||||||
mat4BuildPerspective(realProjectionMatrix, 90.0 / 180.0 * Math.PI, cv.width / cv.height, 0.1, 30);
|
mat4BuildPerspective(realProjectionMatrix, 60.0 / 180.0 * Math.PI, cv.width / cv.height, 0.1, 30);
|
||||||
|
|
||||||
let realViewMatrix = [];
|
let realViewMatrix = [];
|
||||||
let realCameraPosition = [Math.cos(cameraYaw) * smoothCameraDistance * Math.cos(cameraPitch), Math.sin(cameraPitch) * smoothCameraDistance, Math.sin(cameraYaw) * smoothCameraDistance * Math.cos(cameraPitch)];
|
let realCameraPosition = [Math.cos(cameraYaw) * smoothCameraDistance * Math.cos(cameraPitch), Math.sin(cameraPitch) * smoothCameraDistance, Math.sin(cameraYaw) * smoothCameraDistance * Math.cos(cameraPitch)];
|
||||||
|
@ -506,7 +507,7 @@ async function draw() {
|
||||||
|
|
||||||
|
|
||||||
let virtualProjectionMatrix = [];
|
let virtualProjectionMatrix = [];
|
||||||
mat4BuildPerspective(virtualProjectionMatrix, 90.0 / 180.0 * Math.PI, cv.width / cv.height, 0.9, 5);
|
mat4BuildPerspective(virtualProjectionMatrix, 60.0 / 180.0 * Math.PI, cv.width / cv.height, 0.9, 5);
|
||||||
|
|
||||||
if (!invertZAxis) {
|
if (!invertZAxis) {
|
||||||
let zAxisFlipMatrix = [];
|
let zAxisFlipMatrix = [];
|
||||||
|
@ -541,15 +542,15 @@ async function draw() {
|
||||||
|
|
||||||
// interpolated projection matrix
|
// interpolated projection matrix
|
||||||
let virtualProjectionMatrix1 = [];
|
let virtualProjectionMatrix1 = [];
|
||||||
mat4BuildPerspective1(virtualProjectionMatrix1, 90.0 / 180.0 * Math.PI, cv.width / cv.height, 0.9, 5);
|
mat4BuildPerspective1(virtualProjectionMatrix1, 60.0 / 180.0 * Math.PI, cv.width / cv.height, 0.9, 5);
|
||||||
mat4Interpolate(virtualProjectionMatrix1, identity, virtualProjectionMatrix1, interpolate[2]);
|
mat4Interpolate(virtualProjectionMatrix1, identity, virtualProjectionMatrix1, interpolate[2]);
|
||||||
|
|
||||||
let virtualProjectionMatrix2 = [];
|
let virtualProjectionMatrix2 = [];
|
||||||
mat4BuildPerspective2(virtualProjectionMatrix2, 90.0 / 180.0 * Math.PI, cv.width / cv.height, 0.9, 5);
|
mat4BuildPerspective2(virtualProjectionMatrix2, 60.0 / 180.0 * Math.PI, cv.width / cv.height, 0.9, 5);
|
||||||
mat4Interpolate(virtualProjectionMatrix2, identity, virtualProjectionMatrix2, interpolate[3]);
|
mat4Interpolate(virtualProjectionMatrix2, identity, virtualProjectionMatrix2, interpolate[3]);
|
||||||
|
|
||||||
let virtualProjectionMatrix3 = [];
|
let virtualProjectionMatrix3 = [];
|
||||||
mat4BuildPerspective3(virtualProjectionMatrix3, 90.0 / 180.0 * Math.PI, cv.width / cv.height, 0.9, 5);
|
mat4BuildPerspective3(virtualProjectionMatrix3, 60.0 / 180.0 * Math.PI, cv.width / cv.height, 0.9, 5);
|
||||||
mat4Interpolate(virtualProjectionMatrix3, identity, virtualProjectionMatrix3, interpolate[4]);
|
mat4Interpolate(virtualProjectionMatrix3, identity, virtualProjectionMatrix3, interpolate[4]);
|
||||||
|
|
||||||
mat4Identity(virtualProjectionMatrix);
|
mat4Identity(virtualProjectionMatrix);
|
||||||
|
|
Loading…
Reference in New Issue