I am trying to achieve mouseOver effect like this.
I am able to generate c
I Solved the problem. Problem was with not updating vertices value to the original on mouseout event. to revert vertices value to original question i have to keep extra value of vertices like this.
var l = {
x: Math.floor(i % c) * 284,
y: Math.floor(i / c) * 284,
x2: Math.floor(i % c) * 284,
y2: Math.floor(i / c) * 284,
};
On mouseover change the vertice value like this for every coordinate
TweenMax.to(p1, .3, {
x: p1.x2 + d,
y: p1.y2 - d,
ease: Back.easeOut
})
and on mouseout reset original position
TweenMax.to(p2, .3, {
x: p2.x,
y: p2.y,
ease: Back.easeOut
})