[GIF] GIF Loop Coder - Animation Functions
Previous, we animate the item by passing an array to tell the start position and end position.
To make thing more interesting, we actually can pass the function instead of array.
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: function(t){
return + Math.cos(t * Math.PI * ) * ;
},
y: function(t){
return + Math.sin(t * Math.PI * ) * ;
},
radius :
})
}
Create Multi circle by for loop:
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: for(var i = ; i < ; i += ){
list.addCircle({
x: function(t){
return + Math.cos(t * Math.PI * ) * ;
},
y: function(t){
return + Math.sin(t * Math.PI * ) * ;
},
radius :,
phase: i /
})
} }
To make thing even more interesting, we can set different x and y start point:
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: for(var i = ; i < ; i += ){
list.addCircle({
thisI: i, // custom prop to save i
x: function(t){
return this.thisI + Math.cos(t * Math.PI * ) * ;
},
y: function(t){
return this.thisI + Math.sin(t * Math.PI * ) * ;
},
radius :,
phase: i /
})
} }
We create 'thisI' to save i for addCircle to avoid common javascript problem.
[GIF] GIF Loop Coder - Animation Functions的更多相关文章
- [GIF] GIF Loop Coder - Interpolation
This video discusses the default interpolation in GIF Loop Coder, and four distinct ways to change t ...
- [GIF] GIF Loop Coder - Introduction
Introducing the program, GIF Loop Coder, which allows you to make looping animated gifs (and other t ...
- [GIF] The Phase Property in GIF Loop Coder
In this lesson, we look at one of the most powerful features in GIF Loop Coder, the phase property, ...
- [GIF] Shape Objects in GIF Loop Coder
This lesson is a quick tour of the predefined shape objects in GIF Loop Coder. function onGLC(glc) { ...
- [GIF] Colors in GIF Loop Coder
In this lesson we cover the different methods for defining and animating colors in GIF Loop Coder. f ...
- [GIF] GIF Loop Coder Single Mode
We'll take a look at Single Mode animations and strategies for making this type of animation smoothl ...
- [GIF] GIF Loop Coder - Animating with Arrays
In this lesson, we discuss animating using arrays, and how different data types are interpolated whi ...
- [GIF] Parenting in GIF Loop Coder
In this lesson, we look at how you can build up complex animations by assigning one shape as the par ...
- Framework for Graphics Animation and Compositing Operations
FIELD OF THE DISCLOSURE The subject matter of the present disclosure relates to a framework for hand ...
随机推荐
- NRE
NRE是Non-Recurring Engineering的缩写,NRE费用即一次性工程费用,是指集成电路生产成本中非经常性发生的开支,明确地说就是新的集成电路产品的研制开发费·新产品开发过程中的设计 ...
- 1uboot移植要点[原创☆☆]
----- 一:我们先来了解下实际内存: nand.nor.ram. 所以从CPU是从那部分启动的呢? 答:要看主控芯片的boot如何设置(正如分的启动方式和下载方式一样). uboot:sd卡→iR ...
- Server.MapPath()目录详解
最近在做相关的开发,碰到了Server.MapPath(),顺便来温习一下 Server.MapPath()获取网站的目录详解 ./当前目录 /网站主目录 ../上层目录 ~/网站虚拟目录 如果当前 ...
- 应付发票审批 Hold and Release Names
(N) AP > Setup > Invoice > Hold and Release Names 这里一般默认就可以了.Use the Invoice Hold and Relea ...
- v2ex上100个话题
V2EX 是创意工作者们的社区. 这里目前汇聚了超过 110,000 名主要来自互联网行业.游戏行业和媒体行业的创意工作者. V2EX在华人IT圈占有举足轻重的地位. 近来闲的蛋疼,按照4个不同的指标 ...
- Hibernate级联操作
cascade属性的可能值有 all: 所有情况下均进行关联操作,即save-update和delete. none: 所有情况下均不进行关联操作.这是默认值. save-update: 在执行sav ...
- [POJ 2019] Cornfields
Cornfields Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 5516 Accepted: 2714 Descri ...
- jquery 创建 SVG DOM 的处理方法
使用的是 createElement 方法 这个是无法生成SVG DOM的 可以使用下方的方法生成 var svgns = "http://www.w3.org/2000/svg" ...
- Android开发视频学习(1)
S01E02_搭建Android开发环境 设置ANDROID_SDK_HOME环境变量,用于指定Android模拟器的目录,官方文档没有说要设置. S01E03_Android创世纪 Android根 ...
- 使用haproxy做负载均衡时保持客户端真实的IP
haproxy里添加设置项 option forwardfor option httpclose apache的日志格式修改 LogFormat "MY IP=%{X-Forwarded-F ...