Skip to content

Commit

Permalink
Update p5.Geometry.js
Browse files Browse the repository at this point in the history
  • Loading branch information
perminder-17 authored Oct 26, 2023
1 parent df35dc0 commit f79a6f2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/webgl/p5.Geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import p5 from '../core/main';
* @param {function} [callback] function to call upon object instantiation.
*/
p5.Geometry = class Geometry {
constructor(detailX, detailY, callback){
//an array containing every vertex
//@type [p5.Vector]
constructor(detailX, detailY, callback) {
//an array containing every vertex
//@type [p5.Vector]
this.vertices = [];

//an array containing every vertex for stroke drawing
Expand Down Expand Up @@ -164,7 +164,7 @@ p5.Geometry = class Geometry {
}

_getFaceNormal(faceId) {
//This assumes that vA->vB->vC is a counter-clockwise ordering
//This assumes that vA->vB->vC is a counter-clockwise ordering
const face = this.faces[faceId];
const vA = this.vertices[face[0]];
const vB = this.vertices[face[1]];
Expand Down Expand Up @@ -249,7 +249,7 @@ p5.Geometry = class Geometry {
* @chainable
*/
averagePoleNormals() {
//average the north pole
//average the north pole
let sum = new p5.Vector(0, 0, 0);
for (let i = 0; i < this.detailX; i++) {
sum.add(this.vertexNormals[i]);
Expand Down Expand Up @@ -560,7 +560,7 @@ p5.Geometry = class Geometry {
*/
normalize() {
if (this.vertices.length > 0) {
// Find the corners of our bounding box
// Find the corners of our bounding box
const maxPosition = this.vertices[0].copy();
const minPosition = this.vertices[0].copy();

Expand Down

0 comments on commit f79a6f2

Please sign in to comment.