hydra-p5
hydra-p5 copied to clipboard
WEBGL mode does not work?
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()