66 lines
2.0 KiB
HTML
66 lines
2.0 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<title>集装箱装箱计算器</title>
|
||
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
||
|
|
<style>
|
||
|
|
#container {
|
||
|
|
display: flex;
|
||
|
|
gap: 20px;
|
||
|
|
padding: 20px;
|
||
|
|
}
|
||
|
|
#controls {
|
||
|
|
width: 300px;
|
||
|
|
padding: 20px;
|
||
|
|
background: #f0f0f0;
|
||
|
|
}
|
||
|
|
.input-group {
|
||
|
|
margin: 10px 0;
|
||
|
|
}
|
||
|
|
input {
|
||
|
|
width: 100%;
|
||
|
|
padding: 5px;
|
||
|
|
margin: 5px 0;
|
||
|
|
}
|
||
|
|
button {
|
||
|
|
padding: 10px 20px;
|
||
|
|
background: #4CAF50;
|
||
|
|
color: white;
|
||
|
|
border: none;
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
#visualization {
|
||
|
|
width: 800px;
|
||
|
|
height: 600px;
|
||
|
|
border: 1px solid #ccc;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div id="container">
|
||
|
|
<div id="controls">
|
||
|
|
<h2>集装箱参数</h2>
|
||
|
|
<div class="input-group">
|
||
|
|
<label>长度: <input type="number" id="contLength" step="0.1"></label>
|
||
|
|
<label>宽度: <input type="number" id="contWidth" step="0.1"></label>
|
||
|
|
<label>高度: <input type="number" id="contHeight" step="0.1"></label>
|
||
|
|
<label>承重上限: <input type="number" id="contWeight" step="0.1"></label>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<h2>纸箱参数</h2>
|
||
|
|
<div class="input-group">
|
||
|
|
<label>长度: <input type="number" id="boxLength" step="0.1"></label>
|
||
|
|
<label>宽度: <input type="number" id="boxWidth" step="0.1"></label>
|
||
|
|
<label>高度: <input type="number" id="boxHeight" step="0.1"></label>
|
||
|
|
<label>重量: <input type="number" id="boxWeight" step="0.1"></label>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<button onclick="calculate()">开始计算</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="visualization"></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<script src="main.js"></script>
|
||
|
|
</body>
|
||
|
|
</html>
|