I want to create a seamless transition between two background colors using Framer.js
I have tried below code which moves the white square 500px and then when it reaches the end it switch instantly to "red". No smooth transition of the color.
Any ideas on how to solve this?
layerA=new Layer()
layerA.states.add
first: {backgroundColor:"#ffffff"}
layerA.states.add
second: {backgroundColor:"red",x:500}
layerA.states.switchInstant("first")
layerA.states.switch("second")
State is a wrapper for Animation, and Image is not supported in Animation.
You can animate layer manually.
or make invisible layer, change state of layer and observe position of layer like
layer.on "change:x", (e)->
but undocumentated feature is used carefully