唐润平: 传感器添加删除、标签文字设置、双击进入视角、双击空白回退视角、角度和缩放限制、细节修改
This commit is contained in:
@@ -194,7 +194,7 @@ const equipment = {
|
||||
p {
|
||||
width: 388px;
|
||||
height: 35px;
|
||||
font-size: 26px;
|
||||
font-size: 24px;
|
||||
font-family: MicrosoftYaHei;
|
||||
color: #ffffff;
|
||||
line-height: 35px;
|
||||
|
||||
@@ -182,10 +182,9 @@ export default class Demo {
|
||||
);
|
||||
//初始化轨道控制器
|
||||
this.orbitControls.object.position.set(-29, 18, -50);
|
||||
// this.orbitControls.maxPolarAngle = Math.PI * (3.17 / 3);
|
||||
// this.orbitControls.minPolarAngle = Math.PI * (2 / 3);
|
||||
// this.orbitControls.minDistance = 19;
|
||||
// this.orbitControls.maxDistance = 87;
|
||||
this.orbitControls.maxPolarAngle = (4 * Math.PI) / 7;
|
||||
this.orbitControls.minDistance = 5;
|
||||
this.orbitControls.maxDistance = 87;
|
||||
// 监听控制器变化
|
||||
this.orbitControls.addEventListener("end", handleEndChange.bind(this));
|
||||
this.orbitControls.addEventListener("start", handleStartChange.bind(this));
|
||||
|
||||
@@ -22,6 +22,7 @@ function addEquipment(targetPoint, formInfo) {
|
||||
}
|
||||
targetPoint.hasDevice = true;
|
||||
// 标识设备信息
|
||||
this.clearTagsObj();
|
||||
}
|
||||
// 其他传感器
|
||||
function handleOtherEqu(targetPoint, EqeName) {
|
||||
|
||||
@@ -42,4 +42,5 @@ export function handleEndChange(e) {
|
||||
// .getObjectByName("point_001_tr")
|
||||
// .getWorldPosition(new this.THREE.Vector3())
|
||||
// );
|
||||
console.log(this.orbitControls.distance);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export function saveState() {
|
||||
export function resetState() {
|
||||
if (this.viewSate && this.viewSate.isSave) {
|
||||
this.viewSate.isSave = false;
|
||||
this.orbitControls.enabled = true;
|
||||
// //恢复原始的镜头指向
|
||||
// this.camera.lookAt(0, 0, 0);
|
||||
// this.orbitControls.target.set(0, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user