Convert Figma logo to code with AI

rgab1508 logoPixelCraft

A Pixel Art Editor

1,401
84
1,401
16

Top Related Projects

An online canvas based Pixel Art creation tool for Lospec.com

Pixel art animation and drawing web app powered by React

33,152

Animated sprite editor & pixel art tool (Windows, macOS, Linux)

11,967

A simple web-based tool for Spriting and Pixel art.

2,625

A flat pixel art editor

Unleash your creativity with Pixelorama, a powerful and accessible open-source pixel art multitool. Whether you want to create sprites, tiles, animations, or just express yourself in the language of pixel art, this software will realize your pixel-perfect dreams with a vast toolbox of features. Available on Windows, Linux, macOS and the Web!

Quick Overview

PixelCraft is an open-source pixel art editor and animator built with HTML, CSS, and JavaScript. It provides a user-friendly interface for creating pixel art and animations directly in the browser, making it accessible to both beginners and experienced artists.

Pros

  • Browser-based and platform-independent, requiring no installation
  • Intuitive interface with essential pixel art tools and features
  • Supports animation creation and preview
  • Free and open-source, allowing for community contributions and customization

Cons

  • Limited advanced features compared to professional pixel art software
  • Dependent on browser performance and compatibility
  • No built-in cloud storage or sharing capabilities
  • May lack some optimization for large-scale projects or complex animations

Getting Started

To use PixelCraft, follow these steps:

  1. Visit the PixelCraft website: https://rgab1508.github.io/PixelCraft/
  2. Start creating pixel art using the available tools and canvas
  3. To save your work, use the export options provided in the interface

For developers who want to contribute or run PixelCraft locally:

  1. Clone the repository:
    git clone https://github.com/rgab1508/PixelCraft.git
    
  2. Navigate to the project directory:
    cd PixelCraft
    
  3. Open index.html in your preferred web browser to run the application locally

Note: As PixelCraft is primarily a web-based application and not a code library, there are no specific code examples or installation steps required for end-users.

Competitor Comparisons

An online canvas based Pixel Art creation tool for Lospec.com

Pros of pixel-editor

  • More comprehensive color palette management with support for multiple palettes
  • Advanced animation features, including onion skinning and frame management
  • Responsive design that adapts well to different screen sizes

Cons of pixel-editor

  • Less intuitive user interface for beginners
  • Fewer export options compared to PixelCraft
  • Limited customization options for tools and brushes

Code Comparison

PixelCraft (JavaScript):

function flood(x, y, targetColor, fillColor) {
  if (x < 0 || x >= width || y < 0 || y >= height) return;
  if (getColorAtPixel(x, y) !== targetColor) return;
  setPixel(x, y, fillColor);
  flood(x + 1, y, targetColor, fillColor);
  flood(x - 1, y, targetColor, fillColor);
  flood(x, y + 1, targetColor, fillColor);
  flood(x, y - 1, targetColor, fillColor);
}

pixel-editor (JavaScript):

function floodFill(x, y, newColor) {
  const oldColor = getPixel(x, y);
  if (oldColor === newColor) return;
  const stack = [[x, y]];
  while (stack.length) {
    const [cx, cy] = stack.pop();
    if (getPixel(cx, cy) === oldColor) {
      setPixel(cx, cy, newColor);
      stack.push([cx + 1, cy], [cx - 1, cy], [cx, cy + 1], [cx, cy - 1]);
    }
  }
}

Both implementations showcase flood fill algorithms, with PixelCraft using recursion and pixel-editor using an iterative approach with a stack.

Pixel art animation and drawing web app powered by React

Pros of pixel-art-react

  • Built with React, offering a modern and component-based architecture
  • Includes features like palette management and frame-by-frame animation
  • More actively maintained with recent updates and contributions

Cons of pixel-art-react

  • Larger codebase and potentially more complex setup
  • Requires knowledge of React ecosystem for customization
  • Less focused on simplicity and ease of use for beginners

Code Comparison

PixelCraft (HTML/CSS/JavaScript):

function draw(x, y) {
  ctx.fillStyle = currentColor;
  ctx.fillRect(x, y, 1, 1);
}

pixel-art-react (React/JavaScript):

const paintPixel = (x, y) => {
  dispatch(paintCell(x, y, paletteColor));
};

