|
@@ -48,8 +48,7 @@ export class MoveService implements OnModuleInit {
|
|
|
traceIds: [],
|
|
|
vehicle: null,
|
|
|
mediaSrc: null,
|
|
|
- //moveOver: false,
|
|
|
- moveStart: false,
|
|
|
+ joystickIDR:false,
|
|
|
newUserStates: [
|
|
|
{
|
|
|
userId: 'dcff36ae4fc1d',
|
|
@@ -1108,16 +1107,8 @@ export class MoveService implements OnModuleInit {
|
|
|
|
|
|
if (cameraInfo.mediaSrc) {
|
|
|
this.reply.mediaSrc = cameraInfo.mediaSrc;
|
|
|
- if(this.cameraInfos.length == 0){
|
|
|
- this.reply.moveStart = true;
|
|
|
- }
|
|
|
- else{
|
|
|
- this.reply.moveStart = false;
|
|
|
- }
|
|
|
+ this.reply.joystickIDR = cameraInfo.joystickIDR;
|
|
|
}
|
|
|
- // if (this.cameraInfos.length == 0) {
|
|
|
- // this.reply.moveOver = true;
|
|
|
- // }
|
|
|
|
|
|
user.camera.position = JSON.parse(
|
|
|
JSON.stringify(cameraInfo.camera_position),
|
|
@@ -1190,16 +1181,8 @@ export class MoveService implements OnModuleInit {
|
|
|
|
|
|
if (cameraInfo.mediaSrc) {
|
|
|
this.reply.mediaSrc = cameraInfo.mediaSrc;
|
|
|
- if(this.cameraInfos.length == 0){
|
|
|
- this.reply.moveStart = true;
|
|
|
- }
|
|
|
- else{
|
|
|
- this.reply.moveStart = false;
|
|
|
- }
|
|
|
+ this.reply.joystickIDR = cameraInfo.joystickIDR;
|
|
|
}
|
|
|
- // if (this.cameraInfos.length == 0) {
|
|
|
- // this.reply.moveOver = true;
|
|
|
- // }
|
|
|
|
|
|
user.camera.position = JSON.parse(
|
|
|
JSON.stringify(cameraInfo.camera_position),
|
|
@@ -1248,11 +1231,15 @@ export class MoveService implements OnModuleInit {
|
|
|
);
|
|
|
|
|
|
for (let i = 0; i < checkReplys.length; ++i) {
|
|
|
- //checkReplys[i].actionResponses[0].actionType = actionType;
|
|
|
+ let joystickIDR = false;
|
|
|
+ if(i == 0 || i == checkReplys.length-1){
|
|
|
+ joystickIDR = true;
|
|
|
+ }
|
|
|
this.addCameraInfo(
|
|
|
checkReplys[i]['newUserStates'][0].playerState.camera.position,
|
|
|
checkReplys[i]['newUserStates'][0].playerState.camera.angle,
|
|
|
checkReplys[i].mediaSrc,
|
|
|
+ joystickIDR,
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -1296,7 +1283,7 @@ export class MoveService implements OnModuleInit {
|
|
|
|
|
|
if (cameraInfo.mediaSrc) {
|
|
|
this.reply.mediaSrc = cameraInfo.mediaSrc;
|
|
|
- this.reply.moveStart = true;
|
|
|
+ this.reply.joystickIDR = cameraInfo.joystickIDR;
|
|
|
}
|
|
|
this.sendingFrameForJoystick = true;
|
|
|
}
|
|
@@ -1339,15 +1326,25 @@ export class MoveService implements OnModuleInit {
|
|
|
'?m=' +
|
|
|
new Date().getTime();
|
|
|
}
|
|
|
+ if(i == 0){
|
|
|
+ moveFrames[i].joystickIDR = true;
|
|
|
+ }
|
|
|
+ else if(i == moveFrames.length -1){
|
|
|
+ moveFrames[i].joystickIDR = true;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ moveFrames[i].joystickIDR = false;
|
|
|
+ }
|
|
|
this.cameraInfos.push(moveFrames[i]);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- addCameraInfo(cameraPosition, cameraAngle, mediaSrc) {
|
|
|
+ addCameraInfo(cameraPosition, cameraAngle, mediaSrc,joystickIDR) {
|
|
|
this.cameraInfos.push({
|
|
|
camera_position: cameraPosition,
|
|
|
camera_angle: cameraAngle,
|
|
|
mediaSrc: mediaSrc,
|
|
|
+ joystickIDR:joystickIDR
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -1388,12 +1385,7 @@ export class MoveService implements OnModuleInit {
|
|
|
|
|
|
if (cameraInfo.mediaSrc) {
|
|
|
this.reply.mediaSrc = cameraInfo.mediaSrc;
|
|
|
- if(this.cameraInfos.length == 0){
|
|
|
- this.reply.moveStart = true;
|
|
|
- }
|
|
|
- else{
|
|
|
- this.reply.moveStart = false;
|
|
|
- }
|
|
|
+ this.reply.joystickIDR = cameraInfo.joystickIDR;
|
|
|
}
|
|
|
|
|
|
user.camera.position = JSON.parse(
|