Closed saadkkhan closed 8 years ago
Segment only accept a single path
element, so you need to create a Segment instance for each of them. A simple example:
// Getting the elements
var s = document.getElementById("s");
var shield = document.getElementById("shield");
// Creating Segment instances
var segmentS = new Segment(s);
var segmentShield = new Segment(shield);
If you have more elements, consider handle them with loops and a proper data structure, like Arrays.
I have more than one path which i want to animate with TimelineLite plugin. How can i add more paths in the following:
var s = document.getElementById("s"), // shield = document.getElementById('shield'), segment = new Segment(s);