@dcl/protocol 1.0.0-4408137944.commit-a67c796 → 1.0.0-4427886959.commit-6b9dcb5

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.
Files changed (30) hide show
  1. package/out-js/decentraland/social/friendships/friendships.gen.d.ts +4816 -0
  2. package/out-js/decentraland/social/friendships/friendships.gen.js +1216 -0
  3. package/out-js/decentraland/social/friendships/friendships.gen.js.map +1 -0
  4. package/out-js/social.gen.d.ts +1 -0
  5. package/out-js/social.gen.js +6 -0
  6. package/out-js/social.gen.js.map +1 -0
  7. package/out-ts/decentraland/social/friendships/friendships.gen.ts +1447 -0
  8. package/out-ts/social.gen.ts +3 -0
  9. package/package.json +2 -2
  10. package/proto/decentraland/sdk/components/animator.proto +15 -8
  11. package/proto/decentraland/sdk/components/audio_source.proto +16 -6
  12. package/proto/decentraland/sdk/components/audio_stream.proto +6 -3
  13. package/proto/decentraland/sdk/components/avatar_attach.proto +14 -6
  14. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +20 -7
  15. package/proto/decentraland/sdk/components/avatar_shape.proto +34 -24
  16. package/proto/decentraland/sdk/components/billboard.proto +12 -5
  17. package/proto/decentraland/sdk/components/camera_mode.proto +3 -1
  18. package/proto/decentraland/sdk/components/camera_mode_area.proto +13 -2
  19. package/proto/decentraland/sdk/components/gltf_container.proto +5 -5
  20. package/proto/decentraland/sdk/components/mesh_collider.proto +22 -9
  21. package/proto/decentraland/sdk/components/mesh_renderer.proto +17 -4
  22. package/proto/decentraland/sdk/components/nft_shape.proto +15 -7
  23. package/proto/decentraland/sdk/components/pointer_events.proto +28 -14
  24. package/proto/decentraland/sdk/components/pointer_lock.proto +3 -1
  25. package/proto/decentraland/sdk/components/raycast.proto +10 -7
  26. package/proto/decentraland/sdk/components/raycast_result.proto +17 -12
  27. package/proto/decentraland/sdk/components/text_shape.proto +33 -24
  28. package/proto/decentraland/sdk/components/ui_text.proto +8 -5
  29. package/proto/decentraland/social/friendships/friendships.proto +106 -0
  30. package/public/social.proto +4 -0
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+
3
+ export const protobufPackage = "decentraland.social";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/protocol",
3
- "version": "1.0.0-4408137944.commit-a67c796",
3
+ "version": "1.0.0-4427886959.commit-6b9dcb5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,5 +26,5 @@
26
26
  "out-js",
27
27
  "public"
28
28
  ],
29
- "commit": "a67c79606bd8a34a25a0ce8c3278b72ec1dabd86"
29
+ "commit": "6b9dcb5fe3d5102f69ebe62a0f4f6b147c55ca04"
30
30
  }
@@ -4,16 +4,23 @@ package decentraland.sdk.components;
4
4
  import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1042;
6
6
 
7
+ // The Animator component is a container for multiple potential animations an Entity can display,
8
+ // separately or at the same time. It can be used to start, stop or blend animations; as well as
9
+ // to inspect their playback state.
10
+ //
11
+ // Animations have a `weight` property, which determines how pronounced the animation will be. This
12
+ // can be adjusted to blend animations together, or gracefully transition from one to the next.
7
13
  message PBAnimator {
8
- repeated PBAnimationState states = 1;
14
+ repeated PBAnimationState states = 1; // a collection of animations and their current state
9
15
  }
10
16
 
