@dcl/playground-assets 7.0.6-4057700455.commit-453395e → 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/alpha.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>;
@@ -1550,14 +1510,12 @@ export declare type IEngine = {
1550
1510
  */
1551
1511
  readonly CameraEntity: Entity;
1552
1512
  /**
1513
+ * @alpha
1553
1514
  * @param transport - transport which changes its onmessage to process CRDT messages
1554
1515
  */
1555
1516
  addTransport(transport: Transport): void;
1556
1517
  /**
1557
- * Entity continaer
1558
- */
1559
- entityContainer: EntityContainer;
1560
- /**
1518
+ * @public
1561
1519
  * Iterator of registered components
1562
1520
  */
1563
1521
  componentsIter(): Iterable<ComponentDefinition<unknown>>;
@@ -1566,19 +1524,7 @@ export declare type IEngine = {
1566
1524
  * components that will be available to this engine and to run optimizations.
1567
1525
  */
1568
1526
  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>;
1527
+ }
1582
1528
 
1583
1529
  export declare type IEventNames = keyof IEvents;
1584
1530
 
@@ -1747,20 +1693,35 @@ export declare type IInputSystem = {
1747
1693
  };
1748
1694
 
1749
1695
  /**
1696
+ * Include property keys from T where the property is assignable to U
1750
1697
  * @public
1751
1698
  */
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
1699
  export declare type IncludeUndefined<T> = {
1756
1700
  [P in keyof T]: undefined extends T[P] ? P : never;
1757
1701
  }[keyof T];
1758
1702
 
1759
1703
  /**
1760
1704
  * @public
1761
- */
1762
- export declare function Input(props: EntityPropTypes & Partial<UiInputProps>): ReactEcs.JSX.Element;
1705
+ * Input component
1706
+ *
1707
+ * An Input is a field used to obtain a response from a user.
1708
+ *
1709
+ * @example
1710
+ <Input
1711
+ placeholder="Please enter your email"
1712
+ onChange={(value) => {
1713
+ email = value
1714
+ }}
1715
+ uiBackground={{ color: Color4.Red() }}
1716
+ uiTransform={{ width: 200, height: 36 }}
1717
+ />
1718
+ *
1719
+ * @category Component
1720
+ */ export declare function Input(props: EntityPropTypes & Partial<UiInputProps>): ReactEcs.JSX.Element;
1763
1721
 
1722
+ /**
1723
+ * @public
1724
+ */
1764
1725
  export declare const enum InputAction {
1765
1726
  IA_POINTER = 0,
1766
1727
  IA_PRIMARY = 1,
@@ -1792,25 +1753,29 @@ export declare type InputEventResult = {
1792
1753
  };
1793
1754
  };
1794
1755
 
1795
- export declare const inputSystem: IInputSystem;
1796
-
1797
1756
  /**
1798
1757
  * @public
1758
+ * Input system manager. Check for button events
1759
+ * @example
1760
+ * inputSystem.isTriggered: Returns true if an input action ocurred since the last tick.
1761
+ * 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.
1762
+ * inputSystem.getInputCommand: Returns an object with data about the input action.
1799
1763
  */
1800
- export declare function IOptional<T>(spec: ISchema<T>): ISchema<T | undefined>;
1764
+ export declare const inputSystem: IInputSystem;
1801
1765
 
1802
1766
  /**
1803
1767
  * @public
1804
1768
  */
1805
- export declare type ISchema<T = any> = {
1769
+ export declare interface ISchema<T = any> {
1806
1770
  serialize(value: T, builder: ByteBuffer): void;
1807
1771
  deserialize(reader: ByteBuffer): T;
1808
1772
  create(): T;
1809
1773
  extend?: (base?: T) => T;
1810
- };
1811
-
1812
- export declare const isListener: (key: string) => key is keyof Listeners;
1774
+ }
1813
1775
 
1776
+ /**
1777
+ * @hidden
1778
+ */
1814
1779
  export declare namespace JSX {
1815
1780
  export type Element = {} | null;
1816
1781
  export type IntrinsicElements = EcsElements;
@@ -1823,18 +1788,42 @@ export declare namespace JSX {
1823
1788
  */
1824
1789
  export declare type JustifyType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
1825
1790
 
1791
+ /**
1792
+ * Keys help React identify which items have changed, are added, or are removed.
1793
+ * Keys should be given to the elements inside the array to give the elements a stable identity:
1794
+ * @public
1795
+ */
1826
1796
  export declare type Key = number | string;
1827
1797
 
1828
1798
  /**
1799
+ *
1829
1800
  * @public
1801
+ * Label component
1802
+ *
1803
+ * A label displays text content
1804
+ *
1805
+ * @example
1806
+ * <Label value="SDK 7" uiTransform={{ margin: { left: 10 } }} />
1807
+ *
1808
+ * @category Component
1830
1809
  */
1831
1810
  export declare function Label(props: EntityPropTypes & UiLabelProps): ReactEcs.JSX.Element;
1832
1811
 
1812
+ /**
1813
+ * User key event Listeners
1814
+ * @public
1815
+ */
1833
1816
  export declare type Listeners = {
1817
+ /** triggered on mouse down event */
1834
1818
  onMouseDown?: Callback;
1819
+ /** triggered on mouse up event */
1835
1820
  onMouseUp?: Callback;
1836
1821
  };
1837
1822
 
1823
+ /**
1824
+ * @public
1825
+ * Overrides component definition to support partial default values
1826
+ */
1838
1827
  export declare interface MapComponentDefinition<T> extends ComponentDefinition<T> {
1839
1828
  /**
1840
1829
  * Add the current component to an entity, throw an error if the component already exists (use `createOrReplace` instead).
@@ -1859,19 +1848,12 @@ export declare type MapResult<T extends Spec> = ToOptional<{
1859
1848
  [K in keyof T]: T[K] extends ISchema ? ReturnType<T[K]['deserialize']> : T[K] extends Spec ? MapResult<T[K]> : never;
1860
1849
  }>;
1861
1850
 
1862
- export declare const MASK_UPPER_16_ON_32 = 4294901760;
1863
-
1864
1851
  export declare const Material: MaterialComponentDefinitionExtended;
1865
1852
 
1866
1853
  /**
1867
1854
  * @public
1868
1855
  */
1869
- export declare type MaterialComponentDefinition = ComponentDefinition<PBMaterial>;
1870
-
1871
- /**
1872
- * @public
1873
- */
1874
- export declare interface MaterialComponentDefinitionExtended extends MaterialComponentDefinition {
1856
+ export declare interface MaterialComponentDefinitionExtended extends ComponentDefinition<PBMaterial> {
1875
1857
  /**
1876
1858
  * Texture helpers with constructor
1877
1859
  */
@@ -1890,6 +1872,9 @@ export declare interface MaterialComponentDefinitionExtended extends MaterialCom
1890
1872
  setPbrMaterial: (entity: Entity, material: PBMaterial_PbrMaterial) => void;
1891
1873
  }
1892
1874
 
1875
+ /**
1876
+ * @public
1877
+ */
1893
1878
  export declare const enum MaterialTransparencyMode {
1894
1879
  MTM_OPAQUE = 0,
1895
1880
  MTM_ALPHA_TEST = 1,
@@ -2629,24 +2614,12 @@ export declare namespace Matrix {
2629
2614
  export function toggleProjectionMatrixHandInPlace(self: MutableMatrix): void;
2630
2615
  }
2631
2616
 
2632
- /**
2633
- * @public
2634
- */
2635
- export declare const MAX_ENTITY_NUMBER = 65535;
2636
-
2637
- export declare const MAX_U16 = 65535;
2638
-
2639
2617
  export declare const MeshCollider: MeshColliderComponentDefinitionExtended;
2640
2618
 
2641
2619
  /**
2642
2620
  * @public
2643
2621
  */
2644
- export declare type MeshColliderComponentDefinition = ComponentDefinition<PBMeshCollider>;
2645
-
2646
- /**
2647
- * @public
2648
- */
2649
- export declare interface MeshColliderComponentDefinitionExtended extends MeshColliderComponentDefinition {
2622
+ export declare interface MeshColliderComponentDefinitionExtended extends ComponentDefinition<PBMeshCollider> {
2650
2623
  /**
2651
2624
  * @public
2652
2625
  * Set a box in the MeshCollider component
@@ -2684,12 +2657,7 @@ export declare const MeshRenderer: MeshRendererComponentDefinitionExtended;
2684
2657
  /**
2685
2658
  * @public
2686
2659
  */
2687
- export declare type MeshRendererComponentDefinition = ComponentDefinition<PBMeshRenderer>;
2688
-
2689
- /**
2690
- * @public
2691
- */
2692
- export declare interface MeshRendererComponentDefinitionExtended extends MeshRendererComponentDefinition {
2660
+ export declare interface MeshRendererComponentDefinitionExtended extends ComponentDefinition<PBMeshRenderer> {
2693
2661
  /**
2694
2662
  * @public
2695
2663
  * Set a box in the MeshRenderer component
@@ -2729,6 +2697,9 @@ export declare class MessageBus {
2729
2697
  private flush;
2730
2698
  }
2731
2699
 
2700
+ /**
2701
+ * @public
2702
+ */
2732
2703
  export declare const enum NftFrameType {
2733
2704
  NFT_CLASSIC = 0,
2734
2705
  NFT_BAROQUE_ORNAMENT = 1,
@@ -2823,10 +2794,16 @@ export declare const onLeaveSceneObservable: Observable<{
2823
2794
  userId: string;
2824
2795
  }>;
2825
2796
 
2797
+ /**
2798
+ * @public
2799
+ */
2826
2800
  export declare type OnlyNonUndefinedTypes<T> = {
2827
2801
  [K in ExcludeUndefined<T>]: T[K];
2828
2802
  };
2829
2803
 
2804
+ /**
2805
+ * @public
2806
+ */
2830
2807
  export declare type OnlyOptionalUndefinedTypes<T> = {
2831
2808
  [K in IncludeUndefined<T>]?: T[K];
2832
2809
  };
@@ -2878,9 +2855,13 @@ export declare const onVideoEvent: Observable<{
2878
2855
 
2879
2856
  /**
2880
2857
  * @public
2858
+ * The overflow property controls what happens to content that is too big to fit into an area.
2881
2859
  */
2882
2860
  export declare type OverflowType = 'hidden' | 'scroll' | 'visible';
2883
2861
 
2862
+ /**
2863
+ * @public
2864
+ */
2884
2865
  export declare interface PBAnimationState {
2885
2866
  name: string;
2886
2867
  clip: string;
@@ -2895,25 +2876,15 @@ export declare interface PBAnimationState {
2895
2876
  }
2896
2877
 
2897
2878
  /**
2898
- * Internal
2879
+ * @public
2899
2880
  */
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
2881
  export declare interface PBAnimator {
2906
2882
  states: PBAnimationState[];
2907
2883
  }
2908
2884
 
2909
2885
  /**
2910
- * Internal
2886
+ * @public
2911
2887
  */
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
2888
  export declare interface PBAudioSource {
2918
2889
  playing?: boolean | undefined;
2919
2890
  /** default=1.0f */
@@ -2925,13 +2896,8 @@ export declare interface PBAudioSource {
2925
2896
  }
2926
2897
 
2927
2898
  /**
2928
- * Internal
2899
+ * @public
2929
2900
  */
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
2901
  export declare interface PBAudioStream {
2936
2902
  playing?: boolean | undefined;
2937
2903
  /** default=1.0f */
@@ -2940,13 +2906,8 @@ export declare interface PBAudioStream {
2940
2906
  }
2941
2907
 
2942
2908
  /**
2943
- * Internal
2909
+ * @public
2944
2910
  */
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
2911
  export declare interface PBAvatarAttach {
2951
2912
  /** default's to current player avatar id if not provided */
2952
2913
  avatarId?: string | undefined;
@@ -2954,13 +2915,8 @@ export declare interface PBAvatarAttach {
2954
2915
  }
2955
2916
 
2956
2917
  /**
2957
- * Internal
2918
+ * @public
2958
2919
  */
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
2920
  export declare interface PBAvatarModifierArea {
2965
2921
  area: PBVector3 | undefined;
2966
2922
  excludeIds: string[];
@@ -2968,13 +2924,8 @@ export declare interface PBAvatarModifierArea {
2968
2924
  }
2969
2925
 
2970
2926
  /**
2971
- * Internal
2927
+ * @public
2972
2928
  */
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
2929
  export declare interface PBAvatarShape {
2979
2930
  id: string;
2980
2931
  /** default = NPC */
@@ -3006,51 +2957,31 @@ export declare interface PBAvatarShape {
3006
2957
  }
3007
2958
 
3008
2959
  /**
3009
- * Internal
2960
+ * @public
3010
2961
  */
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
2962
  export declare interface PBBillboard {
3017
2963
  /** default=BM_ALL */
3018
2964
  billboardMode?: BillboardMode | undefined;
3019
2965
  }
3020
2966
 
3021
2967
  /**
3022
- * Internal
2968
+ * @public
3023
2969
  */
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
2970
  export declare interface PBCameraMode {
3030
2971
  mode: CameraType;
3031
2972
  }
3032
2973
 
3033
2974
  /**
3034
- * Internal
2975
+ * @public
3035
2976
  */
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
2977
  export declare interface PBCameraModeArea {
3042
2978
  area: PBVector3 | undefined;
3043
2979
  mode: CameraType;
3044
2980
  }
3045
2981
 
3046
2982
  /**
3047
- * Internal
2983
+ * @public
3048
2984
  */
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
2985
  export declare interface PBColor3 {
3055
2986
  r: number;
3056
2987
  g: number;
@@ -3058,13 +2989,8 @@ export declare interface PBColor3 {
3058
2989
  }
3059
2990
 
3060
2991
  /**
3061
- * Internal
2992
+ * @public
3062
2993
  */
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
2994
  export declare interface PBColor4 {
3069
2995
  r: number;
3070
2996
  g: number;
@@ -3073,26 +2999,16 @@ export declare interface PBColor4 {
3073
2999
  }
3074
3000
 
3075
3001
  /**
3076
- * Internal
3002
+ * @public
3077
3003
  */
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
3004
  export declare interface PBGltfContainer {
3084
3005
  /** which file to load */
3085
3006
  src: string;
3086
3007
  }
3087
3008
 
3088
3009
  /**
3089
- * Internal
3010
+ * @public
3090
3011
  */
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
3012
  export declare interface PBMaterial {
3097
3013
  material?: {
3098
3014
  $case: "unlit";
@@ -3104,13 +3020,8 @@ export declare interface PBMaterial {
3104
3020
  }
3105
3021
 
3106
3022
  /**
3107
- * Internal
3023
+ * @public
3108
3024
  */
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
3025
  export declare interface PBMaterial_PbrMaterial {
3115
3026
  /** default = null */
3116
3027
  texture?: TextureUnion | undefined;
@@ -3147,13 +3058,8 @@ export declare interface PBMaterial_PbrMaterial {
3147
3058
  }
3148
3059
 
3149
3060
  /**
3150
- * Internal
3061
+ * @public
3151
3062
  */
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
3063
  export declare interface PBMaterial_UnlitMaterial {
3158
3064
  /** default = null */
3159
3065
  texture?: TextureUnion | undefined;
@@ -3164,13 +3070,8 @@ export declare interface PBMaterial_UnlitMaterial {
3164
3070
  }
3165
3071
 
3166
3072
  /**
3167
- * Internal
3073
+ * @public
3168
3074
  */
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
3075
  export declare interface PBMeshCollider {
3175
3076
  /** default = ColliderLayer.Physics | ColliderLayer.Pointer */
3176
3077
  collisionMask?: number | undefined;
@@ -3190,24 +3091,14 @@ export declare interface PBMeshCollider {
3190
3091
  }
3191
3092
 
3192
3093
  /**
3193
- * Internal
3094
+ * @public
3194
3095
  */
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
3096
  export declare interface PBMeshCollider_BoxMesh {
3201
3097
  }
3202
3098
 
3203
3099
  /**
3204
- * Internal
3100
+ * @public
3205
3101
  */
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
3102
  export declare interface PBMeshCollider_CylinderMesh {
3212
3103
  /** default=1.0 */
3213
3104
  radiusTop?: number | undefined;
@@ -3216,35 +3107,20 @@ export declare interface PBMeshCollider_CylinderMesh {
3216
3107
  }
3217
3108
 
3218
3109
  /**
3219
- * Internal
3110
+ * @public
3220
3111
  */
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
3112
  export declare interface PBMeshCollider_PlaneMesh {
3227
3113
  }
3228
3114
 
3229
3115
  /**
3230
- * Internal
3116
+ * @public
3231
3117
  */
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
3118
  export declare interface PBMeshCollider_SphereMesh {
3238
3119
  }
3239
3120
 
3240
3121
  /**
3241
- * Internal
3122
+ * @public
3242
3123
  */
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
3124
  export declare interface PBMeshRenderer {
3249
3125
  mesh?: {
3250
3126
  $case: "box";
@@ -3262,25 +3138,15 @@ export declare interface PBMeshRenderer {
3262
3138
  }
3263
3139
 
3264
3140
  /**
3265
- * Internal
3141
+ * @public
3266
3142
  */
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
3143
  export declare interface PBMeshRenderer_BoxMesh {
3273
3144
  uvs: number[];
3274
3145
  }
3275
3146
 
3276
3147
  /**
3277
- * Internal
3148
+ * @public
3278
3149
  */
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
3150
  export declare interface PBMeshRenderer_CylinderMesh {
3285
3151
  /** default=1.0 */
3286
3152
  radiusTop?: number | undefined;
@@ -3289,36 +3155,21 @@ export declare interface PBMeshRenderer_CylinderMesh {
3289
3155
  }
3290
3156
 
3291
3157
  /**
3292
- * Internal
3158
+ * @public
3293
3159
  */
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
3160
  export declare interface PBMeshRenderer_PlaneMesh {
3300
3161
  uvs: number[];
3301
3162
  }
3302
3163
 
3303
3164
  /**
3304
- * Internal
3165
+ * @public
3305
3166
  */
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
3167
  export declare interface PBMeshRenderer_SphereMesh {
3312
3168
  }
3313
3169
 
3314
3170
  /**
3315
- * Internal
3171
+ * @public
3316
3172
  */
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
3173
  export declare interface PBNftShape {
3323
3174
  src: string;
3324
3175
  /** default = PictureFrameStyle.Classic */
@@ -3328,38 +3179,23 @@ export declare interface PBNftShape {
3328
3179
  }
3329
3180
 
3330
3181
  /**
3331
- * Internal
3182
+ * @public
3332
3183
  */
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
3184
  export declare interface PBPointerEvents {
3339
3185
  pointerEvents: PBPointerEvents_Entry[];
3340
3186
  }
3341
3187
 
3342
3188
  /**
3343
- * Internal
3189
+ * @public
3344
3190
  */
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
3191
  export declare interface PBPointerEvents_Entry {
3351
3192
  eventType: PointerEventType;
3352
3193
  eventInfo: PBPointerEvents_Info | undefined;
3353
3194
  }
3354
3195
 
3355
3196
  /**
3356
- * Internal
3197
+ * @public
3357
3198
  */
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
3199
  export declare interface PBPointerEvents_Info {
3364
3200
  /** default=InputAction.ANY */
3365
3201
  button?: InputAction | undefined;
@@ -3371,29 +3207,19 @@ export declare interface PBPointerEvents_Info {
3371
3207
  showFeedback?: boolean | undefined;
3372
3208
  }
3373
3209
 
3210
+ /** the renderer will set this component to the root entity once per frame with all the events */
3374
3211
  /**
3375
- * Internal
3212
+ * @public
3376
3213
  */
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
3214
  export declare interface PBPointerEventsResult {
3384
3215
  /** a list of the last N pointer commands (from the engine) */
3385
3216
  commands: PBPointerEventsResult_PointerCommand[];
3386
3217
  }
3387
3218
 
3219
+ /** this message represents a pointer event, used both for UP and DOWN actions */
3388
3220
  /**
3389
- * Internal
3221
+ * @public
3390
3222
  */
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
3223
  export declare interface PBPointerEventsResult_PointerCommand {
3398
3224
  /** identifier of the input */
3399
3225
  button: InputAction;
@@ -3406,25 +3232,15 @@ export declare interface PBPointerEventsResult_PointerCommand {
3406
3232
  }
3407
3233
 
3408
3234
  /**
3409
- * Internal
3235
+ * @public
3410
3236
  */
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
3237
  export declare interface PBPointerLock {
3417
3238
  isPointerLocked: boolean;
3418
3239
  }
3419
3240
 
3420
3241
  /**
3421
- * Internal
3242
+ * @public
3422
3243
  */
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
3244
  export declare interface PBPosition {
3429
3245
  x: number;
3430
3246
  y: number;
@@ -3432,13 +3248,8 @@ export declare interface PBPosition {
3432
3248
  }
3433
3249
 
3434
3250
  /**
3435
- * Internal
3251
+ * @public
3436
3252
  */
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
3253
  export declare interface PBRaycast {
3443
3254
  origin: PBVector3 | undefined;
3444
3255
  direction: PBVector3 | undefined;
@@ -3447,13 +3258,8 @@ export declare interface PBRaycast {
3447
3258
  }
3448
3259
 
3449
3260
  /**
3450
- * Internal
3261
+ * @public
3451
3262
  */
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
3263
  export declare interface PBRaycastResult {
3458
3264
  timestamp: number;
3459
3265
  origin: PBVector3 | undefined;
@@ -3462,13 +3268,8 @@ export declare interface PBRaycastResult {
3462
3268
  }
3463
3269
 
3464
3270
  /**
3465
- * Internal
3271
+ * @public
3466
3272
  */
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
3273
  export declare interface PBTextShape {
3473
3274
  text: string;
3474
3275
  /** default=F_SANS_SERIF */
@@ -3505,13 +3306,8 @@ export declare interface PBTextShape {
3505
3306
  }
3506
3307
 
3507
3308
  /**
3508
- * Internal
3309
+ * @public
3509
3310
  */
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
3311
  export declare interface PBUiBackground {
3516
3312
  /** default=(1.0, 1.0, 1.0, 1.0), pixel = color * sample2D(texture, uv) */
3517
3313
  color?: PBColor4 | undefined;
@@ -3524,13 +3320,8 @@ export declare interface PBUiBackground {
3524
3320
  }
3525
3321
 
3526
3322
  /**
3527
- * Internal
3323
+ * @public
3528
3324
  */
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
3325
  export declare interface PBUiDropdown {
3535
3326
  acceptEmpty: boolean;
3536
3327
  emptyLabel?: string | undefined;
@@ -3549,25 +3340,15 @@ export declare interface PBUiDropdown {
3549
3340
  }
3550
3341
 
3551
3342
  /**
3552
- * Internal
3343
+ * @public
3553
3344
  */
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
3345
  export declare interface PBUiDropdownResult {
3560
3346
  value: number;
3561
3347
  }
3562
3348
 
3563
3349
  /**
3564
- * Internal
3350
+ * @public
3565
3351
  */
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
3352
  export declare interface PBUiInput {
3572
3353
  placeholder: string;
3573
3354
  /** default=(0.0,0.0,0.0,1.0) */
@@ -3584,25 +3365,15 @@ export declare interface PBUiInput {
3584
3365
  }
3585
3366
 
3586
3367
  /**
3587
- * Internal
3368
+ * @public
3588
3369
  */
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
3370
  export declare interface PBUiInputResult {
3595
3371
  value: string;
3596
3372
  }
3597
3373
 
3598
3374
  /**
3599
- * Internal
3375
+ * @public
3600
3376
  */
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
3377
  export declare interface PBUiText {
3607
3378
  value: string;
3608
3379
  /** default=(1.0,1.0,1.0,1.0) */
@@ -3616,13 +3387,8 @@ export declare interface PBUiText {
3616
3387
  }
3617
3388
 
3618
3389
  /**
3619
- * Internal
3390
+ * @public
3620
3391
  */
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
3392
  export declare interface PBUiTransform {
3627
3393
  parent: number;
3628
3394
  rightOf: number;
@@ -3707,26 +3473,16 @@ export declare interface PBUiTransform {
3707
3473
  }
3708
3474
 
3709
3475
  /**
3710
- * Internal
3476
+ * @public
3711
3477
  */
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
3478
  export declare interface PBVector2 {
3718
3479
  x: number;
3719
3480
  y: number;
3720
3481
  }
3721
3482
 
3722
3483
  /**
3723
- * Internal
3484
+ * @public
3724
3485
  */
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
3486
  export declare interface PBVector3 {
3731
3487
  x: number;
3732
3488
  y: number;
@@ -3734,26 +3490,13 @@ export declare interface PBVector3 {
3734
3490
  }
3735
3491
 
3736
3492
  /**
3737
- * Internal
3493
+ * @public
3738
3494
  */
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
3495
  export declare interface PBVisibilityComponent {
3745
3496
  /** default=true */
3746
3497
  visible?: boolean | undefined;
3747
3498
  }
3748
3499
 
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
3500
  /**
3758
3501
  * Represens a plane by the equation ax + by + cz + d = 0
3759
3502
  * @public
@@ -3878,17 +3621,49 @@ export declare const PointerEvents: ComponentDefinition<PBPointerEvents>;
3878
3621
  /** @public */
3879
3622
  export declare const PointerEventsResult: ComponentDefinition<PBPointerEventsResult>;
3880
3623
 
3881
- export declare type PointerEventsSystem = ReturnType<typeof createPointerEventSystem>;
3882
-
3883
- export declare const pointerEventsSystem: {
3884
- removeOnClick(entity: Entity): void;
3624
+ /**
3625
+ * @public
3626
+ */
3627
+ export declare interface PointerEventsSystem {
3628
+ /**
3629
+ * @public
3630
+ * Remove the callback for onPointerDown event
3631
+ * @param entity - Entity where the callback was attached
3632
+ */
3885
3633
  removeOnPointerDown(entity: Entity): void;
3634
+ /**
3635
+ * @public
3636
+ * Remove the callback for onPointerUp event
3637
+ * @param entity - Entity where the callback was attached
3638
+ */
3886
3639
  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
- };
3640
+ /**
3641
+ * @public
3642
+ * Execute callback when the user press the InputButton pointing at the entity
3643
+ * @param entity - Entity to attach the callback
3644
+ * @param cb - Function to execute when click fires
3645
+ * @param opts - Opts to trigger Feedback and Button
3646
+ */
3647
+ onPointerDown(entity: Entity, cb: EventSystemCallback, opts?: Partial<EventSystemOptions>): void;
3648
+ /**
3649
+ * @public
3650
+ * Execute callback when the user releases the InputButton pointing at the entity
3651
+ * @param entity - Entity to attach the callback
3652
+ * @param cb - Function to execute when click fires
3653
+ * @param opts - Opts to trigger Feedback and Button
3654
+ */
3655
+ onPointerUp(entity: Entity, cb: EventSystemCallback, opts?: Partial<EventSystemOptions>): void;
3656
+ }
3657
+
3658
+ /**
3659
+ * @public
3660
+ * Register callback functions to a particular entity.
3661
+ */
3662
+ export declare const pointerEventsSystem: PointerEventsSystem;
3891
3663
 
3664
+ /**
3665
+ * @public
3666
+ */
3892
3667
  export declare const enum PointerEventType {
3893
3668
  PET_UP = 0,
3894
3669
  PET_DOWN = 1,
@@ -3900,31 +3675,37 @@ export declare const enum PointerEventType {
3900
3675
  export declare const PointerLock: ComponentDefinition<PBPointerLock>;
3901
3676
 
3902
3677
  /**
3678
+ * Type used for defining the position of the element. i.e. margin, padding
3903
3679
  * @public
3904
3680
  */
3905
- export declare type Position = {
3681
+ export declare interface Position {
3906
3682
  top: PositionUnit;
3907
3683
  right: PositionUnit;
3908
3684
  bottom: PositionUnit;
3909
3685
  left: PositionUnit;
3910
- };
3686
+ }
3911
3687
 
3912
3688
  /**
3913
3689
  * @public
3690
+ * The position property specifies the type of positioning method used for an element
3914
3691
  */
3915
3692
  export declare type PositionType = 'absolute' | 'relative';
3916
3693
 
3694
+ /**
3695
+ * Position unit for the user.
3696
+ * i.e. width="100", width="100%", width="100px"
3697
+ * @public
3698
+ */
3917
3699
  export declare type PositionUnit = `${number}px` | `${number}%` | number;
3918
3700
 
3919
- export declare type PutComponentMessage = CrdtMessageHeader & PutComponentMessageBody;
3920
-
3921
3701
  /**
3922
3702
  * Min. length = header (8 bytes) + 20 bytes = 28 bytes
3923
3703
  *
3924
- * @param entity - Uint32 number of the entity
3925
- * @param componentId - Uint32 number of id
3704
+ * @param entity - uint32 number of the entity
3705
+ * @param componentId - uint32 number of id
3926
3706
  * @param timestamp - Uint64 Lamport timestamp
3927
3707
  * @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
3708
+ * @public
3928
3709
  */
3929
3710
  export declare type PutComponentMessageBody = {
3930
3711
  type: CrdtMessageType.PUT_COMPONENT;
@@ -3934,16 +3715,6 @@ export declare type PutComponentMessageBody = {
3934
3715
  data: Uint8Array;
3935
3716
  };
3936
3717
 
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
3718
  /**
3948
3719
  * @public
3949
3720
  * Quaternion is a type and a namespace.
@@ -4211,6 +3982,9 @@ export declare const RAD2DEG: number;
4211
3982
  export declare const Raycast: ComponentDefinition<PBRaycast>;
4212
3983
 
4213
3984
  /** Position will be relative to the scene */
3985
+ /**
3986
+ * @public
3987
+ */
4214
3988
  export declare interface RaycastHit {
4215
3989
  position: PBVector3 | undefined;
4216
3990
  origin: PBVector3 | undefined;
@@ -4222,13 +3996,8 @@ export declare interface RaycastHit {
4222
3996
  }
4223
3997
 
4224
3998
  /**
4225
- * Internal
3999
+ * @public
4226
4000
  */
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
4001
  export declare const enum RaycastQueryType {
4233
4002
  RQT_HIT_FIRST = 0,
4234
4003
  RQT_QUERY_ALL = 1
@@ -4243,21 +4012,45 @@ export declare type RaycastResponsePayload<T> = {
4243
4012
  /** @public */
4244
4013
  export declare const RaycastResult: ComponentDefinition<PBRaycastResult>;
4245
4014
 
4246
- export declare type ReactBasedUiSystem = {
4015
+ /**
4016
+ * @public
4017
+ */
4018
+ export declare interface ReactBasedUiSystem {
4247
4019
  destroy(): void;
4248
4020
  setUiRenderer(ui: UiComponent): void;
4249
- };
4021
+ }
4250
4022
 
4023
+ /**
4024
+ * @public
4025
+ */
4251
4026
  export declare namespace ReactEcs {
4252
4027
  export namespace JSX {
4028
+ /**
4029
+ * @public
4030
+ */
4253
4031
  export type Element = {} | null;
4032
+ /**
4033
+ * @public
4034
+ * HTML tag elements
4035
+ */
4254
4036
  export type IntrinsicElements = EcsElements;
4037
+ /**
4038
+ * @public
4039
+ * Component empty interface
4040
+ */
4255
4041
  export interface Component {
4256
4042
  }
4257
4043
  }
4258
4044
  const createElement: any;
4259
4045
  }
4260
4046
 
4047
+ /**
4048
+ * ReactEcs variable provides the function to render & destroy the specified UI
4049
+ * @public
4050
+ * @example
4051
+ * import { ReactEcsRenderer } from '@dcl/sdk/react-ecs'
4052
+ * ReactEcsRenderer.setUiRenderer(uiComponent)
4053
+ */
4261
4054
  export declare const ReactEcsRenderer: ReactBasedUiSystem;
4262
4055
 
4263
4056
  /**
@@ -4272,16 +4065,14 @@ export declare type ReadonlyComponentSchema<T extends [ComponentDefinition<unkno
4272
4065
  */
4273
4066
  export declare type ReadonlyPrimitive = number | string | number[] | string[] | boolean | boolean[];
4274
4067
 
4068
+ /**
4069
+ * @public
4070
+ */
4275
4071
  export declare type ReceiveMessage = CrdtMessageBody & {
4276
4072
  transportId?: number;
4277
4073
  messageBuffer: Uint8Array;
4278
4074
  };
4279
4075
 
4280
- /**
4281
- * @public This first 512 entities are reserved by the renderer
4282
- */
4283
- export declare const RESERVED_STATIC_ENTITIES = 512;
4284
-
4285
4076
  export declare type RPCSendableMessage = {
4286
4077
  jsonrpc: '2.0';
4287
4078
  id: number;
@@ -4485,25 +4276,44 @@ export declare namespace Scalar {
4485
4276
  * @public
4486
4277
  */
4487
4278
  export declare namespace Schemas {
4279
+ /** @public */
4488
4280
  export type SchemaType = ISchema;
4281
+ /** @public */
4489
4282
  const Boolean: ISchema<boolean>;
4283
+ /** @public */
4490
4284
  const String: ISchema<string>;
4285
+ /** @public */
4491
4286
  const Float: ISchema<number>;
4287
+ /** @public */
4492
4288
  const Double: ISchema<number>;
4289
+ /** @public */
4493
4290
  const Byte: ISchema<number>;
4291
+ /** @public */
4494
4292
  const Short: ISchema<number>;
4293
+ /** @public */
4495
4294
  const Int: ISchema<number>;
4295
+ /** @public */
4496
4296
  const Int64: ISchema<number>;
4297
+ /** @public */
4497
4298
  const Number: ISchema<number>;
4299
+ /** @public */
4498
4300
  const Vector3: ISchema<Vector3Type>;
4301
+ /** @public */
4499
4302
  const Quaternion: ISchema<QuaternionType>;
4303
+ /** @public */
4500
4304
  const Color3: ISchema<Color3Type>;
4305
+ /** @public */
4501
4306
  const Color4: ISchema<Color4Type>;
4307
+ /** @public */
4502
4308
  const Entity: ISchema<Entity>;
4503
- const Enum: typeof IEnum;
4504
- const Array: typeof IArray;
4505
- const Map: typeof IMap;
4506
- const Optional: typeof IOptional;
4309
+ /** @public */
4310
+ const Enum: <T>(type: ISchema<any>) => ISchema<T>;
4311
+ /** @public */
4312
+ const Array: <T>(type: ISchema<T>) => ISchema<T[]>;
4313
+ /** @public */
4314
+ const Map: <T extends Spec>(spec: T, defaultValue?: Partial<MapResult<T>> | undefined) => ISchema<MapResult<T>>;
4315
+ /** @public */
4316
+ const Optional: <T>(spec: ISchema<T>) => ISchema<T | undefined>;
4507
4317
  }
4508
4318
 
4509
4319
  /**
@@ -4526,6 +4336,9 @@ export declare type SystemItem = {
4526
4336
 
4527
4337
  export declare type Task<T = unknown> = () => Promise<T>;
4528
4338
 
4339
+ /**
4340
+ * @public
4341
+ */
4529
4342
  export declare const enum TextAlignMode {
4530
4343
  TAM_TOP_LEFT = 0,
4531
4344
  TAM_TOP_CENTER = 1,
@@ -4546,6 +4359,9 @@ export declare type TextAlignType = 'top-left' | 'top-center' | 'top-right' | 'm
4546
4359
  /** @public */
4547
4360
  export declare const TextShape: ComponentDefinition<PBTextShape>;
4548
4361
 
4362
+ /**
4363
+ * @public
4364
+ */
4549
4365
  export declare interface Texture {
4550
4366
  src: string;
4551
4367
  /** default = TextureWrapMode.Clamp */
@@ -4555,13 +4371,8 @@ export declare interface Texture {
4555
4371
  }
4556
4372
 
4557
4373
  /**
4558
- * Internal
4374
+ * @public
4559
4375
  */
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
4376
  export declare const enum TextureFilterMode {
4566
4377
  TFM_POINT = 0,
4567
4378
  TFM_BILINEAR = 1,
@@ -4576,7 +4387,7 @@ export declare type TextureFilterType = 'point' | 'bi-linear' | 'tri-linear';
4576
4387
  /**
4577
4388
  * @public
4578
4389
  */
4579
- export declare type TextureHelper = {
4390
+ export declare interface TextureHelper {
4580
4391
  /**
4581
4392
  * @returns a common texture with a source file
4582
4393
  */
@@ -4585,7 +4396,7 @@ export declare type TextureHelper = {
4585
4396
  * @returns the avatar texture of userId specified
4586
4397
  */
4587
4398
  Avatar: (avatarTexture: AvatarTexture) => TextureUnion;
4588
- };
4399
+ }
4589
4400
 
4590
4401
  /**
4591
4402
  * @public
@@ -4603,6 +4414,9 @@ export declare type TextureHelper = {
4603
4414
  */
4604
4415
  export declare type TextureMode = 'nine-slices' | 'center' | 'stretch';
4605
4416
 
4417
+ /**
4418
+ * @public
4419
+ */
4606
4420
  export declare interface TextureUnion {
4607
4421
  tex?: {
4608
4422
  $case: "texture";
@@ -4614,13 +4428,8 @@ export declare interface TextureUnion {
4614
4428
  }
4615
4429
 
4616
4430
  /**
4617
- * Internal
4431
+ * @public
4618
4432
  */
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
4433
  export declare const enum TextureWrapMode {
4625
4434
  TWM_REPEAT = 0,
4626
4435
  TWM_CLAMP = 1,
@@ -4645,6 +4454,9 @@ export declare const ToGammaSpace: number;
4645
4454
  */
4646
4455
  export declare const ToLinearSpace = 2.2;
4647
4456
 
4457
+ /**
4458
+ * @public
4459
+ */
4648
4460
  export declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
4649
4461
 
4650
4462
  export declare const Transform: TransformComponentExtended;
@@ -4690,66 +4502,89 @@ export declare type TransformType = {
4690
4502
  */
4691
4503
  export declare type TransformTypeWithOptionals = Partial<TransformType>;
4692
4504
 
4505
+ /**
4506
+ * @public
4507
+ */
4693
4508
  export declare type Transport = {
4694
4509
  send(message: Uint8Array): Promise<void>;
4695
4510
  onmessage?(message: Uint8Array): void;
4696
4511
  filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
4697
4512
  };
4698
4513
 
4514
+ /**
4515
+ * @public
4516
+ */
4699
4517
  export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
4700
4518
 
4701
4519
  /**
4520
+ * Avatar Texture
4702
4521
  * @public
4703
4522
  */
4704
- export declare type UiAvatarTexture = {
4705
- avatarTexture?: {
4706
- userId: string;
4707
- wrapMode?: TextureWrapType;
4708
- filterMode?: TextureFilterType;
4709
- };
4710
- };
4523
+ export declare interface UiAvatarTexture {
4524
+ userId: string;
4525
+ wrapMode?: TextureWrapType;
4526
+ filterMode?: TextureFilterType;
4527
+ }
4711
4528
 
4712
4529
  /** @public */
4713
4530
  export declare const UiBackground: ComponentDefinition<PBUiBackground>;
4714
4531
 
4715
4532
  /**
4716
4533
  * @public
4534
+ * Background Component props
4535
+ * .i.e to define a background color or image
4717
4536
  */
4718
- export declare type UiBackgroundProps = {
4537
+ export declare interface UiBackgroundProps {
4538
+ /** Background color. @defaultValue `{ r: 1, g: 1, b: 1, a: 1 }` */
4719
4539
  color?: PBColor4 | undefined;
4720
4540
  textureMode?: TextureMode;
4541
+ /** Texture slices represents the top | right | bottom | left sizes of the slices for the borders. Values are percentages of the texture. */
4721
4542
  textureSlices?: BorderRect | undefined;
4543
+ /** when STRETCH is selected, the uvs are configurable */
4722
4544
  uvs?: number[];
4723
- } & UiTextureUnion;
4545
+ /** AvatarTexture for the background */
4546
+ avatarTexture?: UiAvatarTexture;
4547
+ /** Texture for the background */
4548
+ texture?: UiTexture;
4549
+ }
4724
4550
 
4725
4551
  /**
4552
+ * Button Component Props
4726
4553
  * @public
4727
4554
  */
4728
- export declare type UiButtonProps = UiLabelProps & {
4729
- type?: 'primary' | 'secondary';
4730
- };
4555
+ export declare interface UiButtonProps extends UiLabelProps, EntityPropTypes {
4556
+ /**
4557
+ * Use any of the available button style types to create a styled button.
4558
+ */
4559
+ variant?: 'primary' | 'secondary';
4560
+ }
4731
4561
 
4732
- export declare type UiComponent = () => JSX.Element;
4562
+ /**
4563
+ * @public
4564
+ */
4565
+ export declare type UiComponent = () => ReactEcs.JSX.Element;
4733
4566
 
4734
4567
  /** @public */
4735
4568
  export declare const UiDropdown: ComponentDefinition<PBUiDropdown>;
4736
4569
 
4737
4570
  /**
4738
4571
  * @public
4572
+ * Dropdown Props
4739
4573
  */
4740
- export declare type UiDropdownProps = Partial<Omit<PBUiDropdown, 'textAlign' | 'font'>> & {
4574
+ export declare interface UiDropdownProps extends EntityPropTypes, Omit<Partial<PBUiDropdown>, 'textAlign' | 'font'> {
4741
4575
  onChange?(value: number): void;
4742
4576
  font?: UiFontType;
4743
4577
  textAlign?: TextAlignType;
4744
- };
4578
+ }
4745
4579
 
4746
4580
  /** @public */
4747
4581
  export declare const UiDropdownResult: ComponentDefinition<PBUiDropdownResult>;
4748
4582
 
4749
4583
  /**
4750
4584
  * @public
4585
+ * @category Component
4751
4586
  */
4752
- export declare function UiEntity(props: EntityPropTypes & Partial<CommonProps>): ReactEcs.JSX.Element;
4587
+ export declare function UiEntity(props: EntityPropTypes): ReactEcs.JSX.Element;
4753
4588
 
4754
4589
  /**
4755
4590
  * @public
@@ -4762,26 +4597,32 @@ export declare const UiInput: ComponentDefinition<PBUiInput>;
4762
4597
  /**
4763
4598
  * @public
4764
4599
  */
4765
- export declare type UiInputProps = Omit<PBUiInput, 'font' | 'textAlign'> & {
4600
+ export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlign'> {
4601
+ /** function to be called on value change */
4766
4602
  onChange?(value: string): void;
4767
4603
  font?: UiFontType;
4768
4604
  textAlign?: TextAlignType;
4769
- };
4605
+ }
4770
4606
 
4771
4607
  /** @public */
4772
4608
  export declare const UiInputResult: ComponentDefinition<PBUiInputResult>;
4773
4609
 
4774
4610
  /**
4611
+ * Label component props
4775
4612
  * @public
4776
4613
  */
4777
- export declare type UiLabelProps = Omit<PBUiText, 'textAlign' | 'font'> & {
4778
- /** default='middle-center' */
4614
+ export declare interface UiLabelProps {
4615
+ /** Primary content. */
4616
+ value: string;
4617
+ /** Color of the label. @defaultValue `{ r: 1, g: 1, b: 1, a: 1 }` */
4618
+ color?: PBColor4 | undefined;
4619
+ /** Label font size. @defaultValue 10 */
4620
+ fontSize?: number | undefined;
4621
+ /** Label align position. @defaultValue 'middle-center' */
4779
4622
  textAlign?: TextAlignType | undefined;
4780
- /** default='sans-serif' */
4623
+ /** Label font type. @defaultValue 'sans-serif' */
4781
4624
  font?: UiFontType | undefined;
4782
- };
4783
-
4784
- export declare type Uint32 = number;
4625
+ }
4785
4626
 
4786
4627
  /**
4787
4628
  * @public It only defines the type explicitly, no effects.
@@ -4792,49 +4633,66 @@ export declare type uint32 = number;
4792
4633
  export declare const UiText: ComponentDefinition<PBUiText>;
4793
4634
 
4794
4635
  /**
4636
+ * Texture
4795
4637
  * @public
4796
4638
  */
4797
4639
  export declare type UiTexture = {
4798
- texture?: {
4799
- src: string;
4800
- wrapMode?: TextureWrapType;
4801
- filterMode?: TextureFilterType;
4802
- };
4640
+ src: string;
4641
+ wrapMode?: TextureWrapType;
4642
+ filterMode?: TextureFilterType;
4803
4643
  };
4804
4644
 
4805
- /**
4806
- * @public
4807
- */
4808
- export declare type UiTextureUnion = UiAvatarTexture | UiTexture;
4809
-
4810
4645
  /** @public */
4811
4646
  export declare const UiTransform: ComponentDefinition<PBUiTransform>;
4812
4647
 
4813
4648
  /**
4649
+ * Layout props to position things in the canvas
4814
4650
  * @public
4815
4651
  */
4816
4652
  export declare interface UiTransformProps {
4653
+ /** The display property controls if a item is going to be displayed or not. */
4817
4654
  display?: DisplayType;
4655
+ /** The flex shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container. */
4818
4656
  flex?: number;
4657
+ /** Justify content describes how to align children within the main axis of their container. */
4819
4658
  justifyContent?: JustifyType;
4659
+ /** The position type of an element defines how it is positioned within its parent. */
4820
4660
  positionType?: PositionType;
4661
+ /** The align-items property controls the alignment of items on the Cross Axis. */
4821
4662
  alignItems?: AlignType;
4663
+ /** 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
4664
  alignSelf?: AlignType;
4665
+ /** 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
4666
  alignContent?: AlignType;
4667
+ /** 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
4668
  flexDirection?: FlexDirectionType;
4669
+ /** 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
4670
  position?: Partial<Position>;
4671
+ /** The padding shorthand property sets the padding area on all four sides of an element at once. */
4826
4672
  padding?: Partial<Position>;
4673
+ /** The margin shorthand property sets the margin area on all four sides of an element. */
4827
4674
  margin?: Partial<Position>;
4675
+ /** The width property specifies the width of an element. */
4828
4676
  width?: PositionUnit;
4677
+ /** The height property specifies the height of an element. */
4829
4678
  height?: PositionUnit;
4679
+ /** The min-width property sets the minimum width of an element. */
4830
4680
  minWidth?: PositionUnit;
4681
+ /** The max-width property sets the maximum width of an element. */
4831
4682
  maxWidth?: PositionUnit;
4683
+ /** The min-height CSS property sets the minimum height of an element. */
4832
4684
  minHeight?: PositionUnit;
4685
+ /** The max-height property sets the maximum height of an element */
4833
4686
  maxHeight?: PositionUnit;
4687
+ /** 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
4688
  flexWrap?: FlexWrapType;
4689
+ /** The flex-basis property sets the initial main size of a flex item. It sets the size of the content box.*/
4835
4690
  flexBasis?: number;
4691
+ /** The flex-grow property sets the flex grow factor of a flex item's main size. */
4836
4692
  flexGrow?: number;
4693
+ /** 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
4694
  flexShrink?: number;
4695
+ /** The overflow property controls what happens to content that is too big to fit into an area */
4838
4696
  overflow?: OverflowType;
4839
4697
  }
4840
4698
 
@@ -5449,6 +5307,9 @@ export declare type Vector3Type = {
5449
5307
  /** @public */
5450
5308
  export declare const VisibilityComponent: ComponentDefinition<PBVisibilityComponent>;
5451
5309
 
5310
+ /**
5311
+ * @public
5312
+ */
5452
5313
  export declare const enum YGAlign {
5453
5314
  YGA_AUTO = 0,
5454
5315
  YGA_FLEX_START = 1,
@@ -5460,11 +5321,17 @@ export declare const enum YGAlign {
5460
5321
  YGA_SPACE_AROUND = 7
5461
5322
  }
5462
5323
 
5324
+ /**
5325
+ * @public
5326
+ */
5463
5327
  export declare const enum YGDisplay {
5464
5328
  YGD_FLEX = 0,
5465
5329
  YGD_NONE = 1
5466
5330
  }
5467
5331
 
5332
+ /**
5333
+ * @public
5334
+ */
5468
5335
  export declare const enum YGEdge {
5469
5336
  YGE_LEFT = 0,
5470
5337
  YGE_TOP = 1,
@@ -5477,6 +5344,9 @@ export declare const enum YGEdge {
5477
5344
  YGE_ALL = 8
5478
5345
  }
5479
5346
 
5347
+ /**
5348
+ * @public
5349
+ */
5480
5350
  export declare const enum YGFlexDirection {
5481
5351
  YGFD_ROW = 0,
5482
5352
  YGFD_COLUMN = 1,
@@ -5484,6 +5354,9 @@ export declare const enum YGFlexDirection {
5484
5354
  YGFD_ROW_REVERSE = 3
5485
5355
  }
5486
5356
 
5357
+ /**
5358
+ * @public
5359
+ */
5487
5360
  export declare const enum YGJustify {
5488
5361
  YGJ_FLEX_START = 0,
5489
5362
  YGJ_CENTER = 1,
@@ -5493,17 +5366,26 @@ export declare const enum YGJustify {
5493
5366
  YGJ_SPACE_EVENLY = 5
5494
5367
  }
5495
5368
 
5369
+ /**
5370
+ * @public
5371
+ */
5496
5372
  export declare const enum YGOverflow {
5497
5373
  YGO_VISIBLE = 0,
5498
5374
  YGO_HIDDEN = 1,
5499
5375
  YGO_SCROLL = 2
5500
5376
  }
5501
5377
 
5378
+ /**
5379
+ * @public
5380
+ */
5502
5381
  export declare const enum YGPositionType {
5503
5382
  YGPT_RELATIVE = 0,
5504
5383
  YGPT_ABSOLUTE = 1
5505
5384
  }
5506
5385
 
5386
+ /**
5387
+ * @public
5388
+ */
5507
5389
  export declare const enum YGUnit {
5508
5390
  YGU_UNDEFINED = 0,
5509
5391
  YGU_POINT = 1,
@@ -5511,6 +5393,9 @@ export declare const enum YGUnit {
5511
5393
  YGU_AUTO = 3
5512
5394
  }
5513
5395
 
5396
+ /**
5397
+ * @public
5398
+ */
5514
5399
  export declare const enum YGWrap {
5515
5400
  YGW_NO_WRAP = 0,
5516
5401
  YGW_WRAP = 1,