Animate resolver #3321
-
|
Hi, I'm modifying the "animate" function in motion to create a usable copy for pixijs. I'd like to modify animate so that if a string is passed, that string is used to retrieve a pixijs element. Is there a parameter to "animate" that can be used for this purpose? For example: import { animate } from "motion";
animate("my_component_alias", {},
{
resolver: (alias) => {
return PixiJS.app.find(alias);
},
}
);(better) or another way to edit the associated items. This way I could also create functionality to dissociate an element from the animation import { animate } from "motion";
animate(["item1", "ite2", "item3"], {},
{
getElements: (items) =>
items.map((i) => PixiJS.app.find(i)),
}
); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
Hi @mattgperry, I don't want to push it, but this feature is the last thing I need to complete what I'm developing. I don't know if something like this already exists, but if not, I could contribute to its development. |
Beta Was this translation helpful? Give feedback.
So essentially you want this to resolve every frame? I’m almost certainly not going to implement something like that - it’d be a big change based on the current architecture. What you could look into perhaps is animating a Proxy that passes on the latest values to the latest resolved Pixi element?