diff --git a/build.js b/build.js index 04c4d0a..47444a8 100644 --- a/build.js +++ b/build.js @@ -19,6 +19,8 @@ function copy_images(){ gulp.src('./images/*.png').pipe(gulp.dest(path.join(BUILDDIR, SLUG))); // Splash images gulp.src('./images/Splash images/*.png').pipe(gulp.dest(path.join(BUILDDIR, SLUG))); + // Logs images + gulp.src('./images/Logs/*.gif').pipe(gulp.dest(path.join(BUILDDIR, SLUG))); } function copy_logs() { diff --git a/css/pixel-editor.scss b/css/pixel-editor.scss index bb7d9e1..ab6da87 100644 --- a/css/pixel-editor.scss +++ b/css/pixel-editor.scss @@ -1610,7 +1610,7 @@ div#pb-options { } #sp-quickstart-container { - left:250px; + left:200px; height:65vh; width:650px; display:inline; @@ -1748,11 +1748,16 @@ div#pb-options { width:350px !important; height:90%; overflow-y: scroll; + overflow-x:hidden; line-height: 1.5; position:absolute; top:40px; right:0px; + img { + width:350px; + } + &::-webkit-scrollbar { background: #232125; width: 0.5em; diff --git a/images/Logs/line-tool.gif b/images/Logs/line-tool.gif new file mode 100644 index 0000000..6a793f0 Binary files /dev/null and b/images/Logs/line-tool.gif differ diff --git a/images/Logs/palette-block.gif b/images/Logs/palette-block.gif new file mode 100644 index 0000000..d42d45d Binary files /dev/null and b/images/Logs/palette-block.gif differ diff --git a/images/Logs/resize-canvas.gif b/images/Logs/resize-canvas.gif new file mode 100644 index 0000000..b0ffb4c Binary files /dev/null and b/images/Logs/resize-canvas.gif differ diff --git a/images/Logs/trim-canvas.gif b/images/Logs/trim-canvas.gif new file mode 100644 index 0000000..60bd3a8 Binary files /dev/null and b/images/Logs/trim-canvas.gif differ diff --git a/js/_logs.js b/js/_logs.js index 10de24f..30ee743 100644 --- a/js/_logs.js +++ b/js/_logs.js @@ -7,6 +7,7 @@ rawFile.onreadystatechange = function () if(rawFile.status === 200 || rawFile.status == 0) { var allText = rawFile.responseText; + document.getElementById("latest-update").innerHTML = allText; } } diff --git a/js/_mouseEvents.js b/js/_mouseEvents.js index ed8bb82..1991064 100644 --- a/js/_mouseEvents.js +++ b/js/_mouseEvents.js @@ -169,7 +169,6 @@ window.addEventListener("mouseup", function (mouseEvent) { }, false); -// TODO: Make it snap to the pixel grid function setPreviewPosition(preview, size){ let toAdd = 0; diff --git a/js/_newPixel.js b/js/_newPixel.js index 6b88c14..22c423f 100644 --- a/js/_newPixel.js +++ b/js/_newPixel.js @@ -201,6 +201,10 @@ function newPixel (width, height, editorMode, fileContent = null) { else { switchMode(false); } + + // Resetting history + undoStates = []; + redoStates = []; } function newFromTemplate(preset, x, y) { diff --git a/js/_paletteBlock.js b/js/_paletteBlock.js index adaf06d..188db9f 100644 --- a/js/_paletteBlock.js +++ b/js/_paletteBlock.js @@ -113,8 +113,6 @@ function pbRemoveColours() { coloursList.removeChild(coloursList.children[startIndex]); } clearBorders(); - - // TODO: make it so that ramps update correctly (change start and end indexes if necessary) } /** Starts selecting a ramp. Saves the data needed to draw the outline. diff --git a/js/_resizeSprite.js b/js/_resizeSprite.js index 06131c7..8de39ff 100644 --- a/js/_resizeSprite.js +++ b/js/_resizeSprite.js @@ -20,6 +20,8 @@ function openResizeSpriteWindow() { // Computing the current ratio currentRatio = layers[0].canvasSize[0] / layers[0].canvasSize[1]; + console.log("Current ratio: " + currentRatio); + // Initializing the input fields data.width = layers[0].canvasSize[0]; data.height = layers[1].canvasSize[1]; @@ -232,7 +234,7 @@ function changedWidthPercentage(event) { console.log("old value: " + oldValue + ", ratio: " + ratio); newHeight = startData.height * ratio; - newHeightPerc = data.widthPercentage / currentRatio; + newHeightPerc = data.widthPercentage; newWidth = startData.width * ratio; if (keepRatio) { @@ -262,7 +264,7 @@ function changedHeightPercentage(event) { ratio = data.heightPercentage / oldValue; newWidth = startData.width * ratio; - newWidthPerc = data.heightPercentage * currentRatio; + newWidthPerc = data.heightPercentage; newHeight = startData.height * ratio; if (keepRatio) { diff --git a/logs/latestLog.html b/logs/latestLog.html index a1bbe4a..1eb16df 100644 --- a/logs/latestLog.html +++ b/logs/latestLog.html @@ -1 +1,76 @@ -

Hello update

\ No newline at end of file +

Latest update

+Hello there, welcome to the latest version of the Lospec Pixel Editor. As you can see, we changed +quite a lot of things. Let's go through all them, starting from this page. + +

Splash page

+ +The editor now has a splash page! Besides a fancy cover image with beautiful art, on the bottom +right of the page you'll be able to create a new custom pixel. You can also use the quickstart +menu to quickly select a preset or load an existing file. It was designed by Skeddles himself! + + + +Pro tip: once you've created a new project, you can go back to the splash page +by clicking on Editor -> Splash page + +

Canvas resizing

+ +We implemented canvas resizing! If you wanted to draw a t-rex but created a 4x4 canvas, we've got you covered! +You can now click on Edit -> Resize canvas to decrease the size of the project. Same goes if you +drew an ant on a 1024x1024 canvas, just go to Edit -> Resize canvas and decrease +the dimensions. + + + +

Sprite scaling

+ +In addition to the Lospec Pixel Art Scaler, +you can now take advantage of the editor's built-in scaling function. Just click on Edit -> Scale sprite +to scale up or down your work. With the nearest-neighbour algorithm you'll be able to scale sprites +in a pixel-perfect manner, while with bilinear interpolation it's possible to add (or remove, if you're scaling +down a sprite) antialiasing. + + + +

Line tool

+ +Our contributor Liam added a new line tool! Quality of +life improvement are planned for it, the rectangle and the rectangular selection tools. + + + +

Advanced mode: colour picker and palette block

+ +If you're a proud user of the advanced mode, you'll be able to try out the new colour picker: it +supports 3 colour models, 6 colour harmonies and multiple ways to input data. Next to it, +you'll find the new palette block, which lets you arrange your colours however you want, add and +remove multiple colours at once. Changes made in the palette block will update the palette list +you've always been familiar with. + + + +

Other changes:

+ + +

That's all folks!

+That's all for this update! Hope you have fun with this new release :)
+- Unsettled +

+P.S.: we're always looking for contributors! Join the Lospec discord to get in touch! + + + \ No newline at end of file diff --git a/views/pixel-editor.hbs b/views/pixel-editor.hbs index bac1a7e..7207bc8 100644 --- a/views/pixel-editor.hbs +++ b/views/pixel-editor.hbs @@ -90,7 +90,7 @@ @@ -263,7 +263,7 @@

Latest updates

- +
@@ -621,7 +621,6 @@ - - + \ No newline at end of file