@dcl/sdk 7.0.0-2698073429.commit-b4ce057 → 7.0.0-2740047851.commit-db29ac2

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.
@@ -1,3 +1,21 @@
1
+ declare const enum ActionButton {
2
+ POINTER = 0,
3
+ PRIMARY = 1,
4
+ SECONDARY = 2,
5
+ ANY = 3,
6
+ FORWARD = 4,
7
+ BACKWARD = 5,
8
+ RIGHT = 6,
9
+ LEFT = 7,
10
+ JUMP = 8,
11
+ WALK = 9,
12
+ ACTION_3 = 10,
13
+ ACTION_4 = 11,
14
+ ACTION_5 = 12,
15
+ ACTION_6 = 13,
16
+ UNRECOGNIZED = -1
17
+ }
18
+
1
19
  /**
2
20
  * @public
3
21
  */
@@ -8,6 +26,12 @@ export declare function ArrayType<T>(type: EcsType<T>): EcsType<Array<T>>;
8
26
  */
9
27
  export declare type ByteBuffer = ReturnType<typeof createByteBuffer>;
10
28
 
29
+ declare const enum CameraMode {
30
+ FIRST_PERSON = 0,
31
+ THIRD_PERSON = 1,
32
+ UNRECOGNIZED = -1
33
+ }
34
+
11
35
  declare interface Color3 {
12
36
  r: number;
13
37
  g: number;
@@ -197,11 +221,8 @@ export declare type DeepReadonly<T> = {
197
221
  declare function defineSdkComponents(engine: Pick<IEngine, 'defineComponent'>): {
198
222
  Animator: ComponentDefinition<EcsType<PBAnimator>>;
199
223
  AudioSource: ComponentDefinition<EcsType<PBAudioSource>>;
200
- AudioStream: ComponentDefinition<EcsType<PBAudioStream>>;
201
224
  AvatarAttach: ComponentDefinition<EcsType<PBAvatarAttach>>;
202
- AvatarModifierArea: ComponentDefinition<EcsType<PBAvatarModifierArea>>;
203
225
  AvatarShape: ComponentDefinition<EcsType<PBAvatarShape>>;
204
- Billboard: ComponentDefinition<EcsType<PBBillboard>>;
205
226
  BoxShape: ComponentDefinition<EcsType<PBBoxShape>>;
206
227
  CameraModeArea: ComponentDefinition<EcsType<PBCameraModeArea>>;
207
228
  CylinderShape: ComponentDefinition<EcsType<PBCylinderShape>>;
@@ -214,7 +235,6 @@ declare function defineSdkComponents(engine: Pick<IEngine, 'defineComponent'>):
214
235
  PlaneShape: ComponentDefinition<EcsType<PBPlaneShape>>;
215
236
  SphereShape: ComponentDefinition<EcsType<PBSphereShape>>;
216
237
  TextShape: ComponentDefinition<EcsType<PBTextShape>>;
217
- UiTransform: ComponentDefinition<EcsType<PBUiTransform>>;
218
238
  Transform: ComponentDefinition<EcsType<Transform>>;
219
239
  };
220
240
 
@@ -322,7 +342,7 @@ export declare type IEngine = {
322
342
  groupOf<T extends [ComponentDefinition, ...ComponentDefinition[]]>(...components: T): Iterable<[Entity, ...DeepReadonly<ComponentEcsType<T>>]>;
323
343
  getComponent<T extends EcsType>(componentId: number): ComponentDefinition<T>;
324
344
  update(dt: number): void;
325
- baseComponents: SdkComponetns;
345
+ baseComponents: SdkComponents;
326
346
  };
327
347
 
328
348
  /**
@@ -1147,29 +1167,11 @@ declare interface PBAudioSource {
1147
1167
  audioClipUrl: string;
1148
1168
  }
1149
1169
 
1150
- declare interface PBAudioStream {
1151
- playing: boolean;
1152
- volume: number;
1153
- url: string;
1154
- }
1155
-
1156
1170
  declare interface PBAvatarAttach {
1157
1171
  avatarId: string;
1158
1172
  anchorPointId: number;
1159
1173
  }
1160
1174
 
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
1175
  declare interface PBAvatarShape {
1174
1176
  id: string;
1175
1177
  name: string;
@@ -1185,12 +1187,6 @@ declare interface PBAvatarShape {
1185
1187
  talking: boolean;
1186
1188
  }
1187
1189
 
1188
- declare interface PBBillboard {
1189
- x: boolean;
1190
- y: boolean;
1191
- z: boolean;
1192
- }
1193
-
1194
1190
  declare interface PBBoxShape {
1195
1191
  withCollisions: boolean;
1196
1192
  isPointerBlocker: boolean;
@@ -1200,13 +1196,7 @@ declare interface PBBoxShape {
1200
1196
 
1201
1197
  declare interface PBCameraModeArea {
1202
1198
  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
1199
+ mode: CameraMode;
1210
1200
  }
1211
1201
 
1212
1202
  declare interface PBCylinderShape {
@@ -1235,14 +1225,14 @@ declare interface PBNFTShape {
1235
1225
  }
1236
1226
 
1237
1227
  declare interface PBOnPointerDown {
1238
- button: number;
1228
+ button: ActionButton;
1239
1229
  hoverText: string;
1240
1230
  distance: number;
1241
1231
  showFeedback: boolean;
1242
1232
  }
1243
1233
 
1244
1234
  declare interface PBOnPointerDownResult {
1245
- button: number;
1235
+ button: ActionButton;
1246
1236
  meshName: string;
1247
1237
  origin: Vector3_2 | undefined;
1248
1238
  direction: Vector3_2 | undefined;
@@ -1253,14 +1243,14 @@ declare interface PBOnPointerDownResult {
1253
1243
  }
1254
1244
 
1255
1245
  declare interface PBOnPointerUp {
1256
- button: number;
1246
+ button: ActionButton;
1257
1247
  hoverText: string;
1258
1248
  distance: number;
1259
1249
  showFeedback: boolean;
1260
1250
  }
1261
1251
 
1262
1252
  declare interface PBOnPointerUpResult {
1263
- button: number;
1253
+ button: ActionButton;
1264
1254
  meshName: string;
1265
1255
  origin: Vector3_2 | undefined;
1266
1256
  direction: Vector3_2 | undefined;
@@ -1310,65 +1300,6 @@ declare interface PBTextShape {
1310
1300
  textColor: Color3 | undefined;
1311
1301
  }
1312
1302
 
1313
- declare interface PBUiTransform {
1314
- positionType: YGPositionType;
1315
- alignContent: YGAlign;
1316
- alignItems: YGAlign;
1317
- alignSelf: YGAlign;
1318
- flexDirection: YGFlexDirection;
1319
- flexWrap: YGWrap;
1320
- justifyContent: YGJustify;
1321
- overflow: YGOverflow;
1322
- display: YGDisplay;
1323
- direction: YGDirection;
1324
- flex: number;
1325
- flexBasisUnit: YGUnit;
1326
- flexBasis: number;
1327
- flexGrow: number;
1328
- flexShrink: number;
1329
- widthUnit: YGUnit;
1330
- width: number;
1331
- heightUnit: YGUnit;
1332
- height: number;
1333
- minWidthUnit: YGUnit;
1334
- minWidth: number;
1335
- minHeightUnit: YGUnit;
1336
- minHeight: number;
1337
- maxWidthUnit: YGUnit;
1338
- maxWidth: number;
1339
- maxHeightUnit: YGUnit;
1340
- maxHeight: number;
1341
- positionLeftUnit: YGUnit;
1342
- positionLeft: number;
1343
- positionTopUnit: YGUnit;
1344
- positionTop: number;
1345
- positionRightUnit: YGUnit;
1346
- positionRight: number;
1347
- positionBottomUnit: YGUnit;
1348
- positionBottom: number;
1349
- /** margin */
1350
- marginLeftUnit: YGUnit;
1351
- marginLeft: number;
1352
- marginTopUnit: YGUnit;
1353
- marginTop: number;
1354
- marginRightUnit: YGUnit;
1355
- marginRight: number;
1356
- marginBottomUnit: YGUnit;
1357
- marginBottom: number;
1358
- paddingLeftUnit: YGUnit;
1359
- paddingLeft: number;
1360
- paddingTopUnit: YGUnit;
1361
- paddingTop: number;
1362
- paddingRightUnit: YGUnit;
1363
- paddingRight: number;
1364
- paddingBottomUnit: YGUnit;
1365
- paddingBottom: number;
1366
- borderLeft: number;
1367
- borderTop: number;
1368
- borderRight: number;
1369
- borderBottom: number;
1370
- }
1371
-
1372
1303
  /**
1373
1304
  * Represens a plane by the equation ax + by + cz + d = 0
1374
1305
  * @public
@@ -1668,7 +1599,7 @@ export declare type Result<T extends Spec> = ToOptional<{
1668
1599
  /**
1669
1600
  * @public
1670
1601
  */
1671
- export declare type SdkComponetns = ReturnType<typeof defineSdkComponents>;
1602
+ export declare type SdkComponents = ReturnType<typeof defineSdkComponents>;
1672
1603
 
1673
1604
  /**
1674
1605
  * Defines supported spaces
@@ -1964,82 +1895,10 @@ declare namespace WireMessage {
1964
1895
  const HEADER_LENGTH = 8;
1965
1896
  /**
1966
1897
  * Validate if the message incoming is completed
1967
- * @param buf
1898
+ * @param buf - ByteBuffer
1968
1899
  */
1969
1900
  function validate(buf: ByteBuffer): boolean;
1970
1901
  function readHeader(buf: ByteBuffer): Header | null;
1971
1902
  }
