|
@@ -206,10 +206,19 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
}
|
|
}
|
|
|
|
|
|
async rotate(request: RotateRequest) {
|
|
async rotate(request: RotateRequest) {
|
|
-
|
|
|
|
if (this.isHasWalkingJoints()) {
|
|
if (this.isHasWalkingJoints()) {
|
|
this.globalOptLock = true;
|
|
this.globalOptLock = true;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (
|
|
|
|
+ this.onMoving.getValue() &&
|
|
|
|
+ this.globalOptLock &&
|
|
|
|
+ // this._rotateCount > 5 &&
|
|
|
|
+ !this.rotateStopThrottle
|
|
|
|
+ ) {
|
|
|
|
+ this.handleRotateStop(request);
|
|
|
|
+ debugger;
|
|
|
|
+ }
|
|
this.handleRotate(request);
|
|
this.handleRotate(request);
|
|
this._rotateCount += 1;
|
|
this._rotateCount += 1;
|
|
//this.logger.log('request', request)
|
|
//this.logger.log('request', request)
|
|
@@ -234,20 +243,6 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
const start = performance.now();
|
|
const start = performance.now();
|
|
|
|
|
|
// 当move时处理 _rotateCount是移动端同时触发的问题,rotateStopThrottle是减少重复抖动stop的处理。
|
|
// 当move时处理 _rotateCount是移动端同时触发的问题,rotateStopThrottle是减少重复抖动stop的处理。
|
|
-
|
|
|
|
- if (
|
|
|
|
- this.onMoving.getValue() &&
|
|
|
|
- this.globalOptLock &&
|
|
|
|
- // this._rotateCount > 5 &&
|
|
|
|
- !this.rotateStopThrottle
|
|
|
|
- ) {
|
|
|
|
-
|
|
|
|
- // this.handleRotateStop(request);
|
|
|
|
- debugger;
|
|
|
|
-
|
|
|
|
- // return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
this.onRotating.next(true);
|
|
this.onRotating.next(true);
|
|
|
|
|
|
const redisMeta: StreamReplyType = await this.rotateService.seqExeRotate(
|
|
const redisMeta: StreamReplyType = await this.rotateService.seqExeRotate(
|
|
@@ -786,6 +781,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
}
|
|
}
|
|
|
|
|
|
cleanMoveSteam() {
|
|
cleanMoveSteam() {
|
|
|
|
+ this.moveQueue.clean();
|
|
if (this.moveQueueSubscription) {
|
|
if (this.moveQueueSubscription) {
|
|
this.moveQueueSubscription.unsubscribe();
|
|
this.moveQueueSubscription.unsubscribe();
|
|
this.moveQueueSubscription = null;
|
|
this.moveQueueSubscription = null;
|
|
@@ -874,7 +870,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
this.lastMovingPointArray = [];
|
|
this.lastMovingPointArray = [];
|
|
this.hasJoystickMoveRequest = false;
|
|
this.hasJoystickMoveRequest = false;
|
|
this.cleanMoveSteam();
|
|
this.cleanMoveSteam();
|
|
- this.globalOptLock = false;
|
|
|
|
|
|
+ // this.globalOptLock = false;
|
|
this.resumeStream();
|
|
this.resumeStream();
|
|
this.logger.log('move end');
|
|
this.logger.log('move end');
|
|
}, 200);
|
|
}, 200);
|