Open
Description
Increasing Access
Unsure
Most appropriate sub-area of p5.js?
- AccessibilityColorCore/Environment/RenderingDataDOMEventsImageIOMathTypographyUtilitiesWebGLBuild ProcessUnit TestingInternalizationFriendly ErrorsOther (specify if possible)
Feature enhancement details
Currently the image()
function doesn't support 3D coordinate system, only 2D. I have found myself using a helper function like this very often when I had needed a 3D coordinate support:
function image3d(img, x, y, z) {
push()
translate(x + width / 2, y + height / 2, z)
texture(img)
noStroke()
plane(img.width, img.height)
pop()
}
I feel it is a very simple yet useful enhancement to add, as discussed with @davepagurek earlier.
Thank you!
Metadata
Metadata
Assignees
Type
Projects
Status
Features Don't Work in All Contexts
Activity
welcome commentedon Nov 16, 2022
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
davepagurek commentedon Nov 16, 2022
Thanks for filing this issue! I think it makes a lot of sense, especially since most other p5 methods let you specify a z coordinate when you go from 2D to 3D.
I think the biggest challenge in implementing this will be in reading the arguments list properly. I think the new method signature would be:
I think it should still be unambiguous to parse it out though since we're just adding one new optional number in the start (adding two would probably make clashes the longer form of
image()
.)