canvas多彩点随机自动喷绘动画效果代码
代码语言:html
所属分类:动画
代码描述:canvas多彩点随机自动喷绘动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
background: black;
}
</style>
</head>
<body >
<canvas id="canvas"></canvas>
<script >
/* eslint-disable no-new */
/* eslint-disable prettier/prettier */
const ctx = canvas.getContext("2d");
canvas.width = window.innerWidth
canvas.height = window.innerHeight
const width = canvas.width;
const height = canvas.height;
canvas.style.background = "#000";
canvas.style.filter = "blur(1px) ";
//canvas.style.filter = "blur(2px) contrast(20) brightness(0.8)";
// const types = ["red", "blue", "green", "yellow", "purple", "orange", "darkblue", "pink", "teal", "magenta", "cyan", "lime", "Chartreuse"];
const types=['red','green','blue', 'pink', 'cyan', 'magenta', 'yellow', 'black',
'white', 'orange', 'gray', 'brown', 'lime', 'purple', 'silver', 'navy', &.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0