We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm having trouble changing the colorMode to HSB in an instance. Writing colorMode(HSB) in a global scenario works just fine though. Any ideas?
var myp5 = new p5(function(p) {
var x = 100; var y = 100;
p.setup = function() { p.createCanvas(700, 410); p.colorMode(HSB); };
p.draw = function() { p.background(0); p.fill(20); p.rect(x,y,50,50); }; },'p5sketchEX');
Answers
sorry for the weird line spacing the line in question is p.colorMode(HSB,ex,ex,ex);
https://forum.Processing.org/two/discussion/8045/how-to-format-code-and-text
Since you're running under "instance mode", property HSB doesn't exist in the window's scope!
I believe you've meant
p.colorMode(p.HSB);
, right? ;;)awesome thanks!