Samarium
It seems that issue with anchor and position of animation was fixed,
but I have one more question about the speed of animation.
I have something like this:
animations: new Timeline()
.add(1, ({ scale }) => [{
frameX: 0,
frameY: 1,
scale: [scale],
}], {
scale: {
from: 1,
to: 1.3,
}
})
.add(2, ({ scale }) => [{
frameX: 1,
frameY: 1,
scale: [scale],
}], {
scale: {
from: 1.3,
to: 1.5,
}
})
.add(3, ({ scale }) => [{
frameX: 3,
frameY: 1,
scale: [scale],
}], {
scale: {
from: 1.5,
to: 1.3,
}
})
.add(4, ({ scale }) => [{
frameX: 2,
frameY: 1,
scale: [scale],
}], {
scale: {
from: 1.3,
to: 1.2,
}
})
.create(),
And it looks like this: https://imgur.com/qS1cwGo
But I would want to speed up this animation, so I tried to decrease a duration like this:
animations: new Timeline()
.add(.5, ({ scale }) => [{
frameX: 0,
frameY: 1,
scale: [scale],
}], {
scale: {
from: 1,
to: 1.3,
}
})
.add(1, ({ scale }) => [{
frameX: 1,
frameY: 1,
scale: [scale],
}], {
scale: {
from: 1.3,
to: 1.5,
}
})
.add(1.5, ({ scale }) => [{
frameX: 3,
frameY: 1,
scale: [scale],
}], {
scale: {
from: 1.5,
to: 1.3,
}
})
.add(2, ({ scale }) => [{
frameX: 2,
frameY: 1,
scale: [scale],
}], {
scale: {
from: 1.3,
to: 1.2,
}
})
.create(),
but speed is the same no matter how I decrease duration.
Edit: I also tried to increase keyframes