You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to do something like this:
new jaws.Sprite({color: [150, 150, 150, 255]})
Instead of:
new jaws.Sprite({color: "red"})
So that I am able to make alterations to this colour upon game events, e.g. collision with another object.
The only information the docs gives is this: http://jawsjs.com/docs/symbols/jaws.Sprite.html#color
in Field Detail:
{string|gradient} color
If set, draws a rectangle of dimensions rect() with specified color or gradient (linear or radial)
Which isn't very helpful because it doesn't describe the syntax to use to specify a color or gradient.
I'm struggling to work out from the jaws source code how an RGBA colour could be described. How might I address this problem?
The text was updated successfully, but these errors were encountered:
I want to be able to do something like this:
new jaws.Sprite({color: [150, 150, 150, 255]})
Instead of:
new jaws.Sprite({color: "red"})
So that I am able to make alterations to this colour upon game events, e.g. collision with another object.
The only information the docs gives is this:
http://jawsjs.com/docs/symbols/jaws.Sprite.html#color
in Field Detail:
{string|gradient} color
If set, draws a rectangle of dimensions rect() with specified color or gradient (linear or radial)
Which isn't very helpful because it doesn't describe the syntax to use to specify a color or gradient.
I'm struggling to work out from the jaws source code how an RGBA colour could be described. How might I address this problem?
The text was updated successfully, but these errors were encountered: