html5 WebGL酷炫网页动画特效

html5 WebGL酷炫网页动画特效-精品资源网
html5 WebGL酷炫网页动画特效
此内容为免费资源,请登录后查看
0
免费资源

html5 WebGL酷炫网页动画特效

6款html5 WebGL酷炫网页动画特效,结合TweenMax、Three.js创建形状,打造出各种动画效果都十分的好看。

js代码

				<script type=\"x-shader/x-vertex\" id=\"wrapVertexShader\">
					attribute float size;
					attribute vec3 color;
					varying vec3 vColor;
					void main() {
						vColor = color;
						vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
						gl_PointSize = size * ( 350.0 / - mvPosition.z );
						gl_Position = projectionMatrix * mvPosition;
					}
				</script>
				<script type=\"x-shader/x-fragment\" id=\"wrapFragmentShader\">
					varying vec3 vColor;
					uniform sampler2D texture;
					void main(){
						vec4 textureColor = texture2D( texture, gl_PointCoord );
						if ( textureColor.a < 0.3 ) discard;
						vec4 color = vec4(vColor.xyz, 1.0) * textureColor;
						gl_FragColor = color;
					}
				</script>

		<script src=\"js/three.min.js\"></script>
		<script src=\"js/TweenMax.min.js\"></script>

© 版权声明
THE END
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容