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. ylbtech-SubwayNav(地铁线路导航)-数据库设计

    ylbtech-DatabaseDesgin:ylbtech-SubwayNav(地铁线路导航)-数据库设计 DatabaseName:SubwayNav(地铁线路导航) Type:线路导航 1.A, ...

  2. 对delegate进行扩展 打造通用的"计时完成"方法 z

    让用户尽量少打字 每次让用户输入这么多信息的确很糟糕, 可以改进一下设计: 服务器IP和用户名可以存放在配置文件里面, 初始化的时候默认加载到相应的文本框中; 从安全角度考虑, 密码必须经过用户手动输 ...

  3. again

    建立一个IPC连接: net use \\192.168.0.5\ipc$ "123456" /u:administrator

  4. The Bookcase

    题意: 有n本宽w高h的书,向三层书架上放,每层不能为空,求占用的整体的最小面积(总高度*三层中最宽的) 分析: 不太好想,dp[i][j]表示第一层宽度为i第二层为j放的最小高度 dp[i][j]= ...

  5. IOS 弹出式 POPMenuView

    //MenuView.h   // //  MenuView.h //  RockPopMenu // //  Created by zhuang chaoxiao on 14-6-26. //  C ...

  6. Windows套接字Socket函数

    1.使用套接字函数之前,先要加载套接字函数库: #include "Winsock2.h" #pragma comment(lib,"Ws2_32.lib") ...

  7. Myeclipse8.5 svn插件安装两种方式

    第一种方式:(亲测成功)第一步:准备插件包:site-1.6.18.zip解压该包里面有features和plugins文件夹,删除该包里面的xml结尾的文件. 第二:我的Myeclipse8.5安装 ...

  8. vi--文本编辑常用快捷键之复制-粘贴-替换-删除

    这几天刚开始接触vi编辑器,慢慢开始熟悉vi,但是还是感觉诸多不便,比如说复制粘贴删除操作不能用鼠标总是感觉不自在,而且我一般习惯用方向键移动光标,更增加了操作的复杂度,今天在网上搜索了一下,vim编 ...

  9. <Stackoverflow> 声望和节制

    什么是声望(reputation)?我是怎样获得(或失去)它的? 声望是一种粗略的测量,用来表示社区对你的信任度.通过让别人相信你知道自己正在讨论什么来获得.对网站的基本使用,包括问一个问题,回答,建 ...

  10. Unity中的单实例

    static GUIManager myInstance; public static GUIManager Instance { get { if (myInstance == null) myIn ...