Commit Graph

32 Commits

Author SHA1 Message Date
pxlvxl
6ac04e5338 push3 2022-02-25 14:06:44 -05:00
pxlvxl
f499662afc Various changes
- added `/:paletteSlug/:resolution` functionality for localhost testing
	- created `currFile.sublayers` for *things that should zoom with the canvas layers*
	- `currFile.layers` now solely contains the canvas layers
	- added `getProjectData` to `FileManager`'s exported methods
	---
	- added `FileManager.localStorageSave` (it's basically just: localStorage.setItem("lpe-cache",FileManager.getProjectData()))
	- added `FileManager.localStorageCheck` (it's basically just: `!!localStorage.getItem("lpe-cache")`)
	- added `FileManager.localStorageLoad` (it's basically just: `return localStorage.getItem("lpe-cache")`)
	- added `FileManager.localStorageReset` (for debugging purity)
	---
	- calling `FileManager.localStorageSave()` on mouse up (we should stress test this)
	---
	- changed lpe file format to `{canvasWidth:number,canvasHeight:number,selectedLayer:number,colors:[],layers:[]}`
	- added backward compatibility for the old lpe file format
	---
	- added some canvas utility functions in `canvas_util`
	- added Unsettled's color similarity utility functions in `color_util2`
	---
	- html boilerplate - wang tiles
	-
	- POC - tiny text boilerplate
	- POC - tiny text font scraper
	---
	- WIP - added two optional url route parameters `/:paletteSlug/:resolution/:prefillWidth/:prefillBinaryStr`
	- WIP POC - hbs_parser.js (outputs tree data about hbs file relationships)
2022-02-23 11:36:15 -05:00
Nicola
a238fb1b47 Fixed #43, #41, #37 and #35 2021-12-11 10:48:14 +01:00
unsettledgames
b2f5521750 Removed all global variables, worked on File class and put canvas resizing functions in File 2021-12-06 17:37:43 +01:00
unsettledgames
d972f9c530 Turned the PaleteBlock into an IIFE 2021-12-06 11:26:42 +01:00
unsettledgames
ea45fa4842 Added back rect selection 2021-11-08 22:25:30 +01:00
unsettledgames
32fb4ca943 Added back eyedropper 2021-11-01 11:33:18 +01:00
unsettledgames
35cbe31a71 Added back brush with new tool system 2021-10-27 10:02:21 +02:00
unsettledgames
0fcb309cc7 Added basic structure and comments for Tools
Fixed lpe palette loading, added custom events
2021-10-25 19:23:06 +02:00
unsettledgames
1bf5d4e433 Fixed #56 2021-07-25 23:26:32 +02:00
unsettledgames
0a774978ef Fixed file loading bug 2021-07-24 10:25:55 +02:00
unsettledgames
404b1c56c1 Added EditorState, moved editor mode management to that IIFE 2021-07-23 18:54:09 +02:00
unsettledgames
526177c6fe Fixed palette loading bug 2021-07-23 18:30:04 +02:00
unsettledgames
d3781979b4 Removed layerListEntry from global variables 2021-07-23 13:08:04 +02:00
unsettledgames
6b84cdaa4d Removed getCursorPosition 2021-07-22 19:05:58 +02:00
unsettledgames
6bd6515385 Removed currentGlobalColor 2021-07-22 18:02:19 +02:00
unsettledgames
1a6079cc81 Removed "colors" global variable 2021-07-22 16:40:58 +02:00
unsettledgames
b959a70f55 Added mouse event simulation 2021-07-22 15:18:46 +02:00
unsettledgames
1b1290c017 Refactored Input.js to Events.js
Started working on Input.js, this time it's used to handle mouse clicks and keyboard shortcuts.
2021-07-20 22:52:51 +02:00
unsettledgames
7c4fb652cf Deleted _createColorPalette.js, commented files
Moved createColorPalette to the ColorModule, removed _onLoad.js and _onbeforeunload.js, commented the code and labelled with REFACTOR the comments that refere to the refactoring.
2021-07-18 23:17:41 +02:00
unsettledgames
7976675132 Moved some of _pixelEditorUtility.js functions to proper files
Also left some comments about where to put the leftover functions once we have a more detailed structure.
2021-07-18 22:44:31 +02:00
unsettledgames
7c80e8f342 Finished refactoring History, added Startup IIFE 2021-07-15 17:10:07 +02:00
unsettledgames
eada155375 Fixed Dialogue bug 2021-07-14 23:00:12 +02:00
unsettledgames
6c8ec8e7a9 Refactored History into an IIFE
Divided History states and actual History management, refactored all occurrences of history-related functions to use the new version.
2021-07-14 22:20:55 +02:00
unsettledgames
87ab2da6b5 Commented ColorModule 2021-07-13 22:59:05 +02:00
unsettledgames
ed6d60c418 Fixed colour generation when adding a new one 2021-07-13 22:35:06 +02:00
unsettledgames
85db99a7c1 Moved clickedColor to ColorModule 2021-07-13 22:27:29 +02:00
unsettledgames
1daeb81ef4 Fixed bug that caused the wrong colour to be modified with jscolor 2021-07-11 12:53:50 +02:00
unsettledgames
f5807417ec Added Color class
- Added Color class to make color representation and convertions more uniform
- Replaced standard convertions with Color.convertion
- Removed _algorithms.js, _deleteColor.js, ajax.js and the other convertion files
- Fixed bug in ColorModule, moved replaceAllOfColor to ColorModule as well as deleteColor
2021-07-11 12:40:48 +02:00
unsettledgames
3f2d67a36e Tested get/set functions
Found out every function that uses this has problems: when calling an object method as an input callback, this gets replaced with the element that triggered the event.
2021-07-09 23:44:04 +02:00
Leamsi Escribano
ba50aa3369 addColor Refactor 2021-07-04 17:36:15 -04:00
Leamsi Escribano
4d4878c4fa Refactored addColor.js 2021-07-04 13:55:49 -04:00