trinketapp / processing.sk

Processing.js with skulpt sauce
10 stars 3 forks source link

color support #25

Closed brianpmarks closed 6 years ago

brianpmarks commented 6 years ago

We have a report about a trinket not working and I wonder if the issue stems from what is returned from color(). Looks like a <processing.color object> is returned in the skulpt version but an integer is returned using javascript. That integer can then be used in a comparison to a call to get().

Here's a trinket not working as expected or hoped for: https://trinket.io/python/639290008a

Here's a javascript version that does work: http://sketchpad.cc/sp/pad/view/tzeECLHyPa/rev.125

albertjan commented 6 years ago

Yeah you are right we'll have to make a special comparison for these I think.

albertjan commented 6 years ago

No we can just make color a function that return an int.