修改三维设备模型道岔动画时间

This commit is contained in:
sunzhenyu 2020-04-01 16:53:07 +08:00
parent fba612403a
commit e401081214
30 changed files with 18 additions and 15 deletions

View File

@ -1,13 +1,13 @@
export function Signallightload(lights) {
settexture(lights, "red", 'https://test.joylink.club/oss/wx/signal/1.jpg');
settexture(lights, "red", '../../static/model/device/signal/1.jpg');
settexture(lights, "yellow", 'https://test.joylink.club/oss/wx/signal/2.jpg');
settexture(lights, "yellow", '../../static/model/device/signal/2.jpg');
settexture(lights, "green", 'https://test.joylink.club/oss/wx/signal/3.jpg');
settexture(lights, "green", '../../static/model/device/signal/3.jpg');
settexture(lights, "black", 'https://test.joylink.club/oss/wx/signal/4.jpg');
settexture(lights, "black", '../../static/model/device/signal/4.jpg');
}
function settexture(lights, name, textureurl) {

View File

@ -5,7 +5,7 @@ var Staticmodel = {
deviceType: "Switch",
type: "fuzhou",
picUrl: "",
assetUrl: "./../static/model/device/switch.FBX"
assetUrl: "./../static/model/device/switch/switch.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX"
//../../static/model/device/switch.FBX
Signal: {
@ -14,7 +14,7 @@ var Staticmodel = {
deviceType: "Signal",
type: "low",
picUrl: "",
assetUrl: "../../static/model/device/signal.FBX"
assetUrl: "../../static/model/device/signal/signal.FBX"
},
stationstand: {
id: "3",
@ -22,7 +22,7 @@ var Staticmodel = {
deviceType: "stationstand",
type: "low",
picUrl: "",
assetUrl: "../../static/model/device/stationstand.FBX"
assetUrl: "../../static/model/device/stationstand/stationstand.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
//../../static/model/device/stationstand.FBX

View File

@ -168,6 +168,7 @@ export function Jl3ddeviceNew(dom,group,token) {
scope.modelmanager.switchmodel.normalPosition = "0";
scope.showmodel = scope.modelmanager.switchmodel.mesh;
// scope.scene.add(scope.showmodel);
console.log(data.normalPosition);
if (data.normalPosition == "0") {
scope.modelmanager.switchmodel.normalPosition = "0";
scope.modelmanager.switchmodel.action.reset();
@ -178,6 +179,7 @@ export function Jl3ddeviceNew(dom,group,token) {
} else if (data.normalPosition == "1") {
scope.modelmanager.switchmodel.normalPosition = "1";
scope.modelmanager.switchmodel.action.reset();
scope.modelmanager.switchmodel.action.time = scope.modelmanager.switchmodel.action._clip.duration;
scope.modelmanager.switchmodel.action.timeScale = 1;
scope.modelmanager.switchmodel.action.play();
@ -201,20 +203,20 @@ export function Jl3ddeviceNew(dom,group,token) {
}
this.updateaction = function (data) {
console.log(data);
if (data.type == "SWITCH") {
if (data.normal == "0") {
scope.modelmanager.switchmodel.normalPosition = "0";
scope.modelmanager.switchmodel.action.reset();
scope.modelmanager.switchmodel.action.time = 0;
scope.modelmanager.switchmodel.action.timeScale = -1;
scope.modelmanager.switchmodel.action.timeScale = 1;
scope.modelmanager.switchmodel.action.play();
} else if (data.normal == "1") {
scope.modelmanager.switchmodel.normalPosition = "1";
scope.modelmanager.switchmodel.action.reset();
scope.modelmanager.switchmodel.action.time = scope.modelmanager.switchmodel.action._clip.duration;
scope.modelmanager.switchmodel.action.timeScale = 1;
scope.modelmanager.switchmodel.action.timeScale = -1;
scope.modelmanager.switchmodel.action.play();
}
@ -271,19 +273,20 @@ export function Jl3ddeviceNew(dom,group,token) {
}
function initstatus(data) {
console.log(data);
if (data._type == "Switch") {
if (data.normalPosition == "0") {
scope.modelmanager.switchmodel.normalPosition = "0";
scope.modelmanager.switchmodel.action.reset();
scope.modelmanager.switchmodel.action.time = 0;
scope.modelmanager.switchmodel.action.timeScale = -1;
scope.modelmanager.switchmodel.action.time = scope.modelmanager.switchmodel.action._clip.duration;
scope.modelmanager.switchmodel.action.timeScale = 1;
scope.modelmanager.switchmodel.action.play();
} else if (data.normalPosition == "1") {
scope.modelmanager.switchmodel.normalPosition = "1";
scope.modelmanager.switchmodel.action.reset();
scope.modelmanager.switchmodel.action.time = scope.modelmanager.switchmodel.action._clip.duration;
scope.modelmanager.switchmodel.action.timeScale = 1;
scope.modelmanager.switchmodel.action.time = 0;
scope.modelmanager.switchmodel.action.timeScale = -1;
scope.modelmanager.switchmodel.action.play();
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB