@dcl/sdk 7.0.0-3548419522.commit-ddcf4b7 → 7.0.0
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/ecs.d.ts +1 -0
- package/ecs.js +2 -0
- package/index.d.ts +1 -0
- package/index.js +11 -0
- package/internal/Observable.d.ts +36 -0
- package/internal/Observable.js +190 -0
- package/internal/transports/networkTransport.d.ts +2 -0
- package/internal/transports/networkTransport.js +16 -0
- package/internal/transports/rendererTransport.d.ts +7 -0
- package/internal/transports/rendererTransport.js +39 -0
- package/math.d.ts +3 -0
- package/math.js +4 -0
- package/messageBus.d.ts +10 -0
- package/messageBus.js +43 -0
- package/observables.d.ts +225 -0
- package/observables.js +75 -0
- package/package.json +12 -18
- package/react-ecs.d.ts +3 -0
- package/react-ecs.js +4 -0
- package/src/ecs.ts +1 -0
- package/src/index.ts +18 -0
- package/src/internal/Observable.ts +425 -0
- package/src/internal/transports/networkTransport.ts +24 -0
- package/src/internal/transports/rendererTransport.ts +60 -0
- package/src/math.ts +3 -0
- package/src/messageBus.ts +62 -0
- package/src/observables.ts +579 -0
- package/src/react-ecs.ts +3 -0
- package/tsconfig.json +11 -0
- package/types/tsconfig.ecs7.json +3 -8
- package/dist/ecs7/index.d.ts +0 -4679
- package/dist/ecs7/index.js +0 -15202
- package/dist/ecs7/index.min.js +0 -1
- package/dist/ecs7/index.min.js.map +0 -1
- package/dist/ecs7/proto-definitions/README.md +0 -32
- package/dist/ecs7/proto-definitions/Transform.md +0 -25
- package/dist/ecs7/proto-definitions/animator.proto +0 -19
- package/dist/ecs7/proto-definitions/audio_source.proto +0 -13
- package/dist/ecs7/proto-definitions/audio_stream.proto +0 -11
- package/dist/ecs7/proto-definitions/avatar_attach.proto +0 -19
- package/dist/ecs7/proto-definitions/avatar_modifier_area.proto +0 -19
- package/dist/ecs7/proto-definitions/avatar_shape.proto +0 -32
- package/dist/ecs7/proto-definitions/billboard.proto +0 -17
- package/dist/ecs7/proto-definitions/camera_mode.proto +0 -10
- package/dist/ecs7/proto-definitions/camera_mode_area.proto +0 -14
- package/dist/ecs7/proto-definitions/common/camera_type.proto +0 -8
- package/dist/ecs7/proto-definitions/common/id.md +0 -2
- package/dist/ecs7/proto-definitions/common/id.proto +0 -8
- package/dist/ecs7/proto-definitions/common/input_action.proto +0 -20
- package/dist/ecs7/proto-definitions/common/texts.proto +0 -20
- package/dist/ecs7/proto-definitions/gltf_container.proto +0 -13
- package/dist/ecs7/proto-definitions/material.proto +0 -56
- package/dist/ecs7/proto-definitions/mesh_collider.proto +0 -35
- package/dist/ecs7/proto-definitions/mesh_renderer.proto +0 -30
- package/dist/ecs7/proto-definitions/nft_shape.proto +0 -40
- package/dist/ecs7/proto-definitions/pointer_events_result.proto +0 -25
- package/dist/ecs7/proto-definitions/pointer_hover_feedback.proto +0 -31
- package/dist/ecs7/proto-definitions/pointer_lock.proto +0 -9
- package/dist/ecs7/proto-definitions/raycast.proto +0 -20
- package/dist/ecs7/proto-definitions/raycast_result.proto +0 -25
- package/dist/ecs7/proto-definitions/text_shape.proto +0 -33
- package/dist/ecs7/proto-definitions/ui_background.proto +0 -11
- package/dist/ecs7/proto-definitions/ui_text.proto +0 -17
- package/dist/ecs7/proto-definitions/ui_transform.proto +0 -141
- package/dist/ecs7/proto-definitions/visibility_component.proto +0 -9
- package/dist/playground/snippets/billboard.ts +0 -108
- package/dist/playground/snippets/cube-spawner.ts +0 -39
- package/dist/playground/snippets/info.json +0 -1
- package/dist/playground/snippets/material.ts +0 -48
- package/dist/playground/snippets/mesh.ts +0 -68
- package/dist/playground/snippets/pointer-events.ts +0 -50
- package/dist/playground/snippets/raycast-hit-many.ts +0 -63
- package/dist/playground/snippets/raycast-hit.ts +0 -62
- package/dist/playground/snippets/ui.tsx +0 -134
- package/types/ecs7/index.d.ts +0 -4679
@@ -1,32 +0,0 @@
|
|
1
|
-
# How to add a new ECS Component with Protocol-Buffers
|
2
|
-
|
3
|
-
In this directory, we have all the components with the schema `ComponentName.proto`. `ComponentName` has to be PascalCase, and the `.proto` is the extension that is recognized as protocol-buffer schema.
|
4
|
-
|
5
|
-
Inside each proto, we need to have at least this template:
|
6
|
-
```proto
|
7
|
-
syntax = "proto3";
|
8
|
-
|
9
|
-
import "decentraland/sdk/components/common/id.proto";
|
10
|
-
option (common.ecs_component_id) = XXXX;
|
11
|
-
|
12
|
-
message PBComponentName {
|
13
|
-
float one_parameter = 1;
|
14
|
-
}
|
15
|
-
|
16
|
-
```
|
17
|
-
|
18
|
-
Some points that must be well-defined:
|
19
|
-
- `XXXX` the component ID is a super important property of the component, and it has to be unique at least between proto, otherwise, the code generation will fail.
|
20
|
-
- `PBComponentName` the root message has to be the same as the file name with the prefix `PB`
|
21
|
-
- `one_parameter` each parameter name has to be snake_case.
|
22
|
-
|
23
|
-
|
24
|
-
## Common directory
|
25
|
-
The common directory only has to have unambiguous structures like decentraland.common.Vector3, decentraland.common.Color3, Quaternion, etc. These messages will never change.
|
26
|
-
|
27
|
-
## About specific options with other languages
|
28
|
-
The definition must be the minimal proto code, and it shouldn't have a specific option to compile on some platform. So if you have to add additional information to the proto, you will be able to run a post-process after the protocol schemas acquisition.
|
29
|
-
For example, in the unity-renderer repo, it'll be necessary to add the `csharp_namespace` option but it's the responsibility of this particular implementation. This code option doesn't define how the component is.
|
30
|
-
|
31
|
-
# Test component
|
32
|
-
If you write a proto and then push, CI will fail because the tests will fail. All the components need to be tested. `@dcl/ecs/test/components` has some examples!
|
@@ -1,25 +0,0 @@
|
|
1
|
-
|
2
|
-
# Transform
|
3
|
-
|
4
|
-
Transform is not a protocol-buffer definition, because it uses the native byte-buffer to write directly on the wire. This allows the consumer to copy the message directly on memory and the component be serialized a little bit faster.
|
5
|
-
|
6
|
-
```cpp
|
7
|
-
// Transform length = 44
|
8
|
-
struct Transform {
|
9
|
-
float positionX;
|
10
|
-
float positionY;
|
11
|
-
float positionZ;
|
12
|
-
|
13
|
-
float rotationX;
|
14
|
-
float rotationY;
|
15
|
-
float rotationZ;
|
16
|
-
float rotationW;
|
17
|
-
|
18
|
-
float scaleX;
|
19
|
-
float scaleY;
|
20
|
-
float scaleZ;
|
21
|
-
|
22
|
-
uint32_t parentEntity;
|
23
|
-
};
|
24
|
-
```
|
25
|
-
- Serialized in big-endian
|
@@ -1,19 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
package decentraland.sdk.components;
|
3
|
-
|
4
|
-
import "decentraland/sdk/components/common/id.proto";
|
5
|
-
option (common.ecs_component_id) = 1042;
|
6
|
-
|
7
|
-
message PBAnimator {
|
8
|
-
repeated PBAnimationState states = 1;
|
9
|
-
}
|
10
|
-
|
11
|
-
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
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
package decentraland.sdk.components;
|
3
|
-
|
4
|
-
import "decentraland/sdk/components/common/id.proto";
|
5
|
-
option (common.ecs_component_id) = 1020;
|
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;
|
13
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
package decentraland.sdk.components;
|
3
|
-
|
4
|
-
import "decentraland/sdk/components/common/id.proto";
|
5
|
-
option (common.ecs_component_id) = 1021;
|
6
|
-
|
7
|
-
message PBAudioStream {
|
8
|
-
optional bool playing = 1;
|
9
|
-
optional float volume = 2; // default=1.0f
|
10
|
-
string url = 3;
|
11
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/sdk/components/common/id.proto";
|
6
|
-
|
7
|
-
option (common.ecs_component_id) = 1073;
|
8
|
-
|
9
|
-
enum AvatarAnchorPointType {
|
10
|
-
AAPT_POSITION = 0;
|
11
|
-
AAPT_NAME_TAG = 1;
|
12
|
-
AAPT_LEFT_HAND = 2;
|
13
|
-
AAPT_RIGHT_HAND = 3;
|
14
|
-
}
|
15
|
-
|
16
|
-
message PBAvatarAttach {
|
17
|
-
string avatar_id = 1;
|
18
|
-
AvatarAnchorPointType anchor_point_id = 2;
|
19
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/common/vectors.proto";
|
6
|
-
import "decentraland/sdk/components/common/id.proto";
|
7
|
-
|
8
|
-
option (common.ecs_component_id) = 1070;
|
9
|
-
|
10
|
-
enum AvatarModifierType {
|
11
|
-
AMT_HIDE_AVATARS = 0;
|
12
|
-
AMT_DISABLE_PASSPORTS = 1;
|
13
|
-
}
|
14
|
-
|
15
|
-
message PBAvatarModifierArea {
|
16
|
-
decentraland.common.Vector3 area = 1;
|
17
|
-
repeated string exclude_ids = 2;
|
18
|
-
repeated AvatarModifierType modifiers = 3;
|
19
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
package decentraland.sdk.components;
|
3
|
-
|
4
|
-
import "decentraland/sdk/components/common/id.proto";
|
5
|
-
option (common.ecs_component_id) = 1080;
|
6
|
-
import "decentraland/common/colors.proto";
|
7
|
-
|
8
|
-
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
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/sdk/components/common/id.proto";
|
6
|
-
|
7
|
-
option (common.ecs_component_id) = 1090;
|
8
|
-
|
9
|
-
enum BillboardMode {
|
10
|
-
BM_ALL_AXES = 0;
|
11
|
-
BM_Y_AXE = 1;
|
12
|
-
}
|
13
|
-
|
14
|
-
message PBBillboard {
|
15
|
-
optional BillboardMode billboard_mode = 1; // default=BM_ALL_AXES
|
16
|
-
optional bool opposite_direction = 2; // default=false
|
17
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
package decentraland.sdk.components;
|
3
|
-
|
4
|
-
import "decentraland/sdk/components/common/id.proto";
|
5
|
-
option (common.ecs_component_id) = 1072;
|
6
|
-
import "decentraland/sdk/components/common/camera_type.proto";
|
7
|
-
|
8
|
-
message PBCameraMode {
|
9
|
-
common.CameraType mode = 1;
|
10
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/common/vectors.proto";
|
6
|
-
import "decentraland/sdk/components/common/camera_type.proto";
|
7
|
-
import "decentraland/sdk/components/common/id.proto";
|
8
|
-
|
9
|
-
option (common.ecs_component_id) = 1071;
|
10
|
-
|
11
|
-
message PBCameraModeArea {
|
12
|
-
decentraland.common.Vector3 area = 1;
|
13
|
-
common.CameraType mode = 2;
|
14
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components.common;
|
4
|
-
|
5
|
-
enum InputAction {
|
6
|
-
IA_POINTER = 0;
|
7
|
-
IA_PRIMARY = 1;
|
8
|
-
IA_SECONDARY = 2;
|
9
|
-
IA_ANY = 3;
|
10
|
-
IA_FORWARD = 4;
|
11
|
-
IA_BACKWARD = 5;
|
12
|
-
IA_RIGHT = 6;
|
13
|
-
IA_LEFT = 7;
|
14
|
-
IA_JUMP = 8;
|
15
|
-
IA_WALK = 9;
|
16
|
-
IA_ACTION_3 = 10;
|
17
|
-
IA_ACTION_4 = 11;
|
18
|
-
IA_ACTION_5 = 12;
|
19
|
-
IA_ACTION_6 = 13;
|
20
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components.common;
|
4
|
-
|
5
|
-
enum TextAlignMode {
|
6
|
-
TAM_TOP_LEFT = 0;
|
7
|
-
TAM_TOP_CENTER = 1;
|
8
|
-
TAM_TOP_RIGHT = 2;
|
9
|
-
TAM_MIDDLE_LEFT = 3;
|
10
|
-
TAM_MIDDLE_CENTER = 4;
|
11
|
-
TAM_MIDDLE_RIGHT = 5;
|
12
|
-
TAM_BOTTOM_LEFT = 6;
|
13
|
-
TAM_BOTTOM_CENTER = 7;
|
14
|
-
TAM_BOTTOM_RIGHT = 8;
|
15
|
-
}
|
16
|
-
|
17
|
-
enum Font {
|
18
|
-
F_LIBERATION_SANS = 0;
|
19
|
-
F_SANS_SERIF = 1;
|
20
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
package decentraland.sdk.components;
|
3
|
-
|
4
|
-
import "decentraland/sdk/components/common/id.proto";
|
5
|
-
option (common.ecs_component_id) = 1041;
|
6
|
-
|
7
|
-
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;
|
13
|
-
}
|
@@ -1,56 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/common/colors.proto";
|
6
|
-
import "decentraland/common/texture.proto";
|
7
|
-
import "decentraland/sdk/components/common/id.proto";
|
8
|
-
|
9
|
-
option (common.ecs_component_id) = 1017;
|
10
|
-
|
11
|
-
enum MaterialTransparencyMode {
|
12
|
-
MTM_OPAQUE = 0;
|
13
|
-
MTM_ALPHA_TEST = 1;
|
14
|
-
MTM_ALPHA_BLEND = 2;
|
15
|
-
MTM_ALPHA_TEST_AND_ALPHA_BLEND = 3;
|
16
|
-
MTM_AUTO = 4;
|
17
|
-
}
|
18
|
-
|
19
|
-
message PBMaterial {
|
20
|
-
message UnlitMaterial {
|
21
|
-
optional decentraland.common.TextureUnion texture = 1; // default = null
|
22
|
-
optional float alpha_test = 2; // default = 0.5. range value: from 0 to 1
|
23
|
-
optional bool cast_shadows = 3; // default = true
|
24
|
-
}
|
25
|
-
|
26
|
-
message PbrMaterial {
|
27
|
-
optional decentraland.common.TextureUnion texture = 1; // default = null
|
28
|
-
|
29
|
-
optional float alpha_test = 2; // default = 0.5. range value: from 0 to 1
|
30
|
-
optional bool cast_shadows = 3; // default = true
|
31
|
-
|
32
|
-
optional decentraland.common.TextureUnion alpha_texture = 4; // default = null
|
33
|
-
optional decentraland.common.TextureUnion emissive_texture = 5; // default = null
|
34
|
-
optional decentraland.common.TextureUnion bump_texture = 6; // default = null
|
35
|
-
|
36
|
-
optional decentraland.common.Color3 albedo_color = 7; // default = white;
|
37
|
-
optional decentraland.common.Color3 emissive_color = 8; // default = black;
|
38
|
-
optional decentraland.common.Color3 reflectivity_color = 9; // default = white;
|
39
|
-
|
40
|
-
optional MaterialTransparencyMode transparency_mode = 10; // default = TransparencyMode.Auto
|
41
|
-
|
42
|
-
optional float metallic = 11; // default = 0.5
|
43
|
-
optional float roughness = 12; // default = 0.5
|
44
|
-
optional float glossiness = 13; // default = 1
|
45
|
-
|
46
|
-
optional float specular_intensity = 14; // default = 1
|
47
|
-
optional float emissive_intensity = 15; // default = 2
|
48
|
-
optional float direct_intensity = 16; // default = 1
|
49
|
-
}
|
50
|
-
|
51
|
-
oneof material {
|
52
|
-
UnlitMaterial unlit = 1;
|
53
|
-
PbrMaterial pbr = 2;
|
54
|
-
}
|
55
|
-
|
56
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/sdk/components/common/id.proto";
|
6
|
-
|
7
|
-
option (common.ecs_component_id) = 1019;
|
8
|
-
|
9
|
-
enum ColliderLayer {
|
10
|
-
CL_NONE = 0;
|
11
|
-
CL_POINTER = 1;
|
12
|
-
CL_PHYSICS = 2;
|
13
|
-
}
|
14
|
-
|
15
|
-
message PBMeshCollider {
|
16
|
-
message BoxMesh {}
|
17
|
-
|
18
|
-
message CylinderMesh {
|
19
|
-
optional float radius_top = 1; // default=1.0
|
20
|
-
optional float radius_bottom = 2; // default=1.0
|
21
|
-
}
|
22
|
-
|
23
|
-
message PlaneMesh {}
|
24
|
-
|
25
|
-
message SphereMesh {}
|
26
|
-
|
27
|
-
optional int32 collision_mask = 1; // default = ColliderLayer.Physics | ColliderLayer.Pointer
|
28
|
-
|
29
|
-
oneof mesh {
|
30
|
-
BoxMesh box = 2;
|
31
|
-
SphereMesh sphere = 3;
|
32
|
-
CylinderMesh cylinder = 4;
|
33
|
-
PlaneMesh plane = 5;
|
34
|
-
}
|
35
|
-
}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
package decentraland.sdk.components;
|
3
|
-
|
4
|
-
import "decentraland/sdk/components/common/id.proto";
|
5
|
-
option (common.ecs_component_id) = 1018;
|
6
|
-
|
7
|
-
message PBMeshRenderer {
|
8
|
-
message BoxMesh {
|
9
|
-
repeated float uvs = 1;
|
10
|
-
}
|
11
|
-
|
12
|
-
message CylinderMesh {
|
13
|
-
optional float radius_top = 1; // default=1.0
|
14
|
-
optional float radius_bottom = 2; // default=1.0
|
15
|
-
}
|
16
|
-
|
17
|
-
message PlaneMesh {
|
18
|
-
repeated float uvs = 1;
|
19
|
-
}
|
20
|
-
|
21
|
-
message SphereMesh {
|
22
|
-
}
|
23
|
-
|
24
|
-
oneof mesh {
|
25
|
-
BoxMesh box = 1;
|
26
|
-
SphereMesh sphere = 2;
|
27
|
-
CylinderMesh cylinder = 3;
|
28
|
-
PlaneMesh plane = 4;
|
29
|
-
}
|
30
|
-
}
|
@@ -1,40 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/common/colors.proto";
|
6
|
-
import "decentraland/sdk/components/common/id.proto";
|
7
|
-
|
8
|
-
option (common.ecs_component_id) = 1040;
|
9
|
-
|
10
|
-
enum NftFrameType {
|
11
|
-
NFT_CLASSIC = 0;
|
12
|
-
NFT_BAROQUE_ORNAMENT = 1;
|
13
|
-
NFT_DIAMOND_ORNAMENT = 2;
|
14
|
-
NFT_MINIMAL_WIDE = 3;
|
15
|
-
NFT_MINIMAL_GREY = 4;
|
16
|
-
NFT_BLOCKY = 5;
|
17
|
-
NFT_GOLD_EDGES = 6;
|
18
|
-
NFT_GOLD_CARVED = 7;
|
19
|
-
NFT_GOLD_WIDE = 8;
|
20
|
-
NFT_GOLD_ROUNDED = 9;
|
21
|
-
NFT_METAL_MEDIUM = 10;
|
22
|
-
NFT_METAL_WIDE = 11;
|
23
|
-
NFT_METAL_SLIM = 12;
|
24
|
-
NFT_METAL_ROUNDED = 13;
|
25
|
-
NFT_PINS = 14;
|
26
|
-
NFT_MINIMAL_BLACK = 15;
|
27
|
-
NFT_MINIMAL_WHITE = 16;
|
28
|
-
NFT_TAPE = 17;
|
29
|
-
NFT_WOOD_SLIM = 18;
|
30
|
-
NFT_WOOD_WIDE = 19;
|
31
|
-
NFT_WOOD_TWIGS = 20;
|
32
|
-
NFT_CANVAS = 21;
|
33
|
-
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
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/sdk/components/common/id.proto";
|
6
|
-
import "decentraland/sdk/components/common/input_action.proto";
|
7
|
-
import "decentraland/sdk/components/pointer_hover_feedback.proto";
|
8
|
-
import "decentraland/sdk/components/raycast_result.proto";
|
9
|
-
|
10
|
-
option (common.ecs_component_id) = 1063;
|
11
|
-
|
12
|
-
// the renderer will set this component to the root entity once per frame with all the events
|
13
|
-
message PBPointerEventsResult {
|
14
|
-
// a list of the last N pointer commands (from the engine)
|
15
|
-
repeated PointerCommand commands = 1;
|
16
|
-
|
17
|
-
// this message represents a pointer event, used both for UP and DOWN actions
|
18
|
-
message PointerCommand {
|
19
|
-
common.InputAction button = 1; // identifier of the input
|
20
|
-
RaycastHit hit = 2;
|
21
|
-
PointerEventType state = 4;
|
22
|
-
int32 timestamp = 5; // could be a Lamport timestamp
|
23
|
-
optional float analog = 6; // if the input is analog then we store it here
|
24
|
-
}
|
25
|
-
}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/sdk/components/common/id.proto";
|
6
|
-
import "decentraland/sdk/components/common/input_action.proto";
|
7
|
-
|
8
|
-
option (common.ecs_component_id) = 1062;
|
9
|
-
|
10
|
-
enum PointerEventType {
|
11
|
-
PET_UP = 0;
|
12
|
-
PET_DOWN = 1;
|
13
|
-
PET_HOVER_ENTER = 2;
|
14
|
-
PET_HOVER_LEAVE = 3;
|
15
|
-
}
|
16
|
-
|
17
|
-
message PBPointerHoverFeedback {
|
18
|
-
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
|
23
|
-
}
|
24
|
-
|
25
|
-
message Entry {
|
26
|
-
PointerEventType event_type = 1;
|
27
|
-
Info event_info = 2;
|
28
|
-
}
|
29
|
-
|
30
|
-
repeated Entry pointer_events = 1;
|
31
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/common/vectors.proto";
|
6
|
-
import "decentraland/sdk/components/common/id.proto";
|
7
|
-
|
8
|
-
option (common.ecs_component_id) = 1067;
|
9
|
-
|
10
|
-
enum RaycastQueryType {
|
11
|
-
RQT_HIT_FIRST = 0;
|
12
|
-
RQT_QUERY_ALL = 1;
|
13
|
-
}
|
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
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
package decentraland.sdk.components;
|
3
|
-
|
4
|
-
import "decentraland/sdk/components/common/id.proto";
|
5
|
-
import "decentraland/common/vectors.proto";
|
6
|
-
|
7
|
-
option (common.ecs_component_id) = 1068;
|
8
|
-
|
9
|
-
message PBRaycastResult {
|
10
|
-
int32 timestamp = 1;
|
11
|
-
decentraland.common.Vector3 origin = 2;
|
12
|
-
decentraland.common.Vector3 direction = 3;
|
13
|
-
repeated RaycastHit hits = 4;
|
14
|
-
}
|
15
|
-
|
16
|
-
// Position will be relative to the scene
|
17
|
-
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;
|
25
|
-
}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/common/colors.proto";
|
6
|
-
import "decentraland/sdk/components/common/id.proto";
|
7
|
-
import "decentraland/sdk/components/common/texts.proto";
|
8
|
-
|
9
|
-
option (common.ecs_component_id) = 1030;
|
10
|
-
|
11
|
-
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
|
-
optional float line_spacing = 12;
|
24
|
-
optional int32 line_count = 13;
|
25
|
-
optional bool text_wrapping = 14;
|
26
|
-
optional float shadow_blur = 15;
|
27
|
-
optional float shadow_offset_x = 16;
|
28
|
-
optional float shadow_offset_y = 17;
|
29
|
-
optional float outline_width = 18;
|
30
|
-
optional decentraland.common.Color3 shadow_color = 19; // default=(1.0,1.0,1.0)
|
31
|
-
optional decentraland.common.Color3 outline_color = 20; // default=(1.0,1.0,1.0)
|
32
|
-
optional decentraland.common.Color4 text_color = 21; // default=(1.0,1.0,1.0)
|
33
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
package decentraland.sdk.components;
|
3
|
-
|
4
|
-
import "decentraland/sdk/components/common/id.proto";
|
5
|
-
option (common.ecs_component_id) = 1053;
|
6
|
-
|
7
|
-
import "decentraland/common/colors.proto";
|
8
|
-
|
9
|
-
message PBUiBackground {
|
10
|
-
optional decentraland.common.Color4 background_color = 1; // default=(0.0, 0.0, 0.0, 0.0)
|
11
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package decentraland.sdk.components;
|
4
|
-
|
5
|
-
import "decentraland/common/colors.proto";
|
6
|
-
import "decentraland/sdk/components/common/id.proto";
|
7
|
-
import "decentraland/sdk/components/common/texts.proto";
|
8
|
-
|
9
|
-
option (common.ecs_component_id) = 1052;
|
10
|
-
|
11
|
-
message PBUiText {
|
12
|
-
string value = 1;
|
13
|
-
optional decentraland.common.Color4 color = 2; // default=(1.0,1.0,1.0,1.0)
|
14
|
-
optional common.TextAlignMode text_align = 3; // default='center'
|
15
|
-
optional common.Font font = 4; // default=0
|
16
|
-
optional int32 font_size = 5; // default=10
|
17
|
-
}
|