[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, 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的更多相关文章
- [GIF] GIF Loop Coder - Interpolation
This video discusses the default interpolation in GIF Loop Coder, and four distinct ways to change t ...
- [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 - Introduction
Introducing the program, GIF Loop Coder, which allows you to make looping animated gifs (and other t ...
- [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 ...
- [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] 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 ...
- [GIF] GIF Loop Coder - Animating with Arrays
In this lesson, we discuss animating using arrays, and how different data types are interpolated whi ...
- 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 ...
随机推荐
- CXF之七 传输文件
CXF的文件传输通过MTOM实现.MTOM(SOAP Message Transmission Optimization Mechanism)SOAP消息传输优化机制,可以在SOAP消息中发送二进制数 ...
- IOS CAShapeLayer CAGradientLayer UIBezierPath 使用实例
CGRect rect = CGRectMake(100, 100, 100, 100); UIView * bgView = [[UIView alloc]initWithFrame:rect]; ...
- LoadRunner学习记录--Flights打开空白页的问题
从网上查了一下,原因是PERL5LIB这个环境变量的原因. 担心修改环境变量会影响ORACLE的运行 在WebTour中修改run.bat 增加 set PERL5LIB=D:\oracle\pr ...
- Gridview数据导出到ExcelWord 防止出现乱码
1.页面中添加绿色字体代码<%@ Page Language="C#" CodeFile="111.aspx.cs" Inherits="111 ...
- Linux学习笔记:CentOS安装MySQL
[1]安装版本: 1.1 CentOS-7-x86_64-Everything-1503-01 1.2 MySQL-5.6.27-1.linux_glibc2.5.x86_64.rpm-bund ...
- bzoj 2959 长跑(LCT+BCC+并查集)
[题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=2959 [题意] n个点,提供操作:连边,修改点权,查询自定义边的方向后起点a终点b能经 ...
- oc_转_构造对象的方法,以及类的继承
一.构造方法 (一)构造方法的调用 完整的创建一个可用的对象:Person *p=[Person new]; New方法的内部会分别调用两个方法来完成2件事情: 1) 使用alloc方法来分配存储空间 ...
- Eclipse与tomcat服务器建立关联
首先,点击 打开preference,打开如下界面 点击ADD,进入如下界面,选择tomcat服务器的版本->点击next 进入如下界面,Name:服务器名字,directory:服务器目录 补 ...
- Java集合排序(看完秒懂)
比如将一个List<Student>排序,则有两种方式: 1:Student实现Comparable接口: 2:给排序方法传递一个Comparator参数: 请看下面的举例: Studen ...
- coco2d-x 纹理研究
转自:http://blog.csdn.net/qq51931373/article/details/9119161 1.通常情况下用PVR格式的文件来进行图片显示的时候,在运行速度和内存消耗方面都要 ...