Am I trying to do something incorrect?
Also noticed the color() selector doesn’t occur on the “tween(2, tweentest, {fillColor = color(0, 233, 233, 255)})” line.
-- tween test
-- Use this function to perform your initial setup
function setup()
tweentest = {x = 100,y = 100, fillColor = color(206, 33, 33, 255), red = 206, green =33, blue = 33, alpha = 255}
-- uncommenting the following line causes an error.
--tween(2, tweentest, {fillColor = color(0, 233, 233, 255)})
tween(2, tweentest, {red = 0, green = 233, blue = 255, alpha = 255},{loop = tween.loop.pingpong})
tween(2,tweentest,{x = 600, y =300},{easing = tween.easing.linear, loop = tween.loop.pingpong})
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(19, 19, 187, 255)
stroke(255)
fill(tweentest.fillColor)
-- the following fill works
--fill(tweentest.red,tweentest.green,tweentest.blue,tweentest.alpha)
-- This sets the line thickness
strokeWidth(5)
ellipse(tweentest.x,tweentest.y,100)
-- Do your drawing here
end