|
@@ -4,7 +4,7 @@ import { AppService } from './app.service';
|
|
|
import { grpcClientOptions } from './scene/grpc-scene.options';
|
|
|
|
|
|
import { ClientGrpc, Client } from '@nestjs/microservices';
|
|
|
-
|
|
|
+import { SceneService } from './scene/scene.service';
|
|
|
interface Point {
|
|
|
x: string;
|
|
|
y: string;
|
|
@@ -15,7 +15,10 @@ export class AppController implements OnModuleInit {
|
|
|
@Client(grpcClientOptions) private readonly client: ClientGrpc;
|
|
|
private sceneGrpcService: SceneGrpcService;
|
|
|
|
|
|
- constructor(private readonly appService: AppService) { }
|
|
|
+ constructor(
|
|
|
+ private readonly appService: AppService,
|
|
|
+ private readonly sceneService: SceneService,
|
|
|
+ ) {}
|
|
|
|
|
|
onModuleInit() {
|
|
|
// console.log('this.client', this.client);
|
|
@@ -70,7 +73,6 @@ export class AppController implements OnModuleInit {
|
|
|
// initReply.subscribe((val) => {
|
|
|
// console.log('val', val);
|
|
|
// });
|
|
|
-
|
|
|
// const params = {
|
|
|
// action_type: 1009,
|
|
|
// echo_msg: {
|
|
@@ -79,13 +81,14 @@ export class AppController implements OnModuleInit {
|
|
|
// trace_id: '2b6e3444-63eb-40a7-8049-1d6616f16664',
|
|
|
// user_id: '31a6322c-78f1-4744-99df-bc042f50bebc',
|
|
|
// };
|
|
|
- const initReply = this.sceneGrpcService.test({
|
|
|
- name: 'lala',
|
|
|
- });
|
|
|
- initReply.subscribe((val) => {
|
|
|
- console.log('val', val);
|
|
|
- });
|
|
|
+ // const initReply = this.sceneGrpcService.test({
|
|
|
+ // name: 'lala',
|
|
|
+ // });
|
|
|
+ // initReply.subscribe((val) => {
|
|
|
+ // console.log('val', val);
|
|
|
+ // });
|
|
|
// console.log('initReply')
|
|
|
+ this.sceneService.pushTheFirstFrame();
|
|
|
} catch (error) {
|
|
|
console.log('test', error);
|
|
|
}
|