js实现随机色彩光束canvas爆炸动画效果代码

代码语言:html

所属分类:动画

代码描述:js实现随机色彩光束canvas爆炸动画效果代码

代码标签: 色彩 光束 canvas 爆炸 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<style>
    body {
	background: #000;
	overflow: hidden;	
}

canvas {
	display: block;	
}
</style>

</head>
<body>
<canvas id="c"></canvas>

<script >
    /*
	click to clear and change hue

	don't look at or judge this code
	I just kept tweaking values and
	adding random things in a messy way
	
	it's full of magic numbers
*/

var c,
	ctx,
	w,
	h,
	cx,
	cy,
	branches,
	startHue,
	tick;

function rand( min, max ) {
	return Math.random(.........完整代码请登录后点击上方下载按钮下载查看

网友评论0