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 was trying to dynamically construct a path with a for-in statement to emit the path commands, but I ran into a compiler error referencing #754. Is this due to a limitation in how paths are currently handled, or is it simply something that just hasn't been implemented yet?
Looking at the code for the path compiler, the only reason I can see is that the path segments seem to be constructed statically by the compiler itself, whereas using for loops may rely on runtime-dependent dynamic data.
The reason I'm making this post is because I was thinking of making an attempt to implement this feature myself, but I would like to get some insight from the maintainers first, since I am still new to this project and its codebase.
Maybe we could start with allowing hard-coded ranges (e.g. for i in [1, 2, 3]: LineTo{...}) where the number of emitted elements doesn't depend on dynamic data bindings? This would still be useful for generating e.g. background grids for a graph.
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
-
I was trying to dynamically construct a path with a
for
-in
statement to emit the path commands, but I ran into a compiler error referencing #754. Is this due to a limitation in how paths are currently handled, or is it simply something that just hasn't been implemented yet?Looking at the code for the path compiler, the only reason I can see is that the path segments seem to be constructed statically by the compiler itself, whereas using for loops may rely on runtime-dependent dynamic data.
The reason I'm making this post is because I was thinking of making an attempt to implement this feature myself, but I would like to get some insight from the maintainers first, since I am still new to this project and its codebase.
Maybe we could start with allowing hard-coded ranges (e.g.
for i in [1, 2, 3]: LineTo{...}
) where the number of emitted elements doesn't depend on dynamic data bindings? This would still be useful for generating e.g. background grids for a graph.Beta Was this translation helpful? Give feedback.
All reactions