ProcessingJoy ——字母粒子效果【JAVA】
【摘要】
效果图
当鼠标点击后,粒子聚集显示字母
原图
代码和注释
粒子类 ball.pde
class Ball{ public PVector position; ...
效果图


代码和注释
粒子类 ball.pde
-
-
class Ball{
-
-
public PVector position;
-
public PVector target;
-
public PVector velocity;
-
public float stiff;
-
public float damp;
-
public float size;
-
-
Ball(float x, float y, int tarX, int tarY){
-
this.position = new PVector(x,y);
-
this.target = new PVector(tarX,tarY);
-
this.velocity = new PVector(0,0);
-
this.stiff = random(0.01,0.02);
-
this.damp = random(0.9,0.98);
-
this.size = ran
文章来源: panda1234lee.blog.csdn.net,作者:panda1234lee,版权归原作者所有,如需转载,请联系作者。
原文链接:panda1234lee.blog.csdn.net/article/details/112175801
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)