canvas 实现火焰的简单方式

实现效果如下 实验方法: 1. 火焰的构造 // 构造火焰 function torch(){ // 构造出来的菱形的对角线一半的长度 this.width=random(18,30); this.maxWidth=this.width; // 火焰位置 if(mouse.x&&mouse.y){
posted @ 2020-05-03 17:09  JeanJY  阅读(548)  评论(0编辑  收藏  举报