Skip to content

Commit

Permalink
Patch that copies the 32x32 pattern to all quadrants when changing type.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thulinma committed Nov 29, 2020
1 parent 20cb03a commit db6e97b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ac-pattern-tool",
"version": "1.2.2",
"version": "1.2.3",
"description": "Pattern tool for ACNL, ACHHD and ACNH",
"main": "index.js",
"scripts": {
Expand Down
9 changes: 9 additions & 0 deletions src/libs/DrawingTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,16 @@ class DrawingTool{
get patternType(){return this.pattern.patternType;}
set patternType(n){
if (this.pattern.patternType != n){
let oldWidth = this.width;
this.pattern.patternType = n;
if (oldWidth < this.width){
//Copy the first 32x32 to the others
for (let pix = 0; pix < 1024; ++pix){
this.pixels[pix+1024] = this.pixels[pix];
this.pixels[pix+1024*2] = this.pixels[pix];
this.pixels[pix+1024*3] = this.pixels[pix];
}
}
this.pattern.fromPixels(this.pixels);
this.pattern.toPixels(this.pixels);
this.onLoad();
Expand Down
6 changes: 6 additions & 0 deletions src/pages/Updates.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
<div>
<h1>Changelog</h1>
<dl>
<dt>November 29, 2020</dt>
<dd>
<ul>
<li>Changing pattern type from 32x32 to 64x64 will now duplicate the pattern to all four quadrants, to make it easier to make shirts from converted images. This is a "quick and dirty" method to handle this until we add proper handling of pattern types when converting.</li>
</ul>
</dd>
<dt>November 8, 2020</dt>
<dd>
<ul>
Expand Down

0 comments on commit db6e97b

Please sign in to comment.