Skip to content

3D Coordinate Compatibility in image() #5861

Open
@DenisovichDev

Description

Increasing Access

Unsure

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
  • Internalization
  • Friendly Errors
  • Other (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

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Features Don't Work in All Contexts

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions