@dcl/protocol 1.0.0-4732850725.commit-c48ea0a → 1.0.0-4767865643.commit-3dc0529

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.
@@ -7,6 +7,13 @@ export interface BorderRect {
7
7
  right: number;
8
8
  bottom: number;
9
9
  }
10
+ /** Defines a rect with x, y, width and height */
11
+ export interface Rect {
12
+ x: number;
13
+ y: number;
14
+ width: number;
15
+ height: number;
16
+ }
10
17
  export declare const BorderRect: {
11
18
  encode(message: BorderRect, writer?: _m0.Writer): _m0.Writer;
12
19
  decode(input: _m0.Reader | Uint8Array, length?: number): BorderRect;
@@ -35,6 +42,34 @@ export declare const BorderRect: {
35
42
  bottom?: number | undefined;
36
43
  } & { [K_1 in Exclude<keyof I_1, keyof BorderRect>]: never; }>(object: I_1): BorderRect;
37
44
  };
45
+ export declare const Rect: {
46
+ encode(message: Rect, writer?: _m0.Writer): _m0.Writer;
47
+ decode(input: _m0.Reader | Uint8Array, length?: number): Rect;
48
+ fromJSON(object: any): Rect;
49
+ toJSON(message: Rect): unknown;
50
+ create<I extends {
51
+ x?: number | undefined;
52
+ y?: number | undefined;
53
+ width?: number | undefined;
54
+ height?: number | undefined;
55
+ } & {
56
+ x?: number | undefined;
57
+ y?: number | undefined;
58
+ width?: number | undefined;
59
+ height?: number | undefined;
60
+ } & { [K in Exclude<keyof I, keyof Rect>]: never; }>(base?: I | undefined): Rect;
61
+ fromPartial<I_1 extends {
62
+ x?: number | undefined;
63
+ y?: number | undefined;
64
+ width?: number | undefined;
65
+ height?: number | undefined;
66
+ } & {
67
+ x?: number | undefined;
68
+ y?: number | undefined;
69
+ width?: number | undefined;
70
+ height?: number | undefined;
71
+ } & { [K_1 in Exclude<keyof I_1, keyof Rect>]: never; }>(object: I_1): Rect;
72
+ };
38
73
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
39
74
  export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
40
75
  $case: string;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.BorderRect = exports.protobufPackage = void 0;
6
+ exports.Rect = exports.BorderRect = exports.protobufPackage = void 0;
7
7
  /* eslint-disable */
8
8
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
9
9
  exports.protobufPackage = "decentraland.common";
@@ -94,6 +94,93 @@ exports.BorderRect = {
94
94
  return message;
95
95
  },
96
96
  };
97
+ function createBaseRect() {
98
+ return { x: 0, y: 0, width: 0, height: 0 };
99
+ }
100
+ exports.Rect = {
101
+ encode(message, writer = minimal_1.default.Writer.create()) {
102
+ if (message.x !== 0) {
103
+ writer.uint32(13).float(message.x);
104
+ }
105
+ if (message.y !== 0) {
106
+ writer.uint32(21).float(message.y);
107
+ }
108
+ if (message.width !== 0) {
109
+ writer.uint32(29).float(message.width);
110
+ }
111
+ if (message.height !== 0) {
112
+ writer.uint32(37).float(message.height);
113
+ }
114
+ return writer;
115
+ },
116
+ decode(input, length) {
117
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
118
+ let end = length === undefined ? reader.len : reader.pos + length;
119
+ const message = createBaseRect();
120
+ while (reader.pos < end) {
121
+ const tag = reader.uint32();
122
+ switch (tag >>> 3) {
123
+ case 1:
124
+ if (tag != 13) {
125
+ break;
126
+ }
127
+ message.x = reader.float();
128
+ continue;
129
+ case 2:
130
+ if (tag != 21) {
131
+ break;
132
+ }
133
+ message.y = reader.float();
134
+ continue;
135
+ case 3:
136
+ if (tag != 29) {
137
+ break;
138
+ }
139
+ message.width = reader.float();
140
+ continue;
141
+ case 4:
142
+ if (tag != 37) {
143
+ break;
144
+ }
145
+ message.height = reader.float();
146
+ continue;
147
+ }
148
+ if ((tag & 7) == 4 || tag == 0) {
149
+ break;
150
+ }
151
+ reader.skipType(tag & 7);
152
+ }
153
+ return message;
154
+ },
155
+ fromJSON(object) {
156
+ return {
157
+ x: isSet(object.x) ? Number(object.x) : 0,
158
+ y: isSet(object.y) ? Number(object.y) : 0,
159
+ width: isSet(object.width) ? Number(object.width) : 0,
160
+ height: isSet(object.height) ? Number(object.height) : 0,
161
+ };
162
+ },
163
+ toJSON(message) {
164
+ const obj = {};
165
+ message.x !== undefined && (obj.x = message.x);
166
+ message.y !== undefined && (obj.y = message.y);
167
+ message.width !== undefined && (obj.width = message.width);
168
+ message.height !== undefined && (obj.height = message.height);
169
+ return obj;
170
+ },
171
+ create(base) {
172
+ return exports.Rect.fromPartial(base !== null && base !== void 0 ? base : {});
173
+ },
174
+ fromPartial(object) {
175
+ var _a, _b, _c, _d;
176
+ const message = createBaseRect();
177
+ message.x = (_a = object.x) !== null && _a !== void 0 ? _a : 0;
178
+ message.y = (_b = object.y) !== null && _b !== void 0 ? _b : 0;
179
+ message.width = (_c = object.width) !== null && _c !== void 0 ? _c : 0;
180
+ message.height = (_d = object.height) !== null && _d !== void 0 ? _d : 0;
181
+ return message;
182
+ },
183
+ };
97
184
  function isSet(value) {
98
185
  return value !== null && value !== undefined;
99
186
  }
