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

It could be possible trim path animations ? #2

Open
SergioEric opened this issue Nov 22, 2020 · 3 comments
Open

It could be possible trim path animations ? #2

SergioEric opened this issue Nov 22, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@SergioEric
Copy link

As a sample, we could see rive animation with trim path here

@aloisdeniel
Copy link
Owner

If I understand the concept well, it seems that animations are based on the lines drawn along the vector path.

Since the package only fills vector paths, It won't be possible to implement such a thing... :(

The only eventual solution I see would be clipping animations (from a growing path for example).

@aloisdeniel aloisdeniel added the enhancement New feature or request label Nov 23, 2020
@SergioEric
Copy link
Author

Check this

cliprect

To work as a design, it requires 2 vectors, Fill and Stroke !

The widget code is

// needs, height factor, 2 icons and 2 colors
Stack(
      alignment: Alignment.center,
      children: <Widget>[
        Opacity(
          opacity: 1 - value,
          child: Center(
            child: PathIcon(
              stroke,
              color: Color(0xffCA92F8),
              size: height,
            ),
          ),
        ),
        Positioned(
          bottom: 0,
          child: ClipRect(
            child: Align(
              alignment: Alignment.bottomCenter,
              heightFactor: value,
              child: PathIcon(
                fill,
                color: Color(0xffCA92F8),
                size: height,
              ),
            ),
          ),
        ),
      ],
    )

So, I think this could be a widget inside de package!

@aloisdeniel
Copy link
Owner

Yes ! By composing multiple icons you do several things ! :)

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

No branches or pull requests

2 participants