Running Camera with buttons in p5.js

Hello, debugging the camera option in this sketch. 1) Why isn’t camera opening inside the canvas? 2) How can I make the buttons disappear when the camera opens on the canvas? https://editor.p5js.org/fullmotion/sketches/Kh1YLSfWI

Hi,

Actually running your code gives me this error in the console :

ReferenceError: nameP is not defined (sketch: line 95)

But after commenting, there’s also other missing variable declarations. Is it intentional?

Thanks for your reply. No, it’s not intentional, could you point out what I could enhance for it to work?
Thanks!

Well the code doesn’t work because you have undefined variables. Either delete them or initialize them.

Did you write the code? Because otherwise you would have wrote the variable definition yourself :wink: