@dcl/protocol 1.0.0-4468031496.commit-eace17b → 1.0.0-4543854409.commit-89f5875
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out-js/decentraland/bff/authentication_service.gen.d.ts +2 -6
- package/out-js/decentraland/bff/authentication_service.gen.js +2 -2
- package/out-js/decentraland/bff/authentication_service.gen.js.map +1 -1
- package/out-js/decentraland/bff/comms_director_service.gen.d.ts +2 -6
- package/out-js/decentraland/bff/comms_director_service.gen.js +2 -2
- package/out-js/decentraland/bff/comms_director_service.gen.js.map +1 -1
- package/out-js/decentraland/bff/comms_service.gen.d.ts +7 -21
- package/out-js/decentraland/bff/comms_service.gen.js +7 -7
- package/out-js/decentraland/bff/comms_service.gen.js.map +1 -1
- package/out-js/decentraland/bff/http_endpoints.gen.d.ts +1 -3
- package/out-js/decentraland/bff/http_endpoints.gen.js +1 -1
- package/out-js/decentraland/bff/http_endpoints.gen.js.map +1 -1
- package/out-js/decentraland/bff/topics_service.gen.d.ts +3 -9
- package/out-js/decentraland/bff/topics_service.gen.js +3 -3
- package/out-js/decentraland/bff/topics_service.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/communications_controller.gen.d.ts +1 -3
- package/out-js/decentraland/kernel/apis/communications_controller.gen.js +1 -1
- package/out-js/decentraland/kernel/apis/communications_controller.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/dev_tools.gen.d.ts +1 -3
- package/out-js/decentraland/kernel/apis/dev_tools.gen.js +1 -1
- package/out-js/decentraland/kernel/apis/dev_tools.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/engine_api.gen.d.ts +6 -18
- package/out-js/decentraland/kernel/apis/engine_api.gen.js +6 -6
- package/out-js/decentraland/kernel/apis/engine_api.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/environment_api.gen.d.ts +7 -21
- package/out-js/decentraland/kernel/apis/environment_api.gen.js +7 -7
- package/out-js/decentraland/kernel/apis/environment_api.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/ethereum_controller.gen.d.ts +5 -15
- package/out-js/decentraland/kernel/apis/ethereum_controller.gen.js +5 -5
- package/out-js/decentraland/kernel/apis/ethereum_controller.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/parcel_identity.gen.d.ts +3 -9
- package/out-js/decentraland/kernel/apis/parcel_identity.gen.js +3 -3
- package/out-js/decentraland/kernel/apis/parcel_identity.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/permissions.gen.d.ts +2 -6
- package/out-js/decentraland/kernel/apis/permissions.gen.js +2 -2
- package/out-js/decentraland/kernel/apis/permissions.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/players.gen.d.ts +3 -9
- package/out-js/decentraland/kernel/apis/players.gen.js +3 -3
- package/out-js/decentraland/kernel/apis/players.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/portable_experiences.gen.d.ts +4 -12
- package/out-js/decentraland/kernel/apis/portable_experiences.gen.js +4 -4
- package/out-js/decentraland/kernel/apis/portable_experiences.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +7 -21
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +7 -7
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/runtime.gen.d.ts +2 -6
- package/out-js/decentraland/kernel/apis/runtime.gen.js +2 -2
- package/out-js/decentraland/kernel/apis/runtime.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/scene.gen.d.ts +1 -3
- package/out-js/decentraland/kernel/apis/scene.gen.js +1 -1
- package/out-js/decentraland/kernel/apis/scene.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/signed_fetch.gen.d.ts +1 -3
- package/out-js/decentraland/kernel/apis/signed_fetch.gen.js +1 -1
- package/out-js/decentraland/kernel/apis/signed_fetch.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/social_controller.gen.d.ts +1 -3
- package/out-js/decentraland/kernel/apis/social_controller.gen.js +1 -1
- package/out-js/decentraland/kernel/apis/social_controller.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/user_action_module.gen.d.ts +1 -3
- package/out-js/decentraland/kernel/apis/user_action_module.gen.js +1 -1
- package/out-js/decentraland/kernel/apis/user_action_module.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/user_identity.gen.d.ts +2 -6
- package/out-js/decentraland/kernel/apis/user_identity.gen.js +2 -2
- package/out-js/decentraland/kernel/apis/user_identity.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/camera_type.gen.d.ts +2 -0
- package/out-js/decentraland/sdk/components/common/camera_type.gen.js +7 -0
- package/out-js/decentraland/sdk/components/common/camera_type.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +10 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js +47 -1
- package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/raycast_hit.gen.d.ts +173 -0
- package/out-js/decentraland/sdk/components/common/raycast_hit.gen.js +156 -0
- package/out-js/decentraland/sdk/components/common/raycast_hit.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +15 -1
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js +85 -1
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/pointer_events.gen.d.ts +1 -11
- package/out-js/decentraland/sdk/components/pointer_events.gen.js +3 -49
- package/out-js/decentraland/sdk/components/pointer_events.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/pointer_events_result.gen.d.ts +10 -11
- package/out-js/decentraland/sdk/components/pointer_events_result.gen.js +10 -11
- package/out-js/decentraland/sdk/components/pointer_events_result.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/raycast.gen.d.ts +239 -38
- package/out-js/decentraland/sdk/components/raycast.gen.js +145 -20
- package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/raycast_result.gen.d.ts +26 -176
- package/out-js/decentraland/sdk/components/raycast_result.gen.js +21 -186
- package/out-js/decentraland/sdk/components/raycast_result.gen.js.map +1 -1
- package/out-js/decentraland/social/friendships/friendships.gen.d.ts +4 -12
- package/out-js/decentraland/social/friendships/friendships.gen.js +4 -4
- package/out-js/decentraland/social/friendships/friendships.gen.js.map +1 -1
- package/out-ts/decentraland/bff/authentication_service.gen.ts +2 -2
- package/out-ts/decentraland/bff/comms_director_service.gen.ts +2 -2
- package/out-ts/decentraland/bff/comms_service.gen.ts +7 -7
- package/out-ts/decentraland/bff/http_endpoints.gen.ts +1 -1
- package/out-ts/decentraland/bff/topics_service.gen.ts +3 -3
- package/out-ts/decentraland/kernel/apis/communications_controller.gen.ts +1 -1
- package/out-ts/decentraland/kernel/apis/dev_tools.gen.ts +1 -1
- package/out-ts/decentraland/kernel/apis/engine_api.gen.ts +6 -6
- package/out-ts/decentraland/kernel/apis/environment_api.gen.ts +7 -7
- package/out-ts/decentraland/kernel/apis/ethereum_controller.gen.ts +5 -5
- package/out-ts/decentraland/kernel/apis/parcel_identity.gen.ts +3 -3
- package/out-ts/decentraland/kernel/apis/permissions.gen.ts +2 -2
- package/out-ts/decentraland/kernel/apis/players.gen.ts +3 -3
- package/out-ts/decentraland/kernel/apis/portable_experiences.gen.ts +4 -4
- package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +7 -7
- package/out-ts/decentraland/kernel/apis/runtime.gen.ts +2 -2
- package/out-ts/decentraland/kernel/apis/scene.gen.ts +1 -1
- package/out-ts/decentraland/kernel/apis/signed_fetch.gen.ts +1 -1
- package/out-ts/decentraland/kernel/apis/social_controller.gen.ts +1 -1
- package/out-ts/decentraland/kernel/apis/user_action_module.gen.ts +1 -1
- package/out-ts/decentraland/kernel/apis/user_identity.gen.ts +2 -2
- package/out-ts/decentraland/sdk/components/common/camera_type.gen.ts +7 -0
- package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +46 -0
- package/out-ts/decentraland/sdk/components/common/raycast_hit.gen.ts +204 -0
- package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +85 -1
- package/out-ts/decentraland/sdk/components/pointer_events.gen.ts +8 -47
- package/out-ts/decentraland/sdk/components/pointer_events_result.gen.ts +11 -5
- package/out-ts/decentraland/sdk/components/raycast.gen.ts +180 -26
- package/out-ts/decentraland/sdk/components/raycast_result.gen.ts +24 -232
- package/out-ts/decentraland/social/friendships/friendships.gen.ts +4 -4
- package/package.json +2 -2
- package/proto/decentraland/sdk/components/common/camera_type.proto +1 -0
- package/proto/decentraland/sdk/components/common/input_action.proto +8 -0
- package/proto/decentraland/sdk/components/common/raycast_hit.proto +16 -0
- package/proto/decentraland/sdk/components/mesh_collider.proto +17 -3
- package/proto/decentraland/sdk/components/pointer_events.proto +1 -9
- package/proto/decentraland/sdk/components/pointer_events_result.proto +5 -6
- package/proto/decentraland/sdk/components/raycast.proto +39 -4
- package/proto/decentraland/sdk/components/raycast_result.proto +9 -19
|
@@ -563,7 +563,7 @@ export const PortableExperiencesServiceDefinition = {
|
|
|
563
563
|
requestStream: false,
|
|
564
564
|
responseType: SpawnResponse,
|
|
565
565
|
responseStream: false,
|
|
566
|
-
options: {
|
|
566
|
+
options: {},
|
|
567
567
|
},
|
|
568
568
|
/**
|
|
569
569
|
* Kill a child portable experience, this method only works if the child was
|
|
@@ -575,7 +575,7 @@ export const PortableExperiencesServiceDefinition = {
|
|
|
575
575
|
requestStream: false,
|
|
576
576
|
responseType: KillResponse,
|
|
577
577
|
responseStream: false,
|
|
578
|
-
options: {
|
|
578
|
+
options: {},
|
|
579
579
|
},
|
|
580
580
|
/**
|
|
581
581
|
* Kill the current scene if the current scene is a portable experience. Other
|
|
@@ -587,7 +587,7 @@ export const PortableExperiencesServiceDefinition = {
|
|
|
587
587
|
requestStream: false,
|
|
588
588
|
responseType: ExitResponse,
|
|
589
589
|
responseStream: false,
|
|
590
|
-
options: {
|
|
590
|
+
options: {},
|
|
591
591
|
},
|
|
592
592
|
/**
|
|
593
593
|
* Gets a list of running portable experiences for the current user. Be mindful
|
|
@@ -599,7 +599,7 @@ export const PortableExperiencesServiceDefinition = {
|
|
|
599
599
|
requestStream: false,
|
|
600
600
|
responseType: GetPortableExperiencesLoadedResponse,
|
|
601
601
|
responseStream: false,
|
|
602
|
-
options: {
|
|
602
|
+
options: {},
|
|
603
603
|
},
|
|
604
604
|
},
|
|
605
605
|
} as const;
|
|
@@ -786,7 +786,7 @@ export const RestrictedActionsServiceDefinition = {
|
|
|
786
786
|
requestStream: false,
|
|
787
787
|
responseType: MovePlayerToResponse,
|
|
788
788
|
responseStream: false,
|
|
789
|
-
options: {
|
|
789
|
+
options: {},
|
|
790
790
|
},
|
|
791
791
|
/** TeleportTo will move the user into an absolute world position */
|
|
792
792
|
teleportTo: {
|
|
@@ -795,7 +795,7 @@ export const RestrictedActionsServiceDefinition = {
|
|
|
795
795
|
requestStream: false,
|
|
796
796
|
responseType: MovePlayerToResponse,
|
|
797
797
|
responseStream: false,
|
|
798
|
-
options: {
|
|
798
|
+
options: {},
|
|
799
799
|
},
|
|
800
800
|
/** TriggerEmote will trigger an emote in this current user */
|
|
801
801
|
triggerEmote: {
|
|
@@ -804,7 +804,7 @@ export const RestrictedActionsServiceDefinition = {
|
|
|
804
804
|
requestStream: false,
|
|
805
805
|
responseType: TriggerEmoteResponse,
|
|
806
806
|
responseStream: false,
|
|
807
|
-
options: {
|
|
807
|
+
options: {},
|
|
808
808
|
},
|
|
809
809
|
/** ChangeRealm prompts the user to change to a specific realm */
|
|
810
810
|
changeRealm: {
|
|
@@ -813,7 +813,7 @@ export const RestrictedActionsServiceDefinition = {
|
|
|
813
813
|
requestStream: false,
|
|
814
814
|
responseType: SuccessResponse,
|
|
815
815
|
responseStream: false,
|
|
816
|
-
options: {
|
|
816
|
+
options: {},
|
|
817
817
|
},
|
|
818
818
|
/** OpenExternalUrl prompts the user to open an external link */
|
|
819
819
|
openExternalUrl: {
|
|
@@ -822,7 +822,7 @@ export const RestrictedActionsServiceDefinition = {
|
|
|
822
822
|
requestStream: false,
|
|
823
823
|
responseType: SuccessResponse,
|
|
824
824
|
responseStream: false,
|
|
825
|
-
options: {
|
|
825
|
+
options: {},
|
|
826
826
|
},
|
|
827
827
|
/** OpenNftDialog opens an NFT dialog. */
|
|
828
828
|
openNftDialog: {
|
|
@@ -831,7 +831,7 @@ export const RestrictedActionsServiceDefinition = {
|
|
|
831
831
|
requestStream: false,
|
|
832
832
|
responseType: SuccessResponse,
|
|
833
833
|
responseStream: false,
|
|
834
|
-
options: {
|
|
834
|
+
options: {},
|
|
835
835
|
},
|
|
836
836
|
/**
|
|
837
837
|
* Asks the explorer to connect to other communications adapter, this feature
|
|
@@ -843,7 +843,7 @@ export const RestrictedActionsServiceDefinition = {
|
|
|
843
843
|
requestStream: false,
|
|
844
844
|
responseType: SuccessResponse,
|
|
845
845
|
responseStream: false,
|
|
846
|
-
options: {
|
|
846
|
+
options: {},
|
|
847
847
|
},
|
|
848
848
|
},
|
|
849
849
|
} as const;
|
|
@@ -350,7 +350,7 @@ export const RuntimeServiceDefinition = {
|
|
|
350
350
|
requestStream: false,
|
|
351
351
|
responseType: GetRealmResponse,
|
|
352
352
|
responseStream: false,
|
|
353
|
-
options: {
|
|
353
|
+
options: {},
|
|
354
354
|
},
|
|
355
355
|
/**
|
|
356
356
|
* Provides information about the Decentraland Time, which is coordinated
|
|
@@ -362,7 +362,7 @@ export const RuntimeServiceDefinition = {
|
|
|
362
362
|
requestStream: false,
|
|
363
363
|
responseType: GetWorldTimeResponse,
|
|
364
364
|
responseStream: false,
|
|
365
|
-
options: {
|
|
365
|
+
options: {},
|
|
366
366
|
},
|
|
367
367
|
},
|
|
368
368
|
} as const;
|
|
@@ -230,7 +230,7 @@ export const UserIdentityServiceDefinition = {
|
|
|
230
230
|
requestStream: false,
|
|
231
231
|
responseType: GetUserPublicKeyResponse,
|
|
232
232
|
responseStream: false,
|
|
233
|
-
options: {
|
|
233
|
+
options: {},
|
|
234
234
|
},
|
|
235
235
|
getUserData: {
|
|
236
236
|
name: "GetUserData",
|
|
@@ -238,7 +238,7 @@ export const UserIdentityServiceDefinition = {
|
|
|
238
238
|
requestStream: false,
|
|
239
239
|
responseType: GetUserDataResponse,
|
|
240
240
|
responseStream: false,
|
|
241
|
-
options: {
|
|
241
|
+
options: {},
|
|
242
242
|
},
|
|
243
243
|
},
|
|
244
244
|
} as const;
|
|
@@ -5,6 +5,8 @@ export const protobufPackage = "decentraland.sdk.components.common";
|
|
|
5
5
|
export enum CameraType {
|
|
6
6
|
CT_FIRST_PERSON = 0,
|
|
7
7
|
CT_THIRD_PERSON = 1,
|
|
8
|
+
/** CT_CINEMATIC - controlled by the scene */
|
|
9
|
+
CT_CINEMATIC = 2,
|
|
8
10
|
UNRECOGNIZED = -1,
|
|
9
11
|
}
|
|
10
12
|
|
|
@@ -16,6 +18,9 @@ export function cameraTypeFromJSON(object: any): CameraType {
|
|
|
16
18
|
case 1:
|
|
17
19
|
case "CT_THIRD_PERSON":
|
|
18
20
|
return CameraType.CT_THIRD_PERSON;
|
|
21
|
+
case 2:
|
|
22
|
+
case "CT_CINEMATIC":
|
|
23
|
+
return CameraType.CT_CINEMATIC;
|
|
19
24
|
case -1:
|
|
20
25
|
case "UNRECOGNIZED":
|
|
21
26
|
default:
|
|
@@ -29,6 +34,8 @@ export function cameraTypeToJSON(object: CameraType): string {
|
|
|
29
34
|
return "CT_FIRST_PERSON";
|
|
30
35
|
case CameraType.CT_THIRD_PERSON:
|
|
31
36
|
return "CT_THIRD_PERSON";
|
|
37
|
+
case CameraType.CT_CINEMATIC:
|
|
38
|
+
return "CT_CINEMATIC";
|
|
32
39
|
case CameraType.UNRECOGNIZED:
|
|
33
40
|
default:
|
|
34
41
|
return "UNRECOGNIZED";
|
|
@@ -106,3 +106,49 @@ export function inputActionToJSON(object: InputAction): string {
|
|
|
106
106
|
return "UNRECOGNIZED";
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
/** PointerEventType is a kind of interaction that can be detected. */
|
|
111
|
+
export enum PointerEventType {
|
|
112
|
+
PET_UP = 0,
|
|
113
|
+
PET_DOWN = 1,
|
|
114
|
+
PET_HOVER_ENTER = 2,
|
|
115
|
+
PET_HOVER_LEAVE = 3,
|
|
116
|
+
UNRECOGNIZED = -1,
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function pointerEventTypeFromJSON(object: any): PointerEventType {
|
|
120
|
+
switch (object) {
|
|
121
|
+
case 0:
|
|
122
|
+
case "PET_UP":
|
|
123
|
+
return PointerEventType.PET_UP;
|
|
124
|
+
case 1:
|
|
125
|
+
case "PET_DOWN":
|
|
126
|
+
return PointerEventType.PET_DOWN;
|
|
127
|
+
case 2:
|
|
128
|
+
case "PET_HOVER_ENTER":
|
|
129
|
+
return PointerEventType.PET_HOVER_ENTER;
|
|
130
|
+
case 3:
|
|
131
|
+
case "PET_HOVER_LEAVE":
|
|
132
|
+
return PointerEventType.PET_HOVER_LEAVE;
|
|
133
|
+
case -1:
|
|
134
|
+
case "UNRECOGNIZED":
|
|
135
|
+
default:
|
|
136
|
+
return PointerEventType.UNRECOGNIZED;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function pointerEventTypeToJSON(object: PointerEventType): string {
|
|
141
|
+
switch (object) {
|
|
142
|
+
case PointerEventType.PET_UP:
|
|
143
|
+
return "PET_UP";
|
|
144
|
+
case PointerEventType.PET_DOWN:
|
|
145
|
+
return "PET_DOWN";
|
|
146
|
+
case PointerEventType.PET_HOVER_ENTER:
|
|
147
|
+
return "PET_HOVER_ENTER";
|
|
148
|
+
case PointerEventType.PET_HOVER_LEAVE:
|
|
149
|
+
return "PET_HOVER_LEAVE";
|
|
150
|
+
case PointerEventType.UNRECOGNIZED:
|
|
151
|
+
default:
|
|
152
|
+
return "UNRECOGNIZED";
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Vector3 } from "../../../common/vectors.gen";
|
|
4
|
+
|
|
5
|
+
export const protobufPackage = "decentraland.sdk.components.common";
|
|
6
|
+
|
|
7
|
+
/** RaycastHit contains information about the intersection of a ray with a mesh. */
|
|
8
|
+
export interface RaycastHit {
|
|
9
|
+
/** Position will be relative to the scene */
|
|
10
|
+
position:
|
|
11
|
+
| Vector3
|
|
12
|
+
| undefined;
|
|
13
|
+
/** the starting point of the ray in global coordinates */
|
|
14
|
+
globalOrigin:
|
|
15
|
+
| Vector3
|
|
16
|
+
| undefined;
|
|
17
|
+
/** the direction vector of the ray in global coordinates */
|
|
18
|
+
direction:
|
|
19
|
+
| Vector3
|
|
20
|
+
| undefined;
|
|
21
|
+
/** normal of the hit surface in global coordinates */
|
|
22
|
+
normalHit:
|
|
23
|
+
| Vector3
|
|
24
|
+
| undefined;
|
|
25
|
+
/** the distance between the ray origin and the hit position */
|
|
26
|
+
length: number;
|
|
27
|
+
/** mesh name, if collision happened inside a GltfContainer */
|
|
28
|
+
meshName?:
|
|
29
|
+
| string
|
|
30
|
+
| undefined;
|
|
31
|
+
/** the ID of the Entity that has the impacted mesh attached */
|
|
32
|
+
entityId?: number | undefined;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function createBaseRaycastHit(): RaycastHit {
|
|
36
|
+
return {
|
|
37
|
+
position: undefined,
|
|
38
|
+
globalOrigin: undefined,
|
|
39
|
+
direction: undefined,
|
|
40
|
+
normalHit: undefined,
|
|
41
|
+
length: 0,
|
|
42
|
+
meshName: undefined,
|
|
43
|
+
entityId: undefined,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const RaycastHit = {
|
|
48
|
+
encode(message: RaycastHit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
49
|
+
if (message.position !== undefined) {
|
|
50
|
+
Vector3.encode(message.position, writer.uint32(10).fork()).ldelim();
|
|
51
|
+
}
|
|
52
|
+
if (message.globalOrigin !== undefined) {
|
|
53
|
+
Vector3.encode(message.globalOrigin, writer.uint32(18).fork()).ldelim();
|
|
54
|
+
}
|
|
55
|
+
if (message.direction !== undefined) {
|
|
56
|
+
Vector3.encode(message.direction, writer.uint32(26).fork()).ldelim();
|
|
57
|
+
}
|
|
58
|
+
if (message.normalHit !== undefined) {
|
|
59
|
+
Vector3.encode(message.normalHit, writer.uint32(34).fork()).ldelim();
|
|
60
|
+
}
|
|
61
|
+
if (message.length !== 0) {
|
|
62
|
+
writer.uint32(45).float(message.length);
|
|
63
|
+
}
|
|
64
|
+
if (message.meshName !== undefined) {
|
|
65
|
+
writer.uint32(50).string(message.meshName);
|
|
66
|
+
}
|
|
67
|
+
if (message.entityId !== undefined) {
|
|
68
|
+
writer.uint32(56).uint32(message.entityId);
|
|
69
|
+
}
|
|
70
|
+
return writer;
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RaycastHit {
|
|
74
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
75
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
76
|
+
const message = createBaseRaycastHit();
|
|
77
|
+
while (reader.pos < end) {
|
|
78
|
+
const tag = reader.uint32();
|
|
79
|
+
switch (tag >>> 3) {
|
|
80
|
+
case 1:
|
|
81
|
+
if (tag != 10) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
message.position = Vector3.decode(reader, reader.uint32());
|
|
86
|
+
continue;
|
|
87
|
+
case 2:
|
|
88
|
+
if (tag != 18) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message.globalOrigin = Vector3.decode(reader, reader.uint32());
|
|
93
|
+
continue;
|
|
94
|
+
case 3:
|
|
95
|
+
if (tag != 26) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
message.direction = Vector3.decode(reader, reader.uint32());
|
|
100
|
+
continue;
|
|
101
|
+
case 4:
|
|
102
|
+
if (tag != 34) {
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
message.normalHit = Vector3.decode(reader, reader.uint32());
|
|
107
|
+
continue;
|
|
108
|
+
case 5:
|
|
109
|
+
if (tag != 45) {
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
message.length = reader.float();
|
|
114
|
+
continue;
|
|
115
|
+
case 6:
|
|
116
|
+
if (tag != 50) {
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
message.meshName = reader.string();
|
|
121
|
+
continue;
|
|
122
|
+
case 7:
|
|
123
|
+
if (tag != 56) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
message.entityId = reader.uint32();
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
reader.skipType(tag & 7);
|
|
134
|
+
}
|
|
135
|
+
return message;
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
fromJSON(object: any): RaycastHit {
|
|
139
|
+
return {
|
|
140
|
+
position: isSet(object.position) ? Vector3.fromJSON(object.position) : undefined,
|
|
141
|
+
globalOrigin: isSet(object.globalOrigin) ? Vector3.fromJSON(object.globalOrigin) : undefined,
|
|
142
|
+
direction: isSet(object.direction) ? Vector3.fromJSON(object.direction) : undefined,
|
|
143
|
+
normalHit: isSet(object.normalHit) ? Vector3.fromJSON(object.normalHit) : undefined,
|
|
144
|
+
length: isSet(object.length) ? Number(object.length) : 0,
|
|
145
|
+
meshName: isSet(object.meshName) ? String(object.meshName) : undefined,
|
|
146
|
+
entityId: isSet(object.entityId) ? Number(object.entityId) : undefined,
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
toJSON(message: RaycastHit): unknown {
|
|
151
|
+
const obj: any = {};
|
|
152
|
+
message.position !== undefined && (obj.position = message.position ? Vector3.toJSON(message.position) : undefined);
|
|
153
|
+
message.globalOrigin !== undefined &&
|
|
154
|
+
(obj.globalOrigin = message.globalOrigin ? Vector3.toJSON(message.globalOrigin) : undefined);
|
|
155
|
+
message.direction !== undefined &&
|
|
156
|
+
(obj.direction = message.direction ? Vector3.toJSON(message.direction) : undefined);
|
|
157
|
+
message.normalHit !== undefined &&
|
|
158
|
+
(obj.normalHit = message.normalHit ? Vector3.toJSON(message.normalHit) : undefined);
|
|
159
|
+
message.length !== undefined && (obj.length = message.length);
|
|
160
|
+
message.meshName !== undefined && (obj.meshName = message.meshName);
|
|
161
|
+
message.entityId !== undefined && (obj.entityId = Math.round(message.entityId));
|
|
162
|
+
return obj;
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
create<I extends Exact<DeepPartial<RaycastHit>, I>>(base?: I): RaycastHit {
|
|
166
|
+
return RaycastHit.fromPartial(base ?? {});
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
fromPartial<I extends Exact<DeepPartial<RaycastHit>, I>>(object: I): RaycastHit {
|
|
170
|
+
const message = createBaseRaycastHit();
|
|
171
|
+
message.position = (object.position !== undefined && object.position !== null)
|
|
172
|
+
? Vector3.fromPartial(object.position)
|
|
173
|
+
: undefined;
|
|
174
|
+
message.globalOrigin = (object.globalOrigin !== undefined && object.globalOrigin !== null)
|
|
175
|
+
? Vector3.fromPartial(object.globalOrigin)
|
|
176
|
+
: undefined;
|
|
177
|
+
message.direction = (object.direction !== undefined && object.direction !== null)
|
|
178
|
+
? Vector3.fromPartial(object.direction)
|
|
179
|
+
: undefined;
|
|
180
|
+
message.normalHit = (object.normalHit !== undefined && object.normalHit !== null)
|
|
181
|
+
? Vector3.fromPartial(object.normalHit)
|
|
182
|
+
: undefined;
|
|
183
|
+
message.length = object.length ?? 0;
|
|
184
|
+
message.meshName = object.meshName ?? undefined;
|
|
185
|
+
message.entityId = object.entityId ?? undefined;
|
|
186
|
+
return message;
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
191
|
+
|
|
192
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
193
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
194
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
195
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
196
|
+
: Partial<T>;
|
|
197
|
+
|
|
198
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
199
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
200
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
201
|
+
|
|
202
|
+
function isSet(value: any): boolean {
|
|
203
|
+
return value !== null && value !== undefined;
|
|
204
|
+
}
|
|
@@ -9,8 +9,22 @@ export enum ColliderLayer {
|
|
|
9
9
|
CL_NONE = 0,
|
|
10
10
|
/** CL_POINTER - collisions with the player's pointer ray (e.g. mouse cursor hovering) */
|
|
11
11
|
CL_POINTER = 1,
|
|
12
|
-
/** CL_PHYSICS -
|
|
12
|
+
/** CL_PHYSICS - collision affecting your player's physics i.e. walls, floor, moving platfroms */
|
|
13
13
|
CL_PHYSICS = 2,
|
|
14
|
+
CL_RESERVED1 = 4,
|
|
15
|
+
CL_RESERVED2 = 8,
|
|
16
|
+
CL_RESERVED3 = 16,
|
|
17
|
+
CL_RESERVED4 = 32,
|
|
18
|
+
CL_RESERVED5 = 64,
|
|
19
|
+
CL_RESERVED6 = 128,
|
|
20
|
+
CL_CUSTOM1 = 256,
|
|
21
|
+
CL_CUSTOM2 = 512,
|
|
22
|
+
CL_CUSTOM3 = 1024,
|
|
23
|
+
CL_CUSTOM4 = 2048,
|
|
24
|
+
CL_CUSTOM5 = 4096,
|
|
25
|
+
CL_CUSTOM6 = 8192,
|
|
26
|
+
CL_CUSTOM7 = 16384,
|
|
27
|
+
CL_CUSTOM8 = 32768,
|
|
14
28
|
UNRECOGNIZED = -1,
|
|
15
29
|
}
|
|
16
30
|
|
|
@@ -25,6 +39,48 @@ export function colliderLayerFromJSON(object: any): ColliderLayer {
|
|
|
25
39
|
case 2:
|
|
26
40
|
case "CL_PHYSICS":
|
|
27
41
|
return ColliderLayer.CL_PHYSICS;
|
|
42
|
+
case 4:
|
|
43
|
+
case "CL_RESERVED1":
|
|
44
|
+
return ColliderLayer.CL_RESERVED1;
|
|
45
|
+
case 8:
|
|
46
|
+
case "CL_RESERVED2":
|
|
47
|
+
return ColliderLayer.CL_RESERVED2;
|
|
48
|
+
case 16:
|
|
49
|
+
case "CL_RESERVED3":
|
|
50
|
+
return ColliderLayer.CL_RESERVED3;
|
|
51
|
+
case 32:
|
|
52
|
+
case "CL_RESERVED4":
|
|
53
|
+
return ColliderLayer.CL_RESERVED4;
|
|
54
|
+
case 64:
|
|
55
|
+
case "CL_RESERVED5":
|
|
56
|
+
return ColliderLayer.CL_RESERVED5;
|
|
57
|
+
case 128:
|
|
58
|
+
case "CL_RESERVED6":
|
|
59
|
+
return ColliderLayer.CL_RESERVED6;
|
|
60
|
+
case 256:
|
|
61
|
+
case "CL_CUSTOM1":
|
|
62
|
+
return ColliderLayer.CL_CUSTOM1;
|
|
63
|
+
case 512:
|
|
64
|
+
case "CL_CUSTOM2":
|
|
65
|
+
return ColliderLayer.CL_CUSTOM2;
|
|
66
|
+
case 1024:
|
|
67
|
+
case "CL_CUSTOM3":
|
|
68
|
+
return ColliderLayer.CL_CUSTOM3;
|
|
69
|
+
case 2048:
|
|
70
|
+
case "CL_CUSTOM4":
|
|
71
|
+
return ColliderLayer.CL_CUSTOM4;
|
|
72
|
+
case 4096:
|
|
73
|
+
case "CL_CUSTOM5":
|
|
74
|
+
return ColliderLayer.CL_CUSTOM5;
|
|
75
|
+
case 8192:
|
|
76
|
+
case "CL_CUSTOM6":
|
|
77
|
+
return ColliderLayer.CL_CUSTOM6;
|
|
78
|
+
case 16384:
|
|
79
|
+
case "CL_CUSTOM7":
|
|
80
|
+
return ColliderLayer.CL_CUSTOM7;
|
|
81
|
+
case 32768:
|
|
82
|
+
case "CL_CUSTOM8":
|
|
83
|
+
return ColliderLayer.CL_CUSTOM8;
|
|
28
84
|
case -1:
|
|
29
85
|
case "UNRECOGNIZED":
|
|
30
86
|
default:
|
|
@@ -40,6 +96,34 @@ export function colliderLayerToJSON(object: ColliderLayer): string {
|
|
|
40
96
|
return "CL_POINTER";
|
|
41
97
|
case ColliderLayer.CL_PHYSICS:
|
|
42
98
|
return "CL_PHYSICS";
|
|
99
|
+
case ColliderLayer.CL_RESERVED1:
|
|
100
|
+
return "CL_RESERVED1";
|
|
101
|
+
case ColliderLayer.CL_RESERVED2:
|
|
102
|
+
return "CL_RESERVED2";
|
|
103
|
+
case ColliderLayer.CL_RESERVED3:
|
|
104
|
+
return "CL_RESERVED3";
|
|
105
|
+
case ColliderLayer.CL_RESERVED4:
|
|
106
|
+
return "CL_RESERVED4";
|
|
107
|
+
case ColliderLayer.CL_RESERVED5:
|
|
108
|
+
return "CL_RESERVED5";
|
|
109
|
+
case ColliderLayer.CL_RESERVED6:
|
|
110
|
+
return "CL_RESERVED6";
|
|
111
|
+
case ColliderLayer.CL_CUSTOM1:
|
|
112
|
+
return "CL_CUSTOM1";
|
|
113
|
+
case ColliderLayer.CL_CUSTOM2:
|
|
114
|
+
return "CL_CUSTOM2";
|
|
115
|
+
case ColliderLayer.CL_CUSTOM3:
|
|
116
|
+
return "CL_CUSTOM3";
|
|
117
|
+
case ColliderLayer.CL_CUSTOM4:
|
|
118
|
+
return "CL_CUSTOM4";
|
|
119
|
+
case ColliderLayer.CL_CUSTOM5:
|
|
120
|
+
return "CL_CUSTOM5";
|
|
121
|
+
case ColliderLayer.CL_CUSTOM6:
|
|
122
|
+
return "CL_CUSTOM6";
|
|
123
|
+
case ColliderLayer.CL_CUSTOM7:
|
|
124
|
+
return "CL_CUSTOM7";
|
|
125
|
+
case ColliderLayer.CL_CUSTOM8:
|
|
126
|
+
return "CL_CUSTOM8";
|
|
43
127
|
case ColliderLayer.UNRECOGNIZED:
|
|
44
128
|
default:
|
|
45
129
|
return "UNRECOGNIZED";
|
|
@@ -1,55 +1,16 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
InputAction,
|
|
5
|
+
inputActionFromJSON,
|
|
6
|
+
inputActionToJSON,
|
|
7
|
+
PointerEventType,
|
|
8
|
+
pointerEventTypeFromJSON,
|
|
9
|
+
pointerEventTypeToJSON,
|
|
10
|
+
} from "./common/input_action.gen";
|
|
4
11
|
|
|
5
12
|
export const protobufPackage = "decentraland.sdk.components";
|
|
6
13
|
|
|
7
|
-
/** PointerEventType is a kind of interaction that can be detected. */
|
|
8
|
-
export enum PointerEventType {
|
|
9
|
-
PET_UP = 0,
|
|
10
|
-
PET_DOWN = 1,
|
|
11
|
-
PET_HOVER_ENTER = 2,
|
|
12
|
-
PET_HOVER_LEAVE = 3,
|
|
13
|
-
UNRECOGNIZED = -1,
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function pointerEventTypeFromJSON(object: any): PointerEventType {
|
|
17
|
-
switch (object) {
|
|
18
|
-
case 0:
|
|
19
|
-
case "PET_UP":
|
|
20
|
-
return PointerEventType.PET_UP;
|
|
21
|
-
case 1:
|
|
22
|
-
case "PET_DOWN":
|
|
23
|
-
return PointerEventType.PET_DOWN;
|
|
24
|
-
case 2:
|
|
25
|
-
case "PET_HOVER_ENTER":
|
|
26
|
-
return PointerEventType.PET_HOVER_ENTER;
|
|
27
|
-
case 3:
|
|
28
|
-
case "PET_HOVER_LEAVE":
|
|
29
|
-
return PointerEventType.PET_HOVER_LEAVE;
|
|
30
|
-
case -1:
|
|
31
|
-
case "UNRECOGNIZED":
|
|
32
|
-
default:
|
|
33
|
-
return PointerEventType.UNRECOGNIZED;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function pointerEventTypeToJSON(object: PointerEventType): string {
|
|
38
|
-
switch (object) {
|
|
39
|
-
case PointerEventType.PET_UP:
|
|
40
|
-
return "PET_UP";
|
|
41
|
-
case PointerEventType.PET_DOWN:
|
|
42
|
-
return "PET_DOWN";
|
|
43
|
-
case PointerEventType.PET_HOVER_ENTER:
|
|
44
|
-
return "PET_HOVER_ENTER";
|
|
45
|
-
case PointerEventType.PET_HOVER_LEAVE:
|
|
46
|
-
return "PET_HOVER_LEAVE";
|
|
47
|
-
case PointerEventType.UNRECOGNIZED:
|
|
48
|
-
default:
|
|
49
|
-
return "UNRECOGNIZED";
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
14
|
/**
|
|
54
15
|
* PointerEvents adds configurable pointer-based interactions to the attached Entity.
|
|
55
16
|
*
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import {
|
|
4
|
+
InputAction,
|
|
5
|
+
inputActionFromJSON,
|
|
6
|
+
inputActionToJSON,
|
|
7
|
+
PointerEventType,
|
|
8
|
+
pointerEventTypeFromJSON,
|
|
9
|
+
pointerEventTypeToJSON,
|
|
10
|
+
} from "./common/input_action.gen";
|
|
11
|
+
import { RaycastHit } from "./common/raycast_hit.gen";
|
|
6
12
|
|
|
7
13
|
export const protobufPackage = "decentraland.sdk.components";
|
|
8
14
|
|
|
@@ -34,7 +40,7 @@ export const PBPointerEventsResult = {
|
|
|
34
40
|
writer.uint32(32).int32(message.state);
|
|
35
41
|
}
|
|
36
42
|
if (message.timestamp !== 0) {
|
|
37
|
-
writer.uint32(40).
|
|
43
|
+
writer.uint32(40).uint32(message.timestamp);
|
|
38
44
|
}
|
|
39
45
|
if (message.analog !== undefined) {
|
|
40
46
|
writer.uint32(53).float(message.analog);
|
|
@@ -75,7 +81,7 @@ export const PBPointerEventsResult = {
|
|
|
75
81
|
break;
|
|
76
82
|
}
|
|
77
83
|
|
|
78
|
-
message.timestamp = reader.
|
|
84
|
+
message.timestamp = reader.uint32();
|
|
79
85
|
continue;
|
|
80
86
|
case 6:
|
|
81
87
|
if (tag != 53) {
|