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
docs: convert examples to AnimationPlayer #618
base: main
Are you sure you want to change the base?
Conversation
40b6cd4
to
b873137
Compare
ℹ️ I've converted a few more banner AnimationPlayer-s into fiddles, intend to look into implementing hiding of the fiddle UI / editor for them. |
I converted this PR to a draft instead of labeling it as a "work in progress" The relevant Discord message:
|
ℹ️ this needs a rebase now. Here's what needs to be done for this PR to be considered complete:
|
d87fca1
to
57953a4
Compare
@aarthificial I've reset all changes previously made to Additionally, I'd love your input on some issues that I've encountered:
|
Following up on my previous comment, another issue worth pointing our is that highlighting of individual rows is gone. One example is this https://motioncanvas.io/docs/signals#complex-example: after converting it to AnimationEditor, the lines will no longer be highlighted. |
The missing highlighting could then be fixed with the "code only" mode. I'm currently working on a documentation page that requires some of these Fiddle features and I'm in the process of implementing them. |
@aarthificial some tiny progress update on this:
I've cleaned up the
After enabling There's something about proportions in other examples too, see another screenshot below (though maybe even this happens to all example - I still intend to check all of them). So I think they will need adjustments too.
Make sense, I'll work on a new one.
The description (e.g. "The effects of a particular easing function can be visualised...") to the example in question, as well as the example itself demonstrates only the Now that you mention a select box to choose the timing function (via By all I am thinking of specifically this list (got it by looking at functions that return a value of
Maybe I am jumping too far ahead, but in case we want to have all functions added to given AnimationPlayer instance of Tweening page, then there's another question/suggestion:
I think doing this could help improve the API reference rich with examples of usage of individual functions, while the "Docs" section could focus more on the aspects of discovery and education of basic principles. Wdyt? |
The examples were made using a 1920x1080 canvas.
I'm assuming that
I think the list you've mentioned is ok.
I think we should start by including them all in the handwritten docs. We don't include fiddles in the In the future, I think it would be ideal to add some sort of ```ts editor template=circle
yield* circle().scale(1, 1);
``` could result in: export default makeScene2D(function* (view) {
const circle= createRef<Circle>();
view.add(<Circle ref={circle} size={140} fill="#e13238" />);
yield* circle().scale(1, 1);
}); But this may be out of the scope of this PR. |
Also, update misc arrow values
This is an attempt to replace a single instance of AnimationPlayer with an interactive player with editor. The goal is to discuss it and see if this is desired and/or viable approach, and if yes, what are some major visual differences, such that could be a blocker for converting other instances of AnimationPlayer.
Notable visual differences:
Before:
After: