Convert Figma logo to code with AI

jvalen logopixel-art-react

Pixel art animation and drawing web app powered by React

5,360
308
5,360
0

Top Related Projects

29,093

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

11,038

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

2,482

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!

Animated sprite editor & pixel art tool -- Fork of the last GPLv2 commit of Aseprite

Quick Overview

Pixel-Art-React is a web-based pixel art editor built using React. It allows users to create, edit, and animate pixel art directly in the browser, offering a range of tools and features for digital artists and hobbyists alike.

Pros

  • User-friendly interface with intuitive tools for pixel art creation
  • Real-time preview of animations and color palette management
  • Export options for various file formats, including animated GIFs
  • Responsive design, making it accessible on different devices

Cons

  • Limited advanced features compared to desktop pixel art software
  • Performance may slow down with larger canvas sizes or complex animations
  • Lack of layer support, which can limit more complex artwork creation
  • No built-in cloud storage or sharing features

Code Examples

// Creating a new PixelArtEditor component
import React from 'react';
import { PixelArtEditor } from 'pixel-art-react';

const MyPixelArtApp = () => {
  return (
    <PixelArtEditor
      width={32}
      height={32}
      initialColor="#000000"
    />
  );
};
// Using the undo/redo functionality
import { usePixelArtEditor } from 'pixel-art-react';

const UndoRedoButtons = () => {
  const { undo, redo, canUndo, canRedo } = usePixelArtEditor();

  return (
    <div>
      <button onClick={undo} disabled={!canUndo}>Undo</button>
      <button onClick={redo} disabled={!canRedo}>Redo</button>
    </div>
  );
};
// Exporting the pixel art as a PNG
import { usePixelArtEditor } from 'pixel-art-react';

const ExportButton = () => {
  const { exportAsPNG } = usePixelArtEditor();

  const handleExport = () => {
    exportAsPNG('my-pixel-art.png');
  };

  return <button onClick={handleExport}>Export as PNG</button>;
};

Getting Started

To get started with Pixel-Art-React, follow these steps:

  1. Install the package:

    npm install pixel-art-react
    
  2. Import and use the PixelArtEditor component in your React application:

    import React from 'react';
    import { PixelArtEditor } from 'pixel-art-react';
    
    function App() {
      return (
        <div className="App">
          <h1>My Pixel Art Editor</h1>
          <PixelArtEditor width={64} height={64} />
        </div>
      );
    }
    
    export default App;
    
  3. Run your React application and start creating pixel art!

Competitor Comparisons

29,093

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

Pros of Aseprite

  • Full-featured standalone application with a comprehensive set of pixel art tools
  • Supports animation and sprite sheet creation
  • Cross-platform compatibility (Windows, macOS, Linux)

Cons of Aseprite

  • Not web-based, requires installation
  • Paid software (though open-source)
  • Steeper learning curve for beginners

Code Comparison

Aseprite (C++):

void Editor::setZoom(render::Zoom zoom) {
  m_zoom = zoom;
  m_proj.setZoom(zoom);
  updateEditor();
  updateStatusBar();
}

Pixel-Art-React (JavaScript):

export function setZoom(zoom) {
  return {
    type: SET_ZOOM,
    zoom
  };
}

Aseprite offers a more comprehensive codebase with direct manipulation of the editor and project, while Pixel-Art-React uses a simpler action-based approach for state management.

Aseprite is a powerful, feature-rich pixel art editor with animation capabilities, making it suitable for professional artists and game developers. Pixel-Art-React, on the other hand, is a web-based tool that offers a more accessible and lightweight approach to pixel art creation, ideal for quick projects or beginners looking to experiment with pixel art techniques.

11,038

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

Pros of Piskel

  • More comprehensive pixel art creation tool with animation support
  • Standalone web application, doesn't require React
  • Larger community and more active development

Cons of Piskel

  • Heavier and more complex codebase
  • Less suitable for integration into existing React projects
  • Steeper learning curve for developers

Code Comparison

Piskel (JavaScript):

ns.PiskelController = function(piskel) {
  this.piskel = piskel;
  this.currentFrameIndex = 0;
  this.currentLayerIndex = 0;
  this.currentFrame = null;
  this.currentLayer = null;
};

Pixel-art-react (React/JavaScript):

const Frame = ({ frame, columns, rows, active }) => (
  <div className={`frame ${active ? 'active' : ''}`}>
    {frame.map((pixel, i) => (
      <div key={i} style={{ backgroundColor: pixel }} />
    ))}
  </div>
);

Piskel offers a more feature-rich pixel art creation environment with built-in animation tools, while Pixel-art-react provides a simpler, React-based approach for basic pixel art creation. Piskel's codebase is more complex, reflecting its broader functionality, while Pixel-art-react's code is more focused on React component structure. Developers should choose based on their specific needs and preferred technology stack.

2,482

A flat pixel art editor

Pros of poxi

  • More advanced features like 3D voxel editing and animation support
  • Better performance due to WebGL rendering
  • More active development with recent updates

