@dcl/sdk 7.0.0-2625231661.commit-ab8ccee → 7.0.0-2650546131.commit-45e34df

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-2625231661.commit-ab8ccee",
3
+ "version": "7.0.0-2650546131.commit-45e34df",
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.3-2625231661.commit-ab8ccee",
31
- "@dcl/build-ecs": "6.11.3-2625231661.commit-ab8ccee",
32
- "@dcl/kernel": "^1.0.0-2625011593.commit-d45c691",
30
+ "@dcl/amd": "6.11.4-2650546131.commit-45e34df",
31
+ "@dcl/build-ecs": "6.11.4-2650546131.commit-45e34df",
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": "ab8ccee06c750bbfe3924d7a5cc6b617908a121b"
41
+ "commit": "45e34dfa58a4921971ceeaf31e8419132d3c373a"
42
42
  }
@@ -113,9 +113,19 @@ declare function createByteBuffer(options?: CreateByteBufferOptions): {
113
113
  */
114
114
  size(): number;
115
115
  /**
116
- * @returns The subarray from 0 to offset.
116
+ * Take care using this function, if you modify the data after, the
117
+ * returned subarray will change too. If you'll modify the content of the
118
+ * bytebuffer, maybe you want to use toCopiedBinary()
119
+ *
120
+ * @returns The subarray from 0 to offset as reference.
117
121
  */
118
122
  toBinary(): Uint8Array;
123
+ /**
124
+ * Safe copied buffer of the current data of ByteBuffer
125
+ *
126
+ * @returns The subarray from 0 to offset.
127
+ */
128
+ toCopiedBinary(): Uint8Array;
119
129
  writeBuffer(value: Uint8Array, writeLength?: boolean): void;
120
130
  writeFloat32(value: number): void;
121
131
  writeFloat64(value: number): void;
@@ -188,7 +198,12 @@ declare function defineSdkComponents(engine: Pick<IEngine, 'defineComponent'>):
188
198
  Animator: ComponentDefinition<EcsType<PBAnimator>>;
189
199
  AudioSource: ComponentDefinition<EcsType<PBAudioSource>>;
190
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>>;
191
205
  BoxShape: ComponentDefinition<EcsType<PBBoxShape>>;
206
+ CameraModeArea: ComponentDefinition<EcsType<PBCameraModeArea>>;
192
207
  CylinderShape: ComponentDefinition<EcsType<PBCylinderShape>>;
193
208
  GLTFShape: ComponentDefinition<EcsType<PBGLTFShape>>;
194
209
  NFTShape: ComponentDefinition<EcsType<PBNFTShape>>;
@@ -1138,18 +1153,65 @@ declare interface PBAudioStream {
1138
1153
  url: string;
1139
1154
  }
1140
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
+
1141
1194
  declare interface PBBoxShape {
1142
1195
  withCollisions: boolean;
1143
1196
  isPointerBlocker: boolean;
1144
- /** TODO: should visible be another component? that maybe affects all the entities */
1145
1197
  visible: boolean;
1146
1198
  uvs: number[];
1147
1199
  }
1148
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
+
1149
1212
  declare interface PBCylinderShape {
1150
1213
  withCollisions: boolean;
1151
1214
  isPointerBlocker: boolean;
1152
- /** TODO: should visible be another component? that maybe affects all the entities */
1153
1215
  visible: boolean;
1154
1216
  radiusTop: number;
1155
1217
  radiusBottom: number;
@@ -1165,7 +1227,6 @@ declare interface PBGLTFShape {
1165
1227
  declare interface PBNFTShape {
1166
1228
  withCollisions: boolean;
1167
1229
  isPointerBlocker: boolean;
1168
- /** TODO: should visible be another component? that maybe affects all the entities */
1169
1230
  visible: boolean;
1170
1231
  src: string;
1171
1232
  assetId: string;
@@ -1212,9 +1273,7 @@ declare interface PBOnPointerUpResult {
1212
1273
  declare interface PBPlaneShape {
1213
1274
  withCollisions: boolean;
1214
1275
  isPointerBlocker: boolean;
1215
- /** TODO: should visible be another component? that maybe affects all the entities */
1216
1276
  visible: boolean;
1217
- /** TODO: this could be better serialized as u00 v00 u01 v01 u10 v10 u11 v11 for speed */
1218
1277
  uvs: number[];
1219
1278
  }
1220
1279
 
@@ -1226,7 +1285,6 @@ declare interface PBSphereShape {
1226
1285
 
1227
1286
  declare interface PBTextShape {
1228
1287
  text: string;
1229
- /** this should be removed */
1230
1288
  visible: boolean;
1231
1289
  font: string;
1232
1290
  opacity: number;