修改三维课程编辑器组件名,修改播放器切换场景视角流程
This commit is contained in:
parent
babbbc68cf
commit
5fe4a7a3fb
@ -104,13 +104,17 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
// console.log(nowRole);
|
||||
// console.log(lessonData.lessonProgress[lessonIndex].roleName);
|
||||
if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){
|
||||
controlManager.initControlMode(lessonIndex);
|
||||
assetModelManager.changeSceneGroup(scope.nowSceneType);
|
||||
controlManager.initRoleMode(true,nowRole);
|
||||
controlManager.initControlMode(lessonIndex);
|
||||
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,true,assetModelManager.lessonTriggerList[scope.nowSceneType]);
|
||||
|
||||
}else{
|
||||
controlManager.initControlMode(lessonIndex);
|
||||
} else{
|
||||
if(lessonData.lessonProgress[lessonIndex].roleName == 'kong'){
|
||||
assetModelManager.changeSceneGroup(scope.nowSceneType); controlManager.initRoleMode(false,nowRole);
|
||||
}
|
||||
controlManager.initRoleMode(false,nowRole);
|
||||
controlManager.initControlMode(lessonIndex);
|
||||
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,false,assetModelManager.lessonTriggerList[scope.nowSceneType]);
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ export function AssetModelManager(editor,scene) {
|
||||
groupList["standstation"] = new THREE.Group();
|
||||
groupList["stopstation"] = new THREE.Group();
|
||||
groupList["device"] = new THREE.Group();
|
||||
groupList["occ"] = new THREE.Group();
|
||||
groupList["xl"] = new THREE.Group();
|
||||
groupList["dc"] = new THREE.Group();
|
||||
|
||||
@ -90,15 +91,36 @@ export function AssetModelManager(editor,scene) {
|
||||
sceneType:"stopstation",
|
||||
};
|
||||
|
||||
scope.staticAsset['occ'] = {
|
||||
modelId:'occ',
|
||||
packageName:"occ大厅",
|
||||
url:"/MODEL/2021-09-02/210-32471.FBX",
|
||||
mesh:"",
|
||||
assetType:'onlineasset',
|
||||
isUse:true,
|
||||
resourceType:"三维课程",
|
||||
sceneType:"occ",
|
||||
};
|
||||
//场景中可触发事件模型
|
||||
this.lessonTriggerList = [];
|
||||
|
||||
scope.lessonTriggerList["standstation"] = [];
|
||||
scope.lessonTriggerList["stopstation"] = [];
|
||||
scope.lessonTriggerList["device"] = [];
|
||||
scope.lessonTriggerList["occ"] = [];
|
||||
scope.lessonTriggerList["xl"] = [];
|
||||
scope.lessonTriggerList["dc"] = [];
|
||||
|
||||
this.changeSceneGroup = function(groupType){
|
||||
// console.log(groupType);
|
||||
// console.log(editor.nowSceneType);
|
||||
// console.log(scope.lessonTriggerList[editor.nowSceneType]);
|
||||
editor.nowSceneType = groupType;
|
||||
scene.remove(this.otherModel);
|
||||
this.otherModel = groupList[groupType];
|
||||
scene.add(this.otherModel);
|
||||
updateTriggerList(scope.lessonTriggerList[editor.nowSceneType]);
|
||||
}
|
||||
//加载课程资源
|
||||
this.lessonAssetsLoader = function(lessonData){
|
||||
let initlist = [];
|
||||
|
@ -84,7 +84,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
|
||||
|
||||
let loaderObj = new THREE.OBJLoader();
|
||||
let standstationPZ,stopstationPZ;
|
||||
let standstationPZ,stopstationPZ,occPZ;
|
||||
// load a resource
|
||||
loaderObj.load(
|
||||
JL3D_LOCAL_STATIC+'/lesson3d/standstationPZ.obj',
|
||||
@ -110,6 +110,19 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
console.log( 'An error happened' );
|
||||
}
|
||||
);
|
||||
loaderObj.load(
|
||||
JL3D_LOCAL_STATIC+'/lesson3d/occPZ.obj',
|
||||
function ( object ) {
|
||||
occPZ = object;
|
||||
},
|
||||
function ( xhr ) {
|
||||
console.log( ( xhr.loaded / xhr.total * 100 ) + '% loaded' );
|
||||
},
|
||||
function ( error ) {
|
||||
console.log( 'An error happened' );
|
||||
}
|
||||
);
|
||||
|
||||
this.initRoleMode = function(rMode,role){
|
||||
roleMode = rMode;
|
||||
nowRole = role;
|
||||
@ -215,7 +228,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
|
||||
|
||||
this.init = function(actions){
|
||||
worldOctree.fromGraphNode( standstationPZ );
|
||||
// worldOctree.fromGraphNode( standstationPZ );
|
||||
actionList = actions;
|
||||
}
|
||||
|
||||
@ -279,6 +292,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
}
|
||||
|
||||
}else if(raycasterBoxs[i].type == "urgeSwitch"){
|
||||
console.log(raycasterBoxs[i]);
|
||||
if(raycasterBoxs[i].action.status == "02"){
|
||||
raycasterBoxs[i].action.status = "01";
|
||||
raycasterBoxs[i].action.action.stop();
|
||||
@ -485,16 +499,23 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
}
|
||||
|
||||
this.initControlMode = function(nowLessonIndex){
|
||||
console.log(lessonData.lessonProgress[nowLessonIndex].progressScene);
|
||||
// console.log(lessonData.lessonProgress[nowLessonIndex].progressScene);
|
||||
|
||||
if(lessonData.lessonProgress[nowLessonIndex].progressScene == "standstation"){
|
||||
worldOctree.fromGraphNode( standstationPZ );
|
||||
}else if(lessonData.lessonProgress[nowLessonIndex].progressScene == "stopstation"){
|
||||
worldOctree.fromGraphNode( stopstationPZ );
|
||||
}else if(lessonData.lessonProgress[nowLessonIndex].progressScene == "occ"){
|
||||
worldOctree.fromGraphNode( occPZ );
|
||||
}
|
||||
|
||||
scope.controlMode = lessonData.lessonProgress[nowLessonIndex].controlMode;
|
||||
if(lessonData.lessonProgress[nowLessonIndex].changeCamera == true){
|
||||
|
||||
|
||||
|
||||
if((lessonData.lessonProgress[nowLessonIndex].changeCamera == true && lessonData.lessonProgress[nowLessonIndex].roleName == nowRole) || nowLessonIndex == 0 || lessonData.lessonProgress[nowLessonIndex].roleName== 'kong'){
|
||||
console.log(scope.controlMode);
|
||||
|
||||
scope.controlMode = lessonData.lessonProgress[nowLessonIndex].controlMode;
|
||||
if(scope.controlMode == "free" || scope.controlMode == "non"){
|
||||
scope.nowCamera = orbitCamera;
|
||||
oribitControl.enabled = true;
|
||||
@ -537,11 +558,11 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
// eventBoxs = newEventBoxs;
|
||||
raycasterBoxs = [];
|
||||
roleMode = rMode;
|
||||
console.log("---------changeIndex--------");
|
||||
console.log(actions);
|
||||
console.log(roleMode);
|
||||
console.log(eventTrigger);
|
||||
console.log("----------------------------");
|
||||
// console.log("---------changeIndex--------");
|
||||
// console.log(actions);
|
||||
// console.log(roleMode);
|
||||
// console.log(eventTrigger);
|
||||
// console.log("----------------------------");
|
||||
|
||||
|
||||
if(actions.length>0 && roleMode){
|
||||
|
@ -102,7 +102,7 @@ export function AssetModelManager(editor,scene) {
|
||||
scope.staticAsset['occ'] = {
|
||||
modelId:'occ',
|
||||
packageName:"occ大厅",
|
||||
url:"/MODEL/2021-08-23/203-65635.FBX",
|
||||
url:"/MODEL/2021-09-02/210-32471.FBX",
|
||||
mesh:"",
|
||||
assetType:'onlineasset',
|
||||
isUse:true,
|
||||
|
@ -216,11 +216,12 @@
|
||||
<!-- <el-button @click="updateData">保存修改</el-button> -->
|
||||
</el-form>
|
||||
|
||||
<el-form ref="form" class="camerapropertydiv" label-width="130px" size="mini" v-if="selectType == 'modelproperty'">
|
||||
<el-form ref="form" class="camerapropertydiv" v-if="selectType == 'modelproperty'">
|
||||
<el-form-item label="模型名称:" v-if="selected.label">
|
||||
<el-input v-model="selected.label" ></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-select v-model="selected.visible" >
|
||||
<el-option label="显示" :value=true></el-option>
|
||||
<el-option label="隐藏" :value=false></el-option>
|
||||
|
@ -45,22 +45,23 @@
|
||||
<Step-Tips
|
||||
:lessonData='lessonData'
|
||||
:lessonPlayIndex='lessonPlayIndex'
|
||||
v-show="lessonTools[0].isShow && lessonData.lessonData.lessonProgress[lessonPlayIndex].progressScene == 'standstation'">
|
||||
:nowRole ='nowRole'
|
||||
v-show="lessonTools[0].isShow"
|
||||
@jumpEvent="jumpEvent">
|
||||
</Step-Tips>
|
||||
|
||||
<Process-Log
|
||||
:lessonData='lessonData'
|
||||
:lessonPlayIndex='lessonPlayIndex'
|
||||
ref="processlog"
|
||||
v-show="lessonTools[1].isShow && lessonData.lessonData.lessonProgress[lessonPlayIndex].progressScene == 'standstation'">
|
||||
v-show="lessonTools[1].isShow">
|
||||
</Process-Log>
|
||||
|
||||
<Explain-Pane
|
||||
:lessonData='lessonData'
|
||||
:lessonPlayIndex='lessonPlayIndex'
|
||||
:nowRole ='nowRole'
|
||||
v-show="lessonTools[2].isShow && lessonData.lessonData.lessonProgress[lessonPlayIndex].progressScene == 'standstation'"
|
||||
@jumpEvent="jumpEvent">
|
||||
v-show="lessonTools[2].isShow && !examMode"
|
||||
>
|
||||
</Explain-Pane>
|
||||
|
||||
<Job-Pane
|
||||
@ -69,11 +70,11 @@
|
||||
:lessonPlayIndex='lessonPlayIndex'
|
||||
:nowRole='nowRole'
|
||||
ref="jobpane"
|
||||
v-show="lessonTools[3].isShow && lessonData.lessonData.lessonProgress[lessonPlayIndex].progressScene == 'standstation'">
|
||||
v-show="lessonTools[3].isShow">
|
||||
</Job-Pane>
|
||||
|
||||
<Tool-Bar
|
||||
v-show="lessonTools[4].isShow && lessonData.lessonData.lessonProgress[lessonPlayIndex].progressScene == 'standstation'"
|
||||
v-show="lessonTools[4].isShow "
|
||||
@changeCameraPos="changeCameraPos">
|
||||
</Tool-Bar>
|
||||
|
||||
@ -273,7 +274,7 @@
|
||||
this.selectJobList = loadData.setup.checkedRole;
|
||||
this.jobPaneData.dataList = loadData.toolJobPane;
|
||||
this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
|
||||
|
||||
console.log(loadData.lessonTools);
|
||||
this.lessonTools = loadData.lessonTools;
|
||||
this.lessonData.loadLessonProgress(loadData.lessonProgress);
|
||||
|
||||
|
@ -3,19 +3,16 @@
|
||||
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex]"
|
||||
|
||||
:style="{'background-image': 'url('+lessonbg+')'}">
|
||||
<!-- <div class="explainpanetittle" >
|
||||
{{lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.tittle}}
|
||||
</div> -->
|
||||
<div class="explainpanepic" :style="{'background-image': 'url('+localStatic+lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.picurl+')'}" >
|
||||
<div class="explainpanetittle" >
|
||||
操作提示
|
||||
</div>
|
||||
<div v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.picurl != 'url'" class="explainpanepic" :style="{'background-image': 'url('+localStatic+lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.picurl+')'}" >
|
||||
|
||||
</div>
|
||||
<div class="explainpanetext" >
|
||||
{{lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.text}}
|
||||
</div>
|
||||
<div class="nextbuttondiv"
|
||||
:style="{'background-image': 'url('+staticImg+'/lesson3d/nextbutton.png)'}"
|
||||
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.explainPaneType=='jump'|| (lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.explainPaneType == 'limitjump' && !(lessonData.lessonData.lessonProgress[lessonPlayIndex].roleName == nowRole)) "
|
||||
@click="explainJump"></div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -26,7 +23,7 @@
|
||||
|
||||
export default {
|
||||
name: 'ExplainPane',
|
||||
props:['lessonData','lessonPlayIndex','nowRole'],
|
||||
props:['lessonData','lessonPlayIndex'],
|
||||
components: {
|
||||
|
||||
},
|
||||
@ -53,12 +50,7 @@
|
||||
// selectTool(){
|
||||
// lesson3dSelect('toolproperty','explainpane');
|
||||
// },
|
||||
explainJump(){
|
||||
|
||||
if(this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].explainPane.explainPaneType == "jump" || (this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].explainPane.explainPaneType == "limitjump")){
|
||||
this.$emit('jumpEvent','jump',this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].explainPane);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
|
@ -54,9 +54,10 @@
|
||||
handler: function (newVal, oldVal) {
|
||||
|
||||
if (newVal != oldVal) {
|
||||
this.logTexts.push(this.lessonData.lessonData.lessonProgress[oldVal].stepTipsData);
|
||||
this.processTexts.push(this.lessonData.lessonData.lessonProgress[oldVal].stepTipsData);
|
||||
this.nowProcessText = this.lessonData.lessonData.lessonProgress[newVal].stepTipsData.text;
|
||||
console.log(this.lessonData.lessonData.lessonProgress[oldVal]);
|
||||
this.logTexts.push(this.lessonData.lessonData.lessonProgress[oldVal].explainPane);
|
||||
this.processTexts.push(this.lessonData.lessonData.lessonProgress[oldVal].explainPane);
|
||||
this.nowProcessText = this.lessonData.lessonData.lessonProgress[newVal].explainPane.text;
|
||||
var div1 = document.getElementById('tabdiv1');
|
||||
// div.scrollIntoView();
|
||||
div1.scrollTop = div1.scrollHeight;
|
||||
@ -75,7 +76,7 @@
|
||||
},
|
||||
methods: {
|
||||
startLog(){
|
||||
this.nowProcessText = this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].stepTipsData.text;
|
||||
this.nowProcessText = this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].explainPane.text;
|
||||
},
|
||||
|
||||
},
|
||||
|
@ -1,14 +1,18 @@
|
||||
<template>
|
||||
<div class="stepstipsdiv"
|
||||
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex]"
|
||||
@click="selectTool"
|
||||
:style="{'background-image': 'url('+lessonbg+')'}">
|
||||
<div class="stepstipstittle" >
|
||||
{{lessonData.lessonData.lessonProgress[lessonPlayIndex].stepTipsData.tittle}}
|
||||
当前情况
|
||||
<!-- {{lessonData.lessonData.lessonProgress[lessonPlayIndex].stepTipsData.tittle}} -->
|
||||
</div>
|
||||
<div class="stepstipstext" >
|
||||
{{lessonData.lessonData.lessonProgress[lessonPlayIndex].stepTipsData.text}}
|
||||
</div>
|
||||
<div class="nextbuttondiv"
|
||||
:style="{'background-image': 'url('+staticImg+'/lesson3d/nextbutton.png)'}"
|
||||
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.explainPaneType=='jump'|| (lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.explainPaneType == 'limitjump' && !(lessonData.lessonData.lessonProgress[lessonPlayIndex].roleName == nowRole)) "
|
||||
@click="explainJump"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -18,13 +22,14 @@
|
||||
//步骤提示
|
||||
export default {
|
||||
name: 'StepTips',
|
||||
props:['lessonData','lessonPlayIndex'],
|
||||
props:['lessonData','lessonPlayIndex','nowRole'],
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lessonbg:JL3D_LOCAL_STATIC+"/lesson3d/lessonbg.png",
|
||||
staticImg:JL3D_LOCAL_STATIC,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -41,10 +46,12 @@
|
||||
},
|
||||
methods: {
|
||||
|
||||
selectTool(){
|
||||
lesson3dSelect('toolproperty','stepTips');
|
||||
},
|
||||
explainJump(){
|
||||
|
||||
if(this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].explainPane.explainPaneType == "jump" || (this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].explainPane.explainPaneType == "limitjump")){
|
||||
this.$emit('jumpEvent','jump',this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].explainPane);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
@ -76,5 +83,13 @@
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.nextbuttondiv{
|
||||
width:30px;
|
||||
height:30px;
|
||||
background-size: 100%;
|
||||
position: absolute;
|
||||
right:0;
|
||||
bottom:0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,10 +1,10 @@
|
||||
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||
# File Created: 23.08.2021 10:51:05
|
||||
# File Created: 02.09.2021 15:20:35
|
||||
|
||||
mtllib OCCpengzhuang.mtl
|
||||
mtllib OCCpengzhuang0902.mtl
|
||||
|
||||
#
|
||||
# object occpengzhuang
|
||||
# object Object2667
|
||||
#
|
||||
|
||||
v 18.8555 11.4708 3.7985
|
||||
@ -784,7 +784,7 @@ vt 0.4688 0.5903 0.0000
|
||||
vt 0.4068 0.6711 0.0000
|
||||
# 180 texture coords
|
||||
|
||||
g occpengzhuang
|
||||
g Object2667
|
||||
usemtl 06___Default
|
||||
s 2
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
|
Loading…
Reference in New Issue
Block a user