Expected behavior
To be fair, the docs for the Spline component do not list this feature. In the examples, the points attribute is always statically assigned. I expected a function to work as well since this dynamic way of doing things was introduced somewhere else in the docs. And indeed, it does work fine even though the warning shows up.
Package versions:
core: 3.14.1
two: 3.14.2
ui: 3.14.2
vitePlugin: 3.14.1
Context
I need to set up the points dynamically in my custom component MathFunction (extending a Spline) that allows me to draw mathematical functions. The user is then able to do something like this:
Describe the bug When specifying a function to evaluate the points for a spline, we get the warning:
due to
https://github.com/motion-canvas/motion-canvas/blob/6c9bbfe8e6a45a60975beada15256be93b5d65b3/packages/2d/src/lib/components/Spline.ts#L119-L128
To Reproduce Dummy code snippet:
Expected behavior To be fair, the docs for the
Spline
component do not list this feature. In the examples, thepoints
attribute is always statically assigned. I expected a function to work as well since this dynamic way of doing things was introduced somewhere else in the docs. And indeed, it does work fine even though the warning shows up.Package versions:
Context I need to set up the points dynamically in my custom component
MathFunction
(extending aSpline
) that allows me to draw mathematical functions. The user is then able to do something like this: