Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/castdrian/pkmn-screens
Pokémon screen image generator
https://github.com/castdrian/pkmn-screens
canvas hacktoberfest pkmn typescript
Last synced: 16 days ago
JSON representation
Pokémon screen image generator
- Host: GitHub
- URL: https://github.com/castdrian/pkmn-screens
- Owner: castdrian
- License: mit
- Created: 2021-06-03T10:52:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-12T10:18:46.000Z (over 2 years ago)
- Last Synced: 2024-10-06T15:48:55.639Z (about 1 month ago)
- Topics: canvas, hacktoberfest, pkmn, typescript
- Language: TypeScript
- Homepage:
- Size: 588 KB
- Stars: 8
- Watchers: 0
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pkmn-screens
Pokémon screen image generator## Install
Install pkmn-screens:
```
npm i pkmn-screens
```### Generate a summary
Static move screen
```ts
import { Sets } from '@pkmn/sets';
import { Screens } from 'pkmn-screens';//Pokémon Showdown! set
const set = Sets.importSet(
`Gekkouga (Greninja-Ash) (M) @ Choice Specs
Ability: Battle Bond
Level: 100
Shiny: Yes
Pokeball: Cherish Ball
EVs: 252 SpA / 4 SpD / 252 Spe
Timid Nature
- Hydro Pump
- Dark Pulse
- Water Shuriken
- Spikes
`);const buffer = await Screens.moves({ data: set, anim: false });
```Result:
![Summary](https://cdn.discordapp.com/attachments/715564004621418577/852590843357691977/summary.jpg)Animated move screen
```diff
import { Sets } from '@pkmn/sets';
import { Screens } from 'pkmn-screens';//Pokémon Showdown! set
const set = Sets.importSet(
`Yveltal @ Heavy-Duty Boots
Ability: Dark Aura
Level: 100
Shiny: Yes
EVs: 16 HP / 240 SpD / 252 Spe
Jolly Nature
- Knock Off
- Taunt
- Defog
- Roost
`);- const buffer = await Screens.moves({ data: set, anim: false });
+ const buffer = await Screens.moves({ data: set, anim: true });
```Result: https://i.imgur.com/snFal5k.gif
### Generate a party preview
Static party preview
```ts
import { summaryScreen, partyScreen } from 'pkmn-screens';//array of 6 sets
const buffer = await Screens.party({
data: team.map((s) => Sets.importSet(s)),
anim: false,
});
```Result:
![Party](https://cdn.discordapp.com/attachments/715564004621418577/852597065372532747/party.jpg)Animated party preview
```diff
import { summaryScreen, partyScreen } from 'pkmn-screens';//array of 6 sets
- const buffer = await Screens.party({
- data: team.map((s) => Sets.importSet(s)),
- anim: false,
- });
+ const buffer = await Screens.party({
+ data: team.map((s) => Sets.importSet(s)),
+ anim: true,
+ });
```Result: https://i.imgur.com/AtQ2bGK.gif
### Donations
Donations are gladly accepted. Please send them to my [Paypal.me](https://www.paypal.me/adrifcastr)
to support the development, and maintenance of this project. Thank you!### Credits
This project currently being owned and maintained by __castdrian.__