Cons of poxi

  • Steeper learning curve due to more complex functionality
  • Less focus on traditional 2D pixel art creation
  • Requires more system resources to run smoothly

Code Comparison

pixel-art-react:

<PixelCanvas
  width={32}
  height={32}
  pixels={pixels}
  onPixelClick={handlePixelClick}
/>

poxi:

const scene = new Scene();
const voxel = new Voxel(1, 1, 1);
scene.add(voxel);
renderer.render(scene);

Key Differences

pixel-art-react is focused on creating 2D pixel art with a simple, user-friendly interface. It's ideal for beginners and those looking to create traditional pixel art quickly.

poxi, on the other hand, offers a more comprehensive toolset for 3D voxel editing and animation. It's better suited for advanced users who want to create more complex, three-dimensional pixel art or voxel-based animations.

While pixel-art-react uses React for rendering, poxi leverages WebGL for improved performance, especially when working with 3D scenes. This makes poxi more suitable for larger, more complex projects but may require more powerful hardware.

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 comprehensive pixel art creation tool with advanced features like layers, animation, and multiple brush types
  • Standalone application with a full-featured GUI, not limited to web browsers
  • Actively maintained with regular updates and new features

Cons of Pixelorama

  • Steeper learning curve due to more complex interface and features
  • Requires installation, unlike the web-based pixel-art-react
  • Potentially overkill for simple pixel art projects or quick edits

Code Comparison

While a direct code comparison is not particularly relevant due to the different nature of these projects (web-based tool vs. standalone application), we can look at how they handle basic pixel manipulation:

pixel-art-react:

drawPixel(color) {
  this.props.paintPixel(this.props.id, color);
}

Pixelorama:

func draw_pixel(position: Vector2, color: Color) -> void:
    Global.current_project.set_pixel(position, color)

Both examples show a basic function for drawing a pixel, but Pixelorama's implementation is more integrated into a larger project structure.

Animated sprite editor & pixel art tool -- Fork of the last GPLv2 commit of Aseprite

Pros of LibreSprite

  • Full-featured standalone application with a comprehensive set of tools for pixel art creation
  • Cross-platform support (Windows, macOS, Linux)
  • Supports animation and multiple file formats

Cons of LibreSprite

  • Steeper learning curve due to more complex interface and features
  • Requires installation and may have higher system requirements

Code Comparison

While a direct code comparison is not particularly relevant due to the different nature of these projects, we can highlight some key differences in their implementation:

pixel-art-react:

<PixelCanvas
  width={canvasWidth}
  height={canvasHeight}
  pixels={pixels}
  onPixelClick={handlePixelClick}
/>

LibreSprite:

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

pixel-art-react is a React-based web application for simple pixel art creation, while LibreSprite is a comprehensive C++ desktop application for professional pixel art and animation. pixel-art-react offers a more accessible, web-based approach but with limited features compared to LibreSprite's extensive toolset and standalone nature.

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

⚠️ Temporary Limited Interaction Notice ⚠️

(Please check Contributing)


Pixel Art to CSS

Animate pixel art and get CSS

travis ci

Did you know that you can create pixel art using CSS?

Pixel Art to CSS is an online editor that helps you with that task.

Combining the power of both box-shadow and keyframes CSS properties, you will get CSS code ready to use in your site.

Furthermore, you can download your work in different formats such as a static image, animated GIF or sprite like image.

:pencil2: Try it out

Pixel Art to CSS aims to be an intuitive tool by its simplicity, however it is equipped with a wide range of features: customize your color palette, go back and forth in time, modify animation settings, save or load your projects, among others.

Example

By default, you will find the following project within the LOAD section:

Cat animation example

See it live at pixelartcss

You can also import it directly submitting this code.

Technical overview

This application has been built with the following technologies:

  • React: Library to build the UI.
  • Redux: Implements a Flux like architecture.
  • ImmutableJS Helps to keep the data immutable aiming to avoid side effects.
  • PostCSS Handle the app CSS.

Installation

npm install

Development

npm run development

Deploy

Create the production build.

npm run deploy

Lint

There are several libraries used in the project that help us to keep our codebase healthy:

Every time we commit something it will execute the linters and format the staged files if needed.

If you want to check them individually you could execute the following scripts:

npm run lint
npm run csslint
npm run format

Testing

We are using Jest as the testing platform.

npm run test

Contributing

⚠️ Please Note: This repository is currently in a temporary idle state due to a refactor and tech upgrade. I am not accepting new Pull Requests or Issues at the moment. Sorry for the inconveniences.

#### Help me to improve it :seedling:

Create a GitHub issue if there is something wrong or to be improved.

Pull requests are also welcome, please take the following requirements as a checklist before opening one:

- [x] The PR does fix a problem or adds a new feature, not just cosmetic or syntactic sugar changes. - [x] It would be great to open an issue in advance. - [x] The PR should be issued to the develop branch. - [x] The PR should have a explanation or be related to an issue.

Thank you!

License

MIT Copyright © 2016 Javier Valencia Romero (@jvalen)