@dcl/playground-assets 7.0.6-4055981423.commit-60b7f6f → 7.0.6-4076330908.commit-cd40e5f

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/dist/beta.d.ts CHANGED
@@ -1,23 +1,14 @@
1
- import _m0 from 'protobufjs/minimal';
2
-
3
1
  /**
4
2
  * @public
5
3
  */
6
4
  export declare type AlignType = 'auto' | 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline' | 'space-between' | 'space-around';
7
5
 
8
- export declare const AMOUNT_VERSION_AVAILABLE: number;
9
-
10
6
  export declare const Animator: AnimatorComponentDefinitionExtended;
11
7
 
12
8
  /**
13
9
  * @public
14
10
  */
15
- export declare type AnimatorComponentDefinition = ComponentDefinition<PBAnimator>;
16
-
17
- /**
18
- * @public
19
- */
20
- export declare interface AnimatorComponentDefinitionExtended extends AnimatorComponentDefinition {
11
+ export declare interface AnimatorComponentDefinitionExtended extends ComponentDefinition<PBAnimator> {
21
12
  /**
22
13
  * @public
23
14
  *
@@ -63,6 +54,9 @@ export declare const AudioSource: ComponentDefinition<PBAudioSource>;
63
54
  /** @public */
64
55
  export declare const AudioStream: ComponentDefinition<PBAudioStream>;
65
56
 
57
+ /**
58
+ * @public
59
+ */
66
60
  export declare const enum AvatarAnchorPointType {
67
61
  AAPT_POSITION = 0,
68
62
  AAPT_NAME_TAG = 1,
@@ -76,6 +70,9 @@ export declare const AvatarAttach: ComponentDefinition<PBAvatarAttach>;
76
70
  /** @public */
77
71
  export declare const AvatarModifierArea: ComponentDefinition<PBAvatarModifierArea>;
78
72
 
73
+ /**
74
+ * @public
75
+ */
79
76
  export declare const enum AvatarModifierType {
80
77
  AMT_HIDE_AVATARS = 0,
81
78
  AMT_DISABLE_PASSPORTS = 1
@@ -84,6 +81,9 @@ export declare const enum AvatarModifierType {
84
81
  /** @public */
85
82
  export declare const AvatarShape: ComponentDefinition<PBAvatarShape>;
86
83
 
84
+ /**
85
+ * @public
86
+ */
87
87
  export declare interface AvatarTexture {
88
88
  userId: string;
89
89
  /** default = TextureWrapMode.Clamp */
@@ -93,13 +93,8 @@ export declare interface AvatarTexture {
93
93
  }
94
94
 
95
95
  /**
96
- * Internal
96
+ * @public
97
97
  */
98
- export declare const AvatarTexture: {
99
- encode(message: AvatarTexture, writer?: _m0.Writer): _m0.Writer;
100
- decode(input: _m0.Reader | Uint8Array, length?: number): AvatarTexture;
101
- };
102
-
103
98
  export declare const enum BackgroundTextureMode {
104
99
  /**
105
100
  * NINE_SLICES - https://docs.unity3d.com/Manual/UIE-USS-SupportedProperties.html (Slicing section)
@@ -124,6 +119,9 @@ export declare const enum BackgroundTextureMode {
124
119
  /** @public */
125
120
  export declare const Billboard: ComponentDefinition<PBBillboard>;
126
121
 
122
+ /**
123
+ * @public
124
+ */
127
125
  export declare const enum BillboardMode {
128
126
  BM_NONE = 0,
129
127
  BM_X = 1,
@@ -133,6 +131,9 @@ export declare const enum BillboardMode {
133
131
  }
134
132
 
135
133
  /** Defines indents from respective edges */
134
+ /**
135
+ * @public
136
+ */
136
137
  export declare interface BorderRect {
137
138
  top: number;
138
139
  left: number;
@@ -141,22 +142,23 @@ export declare interface BorderRect {
141
142
  }
142
143
 
143
144
  /**
144
- * Internal
145
- */
146
- export declare const BorderRect: {
147
- encode(message: BorderRect, writer?: _m0.Writer): _m0.Writer;
148
- decode(input: _m0.Reader | Uint8Array, length?: number): BorderRect;
149
- };
150
-
151
- /**
145
+ *
152
146
  * @public
147
+ * Button component
148
+ *
149
+ * A Button indicates a possible user action.
150
+ *
151
+ * @example
152
+ * <Button variant="primary" value="Click me!" />
153
+ *
154
+ * @category Component
153
155
  */
154
- export declare function Button(props: EntityPropTypes & UiButtonProps): ReactEcs.JSX.Element;
156
+ export declare function Button(props: UiButtonProps): ReactEcs.JSX.Element;
155
157
 
156
158
  /**
157
159
  * @public
158
160
  */
159
- export declare type ByteBuffer = {
161
+ export declare interface ByteBuffer {
160
162
  /**
161
163
  * @returns The entire current Uint8Array.
162
164
  *
@@ -256,8 +258,12 @@ export declare type ByteBuffer = {
256
258
  setUint16(offset: number, value: number): void;
257
259
  setUint32(offset: number, value: number): void;
258
260
  setUint64(offset: number, value: bigint): void;
259
- };
261
+ }
260
262
 
263
+ /**
264
+ * Callback function to be triggered on a specified event
265
+ * @public
266
+ */
261
267
  export declare type Callback = () => void;
262
268
 
263
269
  /** @public */
@@ -266,15 +272,19 @@ export declare const CameraMode: ComponentDefinition<PBCameraMode>;
266
272
  /** @public */
267
273
  export declare const CameraModeArea: ComponentDefinition<PBCameraModeArea>;
268
274
 
275
+ /**
276
+ * @public
277
+ */
269
278
  export declare const enum CameraType {
270
279
  CT_FIRST_PERSON = 0,
271
280
  CT_THIRD_PERSON = 1
272
281
  }
273
282
 
274
- export declare const CANVAS_ROOT_ENTITY = 0;
275
-
276
283
  export declare type Children = unknown;
277
284
 
285
+ /**
286
+ * @public
287
+ */
278
288
  export declare const enum ColliderLayer {
279
289
  CL_NONE = 0,
280
290
  CL_POINTER = 1,
@@ -986,15 +996,10 @@ export declare type Color4Type = {
986
996
  a: number;
987
997
  };
988
998
 
989
- export declare type CommonProps = {
990
- key?: Key;
991
- children?: Children;
992
- };
993
-
994
999
  /**
995
1000
  * @public
996
1001
  */
997
- export declare type ComponentDefinition<T> = {
1002
+ export declare interface ComponentDefinition<T> {
998
1003
  readonly componentId: number;
999
1004
  readonly componentName: string;
1000
1005
  /**
@@ -1051,7 +1056,7 @@ export declare type ComponentDefinition<T> = {
1051
1056
  */
1052
1057
  getMutableOrNull(entity: Entity): T | null;
1053
1058
  writeToByteBuffer(entity: Entity, buffer: ByteBuffer): void;
1054
- };
1059
+ }
1055
1060
 
1056
1061
  export declare type ComponentGetter<T extends ComponentDefinition<any>> = (engine: Pick<IEngine, 'defineComponentFromSchema'>) => T;
1057
1062
 
@@ -1062,49 +1067,14 @@ export declare type ComponentSchema<T extends [ComponentDefinition<any>, ...Comp
1062
1067
  [K in keyof T]: T[K] extends ComponentDefinition<any> ? ReturnType<T[K]['getMutable']> : never;
1063
1068
  };
1064
1069
 
1065
- export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
1066
-
1067
- export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | DeleteEntityMessage;
1068
-
1069
- export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessage;
1070
-
1071
1070
  /**
1072
- * Min length = 8 bytes
1073
- * All message length including
1074
- * @param length - Uint32 the length of all message (including the header)
1075
- * @param type - define the function which handles the data
1071
+ * @public
1076
1072
  */
1077
- export declare type CrdtMessageHeader = {
1078
- length: Uint32;
1079
- type: Uint32;
1080
- };
1081
-
1082
- export declare namespace CrdtMessageProtocol {
1083
- /**
1084
- * Validate if the message incoming is completed
1085
- * @param buf - ByteBuffer
1086
- */
1087
- export function validate(buf: ByteBuffer): boolean;
1088
- /**
1089
- * Get the current header, consuming the bytes involved.
1090
- * @param buf - ByteBuffer
1091
- * @returns header or null if there is no validated message
1092
- */
1093
- export function readHeader(buf: ByteBuffer): CrdtMessageHeader | null;
1094
- /**
1095
- * Get the current header, without consuming the bytes involved.
1096
- * @param buf - ByteBuffer
1097
- * @returns header or null if there is no validated message
1098
- */
1099
- export function getHeader(buf: ByteBuffer): CrdtMessageHeader | null;
1100
- /**
1101
- * Consume the incoming message without processing it.
1102
- * @param buf - ByteBuffer
1103
- * @returns true in case of success or false if there is no valid message.
1104
- */
1105
- export function consumeMessage(buf: ByteBuffer): boolean;
1106
- }
1073
+ export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody;
1107
1074
 
1075
+ /**
1076
+ * @public
1077
+ */
1108
1078
  export declare enum CrdtMessageType {
1109
1079
  RESERVED = 0,
1110
1080
  PUT_COMPONENT = 1,
@@ -1113,54 +1083,11 @@ export declare enum CrdtMessageType {
1113
1083
  MAX_MESSAGE_TYPE = 4
1114
1084
  }
1115
1085
 
1116
- export declare function createComponentDefinitionFromSchema<T>(componentName: string, componentId: number, schema: ISchema<T>): ComponentDefinition<T>;
1117
-
1118
1086
  export declare function createEthereumProvider(): {
1119
1087
  send(message: RPCSendableMessage, callback?: ((error: Error | null, result?: any) => void) | undefined): void;
1120
1088
  sendAsync(message: RPCSendableMessage, callback: (error: Error | null, result?: any) => void): void;
1121
1089
  };
1122
1090
 
1123
- export declare function createInputSystem(engine: IEngine): IInputSystem;
1124
-
1125
- export declare function createPointerEventSystem(engine: IEngine, inputSystem: IInputSystem): {
1126
- /* Excluded from this release type: removeOnClick */
1127
- /**
1128
- * @public
1129
- * Remove the callback for onPointerDown event
1130
- * @param entity - Entity where the callback was attached
1131
- */
1132
- removeOnPointerDown(entity: Entity): void;
1133
- /**
1134
- * @public
1135
- * Remove the callback for onPointerUp event
1136
- * @param entity - Entity where the callback was attached
1137
- */
1138
- removeOnPointerUp(entity: Entity): void;
1139
- /* Excluded from this release type: onClick */
1140
- /**
1141
- * @public
1142
- * Execute callback when the user press the InputButton pointing at the entity
1143
- * @param entity - Entity to attach the callback
1144
- * @param cb - Function to execute when click fires
1145
- * @param opts - Opts to trigger Feedback and Button
1146
- */
1147
- onPointerDown(entity: Entity, cb: EventSystemCallback, opts?: Partial<EventSystemOptions>): void;
1148
- /**
1149
- * @public
1150
- * Execute callback when the user releases the InputButton pointing at the entity
1151
- * @param entity - Entity to attach the callback
1152
- * @param cb - Function to execute when click fires
1153
- * @param opts - Opts to trigger Feedback and Button
1154
- */
1155
- onPointerUp(entity: Entity, cb: EventSystemCallback, opts?: Partial<EventSystemOptions>): void;
1156
- };
1157
-
1158
- export declare function createReactBasedUiSystem(engine: IEngine, pointerSystem: PointerEventsSystem): ReactBasedUiSystem;
1159
-
1160
- export declare function createTaskSystem(engine: IEngine): {
1161
- executeTask(task: Task): void;
1162
- };
1163
-
1164
1091
  /**
1165
1092
  * Transform parenting: cyclic dependency checker
1166
1093
  * It checks only in modified Transforms
@@ -1206,17 +1133,9 @@ export declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
1206
1133
  */
1207
1134
  export declare const DEG2RAD: number;
1208
1135
 
1209
- export declare namespace DeleteComponent {
1210
- const MESSAGE_HEADER_LENGTH = 20;
1211
- /**
1212
- * Write DeleteComponent message
1213
- */
1214
- export function write(entity: Entity, componentId: number, timestamp: number, buf: ByteBuffer): void;
1215
- export function read(buf: ByteBuffer): DeleteComponentMessage | null;
1216
- }
1217
-
1218
- export declare type DeleteComponentMessage = CrdtMessageHeader & DeleteComponentMessageBody;
1219
-
1136
+ /**
1137
+ * @public
1138
+ */
1220
1139
  export declare type DeleteComponentMessageBody = {
1221
1140
  type: CrdtMessageType.DELETE_COMPONENT;
1222
1141
  entityId: Entity;
@@ -1224,16 +1143,9 @@ export declare type DeleteComponentMessageBody = {
1224
1143
  timestamp: number;
1225
1144
  };
1226
1145
 
1227
- export declare namespace DeleteEntity {
1228
- const MESSAGE_HEADER_LENGTH = 4;
1229
- export function write(entity: Entity, buf: ByteBuffer): void;
1230
- export function read(buf: ByteBuffer): DeleteEntityMessage | null;
1231
- }
1232
-
1233
- export declare type DeleteEntityMessage = CrdtMessageHeader & DeleteEntityMessageBody;
1234
-
1235
1146
  /**
1236
- * @param entity - Uint32 number of the entity
1147
+ * @param entity - uint32 number of the entity
1148
+ * @public
1237
1149
  */
1238
1150
  export declare type DeleteEntityMessageBody = {
1239
1151
  type: CrdtMessageType.DELETE_ENTITY;
@@ -1247,18 +1159,46 @@ export declare type DisplayType = 'flex' | 'none';
1247
1159
 
1248
1160
  /**
1249
1161
  * @public
1162
+ * Dropdown component
1163
+ *
1164
+ * A dropdown allows a user to select a value from a series of options.
1165
+ *
1166
+ * @example
1167
+ * <Dropdown
1168
+ options={['Red', 'Blue']}
1169
+ color={Color4.Red()}
1170
+ font="sans-serif"
1171
+ fontSize={14}
1172
+ selectedIndex={value}
1173
+ onChange={(index) => value = index}
1174
+ />
1175
+ *
1176
+ * @category Component
1250
1177
  */
1251
- export declare function Dropdown(props: EntityPropTypes & UiDropdownProps): ReactEcs.JSX.Element;
1252
-
1253
- export declare type EcsElements = {
1254
- entity: Partial<EntityComponents & CommonProps>;
1255
- };
1178
+ export declare function Dropdown(props: UiDropdownProps): ReactEcs.JSX.Element;
1256
1179
 
1257
1180
  /**
1258
1181
  * @public
1259
1182
  */
1260
- export declare function Engine(options?: IEngineOptions): IEngine;
1183
+ export declare interface EcsElements {
1184
+ entity: Partial<EntityComponents> & {
1185
+ children?: Children;
1186
+ key?: Key;
1187
+ };
1188
+ }
1261
1189
 
1190
+ /**
1191
+ * @public
1192
+ * The engine is the part of the scene that sits in the middle and manages all of the other parts.
1193
+ * It determines what entities are rendered and how players interact with them.
1194
+ * It also coordinates what functions from systems are executed and when.
1195
+ *
1196
+ * @example
1197
+ * import { engine } from '@dcl/sdk/ecs'
1198
+ * const entity = engine.addEntity()
1199
+ * engine.addSystem(someSystemFunction)
1200
+ *
1201
+ */
1262
1202
  export declare const engine: IEngine;
1263
1203
 
1264
1204
  export declare type EngineEvent<T extends IEventNames = IEventNames, V = IEvents[T]> = {
@@ -1282,6 +1222,9 @@ export declare type Entity = number & {
1282
1222
  __entity_type: '';
1283
1223
  };
1284
1224
 
1225
+ /**
1226
+ * @public
1227
+ */
1285
1228
  export declare type EntityComponents = {
1286
1229
  uiTransform: PBUiTransform;
1287
1230
  uiText: PBUiText;
@@ -1292,8 +1235,9 @@ export declare type EntityComponents = {
1292
1235
  onMouseUp: Callback;
1293
1236
  };
1294
1237
 
1295
- export declare function EntityContainer(): EntityContainer;
1296
-
1238
+ /**
1239
+ * @intenral
1240
+ */
1297
1241
  export declare type EntityContainer = {
1298
1242
  generateEntity(): Entity;
1299
1243
  removeEntity(entity: Entity): boolean;
@@ -1306,11 +1250,16 @@ export declare type EntityContainer = {
1306
1250
 
1307
1251
  /**
1308
1252
  * @public
1253
+ * Common props to all components
1309
1254
  */
1310
- export declare type EntityPropTypes = {
1255
+ export declare interface EntityPropTypes extends Listeners {
1256
+ /** Layout component, to position things in the canvas */
1311
1257
  uiTransform?: UiTransformProps;
1258
+ /** To define a background color or image */
1312
1259
  uiBackground?: UiBackgroundProps;
1313
- } & Listeners & Pick<CommonProps, 'key'>;
1260
+ /** Uinique key to identiy elments when iterating arrays */
1261
+ key?: Key;
1262
+ }
1314
1263
 
1315
1264
  /**
1316
1265
  * @public
@@ -1331,25 +1280,20 @@ export declare enum EntityState {
1331
1280
  Reserved = 3
1332
1281
  }
1333
1282
 
1334
- export declare namespace EntityUtils {
1335
- /**
1336
- * @returns [entityNumber, entityVersion]
1337
- */
1338
- export function fromEntityId(entityId: Entity): [number, number];
1339
- /**
1340
- * @returns compound number from entityNumber and entityVerison
1341
- */
1342
- export function toEntityId(entityNumber: number, entityVersion: number): Entity;
1343
- }
1344
-
1345
1283
  /**
1346
1284
  * Constant used to define the minimal number value in Babylon.js
1347
1285
  * @public
1348
1286
  */
1349
1287
  export declare const Epsilon = 0.000001;
1350
1288
 
1289
+ /**
1290
+ * @public
1291
+ */
1351
1292
  export declare type EventSystemCallback = (event: PBPointerEventsResult_PointerCommand) => void;
1352
1293
 
1294
+ /**
1295
+ * @public
1296
+ */
1353
1297
  export declare type EventSystemOptions = {
1354
1298
  button: InputAction;
1355
1299
  hoverText?: string;
@@ -1357,13 +1301,17 @@ export declare type EventSystemOptions = {
1357
1301
  showFeedback?: boolean;
1358
1302
  };
1359
1303
 
1360
- /** Excludes property keys from T where the property is assignable to U */
1304
+ /**
1305
+ * Excludes property keys from T where the property is assignable to U
1306
+ * @public
1307
+ */
1361
1308
  export declare type ExcludeUndefined<T> = {
1362
1309
  [P in keyof T]: undefined extends T[P] ? never : P;
1363
1310
  }[keyof T];
1364
1311
 
1365
1312
  /**
1366
1313
  * @public
1314
+ * Runs an async function
1367
1315
  */
1368
1316
  export declare const executeTask: (task: Task<unknown>) => void;
1369
1317
 
@@ -1380,6 +1328,9 @@ export declare type FlexWrapType = 'wrap' | 'nowrap' | 'wrap-reverse';
1380
1328
  /** @public */
1381
1329
  export declare type FloatArray = number[];
1382
1330
 
1331
+ /**
1332
+ * @public
1333
+ */
1383
1334
  export declare const enum Font {
1384
1335
  F_SANS_SERIF = 0,
1385
1336
  F_SERIF = 1,
@@ -1412,19 +1363,16 @@ export declare const GltfContainer: ComponentDefinition<PBGltfContainer>;
1412
1363
  /**
1413
1364
  * @public
1414
1365
  */
1415
- export declare function IArray<T>(type: ISchema<T>): ISchema<Array<T>>;
1416
-
1417
- /**
1418
- * @public
1419
- */
1420
- export declare type IEngine = {
1366
+ export declare interface IEngine {
1421
1367
  /**
1368
+ * @public
1422
1369
  * Increment the used entity counter and return the next one.
1423
1370
  * @param dynamic - whether or no the entity should be considered as Dynamic (vs Static)
1424
1371
  * @returns the next entity unused
1425
1372
  */
1426
1373
  addEntity(dynamic?: boolean): Entity;
1427
1374
  /**
1375
+ * @public
1428
1376
  * Remove all components of an entity
1429
1377
  * @param entity - entity
1430
1378
  */
@@ -1435,18 +1383,21 @@ export declare type IEngine = {
1435
1383
  */
1436
1384
  removeEntityWithChildren(firstEntity: Entity): void;
1437
1385
  /**
1386
+ *
1387
+ * @public
1438
1388
  * Check the state of an entityin the engine
1439
1389
  * @param entity - the entity to validate
1440
- * @returns known enum value
1390
+ * @returns EntityState enum
1441
1391
  */
1442
1392
  getEntityState(entity: Entity): EntityState;
1443
1393
  /**
1394
+ * @public
1444
1395
  * Add the system to the engine. It will be called every tick updated.
1445
1396
  * @param system - function that receives the delta time between last tick and current one.
1446
1397
  * @param priority - a number with the priority, big number are called before smaller ones
1447
1398
  * @param name - optional: a unique name to identify it
1448
1399
  *
1449
- * Example:
1400
+ * @example
1450
1401
  * ```ts
1451
1402
  * function mySystem(dt: number) {
1452
1403
  * const entitiesWithMeshRenderer = engine.getEntitiesWith(MeshRenderer, Transform)
@@ -1459,26 +1410,30 @@ export declare type IEngine = {
1459
1410
  */
1460
1411
  addSystem(system: SystemFn, priority?: number, name?: string): void;
1461
1412
  /**
1413
+ * @public
1462
1414
  * Remove a system from the engine.
1463
1415
  * @param selector - the function or the unique name to identify
1464
1416
  * @returns if it was found and removed
1465
1417
  */
1466
1418
  removeSystem(selector: string | SystemFn): boolean;
1467
1419
  /**
1420
+ * @public
1468
1421
  * Registers a custom component definition.
1469
1422
  * @param componentName - unique name to identify the component, a hash is calculated for it, it will fail if the hash has collisions.
1470
1423
  * @param componentDefinition - The component definition
1471
1424
  */
1472
1425
  registerComponentDefinition<T>(componentName: string, componentDefinition: ComponentDefinition<T>): ComponentDefinition<T>;
1473
1426
  /**
1427
+ * @public
1474
1428
  * Define a component and add it to the engine.
1475
- * @param spec - An object with schema fields
1476
1429
  * @param componentName - unique name to identify the component, a hash is calculated for it, it will fail if the hash has collisions.
1430
+ * @param spec - An object with schema fields
1477
1431
  * @param constructorDefault - the initial value prefilled when a component is created without a value
1478
1432
  * @returns The component definition
1479
1433
  *
1434
+ * @example
1480
1435
  * ```ts
1481
- * const Door = engine.defineComponent("my-scene::Door", {
1436
+ * const CustomComponent = engine.defineComponent("my-scene::custom-name", {
1482
1437
  * id: Schemas.Int,
1483
1438
  * name: Schemas.String
1484
1439
  * })
@@ -1486,11 +1441,13 @@ export declare type IEngine = {
1486
1441
  */
1487
1442
  defineComponent<T extends Spec>(componentName: string, spec: T, constructorDefault?: Partial<MapResult<T>>): MapComponentDefinition<MapResult<T>>;
1488
1443
  /**
1444
+ * @public
1489
1445
  * Define a component and add it to the engine.
1490
1446
  * @param componentName - unique name to identify the component, a hash is calculated for it, it will fail if the hash has collisions.
1491
1447
  * @param spec - An object with schema fields
1492
1448
  * @returns The component definition
1493
1449
  *
1450
+ * @example
1494
1451
  * ```ts
1495
1452
  * const StateComponentId = 10023
1496
1453
  * const StateComponent = engine.defineComponentFromSchema("my-lib::VisibleComponent", Schemas.Bool)
@@ -1498,6 +1455,7 @@ export declare type IEngine = {
1498
1455
  */
1499
1456
  defineComponentFromSchema<T>(componentName: string, spec: ISchema<T>): ComponentDefinition<T>;
1500
1457
  /**
1458
+ * @public
1501
1459
  * Get the component definition from the component id.
1502
1460
  * @param componentId - component number or name used to identify the component descriptor
1503
1461
  * @returns the component definition, throw an error if it doesn't exist
@@ -1518,6 +1476,7 @@ export declare type IEngine = {
1518
1476
  */
1519
1477
  getComponentOrNull<T>(componentId: number): ComponentDefinition<T> | null;
1520
1478
  /**
1479
+ * @public
1521
1480
  * Get a iterator of entities that has all the component requested.
1522
1481
  * @param components - a list of component definitions
1523
1482
  * @returns An iterator of an array with the [entity, component1, component2, ...]
@@ -1531,6 +1490,7 @@ export declare type IEngine = {
1531
1490
  */
1532
1491
  getEntitiesWith<T extends [ComponentDefinition<any>, ...ComponentDefinition<any>[]]>(...components: T): Iterable<[Entity, ...ReadonlyComponentSchema<T>]>;
1533
1492
  /**
1493
+ * @public
1534
1494
  * @param deltaTime - deltaTime in seconds
1535
1495
  */
1536
1496
  update(deltaTime: number): Promise<void>;
@@ -1549,15 +1509,9 @@ export declare type IEngine = {
1549
1509
  * Camera entity of current player.
1550
1510
  */
1551
1511
  readonly CameraEntity: Entity;
1512
+ /* Excluded from this release type: addTransport */
1552
1513
  /**
1553
- * @param transport - transport which changes its onmessage to process CRDT messages
1554
- */
1555
- addTransport(transport: Transport): void;
1556
- /**
1557
- * Entity continaer
1558
- */
1559
- entityContainer: EntityContainer;
1560
- /**
1514
+ * @public
1561
1515
  * Iterator of registered components
1562
1516
  */
1563
1517
  componentsIter(): Iterable<ComponentDefinition<unknown>>;
@@ -1566,19 +1520,7 @@ export declare type IEngine = {
1566
1520
  * components that will be available to this engine and to run optimizations.
1567
1521
  */
1568
1522
  seal(): void;
1569
- };
1570
-
1571
- /**
1572
- * @public
1573
- */
1574
- export declare type IEngineOptions = {
1575
- onChangeFunction: OnChangeFunction;
1576
- };
1577
-
1578
- /**
1579
- * @public
1580
- */
1581
- export declare function IEnum<T>(type: ISchema<any>): ISchema<T>;
1523
+ }
1582
1524
 
1583
1525
  export declare type IEventNames = keyof IEvents;
1584
1526
 
@@ -1747,20 +1689,35 @@ export declare type IInputSystem = {
1747
1689
  };
1748
1690
 
1749
1691
  /**
1692
+ * Include property keys from T where the property is assignable to U
1750
1693
  * @public
1751
1694
  */
1752
- export declare function IMap<T extends Spec>(spec: T, defaultValue?: Partial<MapResult<T>>): ISchema<MapResult<T>>;
1753
-
1754
- /** Include property keys from T where the property is assignable to U */
1755
1695
  export declare type IncludeUndefined<T> = {
1756
1696
  [P in keyof T]: undefined extends T[P] ? P : never;
1757
1697
  }[keyof T];
1758
1698
 
1759
1699
  /**
1760
1700
  * @public
1761
- */
1762
- export declare function Input(props: EntityPropTypes & Partial<UiInputProps>): ReactEcs.JSX.Element;
1701
+ * Input component
1702
+ *
1703
+ * An Input is a field used to obtain a response from a user.
1704
+ *
1705
+ * @example
1706
+ <Input
1707
+ placeholder="Please enter your email"
1708
+ onChange={(value) => {
1709
+ email = value
1710
+ }}
1711
+ uiBackground={{ color: Color4.Red() }}
1712
+ uiTransform={{ width: 200, height: 36 }}
1713
+ />
1714
+ *
1715
+ * @category Component
1716
+ */ export declare function Input(props: EntityPropTypes & Partial<UiInputProps>): ReactEcs.JSX.Element;
1763
1717
 
1718
+ /**
1719
+ * @public
1720
+ */
1764
1721
  export declare const enum InputAction {
1765
1722
  IA_POINTER = 0,
1766
1723
  IA_PRIMARY = 1,
@@ -1792,25 +1749,29 @@ export declare type InputEventResult = {
1792
1749
  };
1793
1750
  };
1794
1751
 
1795
- export declare const inputSystem: IInputSystem;
1796
-
1797
1752
  /**
1798
1753
  * @public
1754
+ * Input system manager. Check for button events
1755
+ * @example
1756
+ * inputSystem.isTriggered: Returns true if an input action ocurred since the last tick.
1757
+ * inputSystem.isPressed: Returns true if an input is currently being pressed down. It will return true on every tick until the button goes up again.
1758
+ * inputSystem.getInputCommand: Returns an object with data about the input action.
1799
1759
  */
1800
- export declare function IOptional<T>(spec: ISchema<T>): ISchema<T | undefined>;
1760
+ export declare const inputSystem: IInputSystem;
1801
1761
 
1802
1762
  /**
1803
1763
  * @public
1804
1764
  */
1805
- export declare type ISchema<T = any> = {
1765
+ export declare interface ISchema<T = any> {
1806
1766
  serialize(value: T, builder: ByteBuffer): void;
1807
1767
  deserialize(reader: ByteBuffer): T;
1808
1768
  create(): T;
1809
1769
  extend?: (base?: T) => T;
1810
- };
1811
-
1812
- export declare const isListener: (key: string) => key is keyof Listeners;
1770
+ }
1813
1771
 
1772
+ /**
1773
+ * @hidden
1774
+ */
1814
1775
  export declare namespace JSX {
1815
1776
  export type Element = {} | null;
1816
1777
  export type IntrinsicElements = EcsElements;
@@ -1823,18 +1784,42 @@ export declare namespace JSX {
1823
1784
  */
1824
1785
  export declare type JustifyType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
1825
1786
 
1787
+ /**
1788
+ * Keys help React identify which items have changed, are added, or are removed.
1789
+ * Keys should be given to the elements inside the array to give the elements a stable identity:
1790
+ * @public
1791
+ */
1826
1792
  export declare type Key = number | string;
1827
1793
 
1828
1794
  /**
1795
+ *
1829
1796
  * @public
1797
+ * Label component
1798
+ *
1799
+ * A label displays text content
1800
+ *
1801
+ * @example
1802
+ * <Label value="SDK 7" uiTransform={{ margin: { left: 10 } }} />
1803
+ *
1804
+ * @category Component
1830
1805
  */
1831
1806
  export declare function Label(props: EntityPropTypes & UiLabelProps): ReactEcs.JSX.Element;
1832
1807
 
1808
+ /**
1809
+ * User key event Listeners
1810
+ * @public
1811
+ */
1833
1812
  export declare type Listeners = {
1813
+ /** triggered on mouse down event */
1834
1814
  onMouseDown?: Callback;
1815
+ /** triggered on mouse up event */
1835
1816
  onMouseUp?: Callback;
1836
1817
  };
1837
1818
 
1819
+ /**
1820
+ * @public
1821
+ * Overrides component definition to support partial default values
1822
+ */
1838
1823
  export declare interface MapComponentDefinition<T> extends ComponentDefinition<T> {
1839
1824
  /**
1840
1825
  * Add the current component to an entity, throw an error if the component already exists (use `createOrReplace` instead).
@@ -1859,19 +1844,12 @@ export declare type MapResult<T extends Spec> = ToOptional<{
1859
1844
  [K in keyof T]: T[K] extends ISchema ? ReturnType<T[K]['deserialize']> : T[K] extends Spec ? MapResult<T[K]> : never;
1860
1845
  }>;
1861
1846
 
1862
- export declare const MASK_UPPER_16_ON_32 = 4294901760;
1863
-
1864
1847
  export declare const Material: MaterialComponentDefinitionExtended;
1865
1848
 
1866
1849
  /**
1867
1850
  * @public
1868
1851
  */
1869
- export declare type MaterialComponentDefinition = ComponentDefinition<PBMaterial>;
1870
-
1871
- /**
1872
- * @public
1873
- */
1874
- export declare interface MaterialComponentDefinitionExtended extends MaterialComponentDefinition {
1852
+ export declare interface MaterialComponentDefinitionExtended extends ComponentDefinition<PBMaterial> {
1875
1853
  /**
1876
1854
  * Texture helpers with constructor
1877
1855
  */
@@ -1890,6 +1868,9 @@ export declare interface MaterialComponentDefinitionExtended extends MaterialCom
1890
1868
  setPbrMaterial: (entity: Entity, material: PBMaterial_PbrMaterial) => void;
1891
1869
  }
1892
1870
 
1871
+ /**
1872
+ * @public
1873
+ */
1893
1874
  export declare const enum MaterialTransparencyMode {
1894
1875
  MTM_OPAQUE = 0,
1895
1876
  MTM_ALPHA_TEST = 1,
@@ -2629,24 +2610,12 @@ export declare namespace Matrix {
2629
2610
  export function toggleProjectionMatrixHandInPlace(self: MutableMatrix): void;
2630
2611
  }
2631
2612
 
2632
- /**
2633
- * @public
2634
- */
2635
- export declare const MAX_ENTITY_NUMBER = 65535;
2636
-
2637
- export declare const MAX_U16 = 65535;
2638
-
2639
2613
  export declare const MeshCollider: MeshColliderComponentDefinitionExtended;
2640
2614
 
2641
2615
  /**
2642
2616
  * @public
2643
2617
  */
2644
- export declare type MeshColliderComponentDefinition = ComponentDefinition<PBMeshCollider>;
2645
-
2646
- /**
2647
- * @public
2648
- */
2649
- export declare interface MeshColliderComponentDefinitionExtended extends MeshColliderComponentDefinition {
2618
+ export declare interface MeshColliderComponentDefinitionExtended extends ComponentDefinition<PBMeshCollider> {
2650
2619
  /**
2651
2620
  * @public
2652
2621
  * Set a box in the MeshCollider component
@@ -2684,12 +2653,7 @@ export declare const MeshRenderer: MeshRendererComponentDefinitionExtended;
2684
2653
  /**
2685
2654
  * @public
2686
2655
  */
2687
- export declare type MeshRendererComponentDefinition = ComponentDefinition<PBMeshRenderer>;
2688
-
2689
- /**
2690
- * @public
2691
- */
2692
- export declare interface MeshRendererComponentDefinitionExtended extends MeshRendererComponentDefinition {
2656
+ export declare interface MeshRendererComponentDefinitionExtended extends ComponentDefinition<PBMeshRenderer> {
2693
2657
  /**
2694
2658
  * @public
2695
2659
  * Set a box in the MeshRenderer component
@@ -2729,6 +2693,9 @@ export declare class MessageBus {
2729
2693
  private flush;
2730
2694
  }
2731
2695
 
2696
+ /**
2697
+ * @public
2698
+ */
2732
2699
  export declare const enum NftFrameType {
2733
2700
  NFT_CLASSIC = 0,
2734
2701
  NFT_BAROQUE_ORNAMENT = 1,
@@ -2823,10 +2790,16 @@ export declare const onLeaveSceneObservable: Observable<{
2823
2790
  userId: string;
2824
2791
  }>;
2825
2792
 
2793
+ /**
2794
+ * @public
2795
+ */
2826
2796
  export declare type OnlyNonUndefinedTypes<T> = {
2827
2797
  [K in ExcludeUndefined<T>]: T[K];
2828
2798
  };
2829
2799
 
2800
+ /**
2801
+ * @public
2802
+ */
2830
2803
  export declare type OnlyOptionalUndefinedTypes<T> = {
2831
2804
  [K in IncludeUndefined<T>]?: T[K];
2832
2805
  };
@@ -2878,9 +2851,13 @@ export declare const onVideoEvent: Observable<{
2878
2851
 
2879
2852
  /**
2880
2853
  * @public
2854
+ * The overflow property controls what happens to content that is too big to fit into an area.
2881
2855
  */
2882
2856
  export declare type OverflowType = 'hidden' | 'scroll' | 'visible';
2883
2857
 
2858
+ /**
2859
+ * @public
2860
+ */
2884
2861
  export declare interface PBAnimationState {
2885
2862
  name: string;
2886
2863
  clip: string;
@@ -2895,25 +2872,15 @@ export declare interface PBAnimationState {
2895
2872
  }
2896
2873
 
2897
2874
  /**
2898
- * Internal
2875
+ * @public
2899
2876
  */
2900
- export declare const PBAnimationState: {
2901
- encode(message: PBAnimationState, writer?: _m0.Writer): _m0.Writer;
2902
- decode(input: _m0.Reader | Uint8Array, length?: number): PBAnimationState;
2903
- };
2904
-
2905
2877
  export declare interface PBAnimator {
2906
2878
  states: PBAnimationState[];
2907
2879
  }
2908
2880
 
2909
2881
  /**
2910
- * Internal
2882
+ * @public
2911
2883
  */
2912
- export declare const PBAnimator: {
2913
- encode(message: PBAnimator, writer?: _m0.Writer): _m0.Writer;
2914
- decode(input: _m0.Reader | Uint8Array, length?: number): PBAnimator;
2915
- };
2916
-
2917
2884
  export declare interface PBAudioSource {
2918
2885
  playing?: boolean | undefined;
2919
2886
  /** default=1.0f */
@@ -2925,13 +2892,8 @@ export declare interface PBAudioSource {
2925
2892
  }
2926
2893
 
2927
2894
  /**
2928
- * Internal
2895
+ * @public
2929
2896
  */
2930
- export declare const PBAudioSource: {
2931
- encode(message: PBAudioSource, writer?: _m0.Writer): _m0.Writer;
2932
- decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioSource;
2933
- };
2934
-
2935
2897
  export declare interface PBAudioStream {
2936
2898
  playing?: boolean | undefined;
2937
2899
  /** default=1.0f */
@@ -2940,13 +2902,8 @@ export declare interface PBAudioStream {
2940
2902
  }
2941
2903
 
2942
2904
  /**
2943
- * Internal
2905
+ * @public
2944
2906
  */
2945
- export declare const PBAudioStream: {
2946
- encode(message: PBAudioStream, writer?: _m0.Writer): _m0.Writer;
2947
- decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioStream;
2948
- };
2949
-
2950
2907
  export declare interface PBAvatarAttach {
2951
2908
  /** default's to current player avatar id if not provided */
2952
2909
  avatarId?: string | undefined;
@@ -2954,13 +2911,8 @@ export declare interface PBAvatarAttach {
2954
2911
  }
2955
2912
 
2956
2913
  /**
2957
- * Internal
2914
+ * @public
2958
2915
  */
2959
- export declare const PBAvatarAttach: {
2960
- encode(message: PBAvatarAttach, writer?: _m0.Writer): _m0.Writer;
2961
- decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarAttach;
2962
- };
2963
-
2964
2916
  export declare interface PBAvatarModifierArea {
2965
2917
  area: PBVector3 | undefined;
2966
2918
  excludeIds: string[];
@@ -2968,13 +2920,8 @@ export declare interface PBAvatarModifierArea {
2968
2920
  }
2969
2921
 
2970
2922
  /**
2971
- * Internal
2923
+ * @public
2972
2924
  */
2973
- export declare const PBAvatarModifierArea: {
2974
- encode(message: PBAvatarModifierArea, writer?: _m0.Writer): _m0.Writer;
2975
- decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarModifierArea;
2976
- };
2977
-
2978
2925
  export declare interface PBAvatarShape {
2979
2926
  id: string;
2980
2927
  /** default = NPC */
@@ -3006,51 +2953,31 @@ export declare interface PBAvatarShape {
3006
2953
  }
3007
2954
 
3008
2955
  /**
3009
- * Internal
2956
+ * @public
3010
2957
  */
3011
- export declare const PBAvatarShape: {
3012
- encode(message: PBAvatarShape, writer?: _m0.Writer): _m0.Writer;
3013
- decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarShape;
3014
- };
3015
-
3016
2958
  export declare interface PBBillboard {
3017
2959
  /** default=BM_ALL */
3018
2960
  billboardMode?: BillboardMode | undefined;
3019
2961
  }
3020
2962
 
3021
2963
  /**
3022
- * Internal
2964
+ * @public
3023
2965
  */
3024
- export declare const PBBillboard: {
3025
- encode(message: PBBillboard, writer?: _m0.Writer): _m0.Writer;
3026
- decode(input: _m0.Reader | Uint8Array, length?: number): PBBillboard;
3027
- };
3028
-
3029
2966
  export declare interface PBCameraMode {
3030
2967
  mode: CameraType;
3031
2968
  }
3032
2969
 
3033
2970
  /**
3034
- * Internal
2971
+ * @public
3035
2972
  */
3036
- export declare const PBCameraMode: {
3037
- encode(message: PBCameraMode, writer?: _m0.Writer): _m0.Writer;
3038
- decode(input: _m0.Reader | Uint8Array, length?: number): PBCameraMode;
3039
- };
3040
-
3041
2973
  export declare interface PBCameraModeArea {
3042
2974
  area: PBVector3 | undefined;
3043
2975
  mode: CameraType;
3044
2976
  }
3045
2977
 
3046
2978
  /**
3047
- * Internal
2979
+ * @public
3048
2980
  */
3049
- export declare const PBCameraModeArea: {
3050
- encode(message: PBCameraModeArea, writer?: _m0.Writer): _m0.Writer;
3051
- decode(input: _m0.Reader | Uint8Array, length?: number): PBCameraModeArea;
3052
- };
3053
-
3054
2981
  export declare interface PBColor3 {
3055
2982
  r: number;
3056
2983
  g: number;
@@ -3058,13 +2985,8 @@ export declare interface PBColor3 {
3058
2985
  }
3059
2986
 
3060
2987
  /**
3061
- * Internal
2988
+ * @public
3062
2989
  */
3063
- export declare const PBColor3: {
3064
- encode(message: PBColor3, writer?: _m0.Writer): _m0.Writer;
3065
- decode(input: _m0.Reader | Uint8Array, length?: number): PBColor3;
3066
- };
3067
-
3068
2990
  export declare interface PBColor4 {
3069
2991
  r: number;
3070
2992
  g: number;
@@ -3073,26 +2995,16 @@ export declare interface PBColor4 {
3073
2995
  }
3074
2996
 
3075
2997
  /**
3076
- * Internal
2998
+ * @public
3077
2999
  */
3078
- export declare const PBColor4: {
3079
- encode(message: PBColor4, writer?: _m0.Writer): _m0.Writer;
3080
- decode(input: _m0.Reader | Uint8Array, length?: number): PBColor4;
3081
- };
3082
-
3083
3000
  export declare interface PBGltfContainer {
3084
3001
  /** which file to load */
3085
3002
  src: string;
3086
3003
  }
3087
3004
 
3088
3005
  /**
3089
- * Internal
3006
+ * @public
3090
3007
  */
3091
- export declare const PBGltfContainer: {
3092
- encode(message: PBGltfContainer, writer?: _m0.Writer): _m0.Writer;
3093
- decode(input: _m0.Reader | Uint8Array, length?: number): PBGltfContainer;
3094
- };
3095
-
3096
3008
  export declare interface PBMaterial {
3097
3009
  material?: {
3098
3010
  $case: "unlit";
@@ -3104,13 +3016,8 @@ export declare interface PBMaterial {
3104
3016
  }
3105
3017
 
3106
3018
  /**
3107
- * Internal
3019
+ * @public
3108
3020
  */
3109
- export declare const PBMaterial: {
3110
- encode(message: PBMaterial, writer?: _m0.Writer): _m0.Writer;
3111
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMaterial;
3112
- };
3113
-
3114
3021
  export declare interface PBMaterial_PbrMaterial {
3115
3022
  /** default = null */
3116
3023
  texture?: TextureUnion | undefined;
@@ -3147,13 +3054,8 @@ export declare interface PBMaterial_PbrMaterial {
3147
3054
  }
3148
3055
 
3149
3056
  /**
3150
- * Internal
3057
+ * @public
3151
3058
  */
3152
- export declare const PBMaterial_PbrMaterial: {
3153
- encode(message: PBMaterial_PbrMaterial, writer?: _m0.Writer): _m0.Writer;
3154
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMaterial_PbrMaterial;
3155
- };
3156
-
3157
3059
  export declare interface PBMaterial_UnlitMaterial {
3158
3060
  /** default = null */
3159
3061
  texture?: TextureUnion | undefined;
@@ -3164,13 +3066,8 @@ export declare interface PBMaterial_UnlitMaterial {
3164
3066
  }
3165
3067
 
3166
3068
  /**
3167
- * Internal
3069
+ * @public
3168
3070
  */
3169
- export declare const PBMaterial_UnlitMaterial: {
3170
- encode(message: PBMaterial_UnlitMaterial, writer?: _m0.Writer): _m0.Writer;
3171
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMaterial_UnlitMaterial;
3172
- };
3173
-
3174
3071
  export declare interface PBMeshCollider {
3175
3072
  /** default = ColliderLayer.Physics | ColliderLayer.Pointer */
3176
3073
  collisionMask?: number | undefined;
@@ -3190,24 +3087,14 @@ export declare interface PBMeshCollider {
3190
3087
  }
3191
3088
 
3192
3089
  /**
3193
- * Internal
3090
+ * @public
3194
3091
  */
3195
- export declare const PBMeshCollider: {
3196
- encode(message: PBMeshCollider, writer?: _m0.Writer): _m0.Writer;
3197
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshCollider;
3198
- };
3199
-
3200
3092
  export declare interface PBMeshCollider_BoxMesh {
3201
3093
  }
3202
3094
 
3203
3095
  /**
3204
- * Internal
3096
+ * @public
3205
3097
  */
3206
- export declare const PBMeshCollider_BoxMesh: {
3207
- encode(_: PBMeshCollider_BoxMesh, writer?: _m0.Writer): _m0.Writer;
3208
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshCollider_BoxMesh;
3209
- };
3210
-
3211
3098
  export declare interface PBMeshCollider_CylinderMesh {
3212
3099
  /** default=1.0 */
3213
3100
  radiusTop?: number | undefined;
@@ -3216,35 +3103,20 @@ export declare interface PBMeshCollider_CylinderMesh {
3216
3103
  }
3217
3104
 
3218
3105
  /**
3219
- * Internal
3106
+ * @public
3220
3107
  */
3221
- export declare const PBMeshCollider_CylinderMesh: {
3222
- encode(message: PBMeshCollider_CylinderMesh, writer?: _m0.Writer): _m0.Writer;
3223
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshCollider_CylinderMesh;
3224
- };
3225
-
3226
3108
  export declare interface PBMeshCollider_PlaneMesh {
3227
3109
  }
3228
3110
 
3229
3111
  /**
3230
- * Internal
3112
+ * @public
3231
3113
  */
3232
- export declare const PBMeshCollider_PlaneMesh: {
3233
- encode(_: PBMeshCollider_PlaneMesh, writer?: _m0.Writer): _m0.Writer;
3234
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshCollider_PlaneMesh;
3235
- };
3236
-
3237
3114
  export declare interface PBMeshCollider_SphereMesh {
3238
3115
  }
3239
3116
 
3240
3117
  /**
3241
- * Internal
3118
+ * @public
3242
3119
  */
3243
- export declare const PBMeshCollider_SphereMesh: {
3244
- encode(_: PBMeshCollider_SphereMesh, writer?: _m0.Writer): _m0.Writer;
3245
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshCollider_SphereMesh;
3246
- };
3247
-
3248
3120
  export declare interface PBMeshRenderer {
3249
3121
  mesh?: {
3250
3122
  $case: "box";
@@ -3262,25 +3134,15 @@ export declare interface PBMeshRenderer {
3262
3134
  }
3263
3135
 
3264
3136
  /**
3265
- * Internal
3137
+ * @public
3266
3138
  */
3267
- export declare const PBMeshRenderer: {
3268
- encode(message: PBMeshRenderer, writer?: _m0.Writer): _m0.Writer;
3269
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshRenderer;
3270
- };
3271
-
3272
3139
  export declare interface PBMeshRenderer_BoxMesh {
3273
3140
  uvs: number[];
3274
3141
  }
3275
3142
 
3276
3143
  /**
3277
- * Internal
3144
+ * @public
3278
3145
  */
3279
- export declare const PBMeshRenderer_BoxMesh: {
3280
- encode(message: PBMeshRenderer_BoxMesh, writer?: _m0.Writer): _m0.Writer;
3281
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshRenderer_BoxMesh;
3282
- };
3283
-
3284
3146
  export declare interface PBMeshRenderer_CylinderMesh {
3285
3147
  /** default=1.0 */
3286
3148
  radiusTop?: number | undefined;
@@ -3289,36 +3151,21 @@ export declare interface PBMeshRenderer_CylinderMesh {
3289
3151
  }
3290
3152
 
3291
3153
  /**
3292
- * Internal
3154
+ * @public
3293
3155
  */
3294
- export declare const PBMeshRenderer_CylinderMesh: {
3295
- encode(message: PBMeshRenderer_CylinderMesh, writer?: _m0.Writer): _m0.Writer;
3296
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshRenderer_CylinderMesh;
3297
- };
3298
-
3299
3156
  export declare interface PBMeshRenderer_PlaneMesh {
3300
3157
  uvs: number[];
3301
3158
  }
3302
3159
 
3303
3160
  /**
3304
- * Internal
3161
+ * @public
3305
3162
  */
3306
- export declare const PBMeshRenderer_PlaneMesh: {
3307
- encode(message: PBMeshRenderer_PlaneMesh, writer?: _m0.Writer): _m0.Writer;
3308
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshRenderer_PlaneMesh;
3309
- };
3310
-
3311
3163
  export declare interface PBMeshRenderer_SphereMesh {
3312
3164
  }
3313
3165
 
3314
3166
  /**
3315
- * Internal
3167
+ * @public
3316
3168
  */
3317
- export declare const PBMeshRenderer_SphereMesh: {
3318
- encode(_: PBMeshRenderer_SphereMesh, writer?: _m0.Writer): _m0.Writer;
3319
- decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshRenderer_SphereMesh;
3320
- };
3321
-
3322
3169
  export declare interface PBNftShape {
3323
3170
  src: string;
3324
3171
  /** default = PictureFrameStyle.Classic */
@@ -3328,38 +3175,23 @@ export declare interface PBNftShape {
3328
3175
  }
3329
3176
 
3330
3177
  /**
3331
- * Internal
3178
+ * @public
3332
3179
  */
3333
- export declare const PBNftShape: {
3334
- encode(message: PBNftShape, writer?: _m0.Writer): _m0.Writer;
3335
- decode(input: _m0.Reader | Uint8Array, length?: number): PBNftShape;
3336
- };
3337
-
3338
3180
  export declare interface PBPointerEvents {
3339
3181
  pointerEvents: PBPointerEvents_Entry[];
3340
3182
  }
3341
3183
 
3342
3184
  /**
3343
- * Internal
3185
+ * @public
3344
3186
  */
3345
- export declare const PBPointerEvents: {
3346
- encode(message: PBPointerEvents, writer?: _m0.Writer): _m0.Writer;
3347
- decode(input: _m0.Reader | Uint8Array, length?: number): PBPointerEvents;
3348
- };
3349
-
3350
3187
  export declare interface PBPointerEvents_Entry {
3351
3188
  eventType: PointerEventType;
3352
3189
  eventInfo: PBPointerEvents_Info | undefined;
3353
3190
  }
3354
3191
 
3355
3192
  /**
3356
- * Internal
3193
+ * @public
3357
3194
  */
3358
- export declare const PBPointerEvents_Entry: {
3359
- encode(message: PBPointerEvents_Entry, writer?: _m0.Writer): _m0.Writer;
3360
- decode(input: _m0.Reader | Uint8Array, length?: number): PBPointerEvents_Entry;
3361
- };
3362
-
3363
3195
  export declare interface PBPointerEvents_Info {
3364
3196
  /** default=InputAction.ANY */
3365
3197
  button?: InputAction | undefined;
@@ -3371,29 +3203,19 @@ export declare interface PBPointerEvents_Info {
3371
3203
  showFeedback?: boolean | undefined;
3372
3204
  }
3373
3205
 
3206
+ /** the renderer will set this component to the root entity once per frame with all the events */
3374
3207
  /**
3375
- * Internal
3208
+ * @public
3376
3209
  */
3377
- export declare const PBPointerEvents_Info: {
3378
- encode(message: PBPointerEvents_Info, writer?: _m0.Writer): _m0.Writer;
3379
- decode(input: _m0.Reader | Uint8Array, length?: number): PBPointerEvents_Info;
3380
- };
3381
-
3382
- /** the renderer will set this component to the root entity once per frame with all the events */
3383
3210
  export declare interface PBPointerEventsResult {
3384
3211
  /** a list of the last N pointer commands (from the engine) */
3385
3212
  commands: PBPointerEventsResult_PointerCommand[];
3386
3213
  }
3387
3214
 
3215
+ /** this message represents a pointer event, used both for UP and DOWN actions */
3388
3216
  /**
3389
- * Internal
3217
+ * @public
3390
3218
  */
3391
- export declare const PBPointerEventsResult: {
3392
- encode(message: PBPointerEventsResult, writer?: _m0.Writer): _m0.Writer;
3393
- decode(input: _m0.Reader | Uint8Array, length?: number): PBPointerEventsResult;
3394
- };
3395
-
3396
- /** this message represents a pointer event, used both for UP and DOWN actions */
3397
3219
  export declare interface PBPointerEventsResult_PointerCommand {
3398
3220
  /** identifier of the input */
3399
3221
  button: InputAction;
@@ -3406,25 +3228,15 @@ export declare interface PBPointerEventsResult_PointerCommand {
3406
3228
  }
3407
3229
 
3408
3230
  /**
3409
- * Internal
3231
+ * @public
3410
3232
  */
3411
- export declare const PBPointerEventsResult_PointerCommand: {
3412
- encode(message: PBPointerEventsResult_PointerCommand, writer?: _m0.Writer): _m0.Writer;
3413
- decode(input: _m0.Reader | Uint8Array, length?: number): PBPointerEventsResult_PointerCommand;
3414
- };
3415
-
3416
3233
  export declare interface PBPointerLock {
3417
3234
  isPointerLocked: boolean;
3418
3235
  }
3419
3236
 
3420
3237
  /**
3421
- * Internal
3238
+ * @public
3422
3239
  */
3423
- export declare const PBPointerLock: {
3424
- encode(message: PBPointerLock, writer?: _m0.Writer): _m0.Writer;
3425
- decode(input: _m0.Reader | Uint8Array, length?: number): PBPointerLock;
3426
- };
3427
-
3428
3240
  export declare interface PBPosition {
3429
3241
  x: number;
3430
3242
  y: number;
@@ -3432,13 +3244,8 @@ export declare interface PBPosition {
3432
3244
  }
3433
3245
 
3434
3246
  /**
3435
- * Internal
3247
+ * @public
3436
3248
  */
3437
- export declare const PBPosition: {
3438
- encode(message: PBPosition, writer?: _m0.Writer): _m0.Writer;
3439
- decode(input: _m0.Reader | Uint8Array, length?: number): PBPosition;
3440
- };
3441
-
3442
3249
  export declare interface PBRaycast {
3443
3250
  origin: PBVector3 | undefined;
3444
3251
  direction: PBVector3 | undefined;
@@ -3447,13 +3254,8 @@ export declare interface PBRaycast {
3447
3254
  }
3448
3255
 
3449
3256
  /**
3450
- * Internal
3257
+ * @public
3451
3258
  */
3452
- export declare const PBRaycast: {
3453
- encode(message: PBRaycast, writer?: _m0.Writer): _m0.Writer;
3454
- decode(input: _m0.Reader | Uint8Array, length?: number): PBRaycast;
3455
- };
3456
-
3457
3259
  export declare interface PBRaycastResult {
3458
3260
  timestamp: number;
3459
3261
  origin: PBVector3 | undefined;
@@ -3462,13 +3264,8 @@ export declare interface PBRaycastResult {
3462
3264
  }
3463
3265
 
3464
3266
  /**
3465
- * Internal
3267
+ * @public
3466
3268
  */
3467
- export declare const PBRaycastResult: {
3468
- encode(message: PBRaycastResult, writer?: _m0.Writer): _m0.Writer;
3469
- decode(input: _m0.Reader | Uint8Array, length?: number): PBRaycastResult;
3470
- };
3471
-
3472
3269
  export declare interface PBTextShape {
3473
3270
  text: string;
3474
3271
  /** default=F_SANS_SERIF */
@@ -3505,13 +3302,8 @@ export declare interface PBTextShape {
3505
3302
  }
3506
3303
 
3507
3304
  /**
3508
- * Internal
3305
+ * @public
3509
3306
  */
3510
- export declare const PBTextShape: {
3511
- encode(message: PBTextShape, writer?: _m0.Writer): _m0.Writer;
3512
- decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
3513
- };
3514
-
3515
3307
  export declare interface PBUiBackground {
3516
3308
  /** default=(1.0, 1.0, 1.0, 1.0), pixel = color * sample2D(texture, uv) */
3517
3309
  color?: PBColor4 | undefined;
@@ -3524,13 +3316,8 @@ export declare interface PBUiBackground {
3524
3316
  }
3525
3317
 
3526
3318
  /**
3527
- * Internal
3319
+ * @public
3528
3320
  */
3529
- export declare const PBUiBackground: {
3530
- encode(message: PBUiBackground, writer?: _m0.Writer): _m0.Writer;
3531
- decode(input: _m0.Reader | Uint8Array, length?: number): PBUiBackground;
3532
- };
3533
-
3534
3321
  export declare interface PBUiDropdown {
3535
3322
  acceptEmpty: boolean;
3536
3323
  emptyLabel?: string | undefined;
@@ -3549,25 +3336,15 @@ export declare interface PBUiDropdown {
3549
3336
  }
3550
3337
 
3551
3338
  /**
3552
- * Internal
3339
+ * @public
3553
3340
  */
3554
- export declare const PBUiDropdown: {
3555
- encode(message: PBUiDropdown, writer?: _m0.Writer): _m0.Writer;
3556
- decode(input: _m0.Reader | Uint8Array, length?: number): PBUiDropdown;
3557
- };
3558
-
3559
3341
  export declare interface PBUiDropdownResult {
3560
3342
  value: number;
3561
3343
  }
3562
3344
 
3563
3345
  /**
3564
- * Internal
3346
+ * @public
3565
3347
  */
3566
- export declare const PBUiDropdownResult: {
3567
- encode(message: PBUiDropdownResult, writer?: _m0.Writer): _m0.Writer;
3568
- decode(input: _m0.Reader | Uint8Array, length?: number): PBUiDropdownResult;
3569
- };
3570
-
3571
3348
  export declare interface PBUiInput {
3572
3349
  placeholder: string;
3573
3350
  /** default=(0.0,0.0,0.0,1.0) */
@@ -3584,25 +3361,15 @@ export declare interface PBUiInput {
3584
3361
  }
3585
3362
 
3586
3363
  /**
3587
- * Internal
3364
+ * @public
3588
3365
  */
3589
- export declare const PBUiInput: {
3590
- encode(message: PBUiInput, writer?: _m0.Writer): _m0.Writer;
3591
- decode(input: _m0.Reader | Uint8Array, length?: number): PBUiInput;
3592
- };
3593
-
3594
3366
  export declare interface PBUiInputResult {
3595
3367
  value: string;
3596
3368
  }
3597
3369
 
3598
3370
  /**
3599
- * Internal
3371
+ * @public
3600
3372
  */
3601
- export declare const PBUiInputResult: {
3602
- encode(message: PBUiInputResult, writer?: _m0.Writer): _m0.Writer;
3603
- decode(input: _m0.Reader | Uint8Array, length?: number): PBUiInputResult;
3604
- };
3605
-
3606
3373
  export declare interface PBUiText {
3607
3374
  value: string;
3608
3375
  /** default=(1.0,1.0,1.0,1.0) */
@@ -3616,13 +3383,8 @@ export declare interface PBUiText {
3616
3383
  }
3617
3384
 
3618
3385
  /**
3619
- * Internal
3386
+ * @public
3620
3387
  */
3621
- export declare const PBUiText: {
3622
- encode(message: PBUiText, writer?: _m0.Writer): _m0.Writer;
3623
- decode(input: _m0.Reader | Uint8Array, length?: number): PBUiText;
3624
- };
3625
-
3626
3388
  export declare interface PBUiTransform {
3627
3389
  parent: number;
3628
3390
  rightOf: number;
@@ -3707,26 +3469,16 @@ export declare interface PBUiTransform {
3707
3469
  }
3708
3470
 
3709
3471
  /**
3710
- * Internal
3472
+ * @public
3711
3473
  */
3712
- export declare const PBUiTransform: {
3713
- encode(message: PBUiTransform, writer?: _m0.Writer): _m0.Writer;
3714
- decode(input: _m0.Reader | Uint8Array, length?: number): PBUiTransform;
3715
- };
3716
-
3717
3474
  export declare interface PBVector2 {
3718
3475
  x: number;
3719
3476
  y: number;
3720
3477
  }
3721
3478
 
3722
3479
  /**
3723
- * Internal
3480
+ * @public
3724
3481
  */
3725
- export declare const PBVector2: {
3726
- encode(message: PBVector2, writer?: _m0.Writer): _m0.Writer;
3727
- decode(input: _m0.Reader | Uint8Array, length?: number): PBVector2;
3728
- };
3729
-
3730
3482
  export declare interface PBVector3 {
3731
3483
  x: number;
3732
3484
  y: number;
@@ -3734,26 +3486,13 @@ export declare interface PBVector3 {
3734
3486
  }
3735
3487
 
3736
3488
  /**
3737
- * Internal
3489
+ * @public
3738
3490
  */
3739
- export declare const PBVector3: {
3740
- encode(message: PBVector3, writer?: _m0.Writer): _m0.Writer;
3741
- decode(input: _m0.Reader | Uint8Array, length?: number): PBVector3;
3742
- };
3743
-
3744
3491
  export declare interface PBVisibilityComponent {
3745
3492
  /** default=true */
3746
3493
  visible?: boolean | undefined;
3747
3494
  }
3748
3495
 
3749
- /**
3750
- * Internal
3751
- */
3752
- export declare const PBVisibilityComponent: {
3753
- encode(message: PBVisibilityComponent, writer?: _m0.Writer): _m0.Writer;
3754
- decode(input: _m0.Reader | Uint8Array, length?: number): PBVisibilityComponent;
3755
- };
3756
-
3757
3496
  /**
3758
3497
  * Represens a plane by the equation ax + by + cz + d = 0
3759
3498
  * @public
@@ -3878,17 +3617,49 @@ export declare const PointerEvents: ComponentDefinition<PBPointerEvents>;
3878
3617
  /** @public */
3879
3618
  export declare const PointerEventsResult: ComponentDefinition<PBPointerEventsResult>;
3880
3619
 
3881
- export declare type PointerEventsSystem = ReturnType<typeof createPointerEventSystem>;
3882
-
3883
- export declare const pointerEventsSystem: {
3884
- removeOnClick(entity: Entity): void;
3620
+ /**
3621
+ * @public
3622
+ */
3623
+ export declare interface PointerEventsSystem {
3624
+ /**
3625
+ * @public
3626
+ * Remove the callback for onPointerDown event
3627
+ * @param entity - Entity where the callback was attached
3628
+ */
3885
3629
  removeOnPointerDown(entity: Entity): void;
3630
+ /**
3631
+ * @public
3632
+ * Remove the callback for onPointerUp event
3633
+ * @param entity - Entity where the callback was attached
3634
+ */
3886
3635
  removeOnPointerUp(entity: Entity): void;
3887
- onClick(entity: Entity, cb: EventSystemCallback, opts?: Partial<EventSystemOptions> | undefined): void;
3888
- onPointerDown(entity: Entity, cb: EventSystemCallback, opts?: Partial<EventSystemOptions> | undefined): void;
3889
- onPointerUp(entity: Entity, cb: EventSystemCallback, opts?: Partial<EventSystemOptions> | undefined): void;
3890
- };
3636
+ /**
3637
+ * @public
3638
+ * Execute callback when the user press the InputButton pointing at the entity
3639
+ * @param entity - Entity to attach the callback
3640
+ * @param cb - Function to execute when click fires
3641
+ * @param opts - Opts to trigger Feedback and Button
3642
+ */
3643
+ onPointerDown(entity: Entity, cb: EventSystemCallback, opts?: Partial<EventSystemOptions>): void;
3644
+ /**
3645
+ * @public
3646
+ * Execute callback when the user releases the InputButton pointing at the entity
3647
+ * @param entity - Entity to attach the callback
3648
+ * @param cb - Function to execute when click fires
3649
+ * @param opts - Opts to trigger Feedback and Button
3650
+ */
3651
+ onPointerUp(entity: Entity, cb: EventSystemCallback, opts?: Partial<EventSystemOptions>): void;
3652
+ }
3653
+
3654
+ /**
3655
+ * @public
3656
+ * Register callback functions to a particular entity.
3657
+ */
3658
+ export declare const pointerEventsSystem: PointerEventsSystem;
3891
3659
 
3660
+ /**
3661
+ * @public
3662
+ */
3892
3663
  export declare const enum PointerEventType {
3893
3664
  PET_UP = 0,
3894
3665
  PET_DOWN = 1,
@@ -3900,31 +3671,37 @@ export declare const enum PointerEventType {
3900
3671
  export declare const PointerLock: ComponentDefinition<PBPointerLock>;
3901
3672
 
3902
3673
  /**
3674
+ * Type used for defining the position of the element. i.e. margin, padding
3903
3675
  * @public
3904
3676
  */
3905
- export declare type Position = {
3677
+ export declare interface Position {
3906
3678
  top: PositionUnit;
3907
3679
  right: PositionUnit;
3908
3680
  bottom: PositionUnit;
3909
3681
  left: PositionUnit;
3910
- };
3682
+ }
3911
3683
 
3912
3684
  /**
3913
3685
  * @public
3686
+ * The position property specifies the type of positioning method used for an element
3914
3687
  */
3915
3688
  export declare type PositionType = 'absolute' | 'relative';
3916
3689
 
3690
+ /**
3691
+ * Position unit for the user.
3692
+ * i.e. width="100", width="100%", width="100px"
3693
+ * @public
3694
+ */
3917
3695
  export declare type PositionUnit = `${number}px` | `${number}%` | number;
3918
3696
 
3919
- export declare type PutComponentMessage = CrdtMessageHeader & PutComponentMessageBody;
3920
-
3921
3697
  /**
3922
3698
  * Min. length = header (8 bytes) + 20 bytes = 28 bytes
3923
3699
  *
3924
- * @param entity - Uint32 number of the entity
3925
- * @param componentId - Uint32 number of id
3700
+ * @param entity - uint32 number of the entity
3701
+ * @param componentId - uint32 number of id
3926
3702
  * @param timestamp - Uint64 Lamport timestamp
3927
3703
  * @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
3704
+ * @public
3928
3705
  */
3929
3706
  export declare type PutComponentMessageBody = {
3930
3707
  type: CrdtMessageType.PUT_COMPONENT;
@@ -3934,16 +3711,6 @@ export declare type PutComponentMessageBody = {
3934
3711
  data: Uint8Array;
3935
3712
  };
3936
3713
 
3937
- export declare namespace PutComponentOperation {
3938
- const MESSAGE_HEADER_LENGTH = 20;
3939
- /**
3940
- * Call this function for an optimal writing data passing the ByteBuffer
3941
- * already allocated
3942
- */
3943
- export function write(entity: Entity, timestamp: number, componentDefinition: ComponentDefinition<unknown>, buf: ByteBuffer): void;
3944
- export function read(buf: ByteBuffer): PutComponentMessage | null;
3945
- }
3946
-
3947
3714
  /**
3948
3715
  * @public
3949
3716
  * Quaternion is a type and a namespace.
@@ -4211,6 +3978,9 @@ export declare const RAD2DEG: number;
4211
3978
  export declare const Raycast: ComponentDefinition<PBRaycast>;
4212
3979
 
4213
3980
  /** Position will be relative to the scene */
3981
+ /**
3982
+ * @public
3983
+ */
4214
3984
  export declare interface RaycastHit {
4215
3985
  position: PBVector3 | undefined;
4216
3986
  origin: PBVector3 | undefined;
@@ -4222,13 +3992,8 @@ export declare interface RaycastHit {
4222
3992
  }
4223
3993
 
4224
3994
  /**
4225
- * Internal
3995
+ * @public
4226
3996
  */
4227
- export declare const RaycastHit: {
4228
- encode(message: RaycastHit, writer?: _m0.Writer): _m0.Writer;
4229
- decode(input: _m0.Reader | Uint8Array, length?: number): RaycastHit;
4230
- };
4231
-
4232
3997
  export declare const enum RaycastQueryType {
4233
3998
  RQT_HIT_FIRST = 0,
4234
3999
  RQT_QUERY_ALL = 1
@@ -4243,21 +4008,45 @@ export declare type RaycastResponsePayload<T> = {
4243
4008
  /** @public */
4244
4009
  export declare const RaycastResult: ComponentDefinition<PBRaycastResult>;
4245
4010
 
4246
- export declare type ReactBasedUiSystem = {
4011
+ /**
4012
+ * @public
4013
+ */
4014
+ export declare interface ReactBasedUiSystem {
4247
4015
  destroy(): void;
4248
4016
  setUiRenderer(ui: UiComponent): void;
4249
- };
4017
+ }
4250
4018
 
4019
+ /**
4020
+ * @public
4021
+ */
4251
4022
  export declare namespace ReactEcs {
4252
4023
  export namespace JSX {
4024
+ /**
4025
+ * @public
4026
+ */
4253
4027
  export type Element = {} | null;
4028
+ /**
4029
+ * @public
4030
+ * HTML tag elements
4031
+ */
4254
4032
  export type IntrinsicElements = EcsElements;
4033
+ /**
4034
+ * @public
4035
+ * Component empty interface
4036
+ */
4255
4037
  export interface Component {
4256
4038
  }
4257
4039
  }
4258
4040
  const createElement: any;
4259
4041
  }
4260
4042
 
4043
+ /**
4044
+ * ReactEcs variable provides the function to render & destroy the specified UI
4045
+ * @public
4046
+ * @example
4047
+ * import { ReactEcsRenderer } from '@dcl/sdk/react-ecs'
4048
+ * ReactEcsRenderer.setUiRenderer(uiComponent)
4049
+ */
4261
4050
  export declare const ReactEcsRenderer: ReactBasedUiSystem;
4262
4051
 
4263
4052
  /**
@@ -4272,16 +4061,14 @@ export declare type ReadonlyComponentSchema<T extends [ComponentDefinition<unkno
4272
4061
  */
4273
4062
  export declare type ReadonlyPrimitive = number | string | number[] | string[] | boolean | boolean[];
4274
4063
 
4064
+ /**
4065
+ * @public
4066
+ */
4275
4067
  export declare type ReceiveMessage = CrdtMessageBody & {
4276
4068
  transportId?: number;
4277
4069
  messageBuffer: Uint8Array;
4278
4070
  };
4279
4071
 
4280
- /**
4281
- * @public This first 512 entities are reserved by the renderer
4282
- */
4283
- export declare const RESERVED_STATIC_ENTITIES = 512;
4284
-
4285
4072
  export declare type RPCSendableMessage = {
4286
4073
  jsonrpc: '2.0';
4287
4074
  id: number;
@@ -4485,25 +4272,44 @@ export declare namespace Scalar {
4485
4272
  * @public
4486
4273
  */
4487
4274
  export declare namespace Schemas {
4275
+ /** @public */
4488
4276
  export type SchemaType = ISchema;
4277
+ /** @public */
4489
4278
  const Boolean: ISchema<boolean>;
4279
+ /** @public */
4490
4280
  const String: ISchema<string>;
4281
+ /** @public */
4491
4282
  const Float: ISchema<number>;
4283
+ /** @public */
4492
4284
  const Double: ISchema<number>;
4285
+ /** @public */
4493
4286
  const Byte: ISchema<number>;
4287
+ /** @public */
4494
4288
  const Short: ISchema<number>;
4289
+ /** @public */
4495
4290
  const Int: ISchema<number>;
4291
+ /** @public */
4496
4292
  const Int64: ISchema<number>;
4293
+ /** @public */
4497
4294
  const Number: ISchema<number>;
4295
+ /** @public */
4498
4296
  const Vector3: ISchema<Vector3Type>;
4297
+ /** @public */
4499
4298
  const Quaternion: ISchema<QuaternionType>;
4299
+ /** @public */
4500
4300
  const Color3: ISchema<Color3Type>;
4301
+ /** @public */
4501
4302
  const Color4: ISchema<Color4Type>;
4303
+ /** @public */
4502
4304
  const Entity: ISchema<Entity>;
4503
- const Enum: typeof IEnum;
4504
- const Array: typeof IArray;
4505
- const Map: typeof IMap;
4506
- const Optional: typeof IOptional;
4305
+ /** @public */
4306
+ const Enum: <T>(type: ISchema<any>) => ISchema<T>;
4307
+ /** @public */
4308
+ const Array: <T>(type: ISchema<T>) => ISchema<T[]>;
4309
+ /** @public */
4310
+ const Map: <T extends Spec>(spec: T, defaultValue?: Partial<MapResult<T>> | undefined) => ISchema<MapResult<T>>;
4311
+ /** @public */
4312
+ const Optional: <T>(spec: ISchema<T>) => ISchema<T | undefined>;
4507
4313
  }
4508
4314
 
4509
4315
  /**
@@ -4526,6 +4332,9 @@ export declare type SystemItem = {
4526
4332
 
4527
4333
  export declare type Task<T = unknown> = () => Promise<T>;
4528
4334
 
4335
+ /**
4336
+ * @public
4337
+ */
4529
4338
  export declare const enum TextAlignMode {
4530
4339
  TAM_TOP_LEFT = 0,
4531
4340
  TAM_TOP_CENTER = 1,
@@ -4546,6 +4355,9 @@ export declare type TextAlignType = 'top-left' | 'top-center' | 'top-right' | 'm
4546
4355
  /** @public */
4547
4356
  export declare const TextShape: ComponentDefinition<PBTextShape>;
4548
4357
 
4358
+ /**
4359
+ * @public
4360
+ */
4549
4361
  export declare interface Texture {
4550
4362
  src: string;
4551
4363
  /** default = TextureWrapMode.Clamp */
@@ -4555,13 +4367,8 @@ export declare interface Texture {
4555
4367
  }
4556
4368
 
4557
4369
  /**
4558
- * Internal
4370
+ * @public
4559
4371
  */
4560
- export declare const Texture: {
4561
- encode(message: Texture, writer?: _m0.Writer): _m0.Writer;
4562
- decode(input: _m0.Reader | Uint8Array, length?: number): Texture;
4563
- };
4564
-
4565
4372
  export declare const enum TextureFilterMode {
4566
4373
  TFM_POINT = 0,
4567
4374
  TFM_BILINEAR = 1,
@@ -4576,7 +4383,7 @@ export declare type TextureFilterType = 'point' | 'bi-linear' | 'tri-linear';
4576
4383
  /**
4577
4384
  * @public
4578
4385
  */
4579
- export declare type TextureHelper = {
4386
+ export declare interface TextureHelper {
4580
4387
  /**
4581
4388
  * @returns a common texture with a source file
4582
4389
  */
@@ -4585,7 +4392,7 @@ export declare type TextureHelper = {
4585
4392
  * @returns the avatar texture of userId specified
4586
4393
  */
4587
4394
  Avatar: (avatarTexture: AvatarTexture) => TextureUnion;
4588
- };
4395
+ }
4589
4396
 
4590
4397
  /**
4591
4398
  * @public
@@ -4603,6 +4410,9 @@ export declare type TextureHelper = {
4603
4410
  */
4604
4411
  export declare type TextureMode = 'nine-slices' | 'center' | 'stretch';
4605
4412
 
4413
+ /**
4414
+ * @public
4415
+ */
4606
4416
  export declare interface TextureUnion {
4607
4417
  tex?: {
4608
4418
  $case: "texture";
@@ -4614,13 +4424,8 @@ export declare interface TextureUnion {
4614
4424
  }
4615
4425
 
4616
4426
  /**
4617
- * Internal
4427
+ * @public
4618
4428
  */
4619
- export declare const TextureUnion: {
4620
- encode(message: TextureUnion, writer?: _m0.Writer): _m0.Writer;
4621
- decode(input: _m0.Reader | Uint8Array, length?: number): TextureUnion;
4622
- };
4623
-
4624
4429
  export declare const enum TextureWrapMode {
4625
4430
  TWM_REPEAT = 0,
4626
4431
  TWM_CLAMP = 1,
@@ -4645,6 +4450,9 @@ export declare const ToGammaSpace: number;
4645
4450
  */
4646
4451
  export declare const ToLinearSpace = 2.2;
4647
4452
 
4453
+ /**
4454
+ * @public
4455
+ */
4648
4456
  export declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
4649
4457
 
4650
4458
  export declare const Transform: TransformComponentExtended;
@@ -4690,66 +4498,89 @@ export declare type TransformType = {
4690
4498
  */
4691
4499
  export declare type TransformTypeWithOptionals = Partial<TransformType>;
4692
4500
 
4501
+ /**
4502
+ * @public
4503
+ */
4693
4504
  export declare type Transport = {
4694
4505
  send(message: Uint8Array): Promise<void>;
4695
4506
  onmessage?(message: Uint8Array): void;
4696
4507
  filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
4697
4508
  };
4698
4509
 
4510
+ /**
4511
+ * @public
4512
+ */
4699
4513
  export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
4700
4514
 
4701
4515
  /**
4516
+ * Avatar Texture
4702
4517
  * @public
4703
4518
  */
4704
- export declare type UiAvatarTexture = {
4705
- avatarTexture?: {
4706
- userId: string;
4707
- wrapMode?: TextureWrapType;
4708
- filterMode?: TextureFilterType;
4709
- };
4710
- };
4519
+ export declare interface UiAvatarTexture {
4520
+ userId: string;
4521
+ wrapMode?: TextureWrapType;
4522
+ filterMode?: TextureFilterType;
4523
+ }
4711
4524
 
4712
4525
  /** @public */
4713
4526
  export declare const UiBackground: ComponentDefinition<PBUiBackground>;
4714
4527
 
4715
4528
  /**
4716
4529
  * @public
4530
+ * Background Component props
4531
+ * .i.e to define a background color or image
4717
4532
  */
4718
- export declare type UiBackgroundProps = {
4533
+ export declare interface UiBackgroundProps {
4534
+ /** Background color. @defaultValue `{ r: 1, g: 1, b: 1, a: 1 }` */
4719
4535
  color?: PBColor4 | undefined;
4720
4536
  textureMode?: TextureMode;
4537
+ /** Texture slices represents the top | right | bottom | left sizes of the slices for the borders. Values are percentages of the texture. */
4721
4538
  textureSlices?: BorderRect | undefined;
4539
+ /** when STRETCH is selected, the uvs are configurable */
4722
4540
  uvs?: number[];
4723
- } & UiTextureUnion;
4541
+ /** AvatarTexture for the background */
4542
+ avatarTexture?: UiAvatarTexture;
4543
+ /** Texture for the background */
4544
+ texture?: UiTexture;
4545
+ }
4724
4546
 
4725
4547
  /**
4548
+ * Button Component Props
4726
4549
  * @public
4727
4550
  */
4728
- export declare type UiButtonProps = UiLabelProps & {
4729
- type?: 'primary' | 'secondary';
4730
- };
4551
+ export declare interface UiButtonProps extends UiLabelProps, EntityPropTypes {
4552
+ /**
4553
+ * Use any of the available button style types to create a styled button.
4554
+ */
4555
+ variant?: 'primary' | 'secondary';
4556
+ }
4731
4557
 
4732
- export declare type UiComponent = () => JSX.Element;
4558
+ /**
4559
+ * @public
4560
+ */
4561
+ export declare type UiComponent = () => ReactEcs.JSX.Element;
4733
4562
 
4734
4563
  /** @public */
4735
4564
  export declare const UiDropdown: ComponentDefinition<PBUiDropdown>;
4736
4565
 
4737
4566
  /**
4738
4567
  * @public
4568
+ * Dropdown Props
4739
4569
  */
4740
- export declare type UiDropdownProps = Partial<Omit<PBUiDropdown, 'textAlign' | 'font'>> & {
4570
+ export declare interface UiDropdownProps extends EntityPropTypes, Omit<Partial<PBUiDropdown>, 'textAlign' | 'font'> {
4741
4571
  onChange?(value: number): void;
4742
4572
  font?: UiFontType;
4743
4573
  textAlign?: TextAlignType;
4744
- };
4574
+ }
4745
4575
 
4746
4576
  /** @public */
4747
4577
  export declare const UiDropdownResult: ComponentDefinition<PBUiDropdownResult>;
4748
4578
 
4749
4579
  /**
4750
4580
  * @public
4581
+ * @category Component
4751
4582
  */
4752
- export declare function UiEntity(props: EntityPropTypes & Partial<CommonProps>): ReactEcs.JSX.Element;
4583
+ export declare function UiEntity(props: EntityPropTypes): ReactEcs.JSX.Element;
4753
4584
 
4754
4585
  /**
4755
4586
  * @public
@@ -4762,26 +4593,32 @@ export declare const UiInput: ComponentDefinition<PBUiInput>;
4762
4593
  /**
4763
4594
  * @public
4764
4595
  */
4765
- export declare type UiInputProps = Omit<PBUiInput, 'font' | 'textAlign'> & {
4596
+ export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlign'> {
4597
+ /** function to be called on value change */
4766
4598
  onChange?(value: string): void;
4767
4599
  font?: UiFontType;
4768
4600
  textAlign?: TextAlignType;
4769
- };
4601
+ }
4770
4602
 
4771
4603
  /** @public */
4772
4604
  export declare const UiInputResult: ComponentDefinition<PBUiInputResult>;
4773
4605
 
4774
4606
  /**
4607
+ * Label component props
4775
4608
  * @public
4776
4609
  */
4777
- export declare type UiLabelProps = Omit<PBUiText, 'textAlign' | 'font'> & {
4778
- /** default='middle-center' */
4610
+ export declare interface UiLabelProps {
4611
+ /** Primary content. */
4612
+ value: string;
4613
+ /** Color of the label. @defaultValue `{ r: 1, g: 1, b: 1, a: 1 }` */
4614
+ color?: PBColor4 | undefined;
4615
+ /** Label font size. @defaultValue 10 */
4616
+ fontSize?: number | undefined;
4617
+ /** Label align position. @defaultValue 'middle-center' */
4779
4618
  textAlign?: TextAlignType | undefined;
4780
- /** default='sans-serif' */
4619
+ /** Label font type. @defaultValue 'sans-serif' */
4781
4620
  font?: UiFontType | undefined;
4782
- };
4783
-
4784
- export declare type Uint32 = number;
4621
+ }
4785
4622
 
4786
4623
  /**
4787
4624
  * @public It only defines the type explicitly, no effects.
@@ -4792,49 +4629,66 @@ export declare type uint32 = number;
4792
4629
  export declare const UiText: ComponentDefinition<PBUiText>;
4793
4630
 
4794
4631
  /**
4632
+ * Texture
4795
4633
  * @public
4796
4634
  */
4797
4635
  export declare type UiTexture = {
4798
- texture?: {
4799
- src: string;
4800
- wrapMode?: TextureWrapType;
4801
- filterMode?: TextureFilterType;
4802
- };
4636
+ src: string;
4637
+ wrapMode?: TextureWrapType;
4638
+ filterMode?: TextureFilterType;
4803
4639
  };
4804
4640
 
4805
- /**
4806
- * @public
4807
- */
4808
- export declare type UiTextureUnion = UiAvatarTexture | UiTexture;
4809
-
4810
4641
  /** @public */
4811
4642
  export declare const UiTransform: ComponentDefinition<PBUiTransform>;
4812
4643
 
4813
4644
  /**
4645
+ * Layout props to position things in the canvas
4814
4646
  * @public
4815
4647
  */
4816
4648
  export declare interface UiTransformProps {
4649
+ /** The display property controls if a item is going to be displayed or not. */
4817
4650
  display?: DisplayType;
4651
+ /** The flex shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container. */
4818
4652
  flex?: number;
4653
+ /** Justify content describes how to align children within the main axis of their container. */
4819
4654
  justifyContent?: JustifyType;
4655
+ /** The position type of an element defines how it is positioned within its parent. */
4820
4656
  positionType?: PositionType;
4657
+ /** The align-items property controls the alignment of items on the Cross Axis. */
4821
4658
  alignItems?: AlignType;
4659
+ /** The align-self property has the same options and effect as align items but instead of affecting the children within a container, you can apply this property to a single child to change its alignment within its parent */
4822
4660
  alignSelf?: AlignType;
4661
+ /** The align-content property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. */
4823
4662
  alignContent?: AlignType;
4663
+ /** The flex-direction property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). */
4824
4664
  flexDirection?: FlexDirectionType;
4665
+ /** The position property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements. */
4825
4666
  position?: Partial<Position>;
4667
+ /** The padding shorthand property sets the padding area on all four sides of an element at once. */
4826
4668
  padding?: Partial<Position>;
4669
+ /** The margin shorthand property sets the margin area on all four sides of an element. */
4827
4670
  margin?: Partial<Position>;
4671
+ /** The width property specifies the width of an element. */
4828
4672
  width?: PositionUnit;
4673
+ /** The height property specifies the height of an element. */
4829
4674
  height?: PositionUnit;
4675
+ /** The min-width property sets the minimum width of an element. */
4830
4676
  minWidth?: PositionUnit;
4677
+ /** The max-width property sets the maximum width of an element. */
4831
4678
  maxWidth?: PositionUnit;
4679
+ /** The min-height CSS property sets the minimum height of an element. */
4832
4680
  minHeight?: PositionUnit;
4681
+ /** The max-height property sets the maximum height of an element */
4833
4682
  maxHeight?: PositionUnit;
4683
+ /** The flex-wrap property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked*/
4834
4684
  flexWrap?: FlexWrapType;
4685
+ /** The flex-basis property sets the initial main size of a flex item. It sets the size of the content box.*/
4835
4686
  flexBasis?: number;
4687
+ /** The flex-grow property sets the flex grow factor of a flex item's main size. */
4836
4688
  flexGrow?: number;
4689
+ /** The flex-shrink property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to flex-shrink. */
4837
4690
  flexShrink?: number;
4691
+ /** The overflow property controls what happens to content that is too big to fit into an area */
4838
4692
  overflow?: OverflowType;
4839
4693
  }
4840
4694
 
@@ -5449,6 +5303,9 @@ export declare type Vector3Type = {
5449
5303
  /** @public */
5450
5304
  export declare const VisibilityComponent: ComponentDefinition<PBVisibilityComponent>;
5451
5305
 
5306
+ /**
5307
+ * @public
5308
+ */
5452
5309
  export declare const enum YGAlign {
5453
5310
  YGA_AUTO = 0,
5454
5311
  YGA_FLEX_START = 1,
@@ -5460,11 +5317,17 @@ export declare const enum YGAlign {
5460
5317
  YGA_SPACE_AROUND = 7
5461
5318
  }
5462
5319
 
5320
+ /**
5321
+ * @public
5322
+ */
5463
5323
  export declare const enum YGDisplay {
5464
5324
  YGD_FLEX = 0,
5465
5325
  YGD_NONE = 1
5466
5326
  }
5467
5327
 
5328
+ /**
5329
+ * @public
5330
+ */
5468
5331
  export declare const enum YGEdge {
5469
5332
  YGE_LEFT = 0,
5470
5333
  YGE_TOP = 1,
@@ -5477,6 +5340,9 @@ export declare const enum YGEdge {
5477
5340
  YGE_ALL = 8
5478
5341
  }
5479
5342
 
5343
+ /**
5344
+ * @public
5345
+ */
5480
5346
  export declare const enum YGFlexDirection {
5481
5347
  YGFD_ROW = 0,
5482
5348
  YGFD_COLUMN = 1,
@@ -5484,6 +5350,9 @@ export declare const enum YGFlexDirection {
5484
5350
  YGFD_ROW_REVERSE = 3
5485
5351
  }
5486
5352
 
5353
+ /**
5354
+ * @public
5355
+ */
5487
5356
  export declare const enum YGJustify {
5488
5357
  YGJ_FLEX_START = 0,
5489
5358
  YGJ_CENTER = 1,
@@ -5493,17 +5362,26 @@ export declare const enum YGJustify {
5493
5362
  YGJ_SPACE_EVENLY = 5
5494
5363
  }
5495
5364
 
5365
+ /**
5366
+ * @public
5367
+ */
5496
5368
  export declare const enum YGOverflow {
5497
5369
  YGO_VISIBLE = 0,
5498
5370
  YGO_HIDDEN = 1,
5499
5371
  YGO_SCROLL = 2
5500
5372
  }
5501
5373
 
5374
+ /**
5375
+ * @public
5376
+ */
5502
5377
  export declare const enum YGPositionType {
5503
5378
  YGPT_RELATIVE = 0,
5504
5379
  YGPT_ABSOLUTE = 1
5505
5380
  }
5506
5381
 
5382
+ /**
5383
+ * @public
5384
+ */
5507
5385
  export declare const enum YGUnit {
5508
5386
  YGU_UNDEFINED = 0,
5509
5387
  YGU_POINT = 1,
@@ -5511,6 +5389,9 @@ export declare const enum YGUnit {
5511
5389
  YGU_AUTO = 3
5512
5390
  }
5513
5391
 
5392
+ /**
5393
+ * @public
5394
+ */
5514
5395
  export declare const enum YGWrap {
5515
5396
  YGW_NO_WRAP = 0,
5516
5397
  YGW_WRAP = 1,