Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,68 @@ SpriteAI offers a range of powerful features to enhance your sprite creation and
1. **Sprite Generation**: Utilise `generateSprite(name, width, height)` to programmatically create new sprites.
2. **Sprite Loading**: Easily load existing sprites with `loadSprite(path)`.
3. **Sprite Saving**: Preserve your sprites using `saveSprite(sprite, path)`.
4. **Environment Sprite Generation**: Create environment tilesets with `generateEnvironmentSprites(description, options)`.
5. **Item Sprite Generation**: Generate item collections using `generateItemSprites(description, options)`.
6. **Animation State Fetching**: Retrieve available animation states with `fetchAvailableAnimationStates()`.
7. **Sprite Style Fetching**: Get available sprite styles using `fetchAvailableSpriteStyles()`.

## Advanced Techniques

SpriteAI is capable of much more than basic sprite operations. You can create intricate sprite animations, apply various transformations, and unlock a world of creative possibilities. Dive into our comprehensive API documentation to explore the full potential of SpriteAI.

### Generating Environment Sprites

To generate environment tilesets, you can use the `generateEnvironmentSprites` function. Here's an example:

```javascript
import { generateEnvironmentSprites } from 'spriteai';

const description = 'a fantasy forest';
const options = {
elements: 6,
size: '1024x1024',
style: 'pixel-art',
padding: 2,
theme: 'fantasy',
save: true
};

generateEnvironmentSprites(description, options)
.then(result => {
console.log('Environment sprites generated:', result.tileset);
})
.catch(error => {
console.error('Error generating environment sprites:', error);
});
```

### Generating Item Sprites

To generate item collections, you can use the `generateItemSprites` function. Here's an example:

```javascript
import { generateItemSprites } from 'spriteai';

const description = 'medieval weapons';
const options = {
itemCount: 8,
size: '1024x1024',
style: 'pixel-art',
padding: 2,
itemType: 'weapon',
background: 'transparent',
save: true
};

generateItemSprites(description, options)
.then(result => {
console.log('Item sprites generated:', result.itemSheet);
})
.catch(error => {
console.error('Error generating item sprites:', error);
});
```

## Next Steps

To truly master SpriteAI, we recommend:
Expand All @@ -68,6 +125,8 @@ To truly master SpriteAI, we recommend:
2. Experimenting with complex sprite animations
3. Applying different transformations to your sprites
4. Joining our community forums for tips and inspiration
5. Trying out the new environment and item sprite generation features
6. Exploring the available animation states and sprite styles

For in-depth information and advanced usage scenarios, please refer to our extensive API documentation.

Expand Down