@dcl/sdk 7.0.0-3220359277.commit-7cbadc7 → 7.0.0-3244103998.commit-74d3f83

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 (82) hide show
  1. package/dist/ecs7/index.d.ts +153 -221
  2. package/dist/ecs7/index.js +209 -620
  3. package/dist/ecs7/index.min.js +1 -1
  4. package/dist/ecs7/index.min.js.map +1 -1
  5. package/dist/ecs7/proto-definitions/README.md +3 -3
  6. package/dist/ecs7/proto-definitions/{Animator.proto → animator.proto} +3 -2
  7. package/dist/ecs7/proto-definitions/{AudioSource.proto → audio_source.proto} +3 -2
  8. package/dist/ecs7/proto-definitions/{AudioStream.proto → audio_stream.proto} +3 -2
  9. package/dist/ecs7/proto-definitions/avatar_attach.proto +19 -0
  10. package/dist/ecs7/proto-definitions/avatar_modifier_area.proto +19 -0
  11. package/dist/ecs7/proto-definitions/{AvatarShape.proto → avatar_shape.proto} +7 -6
  12. package/dist/ecs7/proto-definitions/{Billboard.proto → billboard.proto} +3 -2
  13. package/dist/ecs7/proto-definitions/camera_mode.proto +10 -0
  14. package/dist/ecs7/proto-definitions/camera_mode_area.proto +14 -0
  15. package/dist/ecs7/proto-definitions/common/camera_type.proto +8 -0
  16. package/dist/ecs7/proto-definitions/common/id.proto +1 -0
  17. package/dist/ecs7/proto-definitions/common/input_action.proto +20 -0
  18. package/dist/ecs7/proto-definitions/common/texts.proto +14 -0
  19. package/dist/ecs7/proto-definitions/{GltfContainer.proto → gltf_container.proto} +3 -2
  20. package/dist/ecs7/proto-definitions/material.proto +59 -0
  21. package/dist/ecs7/proto-definitions/mesh_collider.proto +35 -0
  22. package/dist/ecs7/proto-definitions/{MeshRenderer.proto → mesh_renderer.proto} +3 -2
  23. package/dist/ecs7/proto-definitions/nft_shape.proto +40 -0
  24. package/dist/ecs7/proto-definitions/pointer_events.proto +31 -0
  25. package/dist/ecs7/proto-definitions/{PointerEventsResult.proto → pointer_events_result.proto} +10 -7
  26. package/dist/ecs7/proto-definitions/pointer_lock.proto +9 -0
  27. package/dist/ecs7/proto-definitions/raycast.proto +21 -0
  28. package/dist/ecs7/proto-definitions/raycast_result.proto +25 -0
  29. package/dist/ecs7/proto-definitions/{TextShape.proto → text_shape.proto} +13 -11
  30. package/dist/ecs7/proto-definitions/ui_background.proto +11 -0
  31. package/dist/ecs7/proto-definitions/ui_text.proto +17 -0
  32. package/dist/ecs7/proto-definitions/{UiTransform.proto → ui_transform.proto} +50 -49
  33. package/dist/ecs7/proto-definitions/visibility_component.proto +9 -0
  34. package/dist/playground/snippets/cube-spawner.ts +3 -3
  35. package/dist/playground/snippets/material.ts +1 -1
  36. package/dist/playground/snippets/pointer-events.ts +6 -6
  37. package/dist/playground/snippets/raycast-hit-many.ts +1 -1
  38. package/dist/playground/snippets/raycast-hit-oscilator.ts +1 -1
  39. package/dist/playground/snippets/raycast-hit.ts +1 -1
  40. package/dist/playground/snippets/ui.tsx +3 -3
  41. package/package.json +4 -4
  42. package/types/ecs7/index.d.ts +153 -221
  43. package/types/rpc-modules/CommunicationsController/index.d.ts +1 -1
  44. package/types/rpc-modules/DevTools/index.d.ts +1 -1
  45. package/types/rpc-modules/{EngineAPI → EngineApi}/index.d.ts +24 -24
  46. package/types/rpc-modules/{EnvironmentAPI → EnvironmentApi}/index.d.ts +3 -3
  47. package/types/rpc-modules/EthereumController/index.d.ts +1 -1
  48. package/types/rpc-modules/{ExperimentalAPI → ExperimentalApi}/index.d.ts +2 -2
  49. package/types/rpc-modules/ParcelIdentity/index.d.ts +2 -2
  50. package/types/rpc-modules/Permissions/index.d.ts +6 -6
  51. package/types/rpc-modules/Players/index.d.ts +3 -3
  52. package/types/rpc-modules/PortableExperiences/index.d.ts +1 -1
  53. package/types/rpc-modules/RestrictedActions/index.d.ts +1 -1
  54. package/types/rpc-modules/SignedFetch/index.d.ts +1 -1
  55. package/types/rpc-modules/SocialController/index.d.ts +1 -1
  56. package/types/rpc-modules/UserActionModule/index.d.ts +1 -1
  57. package/types/rpc-modules/UserIdentity/index.d.ts +3 -3
  58. package/types/tsconfig.ecs7.json +3 -3
  59. package/dist/ecs7/proto-definitions/AvatarAttach.proto +0 -16
  60. package/dist/ecs7/proto-definitions/AvatarModifierArea.proto +0 -16
  61. package/dist/ecs7/proto-definitions/CameraMode.proto +0 -9
  62. package/dist/ecs7/proto-definitions/CameraModeArea.proto +0 -11
  63. package/dist/ecs7/proto-definitions/Material.proto +0 -59
  64. package/dist/ecs7/proto-definitions/MeshCollider.proto +0 -35
  65. package/dist/ecs7/proto-definitions/NFTShape.proto +0 -38
  66. package/dist/ecs7/proto-definitions/OnPointerDown.proto +0 -12
  67. package/dist/ecs7/proto-definitions/OnPointerDownResult.proto +0 -17
  68. package/dist/ecs7/proto-definitions/OnPointerUp.proto +0 -12
  69. package/dist/ecs7/proto-definitions/OnPointerUpResult.proto +0 -17
  70. package/dist/ecs7/proto-definitions/PointerEvents.proto +0 -28
  71. package/dist/ecs7/proto-definitions/PointerLock.proto +0 -8
  72. package/dist/ecs7/proto-definitions/Raycast.proto +0 -19
  73. package/dist/ecs7/proto-definitions/RaycastResult.proto +0 -24
  74. package/dist/ecs7/proto-definitions/UiBackground.proto +0 -10
  75. package/dist/ecs7/proto-definitions/UiText.proto +0 -25
  76. package/dist/ecs7/proto-definitions/VisibilityComponent.proto +0 -8
  77. package/dist/ecs7/proto-definitions/common/ActionButton.proto +0 -18
  78. package/dist/ecs7/proto-definitions/common/CameraModeValue.proto +0 -6
  79. package/dist/ecs7/proto-definitions/common/Color3.proto +0 -8
  80. package/dist/ecs7/proto-definitions/common/Color4.proto +0 -8
  81. package/dist/ecs7/proto-definitions/common/Vector3.proto +0 -7
  82. package/types/rpc-modules/SceneStateStorageController/index.d.ts +0 -90
