修改三位课程例子事件,修改第一人称视角初始方向,增加徐州课程
@ -81,8 +81,6 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
//console.log(error);
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.actionModelControl = function(actionType,actionModel){
|
||||
|
||||
if(actionType == "remove"){
|
||||
@ -94,6 +92,10 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
actionModel.visible = true;
|
||||
assetModelManager.otherModel.add(actionModel);
|
||||
audionext.play();
|
||||
}else if(actionType == "showaccident"){
|
||||
accidentManager.addAccident(actionModel,scope.nowSceneType);
|
||||
}else if(actionType == "removeaccident"){
|
||||
accidentManager.removeAccident(actionModel,scope.nowSceneType);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -610,6 +610,8 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
attachBox.position.x = lessonData.lessonProgress[nowLessonIndex].cameraPosition.x;
|
||||
attachBox.position.y = lessonData.lessonProgress[nowLessonIndex].cameraPosition.y ;
|
||||
attachBox.position.z = lessonData.lessonProgress[nowLessonIndex].cameraPosition.z;
|
||||
console.log(lessonData.lessonProgress[nowLessonIndex]);
|
||||
fpsCamera.lookAt(lessonData.lessonProgress[nowLessonIndex].cameraTarget.x,lessonData.lessonProgress[nowLessonIndex].cameraTarget.y,lessonData.lessonProgress[nowLessonIndex].cameraTarget.z);
|
||||
}
|
||||
|
||||
}
|
||||
@ -645,7 +647,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
for(let i=0;i<actions.length;i++){
|
||||
|
||||
if(actions[i].actionType == "auto"){
|
||||
|
||||
if(actions[i].actionMode == "play"){
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
@ -695,6 +696,13 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(actions[i].actionMode == "showaccident"){
|
||||
actionEvent("showaccident",actions[i],actions[i].actionModel);
|
||||
}
|
||||
if(actions[i].actionMode == "removeaccident"){
|
||||
actionEvent("removeaccident",actions[i],actions[i].actionModel);
|
||||
}
|
||||
}
|
||||
if(roleMode){
|
||||
if(actions[i].actionType == "contact"){
|
||||
|
@ -4,12 +4,25 @@ export function Fire() {
|
||||
var last_time_activate = Date.now();
|
||||
|
||||
|
||||
this.createNew = function(scene,pos){
|
||||
this.createAdd = function(scene,pos){
|
||||
scope.points = new Points(pos);
|
||||
scope.points.init(pos);
|
||||
scene.add(scope.points.obj);
|
||||
}
|
||||
|
||||
this.createNew = function(scene,pos){
|
||||
scope.points = new Points(pos);
|
||||
scope.points.init(pos);
|
||||
}
|
||||
|
||||
this.addAccident = function(scene){
|
||||
scene.add(scope.points.obj);
|
||||
}
|
||||
|
||||
this.removeAccident = function(scene){
|
||||
scene.remove(scope.points.obj);
|
||||
}
|
||||
|
||||
this.update = function(){
|
||||
var now = Date.now();
|
||||
scope.points.update();
|
||||
|
@ -182,7 +182,7 @@ export function Lesson3dEditor(dom,lessonData) {
|
||||
var intersects = raycaster.intersectObjects( scene.children,true );
|
||||
|
||||
if(intersects.length>0){
|
||||
accidentManager.createNewAccident(accidentData,intersects[0].point,scope.nowSceneType);
|
||||
accidentManager.createAddAccident(accidentData,intersects[0].point,scope.nowSceneType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,11 +72,27 @@ export function AccidentManager(scene) {
|
||||
}
|
||||
return saveList;
|
||||
}
|
||||
this.addAccident = function(addLable,nowSceneType){
|
||||
for(let i=0;i<scope.accidentList[updateSceneType].length;i++){
|
||||
if(scope.accidentList[updateSceneType][i].label == addLable){
|
||||
scope.accidentList[updateSceneType][i].object.addAccident(groupList[nowSceneType]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.removeAccident = function(removeLable,nowSceneType){
|
||||
for(let i=0;i<scope.accidentList[updateSceneType].length;i++){
|
||||
if(scope.accidentList[updateSceneType][i].label == removeLable){
|
||||
scope.accidentList[updateSceneType][i].object.removeAccident(groupList[nowSceneType]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.changeSceneGroup = function(nowSceneType){
|
||||
if(scope.accidentGroup.children.length>0){
|
||||
scope.accidentGroup.remove(scope.accidentGroup.children[0]);
|
||||
}
|
||||
|
||||
scope.accidentGroup.add(groupList[nowSceneType]);
|
||||
if(scope.accidentMode == 'player'){
|
||||
|
||||
@ -86,7 +102,7 @@ export function AccidentManager(scene) {
|
||||
updateSceneType = nowSceneType;
|
||||
}
|
||||
|
||||
this.createNewAccident = function(type,pos,nowSceneType){
|
||||
this.createAddAccident = function(type,pos,nowSceneType){
|
||||
|
||||
var rand = Math.floor(Math.random () * 900) + 100;
|
||||
|
||||
@ -102,7 +118,7 @@ export function AccidentManager(scene) {
|
||||
};
|
||||
if(type == "fire"){
|
||||
newAccident.object = new Fire();
|
||||
newAccident.object.createNew(groupList[nowSceneType],pos);
|
||||
newAccident.object.createAdd(groupList[nowSceneType],pos);
|
||||
}
|
||||
scope.accidentList[nowSceneType].push(newAccident);
|
||||
if(scope.accidentMode == 'player'){
|
||||
@ -118,11 +134,9 @@ export function AccidentManager(scene) {
|
||||
for(let i=0;i<scope.accidentList[nowSceneType].length;i++){
|
||||
if(scope.accidentList[nowSceneType][i].id == selectAccident.id){
|
||||
scope.accidentList[nowSceneType].splice(i,1);
|
||||
if(scope.accidentMode == 'player'){
|
||||
|
||||
}else{
|
||||
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]);
|
||||
}
|
||||
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -143,7 +157,11 @@ export function AccidentManager(scene) {
|
||||
};
|
||||
if(accidentList[i].type == "fire"){
|
||||
newAccident.object = new Fire();
|
||||
newAccident.object.createNew(groupList[accidentList[i].sceneType],accidentList[i].pos);
|
||||
if(scope.accidentMode == 'player'){
|
||||
newAccident.object.createNew(groupList[accidentList[i].sceneType],accidentList[i].pos);
|
||||
}else{
|
||||
newAccident.object.createAdd(groupList[accidentList[i].sceneType],accidentList[i].pos);
|
||||
}
|
||||
}
|
||||
scope.accidentList[accidentList[i].sceneType].push(newAccident);
|
||||
}
|
||||
|
@ -280,6 +280,29 @@ export function JobPaneData() {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name:"工电调度",
|
||||
value:"gddd",
|
||||
text:"",
|
||||
picurl:"",
|
||||
controlList:[
|
||||
//联控
|
||||
{
|
||||
name:"联控",
|
||||
data:[],
|
||||
},
|
||||
//动作
|
||||
{
|
||||
name:"动作",
|
||||
data:[],
|
||||
},
|
||||
//口呼
|
||||
{
|
||||
name:"口呼",
|
||||
data:[],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name:"通号调度",
|
||||
value:"scdd",
|
||||
@ -441,6 +464,52 @@ export function JobPaneData() {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name:"安检人员",
|
||||
value:"ajry",
|
||||
text:"负责地铁安检并维护秩序",
|
||||
picurl:"",
|
||||
controlList:[
|
||||
//联控
|
||||
{
|
||||
name:"联控",
|
||||
data:[],
|
||||
},
|
||||
//动作
|
||||
{
|
||||
name:"动作",
|
||||
data:[],
|
||||
},
|
||||
//口呼
|
||||
{
|
||||
name:"口呼",
|
||||
data:[],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name:"防疫部门",
|
||||
value:"fybm",
|
||||
text:"报告疫情事件。",
|
||||
picurl:"",
|
||||
controlList:[
|
||||
//联控
|
||||
{
|
||||
name:"联控",
|
||||
data:[],
|
||||
},
|
||||
//动作
|
||||
{
|
||||
name:"动作",
|
||||
data:[],
|
||||
},
|
||||
//口呼
|
||||
{
|
||||
name:"口呼",
|
||||
data:[],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name:"报警中心",
|
||||
value:"bjzx",
|
||||
|
@ -111,7 +111,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="操作的模型:" >
|
||||
<el-select v-model="selectedAction.actionModel" placeholder="选择操作的模型">
|
||||
<el-select v-model="selectedAction.actionModel" @change="selectActionModel" placeholder="选择操作的模型">
|
||||
<el-option
|
||||
v-for="(item,index) in triggerList"
|
||||
:label="item.label"
|
||||
@ -121,22 +121,35 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="操作的特效:" >
|
||||
<el-select v-model="selectedAction.actionModel" @change="selectActionAccident" placeholder="选择操作的模型">
|
||||
<el-option
|
||||
v-for="(item,index) in accidentList"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
:key="item.label">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事件类型:" >
|
||||
<el-select v-model="selectedAction.actionType" placeholder="请选择场景">
|
||||
<el-option label="接触" value="contact"></el-option>
|
||||
<el-option label="自动" value="auto"></el-option>
|
||||
<el-option label="开关" value="switch"></el-option>
|
||||
<el-option label="紧急开关" value="urgeSwitch"></el-option>
|
||||
<el-option v-if="modelType == 'model'" label="接触" value="contact"></el-option>
|
||||
<el-option v-if="modelType == 'accident' || modelType == 'model'" label="自动" value="auto"></el-option>
|
||||
<el-option v-if="modelType == 'model'" label="开关" value="switch"></el-option>
|
||||
<el-option v-if="modelType == 'model'" label="紧急开关" value="urgeSwitch"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事件操作:" >
|
||||
<el-select v-model="selectedAction.actionMode" placeholder="请选择场景">
|
||||
<el-option label="播放动画" value="play"></el-option>
|
||||
<el-option label="显示模型" value="show"></el-option>
|
||||
<el-option label="隐藏模型" value="remove"></el-option>
|
||||
<el-option label="跳转" value="jump"></el-option>
|
||||
<el-option label="所有事件完成跳转" value="allover"></el-option>
|
||||
<el-option v-if="modelType == 'model'" label="播放动画" value="play"></el-option>
|
||||
<el-option v-if="modelType == 'model'" label="显示模型" value="show"></el-option>
|
||||
<el-option v-if="modelType == 'model'" label="隐藏模型" value="remove"></el-option>
|
||||
<el-option v-if="modelType == 'model'" label="跳转" value="jump"></el-option>
|
||||
<el-option v-if="modelType == 'model'" label="所有事件完成跳转" value="allover"></el-option>
|
||||
<el-option v-if="modelType == 'accident'" label="显示特效" value="showaccident"></el-option>
|
||||
<el-option v-if="modelType == 'accident'" label="隐藏特效" value="removeaccident"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -269,7 +282,7 @@
|
||||
|
||||
export default {
|
||||
name: 'ProPerty',
|
||||
props:['lessonData','lessonEditIndex','triggerList'],
|
||||
props:['lessonData','lessonEditIndex','triggerList','accidentList'],
|
||||
components: {
|
||||
|
||||
},
|
||||
@ -279,6 +292,7 @@
|
||||
activeName: 'cameraproperty',
|
||||
selectLesson3dControl:"",
|
||||
selected:"",
|
||||
modelType:"",
|
||||
editSelectTool:"",
|
||||
editSelectModel:"",
|
||||
selectedAction:{
|
||||
@ -406,6 +420,12 @@
|
||||
selectScene(val){
|
||||
editAction("changeScene",val);
|
||||
},
|
||||
selectActionModel(){
|
||||
this.modelType = 'model';
|
||||
},
|
||||
selectActionAccident(){
|
||||
this.modelType = 'accident';
|
||||
},
|
||||
updateData(){
|
||||
// this.lessonData.lessonData.lessonProgress[this.lessonEditIndex].stepTipsData;
|
||||
},
|
||||
|
@ -118,6 +118,7 @@
|
||||
:lessonData='lessonData'
|
||||
:lessonEditIndex='lessonEditIndex'
|
||||
:triggerList='triggerList'
|
||||
:accidentList='accidentlist'
|
||||
></Pro-Perty>
|
||||
|
||||
|
||||
|
@ -222,6 +222,56 @@ export default {
|
||||
id: "15",
|
||||
name: "车站大客流test",
|
||||
pic: '/other/15.png',
|
||||
},
|
||||
{
|
||||
id: "27",
|
||||
name: "降级运营-疫情爆发应急处置",
|
||||
pic: '/other/27.jpg',
|
||||
},
|
||||
{
|
||||
id: "28",
|
||||
name: "垂直电梯困人",
|
||||
pic: '/other/28.jpg',
|
||||
},
|
||||
{
|
||||
id: "29",
|
||||
name: "屏蔽门夹人夹物",
|
||||
pic: '/other/29.jpg',
|
||||
},
|
||||
{
|
||||
id: "30",
|
||||
name: "车站客伤处置",
|
||||
pic: '/other/30.jpg',
|
||||
},
|
||||
{
|
||||
id: "31",
|
||||
name: "车站公共区火灾",
|
||||
pic: '/other/31.jpg',
|
||||
},
|
||||
{
|
||||
id: "32",
|
||||
name: "设备区火灾",
|
||||
pic: '/other/32.jpg',
|
||||
},
|
||||
{
|
||||
id: "33",
|
||||
name: "站台火灾",
|
||||
pic: '/other/33.jpg',
|
||||
},
|
||||
{
|
||||
id: "34",
|
||||
name: "列车区间火灾(不能维持进站)",
|
||||
pic: '/other/34.jpg',
|
||||
},
|
||||
{
|
||||
id: "35",
|
||||
name: "列车区间火灾(能维持进站)",
|
||||
pic: '/other/35.jpg',
|
||||
},
|
||||
{
|
||||
id: "36",
|
||||
name: "道岔故障演练",
|
||||
pic: '/other/36.jpg',
|
||||
}
|
||||
],
|
||||
|
||||
@ -236,7 +286,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
getSelectLesson3dList().then(response => {
|
||||
// console.log(response);
|
||||
console.log(response);
|
||||
// this.lessonData = response.data;
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
BIN
static/other/27.jpg
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
static/other/28.jpg
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
static/other/29.jpg
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
static/other/30.jpg
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
static/other/31.jpg
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
static/other/32.jpg
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
static/other/33.jpg
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
static/other/34.jpg
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
static/other/35.jpg
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
static/other/36.jpg
Normal file
After Width: | Height: | Size: 60 KiB |