Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for objects as properties #833

Closed
wants to merge 4 commits into from

Conversation

OCA99
Copy link

@OCA99 OCA99 commented Nov 22, 2022

With this change, any object that defines both get() and set() methods that return and accept an animatable value (number or string) can be used as a property for a target.

This is useful as one may want to use custom setters and getters along with the anime library. In my case, I am using a custom reactive library in which observable values provide custom setters and getters in order to emit update events to observers in each animation step.

@juliangarnier
Copy link
Owner

Hey thank you for the PR, but this is too specific to a single (and rarely used) use case to be incorporated into the core.

Why not use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get instead ?

@OCA99 OCA99 closed this Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants