I'm working with three.js and the object is a mesh and with gsap animation the position. But I want to access to the mesh ( 3D object)
gsap.to( object3D.position, { duration: 10, motionPath: {
path: gsapPath,
type:'cubic',
},onUpdate: this.runGsap, onUpdateParams: [ object3D, this.startHSL, this.sizeHSL, 10 ]
})
I pass like parameter object3D in onUpdateParams but I think It isn't necessary. In this case with targets[0] I have the vectors of position.