GithubHelp home page GithubHelp logo

danielrapp / noisy Goto Github PK

View Code? Open in Web Editor NEW
688.0 688.0 38.0 134 KB

A jQuery plugin that adds random noise to the background of a given element.

License: MIT License

HTML 11.90% JavaScript 88.10%

noisy's People

Contributors

andreiglingeanu avatar bengt avatar bomberstudios avatar christiancook avatar danielrapp avatar dcneiner avatar ericbock avatar gcheung55 avatar joyvuu-dave avatar kyleamathews avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

noisy's Issues

Destroys gradients

Used with a gradient, the gradient disappears.

I'm using -webkit-linear-gradient(right bottom,#FAFAFA 46%,#DFE2F0 58%,#FAFAFA 87%) , with a basic animation:

    $(function () {
            var $fieldset = $('fieldset'),
                width = $fieldset.width();

            jQuery.fx.interval = 180;
            (function(){
                    $fieldset.css({backgroundPosition: 0});
                    $fieldset.animate({ backgroundPosition: width}, 40000, arguments.callee);
            }());
    });

When noisy is enabled (any settings), the gradient disappears; all you see is noise.

Doesn't work on images

When attributed to an image, like so:
$('img')[0].noisy();

It should add a noisy foreground to the image.

Hangs with intensities < 1

Noisy will hang and consume as much CPU circles, as a available for intensities < 1 on certain sizes. Firefox (15) will ask to stop the script, Chrome (22) will sometimes notice for unresponsive tabs an offer to stop it, sometimes Chrome will just keep the script running till the tab is closed. Opera (12) also just keeps going, until the tab is closed.

I isolated this as a minimal test case:

<html>
    <body>
        <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
        <script src="http://cdnjs.cloudflare.com/ajax/libs/noisy/1.1/jquery.noisy.min.js"></script>
        <script>
            $('body').noisy({
                'intensity' : 0.234,
                'size' : 100,
                'opacity' : 0.123,
                'fallback' : '',
                'monochrome' : true
            }).css('background-color', '#eaeaea');
        </script>
    </body>
</html>

I ran these tests to isolate intensity as the cause:

'size' : 99 hangs
'size' : 100 works
'size' : 101 hangs
'size' : 99 , 'intensity : '1.0 works
'size' : 100 , 'intensity' : '1.0 works
'size' : 101, 'intensity' : '1.0 works
'size' : 99, 'opacity : '1.0 hangs
'size' : 100, 'opacity : '1.0 works
'size' : 101, 'opacity : '1.0 hangs

JS error in IE 8: Object doesn't support this property or method

This from IE 8 when viewing http://rappdaniel.com/other/noisy-sample/ and my own local test page.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
Timestamp: Wed, 9 Mar 2011 06:01:33 UTC

Message: Object doesn't support this property or method
Line: 125
Char: 12
Code: 0

URI: http://rappdaniel.com/other/noisy-sample/

This is running on a Windows 7 VM in VMware Fusion. The issue is that IE tries to execute the canvas.getContext function and then dies instead of pressing on to use the fallback image.

Use with excanvas.js?

Would it be possible to use this in conjunction with excanvas.js for IE? I've loaded excanvas but Noisy doesn't seem to notice. (It may be because of the other issue I just logged where the plugin isn't making it past line 6 in IE.)

Background image w/ no-repeat

Hey,

Is there any way to use Noisy on an element which already has a background image, set to no-repeat? Noisy just inherits the no-repeat.

Thanks!

Update source at cloudflare.com

Could you please update the javascript at the cdn link provided in the readme.md file?

Link:

cdnjs.cloudflare.com/ajax/libs/noisy/1.1/jquery.noisy.min.js

The latest version of jQuery doesn't support .browser anymore, so the c.browser.msie part is causing an error.

Error in Firefox 6.0.1

In Firefox 6.0.1, I get a "Security Error" on line 1 of jquery.noisy-min.js. My code is just this:

$('body').noisy({
        'intensity' : 1, 
        'size' : 200, 
        'opacity' : 0.114, 
        'fallback' : '', 
        'monochrome' : false
}).css('background-color', '#bece62');

Appending background-image

Just a matter of curiosity:

Why did you append $(this).css('background-image') to the background-image property at this line? I think it's causing an error on IE8 when applying the fallback image.

Great plugin, by the way :)

Animate mode

It would be excellent to have animated mode where it can create a few images and rotate between them, kind of like the demo when you move the slider

No license specified.

What license is this released under? MIT, BSD, public domain? Might use it in a project and it's of concern.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.