Issue with a texture from createGraphics()

Hi everyone, I’m applying a texture in a box from a createGraphics() with a rotating sphere. When I’m doing this, the sphere on the texture starts to ‘dissapear’ (something similar when the background isn’t updated).

I’m I missing somenthing in my code?

let canvas1;
let n = 0.0;

function setup() {
  createCanvas(windowWidth, windowHeight, WEBGL);
  canvas1 = createGraphics(windowWidth, windowHeight, WEBGL);
}

function draw() {
  canvas1.background(0, 255);
  canvas1.rotateY(n);
  canvas1.sphere(250);
  
  background(128);
  orbitControl();
  texture(canvas1);
  box(500);
  n += 0.001;
}


Thanks!

Hi @d128,

I can’t say that I experience the disappearance you describe. This is what it looks like for me in Safari, Chrome, and Firefox on macOS.

Rotating sphere.