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; var ctx; var config = { sparkFreq: 1, meanSparkSize: 0.012, meanSparkLife: 200, meanSparkVelocity: [ 2, 6 ], sparkSizeVariation: 5, sparkBlink: 10, // Lower is more blink floorHeight: 0.15 }; var resize = window.resize = function() { canvas.height = document.body.offsetHeight; canvas.width = document.body.offsetWidth; }; window.onload = function() { canvas = document.getElementById('canvas'); ctx = canvas.getContext('2d'); resize(); config.meanSparkSize = canvas.width*config.meanSparkSize; var fire = new Fire(ctx, canvas, canvas.height-canvas.height*config.floorHeight, config); var loop = function() { window.requestAnimFrame(loop); ctx.clearRect(0, 0, canvas.width, canvas.height); fire.update(); for (var i=0; i
CSS
html,body { background: #222; padding: 0; margin: 0; } canvas { width: 100%; height: 100%; max-height: 600px } .padded { background: #111; padding: 0 10%; }
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