Open kevinschaich opened 1 year ago
Yeah, you'd use dot notation. Not somewhere where I can cough up a mini example but check out the docs. They show how to target an arbitrary JavaScript object and animate its properties. But I believe you'd target a.b and then set c to whatever values/keyframes.
For right now since we couldn't find any example code, I decided to just "flatten" my object to make the top-level keys strings:
const myObject = {
'a.b.c': 1000
}
and in anime:
anime({
targets: myObject,
'a.b.c': 2000,
...
})
Let me know if anyone has a better way!
Never rEaLlY used this library, but just looking at what is said here then wouldnt it just be.....
anime({
targets: myObject.a.b,
'c': 2000,
...
})
e.g. I have:
Can I somehow tell anime that I want 'c' to change? via dot notation
a.b.c
or similar?