Skip to content

Latest commit

 

History

History
627 lines (570 loc) · 23.1 KB

README.md

File metadata and controls

627 lines (570 loc) · 23.1 KB

Pixel V

Drawing application for pixel art

Visit here: https://pixelvee.netlify.app/

Concept

The goal of this drawing app is to combine a vector art workflow with a typical raster art workflow. This app especially makes drawing pixellated curves and ellipses very easy. Lines made with vector tools can also be modified at any time, even on the same layer as rasterized pixels. The aim is to make a faster, smoother workflow for pixel artists.

This app is a work in progress. See the bottom of this page for features that are planned to be added in the future.

Functions

Undo/Redo
UndoRedo Actions that make a change to the canvas can be undone and redone. Only affects actions which are non-reversible. Things like changing canvas dimensions, layer opacity, etc. are inherently reversible so do not qualify to be part of the undo functionality.
Color Picker
Swatches Primary and secondary color swatches can be clicked to open a color picker. The color picker uses an HSL gradient selector. Individual color channels and hex codes can also be typed in directly.
Zoom
Plus Minus Zoom with buttons or with the mouse's scrollwheel.
Recenter
Recenter Press Recenter to bring the canvas back to normal size and starting position.
Clear
Clear Clears the current canvas layer and removes any vectors on that layer.

Tools

Brush (B)
Brush Draws pixels where your pointer goes.
Fill (F)
Fill Fill contiguous areas of color. This is a vector tool so the position and color can be adjusted at any time.
Curve (V)
Curve Draw pixel-perfect lines and bezier curves. The curve type is selected via mode toggles:
  • Line (/) — straight line between two endpoints.
  • Quadratic Curve (Q) — bezier curve with one control point (3 clicks total).
  • Cubic Curve (C) — bezier curve with two control points (4 clicks total). Connected vectors can be linked for smooth continuity.
All curve types are vector tools — control points and color can be adjusted at any time.
Ellipse (O)
Ellipse Draws an ellipse. Click to place the center, then drag to set the first radius. Hold Shift to force a circle. Both radii and angle can be adjusted separately after drawing. Subpixel center offset can be adjusted to control how the center pixel behaves. This is a vector tool so control points and color can be adjusted at any time.
Polygon (P)
Polygon Draws a quadrilateral by placing four corner points. Hold Shift to force a square. This is a vector tool so control points and color can be adjusted at any time.
Select (S)
Select Select a rectangular area. Restricts other tools to only draw inside the selection. Can be cut or copied via the Edit menu. The selection can be adjusted via 8 control points or moved by clicking inside it while Select is active.
Magic Wand (W)
Magic Wand Select pixels by color. Click to select a contiguous region of matching color. Hold Shift to add to the existing selection; hold Alt to subtract from it.
Eyedropper (Hold Alt)
Eyedropper Pick a color from the canvas. Hold Alt with any drawing tool to temporarily activate the eyedropper.
Grab (Hold Space)
Grab Pan the canvas view freely. Hold Space with any tool to temporarily activate grab.
Move
Move Move the current layer relative to other layers.

Brush

Brush Type
Click the brush preview to cycle between circle, square, and custom stamp brush types.
Brush Size
Adjust brush size using the slider (1–32 pixels diameter).
Custom Stamp Brush
Draw a custom shape in the stamp editor to use as a brush. The stamp is applied directionally as the pointer moves.
Dither Pattern
Choose from 65 dither patterns, applied as a tiled overlay on brush strokes. The dither tile offset (X and Y) can be adjusted to control pattern alignment.

Brush Modes

Erase (E)
Eraser Erase instead of draw. Available across multiple tools (e.g. Erase with Fill, Erase with Curve).
Perfect (Y)
Perfect Perfect pixel mode for the brush tool. Produces smooth pixel-perfect lines even when drawing slowly.
Inject (I)
Inject Translucent colors are applied directly to the canvas instead of being composited on top of existing colors.
Color Mask (M)
Color Mask Only draws on pixels that match the secondary color (e.g. if the secondary swatch is red, only red pixels will be painted over).
Two-Color
Two-Color Uses the dither pattern to blend between the primary and secondary colors.
Build-Up Dither
Build-Up Dither Dither density increases with each overlapping stroke.

Palette

Primary / Secondary Swatches
Swatches Click a swatch to open the color picker. Press (R) to randomize the primary color.
Switch Primary / Secondary
Color Switch Click to swap the primary and secondary swatch colors.
Palette Knife (Hold K or click the selected color)
Palette Knife Edit a palette swatch. Click the knife, then click a swatch to open the color picker for that color.
Palette Scraper (Hold X)
Palette Scraper Remove a palette swatch. Click the scraper, then click a swatch to remove it.
Add Color to Palette
Plus Click to open the color picker and add the selected color to the palette.

Layers

Add Raster Layer
Add Raster Layer Add a new layer for drawing.
Add Reference Layer
Add Reference Layer Add a non-editable background image layer for use as a tracing reference.
Remove Layer
Remove Layer Click the trash icon to remove the selected layer.
Toggle Layer Visibility
Toggle Visibility Click the eye icon to hide or show the layer.
Layer Settings
Layer Settings Click the gear icon to open layer settings. The layer's name and opacity can be changed here.
Change Layer Order
Drag a layer to reposition it in the layer stack.

Vectors

A panel lists all vectors in the order they were drawn, newest at the top. The thumbnail reflects the vector's placement on the canvas.

Select Vector
Click a vector in the panel to select or deselect it. Selecting a vector switches the active tool to match it and shows its control points on the canvas.
Vector Settings
Vector Settings Click the gear icon to open per-vector settings: primary color, secondary color, dither pattern, dither offset, brush size, and mode toggles (eraser, inject, two-color, etc.).
Toggle Vector Visibility
Toggle Visibility Click the eye icon to hide or show the vector.
Remove Vector
Remove Vector Click the trash icon to remove the vector.

