Skip to content

Commit

Permalink
Merge pull request #175 from Rizina/feat/add-more-missing-factory-met…
Browse files Browse the repository at this point in the history
…hods

feat: added missing factory methods
  • Loading branch information
twlite authored Oct 31, 2023
2 parents ce8800b + 31310fc commit a5ba71c
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions src/assets/TemplateFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,5 +589,66 @@ export const TemplateFactory = {
}
]
};
}),
JokeOverHead: createTemplate((image: ImageSource) => {
return {
steps: [
{
preprocess(_canvas, ctx) {
ctx.globalCompositeOperation = 'color';
ctx.fillStyle = 'black';
ctx.fillRect(0, 0, 425, 404);
}
},
{
image: [
{
source: new TemplateImage(image),
x: 125,
y: 130,
width: 140,
height: 135
}
]
},
{
image: [
{
source: new TemplateImage(ImageFactory.JOKEOVERHEAD),
x: 0,
y: 0,
width: 425,
height: 404
}
]
}
]
};
}),
Delete: createTemplate((image: ImageSource) => {
return {
steps: [
{
image: [
{
source: new TemplateImage(ImageFactory.DELETE),
x: 0,
y: 0
}
]
},
{
image: [
{
source: new TemplateImage(image),
x: 120,
y: 135,
width: 195,
height: 195
}
]
}
]
};
})
};

0 comments on commit a5ba71c

Please sign in to comment.