The author tests this method by projecting a checkerboard pattern onto a cube, progressively increasing the number of subdivisions to achieve a smoother appearance. At around 512 subdivisions, the result closely resembles a flat surface, demonstrating successful image projection without rasterization. The article highlights the efficiency of using SVG `defs` to avoid image repetition, resulting in a compact file size. The author expresses enthusiasm for further developing the 3D renderer, emphasizing its potential for creating 3D SVG artifacts on GitHub to facilitate circuit board reviews in pull requests.
Key takeaways:
- The author developed a vanilla 3D object to SVG renderer in Typescript to render circuit boards with approximately-correct perspective transformations.
- SVGs do not natively support perspective transforms, so the author explored alternative methods, such as subdividing images and applying affine transformations to each subdivision.
- By increasing the number of subdivisions, the author achieved a smoother appearance without rasterization, using up to 512 images and clip paths.
- The method allows for efficient SVG file sizes by using the
defs
element to avoid repeating images, making it suitable for reviewing circuit board changes in GitHub pull requests.