Convert SVG paths from Adobe Illustrator to parametric p5.js/Processing code with full transform control.
- Upload an SVG file (drag & drop or click)
- Configure output options:
- Vector format (Vec/createVector/Processing)
- Language (JavaScript/TypeScript)
- Instance mode (for p5.js sketches)
- Coordinate multiplier & precision
- Download or copy generated code
transformConfig- Centralized transform settingsapplyTransform()- Applies all transformationsdrawAllPaths()- Calls all path functions
Each path exposes its transformed points in global scope and keeps a per-shape array for utility code:
let drawPath1_A;
let drawPath1_B;
let drawPath1Points = [];
function drawPath1(p) {
drawPath1_A = applyTransform(p.createVector(10, 20));
drawPath1_B = applyTransform(p.createVector(30, 40));
drawPath1Points = [drawPath1_A, drawPath1_B];
p.beginShape();
p.vertex(drawPath1_A.x, drawPath1_A.y);
p.vertex(drawPath1_B.x, drawPath1_B.y);
p.endShape(CLOSE);
}Modify any transformation via transformConfig:
transformConfig.preTranslateX = -50; // Center shape
transformConfig.scaleX = 2; // Scale 2x horizontally
transformConfig.rotation = Math.PI / 4; // Rotate 45°
transformConfig.translateX = 100; // PositionTransformations apply in order: preTranslate → scale → rotate → translate
MIT