processing / processing/p5.js

Add an addFace function that adds a face to the current geometry object

Open
#8,019 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:WebGL Feature Request
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Increasing access

This would make is easier to make completely custom 3D objects, by adding a new means of doing so.

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)
Feature request details

The function could have two version. addFace(indices), which takes a list of indices for the vertices you want to add. And add addFace(vectors), which takes in a list of vectors and automatically figures out which indices those vectors should be replaced with and extends the internal list of vertices for the geometry if necessary. I really want the latter one because it requires the least thought for me. And it's not too hard to use a JS object to accomplish this, so don't complain to me about it requiring a search through a list. It does not require one. Just use a JS object. Also also, I want to be able to input 4 indices / vectos at a time, and it will automatically sort them and split the quad into 2 triangles. How should they be sorted? I dunno, just pick some arbitrary rule. I just want to be able to use the function.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The requested entry point is a new addFace function on the current WebGL geometry object; no file or test is named in the issue. First clarify the geometry API and how indexed and vector-based inputs should behave. Done would require an agreed behavior for four-vertex faces, including their triangulation, plus tests for the supported input forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.