Fixed generator issue and some template improvements
Some checks are pending
Validate HTML site / build (push) Waiting to run
4
dist/css/styles.css
vendored
|
@ -1,3 +1,7 @@
|
|||
[data-bs-theme="dark"] body {
|
||||
background-color: #1e1e1e !important;
|
||||
}
|
||||
|
||||
.form-check-input {
|
||||
clear: left;
|
||||
}
|
||||
|
|
2
dist/css/styles.min.css
vendored
|
@ -1 +1 @@
|
|||
.form-check-input{clear:left}.form-switch.form-switch-sm{margin-bottom:.5rem}.form-switch.form-switch-sm .form-check-input{height:1rem;width:calc(1rem + .75rem);border-radius:2rem}.form-switch.form-switch-md{margin-bottom:1rem}.form-switch.form-switch-md .form-check-input{height:1.5rem;width:calc(2rem + .75rem);border-radius:3rem}.form-switch.form-switch-lg{margin-bottom:1.5rem}.form-switch.form-switch-lg .form-check-input{height:2rem;width:calc(3rem + .75rem);border-radius:4rem}.form-switch.form-switch-xl{margin-bottom:2rem}.form-switch.form-switch-xl .form-check-input{height:2.5rem;width:calc(4rem + .75rem);border-radius:5rem}
|
||||
[data-bs-theme=dark] body{background-color:#1e1e1e!important}.form-check-input{clear:left}.form-switch.form-switch-sm{margin-bottom:.5rem}.form-switch.form-switch-sm .form-check-input{height:1rem;width:calc(1rem + .75rem);border-radius:2rem}.form-switch.form-switch-md{margin-bottom:1rem}.form-switch.form-switch-md .form-check-input{height:1.5rem;width:calc(2rem + .75rem);border-radius:3rem}.form-switch.form-switch-lg{margin-bottom:1.5rem}.form-switch.form-switch-lg .form-check-input{height:2rem;width:calc(3rem + .75rem);border-radius:4rem}.form-switch.form-switch-xl{margin-bottom:2rem}.form-switch.form-switch-xl .form-check-input{height:2.5rem;width:calc(4rem + .75rem);border-radius:5rem}
|
BIN
dist/img/favicon/apple-touch-icon.png
vendored
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
dist/img/favicon/favicon-48x48.png
vendored
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
dist/img/favicon/favicon.ico
vendored
Normal file
After Width: | Height: | Size: 15 KiB |
3
dist/img/favicon/favicon.svg
vendored
Normal file
After Width: | Height: | Size: 300 KiB |
21
dist/img/favicon/site.webmanifest
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "MyWebSite",
|
||||
"short_name": "MySite",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/web-app-manifest-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/web-app-manifest-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
BIN
dist/img/favicon/web-app-manifest-192x192.png
vendored
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
dist/img/favicon/web-app-manifest-512x512.png
vendored
Normal file
After Width: | Height: | Size: 72 KiB |
0
vp.png → dist/img/vp.png
vendored
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 225 KiB |
2
dist/js/calculator.js
vendored
|
@ -38,7 +38,7 @@ function buildJSON(supportsCMD, item, namespace, models) {
|
|||
if (supportsCMD) {
|
||||
//Insert custom model data models
|
||||
for (let i = 0; i < models.length; i++) {
|
||||
json['overrides'][i + 1] = {
|
||||
json['overrides'][i] = {
|
||||
'predicate': {
|
||||
'custom_model_data': i + 1
|
||||
},
|
||||
|
|
2
dist/js/calculator.min.js
vendored
|
@ -1 +1 @@
|
|||
const itemDamages={leather_helmet:55,leather_chestplate:80,leather_leggings:75,leather_boots:65,netherite_hoe:2031,diamond_axe:1561,diamond_hoe:1561,shears:238};function buildJSON(supportsCMD,item,namespace,models){namespace=namespace==="minecraft"?"":namespace+":";const json={};json["parent"]="item/handheld";json["textures"]={layer0:"item/"+item,layer1:"item/"+item+"_overlay"};json["overrides"]=[];if(supportsCMD){for(let i=0;i<models.length;i++){json["overrides"][i+1]={predicate:{custom_model_data:i+1},model:namespace+"item/"+models[i]}}}else{json["overrides"][0]={predicate:{damaged:0,damage:0},model:"item/"+item};for(let i=0;i<models.length;i++){json["overrides"][i+1]={predicate:{damaged:0,damage:((i+1)/(itemDamages[item]-1)).toFixed(6)},model:namespace+"item/"+models[i]}}json["overrides"][models.length+1]={predicate:{damaged:1,damage:0},model:"item/"+item}}return JSON.stringify(json,null,2)}
|
||||
const itemDamages={leather_helmet:55,leather_chestplate:80,leather_leggings:75,leather_boots:65,netherite_hoe:2031,diamond_axe:1561,diamond_hoe:1561,shears:238};function buildJSON(supportsCMD,item,namespace,models){namespace=namespace==="minecraft"?"":namespace+":";const json={};json["parent"]="item/handheld";json["textures"]={layer0:"item/"+item,layer1:"item/"+item+"_overlay"};json["overrides"]=[];if(supportsCMD){for(let i=0;i<models.length;i++){json["overrides"][i]={predicate:{custom_model_data:i+1},model:namespace+"item/"+models[i]}}}else{json["overrides"][0]={predicate:{damaged:0,damage:0},model:"item/"+item};for(let i=0;i<models.length;i++){json["overrides"][i+1]={predicate:{damaged:0,damage:((i+1)/(itemDamages[item]-1)).toFixed(6)},model:namespace+"item/"+models[i]}}json["overrides"][models.length+1]={predicate:{damaged:1,damage:0},model:"item/"+item}}return JSON.stringify(json,null,2)}
|
14
index.html
|
@ -2,7 +2,7 @@
|
|||
<html lang="en" data-bs-theme="dark">
|
||||
|
||||
<head>
|
||||
<title>Model File Generator · SBDevelopment</title>
|
||||
<title>Model File Generator | SBDevelopment</title>
|
||||
|
||||
<meta name="title" content="Model File Generator">
|
||||
<meta name="description" content="Easily generate the resourcepack asset files for your VehiclesPlus models.">
|
||||
|
@ -13,10 +13,16 @@
|
|||
|
||||
<meta name="theme-color" content="#f49604"/>
|
||||
|
||||
<link rel="icon" type="image/png" href="dist/img/favicon/favicon-48x48.png" sizes="48x48"/>
|
||||
<link rel="icon" type="image/svg+xml" href="dist/img/favicon/favicon.svg"/>
|
||||
<link rel="shortcut icon" href="dist/img/favicon/favicon.ico"/>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="dist/img/favicon/apple-touch-icon.png"/>
|
||||
<link rel="manifest" href="dist/img/favicon/site.webmanifest"/>
|
||||
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="Model File Generator">
|
||||
<meta property="og:url" content="https://vpmodelfiletool.sbdevelopment.tech/">
|
||||
<meta property="og:image" content="https://vpmodelfiletool.sbdevelopment.tech/vp.png">
|
||||
<meta property="og:image" content="https://vpmodelfiletool.sbdevelopment.tech/dist/img/vp.png">
|
||||
<meta property="og:description"
|
||||
content="Easily generate the resourcepack asset files for your VehiclesPlus models.">
|
||||
|
||||
|
@ -38,8 +44,8 @@
|
|||
<body>
|
||||
<div class="container">
|
||||
<div class="jumbotron my-4">
|
||||
<h1 class="display-4 pb-1"><img src="https://sbdevelopment.tech/wp-content/uploads/2023/09/logo2-light.png"
|
||||
alt="SBDevelopment logo" class="pe-1 pb-2" style="width: 3em;"> Model File
|
||||
<h1 class="display-4 pb-1"><img src="dist/img/vp.png"
|
||||
alt="VehiclesPlus" class="pe-1 pb-2" style="width: 2em;"> Model File
|
||||
Generator</h1>
|
||||
<p class="lead">Generate the resourcepack asset files for your VehiclesPlus models.</p>
|
||||
<hr class="mb-3">
|
||||
|
|