P5.js using P2D and WebGL primitives

I have a sketch that uses straightforward draws and text boxes. I now want to add a 3D drawing. Evidently WebGL will break my current code.

I only have one 3D drawing which can be in a separate area. Can I have two different canvases, using P2D and WebGL. Alternately, how does one change the P2D code to be WebGL compatible?