Managing Colors, Pattern and Zipper Images - Bumby-Wool/builder GitHub Wiki
This process is similar to adding a color but more complex. If you are not familar with adding and removing colors please read that documentation first.
- Upload the image to the bumbywool.com site and copy the URL link to that image ex. https://bumbywool.com/wp-content/uploads/2017/08/Adult-Sheepy.png
- Go to the color_patterns.json file
- Following the same steps as with the adding colors, except with the color_patterns.json file, copy an existing pattern object and paste it into the list as a new object.
- Modify the new object properties to be the values for your new pattern. You will need to use the Full Object Notation to set the imageUrl to the URL link you copied from the bumbywool.com site.
For more information on the pattern object properties see the Pattern Property Definition page
Not Recommended - Adding a pattern image directly into project
**This method is not recommended because the image's file sizes quickly use up the available bandwidth for this site's hosting**
### First Time Setup for Adding Patterns
You need to add the image you are using for the pattern into the GitHub repository. For this you need to "clone" the repository.
Click on the green `Code` button on GitHub and select `Open with GitHub Desktop`
> If you do not already have GitHub Desktop installed it will prompt you to download and install it. You should also sign-in to you GitHub account when you open GitHub Desktop for the first time.
1. Find the location on your laptop where you cloned the repo
> If you have no idea what that means please read the `First Time Setup for Adding Patterns` information just above
> If you don't remember where the files were placed you can find this by opening GitHub Desktop and choosing the "Open in file explorer option"
2. Add the image file into the `resources/patterns` folder
3. Open GitHub Desktop and it should have detected the new file(s) in the folder showing the files listed in the "Files Changed" section
4. Add a Summary, just a decription of what you added
5. Click the `Commit` button
6. Click `Push` button. If you miss this step the file(s) will not show up in GitHub.
7. Go to the [color_patterns.json](https://github.com/Bumby-Wool/builder/blob/main/color_patterns.json) file
8. Copy an existing pattern object and paste it into the list
9. Modify the object properties as explained bellow in the `Pattern Properties Explained` section making sure to set the imageUrl to the image that you added
10. Commit these changes
Follow the same steps as with the removing colors except using the color_patterns.json file instead of colors.json