You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to motion-canvas and I wanted to create an animation showing which part of the code is responsible for which part of the equation. On the LaTeX Motion Canvas doc I read that
In other words, opacity, position, size, etc. should be fine to tween, but we do not recommend tweening the tex signal.
But I am not sure what does tweening the tex signal means. Is it a warning about not changing the equation string inside the LaTeX object?
I tried a different approach to changing the opacity of a selected part of the equation and got a solution where I deleted the LaTeX object node from the hierarchy and add new LaTeX node with changed properties.
It's quite effective, but there is a delay between highlighting the code part and changing the LaTeX object to a new one. I wanted both things to happen simultaneously.
Also, I don't want to create a new LaTeX object every time because it is not good coding practice.
Furthermore, I tried to move tex().remove() and rect().add inside yield* all(...) but got an error.
Argument of type 'Latex' is not assignable to parameter of type 'ThreadGenerator'.
Type 'Latex' is missing the following properties from type 'Generator<void | ThreadGenerator | Promise<any> | Promisable<any>, void, any>': next, return, throw
Not sure what does that mean.
How should I do it? Is there any possibility, or should I abandon the idea of changing the LaTeX object?
My code below includes the solution for adding and removing nodes with LaTeX object.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I am new to motion-canvas and I wanted to create an animation showing which part of the code is responsible for which part of the equation. On the LaTeX Motion Canvas doc I read that
But I am not sure what does tweening the tex signal means. Is it a warning about not changing the equation string inside the LaTeX object?
I tried a different approach to changing the opacity of a selected part of the equation and got a solution where I deleted the LaTeX object node from the hierarchy and add new LaTeX node with changed properties.
It's quite effective, but there is a delay between highlighting the code part and changing the LaTeX object to a new one. I wanted both things to happen simultaneously.
Also, I don't want to create a new LaTeX object every time because it is not good coding practice.
Furthermore, I tried to move
tex().remove()
andrect().add
insideyield* all(...)
but got an error.Not sure what does that mean.
How should I do it? Is there any possibility, or should I abandon the idea of changing the LaTeX object?
My code below includes the solution for adding and removing nodes with LaTeX object.
Beta Was this translation helpful? Give feedback.
All reactions