This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
VPModelFileTool/index.html

100 lines
5.5 KiB
HTML
Raw Normal View History

<!doctype html>
<html lang="en" data-bs-theme="dark">
2023-01-20 18:51:33 +00:00
<head>
<title>Model File Generator · SBDevelopment</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css"
integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg=="
2023-01-20 18:51:33 +00:00
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
2023-01-20 18:51:33 +00:00
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="dist/css/beautify.min.css">
<link rel="stylesheet" href="dist/css/styles.min.css">
<link rel="icon" href="https://sbdevelopment.tech/wp-content/uploads/2021/06/cropped-logo1-favicon-1-32x32.png"
type="image/png">
</head>
2023-01-20 18:51:33 +00:00
<body>
2023-01-20 18:51:33 +00:00
<div class="container">
<div class="jumbotron my-4">
2024-04-14 15:36:28 +00:00
<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 Generator</h1>
<p class="lead">Generate the resourcepack asset files for your VehiclesPlus models.</p>
2024-04-14 15:36:28 +00:00
<hr class="mb-3">
<p class="fst-italic">You indicate which item you want to use and the path to the models models for each
value. This tool then
2023-01-20 18:51:33 +00:00
creates the .json file for you.</p>
</div>
2023-01-20 18:51:33 +00:00
<form id="calculatorForm">
2024-04-14 15:36:28 +00:00
<div class="mb-3 w-50" ?>
<label for="custommodeldata">Custom model data (1.14+):</label>
<div class="form-check form-switch form-switch-lg">
<input class="form-check-input" type="checkbox" role="switch" id="custommodeldata" checked>
</div>
2024-04-14 15:36:28 +00:00
<div class="form-text" id="namespace-help">1.14+ supports custom model data, which is preferred by
VehiclesPlus. If you
use 1.13 or lower, the calculator works with damage values.</div>
2024-04-14 15:36:28 +00:00
</div>
<div class="mb-3 w-50">
<label for="namespace">Namespace:</label>
<input type="text" class="form-control" id="namespace" name="namespace" required value="vp">
<div class="form-text" id="namespace-help">The example resourcepack places files in the '<b>vp</b>'
namespace. If
you use the 'minecraft' namespace, change it to <b>minecraft</b>.
</div>
</div>
<div class="mb-3 w-50">
<label for="item">Item:</label>
2023-01-20 18:51:33 +00:00
<select class="form-control" id="item" name="item" required>
<option value="" selected>Select an item...</option>
</select>
<div class="form-text" id="item-help">Select the item you want to use. If you want to support colors,
use a Leather item.</div>
</div>
2023-01-20 18:51:33 +00:00
<div id="formItems" style="display: none;">
<div class="mb-3 w-50">
2023-01-20 18:51:33 +00:00
<label for="itemcount">The amount of models:</label>
<div class="input-group">
<button type="button" class="btn btn-outline-danger btn-number" id="minus" disabled>
2023-01-20 18:51:33 +00:00
<span class="fas fa-minus"></span>
</button>
<input type="text" id="itemcount" name="quant" class="form-control input-number" value="1"
min="1" max="1" readonly>
<button type="button" class="btn btn-outline-success btn-number" id="plus" disabled>
2023-01-20 18:51:33 +00:00
<span class="fas fa-plus"></span>
</button>
</div>
</div>
<div id="items">
<div id="iteminput1" class="mb-3 w-50">
2024-04-14 15:36:28 +00:00
<label for="item1" class="form-label">Model for value 1:</label>
<div class="input-group mb-3">
2024-04-14 15:36:28 +00:00
<span class="input-group-text" id="namespace1">vp:item/</span>
<input type="text" class="form-control" id="item1" name="item1" placeholder="cars/blue_car"
required>
</div>
2023-01-20 18:51:33 +00:00
</div>
</div>
2023-01-20 18:51:33 +00:00
<button type="submit" class="btn btn-primary">Calculate</button>
</div>
2023-01-20 18:51:33 +00:00
</form>
2024-04-14 15:36:28 +00:00
<hr class="mb-3">
2023-01-20 18:51:33 +00:00
<h6>Output JSON:</h6>
<pre id="content" class="mb-3 w-50">Fill in the form above to get an output.</pre>
<button id="copyButton" class="btn btn-primary mb-3 mr-3">Copy</button>
<a id="downloadButton" class="btn btn-secondary mb-3" href="#">Download</a>
</div>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
2023-01-20 18:51:33 +00:00
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="application/javascript" src="dist/js/calculator.min.js"></script>
<script type="application/javascript" src="dist/js/beautify.min.js"></script>
<script type="application/javascript" src="dist/js/scripts.min.js"></script>
2023-01-20 18:51:33 +00:00
</html>