updated js to include demo animation with polylines