Skip to content

Releases: lunapaint/vscode-luna-paint

0.7.0

02 Jul 16:21
Compare
Choose a tag to compare

Features

Shape tool

A new shape tool has been added that currently supports drawing an ellipse and triangle.

  • This shape tool is modeled after the existing rectangle tool.
  • Smoothing/anti-aliasing is supported by default.
  • The shape outline show the exact outer edge of the shape to be rasterized.
  • Resizing the shape to flip the axes is supported.
  • Holding alt while drawing a shape will use the point not being dragged as the center point.
  • The shape can be moved with the arrow keys.

When using non-smooth and 1px outline size options the shape tool uses a special mode that draws pixel-perfect lines:

Line tool improvements

The line tool has received a lot of work this month:

  • Instead of rasterizing the pixels when drawn it now creates an interactive line object that can be manipulates just like the rectangle tool. This includes handles for both moving the points or resizing the width of the line.
  • The line now draws smooth/anti-aliased lines by default, this can be disabled using the smoothing option in the top bar.
  • Brush size is now supported.
  • A new guide is used for all lines except non-smooth 1px wide lines which shows where the smooth rectangle will be drawn.
  • Holding alt while drawing a line will use the point not being dragged as the center point instead of the other end of the line.
  • The line can be moved with the arrow keys.

There is also detailed information about the line available in the bottom bar:

Alt+drag support for the rectangle tool

Along with line and shape, the rectangle now also supports alt+drag to mirror resize changes on the other side.

Object handle and outline improvements

Outlines now show all the time while the object is active, not just when being moved or resized. They are also now more narrow and are colored dynamically based on the backing color.

Object handles also received a redesign, using the theme color + white instead of the black/white circle outlines.

Snap to pixel grid

The new luna.snapToPixelGrid can be disabled which allows drawing lines and shapes not locked to the pixel grid:

