|
@@ -375,24 +375,26 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
}
|
|
|
|
|
|
// 二维数组 做move 序列, move类型
|
|
|
- for (let i = 1; i < walkingRes.length; i++) {
|
|
|
- console.log('walkingRes', walkingRes[i]);
|
|
|
- Array.from(walkingRes[i]).forEach(
|
|
|
- (item: StreamReplyType, index: number) => {
|
|
|
- const dir = this.isHeaderOrLast(
|
|
|
- index,
|
|
|
- walkingRes[i].length - 1,
|
|
|
- );
|
|
|
- item.DIR = dir ? 1 : 3;
|
|
|
- //将每段最后一个推入lastMovingPointArray
|
|
|
- if (index === walkingRes[i].length - 1) {
|
|
|
- this.lastMovingPointArray.push({
|
|
|
- mediaSrc: item.mediaSrc,
|
|
|
- metaData: item,
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- );
|
|
|
+ if (walkingRes?.length >= 1) {
|
|
|
+ for (let i = 1; i < walkingRes.length; i++) {
|
|
|
+ console.log('walkingRes', walkingRes[i]);
|
|
|
+ Array.from(walkingRes[i]).forEach(
|
|
|
+ (item: StreamReplyType, index: number) => {
|
|
|
+ const dir = this.isHeaderOrLast(
|
|
|
+ index,
|
|
|
+ walkingRes[i].length - 1,
|
|
|
+ );
|
|
|
+ item.DIR = dir ? 1 : 3;
|
|
|
+ //将每段最后一个推入lastMovingPointArray
|
|
|
+ if (index === walkingRes[i].length - 1) {
|
|
|
+ this.lastMovingPointArray.push({
|
|
|
+ mediaSrc: item.mediaSrc,
|
|
|
+ metaData: item,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// walkingRes marker to everybody
|
|
@@ -446,18 +448,21 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
console.log('rotateCamData无数据');
|
|
|
}
|
|
|
// 二维数组 做move 序列, move类型
|
|
|
- for (let i = 1; i < joystickRes.length; i++) {
|
|
|
- console.log('walkingRes', joystickRes[i]);
|
|
|
- Array.from(joystickRes[i]).forEach(
|
|
|
- (item: StreamReplyType, index: number) => {
|
|
|
- const dir = this.isHeaderOrLast(
|
|
|
- index,
|
|
|
- joystickRes[i].length - 1,
|
|
|
- );
|
|
|
- item.DIR = dir ? 1 : 3;
|
|
|
- },
|
|
|
- );
|
|
|
+ if (joystickRes?.length >= 1) {
|
|
|
+ for (let i = 1; i < joystickRes.length; i++) {
|
|
|
+ console.log('joystickRes', joystickRes[i]);
|
|
|
+ Array.from(joystickRes[i]).forEach(
|
|
|
+ (item: StreamReplyType, index: number) => {
|
|
|
+ const dir = this.isHeaderOrLast(
|
|
|
+ index,
|
|
|
+ joystickRes[i].length - 1,
|
|
|
+ );
|
|
|
+ item.DIR = dir ? 1 : 3;
|
|
|
+ },
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
const seqs = Array.from(
|
|
|
joystickRes,
|
|
|
).flat() as any as StreamReplyType[];
|