valeriavg / pixel-vg Goto Github PK
View Code? Open in Web Editor NEWWebGL Pixel Editor
Home Page: https://pixel-vg-6ijid.ondigitalocean.app/
License: MIT License
WebGL Pixel Editor
Home Page: https://pixel-vg-6ijid.ondigitalocean.app/
License: MIT License
Currently, the only way to edit the palette is to hardcode colour values on a local copy.
Let's ability to add and remove colours from the palette.
Example implementation:
#ff0000
for red )Currently, cypress tests are failing during CI runs.
Store creations along with user information to show on the website and in the repo.
One possible way to do it:
routes/gallery/index.ts
routes/gallery/images.json
static/gallery
folderroutes/gallery/index.ts
Currently, the only way to clean the whole board is to either reload the page or choose "Eraser" and clean all points one by one.
Let's add a "Clear" button, that would:
Currently, the editor uses default prompts, which are limited to only one text field.
In some cases, e.g. to save images without the grid, additional fields are required.
Let's create a custom Svelte component to be rendered atop of all content (position:fixed; z-index:N
), that would have configurable slots for:
And replace window.prompt
etc with this new component.
There is a visual image diff test in cypress/integration/drawing.spec.ts
that draws a line and checks that it matches the screenshot.
Let's test that mirror functionality works correctly as well:
x|x
is activatedy|y
is activatedx|x
and y|y
are activatedAdd SEO titles to:
When I use npm run dev
, I get:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
[email protected] D:\pixel-vg
+-- UNMET DEPENDENCY @sveltejs/adapter-static@^1.0.0-next.20
+-- UNMET DEPENDENCY @sveltejs/kit@next
+-- UNMET DEPENDENCY @testing-library/jest-dom@^5.14.1
+-- UNMET DEPENDENCY @testing-library/svelte@^3.0.3
+-- UNMET DEPENDENCY @types/jest@^27.0.2
+-- UNMET DEPENDENCY @typescript-eslint/eslint-plugin@^4.31.1
+-- UNMET DEPENDENCY @typescript-eslint/parser@^4.31.1
+-- UNMET DEPENDENCY canvas@^2.8.0
+-- UNMET DEPENDENCY cypress-img-snapshot@^1.0.0
+-- UNMET DEPENDENCY cypress@^8.5.0
+-- UNMET DEPENDENCY eslint-config-prettier@^8.3.0
+-- UNMET DEPENDENCY eslint-plugin-svelte3@^3.2.1
+-- UNMET DEPENDENCY eslint@^7.32.0
+-- UNMET DEPENDENCY jest@^27.2.4
+-- UNMET DEPENDENCY milligram@^1.4.1
+-- UNMET DEPENDENCY prettier-plugin-svelte@^2.4.0
+-- UNMET DEPENDENCY prettier@^2.4.1
+-- UNMET DEPENDENCY start-server-and-test@^1.14.0
+-- UNMET DEPENDENCY svelte-check@^2.2.6
+-- UNMET DEPENDENCY svelte-jester@^2.1.5
+-- UNMET DEPENDENCY svelte-preprocess@^4.9.4
+-- UNMET DEPENDENCY svelte@^3.44.0
+-- UNMET DEPENDENCY ts-jest@^27.0.5
+-- UNMET DEPENDENCY tslib@^2.3.1
`-- UNMET DEPENDENCY typescript@^4.4.3
npm ERR! code ELSPROBLEMS
npm ERR! missing: @sveltejs/adapter-static@^1.0.0-next.20, required by [email protected]
npm ERR! missing: @sveltejs/kit@next, required by [email protected]
npm ERR! missing: @testing-library/jest-dom@^5.14.1, required by [email protected]
npm ERR! missing: @testing-library/svelte@^3.0.3, required by [email protected]
npm ERR! missing: @types/jest@^27.0.2, required by [email protected]
npm ERR! missing: @typescript-eslint/eslint-plugin@^4.31.1, required by [email protected]
npm ERR! missing: @typescript-eslint/parser@^4.31.1, required by [email protected]
npm ERR! missing: canvas@^2.8.0, required by [email protected]
npm ERR! missing: cypress-img-snapshot@^1.0.0, required by [email protected]
npm ERR! missing: cypress@^8.5.0, required by [email protected]
npm ERR! missing: eslint-config-prettier@^8.3.0, required by [email protected]
npm ERR! missing: eslint-plugin-svelte3@^3.2.1, required by [email protected]
npm ERR! missing: eslint@^7.32.0, required by [email protected]
npm ERR! missing: jest@^27.2.4, required by [email protected]
npm ERR! missing: milligram@^1.4.1, required by [email protected]
npm ERR! missing: prettier-plugin-svelte@^2.4.0, required by [email protected]
npm ERR! missing: prettier@^2.4.1, required by [email protected]
npm ERR! missing: start-server-and-test@^1.14.0, required by [email protected]
npm ERR! missing: svelte-check@^2.2.6, required by [email protected]
npm ERR! missing: svelte-jester@^2.1.5, required by [email protected]
npm ERR! missing: svelte-preprocess@^4.9.4, required by [email protected]
npm ERR! missing: svelte@^3.44.0, required by [email protected]
npm ERR! missing: ts-jest@^27.0.5, required by [email protected]
npm ERR! missing: tslib@^2.3.1, required by [email protected]
npm ERR! missing: typescript@^4.4.3, required by [email protected]
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mikwee\AppData\Local\npm-cache\_logs\2022-10-11T15_45_59_623Z-debug-0.log
When I try to install all these packages, I get:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm notice
npm notice New minor version of npm available! 8.11.0 -> 8.19.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.19.2
npm notice Run npm install -g [email protected] to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @sveltejs/[email protected]
npm ERR! node_modules/@sveltejs/kit
npm ERR! dev @sveltejs/kit@"1.0.0-next.513" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @sveltejs/kit@"1.0.0-next.513" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vite
npm ERR! peer vite@"^3.1.0" from @sveltejs/[email protected]
npm ERR! node_modules/@sveltejs/kit
npm ERR! dev @sveltejs/kit@"1.0.0-next.513" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\mikwee\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mikwee\AppData\Local\npm-cache\_logs\2022-10-11T15_51_48_465Z-debug-0.log
Why is that? I know this repository hasn't been active for a year, but I'm still trying my luck. Thank you!
Currently, the editor looks like it's still 1997.
Let make it look modern, by providing an src/routes/__layout.svelte
file with styles & header/footer markup.
As a suggestion, Milligram CSS can be used to make it faster
I think it'll be nice to have pixel-art SVG icons and therefore, the editor should be able to:
<path d="M150 0 L75 200 L225 200 Z" />
)Currently, the only way to change the size of the drawing board is to change the hardcoded value on the local copy.
Let's add the ability to set the size
variable via UI.
For example:
<input type="number" />
size
variablerender()
on size changeCurrently, the only way to save the drawing is to use browser built-in canvas "Save image as..."
It would be much more convenient to just click the "Save" button.
To save canvas contents using canvas.toDataURL one would need to create a new canvas with 2d
context, as the main one will have 2d
context always null
Currently, generated SVG draws each square separately, but it's possible to group pixels together into smaller paths.
Currently, when the image is saved it's always saved with the grid, which may not be the intended behaviour.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.