Entry in the welcome page New File... button (#81)

Luna Paint now supports the upcoming VS Code feature on the welcome page to allow create a new image or icon file from the welcome page:

Other enhancements

  • The rectangle tool now supports the replace blend mode.
  • Adopted status bar id/name to improve the description when right clicking on the status bar entry.
  • Tools are now separated by their category in the tools view.

Performance Improvements

Greatly improved load and save time

Thanks to a change in VS Code to improve the typed array extension host to/from webview transfer time landing in v1.57.0, Luna Paint's image load and save time has been greatly improved. The improvements get more impressive as the images get larger. The below numbers were taken using the average of 2 instances of each action.

Loading:

Image Size Before (ms) After (ms) Change
1000x1000 (28kb) 35.48 16.11 -55%
10000x10000 (18.3mb) 8074.27 679.34 -92%

Saving:

Image Size Before (ms) After (ms) Change
1000x1000 (28kb) 9.52 4.82 -49%
10000x10000 (18.3mb) 4585.34 348.46 -92%

Other improvements

  • Framerate should improve when the pixel line guide is displayed on a large monitor.

Documentation

  • New getting started pages
    • Shape tool
  • Updated getting started pages
    • Line tool

Bug Fixes

  • When actions cause errors like when cropping the image to its full dimensions, the editor's history will no longer be corrupted (#79).
  • Show an error in the canvas when the browser doesn't support SharedArrayBuffer, instead of breaking some functionality.
  • Fix the viewport breaking when alt+clicking an empty layer.
  • Don't hide tool option inputs when the window is narrow.
  • Flatten layers will no longer consider deleted layers.
  • Update tool cursor immediately after an undo or redo.
  • Updating tool options or the palette with the arrow keys no longer move active shapes.
  • Improve trackpad handling on non-macOS and mouse support on macOS (#75).
  • Hand tool
    • Holding space will no longer switch to the original tool and back to the hand when the pointer is released.
    • Ensure using space with the hand tool will not trigger actions in the original tool (#77, #78).
  • Move pixels tool
    • Flipping the selection will no longer incorrectly restore it back to the original when moving multiple times.
    • Fix an exception that could throw when undoing move pixel steps.
    • Restore correct smoothing quality on moved pixels after hot exit.
    • Fix redo history sometimes not applying the properly scaled image.
    • Fix axis flipping when dragging back and forth.
    • Correct cursor state when dragging immediately after flipping the selection.
  • Move selection tool
    • Fix an exception when redoing a history entry after deleting a selection outside the bounds of the canvas.
  • Line
    • Add accidental click protection.
    • Hide line angle info when the pointer is released.
  • Rectangle
    • Prevent rectangle from moving when changing outline size via up/down.
    • Prevent case where a finished rectangle could be edited after hot exit, corrupting history.
    • Restore in-progress rectangle handles after hot exit.
    • When drawing a rectangle, the cursor will now be updated when the pointer is released so it can be adjusted without moving the pointer again.
    • Add accidental click protection.
    • Fix display of handles when clicking after undo.
    • Restore display of handles after hot exit.
    • Update rectangle dimensions in status bar after undo/redo.
  • Zoom tool
    • Prevent zooming on a rectangle going beyond the maximum of 10000% (#76)).
  • Minimap
    • Fix deleted layers showing up in the minimap.
    • Fix transparent pixels rendered incorrectly on bottom layer

0.6.0

13 Jun 12:57
Compare
Choose a tag to compare

Special call out to @duianto who reported a lot of issues/feature requests since 0.5 went out, thanks for making this a more solid release!

Features

Webp support and save quality for jpeg

The .webp image format is now supported, it and jpeg now have a quality picker when saving the image.

Note that for lossy formats the original image will remain open and not be reloaded upon saving, this is particularly important when using auto save so the image doesn't continue to get recompressed each save.

Hand tool (#55)

The new Hand tool allows panning the image with left click. The shortcut for the tool is H and it can be temporarily switched to by holding space.

Duplicate layers and images

Layers and images (in .ico files) can now easily be duplicated via the right click context menu or through the button in the Layers or Images windows:

Flexible windows

Windows in the UI can now be dragged around the UI, they will snap to the editor's edges and relayout when the webview is resized. This window state is remembered for the lifetime of the editor and across hot exit/reload.

Fit layer to window

The new luna.view.fitLayerToWindow command will zoom into a layer's non-transparent content. This command is available through the command palette, the layers context menu and by alt+clicking the layer in the Layers window.

Shift to lock aspect ratio

The Move Selection, Move Pixels and Rectangle tools now support aspect ratio locking when resizing while shift is held.

Other enhancements

  • Added support for drag and drop within the images and layers views.
  • The zoom tool supports zooming into an area by clicking and dragging.
  • There's a new report issue/feedback button in the top right, backed by the luna.help.reportIssue command.
  • New setting luna.mouseWheelBehavior allows flipping the ctrl/cmd+wheel behavior so you can zoom without holding a modifier.
  • Lesser used .jpe (jpeg), .jiff (jpeg) and .dib (bmp) file extensions are now supported.
  • The move pixels tool now allows flipping the selection horizontally/vertically.
  • Added a readonly mode that prevents edits on "readonly file systems", such as when opening files via the scm/git sidebar (#19).
  • The Layers and Images windows now have a context menu.
  • Layers can now be renamed, note that this is not currently persisted with the file so will only last for the current session.

Behavior Changes

  • The default colors have been swapped so black is now the primary and white is the secondary (#53). This makes more sense since the default background color of new images is white.
  • When merging a layer into a non-visible layer it will now be shown. The correct behavior here is arguable but it felt like a bug that this wasn't happening, especially when the top layer was visible.
  • Any resize to an image, including undo/redo will now fit the image to the window (#70). This may get refined more later perhaps even with the possibility of integrating with the standard go forward/back commands but for now this feels much better, especially when using the cropping tool.

Performance Improvements

  • Reduced the amount of data uploaded to GPU on some frames.

Documentation

  • New getting started pages
    • Color picker tool
    • Rectangle tool
    • Viewport tools

Bug Fixes

  • Reuse new untitled image IDs when editors are saved or closed (#51).
  • Fix untrusted workspace support by using the new capabilities key.
  • Fix primary and secondary color swatches sometimes having a white outline when window.zoomLevel is not 1 (#49).
  • Improve styling of top/bottom bar toggle items.
  • Layers
    • Reuse the layer ID in its name when layers are deleted (#51).
    • Fixed the layer's window visibility and blend mode not updating on undo/redo (#60).
    • Fixed active layer sometimes not getting set when deleting layers (#67).
    • Fix merging down not retaining bottom layer's data if it was not visible at the time of merging.
  • Hot exit/restore
    • Fixed some cases where window state (eg. layers, palette, etc.) would not be restored by hot exit.
    • Window state is now restored after a hot exit reload.
    • Fix exception that would throw when the Reopen Closed Editor command is run after closing an untitled image.
  • Tools
    • Dragging tools (selection, rectangle, line, etc.) to the edge of the viewport will now update the preview live instead of on the next mouse move event.
  • Rectangle tool
    • Fixed history corruption when deleting or creating layers before finishing a rectangle (#64).
  • Selection tool
    • Fixed undoing move selection entries triggering select all.
  • Move pixels tool
    • When switching to the Move Pixels tool while the selection is out of the viewport, the expand canvas to selection button will be correctly enabled.
  • Rendering
    • Fixed layers sometimes having their render tiles stretched, distorting the image (#65).
    • Fixed stale render tiles sticking around sometimes when reducing the size of an image (#57).
  • .ico files
    • Be more lenient for .ico files that state invalid icon entry values such that they still load and attempt to extract the images. Information on file corruption like this will be written to the VS Code's console. Big thanks to @fourbadcats for providing an example file for this.
    • Allow icons containing corrupt images that fail to load to continue on, corrupt images will still be shown in the images window as "1x1 - corrupt".
    • Improved diagnostics for problems that occur during .ico parsing.