From ee7589c9bd847aad50fb051f5823fd059ea7617d Mon Sep 17 00:00:00 2001 From: "dev-docs-github-app-dev[bot]" <178211755+dev-docs-github-app-dev[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 21:55:44 +0000 Subject: [PATCH] Update 2 files --- docs/getting-started.md | 140 +++++++++++++++++++++++++--------------- docs/index.md | 94 +++++++++++++++++++++++++++ 2 files changed, 182 insertions(+), 52 deletions(-) create mode 100644 docs/index.md diff --git a/docs/getting-started.md b/docs/getting-started.md index bb03851d..1b7f73e9 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,74 +1,110 @@ -# Getting Started with SpriteAI +# SpriteAI Documentation -Welcome to SpriteAI! This guide will walk you through the process of integrating the SpriteAI npm package into your projects. +## Overview -## Installation +SpriteAI is a powerful JavaScript library for AI-driven sprite and game asset generation. It provides developers with advanced tools to create, manipulate, and optimize sprite images using cutting-edge AI technologies. -To begin using SpriteAI, you'll need to install it in your project directory. Simply run the following command: +## Installation ```bash npm install spriteai ``` -## Basic Usage +## Core Modules + +### 1. Sprite Generation + +SpriteAI offers multiple sprite generation methods: + +- `generateSprite(description, options)`: Create sprite sheets from text descriptions +- `generateIsometric(description, options)`: Generate isometric game sprites +- `generateCharacterSpritesheet(description, options)`: Create comprehensive character sprite animations + +#### Example +```javascript +const sprite = await spriteAI.generateSprite('Pixelated ninja character', { + iterations: 3, + size: '512x512' +}); +``` + +### 2. Advanced Sprite Manipulation + +- Sprite transformations +- Color palette optimization +- Animation generation +- Effect application + +### 3. AI-Powered Features + +- Uses advanced AI models like DALL-E 3 and GPT +- Generates context-aware, high-quality sprite assets +- Supports multiple game development styles and pixel art techniques -Once SpriteAI is installed, you can start leveraging its powerful features in your project. Here's a quick example demonstrating the main functionalities: +## Configuration +### API Configuration ```javascript -const spriteAI = require('spriteai'); - -// Initialise a new SpriteAI instance -const ai = new spriteAI.SpriteAI(); - -// Generate a sprite -ai.generateSprite('player', 32, 32) - .then(sprite => { - console.log('Sprite successfully generated:', sprite); - }) - .catch(error => { - console.error('Sprite generation encountered an error:', error); - }); - -// Load an existing sprite -ai.loadSprite('path/to/sprite.png') - .then(sprite => { - console.log('Sprite successfully loaded:', sprite); - }) - .catch(error => { - console.error('Sprite loading encountered an error:', error); - }); - -// Save a sprite -ai.saveSprite(sprite, 'path/to/save/sprite.png') - .then(() => { - console.log('Sprite saved successfully'); - }) - .catch(error => { - console.error('Sprite saving encountered an error:', error); - }); +spriteAI.configure({ + apiKey: process.env.OPENAI_API_KEY, + style: 'pixel-art', + defaultSize: '256x256' +}); ``` -## Key Features +## Performance Considerations + +- AI generation may have variable processing times +- Image complexity impacts generation speed +- Consider caching generated sprites for repeated use + +## Error Handling + +```javascript +try { + const sprite = await spriteAI.generateSprite('Robot character'); +} catch (error) { + console.error('Sprite generation failed:', error); +} +``` + +## Supported Export Formats + +- PNG +- WebP +- Base64 +- Sprite Sheet JSON + +## Licensing + +- Commercial use requires valid API credentials +- Respect OpenAI's usage policies +- Attribution may be required for certain generated assets + +## Browser & Environment Support + +- Node.js (v16+) +- Modern browsers +- Webpack, Rollup, and other module bundlers -SpriteAI offers a range of powerful features to enhance your sprite creation and manipulation: +## Version Compatibility -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)`. +Check `package.json` for the latest compatibility matrix and supported features. -## Advanced Techniques +## Contributing -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. +We welcome contributions! Please see our GitHub repository for guidelines on: -## Next Steps +- Reporting issues +- Submitting pull requests +- Development setup -To truly master SpriteAI, we recommend: +## Community & Support -1. Exploring the full API documentation -2. Experimenting with complex sprite animations -3. Applying different transformations to your sprites -4. Joining our community forums for tips and inspiration +- Discord Channel: #spriteai-dev +- GitHub Discussions +- Stack Overflow Tag: [spriteai] -For in-depth information and advanced usage scenarios, please refer to our extensive API documentation. +## Legal & Ethical Use -Thank you for choosing SpriteAI. We're excited to see the amazing sprites you'll create with our package! +Ensure compliance with AI-generated content guidelines and respect intellectual property rights when using SpriteAI. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..de888e1b --- /dev/null +++ b/docs/index.md @@ -0,0 +1,94 @@ +# SpriteAI: AI-Powered Sprite Generation Toolkit + +## Overview + +SpriteAI is an advanced JavaScript library for generating, manipulating, and transforming sprite images using cutting-edge AI technologies. Designed for game developers, digital artists, and creative professionals, SpriteAI simplifies the process of creating dynamic and unique sprite graphics. + +## Key Features + +### 🎨 AI-Powered Sprite Generation +- Generate unique sprites from textual descriptions +- Create characters, objects, and environments with AI assistance +- Customize sprite styles and variations + +### 🔧 Advanced Sprite Manipulation +- Transform and modify existing sprites +- Apply complex effects and animations +- Generate isometric and pixel art styles + +## Quick Start + +### Installation + +Install SpriteAI using npm: + +```bash +npm install spriteai +``` + +### Basic Usage + +```javascript +import { sprite } from 'spriteai'; + +// Generate a basic character sprite +const heroSprite = await sprite.generateSprite('A heroic pixel art warrior'); + +// Generate an isometric sprite +const castleSprite = await sprite.generateIsometric('A medieval stone castle'); +``` + +## Supported Generation Methods + +- `generateSprite()`: Create standard sprite sheets +- `generateIsometric()`: Generate isometric game graphics +- `generateCharacterSpritesheet()`: Create character animation sheets +- `generateEnvironmentSprites()`: Generate environment and tileset sprites + +## Transformation Utilities + +SpriteAI offers a wide range of sprite transformation methods: +- Color manipulation +- Pixel effects +- Animation generation +- Sprite combination +- Outline and shadow creation + +## Documentation Sections + +1. [Getting Started](/getting-started) +2. [Sprite Generation](/generateSprite) +3. [Isometric Sprites](/generateIsometric) +4. [API Reference](/api) +5. [Changelog](/changelogs) + +## System Requirements + +- Node.js 16.x or later +- Modern web browser +- OpenAI API access (for AI-powered generation) + +## Community and Support + +- GitHub Repository: [SpriteAI GitHub](https://github.com/yourusername/spriteai) +- Discord Community: [Join our Discord](https://discord.gg/spriteai) +- Bug Reports: [GitHub Issues](https://github.com/yourusername/spriteai/issues) + +## License + +SpriteAI is released under the MIT License. See [LICENSE](LICENSE) for details. + +## Contributing + +We welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) for details on submitting pull requests and reporting issues. + +## Upcoming Features + +- Enhanced AI model integration +- More sprite style generators +- Advanced animation tools +- Machine learning-powered sprite optimization + +## Disclaimer + +Sprite generation relies on AI models and may produce varied results. Always review and potentially modify generated sprites to fit your specific needs.