Laur's blog
  • Home
  • About
  • Support my work
Sign in Subscribe

lua

A collection of 2 posts
Fade colors in Corona using Transitions
corona-sdk

Fade colors in Corona using Transitions

Corona provides transitions. According to this post, a transitionTo(...) would suffice: local rect = display.newRect(50,50,100,100) rect:setFillColor(0,0,0,0) transition.to( rect.fill, { r=1, g=1, b=1, a=1, time=500, transition=easing.inCubic } ) The user can also cancel the transition if
Mar 11, 2018 2 min read
Fade Colors on a Polygon using the Game Loop
color

Fade Colors on a Polygon using the Game Loop

One of the features I need to implement is to smoothly change the fill/stroke color of a polygon, like this: A manual approach In order to better understand the mechanics, I built my own fading PoC. First, one would need to build the polygon: hud = display.newGroup() -- Build
Mar 11, 2018 2 min read
Page 1 of 1
Laur's blog © 2025
  • Sign up
Powered by Ghost