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

Animation Manager #34

Open
kremsy opened this issue Mar 26, 2017 · 7 comments
Open

Animation Manager #34

kremsy opened this issue Mar 26, 2017 · 7 comments

Comments

@kremsy
Copy link

kremsy commented Mar 26, 2017

Would be cool if the Animation Manager of ManiaScript could be used somehow, some compatiblity to make the use very easy without programming ManiaScript would be amazing :D

@steeffeen-zz steeffeen-zz added this to the Script Features milestone Mar 26, 2017
@steeffeen-zz
Copy link
Owner

steeffeen-zz commented Mar 29, 2017

I definitely agree that an easy access to the animation manager would be great.
However, a generic solution seems to be very difficult. (Animations could definitely be integrated in the existing script features, e.g. Toggle eases the visibility instead of hard-toggling.)
Could you please tell me the most important features?

@kremsy
Copy link
Author

kremsy commented Mar 29, 2017

Have to think about important features, what I have in mind would be like animating quads in / out, the toggling as you said and whole frames.

@JocyW
Copy link
Contributor

JocyW commented Mar 29, 2017

I would find more important to be able to animate a translation in X/Y axis

@PRGfx
Copy link

PRGfx commented Mar 29, 2017

As the animation manager just takes the target-state xml wouldn't it be handy to have something like

$targetState = clone $myControl;
$targetState->setPosition(100, 0)->setOpacity(0);
$animationFeature = new AnimationFeature($myControl, $targetState, 0, 500, AnimationHandler::EaseInOutSine);
$myControl->addClickHandler($animationFeature);

I have pretty much no clue about your API but I had the impression that the structure would be somewhat like this.

When rendering the code for the feature you would then just render your targetState control in triple quotes and this should be pretty much generic? A notation as in my pseudo example would provide everything for the signature

Add (CMlControl Control, Text XmlTarget, Integer StartTime, Integer Duration, EAnimManagerEasing EasingFunc)

If features are animatable is then decided by the AnimManager.

@JocyW
Copy link
Contributor

JocyW commented Mar 29, 2017

I think this hardly would be a problem to implement. It gets more interesting when you want to have your animation be called on a custom event

@steeffeen-zz
Copy link
Owner

steeffeen-zz commented Mar 29, 2017

An issue appears when the PHP script re-sends/updates the manialink for some reason during the animation, in this case things will get messy: After the animation the PHP must send the target location to not reset the control to the start position.
I guess this situation might be rather rare and therefore the issue might not be critical?

@kremsy
Copy link
Author

kremsy commented Apr 5, 2017

I don't think this case would be that rare, it could easily happen, for Example if you make animations on a MapVeto Plugin where you animate the Maps out of the screen, and another map got vetoed out at same time it would stop. But on the other hand the map would be not on the screen than anyways, hard to say if this issue could make problems. Maybe @JocyW can think better of that problem.

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

4 participants