soulwire / sketch.js

Cross-Platform JavaScript Creative Coding Framework
MIT License
4.09k stars 431 forks source link

Only one color showing #79

Open laznuzzi opened 8 years ago

laznuzzi commented 8 years ago

Hi there,

This might be a really dumb question....but I've been tweaking the code and I can't seem to figure out how to make more than one color show up as you have shown it in the screenshot.

I assume there is an easy way since you already have the colors named with

var COLOURS = [ '#A7EBCA', '#FFFFFF', '#D8EBA7', '#868E80' ]; var radius = 0;

I was trying something like this (but it doesn't work):

if (mousePressed) { stroke(#67B2E8);

} else { stroke(0);

}

Thank you!

soulwire commented 8 years ago

I'm not quite sure what you mean. In the screen shot, that's showing the multitouch (use 2 fingers on a touch device and you should see more than 1 colour.) Or do you want to switch colours each time a mousedown happens?

laznuzzi commented 8 years ago

Oh! That's on a touch device! Pretty awesome. I wasn't aware. I do think it would be really cool to have a different color on mouse down but don't worry about it, I don't want to take your time :)

Thank you for replying to me and clarifying my question.

Nazarena On Fri, Dec 4, 2015 at 2:44 PM Justin Windle notifications@github.com wrote:

I'm not quite sure what you mean. In the screen shot, that's showing the multitouch (use 2 fingers on a touch device and you should see more than 1 colour.) Or do you want to switch colours each time a mousedown happens?

— Reply to this email directly or view it on GitHub https://github.com/soulwire/sketch.js/issues/79#issuecomment-162063513.