hydra-p5 icon indicating copy to clipboard operation
hydra-p5 copied to clipboard

WEBGL mode does not work?

Open munshkr opened this issue 2 years ago • 0 comments

This works:

p = new P5({ mode: "WEBGL" })
p.hide()
s0.init({ src: p.canvas })

src(s0).out()

p.draw = () => {
    p.background(0);
    p.normalMaterial();
    p.push();
    p.rotateZ(p.frameCount * 0.01);
    p.rotateX(p.frameCount * 0.01);
    p.rotateY(p.frameCount * 0.01);
    p.box(70);
    p.pop();
}

but this doesnt:

p5src(s0, "WEBGL")
  .draw(p => {
    p.background(0);
    p.normalMaterial();
    p.push();
    p.rotateZ(p.frameCount * 0.01);
    p.rotateX(p.frameCount * 0.01);
    p.rotateY(p.frameCount * 0.01);
    p.box(70, 70, 70);
    p.pop();
  })
  .out()

munshkr avatar Oct 25 '22 00:10 munshkr