scene.d.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. interface SceneGrpcService {
  2. getRoute(request: RouteRequest): Observable<any>;
  3. init(request: InitRequest): Observable<any>;
  4. rotate(request: RotateRequest): Observable<NormalReply>;
  5. move(request: MoveRequest): Observable<any>;
  6. getBreakPoint(request: GetBreakPointRequest): Observable<any>;
  7. joystick(request: JoystickRequest): Observable<any>;
  8. echo(request: EchoRequest): Observable<any>;
  9. exit(request: ExitRequest): Observable<any>;
  10. }
  11. interface Point {
  12. x: number;
  13. y: number;
  14. z: number;
  15. }
  16. interface Angle {
  17. pitch: number;
  18. yaw: number;
  19. roll: number;
  20. }
  21. interface Player {
  22. position: Point;
  23. angle: Angle;
  24. }
  25. interface ExitRequest {
  26. action_type: number;
  27. user_id: string;
  28. trace_id: string;
  29. }
  30. interface RouteRequest {
  31. sLocation: Point;
  32. eLocation: Point;
  33. sceneCode: string;
  34. }
  35. interface InitRequest {
  36. user_id: string;
  37. nick_name: string;
  38. skin_id: string;
  39. avatar_id: string;
  40. // room_id: string;
  41. app_id: string;
  42. player: Player;
  43. is_host: boolean;
  44. skin_data_version: string;
  45. rotation_render_type: number;
  46. is_all_sync: true;
  47. camera: {
  48. position: Point;
  49. angle: Angle;
  50. };
  51. person: number;
  52. sync_by_event: boolean;
  53. firends: string;
  54. area_name: string;
  55. path_name: string;
  56. attitude: string;
  57. room_type_id: string;
  58. syncToOthers: boolean;
  59. hasAvatar: boolean;
  60. prioritySync: boolean;
  61. extra: string;
  62. user_id: string;
  63. roomId: string;
  64. }
  65. interface RotateRequest {
  66. action_type: number;
  67. rotation_action?: RotationActionType;
  68. trace_id: string;
  69. user_id: string;
  70. sampleRate?: number;
  71. }
  72. interface MoveRequest {
  73. action_type: number;
  74. clicking_action: {
  75. clicking_point: Point;
  76. clicking_type: number;
  77. extra: string;
  78. attitude: string;
  79. };
  80. clicking_state: {
  81. roomTypeId: string;
  82. person: number;
  83. avatarId: string;
  84. skinId: string;
  85. roomId: string;
  86. isHost: boolean;
  87. isFollowHost: boolean;
  88. skinDataVersion: string;
  89. avatarComponents: string;
  90. nickName: string;
  91. movingMode: number;
  92. attitude: string;
  93. areaName: string;
  94. pathName: string;
  95. pathId: string;
  96. avatarSize: number;
  97. extra: string;
  98. prioritySync: true;
  99. player: {
  100. position: Point;
  101. angle: {
  102. pitch: number;
  103. yaw: number;
  104. roll: number;
  105. };
  106. };
  107. camera: {
  108. position: Point;
  109. angle: {
  110. pitch: number;
  111. yaw: number;
  112. roll: number;
  113. };
  114. };
  115. cameraCenter: Point;
  116. };
  117. trace_id: string;
  118. user_id: string;
  119. }
  120. interface GetBreakPointRequest {
  121. actionType: number;
  122. getNeighborPointsAction: {
  123. point: Point;
  124. level: number;
  125. containSelf: boolean;
  126. searchRange: number;
  127. };
  128. traceId: string;
  129. userId: string;
  130. }
  131. interface JoystickRequest {
  132. actionType: number;
  133. dirAction: {
  134. moveAngle: number;
  135. speedLevel: number;
  136. };
  137. traceId: string;
  138. userId: string;
  139. packetId: string;
  140. }
  141. interface EchoRequest {
  142. action_type: number;
  143. echo_msg: {
  144. echoMsg: string;
  145. };
  146. trace_id: string;
  147. user_id: string;
  148. }
  149. interface RTCEchoMessage {
  150. echoMsg: string;
  151. }
  152. interface RTCEchoMessage {
  153. echoMsg: string;
  154. }
  155. interface newUserStateType {
  156. userType: number;
  157. }
  158. interface RotationActionType {
  159. vertical_move: number;
  160. horizontal_move: number;
  161. }
  162. interface RTCMessageRequest {
  163. action_type: number;
  164. echo_msg?: RTCEchoMessage;
  165. MstType?: number;
  166. getNewUserStateAction?: newUserStateType;
  167. rotation_action?: RotationActionType;
  168. sampleRate?: number;
  169. trace_id: string;
  170. user_id: string;
  171. }
  172. interface NormalReply {
  173. code: number;
  174. }
  175. interface MovingLastUpdateType {
  176. mediaSrc: string;
  177. metaData: StreamReplyType;
  178. }