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.scene.remove(scope.showmodel);
scope.showmodel = null scope.showmodel = null
scope.nowcode = data.code; 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") { if (data.type == "SWITCH") {
// scope.modelmanager.switchmodel.locateType = data.body.locateType; // scope.modelmanager.switchmodel.locateType = data.body.locateType;
@ -212,6 +224,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.nowobject = ""; scope.nowobject = "";
updatemenulist(); updatemenulist();
} }
if (data.type == "SIGNAL") { if (data.type == "SIGNAL") {
scope.modelmanager.signalmodel.code = data.code; scope.modelmanager.signalmodel.code = data.code;
scope.showmodel = scope.modelmanager.signalmodel.mesh; scope.showmodel = scope.modelmanager.signalmodel.mesh;
@ -240,18 +253,8 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.scene.add(scope.showmodel); 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){ if(scope.showmodel){
scope.resetmodel(); scope.resetmodel();
scope.showmodel.code = data.code; scope.showmodel.code = data.code;
@ -261,7 +264,18 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
} }
} else { } else {
scope.nowcode = data.code; 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") { if (data.type == "SWITCH") {
scope.modelmanager.switchmodel.normalPosition = "0"; scope.modelmanager.switchmodel.normalPosition = "0";
scope.showmodel = scope.modelmanager.switchmodel.mesh; 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; // 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); // initstatus(data);
} }

View File

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

View File

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