Both projects aim to create pixel art tools, but pixel-art-react offers more advanced features and a React-based architecture, while PixelCraft focuses on simplicity with vanilla JavaScript. pixel-art-react may be better suited for larger projects or those already using React, while PixelCraft could be ideal for quick implementations or learning purposes.

33,152

Animated sprite editor & pixel art tool (Windows, macOS, Linux)

Pros of Aseprite

  • More feature-rich and professional-grade pixel art tool
  • Actively maintained with regular updates and improvements
  • Supports advanced features like animation and custom brushes

Cons of Aseprite

  • Closed-source and paid software
  • Steeper learning curve for beginners
  • Requires installation and system resources

Code Comparison

PixelCraft (JavaScript):

function draw(x, y) {
  ctx.fillStyle = currentColor;
  ctx.fillRect(x * pixelSize, y * pixelSize, pixelSize, pixelSize);
  saveToUndoStack();
}

Aseprite (C++):

void Editor::drawPixel(int x, int y, color_t color)
{
  m_document->getSprite()->putPixel(x, y, color);
  m_document->notifyPixelChanged(x, y);
}

PixelCraft is a simple, web-based pixel art editor, while Aseprite is a comprehensive desktop application. PixelCraft offers basic drawing functionality with a focus on accessibility, whereas Aseprite provides advanced tools for professional pixel artists. The code comparison shows the difference in complexity and language choice between the two projects.

11,967

A simple web-based tool for Spriting and Pixel art.

Pros of Piskel

  • More mature and feature-rich project with a larger user base
  • Offers both web-based and desktop applications
  • Includes advanced features like onion skinning and frame management

Cons of Piskel

  • Larger codebase may be more challenging for new contributors
  • Less frequent updates and maintenance compared to PixelCraft
  • Heavier resource usage due to more complex features

Code Comparison

PixelCraft (JavaScript):

function fillPixel(x, y) {
  ctx.fillStyle = currentColor.value;
  ctx.fillRect(x * pixelSize, y * pixelSize, pixelSize, pixelSize);
  saveState();
}

Piskel (JavaScript):

ns.PixelUtils.resizePixel = function (pixel, zoom) {
  return {
    x : Math.floor(pixel.x / zoom),
    y : Math.floor(pixel.y / zoom)
  };
};

Both projects use JavaScript for their core functionality. PixelCraft's code appears more straightforward and focused on basic pixel manipulation, while Piskel's code shows more complex utility functions for handling various pixel operations and zoom levels.

2,625

A flat pixel art editor

Pros of poxi

  • More advanced rendering capabilities, including 3D voxel support
  • Better performance due to WebGL implementation
  • More extensive documentation and examples

Cons of poxi

  • Steeper learning curve for beginners
  • Less focus on traditional 2D pixel art creation
  • Fewer built-in tools for simple pixel editing

Code Comparison

PixelCraft (JavaScript):

function drawPixel(x, y, color) {
  ctx.fillStyle = color;
  ctx.fillRect(x * pixelSize, y * pixelSize, pixelSize, pixelSize);
}

poxi (WebGL Shader):

void main() {
  vec4 color = texture2D(u_texture, v_texCoord);
  gl_FragColor = color;
}

PixelCraft focuses on simple 2D pixel manipulation using canvas, while poxi utilizes WebGL shaders for more complex rendering, including 3D voxels.

PixelCraft is better suited for beginners and traditional pixel art creation, offering a simpler interface and tools specifically designed for 2D pixel editing. poxi, on the other hand, provides more advanced features and better performance, making it ideal for more complex projects and 3D voxel art.

Both projects have their merits, and the choice between them depends on the user's needs and experience level. PixelCraft is more accessible for those new to pixel art, while poxi offers more powerful capabilities for advanced users and 3D projects.

Unleash your creativity with Pixelorama, a powerful and accessible open-source pixel art multitool. Whether you want to create sprites, tiles, animations, or just express yourself in the language of pixel art, this software will realize your pixel-perfect dreams with a vast toolbox of features. Available on Windows, Linux, macOS and the Web!

Pros of Pixelorama

  • More feature-rich with advanced tools like layers, animation frames, and color palettes
  • Cross-platform support (Windows, macOS, Linux)
  • Active development with frequent updates and bug fixes

Cons of Pixelorama

  • Steeper learning curve due to more complex interface
  • Requires installation, not web-based like PixelCraft
  • Larger file size and system requirements

Code Comparison

