mirror of
https://github.com/lukasabbe/skin-pack-website.git
synced 2026-04-30 10:50:52 +00:00
Add readme and changed text on website
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
# An project
|
||||||
|
|
||||||
|
A project for generating skins like this:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
Go to https://gen.lukasabbe.com to generate your first pack
|
||||||
|
|
||||||
|
Pls don't blow up my computer from the requests :)
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
class="hover:text-blue-600 dark:hover:text-blue-400"
|
class="hover:text-blue-600 dark:hover:text-blue-400"
|
||||||
>
|
>
|
||||||
GitHub
|
My GitHub
|
||||||
</a>
|
</a>
|
||||||
<span>•</span>
|
<span>•</span>
|
||||||
<a
|
<a
|
||||||
@@ -81,6 +81,14 @@
|
|||||||
>
|
>
|
||||||
My Website
|
My Website
|
||||||
</a>
|
</a>
|
||||||
|
<span>•</span>
|
||||||
|
<a
|
||||||
|
href="https://github.com/lukasabbe/skin-pack-website"
|
||||||
|
target="_blank"
|
||||||
|
class="hover:text-blue-600 dark:hover:text-blue-400"
|
||||||
|
>
|
||||||
|
GitHub Repo
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<p class="mt-2 text-xs text-gray-500 dark:text-gray-500">
|
<p class="mt-2 text-xs text-gray-500 dark:text-gray-500">
|
||||||
© {new Date().getFullYear()} Lukas HB. All rights reserved.
|
© {new Date().getFullYear()} Lukas HB. All rights reserved.
|
||||||
|
|||||||
+20
-12
@@ -141,6 +141,13 @@
|
|||||||
|
|
||||||
let cases: { when: string; model: { type: string; model: string } }[] = [];
|
let cases: { when: string; model: { type: string; model: string } }[] = [];
|
||||||
|
|
||||||
|
const oldModel = await fetch('/old.json');
|
||||||
|
const oldModelJson = await oldModel.json();
|
||||||
|
const slimModel = await fetch('/slim.json');
|
||||||
|
const slimModelJson = await slimModel.json();
|
||||||
|
const normalModel = await fetch('/normal.json');
|
||||||
|
const normalModelJson = await normalModel.json();
|
||||||
|
|
||||||
for (const profile of data.data) {
|
for (const profile of data.data) {
|
||||||
const image = await fetch(
|
const image = await fetch(
|
||||||
`/api/get-skin/${profile.MinecraftSkinData.skinUrl.split('texture/')[1]}`
|
`/api/get-skin/${profile.MinecraftSkinData.skinUrl.split('texture/')[1]}`
|
||||||
@@ -149,18 +156,16 @@
|
|||||||
texturesFolder.file(`${profile.MinecraftUsername}.png`, imageBlob);
|
texturesFolder.file(`${profile.MinecraftUsername}.png`, imageBlob);
|
||||||
const { height } = await getImageDimensions(imageBlob);
|
const { height } = await getImageDimensions(imageBlob);
|
||||||
|
|
||||||
let modelRes;
|
let model;
|
||||||
|
|
||||||
if (height == 32) {
|
if (height == 32) {
|
||||||
modelRes = await fetch('/old.json');
|
model = oldModelJson;
|
||||||
} else if (profile.MinecraftSkinData.model == 'SLIM') {
|
} else if (profile.MinecraftSkinData.model == 'SLIM') {
|
||||||
modelRes = await fetch('/slim.json');
|
model = slimModelJson;
|
||||||
} else if (profile.MinecraftSkinData.model == 'CLASSIC') {
|
} else if (profile.MinecraftSkinData.model == 'CLASSIC') {
|
||||||
modelRes = await fetch('/normal.json');
|
model = normalModelJson;
|
||||||
} else return;
|
} else return;
|
||||||
|
|
||||||
const model = await modelRes.json();
|
|
||||||
|
|
||||||
model.textures['0'] = `trusted_skin_pack:item/${profile.MinecraftUsername}`;
|
model.textures['0'] = `trusted_skin_pack:item/${profile.MinecraftUsername}`;
|
||||||
model.textures.particle = `trusted_skin_pack:item/${profile.MinecraftUsername}`;
|
model.textures.particle = `trusted_skin_pack:item/${profile.MinecraftUsername}`;
|
||||||
|
|
||||||
@@ -199,18 +204,21 @@
|
|||||||
<div class="flex flex-col gap-6">
|
<div class="flex flex-col gap-6">
|
||||||
<div class="space-y-3 text-sm text-gray-600 dark:text-gray-300">
|
<div class="space-y-3 text-sm text-gray-600 dark:text-gray-300">
|
||||||
<p>
|
<p>
|
||||||
Welcome to the Minecraft Skin Pack Generator! This tool allows you generate a resource
|
<bold>Welcome to the Minecraft Skin Pack Generator!</bold>
|
||||||
pack with dynamic skins.
|
This tool allows you to generate a resource pack with dynamic skins.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Simply type in the usernames of the players below, press Space or Enter to add them, and
|
Simply type in the usernames of the players below, press Space or Enter to add them, and
|
||||||
click "Download Pack".
|
click "Download Pack."
|
||||||
</p>
|
</p>
|
||||||
<h2 class="text-m font-bold text-gray-800 dark:text-white">How to use</h2>
|
<h2 class="text-m font-bold text-gray-800 dark:text-white">How to use</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>1. Put the zip file in your Minecraft resource packs folder.</li>
|
<li>1. Put the .zip file into your Minecraft resource packs folder.</li>
|
||||||
<li>2. Rename a carved pumkin to a skin you inputed when you generated the pack.</li>
|
<li>
|
||||||
<li>3. The pumkin will get the model of the skin you inputed.</li>
|
2. In-game, rename a carved pumpkin to a username you entered when you generated the
|
||||||
|
pack.
|
||||||
|
</li>
|
||||||
|
<li>3. The pumpkin will take on the model of the skin you entered.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ function chunkArray<T>(list: T[]): T[][] {
|
|||||||
const chunkedList: T[][] = [];
|
const chunkedList: T[][] = [];
|
||||||
|
|
||||||
for (let i = 0; i < list.length; i += chunkSize) {
|
for (let i = 0; i < list.length; i += chunkSize) {
|
||||||
// .slice() automatically handles cases where there are fewer than 10 elements left
|
|
||||||
chunkedList.push(list.slice(i, i + chunkSize));
|
chunkedList.push(list.slice(i, i + chunkSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user