Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set default input values on any effect as an option #59

Closed
brianchirls opened this issue May 6, 2014 · 2 comments
Closed
Assignees
Labels

Comments

@brianchirls
Copy link
Owner

Every effect input has a default value, but it would be convenient to be able to override the defaults in case someone wants to make many nodes with the same value.

  • Passed as an option to the Seriously constructor:
    var seriously = new Seriously({
        defaults: {
            blur: {
                amount: 0.5
            },
            tvglitch: {
                lineSync: 0,
                verticalSync: 0
            }
    });
  • defaults method on the Seriously instance:
    seriously.defaults({
        color: {
            color: 'darkgrey',
            width: 960,
            height: 540
        },
        blend: {
            bottom: seriously.effect('color')
        }
    });

    // or...
    seriously.defaults('edge', {
        mode: 'frei-chan'
    });

Reset defaults to default defaults:

    seriously.defaults(null); // all effects, all fields
    seriously.defaults('edge', null); // just one effect, all fields
@brianchirls
Copy link
Owner Author

This is done for effects, but not for transforms. I'm not sure whether it makes sense for transforms.

Thoughts, anyone?

@brianchirls
Copy link
Owner Author

Implemented for transforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant