Merge remote-tracking branch 'origin/master'

master
wanghao 3 months ago
commit 2692d5f280

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -120,22 +120,99 @@
border-top: 10px solid rgba(23, 48, 97, 0.8);
}
.sign {
}
.sign .content{
background-image: url("/img/model/sign.png");
background-size: 100% 100%;
background-repeat: no-repeat;
width: 5vw;
height: 6.42vw;
transform: translateY(-50%);
position: relative;
}
.sign .content .title {
position: absolute;
top: 15%;
font-size: 0.6vw;
color: #fff;
width: 100%;
text-align: center;
transform: translateY(-50%);
}
.pageTitle{
position: absolute;
transform: translateY(-50%);
top: 4%;
width: 100%;
left: 0;
text-align: center;
letter-spacing: 2px;
font-size: 2vw;
color: #fff;
}
</style>
<body class="gray-bg">
<!-- 29.4 39.8 50.1 59.6 68.8 -->
<div>
<div class="bg"></div>
<div id="three" style="width: 100vw;height: 100vh;position:absolute;top: 0;left: 0;"></div>
<div class="pageTitle">机场轮档平台</div>
<div id="three" style="width: 100vw;height: 82vh;position:absolute;top: 9%;left: 0;"></div>
<div class="btns" id="btns">
</div>
<div class="threeLabel" id="threeLabel">
<div class="threeLabelContent" id="threeLabelContent"></div>
</div>
<div class="sign" id="sign1">
<div class="content">
<span class="title">1号试车坪</span>
</div>
</div>
<div class="sign" id="sign2">
<div class="content">
<span class="title">2号口</span>
</div>
</div>
<div class="sign" id="sign3">
<div class="content">
<span class="title">3号口</span>
</div>
</div>
<div class="sign" id="sign4">
<div class="content">
<span class="title">4号口</span>
</div>
</div>
<div class="sign" id="sign5">
<div class="content">
<span class="title">3号试车坪</span>
</div>
</div>
<div class="sign" id="sign6">
<div class="content">
<span class="title">3号坪</span>
</div>
</div>
<div class="sign" id="sign7">
<div class="content">
<span class="title">2号除冰坪</span>
</div>
</div>
<div class="sign" id="sign8">
<div class="content">
<span class="title">4号除冰坪</span>
</div>
</div>
<div class="sign" id="sign9">
<div class="content">
<span class="title">轮挡仓库</span>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<script>
let scene = null
let label = null
let controls = null
let camera = null
let tween = null
@ -151,7 +228,7 @@
tween = TWEEN
scene = new THREE.Scene()
// scene.background = new THREE.Color(0x000000,0)
camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100000);
camera = new THREE.PerspectiveCamera(75, window.innerWidth / (window.innerHeight), 0.1, 100000);
const pointLight = new THREE.PointLight(0xffffff, 10) //光源颜色 光照强度
const ambient = new THREE.AmbientLight(0xffffff, 2)
const light = new THREE.DirectionalLight(0xffffff, 1)
@ -163,15 +240,15 @@
})
renderer.setClearColor(0x000000, 0)
controls = new OrbitControls(camera, renderer.domElement)
renderer.setSize(window.innerWidth, window.innerHeight)
renderer.setSize(window.innerWidth, window.innerHeight * 0.82)
camera.position.set(-298,4839,734)
camera.position.set(-363, 3719, 585)
camera.rotation.x = -1.57
camera.rotation.y = -6.10
camera.rotation.y = 0
camera.rotation.z = 0
camera.updateProjectionMatrix()
controls.target = new THREE.Vector3(-298,612,734)
controls.target = new THREE.Vector3(-363, 612, 585)
controls.update()
// scene.add(pointLight)
scene.add(ambient)
@ -185,10 +262,34 @@
labelRenderer.domElement.style.top = '0'
labelRenderer.domElement.style.pointerEvents = 'none'
document.body.appendChild(labelRenderer.domElement)
// label = new CSS2DObject(document.getElementById('threeLabel'))
// label.position.set(-999999, -999999, -999999)
// scene.add(label)
let sign1 = new CSS2DObject(document.getElementById('sign1'))
let sign2 = new CSS2DObject(document.getElementById('sign2'))
let sign3 = new CSS2DObject(document.getElementById('sign3'))
let sign4 = new CSS2DObject(document.getElementById('sign4'))
let sign5 = new CSS2DObject(document.getElementById('sign5'))
let sign6 = new CSS2DObject(document.getElementById('sign6'))
let sign7 = new CSS2DObject(document.getElementById('sign7'))
let sign8 = new CSS2DObject(document.getElementById('sign8'))
let sign9 = new CSS2DObject(document.getElementById('sign9'))
sign1.position.set(-3008, -0.131, -908)
sign2.position.set(-1462, -0.131, -809)
sign3.position.set(-1757, -0.11, -1312)
sign4.position.set(1320, -0 / 131, -1014)
sign5.position.set(829, -0.51, 128)
sign6.position.set(-704, -0.131, 1140)
sign7.position.set(-1232, -0.109, 1724)
sign8.position.set(-1102, -0.131, 1861)
sign9.position.set(1308, -2.7, 1974)
scene.add(sign1)
scene.add(sign2)
scene.add(sign3)
scene.add(sign4)
scene.add(sign5)
scene.add(sign6)
scene.add(sign7)
scene.add(sign8)
scene.add(sign9)
const geometry = new THREE.BoxGeometry(1, 1, 1);
const material = new THREE.MeshBasicMaterial({color: 0x00ff00});
@ -260,8 +361,6 @@
})
$.post(ctx + 'api/getCountNumberById', {id: id.toString()}, (e) => {
console.log(e)
// label.position.set(405, -5, 3423)
$("#threeLabelContent").css('display', 'block')
$("#threeLabelContent").html(e.data.map(v => `<p>名称:${v.areaName} 编号:${v.locationCode} 数量: ${v.countNumber}</p>`).join('<br>'))

Loading…
Cancel
Save