rendro/vintageJS

Vanilla Vintage

jakiestfu opened this issue · 8 comments

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
        });
    });
})();

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.

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.

See v1.1.0

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');

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!

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 :)

Think about it though. Cast away jQuery completely, that's a random luxury.
The code that I write aims to be as simple as possible, with or without
jQuery. I see no point in ever using jQuery unless it is truly needed, and
with that feature request in mind, I don't think it'd be needed at all.

A solution would be to add something like vintage.presets.js to your page
BEFORE adding vintage.js so that way it becomes this extensible (but
completely optional/separate) function of this rad code you've got!
Thoughts?

On Sunday, May 19, 2013, Robert Fleischmann wrote:

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 :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-18120319
.

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).