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
})
}
}
}

最新文章

  1. pdf文件的导入导出
  2. Wireshark查看https的通讯
  3. --自动创建备份SQL
  4. C的文件操作2
  5. 添加图片按钮-UI界面编辑器(SkinStudio)教程
  6. DNS map file in windows
  7. C#DataTable 的一些操作经常操作
  8. 学习笔记_过滤器详细_2(过滤器JavaWeb三大组件之一)
  9. 一篇文章让你彻底搞清楚Python中self的含义
  10. Tower Defense Game
  11. Jexus 5.8.3正式发布:Asp.Net Core在Linux上最友好服务器平台
  12. 基于VB中WINSOCK控件的网上象棋系统的实现
  13. mybatis整合spring获取配置文件信息出错
  14. Android-线程池下载多个图片并保存,如果本地有该图,则不下载,直接展示到view
  15. luogu P3980 [NOI2008]志愿者招募
  16. Charles配置问题
  17. 实现一个简单的flux
  18. aws.s3的 upload 和putObject有什么区别
  19. Stream(流)的基本操作
  20. ansible介绍与安装

热门文章

  1. Android 打勾显示输入的密码
  2. Android 模拟器中sdcard操作
  3. 转载:ofstream和ifstream详细用法
  4. MySql相关及如何删除MySql服务
  5. jenkins 命令行 CLI jenkins-cli.jar
  6. 我是面试官--&quot;自我介绍&quot;
  7. Creating Help Pages for ASP.NET Web API -摘自网络
  8. 安装 RabbitMQ C#使用-摘自网络(包括RabbitMQ的配置)
  9. Linux 获取文件时间信息 判断文件是否存在
  10. 栈的简单应用 HDU 1022 http://acm.hdu.edu.cn/showproblem.php?pid=1022