This commit is contained in:
fan 2021-10-26 09:41:40 +08:00
commit 253408b866
6 changed files with 19 additions and 21 deletions

View File

@ -18,6 +18,7 @@ import { AnimateManager } from '@/jlmap3d/lesson3d/manager/animatemanager.js';
import { Fire } from '@/jlmap3d/lesson3d/utils/fire.js'; import { Fire } from '@/jlmap3d/lesson3d/utils/fire.js';
import { Loading } from 'element-ui';
// import { AnimationManager } from '@/jlmap3d/lesson3d/manager/assetmodelmanager.js'; // import { AnimationManager } from '@/jlmap3d/lesson3d/manager/assetmodelmanager.js';
@ -58,6 +59,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
let controlManager = new ControlManager( dom,scene,lessonData,lessonIndex); let controlManager = new ControlManager( dom,scene,lessonData,lessonIndex);
let loadingInstance = Loading.service({ fullscreen: true });
let assetModelManager = new AssetModelManager(scope,scene,controlManager); let assetModelManager = new AssetModelManager(scope,scene,controlManager);
assetModelManager.lessonAssetsLoader(lessonData).then((result) => { assetModelManager.lessonAssetsLoader(lessonData).then((result) => {
scope.nowSceneType = lessonData.lessonProgress[0].progressScene; scope.nowSceneType = lessonData.lessonProgress[0].progressScene;
@ -68,6 +70,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
startLesson(); startLesson();
animate(); animate();
loadingInstance.close();
resolve("loadeend"); //['成功了', 'success'] resolve("loadeend"); //['成功了', 'success']
}).catch((error) => { }).catch((error) => {
//console.log(error); //console.log(error);

View File

@ -235,7 +235,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
this.init = function(actions,assetModelManager,trainDeviceData){ this.init = function(actions,assetModelManager,trainDeviceData){
// worldOctree.fromGraphNode( standstationPZ ); // worldOctree.fromGraphNode( standstationPZ );
actionList = actions; actionList = actions;
console.log(actionList); // console.log(actionList);
modelManager = assetModelManager; modelManager = assetModelManager;
if(trainDeviceData){ if(trainDeviceData){
trainDeviceMode = true; trainDeviceMode = true;
@ -351,7 +351,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
if(raycasterBoxs.length>0){ if(raycasterBoxs.length>0){
let isOverEvent = false; let isOverEvent = false;
let overEvent = ""; let overEvent = "";
console.log(raycasterBoxs); // console.log(raycasterBoxs);
for(let i=0;i<raycasterBoxs.length;i++){ for(let i=0;i<raycasterBoxs.length;i++){
if(raycasterBoxs[i].actionStatus == "0"){ if(raycasterBoxs[i].actionStatus == "0"){
@ -572,11 +572,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
worldOctree.fromGraphNode( occPZ ); worldOctree.fromGraphNode( occPZ );
} }
console.log(lessonData.lessonProgress[nowLessonIndex].changeCamera);
console.log(lessonData.lessonProgress[nowLessonIndex].roleName)
console.log(nowRole)
console.log(lessonData.lessonProgress[nowLessonIndex]);
if((lessonData.lessonProgress[nowLessonIndex].changeCamera == true && lessonData.lessonProgress[nowLessonIndex].roleName == nowRole) || nowLessonIndex == 0 || lessonData.lessonProgress[nowLessonIndex].roleName== 'kong'){ if((lessonData.lessonProgress[nowLessonIndex].changeCamera == true && lessonData.lessonProgress[nowLessonIndex].roleName == nowRole) || nowLessonIndex == 0 || lessonData.lessonProgress[nowLessonIndex].roleName== 'kong'){

View File

@ -70,7 +70,7 @@ export function LessonData() {
} }
this.loadLessonProgress = function(loadData){ this.loadLessonProgress = function(loadData){
console.log(loadData); // console.log(loadData);
for(let i=0;i<loadData.length;i++){ for(let i=0;i<loadData.length;i++){
let newLessonProgress = { let newLessonProgress = {
id:loadData[i].id, id:loadData[i].id,

View File

@ -5,30 +5,30 @@
<div style="position:absolute;left:40%;top:20%;font-size:30px"> <div style="position:absolute;left:40%;top:20%;font-size:30px">
<el-row> <el-row>
考试模式: 课程模式选择:
<el-switch <el-switch
v-model="examMode" v-model="examMode"
active-text="开启考试模式" active-text="考试模式"
inactive-text="关闭考试模式"> inactive-text="教学模式">
</el-switch> </el-switch>
</el-row> </el-row>
</div> </div>
<div class="lesson3dSelectButton" <div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}" :style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}"
style="left:20%;top:40%;" @click="enterPlayer">单对屏蔽门无法开启</div> style="left:20%;top:40%;" @click="enterPlayer(38)">单个屏蔽门无法开启</div>
<div class="lesson3dSelectButton" <div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}" :style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}"
style="left:60%;top:40%;" >单对屏蔽门无法关闭</div> style="left:60%;top:40%;" @click="enterPlayer(39)">单个屏蔽门无法关闭</div>
<div class="lesson3dSelectButton" <div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}" :style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}"
style="left:20%;top:70%;" >整列屏蔽门无法开启</div> style="left:20%;top:70%;" @click="enterPlayer(36)">整侧屏蔽门无法开启</div>
<div class="lesson3dSelectButton" <div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}" :style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}"
style="left:60%;top:70%;" >整列屏蔽门无法关闭</div> style="left:60%;top:70%;" @click="enterPlayer(37)">整侧屏蔽门无法关闭</div>
</div> </div>
</div> </div>
@ -70,12 +70,12 @@ export default {
}, },
methods: { methods: {
enterPlayer:function ( ) { enterPlayer:function (lessonid) {
let examcode = 0; let examcode = 0;
if(this.examMode == true){ if(this.examMode == true){
examcode = 1; examcode = 1;
} }
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId:'34',examMode:examcode} }); this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId:lessonid,examMode:examcode} });
}, },
} }

View File

@ -95,10 +95,10 @@
}, },
selsectJobTool(selectTool){ selsectJobTool(selectTool){
console.log(selectTool); // console.log(selectTool);
let nowProgress = this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex]; let nowProgress = this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex];
console.log(nowProgress.id); // console.log(nowProgress.id);
console.log(this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex]); // console.log(this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex]);
if(selectTool.sceneId == nowProgress.id && this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].roleName == this.nowRole){ if(selectTool.sceneId == nowProgress.id && this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].roleName == this.nowRole){
jumpEvent("tools",selectTool); jumpEvent("tools",selectTool);
} }

View File

@ -56,7 +56,7 @@
methods: { methods: {
showdiv(){ showdiv(){
this.divshow = true; this.divshow = true;
console.log(this.divshow); // console.log(this.divshow);
}, },
closediv(){ closediv(){
this.divshow = false; this.divshow = false;