gsap+svg实现变色蠕虫蠕动动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap+svg实现变色蠕虫蠕动动画效果代码

代码标签: gsap svg 变色 蠕虫 蠕动 动画

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

<!DOCTYPE html>
<html lang="en" >

<head>
 
<meta charset="UTF-8">

 
 
 
<style>
body
{
 
background-color: #121314;
 
overflow: hidden;
 
text-align:center;
 
display: flex;
 
align-items: center;
 
justify-content: center;
}

body
,
html
{
 
height: 100%;
 
width: 100%;
 
margin: 0;
 
padding: 0;
}

svg
{
 
width: 100%;
 
height: 100%;
 
visibility: hidden;
 
}

circle
{
       
mix-blend-mode: multiply;
}
</style>

 
 
</head>

<body >
 
<svg id="mainSVG" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
<defs>
               
<filter id="goo">
                       
<feGaussianBlur in="SourceGraphic" stdDeviation="7" result="blur" />
                       
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 21 -8"
                                                                                 
result="cm" />
                       
<feBlend />
               
</filter>      
 
<filter id="plastic"  color-interpolation-filters="sRGB" filterUnits="objectBoundingBox" x="-1000%" y="-1000%" width="3000%" height="3000%">
   
<feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur"/>
   
<feSpecularLighting in="blur" surfaceScale="5" specularConstant="0.75" specularExponent="218" result="specOut" lighting-color="white">
     
<fePointLight x="5000" y="10000" z="20000"/>
   
</feSpecularLighting>

   
<feComposite in="SourceGraphic" in2="specOut2" operator="arithmetic" k1="0" k2="1" k3="1" k4="0" result="litPaint" />
 
</filter>            
       
           
<linearGradient id="grad" x1="150" y1="200" x2="450" y2="200" gradientUnits="userSpaceOnUse">

   
</linearGradient>.........完整代码请登录后点击上方下载按钮下载查看

网友评论0