scene.proto 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. //版本
  2. syntax = "proto3";
  3. package scene;
  4. option java_multiple_files = true;
  5. // grpc插件生成的类的报名,随便写
  6. option java_package = "com.fdkk.fdkkmeta.grpc";
  7. // grpc的方法
  8. service SceneGrpcService {
  9. rpc getRoute (RouteRequest) returns (RouteReply){}
  10. rpc init (InitRequest) returns (CommonReply){}
  11. rpc rotate (RotateRequest) returns (NormalReply){}
  12. rpc move (MoveRequest) returns (NormalReply){}
  13. // rpc moveStart (StartMoveRequest) returns (MoveReply){}
  14. // rpc moveProcess (MoveNextNeighborRequest) returns (MoveReply){}
  15. rpc echo (EchoRequest) returns (EchoReply){}
  16. rpc usersState (GetNewUserStateRequest) returns (GetNewUserStateReply){}
  17. rpc getBreakPoint (BreakPointRequest) returns (BreakPointReply){}
  18. rpc joystick (JoystickRequest) returns (NormalReply){} //操作杆
  19. rpc exit(ExitRequest) returns (NormalReply){}
  20. }
  21. // 全局对象
  22. message Point {
  23. string x=1;
  24. string y=2;
  25. string z=3;
  26. }
  27. // 全局对象
  28. message AngleUe4 {
  29. int32 pitch=1;
  30. int32 yaw=2;
  31. int32 roll=3;
  32. }
  33. // 全局对象
  34. message RouteArray{
  35. int32 id=1;
  36. Point location=2;
  37. }
  38. // getRoute入参对象
  39. message RouteRequest {
  40. Point s_location=1;
  41. Point e_location=2;
  42. string sceneCode=3;
  43. }
  44. // getRoute出参对象
  45. message RouteReply{
  46. repeated RouteArray in=1;
  47. }
  48. // 入参对象
  49. message SceneRequest {
  50. string id=1;
  51. string name=2;
  52. }
  53. // 出参对象
  54. message SceneReply {
  55. string res=1;
  56. }
  57. /**********************************************************/
  58. // 正常出参对象
  59. message NormalReply {
  60. int32 code=1; //0/1 0表示没收到,1表示收到
  61. }
  62. /**********************************************************/
  63. /***********************************************************/
  64. message Space {
  65. Point position=1;
  66. AngleUe4 angle=2;
  67. }
  68. message Extra{
  69. bool removeWhenDisconnected=1;
  70. }
  71. message State {
  72. string roomTypeId=1;
  73. int32 person=2;
  74. string avatarId=3;
  75. string skinId=4;
  76. string roomId=5;
  77. bool isHost=6;
  78. bool isFollowHost=7;
  79. string skinDataVersion=8;
  80. string avatarComponents=9;
  81. string nickName=10;
  82. int32 movingMode=11;
  83. string attitude=12;
  84. string areaName=13;
  85. string pathName=14;
  86. string pathId=15;
  87. int32 avatarSize=16;
  88. string extra=17;
  89. bool prioritySync=18;
  90. Space player=19;
  91. Space camera=20;
  92. Point cameraCenter=21;
  93. }
  94. message RenderInfo{
  95. int32 renderType=1;
  96. string videoFrame=2;
  97. int32 cameraStateType=3;
  98. int32 isMoving=4;
  99. int32 needIfr=5;
  100. int32 isVideo=6;
  101. int32 stillFrame=7;
  102. int32 isRotating=8;
  103. int32 isFollowing=9;
  104. repeated string clientPanoTitlesBitmap=10;
  105. string clientPanoTreceId=11;
  106. string prefetchVideoId=12;
  107. bool noMedia=13;
  108. }
  109. message Event{
  110. string id=1;
  111. int32 type =2;
  112. repeated Point points=3;
  113. string rotateEvent=4;
  114. string removeVisitorEvent=5;
  115. }
  116. message UserState{
  117. string userId=1;
  118. State playerState=2;
  119. RenderInfo renderInfo=3;
  120. Event event=4;
  121. int32 relation=5;
  122. }
  123. /***********************************************************/
  124. // init入参对象
  125. message InitRequest {
  126. string user_id=1;
  127. string roomId=2;
  128. string avatar_id=3;
  129. string skin_id=4;
  130. bool is_host=5;
  131. string skin_data_version=6;
  132. int32 rotation_render_type=7;
  133. bool is_all_sync=8;
  134. string nick_name=9;
  135. string app_id=10;
  136. Space camera=11;
  137. Space player=12;
  138. int32 person=13;
  139. string firends=14;
  140. bool sync_by_event=15;
  141. string area_name=16;
  142. string path_name=17;
  143. string attitude=18;
  144. string room_type_id=19;
  145. bool syncToOthers=20;
  146. bool hasAvatar=21;
  147. bool prioritySync=22;
  148. string extra=23;
  149. }
  150. /**********************************************************/
  151. message EchoMsg{
  152. string echoMsg=1;
  153. }
  154. message EchoRequest{
  155. int32 action_type=1; //1009
  156. EchoMsg echo_msg=2;
  157. string trace_id=3;
  158. string user_id=4;
  159. }
  160. message EchoReply{
  161. int32 actionType=1; //1009
  162. int32 pointType=2;
  163. string extra=3;
  164. string traceId=4;
  165. string packetId=5;
  166. repeated Point nps=6;
  167. int32 peopleNum=7;
  168. string zoneId=8;
  169. string echoMsg=9;
  170. string reserveDetail=10;
  171. repeated string userWithAvatarList=11;
  172. repeated UserState newUserStates=12;
  173. int32 code=13;
  174. string msg=14;
  175. }
  176. /*********************************************/
  177. message getNewUserStateAction{
  178. int32 userType=1;
  179. }
  180. message GetNewUserStateRequest{
  181. int32 action_type=1; //1024
  182. getNewUserStateAction getNewUserStateAction=2;
  183. string trace_id=3;
  184. string user_id=4;
  185. }
  186. message GetNewUserStateReply{
  187. int32 actionType=1; //1024
  188. int32 pointType=2;
  189. string extra=3;
  190. string traceId=4;
  191. string packetId=5;
  192. repeated Point nps=6;
  193. int32 peopleNum=7;
  194. string zoneId=8;
  195. string echoMsg=9;
  196. string reserveDetail=10;
  197. repeated string userWithAvatarList=11;
  198. repeated UserState newUserStates=12;
  199. int32 code=13;
  200. string msg=14;
  201. }
  202. /*********************************************/
  203. //全局对象,旋转的参数
  204. message RotationAction{
  205. int32 vertical_move=1;
  206. double horizontal_move=2;
  207. }
  208. // rotate入参对象
  209. message RotateRequest {
  210. int32 action_type=1; //1014
  211. RotationAction rotation_action=2;
  212. string trace_id=3;
  213. string user_id=4;
  214. }
  215. /**********************************************************/
  216. //正常的反馈
  217. message CommonReply {
  218. repeated string traceIds=1;
  219. string vehicle=2;
  220. repeated UserState newUserStates=3;
  221. repeated int32 actionResponses=4;
  222. int32 getStateType=5;
  223. int32 code=6;
  224. string msg=7;
  225. }
  226. /**********************************************************/
  227. //
  228. message ClickingAction {
  229. Point clicking_point=1;
  230. int32 clicking_type=2;
  231. string extra=3;
  232. string attitude=4;
  233. }
  234. message MoveRequest {
  235. int32 action_type=1; //1
  236. ClickingAction clicking_action=2;
  237. State clicking_state=3;
  238. string trace_id=4;
  239. string user_id=5;
  240. }
  241. //// 开始请求漫游
  242. //message StartMoveRequest {
  243. // int32 action_type=1;
  244. // ClickingAction clicking_action=2;
  245. // State clicking_state=3;
  246. // string trace_id=4;
  247. // string user_id=5;
  248. //}
  249. //
  250. //// 请求移动下一段
  251. //message MoveNextNeighborRequest {
  252. // string user_id=1;
  253. // string trace_id=2;
  254. // bool next=3; //true表示继续拿下一个,false表示结束(一般是有新的请求)
  255. //}
  256. // move出参对象
  257. // 这需要自定义
  258. //message MoveReply {
  259. // repeated string traceIds=1;
  260. // string vehicle=2;
  261. // repeated UserState newUserStates=3; //自己的话,不要有player,camera和cameraCenter。自己对应的这三个属性在8,9,10上,到webrtc服务器上组装
  262. // repeated int32 actionResponses=4;
  263. // int32 getStateType=5;
  264. // int32 code=6;
  265. // string msg=7;
  266. // //每一段的人物和相机坐标,第一段可能还有初始旋转
  267. // repeated Space player=8;
  268. // repeated Space camera=9;
  269. // repeated Point cameraCenter=10;
  270. // repeated string frameSrc=11;
  271. // bool isEnd=12; //false表示可以继续移动,true表示这次移动已经结束
  272. //}
  273. /**********************************************************/
  274. /**********************************************************/
  275. message DirAction{
  276. int32 move_angle=1;
  277. int32 speed_level=2;
  278. }
  279. //控制杆移动
  280. message JoystickRequest {
  281. int32 action_type=1;
  282. DirAction dir_action=2;
  283. string trace_id=3;
  284. string user_id=4;
  285. string packet_id=5;
  286. }
  287. /**********************************************************/
  288. /**********************************************************/
  289. message NeighborPointsAction{
  290. Point point=1;
  291. int32 level=2;
  292. bool containSelf=3;
  293. int32 searchRange=4;
  294. }
  295. // move入参对象
  296. message BreakPointRequest{
  297. int32 action_type=1; //1004
  298. NeighborPointsAction get_neighbor_points_action=2;
  299. string trace_id=3;
  300. string user_id=4;
  301. }
  302. // move出参对象
  303. message BreakPointReply {
  304. int32 actionType=1; //1004
  305. int32 pointType=2;
  306. string extra=3;
  307. string traceId=4;
  308. string packetId=5;
  309. repeated Point nps=6;
  310. int32 peopleNum=7;
  311. string zoneId=8;
  312. string echoMsg=9;
  313. string reserveDetail=10;
  314. repeated string userWithAvatarList=11;
  315. repeated UserState newUserStates=12;
  316. int32 code=13;
  317. string msg=14;
  318. }
  319. /**********************************************************/
  320. message ExitRequest{
  321. int32 action_type=1; //1002
  322. string user_id=2;
  323. string trace_id=3;
  324. }