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

Support access for nested elements #3

Open
Milchreis opened this issue Oct 20, 2020 · 0 comments
Open

Support access for nested elements #3

Milchreis opened this issue Oct 20, 2020 · 0 comments

Comments

@Milchreis
Copy link
Owner

Milchreis commented Oct 20, 2020

The following code is not working, because the access for nested objects is not supported.

const myShape = {
  pos: {
    x: 100,
    y: 100
  }
}

p5.tween.manager.addTween(myShape).addMotion('pos.x', 10, 1000)

Possible solution:
https://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-and-arays-by-string-path

@Milchreis Milchreis changed the title Access nested elements by string Support access for nested elements Oct 21, 2020
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

No branches or pull requests

1 participant