@dcl/sdk 7.0.0-2637795719.commit-7dd5361 → 7.0.0-2652177259.commit-d1b36b1

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,9 @@
1
+ syntax = "proto3";
2
+
3
+ import "common/id.proto";
4
+ option (ecs_component_id) = 1073;
5
+
6
+ message PBAvatarAttach {
7
+ string avatar_id = 1;
8
+ int32 anchor_point_id = 2;
9
+ }
@@ -0,0 +1,15 @@
1
+ syntax = "proto3";
2
+
3
+ import "common/id.proto";
4
+ option (ecs_component_id) = 1070;
5
+ import "common/Vector3.proto";
6
+
7
+ message PBAvatarModifierArea {
8
+ Vector3 area = 1;
9
+ repeated string exclude_ids = 2;
10
+ repeated Modifier modifiers = 3;
11
+ enum Modifier {
12
+ HIDE_AVATARS = 0;
13
+ DISABLE_PASSPORTS = 1;
14
+ }
15
+ }
@@ -0,0 +1,20 @@
1
+ syntax = "proto3";
2
+
3
+ import "common/id.proto";
4
+ option (ecs_component_id) = 1080;
5
+ import "common/Color3.proto";
6
+
7
+ message PBAvatarShape {
8
+ string id = 1;
9
+ string name = 2;
10
+ string body_shape = 3;
11
+ Color3 skin_color = 4;
12
+ Color3 hair_color = 5;
13
+ Color3 eye_color = 6;
14
+ repeated string wearables = 7;
15
+ string expression_trigger_id = 8;
16
+ int64 expression_trigger_timestamp = 9;
17
+ string sticker_trigger_id = 10;
18
+ int64 sticker_trigger_timestamp = 11;
19
+ bool talking = 12;
20
+ }
@@ -0,0 +1,10 @@
1
+ syntax = "proto3";
2
+
3
+ import "common/id.proto";
4
+ option (ecs_component_id) = 1090;
5
+
6
+ message PBBillboard {
7
+ bool x = 1;
8
+ bool y = 2;
9
+ bool z = 3;
10
+ }
@@ -3,10 +3,9 @@ syntax = "proto3";
3
3
  import "common/id.proto";
4
4
  option (ecs_component_id) = 1013;
5
5
 
