From f29d0b76ddd202d522db61095cf3b88d9a745787 Mon Sep 17 00:00:00 2001
From: Shauna Keating <59394696+shkeating@users.noreply.github.com>
Date: Thu, 14 Nov 2024 21:34:39 +0000
Subject: [PATCH 01/22] updates readme
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 1ea09f8..a484bdd 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ hackrew is a framework for making character creator/dressup game applets a la [p
### Step 1: start a web server
-The applet won't run correctly unless it's launched from a server. To launch it from your own machine, cd into the hackrew folder, run ./serve.sh (you'll need [Python 3 installed on your machine](https://www.python.org/downloads/)) from the command line and navigate to [http://localhost:8000/](http://localhost:8000/) in your browser. Once you're done developing your character creator, you can host it on a remote server, like Neocities or Github Pages.
+The applet won't run correctly unless it's launched from a server. To launch it from your own machine, cd into the hackrew folder, run `./serve.sh` (you'll need [Python 3 installed on your machine](https://www.python.org/downloads/)) from the command line and navigate to [http://localhost:8000/](http://localhost:8000/) in your browser. Once you're done developing your character creator, you can host it on a remote server, like Neocities or Github Pages.
### Step 2: specify your parts
The character creator applet's visual components are comprised of "parts" (ex: "body", "ears", "tail", "accessories"), which have varieties called "items" (ex: the items for ears are "small" and "big"). Each item is represented by a .png image with a transparent background. The applet allows the user to create different characters by layering different item .pngs on top of each other.
From 948041da864281094bb3fc0a53c07518abb86ee4 Mon Sep 17 00:00:00 2001
From: Shauna Keating <59394696+shkeating@users.noreply.github.com>
Date: Sun, 17 Nov 2024 17:19:27 +0000
Subject: [PATCH 02/22] edits attribution text
---
index.html | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/index.html b/index.html
index b1d4f72..4c725ec 100644
--- a/index.html
+++ b/index.html
@@ -11,13 +11,9 @@
- I made this applet using my open-source character creator
+ I made this applet using the open-source character creator
framework, hackrew.
-
- If you're interested in making your own, I suggest
- checking out the linked Github repository for documentation.
-
- I made this applet using the open-source character creator
+ This builder is based on the open-source character creator
framework, hackrew(opens in a new window).
From 8a8f6afa0e29238ac3f66bc73e55fe1a1a578c95 Mon Sep 17 00:00:00 2001
From: Shauna Keating <59394696+shkeating@users.noreply.github.com>
Date: Sun, 17 Nov 2024 17:26:19 +0000
Subject: [PATCH 05/22] updates readme to recommend github pages
---
README.md | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index a484bdd..a43f143 100644
--- a/README.md
+++ b/README.md
@@ -51,11 +51,8 @@ The script will take a while to run, but at the end you'll have your color varia
### Step 4: edit the UI
To change the colors and graphics of the UI, edit the variables at the top of index.css.
-### Step 5: host your applet
+### Step 5: host your avatar builder
The only files that you need to host your applet are index.html, index.css imagemaker.js, and the imagemakerAssets folder. To host on Github pages, fork this repo, customize the files, and follow the intrucutions [here](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site).
-To host on Neocities, make a new folder to contain your project (in my [example page](https://cherrvak.neocities.org/furrycreator/index.html), the folder is called "furrycreator"). Place the files index.html, index.css and imagemaker.js in this folder. Then place the folder imagemakerAssets in the same directory, but be careful to preserve the subfolder structure: the Neocities drag-and-drop GUI won't preserve the seperate folders for each part, which will break the code, so you're better off making a folder called imagemakerAssets and dragging-and-dropping in each part folder one-by-one. Then your completed applet will be on the page `https://your-neocities-page.neocities.org/your-folder-name/` (ex: https://cherrvak.neocities.org/furrycreator/)
-
-## TODO
-- Add item shift button or draggable items?
\ No newline at end of file
+Since this repo generates a static site, you can turn on Github Pages in the Settings of the Repo and it should automatically deploy for you, detecting the presence of an index.html file. It will host your builder at `yourRepoName.github.io`. You can change the name of your repository to get a URL you like.
From ab2cc46ced8a40a6cdeaed70149c26c6137872f4 Mon Sep 17 00:00:00 2001
From: Shauna Keating <59394696+shkeating@users.noreply.github.com>
Date: Sun, 17 Nov 2024 17:26:47 +0000
Subject: [PATCH 06/22] updates readme to recommend github pages
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index a43f143..16fd638 100644
--- a/README.md
+++ b/README.md
@@ -56,3 +56,5 @@ To change the colors and graphics of the UI, edit the variables at the top of in
The only files that you need to host your applet are index.html, index.css imagemaker.js, and the imagemakerAssets folder. To host on Github pages, fork this repo, customize the files, and follow the intrucutions [here](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site).
Since this repo generates a static site, you can turn on Github Pages in the Settings of the Repo and it should automatically deploy for you, detecting the presence of an index.html file. It will host your builder at `yourRepoName.github.io`. You can change the name of your repository to get a URL you like.
+
+Pushing your changes to main will trigger a deploy.
From 1f92060d0f3a73f1d8880915634835e2e65de9aa Mon Sep 17 00:00:00 2001
From: Shauna Keating <59394696+shkeating@users.noreply.github.com>
Date: Sun, 17 Nov 2024 17:28:48 +0000
Subject: [PATCH 07/22] adds context to info section
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 16fd638..e7cd75a 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
hackrew is a framework for making character creator/dressup game applets a la [picrew](https://picrew.me/). You can check out an online demo [here](https://ksadov.github.io/hackrew/), or see a more complex version on [Neocities](https://cherrvak.neocities.org/furrycreator/index.html). To make your own character creator, fork this repo or download the files and follow the instructions below.
+This builder uses hackrew as a base, and implements some accessibility improvements to allow more users to interact with it.
+
## Instructions
### Step 1: start a web server
From af27929a0cdf80af35b335bcb7d83fbbd7e1524b Mon Sep 17 00:00:00 2001
From: Shauna Keating <59394696+shkeating@users.noreply.github.com>
Date: Sun, 17 Nov 2024 17:51:34 +0000
Subject: [PATCH 08/22] adds event listener for enter key to controls buttons
---
imagemaker.js | 41 +++++++++++++++++++++++++++++++++++++----
1 file changed, 37 insertions(+), 4 deletions(-)
diff --git a/imagemaker.js b/imagemaker.js
index 237935b..0015944 100644
--- a/imagemaker.js
+++ b/imagemaker.js
@@ -85,13 +85,46 @@ window.addEventListener('load', function(ev) {
* Assign functions to buttons.
*/
function initButtons() {
- randomButton.addEventListener('click', randomize);
- infoButton.addEventListener('click', toggleInfo);
- paletteButton.addEventListener('click', togglePalette);
- itemsButton.addEventListener('click', toggleItems);
+ randomButton.addEventListener('click', randomize).addEventListener("keypress", function(event) {
+ if (event.key === "Enter") {
+ event.preventDefault();
+ document.getElementById(randomButton).click();
+ }
+ });
+ infoButton.addEventListener('click', toggleInfo).addEventListener("keypress", function(event) {
+ if (event.key === "Enter") {
+ event.preventDefault();
+ document.getElementById(infoButton).click();
+ }
+ });
+ paletteButton.addEventListener('click', togglePalette).addEventListener("keypress", function(event) {
+ if (event.key === "Enter") {
+ event.preventDefault();
+ document.getElementById(paletteButton).click();
+ }
+ });
+ itemsButton.addEventListener('click', toggleItems).addEventListener("keypress", function(event) {
+ // If the user presses the "Enter" key on the keyboard
+ if (event.key === "Enter") {
+ // Cancel the default action, if needed
+ event.preventDefault();
+ // Trigger the button element with a click
+ document.getElementById("myBtn").click();
+ }
+ });
return null;
}
+ .addEventListener("keypress", function(event) {
+ // If the user presses the "Enter" key on the keyboard
+ if (event.key === "Enter") {
+ // Cancel the default action, if needed
+ event.preventDefault();
+ // Trigger the button element with a click
+ document.getElementById("myBtn").click();
+ }
+});
+
/**
* Initialize partsElements, itemsElements
*/
From 30c271cf0035e0b395987fa8a0fc7c1c8c0ea82b Mon Sep 17 00:00:00 2001
From: Shauna Keating <59394696+shkeating@users.noreply.github.com>
Date: Sun, 17 Nov 2024 17:52:18 +0000
Subject: [PATCH 09/22] cleans up items button event listener
---
imagemaker.js | 5 +----
index.css | 5 -----
index.html | 5 ++---
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/imagemaker.js b/imagemaker.js
index 0015944..4ac85dc 100644
--- a/imagemaker.js
+++ b/imagemaker.js
@@ -104,12 +104,9 @@ window.addEventListener('load', function(ev) {
}
});
itemsButton.addEventListener('click', toggleItems).addEventListener("keypress", function(event) {
- // If the user presses the "Enter" key on the keyboard
if (event.key === "Enter") {
- // Cancel the default action, if needed
event.preventDefault();
- // Trigger the button element with a click
- document.getElementById("myBtn").click();
+ document.getElementById(itemsButton).click();
}
});
return null;
diff --git a/index.css b/index.css
index c3c3703..7fc286a 100644
--- a/index.css
+++ b/index.css
@@ -321,8 +321,6 @@ body {
position: absolute;
font-size: 3vh;
background-color: var(--loading-bg-color, #FFFFFF);
- //padding: 3px;
- //bottom: 4px;
}
.imagemaker_canvas_wrapper canvas {
@@ -336,9 +334,6 @@ body {
.imagemaker_ctrl_buttons {
- position: absolute;
- width: 50px;
- height: 50px;
z-index: 0;
}
diff --git a/index.html b/index.html
index 06cf9cd..a739326 100644
--- a/index.html
+++ b/index.html
@@ -26,9 +26,8 @@
Loading...
-
-
-
+
+
From e94a8cc26f9ad37ab7a4edb48965810bc9fb77e4 Mon Sep 17 00:00:00 2001
From: Shauna Keating <59394696+shkeating@users.noreply.github.com>
Date: Sun, 17 Nov 2024 17:52:43 +0000
Subject: [PATCH 10/22] removes broken code block
---
imagemaker.js | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/imagemaker.js b/imagemaker.js
index 4ac85dc..f318633 100644
--- a/imagemaker.js
+++ b/imagemaker.js
@@ -112,15 +112,6 @@ window.addEventListener('load', function(ev) {
return null;
}
- .addEventListener("keypress", function(event) {
- // If the user presses the "Enter" key on the keyboard
- if (event.key === "Enter") {
- // Cancel the default action, if needed
- event.preventDefault();
- // Trigger the button element with a click
- document.getElementById("myBtn").click();
- }
-});
/**
* Initialize partsElements, itemsElements
From e9d334074210fd91158f081699594da78204ebeb Mon Sep 17 00:00:00 2001
From: Shauna Keating <59394696+shkeating@users.noreply.github.com>
Date: Sun, 17 Nov 2024 17:59:14 +0000
Subject: [PATCH 11/22] adds title to index
---
index.html | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index a739326..45c42a4 100644
--- a/index.html
+++ b/index.html
@@ -3,6 +3,7 @@
+ Character Builder
@@ -18,7 +19,7 @@