p5.EasyCam icon indicating copy to clipboard operation
p5.EasyCam copied to clipboard

Importing p5.js with threejs

Open Binary010100 opened this issue 3 years ago • 2 comments

Can I use this 3d camera with three.js?

Binary010100 avatar Dec 31 '20 13:12 Binary010100

Sort of. The EasyCam library at present is coupled with the p5js renderer. Perhaps it could be decoupled at some point in the future. Meanwhile, there is the option of overlaying two canvases and using the p5 EasyCam instance to dynamically inform the threejs camera within the update loop. Here's how: https://editor.p5js.org/jwdunn1/sketches/NxiklckeZ (Not perfect, but reasonable.)

jwdunn1 avatar Jan 01 '21 10:01 jwdunn1

Thank you so much !

Binary010100 avatar Jan 02 '21 13:01 Binary010100