Skip to content
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

Merged
merged 6 commits into from
Jun 2, 2022
Merged

Conversation

blacha
Copy link
Member

@blacha 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

@blacha blacha marked this pull request as ready for review June 2, 2022 20:51
@blacha blacha requested a review from a team as a code owner June 2, 2022 20:51
}

protected onDefineParameters(): void {
// Noop
Copy link
Contributor

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.

Copy link
Member Author

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
  }

Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kodiakhq kodiakhq bot merged commit e7b6a9e into master Jun 2, 2022
@kodiakhq kodiakhq bot deleted the feat/sprite-maker branch June 2, 2022 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants