diff --git a/src/webgl/GeometryBuilder.js b/src/webgl/GeometryBuilder.js index 6b7c96047c..f0cdee133b 100644 --- a/src/webgl/GeometryBuilder.js +++ b/src/webgl/GeometryBuilder.js @@ -46,6 +46,8 @@ class GeometryBuilder { * transformations. */ addGeometry(input) { + this.renderer.uMVMatrix = + this.renderer.uModelMatrix.multiply(this.renderer.uViewMatrix); this.hasTransform = !this.renderer.uMVMatrix.mat4 .every((v, i) => v === this.identityMatrix.mat4[i]); diff --git a/src/webgl/interaction.js b/src/webgl/interaction.js index d31101e8fc..4dbf0e07ed 100644 --- a/src/webgl/interaction.js +++ b/src/webgl/interaction.js @@ -686,7 +686,7 @@ p5.prototype._grid = function(size, numDivs, xOff, yOff, zOff) { this._renderer.curStrokeColor[1] * 255, this._renderer.curStrokeColor[2] * 255 ); - this._renderer.uMVMatrix.reset(); + this._renderer.uModelMatrix.reset(); // Lines along X axis for (let q = 0; q <= numDivs; q++) { @@ -733,7 +733,7 @@ p5.prototype._axesIcon = function(size, xOff, yOff, zOff) { return function() { this.push(); - this._renderer.uMVMatrix.reset(); + this._renderer.uModelMatrix.reset(); // X axis this.strokeWeight(2);