-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
EaseFunction svg graphs in doc #17461
base: main
Are you sure you want to change the base?
EaseFunction svg graphs in doc #17461
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good idea. The documentation becomes massively more approachable when it's more than just type definitions; examples, tables, figures, all make it much nicer.
I do have a concern around needing to maintain this tool separately to bevy_math
. Perhaps it would be worth trying to refactor this into a proc-macro? Especially considering we're using the doc
attribute to just include the SVG string in the documentation anyway.
I like this idea, my only concern would be whether this would affect build time. |
Could use |
Will do! I'm assuming the |
https://doc.rust-lang.org/rustdoc/advanced-features.html
#[cfg_attr(doc, my_special_macro(...))] It'll only include |
After some experimentation, I don't think it'll be possible to use a proc-macro to generate the graphs. It'd require a cyclic dependency between the macro crate and |
Objective
The docs of
EaseFunction
don't visualize the different functions, requiring you to check out the Bevy repo and running theeasing_function
example.Solution
Showcase