Hacker News new | ask | show | jobs
by m-a-t-t-i 371 days ago
Interesting, I've been doing 3D SVG by storing the xyz-coordinates in a separate array and using inlined javascript to calculate & refresh the 2D coordinates of the SVG items themselves after rotation. But this means that the file only works in a browser. Maybe it could be possible to replace the javascript with native functions, so the same file would work everywhere.
1 comments

How do you transform paths? Do you just transform the control points?
Yeah, paths are saved in an array where each path segment is a list of control points coupled with the corresponding path command (M, L, C). Those can be used to recreate the path item.