Features
Efficient Rendering
Optimized performance for rendering Pokémon sprites directly into web pages.
Seamless Integration
Easy integration with Pokémon Infinite Fusion spritesheets.
Utility Functions
Comprehensive set of tools for sprite loading and management.
Installation
<script src="https://fusiondex-org.github.io/script.js"></script>
Usage Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FusionDex Sprite Renderer</title>
<script src="https://fusiondex-org.github.io/script.js"></script>
</head>
<body>
<div id="sprite-container"></div>
<script>
const spriteContainer = document.getElementById('sprite-container');
const sprite = Graphics.renderSprite('spritesheet.png', {
x: 0,
y: 0,
width: 64,
height: 64
});
spriteContainer.appendChild(sprite);
</script>
</body>
</html>
Documentation
renderSprite(imagePath, options)
Renders a sprite from a given spritesheet image.
const sprite = Graphics.renderSprite(imagePath, {
x: 0, // X coordinate on spritesheet
y: 0, // Y coordinate on spritesheet
width: 64, // Width of sprite
height: 64 // Height of sprite
});
loadSpriteSheet(path)
Loads a spritesheet for later use.
await Graphics.loadSpriteSheet('path/to/spritesheet.png');
Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request