Skip to content

Commit

Permalink
increase version to v1.5.0, update glMatrix from 2.3.2 to 3.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
theMK2k committed May 24, 2023
1 parent b02d56e commit 162cb67
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 22 deletions.
2 changes: 2 additions & 0 deletions DONE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
- rename extlink2 to extlink (also: options, README.md, bigbox3d.config.json.example)
- vertically center the loading div

- updated gl-matrix 2.3.2 to 3.4.3

## v1.4.0

- show loading counter, e.g. "loading... (3 / 6)"
Expand Down
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# TODO

- create an interactive demo site (maybe also a config generator?)

- investigate normal mapping
- <https://dev.to/ndesmic/webgl-engine-from-scratch-15-normal-maps-3227>
- <http://olegon.github.io/html5-webgl-normalmapping/>
Expand Down
22 changes: 11 additions & 11 deletions bigbox3d.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* BIG BOX 3D v1.4.0
* BIG BOX 3D v1.5.0
* ©2023 Jörg "MK2k" Sonntag
*/

Expand Down Expand Up @@ -96,9 +96,9 @@ const texturen = new Array();

let allLoaded = false;

let mvMatrix = mat4.create();
let mvMatrix = glMatrix.mat4.create();
const mvMatrixStack = [];
const pMatrix = mat4.create();
const pMatrix = glMatrix.mat4.create();

let vertBuffer = null;
let coordBuffer = null;
Expand Down Expand Up @@ -459,8 +459,8 @@ function initTexture(sFilename, textures) {
}

function mvPushMatrix() {
const copy = mat4.create();
mat4.copy(copy, mvMatrix);
const copy = glMatrix.mat4.create();
glMatrix.mat4.copy(copy, mvMatrix);
mvMatrixStack.push(copy);
}

Expand Down Expand Up @@ -671,21 +671,21 @@ function drawScene() {

//gl.uniform2fv(scalelocation, [2, 2]);

mat4.perspective(
glMatrix.mat4.perspective(
pMatrix,
perspectiveAngle,
gl.viewportWidth / gl.viewportHeight,
0.1,
100.0
);

mat4.identity(mvMatrix);
glMatrix.mat4.identity(mvMatrix);

mat4.translate(mvMatrix, mvMatrix, [perspectiveX, perspectiveY, -5.0]);
glMatrix.mat4.translate(mvMatrix, mvMatrix, [perspectiveX, perspectiveY, -5.0]);

mat4.rotate(mvMatrix, mvMatrix, degToRad(xRot), [1, 0, 0]);
mat4.rotate(mvMatrix, mvMatrix, degToRad(yRot), [0, 1, 0]);
mat4.rotate(mvMatrix, mvMatrix, degToRad(zRot), [0, 0, 0]);
glMatrix.mat4.rotate(mvMatrix, mvMatrix, degToRad(xRot), [1, 0, 0]);
glMatrix.mat4.rotate(mvMatrix, mvMatrix, degToRad(yRot), [0, 1, 0]);
glMatrix.mat4.rotate(mvMatrix, mvMatrix, degToRad(zRot), [0, 0, 0]);

setMatrixUniforms();

Expand Down
21 changes: 13 additions & 8 deletions gl-matrix-min.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

</head>
<body>

<div class="container">
<div class="row">
<div class="column" style="margin-top: 10%">
Expand Down Expand Up @@ -76,6 +75,5 @@ <h5>DOOM Mailorder</h5>
</div>
</div>
</div>

</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bigbox3d",
"version": "1.4.0",
"version": "1.5.0",
"description": "A 3D Big Box web viewer. Check out the Demo Site: <https://themk2k.github.io/bigbox3d/>.",
"main": "bigbox3d.js",
"scripts": {
Expand Down

0 comments on commit 162cb67

Please sign in to comment.