Processing 练习(5)- Random bubbles fade out!!
来源:互联网 发布:淘宝先锋ss商家入口 编辑:程序博客网 时间:2024/06/04 21:22
代码:
int t = 0; void setup(){ size(500, 500); noStroke(); smooth(); background(0); frameRate(60);} void draw(){ fill(0, 1); rect(0, 0, width, height); // 通过不断叠加半透明的黑色矩形,使得所画图像不断变暗; if(t == 10){ // That's evey two seconds, 每到两秒触发画图。 popUpBubble(); t = 0; } else { t += 1; }} void popUpBubble(){ float diameter = random(1) * 195 + 5; float radious = diameter / 2.0; float x = random(width - radious); float y = random(height - radious); fill( 255 * random(0,1), 255 * random(0,1), 255 * random(0,1),100 ); arc(x, y, diameter, diameter, 0.0, PI*2);}
-----
0 0
- Processing 练习(5)- Random bubbles fade out!!
- Processing 练习(8)- 彩虹 - (HSB/Random/filter_BLUR)
- Processing 练习(10) - 条形码
- iOS: subview fade in and out
- cocos2dx之背景Fade in/out
- cocos2d-x中的opacity与Fade out
- fade
- fade
- Processing 练习(9)- 彩色二维码
- Axure RP Pro - jQuery - How to implement fade in and fade out effects
- android 屏幕保护程序--------Fade In 与 Fade Out 特效与运行线程
- Processing(1) - 练习
- Processing(2) - 练习
- Processing - 练习(3)"飞碟追踪" - (渐进、延迟效果)
- Processing 练习(6)- 模拟电磁场 - 三角函数应用
- Processing 练习(7)- 抽象空间_欣赏_000
- VC下简易实现窗体的淡入淡出效果(fade in-out for CDialog)
- Python练习15---random函数
- 锁·——lock关键字详解
- 如何查看ubuntu的内核版本和发行版本号?
- c和c++中NULL和0的区别
- 三星Remote Control开发遇到的坑
- yii2之登录表单
- Processing 练习(5)- Random bubbles fade out!!
- linux查看某个端口号的所有连接状态
- 数据挖掘概述
- 决策树
- Winform背景图片添加与图片大小自适应
- python统计日志ip
- OC实战: ARC 下使用 Block 实现链式语法
- python scrapy爬虫
- 超声波模块