Function animateToFile

  • Animate a sequence of frames in a loop at 24 frames per second, where each frame is a collection of polylines in specified colors. Writes the result as a SVG to the given file.

    Each frame in the input appears for 1/24th of a second.

    Each polyline is drawn with line segments that connect the adjacent pairs of points in its points array. It is drawn in its RGB color, which must be a [r,g,b] tuple of integers 0 <= r,g,b <= 255.

    Parameters

    • frames: Animation

      sequence of frames; each frame is a collection of polylines, and each polyline is a polygonal chain connecting points in order, drawn in RGB color

    • filename: string

      output filename, e.g. "example.html"

    Returns void