First, thank you for creating this mockup generation tool! It's a great project and I appreciate the work you've put into it.
Problem Description
I'm experiencing issues with artwork scaling and mask mapping in the mockup generation process:
Current Issues
Inconsistent Scaling
Artwork files with different dimensions (4000x4065 vs 612x612) produce vastly different results
Some patterns scale up dramatically and cover the entire canvas instead of the mask area
Hardcoded perspective transform coordinates don't adapt to different image sizes
Mask Mapping Problems
Patterns don't properly tile within the mask area
Single pattern instances stretch across the entire surface instead of repeating
Final output shows expanded patterns rather than properly tiled designs
Expected Behavior
Artwork patterns should tile/repeat properly within the mask area
Consistent results regardless of input image dimensions
Patterns should maintain original scale and not expand dramatically
Questions
Should artwork files be normalized to a specific size before processing?
How should perspective transform coordinates be calculated based on input dimensions?
What's the recommended approach for creating seamless repeating patterns within the mask area?
Any guidance on handling different image sizes and ensuring consistent mask mapping would be greatly appreciated!
My working repo: https://github.com/adeelfeb/mockup-generator