Open SpongeJr opened 8 years ago
On Safari I'm seeing slightly different but still weird behavior. I get the error undefined is not an object (evaluating 'v.color.toRGB(e,t,r)')
immediately after navigating to the program. Commenting out then uncommenting colorMode(HSB)
fixes the problem until reloading.
Just did some testing to find the root of the issue, namely that fill()
, stroke()
, and color()
cannot have a negative first parameter when colorMode
is HSB. This isn't a live editor issue, but a bug with processing.js as I was able to reproduce it on several other websites which use processing.js.
This same bug was previously documented in #261.
Reported on ZenDesk... User is getting
Cannot read property 0 of undefined!
only after a restart in this program: https://www.khanacademy.org/computer-programming/new-program/6028718145 reproduced, confirmed... they're saying it's happening as a result ofcolorMode(HSB);
on line 68, commenting it out fixes it... I can confirm this as well and have reproduced in both Chrome and Firefox.Browser console reveals that the error is occurring here (in the minified code, see commented line). This definitely seems to go along with the thought that
colorMode(HSB)
has something to do with it.https://cdn.kastatic.org/genfiles/javascript/en/scratchpads-exec-pjs-package-e05176.js line 1190
I don't have any simpler code for reproduction yet than the learner's project, will update if that changes.