@@ -1,81 +1,84 @@
1
1
  syntax = "proto3";
2
2
 
3
- import "ecs/components/common/id.proto";
4
- option (ecs_component_id) = 1050;
3
+ package decentraland.sdk.components;
4
+
5
+ import "decentraland/sdk/components/common/id.proto";
6
+
7
+ option (common.ecs_component_id) = 1050;
5
8
 
6
9
  enum YGPositionType {
7
- YGPositionTypeStatic = 0;
8
- YGPositionTypeRelative = 1;
9
- YGPositionTypeAbsolute = 2;
10
+ YGPT_STATIC = 0;
11
+ YGPT_RELATIVE = 1;
12
+ YGPT_ABSOLUTE = 2;
10
13
  }
11
14
 
12
15
  enum YGAlign {
13
- YGAlignAuto = 0;
14
- YGAlignFlexStart = 1;
15
- YGAlignCenter = 2;
16
- YGAlignFlexEnd = 3;
17
- YGAlignStretch = 4;
18
- YGAlignBaseline = 5;
19
- YGAlignSpaceBetween = 6;
20
- YGAlignSpaceAround = 7;
16
+ YGA_AUTO = 0;
17
+ YGA_FLEX_START = 1;
18
+ YGA_CENTER = 2;
19
+ YGA_FLEX_END = 3;
20
+ YGA_STRETCH = 4;
21
+ YGA_BASELINE = 5;
22
+ YGA_SPACE_BETWEEN = 6;
23
+ YGA_SPACE_AROUND = 7;
21
24
  }
