Toggle navigation
Sign Up
Log In
Explore
Works
Folders
Tools
Collections
Artists
Groups
Groups
Topics
Tasks
Tasks
Jobs
Teams
Jobs
Recommendation
More Effects...
JS
var canvas,ctx,sita,bgr,tim,gtx,gty; (function(){ var grd; canvas = document.getElementsByTagName('canvas')[0]; ctx = canvas.getContext('2d'); canvas.width=canvas.height=400; sita=200; grd=ctx.createLinearGradient(0,0,0,sita); grd.addColorStop(0,"hsl("+155+",90%,10%)"); grd.addColorStop(1,"hsl("+155+",90%,50%)"); ctx.fillStyle=grd; ctx.fillRect(0,0,canvas.width,sita); grd=ctx.createLinearGradient(0,sita,0,canvas.height); grd.addColorStop(0,"hsl("+155+",90%,50%)"); grd.addColorStop(1,"hsl("+155+",90%,10%)"); ctx.fillStyle=grd; ctx.fillRect(0,sita,canvas.width,canvas.height); bgr=ctx.getImageData(0,0,canvas.width,canvas.height); baum(); })(); function baum(){ var a,b,c,max,tm; ctx.putImageData(bgr,0,0); tim=new Date().getTime()/300; tim+=Math.sin(tim/29)*20; gtx=(Math.sin(tim/7)+Math.sin(tim/11))*30; gty=(Math.sin(tim/17)+Math.sin(tim/19))/2+3; max=9; tm=tim/19+gty; b=tm%(1/max); for(a=0;a
0.6)lit=(1-nam)*2.5; ctx.fillStyle="hsla(222,45%,"+((50-nam*30)|0)+"%,"+lit+")"; ctx.beginPath(); for(a=20;a
400)a=400; ctx.lineTo(400,a); ctx.lineTo(0,a); ctx.fill(); a=1.005-nam; c=zoom/2; b=(a*a*40+40)|0; if(b%2==1)b++; e=(gtx)%(5); f=Math.floor(gtx/5); for(a=0;a
=mt.length-1)return; x3=Math.floor(x1); r1=x1-x3; r2=1-r1; d=mt[x3]*r2+mt[x3+1]*r1; y1=hei-d*hp; x3=Math.floor(x2); r1=x2-x3; r2=1-r1; d=mt[x3]*r2+mt[x3+1]*r1; y2=hei-d*hp; x1=(x1-70)/(mt.length-41)*canvas.width+200; x2=(x2-70)/(mt.length-41)*canvas.width+200; bake(x1,y1,x2,y2,c,xp,lit); } } function bake(sx,sy,ex,ey,s,n,lit){ var a,b,c,d,e,max,r1,r2,wid,hei,tx,ty,x,y,r,t, meme,kuti,ude,tuno,futo,kune,knr,knb; tx=(sx+ex)/2; ty=(sy+ey)/2; x=ex-sx; y=ey-sy; r=Math.atan2(y,x); wid=Math.pow(x*x+y*y,0.5)/2; max=40; t=(n+tim/7)%1; t*=4; t=t%2; if(t>1){ t=t-1; t*=2; t=1-t; if(t<0)t=0; } t=0.5+t/2; ctx.save(); ctx.translate(tx,ty); ctx.rotate(r); ctx.translate(-tx,-ty); hei=s*30*t; meme=n<4; a=n; if(a<7)kuti=1; if(a<3)kuti=2; ude=n<3; tuno=n<2; futo=1; if(n%9<1)futo=2; kune=(n%7<1); knr=15+(n%20); knb=0.5+(n%23)/23; if(tuno){ ctx.globalCompositeOperation="source-over"; ctx.fillStyle="rgba(233,211,115,"+lit+")"; ctx.beginPath(); e=hei*1.2; ctx.lineTo(tx,ty-e); ctx.lineTo(tx-wid/2,ty-hei*0.8); ctx.lineTo(tx+wid/2,ty-hei*0.8); ctx.fill(); } ctx.globalCompositeOperation="destination-out"; ctx.fillStyle="rgba(255,255,255,"+lit+")"; if(ude){ e=hei*0.3; f=wid*t*1.45; ctx.fillRect(tx-f,ty-e-f/6,f*2,f/3); ctx.beginPath(); ctx.arc(tx-f,ty-e,f/6,0,Math.PI*2,0); ctx.fill(); ctx.beginPath(); ctx.arc(tx+f,ty-e,f/6,0,Math.PI*2,0); ctx.fill(); } ctx.beginPath(); for(e=0;e
CSS
* { margin: 0; padding: 0; border: 0; background: #000 } canvas { position: relative; top:50%; left:50%; margin-left:-50vmin; width:100vmin; height:100vmin; overflow:hidden; display: block; }
HTML
Join Effecthub.com
Working with Global Gaming Artists and Developers!
Login
Sign Up
Or Login with Your Email Address:
Email
Password
Remember
Or Sign Up with Your Email Address:
Your Email
This field must contain a valid email
Set Password
Password should be at least 1 character
Stay informed via email