-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Description
Most appropriate sub-area of p5.js?
- AccessibilityColorCore/Environment/RenderingDataDOMEventsImageIOMathTypographyUtilitiesWebGLBuild processUnit testingInternationalizationFriendly errorsOther (specify if possible)To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
p5.js version
1.11.7
Web browser and version
Chrome 136.0.7103.93
Operating system
MacOS
Steps to reproduce this
Steps:
- Try creating a custom
buildGeometry()
shape using points - They appear for 1 frame (if using
clear()
orbackground()
then go poof - Not an issue if rendering
line()
orsphere()
Snippet:
FYI, was exploring buildGeometry()
for a faster point cloud when drawing the obj.computeFaces().vertices
as discussed here and wonder if it's intentional or a bug that point()
doesn't work?
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
davepagurek commentedon May 23, 2025
This one is intentional for now --
buildGeometry
generates a thing that you can draw in one go, but fundamentally points are drawn with a different shader than regular meshes, so for now that meansp5.Geometry
is for meshes only. (Similarly, switching shaders insidebuildGeometry
won't save either for the same reason.)I think if we want to support this, we might need to try merging points and strokes so that points can be stored alongside the other strokes on a
p5.Geometry
. We currently use a separate shader for points, and there are some aspects of strokes that currently would break if used for points (I think we assume that all strokes have >= 2 points when we convert strokes to meshes) so we'll need to update a few spots there too. If any contributors are interested in looking into how that might be done, let me know!