22
25
 
23
26
  enum YGUnit {
24
- YGUnitUndefined = 0;
25
- YGUnitPoint = 1;
26
- YGUnitPercent = 2;
27
- YGUnitAuto = 3;
27
+ YGU_UNDEFINED = 0;
28
+ YGU_POINT = 1;
29
+ YGU_PERCENT = 2;
30
+ YGU_AUTO = 3;
28
31
  }
29
32
 
30
33
  enum YGDirection {
31
- YGDirectionInherit = 0;
32
- YGDirectionLTR = 1;
33
- YGDirectionRTL = 2;
34
+ YGD_INHERIT = 0;
35
+ YGD_LTR = 1;
36
+ YGD_RTL = 2;
34
37
  }
35
38
 
36
39
  enum YGFlexDirection {
37
- YGFlexDirectionColumn = 0;
38
- YGFlexDirectionColumnReverse = 1;
39
- YGFlexDirectionRow = 2;
40
- YGFlexDirectionRowReverse = 3;
40
+ YGFD_COLUMN = 0;
41
+ YGFD_COLUMN_REVERSE = 1;
42
+ YGFD_ROW = 2;
43
+ YGFD_ROW_REVERSE = 3;
41
44
  }
42
45
 
43
46
  enum YGWrap {
44
- YGWrapNoWrap = 0;
45
- YGWrapWrap = 1;
46
- YGWrapWrapReverse = 2;
47
+ YGW_NO_WRAP = 0;
48
+ YGW_WRAP = 1;
49
+ YGW_WRAP_REVERSE = 2;
47
50
  }
48
51
 
49
52
  enum YGJustify {
50
- YGJustifyFlexStart = 0;
51
- YGJustifyCenter = 1;
52
- YGJustifyFlexEnd = 2;
53
- YGJustifySpaceBetween = 3;
54
- YGJustifySpaceAround = 4;
55
- YGJustifySpaceEvenly = 5;
53
+ YGJ_FLEX_START = 0;
54
+ YGJ_CENTER = 1;
55
+ YGJ_FLEX_END = 2;
56
+ YGJ_SPACE_BETWEEN = 3;
57
+ YGJ_SPACE_AROUND = 4;
58
+ YGJ_SPACE_EVENLY = 5;
56
59
  }
57
60
 
58
61
  enum YGOverflow {
59
- YGOverflowVisible = 0;
60
- YGOverflowHidden = 1;
61
- YGOverflowScroll = 2;
62
+ YGO_VISIBLE = 0;
63
+ YGO_HIDDEN = 1;
64
+ YGO_SCROLL = 2;
62
65
  }
63
66
 
64
67
  enum YGDisplay {
65
- YGDisplayFlex = 0;
66
- YGDisplayNone = 1;
68
+ YGD_FLEX = 0;
69
+ YGD_NONE = 1;
67
70
  }
68
71
 
