[GIF] GIF Loop Coder - Animating with Arrays
2024-08-26 16:30:53
In this lesson, we discuss animating using arrays, and how different data types are interpolated while animating.
function onGLC(glc) {
glc.loop();
// glc.size(400, 400);
// glc.setDuration(5);
// glc.setFPS(20);
// glc.setMode('single');
// glc.setEasing(false);
var list = glc.renderList,
width = glc.w,
height = glc.h,
color = glc.color; // your code goes here: /* list.addCircle({
x:width/2,
y:height/2,
radius:[100, 150],
fillStyle: ["green", "yellow"],
stroke: true,
strokeStyle: ["yellow", "red"],
lineWidth: [12, 20]
});*/ list.addRect({
x:width/,
y:height/,
w: [,],
h: [,],
fillStyle: ["rgba(120,5,140,0.8)", "#564121"],
stroke: [false,true],
lineWidth:
}); list.addText({
text: ["world", "Hello"]
}); list.addPath({
path: [
[,, ,, ,, ,],
[,, ,, ,, ,],
]
});
}
If you want smooth animation, the array can only have two params at this point, if you add more, then it looks like this:
function onGLC(glc) {
glc.loop();
// glc.size(400, 400);
// glc.setDuration(5);
// glc.setFPS(20);
// glc.setMode('single');
// glc.setEasing(false);
var list = glc.renderList,
width = glc.w,
height = glc.h,
color = glc.color; // your code goes here: list.addPoly({
x:width/,
y:height/,
radius: ,
sides: ,
fillStyle: ["red","green", "blue"]
})
}
最新文章
- 【腾讯Bugly干货分享】移动客户端中高效使用SQLite
- DPA 9.1.85 升级到DPA 10.0.352流程
- 快乐的JS正则表达式(三)
- LeetCode Dungeon Game
- Spring注解实例
- java 从String中匹配数字,并提取数字
- C# 汉子增加UTF-8头
- 高性能浏览器网络(High Performance Browser Networking) 第二章
- VR全景:720全景在线购物点亮你的眼球
- C#基础知识 简单说明泛型的优点
- Servlet之cookie处理
- http验证
- [Python Web]部署完网站需要做的基本后续工作
- (转)初学Git及简单搭建git服务器和客户端
- display设置弹性盒布局
- Cannot find wrapper assembly for type library ";ADODB";. in VS2017
- Java 持久化操作之 --XML
- 06: mysql索引查找原理及调优
- [Android] android.util.Log
- eCharts IE8兼容性问题