Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

done with issue #6383(problem of diagonal) #6487

Closed
wants to merge 1 commit into from

Conversation

perminder-17
Copy link
Contributor

@perminder-17 perminder-17 commented Oct 20, 2023

Resolves #6383

Screenshots of the change:
before:
cb16da5a-885c-4ff0-8985-9894201af624
after:
0ca14d82-2132-41f4-975e-7ae366ef785f

PR Checklist

@welcome
Copy link

welcome bot commented Oct 20, 2023

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

@perminder-17
Copy link
Contributor Author

@davepagurek is there any else to change in this pr? it's working fine as per requirment.

@@ -1575,7 +1575,7 @@ p5.RendererGL.prototype.quad = function(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4,
}
quadGeom
.computeNormals()
._makeTriangleEdges()
._makeQuadEdges()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on the implementation of this! I wonder if maybe instead of making it a method on p5.Geometry, we could just inline it here, since it only can be used for single-quad shapes like this? So that would be something like:

quadGeom.computeNormals();

const vertexOrder = [0, 2, 3, 1];
for (let i = 0; i < vertexOrder.length; i++) { /* etc */ }

quadGeom.edgesToVertices();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok @davepagurek doing the changes.

@perminder-17
Copy link
Contributor Author

perminder-17 commented Oct 20, 2023

@davepagurek i have made a new PR for this. #6488

@davepagurek
Copy link
Contributor

I'm closing this one for organizational purposes because we merged the other PR here: #6488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quad adds a diagonal line in WEBGL.
3 participants