69
72
  enum YGEdge {
70
- YGEdgeLeft = 0;
71
- YGEdgeTop = 1;
72
- YGEdgeRight = 2;
73
- YGEdgeBottom = 3;
74
- YGEdgeStart = 4;
75
- YGEdgeEnd = 5;
76
- YGEdgeHorizontal = 6;
77
- YGEdgeVertical = 7;
78
- YGEdgeAll = 8;
73
+ YGE_LEFT = 0;
74
+ YGE_TOP = 1;
75
+ YGE_RIGHT = 2;
76
+ YGE_BOTTOM = 3;
77
+ YGE_START = 4;
78
+ YGE_END = 5;
79
+ YGE_HORIZONTAL = 6;
80
+ YGE_VERTICAL = 7;
81
+ YGE_ALL = 8;
79
82
  }
80
83
 
81
84
  message PBUiTransform {
@@ -158,5 +161,3 @@ message PBUiTransform {
158
161
  reserved 77; // YGUnit border_bottom_unit = 77;
159
162
  float border_bottom = 78;
160
163
  }
161
-
162
-
@@ -0,0 +1,9 @@
1
+ syntax = "proto3";
2
+ package decentraland.sdk.components;
3
+
4
+ import "decentraland/sdk/components/common/id.proto";
5
+ option (common.ecs_component_id) = 1081;
6
+
7
+ message PBVisibilityComponent {
8
+ optional bool visible = 1; // default=true
9
+ }
@@ -8,9 +8,9 @@ function createCube(x: number, y: number, z: number, spawner = true): Entity {
8
8
  PointerEvents.create(meshEntity, {
9
9
  pointerEvents: [
10
10
  {
11
- eventType: PointerEventType.DOWN,
11
+ eventType: PointerEventType.PET_DOWN,
12
12
  eventInfo: {
13
- button: ActionButton.PRIMARY,
13
+ button: InputAction.IA_PRIMARY,
14
14
  hoverText: 'Press E to spawn',
15
15
  maxDistance: 100,
16
16
  showFeedback: true
@@ -41,7 +41,7 @@ function circularSystem(dt: number) {
41
41
  function spawnerSystem() {
42
42
  const clickedCubes = engine.getEntitiesWith(PointerEvents)
43
43
  for (const [entity] of clickedCubes) {
44
- if (wasEntityClicked(entity, ActionButton.PRIMARY)) {
44
+ if (wasEntityClicked(entity, InputAction.IA_PRIMARY)) {
45
45
  createCube(
46
46
  1 + Math.random() * 8,
47
47
  Math.random() * 8,
@@ -19,7 +19,7 @@ Material.create(createSphere(13, 1, 15), {
19
19
  roughness: 0.8,
20
20
 
21
21
  alphaTest: 0.2,
22
- transparencyMode: TransparencyMode.AlphaTest
22
+ transparencyMode: MaterialTransparencyMode.MTM_ALPHA_TEST
23
23
  })
24
24
 
25
25
  Material.create(createSphere(11, 1, 15), {
@@ -15,9 +15,9 @@ function createCube(
15
15
 
16
16
  createCube(15, 1, 15, [
17
17
  {
18
- eventType: PointerEventType.DOWN,
18
+ eventType: PointerEventType.PET_DOWN,
19
19
  eventInfo: {
20
- button: ActionButton.PRIMARY,
20
+ button: InputAction.IA_PRIMARY,
21
21
  hoverText: 'PrimaryDown',
22
22
  maxDistance: 5,
23
23
  showFeedback: true
@@ -27,9 +27,9 @@ createCube(15, 1, 15, [
27
27
 
28
28
  createCube(13, 1, 15, [
29
29
  {
30
- eventType: PointerEventType.UP,
30
+ eventType: PointerEventType.PET_UP,
31
31
  eventInfo: {
32
- button: ActionButton.SECONDARY,
32
+ button: InputAction.IA_SECONDARY,
33
33
  hoverText: 'Secondary Up',
34
34
  maxDistance: 5,
35
35
  showFeedback: true
@@ -39,9 +39,9 @@ createCube(13, 1, 15, [
39
39
 
40
40
  createCube(11, 1, 15, [
41
41
  {
42
- eventType: PointerEventType.HOVER_ENTER,
42
+ eventType: PointerEventType.PET_HOVER_ENTER,
43
43
  eventInfo: {
44
- button: ActionButton.ANY,
44
+ button: InputAction.IA_ANY,
45
45
  hoverText: 'Infinity Hover',
46
46
  maxDistance: 10000000,
47
47
  showFeedback: true
@@ -27,7 +27,7 @@ Raycast.createOrReplace(engine.addEntity(), {
27
27
  origin: Vector3.create(8, 1, 0),
28
28
  direction: Vector3.create(0, 0, 1),
29
29
  maxDistance: 16,
30
- queryType: RaycastQueryType.QUERY_ALL
30
+ queryType: RaycastQueryType.RQT_QUERY_ALL
31
31
  })
32
32
 
33
33
 
@@ -42,7 +42,7 @@ engine.addSystem((dt) => {
42
42
  origin: Vector3.create(8, 1, 0),
43
43
  direction: Vector3.create(0, 0, 1),
44
44
  maxDistance: 16,
45
- queryType: RaycastQueryType.HIT_FIRST
45
+ queryType: RaycastQueryType.RQT_HIT_FIRST
46
46
  })
47
47
  }
48
48
  }
@@ -26,7 +26,7 @@ Raycast.createOrReplace(engine.addEntity(), {
26
26
  origin: Vector3.create(8, 1, 0),
27
27
  direction: Vector3.create(0, 0, 1),
28
28
  maxDistance: 16,
29
- queryType: RaycastQueryType.HIT_FIRST
29
+ queryType: RaycastQueryType.RQT_HIT_FIRST
30
30
  })
31
31
 
32
32
 
@@ -19,9 +19,9 @@ export const uiComponent = () => (
19
19
  uiTransform={{
20
20
  width: 100,
21
21
  height: 100,
22
- display: YGDisplay.YGDisplayFlex,
23
- justifyContent: YGJustify.YGJustifyCenter,
24
- alignItems: YGAlign.YGAlignCenter
22
+ display: YGDisplay.YGD_FLEX,
23
+ justifyContent: YGJustify.YGJ_CENTER,
24
+ alignItems: YGAlign.YGA_CENTER
25
25
  }}
26
26
  uiBackground={{ backgroundColor: { r: 255, g: 45, b: 85, a: 0.2 } }}
27
27
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
- "version": "7.0.0-3220359277.commit-7cbadc7",
3
+ "version": "7.0.0-3244103998.commit-74d3f83",
4
4
  "description": "",
5
5
  "main": "dist/src/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -27,8 +27,8 @@
27
27
  "src/cli/**/*.js"
28
28
  ],
29
29
  "dependencies": {
30
- "@dcl/amd": "6.11.9-3220359277.commit-7cbadc7",
31
- "@dcl/build-ecs": "6.11.9-3220359277.commit-7cbadc7",
30
+ "@dcl/amd": "6.11.9-3244103998.commit-74d3f83",
31
+ "@dcl/build-ecs": "6.11.9-3244103998.commit-74d3f83",
32
32
  "@dcl/kernel": "1.0.0-2994874542.commit-c3ae489",
33
33
  "@dcl/posix": "^1.0.4",
34
34
  "@dcl/schemas": "4.8.0",
@@ -38,5 +38,5 @@
38
38
  "ignore": "^5.1.8"
39
39
  },
40
40
  "minCliVersion": "3.10.2",
41
- "commit": "7cbadc7e7d1e9d313b20a727b36631e025a2cc1e"
41
+ "commit": "74d3f83cd5983e1e00143bc9b583dd91ede60eb5"
42
42
  }