|
@@ -1335,12 +1335,13 @@ export class MoveService implements OnModuleInit {
|
|
|
}
|
|
|
|
|
|
complementFrame(userId) {
|
|
|
- console.log('handlejoysticktesttest:complementFrame:'+this.cameraInfos.length);
|
|
|
if (this.cameraInfos == null) {
|
|
|
+ console.log('handlejoysticktesttest:complementFrame-1 结束'+new Date().getTime())
|
|
|
this.cameraInfos = [];
|
|
|
return null;
|
|
|
}
|
|
|
else if (this.cameraInfos.length > 0) {
|
|
|
+ console.log('handlejoysticktesttest:complementFrame-2 继续'+new Date().getTime())
|
|
|
const user = this.users[userId];
|
|
|
const cameraInfo = this.cameraInfos.shift();
|
|
|
this.reply.traceIds = [];
|
|
@@ -1367,10 +1368,19 @@ export class MoveService implements OnModuleInit {
|
|
|
this.reply.mediaSrc = cameraInfo.mediaSrc;
|
|
|
}
|
|
|
|
|
|
+ user.camera.position = JSON.parse(
|
|
|
+ JSON.stringify(cameraInfo.camera_position),
|
|
|
+ );
|
|
|
+
|
|
|
+ user.camera.angle = JSON.parse(
|
|
|
+ JSON.stringify(cameraInfo.camera_angle),
|
|
|
+ );
|
|
|
+
|
|
|
this.sendingFrameForJoystick = true;
|
|
|
return this.reply;
|
|
|
}
|
|
|
else if (this.cameraInfos.length == 0){
|
|
|
+ console.log('handlejoysticktesttest:complementFrame-3 停止'+new Date().getTime())
|
|
|
this.cameraInfos = null;
|
|
|
return this.stopJoystick(userId)
|
|
|
}
|