@dcl/protocol 1.0.0-4722055345.commit-0633ea8 → 1.0.0-4747376947.commit-d770e0d
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/border_rect.gen.d.ts +35 -0
- package/out-js/decentraland/common/border_rect.gen.js +88 -1
- package/out-js/decentraland/common/border_rect.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/billboard.gen.d.ts +4 -1
- package/out-js/decentraland/sdk/components/billboard.gen.js +4 -1
- package/out-js/decentraland/sdk/components/billboard.gen.js.map +1 -1
- package/out-ts/decentraland/common/border_rect.gen.ts +105 -0
- package/out-ts/decentraland/sdk/components/billboard.gen.ts +4 -1
- package/package.json +2 -2
- package/proto/decentraland/common/border_rect.proto +9 -1
- package/proto/decentraland/sdk/components/billboard.proto +2 -0
- package/proto/decentraland/sdk/components/ui_background.proto +2 -2
- package/proto/decentraland/sdk/components/ui_canvas_information.proto +24 -0
|
@@ -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,oBAA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cAAJ,IAAI,GAAI,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,WAAW,CAAwC,MAAS;;QAC1D,MAAM,OAAO,GAAG,cAAc,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"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
export declare const protobufPackage = "decentraland.sdk.components";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form.
|
|
5
|
+
* Only the values below and the (BM_X | BM_Y) combination are valid.
|
|
6
|
+
*/
|
|
4
7
|
export declare enum BillboardMode {
|
|
5
8
|
BM_NONE = 0,
|
|
6
9
|
BM_X = 1,
|
|
@@ -7,7 +7,10 @@ exports.PBBillboard = exports.billboardModeToJSON = exports.billboardModeFromJSO
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
9
|
exports.protobufPackage = "decentraland.sdk.components";
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form.
|
|
12
|
+
* Only the values below and the (BM_X | BM_Y) combination are valid.
|
|
13
|
+
*/
|
|
11
14
|
var BillboardMode;
|
|
12
15
|
(function (BillboardMode) {
|
|
13
16
|
BillboardMode[BillboardMode["BM_NONE"] = 0] = "BM_NONE";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billboard.gen.js","sourceRoot":"","sources":["../../../../out-ts/decentraland/sdk/components/billboard.gen.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,iEAAqC;AAExB,QAAA,eAAe,GAAG,6BAA6B,CAAC;AAE7D
|
|
1
|
+
{"version":3,"file":"billboard.gen.js","sourceRoot":"","sources":["../../../../out-ts/decentraland/sdk/components/billboard.gen.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,iEAAqC;AAExB,QAAA,eAAe,GAAG,6BAA6B,CAAC;AAE7D;;;GAGG;AACH,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,uDAAW,CAAA;IACX,iDAAQ,CAAA;IACR,iDAAQ,CAAA;IACR,iDAAQ,CAAA;IACR,sDAAsD;IACtD,qDAAU,CAAA;IACV,kEAAiB,CAAA;AACnB,CAAC,EARW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAQxB;AAED,SAAgB,qBAAqB,CAAC,MAAW;IAC/C,QAAQ,MAAM,EAAE;QACd,KAAK,CAAC,CAAC;QACP,KAAK,SAAS;YACZ,OAAO,aAAa,CAAC,OAAO,CAAC;QAC/B,KAAK,CAAC,CAAC;QACP,KAAK,MAAM;YACT,OAAO,aAAa,CAAC,IAAI,CAAC;QAC5B,KAAK,CAAC,CAAC;QACP,KAAK,MAAM;YACT,OAAO,aAAa,CAAC,IAAI,CAAC;QAC5B,KAAK,CAAC,CAAC;QACP,KAAK,MAAM;YACT,OAAO,aAAa,CAAC,IAAI,CAAC;QAC5B,KAAK,CAAC,CAAC;QACP,KAAK,QAAQ;YACX,OAAO,aAAa,CAAC,MAAM,CAAC;QAC9B,KAAK,CAAC,CAAC,CAAC;QACR,KAAK,cAAc,CAAC;QACpB;YACE,OAAO,aAAa,CAAC,YAAY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QAC1D,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"}
|
|
@@ -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
|
|
@@ -3,7 +3,10 @@ import _m0 from "protobufjs/minimal";
|
|
|
3
3
|
|
|
4
4
|
export const protobufPackage = "decentraland.sdk.components";
|
|
5
5
|
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form.
|
|
8
|
+
* Only the values below and the (BM_X | BM_Y) combination are valid.
|
|
9
|
+
*/
|
|
7
10
|
export enum BillboardMode {
|
|
8
11
|
BM_NONE = 0,
|
|
9
12
|
BM_X = 1,
|
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-4747376947.commit-d770e0d",
|
|
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": "
|
|
29
|
+
"commit": "d770e0d172c2f17472d73031f6be857cfd9b8ed0"
|
|
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
|
}
|
|
@@ -4,6 +4,7 @@ package decentraland.sdk.components;
|
|
|
4
4
|
|
|
5
5
|
import "decentraland/sdk/components/common/id.proto";
|
|
6
6
|
|
|
7
|
+
// https://adr.decentraland.org/adr/ADR-198
|
|
7
8
|
option (common.ecs_component_id) = 1090;
|
|
8
9
|
|
|
9
10
|
// The Billboard component makes an Entity automatically reorient its rotation to face the camera.
|
|
@@ -17,6 +18,7 @@ message PBBillboard {
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
// BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form.
|
|
21
|
+
// Only the values below and the (BM_X | BM_Y) combination are valid.
|
|
20
22
|
enum BillboardMode {
|
|
21
23
|
BM_NONE = 0;
|
|
22
24
|
BM_X = 1;
|
|
@@ -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
|
+
}
|