6
- message PBBoxShape {
6
+ message PBBoxShape {
7
7
  bool with_collisions = 1;
8
8
  bool is_pointer_blocker = 2;
9
- // TODO: should visible be another component? that maybe affects all the entities
10
9
  bool visible = 3;
11
10
  repeated float uvs = 4;
12
11
  }
@@ -0,0 +1,14 @@
1
+ syntax = "proto3";
2
+
3
+ import "common/id.proto";
4
+ option (ecs_component_id) = 1071;
5
+ import "common/Vector3.proto";
6
+
7
+ message PBCameraModeArea {
8
+ Vector3 area = 1;
9
+ CameraMode mode = 2;
10
+ enum CameraMode {
11
+ FIRST_PERSON = 0;
12
+ THIRD_PERSON = 1;
13
+ }
14
+ }
@@ -3,10 +3,9 @@
3
3
  import "common/id.proto";
4
4
  option (ecs_component_id) = 1016;
5
5
 
6
- message PBCylinderShape {
6
+ message PBCylinderShape {
7
7
  bool with_collisions = 1;
8
8
  bool is_pointer_blocker = 2;
9
- // TODO: should visible be another component? that maybe affects all the entities
10
9
  bool visible = 3;
11
10
  float radius_top = 4;
12
11
  float radius_bottom = 5;
@@ -8,7 +8,6 @@ import "common/Color3.proto";
8
8
  message PBNFTShape {
9
9
  bool with_collisions = 1;
10
10
  bool is_pointer_blocker = 2;
11
- // TODO: should visible be another component? that maybe affects all the entities
12
11
  bool visible = 3;
13
12
  string src = 4;
14
13
  string asset_id = 5;
@@ -3,11 +3,9 @@
3
3
  import "common/id.proto";
4
4
  option (ecs_component_id) = 1014;
5
5
 
6
- message PBPlaneShape {
6
+ message PBPlaneShape {
7
7
  bool with_collisions = 1;
8
8
  bool is_pointer_blocker = 2;
9
- // TODO: should visible be another component? that maybe affects all the entities
10
9
  bool visible = 3;
11
- // TODO: this could be better serialized as u00 v00 u01 v01 u10 v10 u11 v11 for speed
12
10
  repeated float uvs = 4;
13
11
  }
@@ -29,4 +29,4 @@ The definition must be the minimal proto code, and it shouldn't have a specific
29
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
30
 
31
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!
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!
@@ -3,7 +3,7 @@
3
3
  import "common/id.proto";
4
4
  option (ecs_component_id) = 1015;
5
5
 
6
- message PBSphereShape {
6
+ message PBSphereShape {
7
7
  bool with_collisions = 1;
8
8
  bool is_pointer_blocker = 2;
9
9
  bool visible = 3;
@@ -7,13 +7,11 @@ import "common/Color3.proto";
7
7
 
8
8
  message PBTextShape {
9
9
  string text = 1;
10
-
11
- // this should be removed
12
10
  bool visible = 2;
13
11
  string font = 3;
14
12
  float opacity = 4;
15
- float font_size = 5;
16
- bool font_auto_size = 6;
13
+ float font_Size = 5;
14
+ bool font_autoSize = 6;
17
15
  string h_text_align = 7;
18
16
  string v_text_align = 8;
19
17
  float width = 9;
@@ -26,10 +24,10 @@ message PBTextShape {
26
24
  int32 line_count = 16;
27
25
  bool text_wrapping = 17;
28
26
  float shadow_blur = 18;
29
- float shadow_offset_x = 19;
30
- float shadow_offset_y = 20;
27
+ float shadow_offsetX = 19;
28
+ float shadow_offsetY = 20;
31
29
  float outline_width = 21;
32
30
  Color3 shadow_color = 22;
33
31
  Color3 outline_color = 23;
34
32
  Color3 text_color = 24;
35
- }
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
- "version": "7.0.0-2637795719.commit-7dd5361",
3
+ "version": "7.0.0-2652177259.commit-d1b36b1",
4
4
  "description": "",
5
5
  "main": "dist/src/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -27,9 +27,9 @@
27
27
  "src/cli/**/*.js"
28
28
  ],
29
29
  "dependencies": {
30
- "@dcl/amd": "6.11.4-2637795719.commit-7dd5361",
31
- "@dcl/build-ecs": "6.11.4-2637795719.commit-7dd5361",
32
- "@dcl/kernel": "^1.0.0-2625011593.commit-d45c691",
30
+ "@dcl/amd": "6.11.4-2652177259.commit-d1b36b1",
31
+ "@dcl/build-ecs": "6.11.4-2652177259.commit-d1b36b1",
32
+ "@dcl/kernel": "1.0.0-2638443584.commit-696a74b",
33
33
  "@dcl/posix": "^1.0.4",
34
34
  "@dcl/schemas": "4.8.0",
35
35
  "@dcl/unity-renderer": "^1.0.40531-20220621125654.commit-472137e",
@@ -38,5 +38,5 @@
38
38
  "ignore": "^5.1.8"
39
39
  },
40
40
  "minCliVersion": "3.10.2",
41
- "commit": "7dd5361a5785cfaa4ccde3a930af9a4f27705d03"
41
+ "commit": "d1b36b16a1e1832ac4837d9edb7bd65daf3a4e29"
42
42
  }
@@ -153,18 +153,23 @@ var serveFolders = function (app, baseFolders) {
153
153
  });
154
154
  }
155
155
  });
156
- app.get('/content/entities/scene', function (req, res) {
157
- if (!req.query.pointer) {
158
- res.json([]);
159
- return;
156
+ function pointerRequestHandler(pointers) {
157
+ if (!pointers) {
158
+ return [];
160
159
  }
161
- var requestedPointers = new Set(req.query.pointer && typeof req.query.pointer === 'string'
162
- ? [req.query.pointer]
163
- : req.query.pointer);
160
+ var requestedPointers = new Set(pointers && typeof pointers === 'string'
161
+ ? [pointers]
162
+ : pointers);
164
163
  var resultEntities = (0, setupUtils_1.getSceneJson)({
165
164
  baseFolders: baseFolders,
166
165
  pointers: Array.from(requestedPointers)
167
166
  });
168
- res.json(resultEntities).end();
167
+ return resultEntities;
168
+ }
169
+ app.get('/content/entities/scene', function (req, res) {
170
+ return res.json(pointerRequestHandler(req.query.pointer)).end();
171
+ });
172
+ app.post('/content/entities/active', function (req, res) {
173
+ return res.json(pointerRequestHandler(req.body.pointers)).end();
169
174
  });
170
175
  };
package/src/setupProxy.js CHANGED
@@ -46,6 +46,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
46
46
  };
47
47
  var path = require("path");
48
48
  var fs = require("fs");
49
+ var express = require("express");
49
50
  var setupUtils_1 = require("./cli/setupUtils");
50
51
  var mock_catalyst_1 = require("./cli/mock-catalyst");
51
52
  var wearables_1 = require("./cli/wearables");
@@ -99,6 +100,7 @@ var setupProxy = function (dcl, app) {
99
100
  baseWearableFolders = wearables;
100
101
  }
101
102
  }
103
+ app.use(express.json());
102
104
  try {
103
105
  (0, mock_catalyst_1.mockCatalyst)(app, __spreadArray(__spreadArray([], baseSceneFolders, true), baseWearableFolders, true));
104
106
  }
@@ -198,7 +198,12 @@ declare function defineSdkComponents(engine: Pick<IEngine, 'defineComponent'>):
198
198
  Animator: ComponentDefinition<EcsType<PBAnimator>>;
199
199
  AudioSource: ComponentDefinition<EcsType<PBAudioSource>>;
200
200
  AudioStream: ComponentDefinition<EcsType<PBAudioStream>>;
201
+ AvatarAttach: ComponentDefinition<EcsType<PBAvatarAttach>>;
202
+ AvatarModifierArea: ComponentDefinition<EcsType<PBAvatarModifierArea>>;
203
+ AvatarShape: ComponentDefinition<EcsType<PBAvatarShape>>;
204
+ Billboard: ComponentDefinition<EcsType<PBBillboard>>;
201
205
  BoxShape: ComponentDefinition<EcsType<PBBoxShape>>;
206
+ CameraModeArea: ComponentDefinition<EcsType<PBCameraModeArea>>;
202
207
  CylinderShape: ComponentDefinition<EcsType<PBCylinderShape>>;
203
208
  GLTFShape: ComponentDefinition<EcsType<PBGLTFShape>>;
204
209
  NFTShape: ComponentDefinition<EcsType<PBNFTShape>>;
@@ -1148,18 +1153,65 @@ declare interface PBAudioStream {
1148
1153
  url: string;
1149
1154
  }
1150
1155
 
1156
+ declare interface PBAvatarAttach {
1157
+ avatarId: string;
1158
+ anchorPointId: number;
1159
+ }
1160
+
1161
+ declare interface PBAvatarModifierArea {
1162
+ area: Vector3_2 | undefined;
1163
+ excludeIds: string[];
1164
+ modifiers: PBAvatarModifierArea_Modifier[];
1165
+ }
1166
+
1167
+ declare enum PBAvatarModifierArea_Modifier {
1168
+ HIDE_AVATARS = 0,
1169
+ DISABLE_PASSPORTS = 1,
1170
+ UNRECOGNIZED = -1
1171
+ }
1172
+
1173
+ declare interface PBAvatarShape {
1174
+ id: string;
1175
+ name: string;
1176
+ bodyShape: string;
1177
+ skinColor: Color3 | undefined;
1178
+ hairColor: Color3 | undefined;
1179
+ eyeColor: Color3 | undefined;
1180
+ wearables: string[];
1181
+ expressionTriggerId: string;
1182
+ expressionTriggerTimestamp: number;
1183
+ stickerTriggerId: string;
1184
+ stickerTriggerTimestamp: number;
1185
+ talking: boolean;
1186
+ }
1187
+
1188
+ declare interface PBBillboard {
1189
+ x: boolean;
1190
+ y: boolean;
1191
+ z: boolean;
1192
+ }
1193
+
1151
1194
  declare interface PBBoxShape {
1152
1195
  withCollisions: boolean;
1153
1196
  isPointerBlocker: boolean;
1154
- /** TODO: should visible be another component? that maybe affects all the entities */
1155
1197
  visible: boolean;
1156
1198
  uvs: number[];
1157
1199
  }
1158
1200
 
1201
+ declare interface PBCameraModeArea {
1202
+ area: Vector3_2 | undefined;
1203
+ mode: PBCameraModeArea_CameraMode;
1204
+ }
1205
+
1206
+ declare enum PBCameraModeArea_CameraMode {
1207
+ FIRST_PERSON = 0,
1208
+ THIRD_PERSON = 1,
1209
+ UNRECOGNIZED = -1
1210
+ }
1211
+
1159
1212
  declare interface PBCylinderShape {
1160
1213
  withCollisions: boolean;
1161
1214
  isPointerBlocker: boolean;
1162
- /** TODO: should visible be another component? that maybe affects all the entities */
1163
1215
  visible: boolean;
1164
1216
  radiusTop: number;
1165
1217
  radiusBottom: number;
@@ -1175,7 +1227,6 @@ declare interface PBGLTFShape {
1175
1227
  declare interface PBNFTShape {
1176
1228
  withCollisions: boolean;
1177
1229
  isPointerBlocker: boolean;
1178
- /** TODO: should visible be another component? that maybe affects all the entities */
1179
1230
  visible: boolean;
1180
1231
  src: string;
1181
1232
  assetId: string;
@@ -1222,9 +1273,7 @@ declare interface PBOnPointerUpResult {
1222
1273
  declare interface PBPlaneShape {
1223
1274
  withCollisions: boolean;
1224
1275
  isPointerBlocker: boolean;
1225
- /** TODO: should visible be another component? that maybe affects all the entities */
1226
1276
  visible: boolean;
1227
- /** TODO: this could be better serialized as u00 v00 u01 v01 u10 v10 u11 v11 for speed */
1228
1277
  uvs: number[];
1229
1278
  }
1230
1279
 
@@ -1236,7 +1285,6 @@ declare interface PBSphereShape {
1236
1285
 
1237
1286
  declare interface PBTextShape {
1238
1287
  text: string;
1239
- /** this should be removed */
1240
1288
  visible: boolean;
1241
1289
  font: string;
1242
1290
  opacity: number;