Pixelorama (GDScript):

func _on_Tool_pressed(tool_name: String) -> void:
    Global.current_tool = tool_name
    for t in tool_buttons:
        t.pressed = t.name == tool_name

PixelCraft (JavaScript):

function setTool(tool) {
    currentTool = tool;
    document.querySelectorAll('.tool').forEach(el => {
        el.classList.toggle('active', el.dataset.tool === tool);
    });
}

Both projects implement tool selection, but Pixelorama uses GDScript (Godot's scripting language) while PixelCraft uses JavaScript for web-based functionality. Pixelorama's approach is more integrated with its game engine environment, while PixelCraft's code is simpler and directly manipulates DOM elements.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

PixelCraft

A pixel Art & Animation Creation Tool Built using HTML5 Canvas.
It is a Progressive Web App (PWA) with offline compatibility.
It is mobile-friendly and is very easy to use.

PixelCraft

Overview

This App is Available at both these locations

https://rgab1508.github.io/PixelCraft

https://pixelcraft.web.app

On opening, you will get a screen as Follows

PixelCraft overview

You can choose Any Dimensions for your Canvas, 16 X 16 is the default dimension.
Dimensions below 128 X 128 are preferable for smooth operation and GIF creation.

Toolbar

PixelCraft overview

The List Of all Tools and methods to use them are as follows

Pencil

The Pencil tool is the most basic tool and is used to draw pixels Freehand

Pencil Tool

Eraser

The Eraser tool is used to erase a given pixel 1 pixel at a time. It has dimensions 1 X 1 and is fixed.

Eraser Tool

Paint Tool

The Paint tool is used to Flood Fill a given color with a new color. It works smoothly for dimensions under 128 X 128.

Paint tool

Paint tool

Line Tool

The line tool is used to draw a line segment between 2 points using Bresenham line drawing algorithm.

Click on tool and click on 2 points to draw a line segment between them.

Line Tool

Circle Tool

The Circle Tool is used to draw a circle with a given centre and Radius using Midpoint Circle Algorithm.

Circle Tool

Ellipse Tool

The Ellipse Tool is used to draw an ellipse with given centre and it's radius along x-axis and y-axis.

Ellipse Tool

GIF Tools

Add Frame

This tool adds the current state of canvas to the Frame Stack which can be later loaded or deleted. Each Frame is added with a delay of 100 ms, Same Frame can be multiple time to increase it's duration in GIF.

Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Frame 6

View Frame

This tool displays a Popup with all the current frames in the Frame stack.

Load A Frame: Click on the Frame.
Delete A Frame: Right Click / Long press on mobile, To delete a Frame.

Frame Panel

Utility Tools

Undo/Redo

The Undo/Redo Functionality is not very advanced and is only capable of undoing/redoing 1 pixel at a time.
It is only useful for correcting small mistakes, hence, it is advised to draw with care, or, add a frame if doing a big change with chances of mistake.

Undo/Redo Tool Undo/Redo Tool

Clear Window

This Tool is used to clear the current Canvas window.

Before:
Clear Window
After:
Claer Window

Advanced Tools

Import image

This Tool is Used to import an image and convert it to Pixel Art of Given Dimensions.

Mona Lisa Mona Lisa Pixelated

Saving Pixel Art and GIF Animation

Once you are done with making your pixel art or animation frames you can export it as a PNG or GIF to share it on other platforms. Let's see how it's done.Save Image

Saving Image

Save Image option is available in the Drop-down on top left corner, It will download a file named canvas.png with dimensions 10 x width X 10 x Height

Saving GIF

After making all the frames and making necessary changes in Frames Panel, you can export the GIF using option present in Dropdown. The dimensions will be same as that of image.

Thanks to @eagleloid for this fix #44

Color Palette & Transparency

The Following colors are available on the color Palette.

Color Palette

You can select any color by clicking on it.

You can also set color Transparency to create translucent colors and create color combinations. This property can be used to create complex patterns with greater flexibility. Right click on color to set transparency value between 0 and 1

Thanks to @mrfoogles for this fix #41

Complex Pattern

PWA Support

This Web App is a Fully Compatible PWA and is installable.

PWA Support

You can install it either from the Dropdown or using the "Add to Home Screen" Button From Options.

Some Pixel Arts Made with PixelCraft

canvas (1)canvas (2)canvascanvas (29)canvas (9)