Curve Tool Options

Options specific to the Curve tool for controlling how connected vectors interact:

Chain (7)
Start a new vector from a colliding endpoint instead of adjusting it.
Link (L)
Connected control points of other vectors move with the selected point (positional continuity).
Align (A)
Moves the opposing handle to the opposite angle for smooth tangential continuity.
Equal (=)
Enforces equal handle lengths on linked vectors (magnitude continuity).
Hold (H)
Maintains the relative angles of all handles attached to the selected control point.
Display Paths
Toggle the display of vector paths on the canvas.

File Menu

Open
Open a saved .pxv drawing file from your computer. Supports save file versions 1.0, 1.1, and 1.2 with automatic migration.
Save As... (Cmd + S)
Download the current drawing as a .pxv file. Save options include whether to preserve history, include the palette, include reference layers, and include removed actions.
Import
Import an image into the current layer.
Export
Download the drawing as a .png file.

Edit Menu

Resize Canvas...
Open a dialog to change the canvas dimensions (8–1024 pixels). An overlay lets you drag to reposition existing art within the new bounds before confirming.
Select All (Cmd + A)
Select the entire canvas area.
Deselect (Cmd + D)
Deselect the current selection.
Cut (Cmd + X)
Cut the selected area.
Copy (Cmd + C)
Copy the selected area.
Paste (Cmd + V)
Paste the copied selection. The pasted content can be moved and transformed before confirming with Enter.
Flip Horizontal (Cmd + F)
Flip the pasted selection horizontally.
Flip Vertical (Cmd + Shift + F)
Flip the pasted selection vertically.
Rotate (Cmd + R)
Rotate the pasted selection 90° clockwise.

Settings Settings

Tooltips (T)
Toggle tooltips on or off. Hover over any element to see its tooltip.
Grid (G)
Toggle the pixel grid on or off. Only displays at higher zoom levels.
Subgrid Spacing
Set the number of pixels between subgrid lines overlaid on the main grid. At a value of 1, no subgrid is rendered.

Keyboard Shortcuts

Key Action
B Brush
F Fill
V Curve
/ Curve — Line mode
Q Curve — Quadratic mode
C Curve — Cubic mode
O Ellipse
P Polygon
S Select
W Magic Wand
E Toggle Eraser mode
I Toggle Inject mode
Y Toggle Perfect mode
M Toggle Color Mask mode
G Toggle Grid
T Toggle Tooltips
R Randomize primary color
K (hold) Palette edit mode
X (hold) Palette remove mode
Space (hold) Grab / pan view
Alt (hold) Eyedropper
Shift (hold) Constrain (line for Brush, circle for Ellipse, square for Polygon)
7 Toggle Chain (Curve tool)
= Toggle Equal (Curve tool)
A Toggle Align (Curve tool)
H Toggle Hold (Curve tool)
L Toggle Link (Curve tool)
Cmd + Z Undo
Cmd + Shift + Z Redo
Cmd + S Save As
Cmd + A Select All
Cmd + D Deselect
Cmd + C Copy
Cmd + X Cut
Cmd + V Paste
Cmd + F Flip Horizontal
Cmd + Shift + F Flip Vertical
Cmd + R Rotate 90°
Enter Confirm paste
Backspace Delete selection

Features to be added

  • Dedicated Mobile / Tablet UI

Stretch features

Vectors:

  • Ability to rasterize vectors and remove them from the vectors interface
  • Dithered Gradient Tool
  • Smooth curves mode for brush — calculates curvature between points; bonus: convert a brush stroke into a series of linked vectors
  • Shapes: collections of vectors that can be selected and manipulated together
  • "Cut" a vector at any point to subdivide it into two separate curves

Raster Tools:

  • Mask Tool
  • Amorphous selection tool

Utility:

  • 9-Grid Mode: make repeating patterns for a selected tile area, with options for brick repeat and half-drop repeat
  • Preview window
  • Toggle magnify pointer area for precise placement of pixels: move magnifier on canvas and then work in magnified window to place pixels. Useful for any tools that use subpixels, and for precise placement of vectors.
  • Perspective Tool: Acts as a custom overlay on the canvas with user defined vanishing points and adjustable lines. 1-point, 2-point, 3-point, multipoint, 4-point curvilinear, 5-point curvilinear, isometric

Layers:

  • Layer Settings: blend mode, duplicate layer

Palette:

  • Color ramps in color picker, with ability to add an entire ramp to the palette
  • Optional palette canvas mode (small canvas with brush/eraser/eyedropper for building palettes by hand)

Animation:

  • Spritesheet options: custom grid to subdivide canvas
  • Animation preview, onion skins, per-layer frame rate, export animation

Development

System Requirements

After installing Rust via rustup:

rustup target add wasm32-unknown-unknown
cargo install wasm-pack

Run locally

  1. Run npm install
  2. Run npm run dev

Scripts

Command Description
npm run dev Build WASM and start Vite dev server
npm run build Build WASM and bundle for production
npm run build:wasm Build WASM only
npm run sass Watch and compile SCSS → CSS
npm run eslint Lint source files (dry run)
npm run eslintfix Lint and auto-fix source files
npm test Run tests once
npm run test:watch Run tests in watch mode

Tech Stack

  • Plain Javascript
  • Svelte 5
  • Vite
  • WebAssembly (Rust via wasm-pack)
  • HTML5 Canvas API
  • SCSS
  • Vitest for testing
  • ESLint with jsdoc plugin