Skip to content

Commit cf26a66

Browse files
committed
style
1 parent 5b4c640 commit cf26a66

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

src/webgl/camera.js

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -276,19 +276,18 @@ p5.RendererGL.prototype.perspective = function(fovy, aspect, near, far) {
276276
*
277277
*/
278278

279-
p5.prototype.ortho = function(){
279+
p5.prototype.ortho = function() {
280280
this._renderer.ortho.apply(this._renderer, arguments);
281281
return this;
282282
};
283283

284284
p5.RendererGL.prototype.ortho = function(left, right, bottom, top, near, far) {
285-
286-
if(left === undefined) left = -this.width / 2;
287-
if(right === undefined) right = +this.width / 2;
288-
if(bottom === undefined) bottom = -this.height / 2;
289-
if(top === undefined) top = +this.height / 2;
290-
if(near === undefined) near = 0;
291-
if(far === undefined) far = Math.max(this.width, this.height);
285+
if (left === undefined) left = -this.width / 2;
286+
if (right === undefined) right = +this.width / 2;
287+
if (bottom === undefined) bottom = -this.height / 2;
288+
if (top === undefined) top = +this.height / 2;
289+
if (near === undefined) near = 0;
290+
if (far === undefined) far = Math.max(this.width, this.height);
292291

293292
var w = right - left;
294293
var h = top - bottom;
@@ -303,16 +302,14 @@ p5.RendererGL.prototype.ortho = function(left, right, bottom, top, near, far) {
303302
var tz = -(far + near) / d;
304303

305304
this.uPMatrix = p5.Matrix.identity();
306-
this.uPMatrix.set( x, 0, 0, 0,
307-
0, -y, 0, 0,
308-
0, 0, z, 0,
305+
306+
// prettier-ignore
307+
this.uPMatrix.set( x, 0, 0, 0,
308+
0, -y, 0, 0,
309+
0, 0, z, 0,
309310
tx, ty, tz, 1);
310311

311312
this._curCamera = 'custom';
312-
313313
};
314314

315-
316-
317-
318315
module.exports = p5;

0 commit comments

Comments
 (0)