从绘图生成 GIF 并将其保存到文件中。
可以在 setup() 或任何绘图运行时的点调用 saveGif() 。
第一个参数,fileName,设置 GIF 的文件名。
第二个参数,duration,设置 GIF 的持续秒时间。
第三个参数options是可选的。如果一个对象通过了, saveGif() 将使用其属性来自定义 GIF。 saveGif() 识别属性delay、units、 silent, notificationDuration 和 notificationID。
示例
语法
saveGif(filename, duration, [options])
参数
filename
字符串:
GIF 文件名。
duration
数字:
从绘图中捕获的持续时间以秒为单位。
options
对象:
一个对象可以包含另外五个属性: delay,一个数字,指定录制前等待的时间; units,一个字符串,可以是“秒”或“帧”。默认为“秒”; silent,一个布尔定义进度通知的存在。默认为 false; notificationDuration,一个数字,定义最终通知的时长以秒为单位会活下去。默认情况下它是0,这意味着通知永远不会被删除; "notificationID,一个指定通知 DOM 的元素 id 的字符串。默认情况下它是'progressBar'。
This page is generated from the comments in src/image/loading_displaying.js . Please feel free to edit it and submit a pull request!