In this lesson, we look at one of the most powerful features in GIF Loop Coder, the phase property, which allows you to let different objects run animations shifted in time.

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: glc.styles.backgroundColor = "black"; for(var i = 0; i < 1000; i++){ list.addCircle({
x: Math.random() * width,
y: Math.random() * height,
radius: [0.25,1],
fillStyle: "white",
phase: Math.random() + 10
})
} list.addText({
x: width / 2,
y: height / 2 + 20,
fontSize: [18, 24],
text: "Tecnotree Way of Work (WoW)",
fillStyle: ["white", "yellow"],
})
}

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: var res = 10;
for(var y = 0; y < height; y += res){
for(var x = 0; x < width; x +=res){
var dx = x - width / 2,
dy = y - height / 2,
dist = Math.sqrt(dx * dx+dy*dy); list.addCircle({
translationX: x,
translationY: y,
x: res / 2,
y: res / 2,
radius: res / 2,
fillStyle: ["red", "yellow"],
phase: -dist / 100
})
}
}
}

[GIF] The Phase Property in GIF Loop Coder的更多相关文章

  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] Shape Objects in GIF Loop Coder

    This lesson is a quick tour of the predefined shape objects in GIF Loop Coder. function onGLC(glc) { ...

  3. [GIF] Colors in GIF Loop Coder

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

  4. [GIF] GIF Loop Coder - Introduction

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

  5. [GIF] GIF Loop Coder - Animation Functions

    Previous, we animate the item by passing an array to tell the start position and end position. To ma ...

  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] 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 ...

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

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

  9. The Node.js Event Loop, Timers, and process.nextTick() Node.js事件循环,定时器和process.nextTick()

    个人翻译 原文:https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/ The Node.js Event Loop, Ti ...

随机推荐

  1. Vijos 1132 求二叉树的先序序列

    描述 给出一棵二叉树的中序与后序排列.求出它的先序排列.(约定树结点用不同的大写字母表示,长度≤8). 格式 输入格式 第一行为二叉树的中序序列 第二行为二叉树的后序序列 输出格式 一行,为二叉树的先 ...

  2. LXD 2.0 系列(二):安装与配置

    导读 简单来说,LXD是一个守护进程,为LXC容器的管理提供一组REST API.主要目标是提供一种类虚拟机的用户体验,是一种第三方的容器管理工具.下面呢,我们来介绍LXD 2.0 的安装与配置 安装 ...

  3. C#中的值类型(value type)与引用类型(reference type)的区别

    ylbtech- .NET-Basic:C#中的值类型与引用类型的区别 C#中的值类型(value type)与引用类型(reference type)的区别 1.A,相关概念返回顶部     C#中 ...

  4. User Agent

    Android: Mozilla/5.0 (Linux; U; Android 2.3.5; zh-cn; MI-ONE Plus Build/GINGERBREAD) AppleWebKit/533 ...

  5. Redrain个人维护并使用的DuiLib和UiLib库源码下载地址

    转载请说明原出处:http://blog.csdn.net/zhuhongshu/article/details/40740353,谢谢~~ 我把我自己使用的Duilib库和Uilib库都上传到了Gi ...

  6. ORA-15018: diskgroup cannot be created

    创建ASM磁盘组的时候出错,具体报错如下: SQL> create diskgroup kel external redundancy disk 'ORCL:KEL1','ORCL:KEL2'; ...

  7. 学习Python编程的11个资源

    用 Python 写代码并不难,事实上,它一直以来都是被声称为最容易学习的编程语言.如果你正打算学习 web 开发,Python 是一个不错的选择,甚至你想学游戏开发也可 以从 Python 开始,因 ...

  8. 最短路径算法(Dijkstra算法、Floyd-Warshall算法)

    最短路径算法具体的形式包括: 确定起点的最短路径问题:即已知起始结点,求最短路径的问题.适合使用Dijkstra算法. 确定终点的最短路径问题:即已知终结结点,求最短路径的问题.在无向图中,该问题与确 ...

  9. HDU4869:Turn the pokers(快速幂求逆元+组合数)

    题意: 给出n次翻转和m张牌,牌相同且一开始背面向上,输入n个数xi,表示xi张牌翻转,问最后得到的牌的情况的总数. 思路: 首先我们可以假设一开始牌背面状态为0,正面则为1,最后即是求ΣC(m,k) ...

  10. gdb 技巧

    现实数组: 比如说要显示a[10]中全部的内容用 p a显示的是地址,用p *a显示的是第一个元素显示全部或某一个:p (int [10])*a或者p *a@10 如果你使用 p *a@3 或 p * ...