@@ -1 +1 @@
1
- {"version":3,"file":"border_rect.gen.js","sourceRoot":"","sources":["../../../out-ts/decentraland/common/border_rect.gen.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,iEAAqC;AAExB,QAAA,eAAe,GAAG,qBAAqB,CAAC;AAUrD,SAAS,oBAAoB;IAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAClD,CAAC;AAEY,QAAA,UAAU,GAAG;IACxB,MAAM,CAAC,OAAmB,EAAE,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,EAAE;QAClE,I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AAc,EAAE,CAAC;QACjC,OAAO,CAAC,CAAC,GAAG,MAAA,MAAM,CAAC,CAAC,mCAAI,CAAC,CAAC;QAC1B,OAAO,CAAC,CAAC,GAAG,MAAA,MAAM,CAAC,CAAC,mCAAI,CAAC,CAAC;QAC1B,OAAO,CAAC,KAAK,GAAG,MAAA,MAAM,CAAC,KAAK,mCAAI,CAAC,CAAC;QAClC,OAAO,CAAC,MAAM,GAAG,MAAA,MAAM,CAAC,MAAM,mCAAI,CAAC,CAAC;QACpC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAC;AAcF,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}
@@ -58,9 +58,9 @@ export interface PBMeshCollider_BoxMesh {
58
58
  }
59
59
  /** CylinderMesh is a truncated cone shape that contains the Entity. */
60
60
  export interface PBMeshCollider_CylinderMesh {
61
- /** (default 1.0) */
61
+ /** (default 0.5) */
62
62
  radiusTop?: number | undefined;
63
- /** (default 1.0) */
63
+ /** (default 0.5) */
64
64
  radiusBottom?: number | undefined;
65
65
  }
66
66
  /** PlaneMesh is a 2D rectangle described by the Entity's Transform. */
@@ -32,9 +32,9 @@ export interface PBMeshRenderer_BoxMesh {
32
32
  }
33
33
  /** CylinderMesh renders a truncated cone shape. */
34
34
  export interface PBMeshRenderer_CylinderMesh {
35
- /** (default 1.0) */
35
+ /** (default 0.5) */
36
36
  radiusTop?: number | undefined;
37
- /** (default 1.0) */
37
+ /** (default 0.5) */
38
38
  radiusBottom?: number | undefined;
39
39
  }
40
40
  /** PlaneMesh renders a 2D rectangular shape. */
@@ -11,6 +11,14 @@ export interface BorderRect {
11
11
  bottom: number;
12
12
  }
13
13
 
14
+ /** Defines a rect with x, y, width and height */
15
+ export interface Rect {
16
+ x: number;
17
+ y: number;
18
+ width: number;
19
+ height: number;
20
+ }
21
+
14
22
  function createBaseBorderRect(): BorderRect {
15
23
  return { top: 0, left: 0, right: 0, bottom: 0 };
16
24
  }
@@ -108,6 +116,103 @@ export const BorderRect = {
108
116
  },
109
117
  };
110
118
 
119
+ function createBaseRect(): Rect {
120
+ return { x: 0, y: 0, width: 0, height: 0 };
121
+ }
122
+
123
+ export const Rect = {
124
+ encode(message: Rect, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
125
+ if (message.x !== 0) {
126
+ writer.uint32(13).float(message.x);
127
+ }
128
+ if (message.y !== 0) {
129
+ writer.uint32(21).float(message.y);
130
+ }
131
+ if (message.width !== 0) {
132
+ writer.uint32(29).float(message.width);
133
+ }
134
+ if (message.height !== 0) {
135
+ writer.uint32(37).float(message.height);
136
+ }
137
+ return writer;
138
+ },
139
+
140
+ decode(input: _m0.Reader | Uint8Array, length?: number): Rect {
141
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
142
+ let end = length === undefined ? reader.len : reader.pos + length;
143
+ const message = createBaseRect();
144
+ while (reader.pos < end) {
145
+ const tag = reader.uint32();
146
+ switch (tag >>> 3) {
147
+ case 1:
148
+ if (tag != 13) {
149
+ break;
150
+ }
151
+
152
+ message.x = reader.float();
153
+ continue;
154
+ case 2:
155
+ if (tag != 21) {
156
+ break;
157
+ }
158
+
159
+ message.y = reader.float();
160
+ continue;
161
+ case 3:
162
+ if (tag != 29) {
163
+ break;
164
+ }
165
+
166
+ message.width = reader.float();
167
+ continue;
168
+ case 4:
169
+ if (tag != 37) {
170
+ break;
171
+ }
172
+
173
+ message.height = reader.float();
174
+ continue;
175
+ }
176
+ if ((tag & 7) == 4 || tag == 0) {
177
+ break;
178
+ }
179
+ reader.skipType(tag & 7);
180
+ }
181
+ return message;
182
+ },
183
+
184
+ fromJSON(object: any): Rect {
185
+ return {
186
+ x: isSet(object.x) ? Number(object.x) : 0,
187
+ y: isSet(object.y) ? Number(object.y) : 0,
188
+ width: isSet(object.width) ? Number(object.width) : 0,
189
+ height: isSet(object.height) ? Number(object.height) : 0,
190
+ };
191
+ },
192
+
193
+ toJSON(message: Rect): unknown {
194
+ const obj: any = {};
195
+ message.x !== undefined && (obj.x = message.x);
196
+ message.y !== undefined && (obj.y = message.y);
197
+ message.width !== undefined && (obj.width = message.width);
198
+ message.height !== undefined && (obj.height = message.height);
199
+ return obj;
200
+ },
201
+
202
+ create<I extends Exact<DeepPartial<Rect>, I>>(base?: I): Rect {
203
+ return Rect.fromPartial(base ?? {});
204
+ },
205
+
206
+ fromPartial<I extends Exact<DeepPartial<Rect>, I>>(object: I): Rect {
207
+ const message = createBaseRect();
208
+ message.x = object.x ?? 0;
209
+ message.y = object.y ?? 0;
210
+ message.width = object.width ?? 0;
211
+ message.height = object.height ?? 0;
212
+ return message;
213
+ },
214
+ };
215
+
111
216
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
112
217
 
113
218
  export type DeepPartial<T> = T extends Builtin ? T
@@ -155,11 +155,11 @@ export interface PBMeshCollider_BoxMesh {
155
155
 
156
156
  /** CylinderMesh is a truncated cone shape that contains the Entity. */
157
157
  export interface PBMeshCollider_CylinderMesh {
158
- /** (default 1.0) */
158
+ /** (default 0.5) */
159
159
  radiusTop?:
160
160
  | number
161
161
  | undefined;
162
- /** (default 1.0) */
162
+ /** (default 0.5) */
163
163
  radiusBottom?: number | undefined;
164
164
  }
165
165
 
@@ -28,11 +28,11 @@ export interface PBMeshRenderer_BoxMesh {
28
28
 
29
29
  /** CylinderMesh renders a truncated cone shape. */
30
30
  export interface PBMeshRenderer_CylinderMesh {
31
- /** (default 1.0) */
31
+ /** (default 0.5) */
32
32
  radiusTop?:
33
33
  | number
34
34
  | undefined;
35
- /** (default 1.0) */
35
+ /** (default 0.5) */
36
36
  radiusBottom?: number | undefined;
37
37
  }
38
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/protocol",
3
- "version": "1.0.0-4732850725.commit-c48ea0a",
3
+ "version": "1.0.0-4767865643.commit-3dc0529",
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": "c48ea0aa00d8173084571552463a6a05a7f49636"
29
+ "commit": "3dc052937891c6bc80fa0da7b9292c1946f2458e"
30
30
  }
@@ -6,5 +6,13 @@ message BorderRect {
6
6
  float top = 1;
7
7
  float left = 2;
8
8
  float right = 3;
9
- float bottom = 4;
9
+ float bottom = 4;
10
+ }
11
+
12
+ // Defines a rect with x, y, width and height
13
+ message Rect {
14
+ float x = 1;
15
+ float y = 2;
16
+ float width = 3;
17
+ float height = 4;
10
18
  }
@@ -20,8 +20,8 @@ message PBMeshCollider {
20
20
 
21
21
  // CylinderMesh is a truncated cone shape that contains the Entity.
22
22
  message CylinderMesh {
23
- optional float radius_top = 1; // (default 1.0)
24
- optional float radius_bottom = 2; // (default 1.0)
23
+ optional float radius_top = 1; // (default 0.5)
24
+ optional float radius_bottom = 2; // (default 0.5)
25
25
  }
26
26
 
27
27
  // PlaneMesh is a 2D rectangle described by the Entity's Transform.
@@ -21,8 +21,8 @@ message PBMeshRenderer {
21
21
 
22
22
  // CylinderMesh renders a truncated cone shape.
23
23
  message CylinderMesh {
24
- optional float radius_top = 1; // (default 1.0)
25
- optional float radius_bottom = 2; // (default 1.0)
24
+ optional float radius_top = 1; // (default 0.5)
25
+ optional float radius_bottom = 2; // (default 0.5)
26
26
  }
27
27
 
28
28
  // PlaneMesh renders a 2D rectangular shape.
@@ -22,12 +22,12 @@ enum BackgroundTextureMode {
22
22
  // https://docs.unity3d.com/Manual/9SliceSprites.html
23
23
  // https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice
24
24
  NINE_SLICES = 0;
25
-
25
+
26
26
  // CENTER enables the texture to be rendered centered in relation to the
27
27
  // element. If the element is smaller than the texture then the background
28
28
  // should use the element as stencil to cut off the out-of-bounds area
29
29
  CENTER = 1;
30
-
30
+
31
31
  // STRETCH enables the texture to cover all the area of the container,
32
32
  // adopting its aspect ratio.
33
33
  STRETCH = 2;
@@ -0,0 +1,24 @@
1
+ syntax = "proto3";
2
+
3
+ package decentraland.sdk.components;
4
+
5
+ import "decentraland/common/border_rect.proto";
6
+
7
+ import "decentraland/sdk/components/common/id.proto";
8
+ option (common.ecs_component_id) = 1054;
9
+
10
+ // This component is created by the renderer and used by the scenes to know the resolution of the UI canvas
11
+ message PBUiCanvasInformation {
12
+ // informs the scene about the resolution used for the UI rendering
13
+ float device_pixel_ratio = 1;
14
+ // informs about the width of the canvas, in virtual pixels. this value does not change when the pixel ratio changes.
15
+ int32 width = 2;
16
+ // informs about the height of the canvas, in virtual pixels. this value does not change when the pixel ratio changes.
17
+ int32 height = 3;
18
+ // informs the sdk about the interactable area. some implementations may change
19
+ // this area depending on the HUD that is being shown. this value may change at
20
+ // any time by the Renderer to create reactive UIs. as an example, an explorer with the
21
+ // chat UI hidden and with no minimap could have a rect that covers the whole screen.
22
+ // on the contrary, if the chat UI is shown, the rect would be smaller.
23
+ decentraland.common.BorderRect interactable_area = 4;
24
+ }