@dcl/protocol 1.0.0-12889323027.commit-cbbf46c → 1.0.0-12988319503.commit-ea9043b
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/common/texture.gen.d.ts +18 -0
- package/out-js/decentraland/common/texture.gen.js +104 -4
- package/out-js/decentraland/common/texture.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +41 -0
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +241 -3
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +35 -1
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +172 -3
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +3 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js +18 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +19 -0
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +90 -3
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +66 -0
- package/out-js/decentraland/sdk/components/gltf_node.gen.js +69 -0
- package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +43 -0
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +122 -0
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/material.gen.d.ts +20 -0
- package/out-js/decentraland/sdk/components/material.gen.js +86 -2
- package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +18 -0
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js +90 -4
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +19 -3
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +90 -4
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +4 -0
- package/out-js/decentraland/sdk/components/ui_text.gen.js +30 -1
- package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +37 -0
- package/out-js/decentraland/sdk/components/ui_transform.gen.js +201 -2
- package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
- package/out-js/decentraland/{social_service/v1/social_service_v1.gen.d.ts → social/friendships/friendships.gen.d.ts} +2 -3
- package/out-js/decentraland/{social_service/v1/social_service_v1.gen.js → social/friendships/friendships.gen.js} +3 -3
- package/out-js/decentraland/social/friendships/friendships.gen.js.map +1 -0
- package/out-js/decentraland/social_service_v2/social_service.gen.d.ts +357 -0
- package/out-js/decentraland/{social_service/v2/social_service_v2.gen.js → social_service_v2/social_service.gen.js} +402 -1140
- package/out-js/decentraland/social_service_v2/social_service.gen.js.map +1 -0
- package/out-js/social_service_v2.gen.d.ts +1 -0
- package/out-js/social_service_v2.gen.js +6 -0
- package/out-js/social_service_v2.gen.js.map +1 -0
- package/out-ts/decentraland/common/texture.gen.ts +119 -4
- package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +292 -1
- package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +218 -2
- package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +18 -0
- package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +108 -2
- package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +116 -0
- package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +139 -0
- package/out-ts/decentraland/sdk/components/material.gen.ts +102 -1
- package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +99 -0
- package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +100 -3
- package/out-ts/decentraland/sdk/components/ui_text.gen.ts +40 -1
- package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +230 -1
- package/out-ts/decentraland/{social_service/v1/social_service_v1.gen.ts → social/friendships/friendships.gen.ts} +2 -3
- package/out-ts/decentraland/social_service_v2/social_service.gen.ts +1709 -0
- package/out-ts/social_service_v2.gen.ts +3 -0
- package/package.json +2 -2
- package/proto/decentraland/common/texture.proto +8 -1
- package/proto/decentraland/sdk/components/avatar_modifier_area.proto +21 -0
- package/proto/decentraland/sdk/components/camera_layer.proto +30 -0
- package/proto/decentraland/sdk/components/camera_layers.proto +11 -0
- package/proto/decentraland/sdk/components/camera_mode_area.proto +22 -3
- package/proto/decentraland/sdk/components/common/input_action.proto +3 -0
- package/proto/decentraland/sdk/components/global_light.proto +22 -0
- package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +13 -0
- package/proto/decentraland/sdk/components/gltf_node.proto +42 -0
- package/proto/decentraland/sdk/components/gltf_node_state.proto +20 -0
- package/proto/decentraland/sdk/components/light.proto +42 -0
- package/proto/decentraland/sdk/components/material.proto +13 -1
- package/proto/decentraland/sdk/components/mesh_collider.proto +8 -1
- package/proto/decentraland/sdk/components/mesh_renderer.proto +8 -3
- package/proto/decentraland/sdk/components/primary_pointer_info.proto +25 -0
- package/proto/decentraland/sdk/components/spotlight.proto +21 -0
- package/proto/decentraland/sdk/components/texture_camera.proto +41 -0
- package/proto/decentraland/sdk/components/ui_canvas.proto +16 -0
- package/proto/decentraland/sdk/components/ui_scroll_result.proto +12 -0
- package/proto/decentraland/sdk/components/ui_text.proto +3 -0
- package/proto/decentraland/sdk/components/ui_transform.proto +23 -0
- package/proto/decentraland/{social_service/v1/social_service_v1.proto → social/friendships/friendships.proto} +1 -2
- package/proto/decentraland/social_service_v2/social_service.proto +111 -0
- package/public/sdk-components.proto +2 -0
- package/public/social.proto +1 -3
- package/public/social_service_v2.proto +4 -0
- package/out-js/decentraland/social_service/v1/social_service_v1.gen.js.map +0 -1
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +0 -479
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +0 -1
- package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +0 -2598
- package/proto/decentraland/social_service/v2/social_service_v2.proto +0 -159
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-12988319503.commit-ea9043b",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "decentraland/protocol.git",
|
|
6
6
|
"homepage": "https://github.com/decentraland/protocol#readme",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"out-js",
|
|
30
30
|
"public"
|
|
31
31
|
],
|
|
32
|
-
"commit": "
|
|
32
|
+
"commit": "ea9043ba50a0591bd82be7703947a998e7c08bd2"
|
|
33
33
|
}
|
|
@@ -36,10 +36,17 @@ message VideoTexture {
|
|
|
36
36
|
optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
message UiCanvasTexture {
|
|
40
|
+
uint32 ui_canvas_entity = 1;
|
|
41
|
+
optional TextureWrapMode wrap_mode = 2; // default = TextureWrapMode.Clamp
|
|
42
|
+
optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
|
|
43
|
+
}
|
|
44
|
+
|
|
39
45
|
message TextureUnion {
|
|
40
46
|
oneof tex {
|
|
41
47
|
Texture texture = 1; // default = null
|
|
42
48
|
AvatarTexture avatar_texture = 2; // default = null
|
|
43
49
|
VideoTexture video_texture = 3; // default = null
|
|
50
|
+
UiCanvasTexture ui_texture = 4;
|
|
44
51
|
}
|
|
45
|
-
}
|
|
52
|
+
}
|
|
@@ -23,6 +23,8 @@ message PBAvatarModifierArea {
|
|
|
23
23
|
decentraland.common.Vector3 area = 1; // the 3D size of the region
|
|
24
24
|
repeated string exclude_ids = 2; // user IDs that can enter and remain unaffected
|
|
25
25
|
repeated AvatarModifierType modifiers = 3; // list of modifiers to apply
|
|
26
|
+
optional AvatarMovementSettings movement_settings = 4;
|
|
27
|
+
optional bool use_collider_range = 5; // if true, the player will be considered inside the area when they are within 0.3m of the area. default true
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
// AvatarModifierType is an effect that should be applied to avatars inside the region.
|
|
@@ -30,3 +32,22 @@ enum AvatarModifierType {
|
|
|
30
32
|
AMT_HIDE_AVATARS = 0; // avatars are invisible
|
|
31
33
|
AMT_DISABLE_PASSPORTS = 1; // selecting (e.g. clicking) an avatar will not bring up their profile.
|
|
32
34
|
}
|
|
35
|
+
|
|
36
|
+
message AvatarMovementSettings {
|
|
37
|
+
optional AvatarControlType control_mode = 1;
|
|
38
|
+
// if not explicitly set, the following properties default to user's preference settings
|
|
39
|
+
optional float run_speed = 2; // speed the player moves at, in m/s
|
|
40
|
+
optional float friction = 3; // how fast the player gets up to speed or comes to rest. higher = more responsive
|
|
41
|
+
optional float gravity = 4; // how fast the player accelerates vertically when not on a solid surface, in m/s. should normally be negative
|
|
42
|
+
optional float jump_height = 5; // how high the player can jump, in meters. should normally be positive. gravity must have the same sign for jumping to be possible
|
|
43
|
+
optional float max_fall_speed = 6; // max fall speed in m/s. should normally be negative
|
|
44
|
+
optional float turn_speed = 7; // speed the player turns in tank mode, in radians/s
|
|
45
|
+
optional float walk_speed = 8; // speed the player walks at, in m/s
|
|
46
|
+
optional bool allow_weighted_movement = 9; // whether to allow player to move at a slower speed (e.g. with a walk-key or when using a gamepad/joystick). defaults to true
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
enum AvatarControlType {
|
|
50
|
+
CCT_NONE = 0; // avatar cannot move
|
|
51
|
+
CCT_RELATIVE = 1; // avatar moves relative to the camera origin
|
|
52
|
+
CCT_TANK = 2; // avatar moves like a tank: left/right rotate the player, forward/backward advance/retreat the player
|
|
53
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package decentraland.sdk.components;
|
|
4
|
+
|
|
5
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
6
|
+
import "decentraland/common/colors.proto";
|
|
7
|
+
|
|
8
|
+
option (common.ecs_component_id) = 1210;
|
|
9
|
+
|
|
10
|
+
message PBCameraLayer {
|
|
11
|
+
// layer to which these settings apply. must be > 0
|
|
12
|
+
// Layer 0 is the default "real world" layer viewed by the player and cannot be modified.
|
|
13
|
+
uint32 layer = 1;
|
|
14
|
+
|
|
15
|
+
// should the sun light affect this layer? default false
|
|
16
|
+
optional bool directional_light = 2;
|
|
17
|
+
|
|
18
|
+
// should this layer show player avatars? default false
|
|
19
|
+
optional bool show_avatars = 3;
|
|
20
|
+
|
|
21
|
+
// should this layer show the sky? default false
|
|
22
|
+
optional bool show_skybox = 4;
|
|
23
|
+
|
|
24
|
+
// should this layer show distance fog? default false
|
|
25
|
+
optional bool show_fog = 5;
|
|
26
|
+
|
|
27
|
+
// ambient light overrides for this layer. default -> use same as main camera
|
|
28
|
+
optional decentraland.common.Color3 ambient_color_override = 6;
|
|
29
|
+
optional float ambient_brightness_override = 7;
|
|
30
|
+
}
|
|
@@ -9,7 +9,7 @@ import "decentraland/sdk/components/common/id.proto";
|
|
|
9
9
|
option (common.ecs_component_id) = 1071;
|
|
10
10
|
|
|
11
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
|
|
12
|
+
// the player's camera mode (1st-person, 3rd-person or cinematic) is overridden.
|
|
13
13
|
//
|
|
14
14
|
// The Entity's Transform position determines the center-point of the region, while its size is
|
|
15
15
|
// given as a vector in the `area` property below. The Transform rotation is applied, but the scale
|
|
@@ -19,7 +19,26 @@ option (common.ecs_component_id) = 1071;
|
|
|
19
19
|
//
|
|
20
20
|
// Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
|
|
21
21
|
// is actually a 3D volume.
|
|
22
|
+
//
|
|
23
|
+
// When mode is set to CtCinematic, the cinematic_settings field must also be provided.
|
|
22
24
|
message PBCameraModeArea {
|
|
23
|
-
decentraland.common.Vector3 area = 1;
|
|
24
|
-
common.CameraType mode = 2;
|
|
25
|
+
decentraland.common.Vector3 area = 1; // the 3D size of the region
|
|
26
|
+
common.CameraType mode = 2; // the camera mode to enforce
|
|
27
|
+
optional CinematicSettings cinematic_settings = 3;
|
|
28
|
+
optional bool use_collider_range = 4; // if true, the player will be considered inside the area when they are within 0.3m of the area. default true
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message CinematicSettings {
|
|
32
|
+
uint32 camera_entity = 1; // Entity that defines the cinematic camera transform.
|
|
33
|
+
// Position -> camera's position
|
|
34
|
+
// Rotation -> camera's direction
|
|
35
|
+
// scale.z -> zoom level
|
|
36
|
+
// scale.x and scale.y -> unused
|
|
37
|
+
optional bool allow_manual_rotation = 2; // whether the user can move the camera's rotation. default false
|
|
38
|
+
optional float yaw_range = 3; // how far the camera can rotate around the y-axis / look left/right, in radians. default unrestricted
|
|
39
|
+
optional float pitch_range = 4; // how far the camera can rotate around the x-axis / look up-down, in radians. default unrestricted
|
|
40
|
+
// note: cameras can never look up/down further than Vec3::Y
|
|
41
|
+
optional float roll_range = 5; // how far the camera can rotate around the z-axis / tilt, in radians. default unrestricted
|
|
42
|
+
optional float zoom_min = 6; // minimum zoom level. must be greater than 0. defaults to the input zoom level
|
|
43
|
+
optional float zoom_max = 7; // maximum zoom level. must be greater than 0. defaults to the input zoom level
|
|
25
44
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/common/colors.proto";
|
|
5
|
+
import "decentraland/common/vectors.proto";
|
|
6
|
+
|
|
7
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
8
|
+
option (common.ecs_component_id) = 1206;
|
|
9
|
+
|
|
10
|
+
// defines the global scene light settings. must be added to the scene root.
|
|
11
|
+
// to control sunlight color, intensity, shadows etc, you can also add a PBLight to the scene root.
|
|
12
|
+
message PBGlobalLight {
|
|
13
|
+
// the direction the directional light shines in.
|
|
14
|
+
// default depends on time of day and explorer implementation
|
|
15
|
+
optional decentraland.common.Vector3 direction = 1;
|
|
16
|
+
// ambient light color
|
|
17
|
+
// default: White
|
|
18
|
+
optional decentraland.common.Color3 ambient_color = 2;
|
|
19
|
+
// ambient light intensity. the explorer default ambient brightness is multiplied by this non-physical quantity.
|
|
20
|
+
// default 1
|
|
21
|
+
optional float ambient_brightness = 3;
|
|
22
|
+
}
|
|
@@ -10,4 +10,17 @@ import "decentraland/sdk/components/common/loading_state.proto";
|
|
|
10
10
|
// the current state of the GltfContainer of an entity.
|
|
11
11
|
message PBGltfContainerLoadingState {
|
|
12
12
|
common.LoadingState current_state = 1;
|
|
13
|
+
repeated string node_paths = 2; // all node paths in the gltf, which can be used with a GltfNode to inspect and modify the gltf contents
|
|
14
|
+
repeated string mesh_names = 3; // all meshes in the gltf. unnamed meshes will be auto-assigned a name of the form `MeshX` or `MeshX/PrimitiveY`
|
|
15
|
+
// where X is the mesh index and Y is the primitive index (and there is more than 1 primitive). note this may
|
|
16
|
+
// conflict with manually named meshes - to avoid any issues make sure all your meshes are explicitly named.
|
|
17
|
+
repeated string material_names = 4; // all materials in the gltf. unnamed materials will be auto-assigned a name of the form `MaterialX` where
|
|
18
|
+
// X is the material index. note this may conflict with manually named materials - to avoid any issues make
|
|
19
|
+
// sure all your materials are explicitly named.
|
|
20
|
+
repeated string skin_names = 5; // all mesh skins in the gltf. unnamed skins will be auto-assigned a name of the form `SkinX` where
|
|
21
|
+
// X is the skin index. note this may conflict with manually named skins - to avoid any issues make sure all
|
|
22
|
+
// your skins are explicitly named.
|
|
23
|
+
repeated string animation_names = 6; // all animations in the gltf. unnamed animations will be auto-assigned a name of the form `AnimationX` where
|
|
24
|
+
// X is the animation index. note this may conflict with manually named anims - to avoid any issues make sure all
|
|
25
|
+
// your animations are explicitly named.
|
|
13
26
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
5
|
+
option (common.ecs_component_id) = 1200;
|
|
6
|
+
|
|
7
|
+
// a GltfNode links a scene entity with a node from within a gltf, allowing the scene to inspect it or modify it.
|
|
8
|
+
// This component must be added to a direct child of an entity with a PBGltfContainer component, or
|
|
9
|
+
// to a direct child of another entity with a GltfNode component, and the referenced gltf node must be a descendent of the gltf node
|
|
10
|
+
// in the parent.
|
|
11
|
+
// The name must match the path of one of the nodes within the Gltf. These are available on the GltfContainerLoadingState component.
|
|
12
|
+
//
|
|
13
|
+
// The renderer will attach a PBGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
|
|
14
|
+
// - the `Transform` will be updated to match the position of the node within the gltf (relative to the gltf root, or the parent node),
|
|
15
|
+
// - a `MeshRenderer` with a GltfMesh mesh type will be added (if the gltf node has a mesh).
|
|
16
|
+
// - a `MeshCollider` with a GltfMesh mesh type will be added (if the gltf node has a collider).
|
|
17
|
+
// - a `Material` component including a GltfMaterial reference will be added (if the gltf node has a material).
|
|
18
|
+
//
|
|
19
|
+
// After creation, if an animation moves the node, the `Transform` will be updated.
|
|
20
|
+
//
|
|
21
|
+
// From the scene, you can modify various components to alter the gltf node:
|
|
22
|
+
// - modifying the `Transform` position/rotation/scale will move the node. The position is interpreted relative to the gltf root (or parent node),
|
|
23
|
+
// regardless of any intermediate gltf node hierarchy.
|
|
24
|
+
// If an animation is playing, the animation takes priority and the scene entity's position will be updated to match the animation.
|
|
25
|
+
// - `Visibility` can be added to hide or show the node and it's children in the gltf hierarchy.
|
|
26
|
+
// - `MeshRenderer` can be added/modified/removed to create/modify/remove a mesh on the node.
|
|
27
|
+
// - `MeshCollider` can be added/modified/removed to create/modify/remove a collider on the node.
|
|
28
|
+
// - `Material` can be added or modified to change the material properties. If the gltf node has a material, the original material will be
|
|
29
|
+
// used as a base, and any gltf features (e.g. occlusion maps) from the gtlf spec that the renderer supports but that are not exposed in the
|
|
30
|
+
// PBMaterial will be maintained.
|
|
31
|
+
//
|
|
32
|
+
// The scene can add additional entities as children to the gltf node, but structural modifications of the gltf are not possible:
|
|
33
|
+
// - changing the scene hierarchy will not change the gltf node hierarchy. Moving the entity out of the gltf will sever the link and
|
|
34
|
+
// change the state to `GNS_FAILED`.
|
|
35
|
+
// - deleting the scene entity will not delete the gltf node.
|
|
36
|
+
//
|
|
37
|
+
// Removing the GltfNode will revert any changes to the original gltf. If the GltfNode component is removed and the mesh/collider/material
|
|
38
|
+
// are not removed, this will result in a duplication of these components as the previously-linked entity will retain it's components and
|
|
39
|
+
// the gltf node will also be displayed.
|
|
40
|
+
message PBGltfNode {
|
|
41
|
+
string path = 1; // the path of the target node in the Gltf.
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
5
|
+
option (common.ecs_component_id) = 1201;
|
|
6
|
+
|
|
7
|
+
// See the details of the GltfNode component for more information.
|
|
8
|
+
|
|
9
|
+
// The state of a linked gltf node.
|
|
10
|
+
// If the state is GNSV_FAILED, the renderer may describe the failure in the error string.
|
|
11
|
+
message PBGltfNodeState {
|
|
12
|
+
GltfNodeStateValue state = 1;
|
|
13
|
+
optional string error = 2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
enum GltfNodeStateValue {
|
|
17
|
+
GNSV_PENDING = 0;
|
|
18
|
+
GNSV_FAILED = 1;
|
|
19
|
+
GNSV_READY = 2;
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/common/colors.proto";
|
|
5
|
+
|
|
6
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
7
|
+
option (common.ecs_component_id) = 1204;
|
|
8
|
+
|
|
9
|
+
// defines a light source.
|
|
10
|
+
// the world has a default directional light (like sunlight) which can be overridden by adding the light component to the scene root.
|
|
11
|
+
// a PBGlobalLight component can also be added to the root to control the directional light direction.
|
|
12
|
+
// point lights (lightbulbs) or spotlights can be created by attaching the light component to non-root entities.
|
|
13
|
+
message PBLight {
|
|
14
|
+
// whether the light is on
|
|
15
|
+
// default true
|
|
16
|
+
optional bool enabled = 1;
|
|
17
|
+
// light brightness in lux (lumens/m^2).
|
|
18
|
+
//
|
|
19
|
+
// for global directional light, this applies as a constant value at all surfaces and distances (though the effect on the surface still depends on incidence angle).
|
|
20
|
+
// the default global light illuminance varies from 400 (sunrise/sunset) to 10,000 (midday).
|
|
21
|
+
// for typical values, see https://en.wikipedia.org/wiki/Lux#Illuminance
|
|
22
|
+
//
|
|
23
|
+
// for point and spot lights, this is the lumens/m^2 at 1m distance from the light. to transform from raw lumens,
|
|
24
|
+
// divide lumens by ~12 (4*pi).
|
|
25
|
+
// e.g. a 100w household bulb with 1200 lumens would have an illuminance of ~100.
|
|
26
|
+
// a lighthouse bulb with 200,000 lumens would have an illuminance of ~15,000 (ignoring beam reflections)
|
|
27
|
+
//
|
|
28
|
+
// default
|
|
29
|
+
// for point/spotlights: 10,000
|
|
30
|
+
// for global directional light: depends on explorer implementation. may vary on light direction, time of day, etc
|
|
31
|
+
optional float illuminance = 2;
|
|
32
|
+
// whether the light should cast shadows.
|
|
33
|
+
// note: even when set to true the engine may not display shadows, or may only show shadows for a limited number
|
|
34
|
+
// of lights depending on the implementation, platform, and user settings.
|
|
35
|
+
// default
|
|
36
|
+
// for point/spotlights: false / off
|
|
37
|
+
// for global directional light: true / on
|
|
38
|
+
optional bool shadows = 3;
|
|
39
|
+
// light color
|
|
40
|
+
// default White
|
|
41
|
+
optional decentraland.common.Color3 color = 4;
|
|
42
|
+
}
|
|
@@ -54,4 +54,16 @@ message PBMaterial {
|
|
|
54
54
|
UnlitMaterial unlit = 1;
|
|
55
55
|
PbrMaterial pbr = 2;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
|
|
58
|
+
message GltfMaterial {
|
|
59
|
+
string gltf_src = 1;
|
|
60
|
+
string name = 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// A gltf material that may provide additional features not supported by the PbMaterial fields.
|
|
64
|
+
// If both gltf and material fields are provided, the gltf will be used only for extended features not
|
|
65
|
+
// supported by the PbMaterial.
|
|
66
|
+
// If this is provided and the `material` field is not provided, the renderer will update the material
|
|
67
|
+
// field with data that reflects the gltf material once it is loaded.
|
|
68
|
+
optional GltfMaterial gltf = 3;
|
|
69
|
+
}
|
|
@@ -30,6 +30,12 @@ message PBMeshCollider {
|
|
|
30
30
|
// SphereMesh is a sphere shape that contains the Entity.
|
|
31
31
|
message SphereMesh {}
|
|
32
32
|
|
|
33
|
+
// A collider constructed from a Gltf Mesh.
|
|
34
|
+
message GltfMesh {
|
|
35
|
+
string gltf_src = 1; // the GLTF file path as listed in the scene's manifest.
|
|
36
|
+
string name = 2; // the name of the mesh asset
|
|
37
|
+
}
|
|
38
|
+
|
|
33
39
|
optional uint32 collision_mask = 1; // enabled ColliderLayers (default CL_POINTER | CL_PHYSICS)
|
|
34
40
|
|
|
35
41
|
oneof mesh {
|
|
@@ -37,6 +43,7 @@ message PBMeshCollider {
|
|
|
37
43
|
SphereMesh sphere = 3;
|
|
38
44
|
CylinderMesh cylinder = 4;
|
|
39
45
|
PlaneMesh plane = 5;
|
|
46
|
+
GltfMesh gltf = 6;
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
49
|
|
|
@@ -59,4 +66,4 @@ enum ColliderLayer {
|
|
|
59
66
|
CL_CUSTOM6 = 8192;
|
|
60
67
|
CL_CUSTOM7 = 16384;
|
|
61
68
|
CL_CUSTOM8 = 32768;
|
|
62
|
-
}
|
|
69
|
+
}
|
|
@@ -5,13 +5,11 @@ import "decentraland/sdk/components/common/id.proto";
|
|
|
5
5
|
option (common.ecs_component_id) = 1018;
|
|
6
6
|
|
|
7
7
|
// The MeshRenderer component renders a basic geometric shape for an Entity. It can be a cube, a
|
|
8
|
-
// plane, a sphere or a
|
|
8
|
+
// plane, a sphere, a cylinder, or a Gltf mesh.
|
|
9
9
|
//
|
|
10
10
|
// The cube and plane variants can include a UV texture mapping, so specific areas of a material
|
|
11
11
|
// texture are rendered on different faces of the shape. They are serialized as a sequence of 2D
|
|
12
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.
|
|
15
13
|
message PBMeshRenderer {
|
|
16
14
|
|
|
17
15
|
// BoxMesh renders a prism shape.
|
|
@@ -34,10 +32,17 @@ message PBMeshRenderer {
|
|
|
34
32
|
message SphereMesh {
|
|
35
33
|
}
|
|
36
34
|
|
|
35
|
+
// A mesh from a Gltf.
|
|
36
|
+
message GltfMesh {
|
|
37
|
+
string gltf_src = 1; // the GLTF file path as listed in the scene's manifest.
|
|
38
|
+
string name = 2; // the name of the mesh asset
|
|
39
|
+
}
|
|
40
|
+
|
|
37
41
|
oneof mesh {
|
|
38
42
|
BoxMesh box = 1;
|
|
39
43
|
SphereMesh sphere = 2;
|
|
40
44
|
CylinderMesh cylinder = 3;
|
|
41
45
|
PlaneMesh plane = 4;
|
|
46
|
+
GltfMesh gltf = 5;
|
|
42
47
|
}
|
|
43
48
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/common/vectors.proto";
|
|
5
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
6
|
+
option (common.ecs_component_id) = 1209;
|
|
7
|
+
|
|
8
|
+
message PBPrimaryPointerInfo {
|
|
9
|
+
optional PointerType pointer_type = 1;
|
|
10
|
+
// in pixels
|
|
11
|
+
optional decentraland.common.Vector2 screen_coordinates = 2;
|
|
12
|
+
// in pixels
|
|
13
|
+
optional decentraland.common.Vector2 screen_delta = 3;
|
|
14
|
+
// ray direction that can be used with the primary camera origin for
|
|
15
|
+
// raycasting from the cursor into the world
|
|
16
|
+
optional decentraland.common.Vector3 world_ray_direction = 4;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
enum PointerType {
|
|
20
|
+
POT_NONE = 0;
|
|
21
|
+
POT_MOUSE = 1;
|
|
22
|
+
POT_PAD = 2;
|
|
23
|
+
POT_TOUCH = 3;
|
|
24
|
+
POT_WAND = 4;
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
5
|
+
option (common.ecs_component_id) = 1205;
|
|
6
|
+
|
|
7
|
+
// defines a spotlight.
|
|
8
|
+
// spotlights are point lights that emit light only in a cone around the transform's forward direction.
|
|
9
|
+
// add this component together with the PBLight component to transform a point light into a spotlight.
|
|
10
|
+
// note that spotlights do not model any internal reflections / focus, they only restrict the area of effect.
|
|
11
|
+
// so for e.g. a torch beam, the bulb illuminance should be multiplied by the solid angle.
|
|
12
|
+
// a typical torch with a beam width of 15 degrees would use outer angle of 0.15 (7.5 degrees in radians),
|
|
13
|
+
// and an illuminance approximately equal to the bulb's lumens, e.g. 1200.
|
|
14
|
+
message PBSpotlight {
|
|
15
|
+
// the cone radius in radians. distance away from forward in which the light is visible.
|
|
16
|
+
// for a torch a value around 0.15 is appropriate.
|
|
17
|
+
float angle = 1;
|
|
18
|
+
// optional angle at which the light is brightest. should be <= outer angle.
|
|
19
|
+
// if specified, the light will fall off smoothly between `inner_angle` and `angle`.
|
|
20
|
+
optional float inner_angle = 2;
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package decentraland.sdk.components;
|
|
4
|
+
|
|
5
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
6
|
+
import "decentraland/common/colors.proto";
|
|
7
|
+
|
|
8
|
+
option (common.ecs_component_id) = 1207;
|
|
9
|
+
|
|
10
|
+
message PBTextureCamera {
|
|
11
|
+
// rendered texture width
|
|
12
|
+
optional uint32 width = 1;
|
|
13
|
+
// rendered texture height
|
|
14
|
+
optional uint32 height = 2;
|
|
15
|
+
// which layer of entities to render. entity layers can be specified by adding PBCameraLayers to target entities.
|
|
16
|
+
// defaults to 0
|
|
17
|
+
optional uint32 layer = 3;
|
|
18
|
+
|
|
19
|
+
// default black
|
|
20
|
+
optional decentraland.common.Color4 clear_color = 6;
|
|
21
|
+
// default infinity
|
|
22
|
+
optional float far_plane = 7;
|
|
23
|
+
|
|
24
|
+
oneof mode {
|
|
25
|
+
Perspective perspective = 8;
|
|
26
|
+
Orthographic orthographic = 9;
|
|
27
|
+
/* Portal portal = 10; */
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message Perspective {
|
|
32
|
+
// vertical field of view in radians
|
|
33
|
+
// defaults to pi/4 = 45 degrees
|
|
34
|
+
optional float field_of_view = 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message Orthographic {
|
|
38
|
+
// vertical extent of the visible range in meters
|
|
39
|
+
// defaults to 4m
|
|
40
|
+
optional float vertical_range = 1;
|
|
41
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
4
|
+
package decentraland.sdk.components;
|
|
5
|
+
|
|
6
|
+
option (common.ecs_component_id) = 1203;
|
|
7
|
+
|
|
8
|
+
import "decentraland/common/colors.proto";
|
|
9
|
+
|
|
10
|
+
// The UiCanvas component can be attached to a ui root entity to specify properties of the ui texture.
|
|
11
|
+
message PBUiCanvas {
|
|
12
|
+
uint32 width = 1;
|
|
13
|
+
uint32 height = 2;
|
|
14
|
+
|
|
15
|
+
optional decentraland.common.Color4 color = 3; // default = (0.0, 0.0, 0.0, 0.0) / transparent
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package decentraland.sdk.components;
|
|
4
|
+
|
|
5
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
6
|
+
import "decentraland/common/vectors.proto";
|
|
7
|
+
|
|
8
|
+
option (common.ecs_component_id) = 1202;
|
|
9
|
+
|
|
10
|
+
message PBUiScrollResult {
|
|
11
|
+
decentraland.common.Vector2 value = 1;
|
|
12
|
+
}
|
|
@@ -23,4 +23,7 @@ message PBUiText {
|
|
|
23
23
|
optional common.Font font = 4; // font for the text (default: sans-serif)
|
|
24
24
|
optional int32 font_size = 5; // size of the text (default: 10)
|
|
25
25
|
optional TextWrap text_wrap = 6; // wrap text when the border is reached (default: TW_WRAP)
|
|
26
|
+
|
|
27
|
+
optional float outline_width = 7; // width of the outline (default: 0)
|
|
28
|
+
optional decentraland.common.Color4 outline_color = 8; // RGBA color of the outline (default: opaque black)
|
|
26
29
|
}
|
|
@@ -3,6 +3,7 @@ syntax = "proto3";
|
|
|
3
3
|
package decentraland.sdk.components;
|
|
4
4
|
|
|
5
5
|
import "decentraland/sdk/components/common/id.proto";
|
|
6
|
+
import "decentraland/common/vectors.proto";
|
|
6
7
|
|
|
7
8
|
option (common.ecs_component_id) = 1050;
|
|
8
9
|
|
|
@@ -79,6 +80,20 @@ enum PointerFilterMode {
|
|
|
79
80
|
PFM_BLOCK = 1;
|
|
80
81
|
}
|
|
81
82
|
|
|
83
|
+
enum ShowScrollBar {
|
|
84
|
+
SSB_BOTH = 0;
|
|
85
|
+
SSB_ONLY_VERTICAL = 1;
|
|
86
|
+
SSB_ONLY_HORIZONTAL = 2;
|
|
87
|
+
SSB_HIDDEN = 3;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message ScrollPositionValue {
|
|
91
|
+
oneof value {
|
|
92
|
+
decentraland.common.Vector2 position = 1;
|
|
93
|
+
string reference = 2;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
82
97
|
message PBUiTransform {
|
|
83
98
|
int32 parent = 1;
|
|
84
99
|
int32 right_of = 2;
|
|
@@ -145,4 +160,12 @@ message PBUiTransform {
|
|
|
145
160
|
float padding_bottom = 51;
|
|
146
161
|
|
|
147
162
|
optional PointerFilterMode pointer_filter = 52; // default: PointerFilterMode.PFM_NONE
|
|
163
|
+
optional float opacity = 53; // default: 1
|
|
164
|
+
|
|
165
|
+
optional string element_id = 54; // default empty
|
|
166
|
+
|
|
167
|
+
optional ScrollPositionValue scroll_position = 55; // default position=(0,0)
|
|
168
|
+
optional ShowScrollBar scroll_visible = 56; // default ShowScrollBar.SSB_BOTH
|
|
169
|
+
|
|
170
|
+
optional int32 z_index = 57; // default 0
|
|
148
171
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
|
-
package decentraland.
|
|
2
|
+
package decentraland.social.friendships;
|
|
3
3
|
|
|
4
4
|
// This message is a response that is sent from the server to the client
|
|
5
5
|
message FriendshipEventResponse {
|
|
@@ -142,7 +142,6 @@ message SubscribeFriendshipEventsUpdatesResponse {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
// @deprecated, only available for old explorer compatibility
|
|
146
145
|
service FriendshipsService {
|
|
147
146
|
// Get the list of friends for the authenticated user
|
|
148
147
|
rpc GetFriends(Payload) returns (stream UsersResponse) {}
|