Skip to content

Setting 'property keyframes' inside keyframes property #700

Open
@pinoybai

Description

@pinoybai

Hi,

Is there a way to implement property keyframes within the keyframes propery in anime.js?

for example the below code works fine:

keyframes: [ {translateY: -40}, {translateX: 250}, {translateY: 40}, {translateX: 0}, {translateY: 0} ]

but I would like to add individual delay and duration and group theme into multiple transition like the below:

 keyframes:[
         {translateY: [

			{value: 40, duration: 1000, delay: 0},
                        {value: 90, duration: 600, delay: 1000}
	  ]},{translateY: [

			{value: -100, duration: 3000, delay: 1500}

	]}
]

The above code is not working.

Also it seems the example code in the documentation seems to have similar code, but it doesn't work.

https://animejs.com/documentation/#animationKeyframes

thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions