Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Vanilla Vintage #10

Closed
jakiestfu opened this Issue · 8 comments

2 participants

@jakiestfu

What are your thoughts on removing jQuery dependency? Are there any lurking hurdles that would need to be taken into account, or is jQuery used for things like selectors and events?

(function() {
    myImage.addEventListener('click', (function () {
        vintage(this, {
            vignette: {
                black: 0.8,
                white: 0.2
            },
            noise: 20,
            screen: {
                red: 12,
                green: 75,
                blue: 153,
                strength: 0.3
            },
            desaturate: 0.05
        });
    });
})();
@rendro
Owner

I already thought about removing the jQuery dependency because it is only used for extending the options-objects and basic but I had no time to refractor the code. I think providing two versions would be nice, a jQuery dependent version as a plugin and a vanilla version if one wants to use it the good old way.

@jakiestfu

Well if a vanilla version was made, minimal code would be needed to make it jQyery compatible. If I have time later today, I'll have a go at it.

@rendro
Owner

See v1.1.0

@rendro rendro closed this
@jakiestfu

Badass, dude. Awesome work. What are your thoughts about creating presets that can be called via strings? Like recreating Instagram filters, I.e.

new Vintage(this, 'amaro');
@jakiestfu

My only reasoning for something like that is this is a dope ass repo that deserves more attention than it has received, and I feel something like this could help. Great work, again!

@rendro
Owner

Thanks.

Adding presets that can be called via strings is a nifty idea for the jquery version of the script. I'd rather prefer the vanilla version to stay as clean as possible.

But I would need help creating fancy filters :)

@jakiestfu
@rendro
Owner

I really like the idea of adding the presets before including the vintage.js script and create a small modular and extensible solution.


But I'd like to provide a jQuery version because it's included in many projects and the plugin overhead is quite small compared to the increased user base. There are still a lot of people out there that try to play around with javascript and start using jQuery. For every experienced developer the vanilla version will always be preferred (at least I hope so).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.