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的更多相关文章

  1. [GIF] GIF Loop Coder - Interpolation

    This video discusses the default interpolation in GIF Loop Coder, and four distinct ways to change t ...

  2. [GIF] GIF Loop Coder - Introduction

    Introducing the program, GIF Loop Coder, which allows you to make looping animated gifs (and other t ...

  3. [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, ...

  4. [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) { ...

  5. [GIF] Colors in GIF Loop Coder

    In this lesson we cover the different methods for defining and animating colors in GIF Loop Coder. f ...

  6. [GIF] GIF Loop Coder Single Mode

    We'll take a look at Single Mode animations and strategies for making this type of animation smoothl ...

  7. [GIF] GIF Loop Coder - Animating with Arrays

    In this lesson, we discuss animating using arrays, and how different data types are interpolated whi ...

  8. [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 ...

  9. Framework for Graphics Animation and Compositing Operations

    FIELD OF THE DISCLOSURE The subject matter of the present disclosure relates to a framework for hand ...

随机推荐

  1. 游戏文字自动断行需要,还得从 UTF-8 讲起

    UTF-8(8-bit Unicode Transformation Format)是一种针对Unicode的可变长度字符编码,也是一种前缀码. UTF-8使用一至六个字节为每个字符编码(尽管如此,2 ...

  2. easyui源码翻译1.32--ValidateBox(验证框)

    前言 使用$.fn.validatebox.defaults重写默认值对象.下载该插件翻译源码 validatebox(验证框)的设计目的是为了验证输入的表单字段是否有效.如果用户输入了无效的值,它将 ...

  3. easyui源码翻译1.32--Dialog(对话框窗口)

    前言 扩展自$.fn.window.defaults.使用$.fn.dialog.defaults重写默认值对象.下载该插件翻译源码 该对话框是一种特殊类型的窗口,它在顶部有一个工具栏,在底部有一个按 ...

  4. Windows 内核(WRK)编译

    引子 WRK 是微软于 2006 年针对教育和学术界开放的 Windows 内核的部分源码, WRK(Windows Research Kernel)也就是 Windows 研究内核, 在 WRK 中 ...

  5. CPU Benchmarks

    http://www.cpubenchmark.net/high_end_cpus.html 非常清楚~~~

  6. 虚函数表以及RTTI阅读(阅后焚)

    http://blog.csdn.net/haoel/article/details/1948051/ http://www.cnblogs.com/ustc11wj/archive/2012/08/ ...

  7. ActionBar官方教程(9)ActionBar的顶部tab模式(注意,已经被弃用)

    This interface is deprecated.Action bar navigation modes are deprecated and not supported by inline ...

  8. VS2010如何调试IIS上的网站

    通常,我们在Visual Studio里调试ASP.NET网站,都是加个断点,然后按F5,在VS自带的虚拟服务器下调试的.但有时候,VS自带的服务器弱爆了,无法满足一些特定情况的要求,我们必须把网站放 ...

  9. java 写的能够响应浏览器请求的 http 服务器

    这只是一个小Demo,话几十分钟搞出来的. 不废话先上代码. 首先是服务端的 package com.cnryb; import java.io.IOException; import java.io ...

  10. .9.png

    .9.png是一种非失真性压缩位图图形文件格式.PNG格式是非失真性压缩的,允许使用类似于GIF格式的调色板技术,支持真彩色图像,并具备阿尔法通道(半透明)等特性.现在有很多人使用PNG格式于互联网及 ...