Jump to content
GreenSock

GreenSock Docs

pipe()

Returns : *

Returns whatever the functions provided return.


pipe() is a method to help make passing values from function to function easier. Instead of having to manually chain animations and pass one's return value to the next's parameter, pipe() can do it for you. For example:

  1. var value1 = func1(input);
  2. var value2 = func2(value1);
  3. var output = func3(value2);
  4. var transfrom = gsap.utils.pipe(func1, func2, func3);
  5. var output = transform(input);
Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×