p5.tween icon indicating copy to clipboard operation
p5.tween copied to clipboard

Support access for nested elements

Open Milchreis opened this issue 5 years ago • 0 comments

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 avatar Oct 20 '20 09:10 Milchreis