three实现粒子波浪波纹动画效果代码
代码语言:html
所属分类:粒子
代码描述:three实现粒子波浪波纹动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html> <head> <style> body, .container, canvas { margin: 0; padding: 0; width: 100%; height: 100%; } canvas { display: block; background: black; } </style> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/three.88.js"></script> </head> <body > <div class="container"></div> <script id="vertex-shader" type="x-shader/x-vertex"> // // GLSL textureless classic 2D noise "cnoise", // with an RSL-style periodic variant "pnoise". // Author: Stefan Gustavson (stefan.gustavson@liu.se) // Version: 2011-08-22 // // Many thanks to Ian McEwan of Ashima Arts for the // ideas for permutation and gradient selection. // // Copyright (c) 2011 Stefan Gustavson. All rights reserved. // Distributed under the MIT license. See LICENSE file. // https://github.com/ashima/webgl-noise // vec4 mod289(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } vec4 permute(vec4 x) { return mod289(((x*34.0)+1.0)*x); } vec4 taylorInvSqrt(vec4 r) { return 1.7.........完整代码请登录后点击上方下载按钮下载查看
网友评论0