|
@@ -24,7 +24,7 @@
|
|
<div class="gameWindow" v-if="currentGame">
|
|
<div class="gameWindow" v-if="currentGame">
|
|
<!---人体姿态识别-->
|
|
<!---人体姿态识别-->
|
|
<div class="columns" v-if="currentGame == 'bodyposecontroller'">
|
|
<div class="columns" v-if="currentGame == 'bodyposecontroller'">
|
|
- <template v-if="projectList.length == 2">
|
|
|
|
|
|
+ <template v-if="currentGameArea.length == 2">
|
|
<div class="item left">
|
|
<div class="item left">
|
|
<HumanBody ref="humanBodyLeftRef" type="left"></HumanBody>
|
|
<HumanBody ref="humanBodyLeftRef" type="left"></HumanBody>
|
|
</div>
|
|
</div>
|
|
@@ -32,7 +32,7 @@
|
|
<HumanBody ref="humanBodyRightRef" type="right"></HumanBody>
|
|
<HumanBody ref="humanBodyRightRef" type="right"></HumanBody>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- <template>
|
|
|
|
|
|
+ <template v-else>
|
|
<HumanBody ref="humanBodyLeftRef" type="left"></HumanBody>
|
|
<HumanBody ref="humanBodyLeftRef" type="left"></HumanBody>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -94,8 +94,9 @@ const data = reactive<any>({
|
|
bodyposeState: false,//姿态识别窗口状态
|
|
bodyposeState: false,//姿态识别窗口状态
|
|
deviceInfo: {},//设备信息
|
|
deviceInfo: {},//设备信息
|
|
currentGame: "",//当前游戏
|
|
currentGame: "",//当前游戏
|
|
|
|
+ currentGameArea: "",//当前游戏区
|
|
});
|
|
});
|
|
-const { projectList, wsState, bodyposeState, deviceInfo, currentGame } = toRefs(data);
|
|
|
|
|
|
+const { projectList, wsState, bodyposeState, deviceInfo, currentGame, currentGameArea } = toRefs(data);
|
|
|
|
|
|
/**
|
|
/**
|
|
* 初始化
|
|
* 初始化
|
|
@@ -162,9 +163,10 @@ const getInit = async () => {
|
|
return item.exam_name == currentGame.value
|
|
return item.exam_name == currentGame.value
|
|
})
|
|
})
|
|
let myList = obj.area_test_id.split(",");
|
|
let myList = obj.area_test_id.split(",");
|
|
|
|
+ currentGameArea.value = myList;
|
|
let area = e.ctrl_name.replace('bodyposecontroller_', '');
|
|
let area = e.ctrl_name.replace('bodyposecontroller_', '');
|
|
if (currentGame.value == 'bodyposecontroller') {
|
|
if (currentGame.value == 'bodyposecontroller') {
|
|
- if (projectList.value.length == 2) {
|
|
|
|
|
|
+ if (currentGameArea.value.length == 2) {
|
|
if (area == myList[0]) {
|
|
if (area == myList[0]) {
|
|
humanBodyLeftRef.value.getInit(e);
|
|
humanBodyLeftRef.value.getInit(e);
|
|
}
|
|
}
|
|
@@ -211,16 +213,12 @@ const getJump = (data: any) => {
|
|
if (data.exam_name == 'test') {
|
|
if (data.exam_name == 'test') {
|
|
router.push({ path: '/game/test' });
|
|
router.push({ path: '/game/test' });
|
|
} else {
|
|
} else {
|
|
-
|
|
|
|
currentGame.value = data.exam_name;
|
|
currentGame.value = data.exam_name;
|
|
-
|
|
|
|
- data.area_test_id.split(",").forEach((item: any) => {
|
|
|
|
|
|
+ currentGameArea.value = data.area_test_id.split(",");
|
|
|
|
+ currentGameArea.value.forEach((item: any) => {
|
|
checkBodypose(item);
|
|
checkBodypose(item);
|
|
})
|
|
})
|
|
-
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
};
|
|
};
|
|
|
|
|
|
/**
|
|
/**
|