Skip to content

resizeCanvas resets the camera #6203

@RandomGamingDev

Description

@RandomGamingDev

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)

p5.js version

1.6.0

Web browser and version

Chrome 114.0.5735.110 (Official Build) (64-bit)

Operating System

Windows 10

Steps to reproduce this

Steps:

  1. Create a camera object
  2. Resize the canvas

Snippet:

function windowResized() {
  resizeCanvas(windowWidth, windowHeight);
}

let cam = createCamera(); // create a new camera instance with custom properties and then resize the window and it'll reset multiple of the camera's attributes like its position & rotation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    DONE! 🎉

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions