This commit is contained in:
joylink_cuiweidong 2020-07-03 17:13:44 +08:00
commit 147f2570ab
3 changed files with 28 additions and 25 deletions

View File

@ -197,6 +197,18 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.scene.remove(scope.showmodel);
scope.showmodel = null
scope.nowcode = data.code;
if (data.type == "room") {
scope.resetmodel();
scope.showmodel = scope.modelmanager.roommodel.mesh;
scope.scene.add(scope.showmodel);
scope.camera.position.set(5, 7, -9);
scope.controls.target = new THREE.Vector3(4, 6, -8);
scope.controls.update();
}else{
scope.camera.position.set(0, 20, 30);
scope.controls.target = new THREE.Vector3(0, 0, 0);
scope.controls.update();
}
if (data.type == "SWITCH") {
// scope.modelmanager.switchmodel.locateType = data.body.locateType;
@ -212,6 +224,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.nowobject = "";
updatemenulist();
}
if (data.type == "SIGNAL") {
scope.modelmanager.signalmodel.code = data.code;
scope.showmodel = scope.modelmanager.signalmodel.mesh;
@ -240,18 +253,8 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.scene.add(scope.showmodel);
}
if (data.type == "room") {
scope.showmodel = scope.modelmanager.roommodel.mesh;
scope.scene.add(scope.showmodel);
scope.camera.position.set(0, 10, 9);
scope.controls.target = new THREE.Vector3(0, 9, 8);
scope.controls.update();
}else{
scope.camera.position.set(0, 20, 30);
scope.controls.target = new THREE.Vector3(0, 0, 0);
scope.controls.update();
}
if(scope.showmodel){
scope.resetmodel();
scope.showmodel.code = data.code;
@ -261,7 +264,18 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
}
} else {
scope.nowcode = data.code;
if (data.type == "room") {
scope.showmodel = scope.modelmanager.roommodel.mesh;
scope.scene.add(scope.showmodel);
scope.camera.position.set(5, 7, -9);
scope.controls.target = new THREE.Vector3(4, 6, -8);
scope.controls.update();
}else{
scope.camera.position.set(0, 20, 30);
scope.controls.target = new THREE.Vector3(0, 0, 0);
scope.controls.update();
}
if (data.type == "SWITCH") {
scope.modelmanager.switchmodel.normalPosition = "0";
scope.showmodel = scope.modelmanager.switchmodel.mesh;
@ -312,18 +326,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
if (data.type == "room") {
scope.showmodel = scope.modelmanager.roommodel.mesh;
scope.scene.add(scope.showmodel);
scope.camera.position.set(0, 10, 9);
scope.controls.target = new THREE.Vector3(0, 9, 8);;
scope.controls.update();
}else{
scope.camera.position.set(0, 20, 30);
scope.controls.target = new THREE.Vector3(0, 0, 0);
scope.controls.update();
}
// initstatus(data);
}

View File

@ -308,7 +308,7 @@
width:50px;
height:50px;
position: absolute;
right:15px;
right:125px;
top:5px;
background-image:url("/static/texture/xx.png");
background-repeat:no-repeat;
@ -326,7 +326,7 @@
.jl3dcontrolpane{
position: absolute;
top:0;
right:165px;
right:275px;
z-index: 10;
}

View File

@ -309,7 +309,7 @@ export default {
width:50px;
height:50px;
position: absolute;
right:70px;
right:185px;
top:5px;
z-index:30;
background-image:url("/static/texture/room.png");