|
@@ -77,12 +77,6 @@ const props = defineProps({
|
|
|
|
|
|
const data = reactive<any>({
|
|
|
bodyposeData: {},//姿态信息
|
|
|
- bodyposeState: false,//姿态识别窗口状态
|
|
|
- parameter: {},//参数
|
|
|
- deviceInfo: {},//设备信息
|
|
|
- againNum: 0,//再次启动次数
|
|
|
- againTimer: null,//定时状态
|
|
|
- wsState: false,//WS状态
|
|
|
clientObj: {},//浏览器对象
|
|
|
boxes: [],//四个点坐标
|
|
|
proportion: null,//人框和屏幕比例
|
|
@@ -91,7 +85,7 @@ const data = reactive<any>({
|
|
|
direction: null,//跑动
|
|
|
});
|
|
|
|
|
|
-const { bodyposeData, bodyposeState, parameter, deviceInfo, againNum, againTimer, wsState, clientObj, boxes, proportion, myThrow, myTimer, direction } = toRefs(data);
|
|
|
+const { bodyposeData, clientObj, boxes, proportion, myThrow, myTimer, direction } = toRefs(data);
|
|
|
|
|
|
// 游戏状态管理
|
|
|
const currentScene = ref('start');
|
|
@@ -1272,31 +1266,6 @@ const getInit = (e: any) => {
|
|
|
};
|
|
|
|
|
|
|
|
|
-/**
|
|
|
- * 查询姿态识别状态
|
|
|
-*/
|
|
|
-const getCheckBodypose = () => {
|
|
|
- let handcontroller_id = deviceInfo.value.handcontroller_id;
|
|
|
- //检查是否支持姿态识别
|
|
|
- checkBodypose(handcontroller_id);
|
|
|
-};
|
|
|
-
|
|
|
-/**
|
|
|
- * 关闭姿态识别
|
|
|
-*/
|
|
|
-const getCloseBodypose = () => {
|
|
|
- let handcontroller_id = deviceInfo.value.handcontroller_id;
|
|
|
- terminateBodypose(handcontroller_id);
|
|
|
- bodyposeState.value = false;
|
|
|
- speckCancel(); //停止播报
|
|
|
- setTimeout(() => {
|
|
|
- if (wsState.value) {
|
|
|
- closeWS();
|
|
|
- }
|
|
|
- }, 3000)
|
|
|
-};
|
|
|
-
|
|
|
-
|
|
|
const getCanvas = () => {
|
|
|
|
|
|
let leftA = { x: bodyposeData.value[12][0], y: bodyposeData.value[12][1] };//大腿
|