Google News
logo
Anime.js - Interview Questions
What is the Line Drawing in Anime.js?
Creates path drawing animation using the 'stroke-dashoffset' property.

Set the path 'dash-offset' value with anime.setDashoffset() in a from to formated value.
strokeDashoffset: [anime.setDashoffset, 0]
Example : 
anime({
  targets: '.line-drawing-demo .lines path',
  strokeDashoffset: [anime.setDashoffset, 0],
  easing: 'easeInOutSine',
  duration: 1500,
  delay: function(el, i) { return i * 250 },
  direction: 'alternate',
  loop: true
});
Advertisement