sequence-paths
Create an array of sequential filenames between a provided range and with a consistent length of numerals.
Usage
sequencePaths( basePath, lastFrame, [extension, numLength, firstFrame] )
- String basePath the beginning of the file location
- Number lastFrame the number on the filename of the last frame, inclusive.
- String [extension] the file-extension, defaults to '.png'
- Number [numLength] the number of leading-zeros for numbers, defaults to 4
- Number [firstFrame] the first frame of the sequence, inclusive, defaults to 0
Basic usage:
var sequencePaths = ; ;//=> ['/images/intro-00000.jpg', …, '/images/intro-00016.jpg']
Customize the length of each number in the files string, here all numbers will be 2 characters long:
//=> ['/images/intro-00.jpg', …, '/images/intro-16.jpg']
Start the sequence on a frame number other than 0:
//=> ['/images/intro-017.jpg', …, '/images/intro-032.jpg']
License
MIT, see LICENSE.md for details.