17
+ // AnimationState indicates the status and configuration of one available animation.
11
18
  message PBAnimationState {
12
- string name = 1;
13
- string clip = 2;
14
- optional bool playing = 3;
15
- optional float weight = 4; // default=1.0s
16
- optional float speed = 5; // default=1.0
17
- optional bool loop = 6; // default=true
18
- optional bool should_reset = 7;
19
+ string name = 1; // the identifier for this animation, to use in scene code
20
+ string clip = 2; // the animation path in the `files` array of the scene manifest
21
+ optional bool playing = 3; // whether this animation is currently playing
22
+ optional float weight = 4; // the "weight" of this animation (see below, default: 1.0)
23
+ optional float speed = 5; // the playback speed (default: 1.0)
24
+ optional bool loop = 6; // whether the animation repeats until stopped (default: true)
25
+ optional bool should_reset = 7; // whether the Entity is restored to its prior state when done
19
26
  }
@@ -4,10 +4,20 @@ package decentraland.sdk.components;
4
4
  import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1020;
6
6
 
7
- message PBAudioSource {
8
- optional bool playing = 1;
9
- optional float volume = 2; // default=1.0f
10
- optional bool loop = 3;
11
- optional float pitch = 4; // default=1.0f
12
- string audio_clip_url = 5;
7
+ // The AudioSource component can play an audio clips bundled with the scene, controlling some
8
+ // of the behavior.
9
+ //
10
+ // In each AudioSource instance, the sound is spatially located at the associated entity’s position,
11
+ // given by its Transform.
12
+ //
13
+ // Note that the `audio_clip_url` is not actually a URL, but rather the path of a file bundled with
14
+ // the scene and declared in its manifest. The name was chosen because the URL use-case will
15
+ // eventually be supported.
16
+ message PBAudioSource {
17
+ optional bool playing = 1; // whether the clip is currently playing.
18
+ optional float volume = 2; // the audio volume (default: 1.0).
19
+ optional bool loop = 3; // whether the clip should restart when finished.
20
+ optional float pitch = 4; // the audio pitch (default: 1.0).
21
+ string audio_clip_url = 5; // the clip path as given in the `files` array of the scene's manifest.
13
22
  }
23
+
@@ -4,8 +4,11 @@ package decentraland.sdk.components;
4
4
  import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1021;
6
6
 
7
+ // The AudioStream component can play external audio clips given a URL, streaming it in real-time.
8
+ //
9
+ // Despite being attached to a particular entity, the sound is not affected by its position.
7
10
  message PBAudioStream {
8
- optional bool playing = 1;
9
- optional float volume = 2; // default=1.0f
10
- string url = 3;
11
+ optional bool playing = 1; // whether the clip is currently playing
12
+ optional float volume = 2; // the audio volume (default: 1.0)
13
+ string url = 3; // the audio stream HTTP URL
11
14
  }
@@ -6,15 +6,23 @@ import "decentraland/sdk/components/common/id.proto";
6
6
 
7
7
  option (common.ecs_component_id) = 1073;
8
8
 
9
+ // The AvatarAttach component automatically repositions an Entity to maintain the same position and
10
+ // rotation relative to some part of an avatar, called the "anchor point". The Entity
11
+ // will follow this anchor as it moves.
12
+ //
13
+ // The Entity's own Transform is overridden by this component. To offset position and adjust scale,
14
+ // add a child to the anchored Entity and set a Transform on it instead.
15
+ //
16
+ // AvatarAnchorPointType indicates which part of the avatar the Entity must follow.
17
+ message PBAvatarAttach {
18
+ optional string avatar_id = 1; // the user ID of the avatar (default: local user)
19
+ AvatarAnchorPointType anchor_point_id = 2; // the anchor point.
20
+ }
21
+
22
+ // AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity.
9
23
  enum AvatarAnchorPointType {
10
24
  AAPT_POSITION = 0;
11
25
  AAPT_NAME_TAG = 1;
12
26
  AAPT_LEFT_HAND = 2;
13
27
  AAPT_RIGHT_HAND = 3;
14
28
  }
15
-
16
- message PBAvatarAttach {
17
- // default's to current player avatar id if not provided
18
- optional string avatar_id = 1;
19
- AvatarAnchorPointType anchor_point_id = 2;
20
- }
@@ -7,13 +7,26 @@ import "decentraland/sdk/components/common/id.proto";
7
7
 
8
8
  option (common.ecs_component_id) = 1070;
9
9
 
10
- enum AvatarModifierType {
11
- AMT_HIDE_AVATARS = 0;
12
- AMT_DISABLE_PASSPORTS = 1;
10
+ // The AvatarModifierArea component can be attached to an Entity to define a region of space where
11
+ // avatar behavior changes.
12
+ //
13
+ // The Entity's Transform position determines the center-point of the region, while its size is
14
+ // given as a vector in the `area` property below. The Transform rotation is applied, but the scale
15
+ // is ignored.
16
+ //
17
+ // The modifier effect is only applied to avatars inside the region. It does not affect how players
18
+ // standing inside it see avatars on the other side of the boundary.
19
+ //
20
+ // Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
21
+ // is actually a 3D volume.
22
+ message PBAvatarModifierArea {
23
+ decentraland.common.Vector3 area = 1; // the 3D size of the region
24
+ repeated string exclude_ids = 2; // user IDs that can enter and remain unaffected
25
+ repeated AvatarModifierType modifiers = 3; // list of modifiers to apply
13
26
  }
14
27
 
15
- message PBAvatarModifierArea {
16
- decentraland.common.Vector3 area = 1;
17
- repeated string exclude_ids = 2;
18
- repeated AvatarModifierType modifiers = 3;
28
+ // AvatarModifierType is an effect that should be applied to avatars inside the region.
29
+ enum AvatarModifierType {
30
+ AMT_HIDE_AVATARS = 0; // avatars are invisible
31
+ AMT_DISABLE_PASSPORTS = 1; // selecting (e.g. clicking) an avatar will not bring up their profile.
19
32
  }
@@ -5,28 +5,38 @@ import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1080;
6
6
  import "decentraland/common/colors.proto";
7
7
 
8
+ // The AvatarShape component contains the information required to draw and animate avatar, acting as
9
+ // a simplified GLTF container for this specific case.
10
+ //
11
+ // All fields (except ID) are optional have reasonable default values. In the case of `wearables`,
12
+ // each slot on the Avatar's body that is not explicitly included in the list has its own default.
13
+ //
14
+ // Note that, while AvatarShape can be attached to any Entity, it's only actually used in the global
15
+ // Avatar Scene. Other requirements are usually better served by GLTFs.
8
16
  message PBAvatarShape {
9
- string id = 1;
10
- optional string name = 2; // default = NPC
11
- optional string body_shape = 3; // default = urn:decentraland:off-chain:base-avatars:BaseFemale
12
- optional decentraland.common.Color3 skin_color = 4; // default = decentraland.common.Color3(R = 0.6f, G = 0.462f, B = 0.356f)
13
- optional decentraland.common.Color3 hair_color = 5; // default = decentraland.common.Color3(R = 0.283f, G = 0.142f, B = 0f)
14
- optional decentraland.common.Color3 eye_color = 6; // default = decentraland.common.Color3(R = 0.6f, G = 0.462f, B = 0.356f)
15
- optional string expression_trigger_id = 7;
16
- optional int64 expression_trigger_timestamp = 8; // default = timestamp
17
- optional bool talking = 9;
18
- /**
19
- * default = ["urn:decentraland:off-chain:base-avatars:f_eyes_00",
20
- * "urn:decentraland:off-chain:base-avatars:f_eyebrows_00",
21
- * "urn:decentraland:off-chain:base-avatars:f_mouth_00"
22
- * "urn:decentraland:off-chain:base-avatars:standard_hair",
23
- * "urn:decentraland:off-chain:base-avatars:f_simple_yellow_tshirt",
24
- * "urn:decentraland:off-chain:base-avatars:f_brown_trousers",
25
- * "urn:decentraland:off-chain:base-avatars:bun_shoes"]
26
- */
27
- repeated string wearables = 10;
28
- /**
29
- * default = []
30
- */
31
- repeated string emotes = 11;
32
- }
17
+ string id = 1; // the user ID
18
+ optional string name = 2; // visible name (default: "NPC")
19
+ optional string body_shape = 3; // shape URN (default "urn:decentraland:off-chain:base-avatars:BaseFemale")
20
+
21
+ optional decentraland.common.Color3 skin_color = 4; // RGB (default [0.6, 0.462, 0.356])
22
+ optional decentraland.common.Color3 hair_color = 5; // RGB (default [0.283, 0.142, 0])
23
+ optional decentraland.common.Color3 eye_color = 6; // RGB (default [0.6, 0.462, 0.356])
24
+
25
+ optional string expression_trigger_id = 7; // current emote animations
26
+ optional int64 expression_trigger_timestamp = 8; // start of emote animations (in the same order)
27
+
28
+ optional bool talking = 9; // whether to display the floating voice chat icon
29
+
30
+ // Wearable URNs, one for each body slot.
31
+ // Default values for each unspecified slot:
32
+ // Eyes : "urn:decentraland:off-chain:base-avatars:f_eyes_00",
33
+ // Eyebrows: "urn:decentraland:off-chain:base-avatars:f_eyebrows_00",
34
+ // Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00"
35
+ // Hair : "urn:decentraland:off-chain:base-avatars:standard_hair",
36
+ // Shirt : "urn:decentraland:off-chain:base-avatars:f_simple_yellow_tshirt",
37
+ // Trousers: "urn:decentraland:off-chain:base-avatars:f_brown_trousers",
38
+ // Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"]
39
+ repeated string wearables = 10;
40
+ repeated string emotes = 11; // available emotes (default empty)
41
+ }
42
+
@@ -6,15 +6,22 @@ import "decentraland/sdk/components/common/id.proto";
6
6
 
7
7
  option (common.ecs_component_id) = 1090;
8
8
 
9
+ // The Billboard component makes an Entity automatically reorient its rotation to face the camera.
10
+ // As the name indicates, it’s used to display in-game billboards and frequently combined with
11
+ // the TextShape component.
12
+ //
13
+ // Billboard only affects the Entity's rotation. Its scale and position are still determined by its
14
+ // Transform.
15
+ message PBBillboard {
16
+ optional BillboardMode billboard_mode = 1; // the BillboardMode (default: BM_ALL)
17
+ }
18
+
19
+ // BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form.
9
20
  enum BillboardMode {
10
21
  BM_NONE = 0;
11
22
  BM_X = 1;
12
23
  BM_Y = 2;
13
24
  BM_Z = 4;
14
- BM_ALL = 7;
25
+ BM_ALL = 7; // bitwise combination BM_X | BM_Y | BM_Z
15
26
  }
16
27
 
17
- message PBBillboard {
18
- // default=BM_ALL
19
- optional BillboardMode billboard_mode = 1;
20
- }
@@ -5,6 +5,8 @@ import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1072;
6
6
  import "decentraland/sdk/components/common/camera_type.proto";
7
7
 
8
+ // The CameraMode component can be used to determine whether the player is using a first-person o
9
+ // third-person view.
8
10
  message PBCameraMode {
9
- common.CameraType mode = 1;
11
+ common.CameraType mode = 1; // the camera type (1st-person or 3rd-person)
10
12
  }
@@ -8,7 +8,18 @@ import "decentraland/sdk/components/common/id.proto";
8
8
 
9
9
  option (common.ecs_component_id) = 1071;
10
10
 
11
+ // The CameraModeArea component can be attached to an Entity to define a region of space where
12
+ // the player's camera mode (1st-person or 3rd-person) is overridden.
13
+ //
14
+ // The Entity's Transform position determines the center-point of the region, while its size is
15
+ // given as a vector in the `area` property below. The Transform rotation is applied, but the scale
16
+ // is ignored.
17
+ //
18
+ // When players leave the region, their previous setting is restored.
19
+ //
20
+ // Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
21
+ // is actually a 3D volume.
11
22
  message PBCameraModeArea {
12
- decentraland.common.Vector3 area = 1;
13
- common.CameraType mode = 2;
23
+ decentraland.common.Vector3 area = 1; // the 3D size of the region
24
+ common.CameraType mode = 2; // the camera mode to enforce
14
25
  }
@@ -4,10 +4,10 @@ package decentraland.sdk.components;
4
4
  import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1041;
6
6
 
7
+ // GltfContainer loads a GLTF file (and any additional files packaged inside) attached to an Entity.
8
+ //
9
+ // This allows the use of custom models, materials, collision boundaries and shapes that can't be
10
+ // achieved using MeshRenderer, MeshCollider and other standard components.
7
11
  message PBGltfContainer {
8
- // which file to load
9
- string src = 1;
10
-
11
- // SDK7xx which node to load
12
- // SDK7xx optional string scene_name = 2;
12
+ string src = 1; // the GLTF file path as listed in the scene's manifest.
13
13
  }
@@ -6,25 +6,31 @@ import "decentraland/sdk/components/common/id.proto";
6
6
 
7
7
  option (common.ecs_component_id) = 1019;
8
8
 
9
- enum ColliderLayer {
10
- CL_NONE = 0;
11
- CL_POINTER = 1;
12
- CL_PHYSICS = 2;
13
- }
14
-
9
+ // The MeshCollider component provides basic collision detection between Entities and Avatars. It
10
+ // can behave like a cube, a plane, a sphere or a cylinder.
11
+ //
12
+ // The Entity's Transform affects the MeshCollider, scaling it and rotating it appropriately. If
13
+ // the Transform for the collision mesh must be different than the Transform for rendering the Entity,
14
+ // two different Entities must be used.
15
+ //
16
+ // More complex shapes require the use of a `GltfContainer` component.
15
17
  message PBMeshCollider {
18
+ // BoxMesh is a prism shape that contains the Entity.
16
19
  message BoxMesh {}
17
20
 
21
+ // CylinderMesh is a truncated cone shape that contains the Entity.
18
22
  message CylinderMesh {
19
- optional float radius_top = 1; // default=1.0
20
- optional float radius_bottom = 2; // default=1.0
23
+ optional float radius_top = 1; // (default 1.0)
24
+ optional float radius_bottom = 2; // (default 1.0)
21
25
  }
22
26
 
27
+ // PlaneMesh is a 2D rectangle described by the Entity's Transform.
23
28
  message PlaneMesh {}
24
29
 
30
+ // SphereMesh is a sphere shape that contains the Entity.
25
31
  message SphereMesh {}
26
32
 
27
- optional int32 collision_mask = 1; // default = ColliderLayer.Physics | ColliderLayer.Pointer
33
+ optional int32 collision_mask = 1; // enabled ColliderLayers (default CL_POINTER | CL_PHYSICS)
28
34
 
29
35
  oneof mesh {
30
36
  BoxMesh box = 2;
@@ -33,3 +39,10 @@ message PBMeshCollider {
33
39
  PlaneMesh plane = 5;
34
40
  }
35
41
  }
42
+
43
+ // ColliderLayer determines the kind of collision to detect, in OR-able bit flag form.
44
+ enum ColliderLayer {
45
+ CL_NONE = 0; // no collisions
46
+ CL_POINTER = 1; // collisions with the player's pointer ray (e.g. mouse cursor hovering)
47
+ CL_PHYSICS = 2; // colission with Avatars
48
+ }
@@ -4,20 +4,33 @@ package decentraland.sdk.components;
4
4
  import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1018;
6
6
 
7
+ // The MeshRenderer component renders a basic geometric shape for an Entity. It can be a cube, a
8
+ // plane, a sphere or a cylinder.
9
+ //
10
+ // The cube and plane variants can include a UV texture mapping, so specific areas of a material
11
+ // texture are rendered on different faces of the shape. They are serialized as a sequence of 2D
12
+ // `float` coordinates, one for each corner of each side of each face.
13
+ //
14
+ // More complex shapes require the use of a `GltfContainer` component.
7
15
  message PBMeshRenderer {
16
+
17
+ // BoxMesh renders a prism shape.
8
18
  message BoxMesh {
9
- repeated float uvs = 1;
19
+ repeated float uvs = 1; // 96-value texture map (2D * 6 faces * 2 sides * 4 vertices)
10
20
  }
11
21
 
22
+ // CylinderMesh renders a truncated cone shape.
12
23
  message CylinderMesh {
13
- optional float radius_top = 1; // default=1.0
14
- optional float radius_bottom = 2; // default=1.0
24
+ optional float radius_top = 1; // (default 1.0)
25
+ optional float radius_bottom = 2; // (default 1.0)
15
26
  }
16
27
 
28
+ // PlaneMesh renders a 2D rectangular shape.
17
29
  message PlaneMesh {
18
- repeated float uvs = 1;
30
+ repeated float uvs = 1; // 16-value texture map (2D * 1 face * 2 sides * 4 vertices)
19
31
  }
20
32
 
33
+ // SphereMesh renders a spherical shape.
21
34
  message SphereMesh {
22
35
  }
23
36
 
@@ -7,6 +7,20 @@ import "decentraland/sdk/components/common/id.proto";
7
7
 
8
8
  option (common.ecs_component_id) = 1040;
9
9
 
10
+ // The NftShape component renders a framed picture from an NFT. It supports PNG, JPEG and GIF files.
11
+ //
12
+ // The `src` field is the URI of the NFT, which includes its parent contract and index, using
13
+ // the `https:` or `ethereum:` schemes.
14
+ //
15
+ // The picture frame can have several different styles, plus a background color for images that have
16
+ // transparent pixels.
17
+ message PBNftShape {
18
+ string src = 1; // the URI of the NFT
19
+ optional NftFrameType style = 2; // the frame style (default NFT_CLASSIC)
20
+ optional decentraland.common.Color3 color = 3; // RGB background (default [0.6404918, 0.611472, 0.8584906])
21
+ }
22
+
23
+ // NftFrameType is a predefined framing style for the image.
10
24
  enum NftFrameType {
11
25
  NFT_CLASSIC = 0;
12
26
  NFT_BAROQUE_ORNAMENT = 1;
@@ -31,10 +45,4 @@ enum NftFrameType {
31
45
  NFT_WOOD_TWIGS = 20;
32
46
  NFT_CANVAS = 21;
33
47
  NFT_NONE = 22;
34
- }
35
-
36
- message PBNftShape {
37
- string src = 1;
38
- optional NftFrameType style = 2; // default = PictureFrameStyle.Classic
39
- optional decentraland.common.Color3 color = 3; // default = decentraland.common.Color3(0.6404918, 0.611472, 0.8584906)
40
- }
48
+ }
@@ -7,25 +7,39 @@ import "decentraland/sdk/components/common/input_action.proto";
7
7
 
8
8
  option (common.ecs_component_id) = 1062;
9
9
 
10
- enum PointerEventType {
11
- PET_UP = 0;
12
- PET_DOWN = 1;
13
- PET_HOVER_ENTER = 2;
14
- PET_HOVER_LEAVE = 3;
15
- }
16
-
10
+ // PointerEvents adds configurable pointer-based interactions to the attached Entity.
11
+ //
12
+ // Events that match the criteria defined in the PointerEvents structure are reported back to the
13
+ // Entity via the PointerEventsResult component.
14
+ //
15
+ // Some examples of events that can be detected:
16
+ // - Pointer hovering over the Entity.
17
+ // - Held mouse button released over the Entity.
18
+ // - Controller button pressed while targeting the Entity.
19
+ // - Key pressed while targeting the Entity, but only in close range.
20
+ //
21
+ // It also supports simple visual feedback when interactions occur, by showing floating text.
22
+ // More sophisticated feedback requires the use of other components.
17
23
  message PBPointerEvents {
18
24
  message Info {
19
- optional common.InputAction button = 1; // default=InputAction.ANY
20
- optional string hover_text = 2; // default='Interact'
21
- optional float max_distance = 3; // default=10
22
- optional bool show_feedback = 4; // default=true
25
+ optional common.InputAction button = 1; // key/button in use (default IA_ANY)
26
+ optional string hover_text = 2; // feedback on hover (default 'Interact')
27
+ optional float max_distance = 3; // range of interaction (default 10)
28
+ optional bool show_feedback = 4; // enable or disable hover text (default true)
23
29
  }
24
30
 
25
31
  message Entry {
26
- PointerEventType event_type = 1;
27
- Info event_info = 2;
32
+ PointerEventType event_type = 1; // the kind of interaction to detect
33
+ Info event_info = 2; // additional configuration for this detection
28
34
  }
29
35
 
30
- repeated Entry pointer_events = 1;
36
+ repeated Entry pointer_events = 1; // the list of relevant events to detect
31
37
  }
38
+
39
+ // PointerEventType is a kind of interaction that can be detected.
40
+ enum PointerEventType {
41
+ PET_UP = 0;
42
+ PET_DOWN = 1;
43
+ PET_HOVER_ENTER = 2;
44
+ PET_HOVER_LEAVE = 3;
45
+ }
@@ -4,6 +4,8 @@ package decentraland.sdk.components;
4
4
  import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1074;
6
6
 
7
+ // PointerLock indicates whether the mouse pointer is automatically following the camera’s point of
8
+ // focus (locked), or can move freely on the screen (unlocked).
7
9
  message PBPointerLock {
8
- bool is_pointer_locked = 1;
10
+ bool is_pointer_locked = 1; // whether the pointer is locked
9
11
  }
@@ -7,14 +7,17 @@ import "decentraland/sdk/components/common/id.proto";
7
7
 
8
8
  option (common.ecs_component_id) = 1067;
9
9
 
10
+ // The Raycast component allows scenes to request raycasting from the game engine. The results will
11
+ // be available in a RaycastResult component set later on the same Entity.
12
+ message PBRaycast {
13
+ decentraland.common.Vector3 origin = 2; // the starting point of the ray in 3D space
14
+ decentraland.common.Vector3 direction = 3; // the direction of the ray in 3D space
15
+ float max_distance = 4; // the maximum length of the ray
16
+ RaycastQueryType query_type = 5; // the RaycastQueryType behavior (see above)
17
+ }
18
+
19
+ // RaycastQueryType indicates whether the ray should stop on the first collition, or continue.
10
20
  enum RaycastQueryType {
11
21
  RQT_HIT_FIRST = 0;
12
22
  RQT_QUERY_ALL = 1;
13
23
  }
14
-
15
- message PBRaycast {
16
- decentraland.common.Vector3 origin = 2;
17
- decentraland.common.Vector3 direction = 3;
18
- float max_distance = 4;
19
- RaycastQueryType query_type = 5;
20
- }
@@ -6,20 +6,25 @@ import "decentraland/common/vectors.proto";
6
6
 
7
7
  option (common.ecs_component_id) = 1068;
8
8
 
9
+ // The RaycastResult component is added to an Entity when the results of a previously attached
10
+ // Raycast component are available. It contains information about the ray and any objects it
11
+ // collided with.
9
12
  message PBRaycastResult {
10
- int32 timestamp = 1;
11
- decentraland.common.Vector3 origin = 2;
12
- decentraland.common.Vector3 direction = 3;
13
- repeated RaycastHit hits = 4;
13
+ int32 timestamp = 1; // the timestamp of the Raycast component addition
14
+ decentraland.common.Vector3 origin = 2; // the starting point of the ray
15
+ decentraland.common.Vector3 direction = 3; // the direction vector of the ray
16
+ repeated RaycastHit hits = 4; // zero or more hits
14
17
  }
15
18
 
16
- // Position will be relative to the scene
19
+ // RaycastHit contains information about the intersection of a ray with a mesh.
17
20
  message RaycastHit {
18
- decentraland.common.Vector3 position = 1;
19
- decentraland.common.Vector3 origin = 2;
20
- decentraland.common.Vector3 direction = 3;
21
- decentraland.common.Vector3 normal_hit = 4;
22
- float length = 5;
23
- optional string mesh_name = 6;
24
- optional int64 entity_id = 7;
21
+ // Position will be relative to the scene
22
+ decentraland.common.Vector3 position = 1; // the intersection point
23
+ decentraland.common.Vector3 origin = 2; // the starting point of the ray
24
+ decentraland.common.Vector3 direction = 3; // the direction vector of the ray
25
+ decentraland.common.Vector3 normal_hit = 4; // the entry vector of the ray into the collision mesh
26
+
27
+ float length = 5; // the distance between the ray origin and the hit position
28
+ optional string mesh_name = 6; // (unused) mesh ID if collision happened inside a GltfContainer
29
+ optional int64 entity_id = 7; // the ID of the Entity that has the impacted mesh attached
25
30
  }
@@ -8,29 +8,38 @@ import "decentraland/sdk/components/common/texts.proto";
8
8
 
9
9
  option (common.ecs_component_id) = 1030;
10
10
 
11
+ // The TextShape component renders customizable floating text.
12
+ //
13
+ // The position and rotation of the text are defined by the Entity's Transform, while its size
14
+ // can either scale with the Transform or be fixed by a font size.
15
+ //
16
+ // Several options can be configured, including color, padding, line spacing and drop shadows.
11
17
  message PBTextShape {
12
- string text = 1;
13
- optional common.Font font = 2; // default=F_SANS_SERIF
14
- optional float font_size = 3; // default=10
15
- optional bool font_auto_size = 4;
16
- optional common.TextAlignMode text_align = 5; // default=TAM_CENTER_CENTER
17
- optional float width = 6; // default=1
18
- optional float height = 7; // default=1
19
- optional float padding_top = 8;
20
- optional float padding_right = 9;
21
- optional float padding_bottom = 10;
22
- optional float padding_left = 11;
23
- // The amount of additional spacing to add between each lines of text.
24
- optional float line_spacing = 12;
25
- // Allows control over how many lines of text are displayed.
26
- optional int32 line_count = 13;
27
- // Enables text wrapping
28
- optional bool text_wrapping = 14;
29
- optional float shadow_blur = 15;
30
- optional float shadow_offset_x = 16;
31
- optional float shadow_offset_y = 17;
32
- optional float outline_width = 18;
33
- optional decentraland.common.Color3 shadow_color = 19; // default=(1.0,1.0,1.0)
34
- optional decentraland.common.Color3 outline_color = 20; // default=(1.0,1.0,1.0)
35
- optional decentraland.common.Color4 text_color = 21; // default=(1.0,1.0,1.0)
18
+ string text = 1; // the content
19
+
20
+ optional common.Font font = 2; // the font (default F_SANS_SERIF)
21
+ optional float font_size = 3; // the font size (default 10)
22
+ optional bool font_auto_size = 4; // override `font_size` to automatically fit in `width`/`height`
23
+
24
+ optional common.TextAlignMode text_align = 5; // X and Y alignment (default TAM_CENTER_CENTER)
25
+
26
+ optional float width = 6; // available horizontal space (default 1)
27
+ optional float height = 7; // available vertical space (default 1)
28
+ optional float padding_top = 8; // distance from text to top border (default 0)
29
+ optional float padding_right = 9; // distance from text to right border (default 0)
30
+ optional float padding_bottom = 10; // distance from text to bottom border (default 0)
31
+ optional float padding_left = 11; // distance from text to left border (default 0)
32
+
33
+ optional float line_spacing = 12; // extra distance between lines (default 0)
34
+ optional int32 line_count = 13; // maximum number of lines to display
35
+ optional bool text_wrapping = 14; // wrap text when the border is reached (default false)
36
+
37
+ optional float shadow_blur = 15; // blurriness of the drop shadow (default 0)
38
+ optional float shadow_offset_x = 16; // horizontal length of the shadow (default 0)
39
+ optional float shadow_offset_y = 17; // vertical length of the shadow (default 0)
40
+ optional float outline_width = 18; // width of the stroke outlining each letter (default 0)
41
+
42
+ optional decentraland.common.Color3 shadow_color = 19; // drop shadow color (default [1.0, 1.0, 1.0])
43
+ optional decentraland.common.Color3 outline_color = 20; // outline stroke color (default [1.0, 1.0, 1.0])
44
+ optional decentraland.common.Color4 text_color = 21; // text color (default [1.0, 1.0, 1.0])
36
45
  }