-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sprites): create sprites using sharp #2235
Conversation
blacha
commented
Jun 2, 2022
- feat(sprites): use sharp + mapbox to convert svg's into a sprite sheet
- feat(sprites): add cli
- feat(sprites): add example sprites
- feat: upgrade sharp to 0.30.x
- feat: optimise output file size
} | ||
|
||
protected onDefineParameters(): void { | ||
// Noop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just define the class variables above like private ratio:CommandIntegerListParameter
and define them in onDefineParameters():
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, because then they are undefined
since they are not defined in the constructor. I think its a strict null check setting setting in typescript
class Foo {
x: number;
y: number;
constructor(){
this.x = 1;
}
doSomething() {
this.x // number
this.y // number | undefined
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, that's why we always checking defined before using them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.