1972
1903
 
1973
- declare enum YGAlign {
1974
- YGAlignAuto = 0,
1975
- YGAlignFlexStart = 1,
1976
- YGAlignCenter = 2,
1977
- YGAlignFlexEnd = 3,
1978
- YGAlignStretch = 4,
1979
- YGAlignBaseline = 5,
1980
- YGAlignSpaceBetween = 6,
1981
- YGAlignSpaceAround = 7,
1982
- UNRECOGNIZED = -1
1983
- }
1984
-
1985
- declare enum YGDirection {
1986
- YGDirectionInherit = 0,
1987
- YGDirectionLTR = 1,
1988
- YGDirectionRTL = 2,
1989
- UNRECOGNIZED = -1
1990
- }
1991
-
1992
- declare enum YGDisplay {
1993
- YGDisplayFlex = 0,
1994
- YGDisplayNone = 1,
1995
- UNRECOGNIZED = -1
1996
- }
1997
-
1998
- declare enum YGFlexDirection {
1999
- YGFlexDirectionColumn = 0,
2000
- YGFlexDirectionColumnReverse = 1,
2001
- YGFlexDirectionRow = 2,
2002
- YGFlexDirectionRowReverse = 3,
2003
- UNRECOGNIZED = -1
2004
- }
2005
-
2006
- declare enum YGJustify {
2007
- YGJustifyFlexStart = 0,
2008
- YGJustifyCenter = 1,
2009
- YGJustifyFlexEnd = 2,
2010
- YGJustifySpaceBetween = 3,
2011
- YGJustifySpaceAround = 4,
2012
- YGJustifySpaceEvenly = 5,
2013
- UNRECOGNIZED = -1
2014
- }
2015
-
2016
- declare enum YGOverflow {
2017
- YGOverflowVisible = 0,
2018
- YGOverflowHidden = 1,
2019
- YGOverflowScroll = 2,
2020
- UNRECOGNIZED = -1
2021
- }
2022
-
2023
- declare enum YGPositionType {
2024
- YGPositionTypeStatic = 0,
2025
- YGPositionTypeRelative = 1,
2026
- YGPositionTypeAbsolute = 2,
2027
- UNRECOGNIZED = -1
2028
- }
2029
-
2030
- declare enum YGUnit {
2031
- YGUnitUndefined = 0,
2032
- YGUnitPoint = 1,
2033
- YGUnitPercent = 2,
2034
- YGUnitAuto = 3,
2035
- UNRECOGNIZED = -1
2036
- }
2037
-
2038
- declare enum YGWrap {
2039
- YGWrapNoWrap = 0,
2040
- YGWrapWrap = 1,
2041
- YGWrapWrapReverse = 2,
2042
- UNRECOGNIZED = -1
2043
- }
2044
-
2045
1904
  export { }