Skip to content

Transition to state with multiple timing/duration values #9

@d4tocchini

Description

@d4tocchini

for example, when transitioning via setState('selected', false, {dx: this.dx}) to state below, how can I animate Bg props with different timing functions than Text props? Is there a way to configure this in the state tree or a lower level API? I'm assuming nested states are not possible? I can imagine how to do manually in the pixel () render call but that's no fun! Considering falling back to rapidly setting multiple states in consecutive frame updates to coordinate the animation, but that feels kind of wrong too...

    ...
    selected:{
	duration:0.3,
	time:{fn:'ease',begin:0,end:10},
	to:{
		Text:{
			dx:0,
		},
		Icon:{
			dx:0,
		},
		Bg:{
			color:'#00000010',
			dx:0,
			selected:1,
		}
	}
     ...
},


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions