纯js canvas粒子发射器效果可修改参数
代码语言:html
所属分类:粒子
代码描述:纯js编写,canvas渲染,可修改粒子大小、延迟时间、距离等
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> /******************** Common ********************/ html, body { height: 100%; width: 100%; font-family: Helvetica, verdana, monospace; color: #FFFFFF; font-size: 100%; padding: 0; margin: 0; letter-spacing: 0.2rem; overflow: hidden; background: #000; } a { color: #FFF; text-decoration: none; } h1 { font-size: 1.6rem; } p { padding: 0.8rem 0; font-size: 0.8rem; } div#main { position: absolute; top: 0; left: 0; padding: 1.6rem; } /******************** Contents ********************/ canvas#canvas { background: #000; } div#controller { display: none; height: 100%; position: absolute; top: 0; right: 0; background: #0871BC; opacity: 0.9; overflow-y: scroll; z-index: 3; } div#controller > dl { padding: 0 1.6rem; } p#closeController { padding: 1.6rem; } p#openController { background: #0871BC; position: fixed; right: 0; left: 0; bottom: 1.6rem; margin: auto; width: 200px; text-align: center; z-index: 2; } </style> </head> <body translate="no"> <div id="contents"> <canvas id="canvas">This browser cannot use a canvas.</canvas> <p id="openController"><a href="#">修改参数</a></p> <div id="controller"> <p id.........完整代码请登录后点击上方下载按钮下载查看
网友评论0