@dcl/ecs 7.1.7 → 7.1.8-4754660154.commit-c71195f

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.
@@ -0,0 +1,25 @@
1
+ import { PBUiCanvasInformation } from './pb/decentraland/sdk/components/ui_canvas_information.gen';
2
+ /**
3
+ * @internal
4
+ */
5
+ export const UiCanvasInformationSchema = {
6
+ COMPONENT_ID: 1054,
7
+ serialize(value, builder) {
8
+ const writer = PBUiCanvasInformation.encode(value);
9
+ const buffer = new Uint8Array(writer.finish(), 0, writer.len);
10
+ builder.writeBuffer(buffer, false);
11
+ },
12
+ deserialize(reader) {
13
+ return PBUiCanvasInformation.decode(reader.buffer(), reader.remainingBytes());
14
+ },
15
+ create() {
16
+ // TODO: this is a hack.
17
+ return PBUiCanvasInformation.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBUiCanvasInformation"
24
+ }
25
+ };
@@ -24,6 +24,7 @@ export const coreComponentMappings = {
24
24
  "core::RaycastResult": 1068,
25
25
  "core::TextShape": 1030,
26
26
  "core::UiBackground": 1053,
27
+ "core::UiCanvasInformation": 1054,
27
28
  "core::UiDropdown": 1094,
28
29
  "core::UiDropdownResult": 1096,
29
30
  "core::UiInput": 1093,
@@ -17,6 +17,7 @@ import { PBRaycast } from './pb/decentraland/sdk/components/raycast.gen';
17
17
  import { PBRaycastResult } from './pb/decentraland/sdk/components/raycast_result.gen';
18
18
  import { PBTextShape } from './pb/decentraland/sdk/components/text_shape.gen';
19
19
  import { PBUiBackground } from './pb/decentraland/sdk/components/ui_background.gen';
20
+ import { PBUiCanvasInformation } from './pb/decentraland/sdk/components/ui_canvas_information.gen';
20
21
  import { PBUiDropdown } from './pb/decentraland/sdk/components/ui_dropdown.gen';
21
22
  import { PBUiDropdownResult } from './pb/decentraland/sdk/components/ui_dropdown_result.gen';
22
23
  import { PBUiInput } from './pb/decentraland/sdk/components/ui_input.gen';
@@ -42,6 +43,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
42
43
  /** @public */ export declare const RaycastResult: LastWriteWinElementSetComponentDefinition<PBRaycastResult>;
43
44
  /** @public */ export declare const TextShape: LastWriteWinElementSetComponentDefinition<PBTextShape>;
44
45
  /** @public */ export declare const UiBackground: LastWriteWinElementSetComponentDefinition<PBUiBackground>;
46
+ /** @public */ export declare const UiCanvasInformation: LastWriteWinElementSetComponentDefinition<PBUiCanvasInformation>;
45
47
  /** @public */ export declare const UiDropdown: LastWriteWinElementSetComponentDefinition<PBUiDropdown>;
46
48
  /** @public */ export declare const UiDropdownResult: LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>;
47
49
  /** @public */ export declare const UiInput: LastWriteWinElementSetComponentDefinition<PBUiInput>;
@@ -18,6 +18,7 @@ export * from './index.gen';
18
18
  /** @public */ export const RaycastResult = /* @__PURE__ */ components.RaycastResult(engine);
19
19
  /** @public */ export const TextShape = /* @__PURE__ */ components.TextShape(engine);
20
20
  /** @public */ export const UiBackground = /* @__PURE__ */ components.UiBackground(engine);
21
+ /** @public */ export const UiCanvasInformation = /* @__PURE__ */ components.UiCanvasInformation(engine);
21
22
  /** @public */ export const UiDropdown = /* @__PURE__ */ components.UiDropdown(engine);
22
23
  /** @public */ export const UiDropdownResult = /* @__PURE__ */ components.UiDropdownResult(engine);
23
24
  /** @public */ export const UiInput = /* @__PURE__ */ components.UiInput(engine);
@@ -21,6 +21,7 @@ import { PBRaycast } from './pb/decentraland/sdk/components/raycast.gen';
21
21
  import { PBRaycastResult } from './pb/decentraland/sdk/components/raycast_result.gen';
22
22
  import { PBTextShape } from './pb/decentraland/sdk/components/text_shape.gen';
23
23
  import { PBUiBackground } from './pb/decentraland/sdk/components/ui_background.gen';
24
+ import { PBUiCanvasInformation } from './pb/decentraland/sdk/components/ui_canvas_information.gen';
24
25
  import { PBUiDropdown } from './pb/decentraland/sdk/components/ui_dropdown.gen';
25
26
  import { PBUiDropdownResult } from './pb/decentraland/sdk/components/ui_dropdown_result.gen';
26
27
  import { PBUiInput } from './pb/decentraland/sdk/components/ui_input.gen';
@@ -50,6 +51,7 @@ export * from './pb/decentraland/sdk/components/raycast.gen';
50
51
  export * from './pb/decentraland/sdk/components/raycast_result.gen';
51
52
  export * from './pb/decentraland/sdk/components/text_shape.gen';
52
53
  export * from './pb/decentraland/sdk/components/ui_background.gen';
54
+ export * from './pb/decentraland/sdk/components/ui_canvas_information.gen';
53
55
  export * from './pb/decentraland/sdk/components/ui_dropdown.gen';
54
56
  export * from './pb/decentraland/sdk/components/ui_dropdown_result.gen';
55
57
  export * from './pb/decentraland/sdk/components/ui_input.gen';
@@ -81,6 +83,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
81
83
  /** @public */ export declare const RaycastResult: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
82
84
  /** @public */ export declare const TextShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
83
85
  /** @public */ export declare const UiBackground: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiBackground>>;
86
+ /** @public */ export declare const UiCanvasInformation: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiCanvasInformation>>;
84
87
  /** @public */ export declare const UiDropdown: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
85
88
  /** @public */ export declare const UiDropdownResult: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
86
89
  /** @public */ export declare const UiInput: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
@@ -112,6 +115,7 @@ export declare const componentDefinitionByName: {
112
115
  "core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
113
116
  "core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
114
117
  "core::UiBackground": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiBackground>>;
118
+ "core::UiCanvasInformation": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiCanvasInformation>>;
115
119
  "core::UiDropdown": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
116
120
  "core::UiDropdownResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
117
121
  "core::UiInput": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
@@ -19,6 +19,7 @@ import { RaycastSchema } from './Raycast.gen';
19
19
  import { RaycastResultSchema } from './RaycastResult.gen';
20
20
  import { TextShapeSchema } from './TextShape.gen';
21
21
  import { UiBackgroundSchema } from './UiBackground.gen';
22
+ import { UiCanvasInformationSchema } from './UiCanvasInformation.gen';
22
23
  import { UiDropdownSchema } from './UiDropdown.gen';
23
24
  import { UiDropdownResultSchema } from './UiDropdownResult.gen';
24
25
  import { UiInputSchema } from './UiInput.gen';
@@ -48,6 +49,7 @@ export * from './pb/decentraland/sdk/components/raycast.gen';
48
49
  export * from './pb/decentraland/sdk/components/raycast_result.gen';
49
50
  export * from './pb/decentraland/sdk/components/text_shape.gen';
50
51
  export * from './pb/decentraland/sdk/components/ui_background.gen';
52
+ export * from './pb/decentraland/sdk/components/ui_canvas_information.gen';
51
53
  export * from './pb/decentraland/sdk/components/ui_dropdown.gen';
52
54
  export * from './pb/decentraland/sdk/components/ui_dropdown_result.gen';
53
55
  export * from './pb/decentraland/sdk/components/ui_input.gen';
@@ -100,6 +102,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
100
102
  /* @__PURE__ */ engine.defineComponentFromSchema("core::TextShape", TextShapeSchema);
101
103
  /** @public */ export const UiBackground = engine =>
102
104
  /* @__PURE__ */ engine.defineComponentFromSchema("core::UiBackground", UiBackgroundSchema);
105
+ /** @public */ export const UiCanvasInformation = engine =>
106
+ /* @__PURE__ */ engine.defineComponentFromSchema("core::UiCanvasInformation", UiCanvasInformationSchema);
103
107
  /** @public */ export const UiDropdown = engine =>
104
108
  /* @__PURE__ */ engine.defineComponentFromSchema("core::UiDropdown", UiDropdownSchema);
105
109
  /** @public */ export const UiDropdownResult = engine =>
@@ -139,6 +143,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
139
143
  "core::RaycastResult": RaycastResult,
140
144
  "core::TextShape": TextShape,
141
145
  "core::UiBackground": UiBackground,
146
+ "core::UiCanvasInformation": UiCanvasInformation,
142
147
  "core::UiDropdown": UiDropdown,
143
148
  "core::UiDropdownResult": UiDropdownResult,
144
149
  "core::UiInput": UiInput,
@@ -8,3 +8,13 @@ export interface BorderRect {
8
8
  right: number;
9
9
  bottom: number;
10
10
  }
11
+ /** Defines a rect with x, y, width and height */
12
+ /**
13
+ * @public
14
+ */
15
+ export interface Rect {
16
+ x: number;
17
+ y: number;
18
+ width: number;
19
+ height: number;
20
+ }
@@ -66,3 +66,68 @@ export const BorderRect = {
66
66
  return message;
67
67
  },
68
68
  };
69
+ function createBaseRect() {
70
+ return { x: 0, y: 0, width: 0, height: 0 };
71
+ }
72
+ /**
73
+ * @public
74
+ */
75
+ /**
76
+ * @internal
77
+ */
78
+ export const Rect = {
79
+ encode(message, writer = _m0.Writer.create()) {
80
+ if (message.x !== 0) {
81
+ writer.uint32(13).float(message.x);
82
+ }
83
+ if (message.y !== 0) {
84
+ writer.uint32(21).float(message.y);
85
+ }
86
+ if (message.width !== 0) {
87
+ writer.uint32(29).float(message.width);
88
+ }
89
+ if (message.height !== 0) {
90
+ writer.uint32(37).float(message.height);
91
+ }
92
+ return writer;
93
+ },
94
+ decode(input, length) {
95
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
96
+ let end = length === undefined ? reader.len : reader.pos + length;
97
+ const message = createBaseRect();
98
+ while (reader.pos < end) {
99
+ const tag = reader.uint32();
100
+ switch (tag >>> 3) {
101
+ case 1:
102
+ if (tag != 13) {
103
+ break;
104
+ }
105
+ message.x = reader.float();
106
+ continue;
107
+ case 2:
108
+ if (tag != 21) {
109
+ break;
110
+ }
111
+ message.y = reader.float();
112
+ continue;
113
+ case 3:
114
+ if (tag != 29) {
115
+ break;
116
+ }
117
+ message.width = reader.float();
118
+ continue;
119
+ case 4:
120
+ if (tag != 37) {
121
+ break;
122
+ }
123
+ message.height = reader.float();
124
+ continue;
125
+ }
126
+ if ((tag & 7) == 4 || tag == 0) {
127
+ break;
128
+ }
129
+ reader.skipType(tag & 7);
130
+ }
131
+ return message;
132
+ },
133
+ };
@@ -1,4 +1,7 @@
1
- /** BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form. */
1
+ /**
2
+ * BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form.
3
+ * Only the values below and the (BM_X | BM_Y) combination are valid.
4
+ */
2
5
  /**
3
6
  * @public
4
7
  */
@@ -1,7 +1,10 @@
1
1
  /* eslint-disable */
2
2
  import _m0 from "protobufjs/minimal";
3
3
  const protobufPackageSarasa = "decentraland.sdk.components";
4
- /** BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form. */
4
+ /**
5
+ * BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form.
6
+ * Only the values below and the (BM_X | BM_Y) combination are valid.
7
+ */
5
8
  /**
6
9
  * @public
7
10
  */
@@ -40,7 +40,7 @@ function createBasePBMeshCollider() {
40
40
  export const PBMeshCollider = {
41
41
  encode(message, writer = _m0.Writer.create()) {
42
42
  if (message.collisionMask !== undefined) {
43
- writer.uint32(8).int32(message.collisionMask);
43
+ writer.uint32(8).uint32(message.collisionMask);
44
44
  }
45
45
  switch (message.mesh?.$case) {
46
46
  case "box":
@@ -69,7 +69,7 @@ export const PBMeshCollider = {
69
69
  if (tag != 8) {
70
70
  break;
71
71
  }
72
- message.collisionMask = reader.int32();
72
+ message.collisionMask = reader.uint32();
73
73
  continue;
74
74
  case 2:
75
75
  if (tag != 18) {
@@ -50,6 +50,6 @@ export interface PBRaycast {
50
50
  * otherwise it will be performed only once, defaults to false
51
51
  */
52
52
  continuous?: boolean | undefined;
53
- /** Collision mask, by default all bits are 1 (0xFFFF_FFFF) */
53
+ /** Collision mask, by default CL_POINTER | CL_PHYSICS */
54
54
  collisionMask?: number | undefined;
55
55
  }
@@ -0,0 +1,21 @@
1
+ import { BorderRect } from "../../common/border_rect.gen";
2
+ /** This component is created by the renderer and used by the scenes to know the resolution of the UI canvas */
3
+ /**
4
+ * @public
5
+ */
6
+ export interface PBUiCanvasInformation {
7
+ /** informs the scene about the resolution used for the UI rendering */
8
+ devicePixelRatio: number;
9
+ /** informs about the width of the canvas, in virtual pixels. this value does not change when the pixel ratio changes. */
10
+ width: number;
11
+ /** informs about the height of the canvas, in virtual pixels. this value does not change when the pixel ratio changes. */
12
+ height: number;
13
+ /**
14
+ * informs the sdk about the interactable area. some implementations may change
15
+ * this area depending on the HUD that is being shown. this value may change at
16
+ * any time by the Renderer to create reactive UIs. as an example, an explorer with the
17
+ * chat UI hidden and with no minimap could have a rect that covers the whole screen.
18
+ * on the contrary, if the chat UI is shown, the rect would be smaller.
19
+ */
20
+ interactableArea: BorderRect | undefined;
21
+ }
@@ -0,0 +1,69 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ import { BorderRect } from "../../common/border_rect.gen";
4
+ const protobufPackageSarasa = "decentraland.sdk.components";
5
+ function createBasePBUiCanvasInformation() {
6
+ return { devicePixelRatio: 0, width: 0, height: 0, interactableArea: undefined };
7
+ }
8
+ /**
9
+ * @public
10
+ */
11
+ /**
12
+ * @internal
13
+ */
14
+ export const PBUiCanvasInformation = {
15
+ encode(message, writer = _m0.Writer.create()) {
16
+ if (message.devicePixelRatio !== 0) {
17
+ writer.uint32(13).float(message.devicePixelRatio);
18
+ }
19
+ if (message.width !== 0) {
20
+ writer.uint32(16).int32(message.width);
21
+ }
22
+ if (message.height !== 0) {
23
+ writer.uint32(24).int32(message.height);
24
+ }
25
+ if (message.interactableArea !== undefined) {
26
+ BorderRect.encode(message.interactableArea, writer.uint32(34).fork()).ldelim();
27
+ }
28
+ return writer;
29
+ },
30
+ decode(input, length) {
31
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
32
+ let end = length === undefined ? reader.len : reader.pos + length;
33
+ const message = createBasePBUiCanvasInformation();
34
+ while (reader.pos < end) {
35
+ const tag = reader.uint32();
36
+ switch (tag >>> 3) {
37
+ case 1:
38
+ if (tag != 13) {
39
+ break;
40
+ }
41
+ message.devicePixelRatio = reader.float();
42
+ continue;
43
+ case 2:
44
+ if (tag != 16) {
45
+ break;
46
+ }
47
+ message.width = reader.int32();
48
+ continue;
49
+ case 3:
50
+ if (tag != 24) {
51
+ break;
52
+ }
53
+ message.height = reader.int32();
54
+ continue;
55
+ case 4:
56
+ if (tag != 34) {
57
+ break;
58
+ }
59
+ message.interactableArea = BorderRect.decode(reader, reader.uint32());
60
+ continue;
61
+ }
62
+ if ((tag & 7) == 4 || tag == 0) {
63
+ break;
64
+ }
65
+ reader.skipType(tag & 7);
66
+ }
67
+ return message;
68
+ },
69
+ };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dcl/ecs",
3
3
  "description": "Decentraland ECS",
4
- "version": "7.1.7",
4
+ "version": "7.1.8-4754660154.commit-c71195f",
5
5
  "author": "DCL",
6
6
  "bugs": "https://github.com/decentraland/ecs/issues",
7
7
  "dependencies": {
8
- "@dcl/js-runtime": "7.1.7"
8
+ "@dcl/js-runtime": "7.1.8-4754660154.commit-c71195f"
9
9
  },
10
10
  "devDependencies": {
11
11
  "ts-proto": "^1.122.0"
@@ -34,5 +34,5 @@
34
34
  },
35
35
  "types": "./dist/index.d.ts",
36
36
  "typings": "./dist/index.d.ts",
37
- "commit": "00dea083dd792e14effb4dec74b29c0a192e0c24"
37
+ "commit": "c71195f6e708e855abfe040105e16d1af012a719"
38
38
  }