@dcl/playground-assets 7.0.6-3713220614.commit-d02ef9f → 7.0.6-3741197705.commit-bb37667
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 +92 -230
- package/dist/beta.d.ts +92 -230
- package/dist/index.bundled.d.ts +92 -230
- package/dist/index.js +155 -174
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +92 -230
- package/etc/playground-assets.api.json +658 -1527
- package/etc/playground-assets.api.md +79 -226
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/sdk",
|
|
3
|
-
"version": "7.0.6-
|
|
3
|
+
"version": "7.0.6-3741197705.commit-bb37667",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"@dcl/unity-renderer": "1.0.66458-20221207172857.commit-1a83854"
|
|
26
26
|
},
|
|
27
27
|
"minCliVersion": "3.14.1",
|
|
28
|
-
"commit": "
|
|
28
|
+
"commit": "bb376675027050591f82fce195c1797a5b77ed3a"
|
|
29
29
|
}
|
|
@@ -5,7 +5,7 @@ export declare const Animator: AnimatorComponentDefinitionExtended;
|
|
|
5
5
|
/**
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export declare type AnimatorComponentDefinition = ComponentDefinition<
|
|
8
|
+
export declare type AnimatorComponentDefinition = ComponentDefinition<PBAnimator>;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @public
|
|
@@ -50,32 +50,11 @@ export declare interface AnimatorComponentDefinitionExtended extends AnimatorCom
|
|
|
50
50
|
stopAllAnimations(entity: Entity, resetCursor?: boolean): boolean;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
export declare const AnimatorSchema: ISchema<PBAnimator> & {
|
|
57
|
-
COMPONENT_ID: number;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
53
|
/** @public */
|
|
61
|
-
export declare const AudioSource: ComponentDefinition<
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
*/
|
|
66
|
-
export declare const AudioSourceSchema: ISchema<PBAudioSource> & {
|
|
67
|
-
COMPONENT_ID: number;
|
|
68
|
-
};
|
|
54
|
+
export declare const AudioSource: ComponentDefinition<PBAudioSource>;
|
|
69
55
|
|
|
70
56
|
/** @public */
|
|
71
|
-
export declare const AudioStream: ComponentDefinition<
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
export declare const AudioStreamSchema: ISchema<PBAudioStream> & {
|
|
77
|
-
COMPONENT_ID: number;
|
|
78
|
-
};
|
|
57
|
+
export declare const AudioStream: ComponentDefinition<PBAudioStream>;
|
|
79
58
|
|
|
80
59
|
export declare const enum AvatarAnchorPointType {
|
|
81
60
|
AAPT_POSITION = 0,
|
|
@@ -85,24 +64,10 @@ export declare const enum AvatarAnchorPointType {
|
|
|
85
64
|
}
|
|
86
65
|
|
|
87
66
|
/** @public */
|
|
88
|
-
export declare const AvatarAttach: ComponentDefinition<
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
*
|
|
92
|
-
*/
|
|
93
|
-
export declare const AvatarAttachSchema: ISchema<PBAvatarAttach> & {
|
|
94
|
-
COMPONENT_ID: number;
|
|
95
|
-
};
|
|
67
|
+
export declare const AvatarAttach: ComponentDefinition<PBAvatarAttach>;
|
|
96
68
|
|
|
97
69
|
/** @public */
|
|
98
|
-
export declare const AvatarModifierArea: ComponentDefinition<
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
*/
|
|
103
|
-
export declare const AvatarModifierAreaSchema: ISchema<PBAvatarModifierArea> & {
|
|
104
|
-
COMPONENT_ID: number;
|
|
105
|
-
};
|
|
70
|
+
export declare const AvatarModifierArea: ComponentDefinition<PBAvatarModifierArea>;
|
|
106
71
|
|
|
107
72
|
export declare const enum AvatarModifierType {
|
|
108
73
|
AMT_HIDE_AVATARS = 0,
|
|
@@ -110,14 +75,7 @@ export declare const enum AvatarModifierType {
|
|
|
110
75
|
}
|
|
111
76
|
|
|
112
77
|
/** @public */
|
|
113
|
-
export declare const AvatarShape: ComponentDefinition<
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
*
|
|
117
|
-
*/
|
|
118
|
-
export declare const AvatarShapeSchema: ISchema<PBAvatarShape> & {
|
|
119
|
-
COMPONENT_ID: number;
|
|
120
|
-
};
|
|
78
|
+
export declare const AvatarShape: ComponentDefinition<PBAvatarShape>;
|
|
121
79
|
|
|
122
80
|
export declare interface AvatarTexture {
|
|
123
81
|
userId: string;
|
|
@@ -136,20 +94,13 @@ export declare const AvatarTexture: {
|
|
|
136
94
|
};
|
|
137
95
|
|
|
138
96
|
/** @public */
|
|
139
|
-
export declare const Billboard: ComponentDefinition<
|
|
97
|
+
export declare const Billboard: ComponentDefinition<PBBillboard>;
|
|
140
98
|
|
|
141
99
|
export declare const enum BillboardMode {
|
|
142
100
|
BM_ALL_AXES = 0,
|
|
143
101
|
BM_Y_AXE = 1
|
|
144
102
|
}
|
|
145
103
|
|
|
146
|
-
/**
|
|
147
|
-
*
|
|
148
|
-
*/
|
|
149
|
-
export declare const BillboardSchema: ISchema<PBBillboard> & {
|
|
150
|
-
COMPONENT_ID: number;
|
|
151
|
-
};
|
|
152
|
-
|
|
153
104
|
/**
|
|
154
105
|
* @public
|
|
155
106
|
*/
|
|
@@ -258,24 +209,10 @@ export declare type ByteBuffer = {
|
|
|
258
209
|
};
|
|
259
210
|
|
|
260
211
|
/** @public */
|
|
261
|
-
export declare const CameraMode: ComponentDefinition<
|
|
212
|
+
export declare const CameraMode: ComponentDefinition<PBCameraMode>;
|
|
262
213
|
|
|
263
214
|
/** @public */
|
|
264
|
-
export declare const CameraModeArea: ComponentDefinition<
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
*
|
|
268
|
-
*/
|
|
269
|
-
export declare const CameraModeAreaSchema: ISchema<PBCameraModeArea> & {
|
|
270
|
-
COMPONENT_ID: number;
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
*
|
|
275
|
-
*/
|
|
276
|
-
export declare const CameraModeSchema: ISchema<PBCameraMode> & {
|
|
277
|
-
COMPONENT_ID: number;
|
|
278
|
-
};
|
|
215
|
+
export declare const CameraModeArea: ComponentDefinition<PBCameraModeArea>;
|
|
279
216
|
|
|
280
217
|
export declare const enum CameraType {
|
|
281
218
|
CT_FIRST_PERSON = 0,
|
|
@@ -1005,12 +942,12 @@ export declare type CommonProps = {
|
|
|
1005
942
|
/**
|
|
1006
943
|
* @public
|
|
1007
944
|
*/
|
|
1008
|
-
export declare type ComponentDefinition<T
|
|
945
|
+
export declare type ComponentDefinition<T> = {
|
|
1009
946
|
_id: number;
|
|
1010
947
|
/**
|
|
1011
948
|
* Return the default value of the current component
|
|
1012
949
|
*/
|
|
1013
|
-
default(): DeepReadonly<
|
|
950
|
+
default(): DeepReadonly<T>;
|
|
1014
951
|
/**
|
|
1015
952
|
* Get if the entity has this component
|
|
1016
953
|
* @param entity - entity to test
|
|
@@ -1021,45 +958,45 @@ export declare type ComponentDefinition<T extends ISchema<ConstructorType>, Cons
|
|
|
1021
958
|
* @param entity - Entity that will be used to get the component
|
|
1022
959
|
* @returns
|
|
1023
960
|
*/
|
|
1024
|
-
get(entity: Entity): DeepReadonly<
|
|
961
|
+
get(entity: Entity): DeepReadonly<T>;
|
|
1025
962
|
/**
|
|
1026
963
|
* Get the readonly component of the entity (to mutate it, use getMutable instead), or null if the entity doesn't have the component.
|
|
1027
964
|
* @param entity - Entity that will be used to try to get the component
|
|
1028
965
|
*/
|
|
1029
|
-
getOrNull(entity: Entity): DeepReadonly<
|
|
966
|
+
getOrNull(entity: Entity): DeepReadonly<T> | null;
|
|
1030
967
|
/**
|
|
1031
968
|
* Add the current component to an entity, throw an error if the component already exists (use `createOrReplace` instead).
|
|
1032
969
|
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1033
970
|
* @param entity - Entity that will be used to create the component
|
|
1034
971
|
* @param val - The initial value
|
|
1035
972
|
*/
|
|
1036
|
-
create(entity: Entity, val?:
|
|
973
|
+
create(entity: Entity, val?: T): T;
|
|
1037
974
|
/**
|
|
1038
975
|
* Add the current component to an entity or replace the content if the entity already has the component
|
|
1039
976
|
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1040
977
|
* @param entity - Entity that will be used to create or replace the component
|
|
1041
978
|
* @param val - The initial or new value
|
|
1042
979
|
*/
|
|
1043
|
-
createOrReplace(entity: Entity, val?:
|
|
980
|
+
createOrReplace(entity: Entity, val?: T): T;
|
|
1044
981
|
/**
|
|
1045
982
|
* @public
|
|
1046
983
|
* Delete the current component to an entity, return null if the entity doesn't have the current component.
|
|
1047
984
|
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1048
985
|
* @param entity - Entity to delete the component from
|
|
1049
986
|
*/
|
|
1050
|
-
deleteFrom(entity: Entity):
|
|
987
|
+
deleteFrom(entity: Entity): T | null;
|
|
1051
988
|
/**
|
|
1052
989
|
* Get the mutable component of the entity, throw an error if the entity doesn't have the component.
|
|
1053
990
|
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1054
991
|
* @param entity - Entity to get the component from
|
|
1055
992
|
*/
|
|
1056
|
-
getMutable(entity: Entity):
|
|
993
|
+
getMutable(entity: Entity): T;
|
|
1057
994
|
/**
|
|
1058
995
|
* Get the mutable component of the entity, return null if the entity doesn't have the component.
|
|
1059
996
|
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1060
997
|
* @param entity - Entity to get the component from
|
|
1061
998
|
*/
|
|
1062
|
-
getMutableOrNull(entity: Entity):
|
|
999
|
+
getMutableOrNull(entity: Entity): T | null;
|
|
1063
1000
|
writeToByteBuffer(entity: Entity, buffer: ByteBuffer): void;
|
|
1064
1001
|
};
|
|
1065
1002
|
|
|
@@ -1072,11 +1009,6 @@ export declare type ComponentSchema<T extends [ComponentDefinition<any>, ...Comp
|
|
|
1072
1009
|
[K in keyof T]: T[K] extends ComponentDefinition<any> ? ReturnType<T[K]['getMutable']> : never;
|
|
1073
1010
|
};
|
|
1074
1011
|
|
|
1075
|
-
/**
|
|
1076
|
-
* @public
|
|
1077
|
-
*/
|
|
1078
|
-
export declare type ComponentType<T extends ISchema> = EcsResult<T>;
|
|
1079
|
-
|
|
1080
1012
|
export declare function Container({ width, height, children }: ContainerPropTypes): ReactEcs.JSX.Element;
|
|
1081
1013
|
|
|
1082
1014
|
export declare type ContainerPropTypes = Partial<CommonProps> & EntityPropTypes['uiTransform'];
|
|
@@ -1178,7 +1110,7 @@ export declare type DeepReadonlyObject<T> = {
|
|
|
1178
1110
|
*/
|
|
1179
1111
|
export declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
|
1180
1112
|
|
|
1181
|
-
export declare function defineComponent<T
|
|
1113
|
+
export declare function defineComponent<T>(componentId: number, spec: ISchema<T>): ComponentDefinition<T>;
|
|
1182
1114
|
|
|
1183
1115
|
/**
|
|
1184
1116
|
* Constant used to convert from Euler degrees to radians
|
|
@@ -1190,11 +1122,6 @@ export declare type EcsElements = {
|
|
|
1190
1122
|
entity: Partial<Omit<EntityComponents, 'onClick'> & CommonProps>;
|
|
1191
1123
|
};
|
|
1192
1124
|
|
|
1193
|
-
/**
|
|
1194
|
-
* @public
|
|
1195
|
-
*/
|
|
1196
|
-
export declare type EcsResult<T extends ISchema> = T extends ISchema ? ReturnType<T['deserialize']> : never;
|
|
1197
|
-
|
|
1198
1125
|
/**
|
|
1199
1126
|
* @public
|
|
1200
1127
|
*/
|
|
@@ -1287,14 +1214,7 @@ export declare type GlobalInputEventResult = InputEventResult & {
|
|
|
1287
1214
|
};
|
|
1288
1215
|
|
|
1289
1216
|
/** @public */
|
|
1290
|
-
export declare const GltfContainer: ComponentDefinition<
|
|
1291
|
-
|
|
1292
|
-
/**
|
|
1293
|
-
*
|
|
1294
|
-
*/
|
|
1295
|
-
export declare const GltfContainerSchema: ISchema<PBGltfContainer> & {
|
|
1296
|
-
COMPONENT_ID: number;
|
|
1297
|
-
};
|
|
1217
|
+
export declare const GltfContainer: ComponentDefinition<PBGltfContainer>;
|
|
1298
1218
|
|
|
1299
1219
|
/**
|
|
1300
1220
|
* @public
|
|
@@ -1356,7 +1276,7 @@ export declare type IEngine = {
|
|
|
1356
1276
|
* @param component - The component definition
|
|
1357
1277
|
* @param componentId - unique id to identify the component, if the component id already exist, it will fail.
|
|
1358
1278
|
*/
|
|
1359
|
-
registerCustomComponent<T
|
|
1279
|
+
registerCustomComponent<T>(component: ComponentDefinition<T>, componentId: number): ComponentDefinition<T>;
|
|
1360
1280
|
/**
|
|
1361
1281
|
* Define a component and add it to the engine.
|
|
1362
1282
|
* @param spec - An object with schema fields
|
|
@@ -1373,7 +1293,7 @@ export declare type IEngine = {
|
|
|
1373
1293
|
*
|
|
1374
1294
|
* ```
|
|
1375
1295
|
*/
|
|
1376
|
-
defineComponent<T extends Spec
|
|
1296
|
+
defineComponent<T extends Spec>(spec: T, componentId: number, constructorDefault?: Partial<MapResult<T>>): MapComponentDefinition<MapResult<T>>;
|
|
1377
1297
|
/**
|
|
1378
1298
|
* Define a component and add it to the engine.
|
|
1379
1299
|
* @param spec - An object with schema fields
|
|
@@ -1385,7 +1305,7 @@ export declare type IEngine = {
|
|
|
1385
1305
|
* const StateComponent = engine.defineComponent(Schemas.Bool, VisibleComponentId)
|
|
1386
1306
|
* ```
|
|
1387
1307
|
*/
|
|
1388
|
-
defineComponentFromSchema<T
|
|
1308
|
+
defineComponentFromSchema<T>(spec: ISchema<T>, componentId: number): ComponentDefinition<T>;
|
|
1389
1309
|
/**
|
|
1390
1310
|
* Get the component definition from the component id.
|
|
1391
1311
|
* @param componentId - component number used to identify the component descriptor
|
|
@@ -1395,7 +1315,7 @@ export declare type IEngine = {
|
|
|
1395
1315
|
* const StateComponent = engine.getComponent(StateComponentId)
|
|
1396
1316
|
* ```
|
|
1397
1317
|
*/
|
|
1398
|
-
getComponent<T
|
|
1318
|
+
getComponent<T>(componentId: number): ComponentDefinition<T>;
|
|
1399
1319
|
/**
|
|
1400
1320
|
* Get the component definition from the component id.
|
|
1401
1321
|
* @param componentId - component number used to identify the component descriptor
|
|
@@ -1405,7 +1325,7 @@ export declare type IEngine = {
|
|
|
1405
1325
|
* const StateComponent = engine.getComponent(StateComponentId)
|
|
1406
1326
|
* ```
|
|
1407
1327
|
*/
|
|
1408
|
-
getComponentOrNull<T
|
|
1328
|
+
getComponentOrNull<T>(componentId: number): ComponentDefinition<T> | null;
|
|
1409
1329
|
/**
|
|
1410
1330
|
* Get a iterator of entities that has all the component requested.
|
|
1411
1331
|
* @param components - a list of component definitions
|
|
@@ -1618,7 +1538,7 @@ export declare type IInputSystem = {
|
|
|
1618
1538
|
/**
|
|
1619
1539
|
* @public
|
|
1620
1540
|
*/
|
|
1621
|
-
export declare function IMap<T extends Spec>(spec: T): ISchema<
|
|
1541
|
+
export declare function IMap<T extends Spec>(spec: T, defaultValue?: Partial<MapResult<T>>): ISchema<MapResult<T>>;
|
|
1622
1542
|
|
|
1623
1543
|
/** Include property keys from T where the property is assignable to U */
|
|
1624
1544
|
export declare type IncludeUndefined<T> = {
|
|
@@ -1670,6 +1590,7 @@ export declare type ISchema<T = any> = {
|
|
|
1670
1590
|
serialize(value: T, builder: ByteBuffer): void;
|
|
1671
1591
|
deserialize(reader: ByteBuffer): T;
|
|
1672
1592
|
create(): T;
|
|
1593
|
+
extend?: (base?: T) => T;
|
|
1673
1594
|
};
|
|
1674
1595
|
|
|
1675
1596
|
export declare const isListener: (key: string) => key is "onClick";
|
|
@@ -1688,12 +1609,36 @@ export declare type Listeners = {
|
|
|
1688
1609
|
onClick?: EventSystemCallback;
|
|
1689
1610
|
};
|
|
1690
1611
|
|
|
1612
|
+
export declare interface MapComponentDefinition<T> extends ComponentDefinition<T> {
|
|
1613
|
+
/**
|
|
1614
|
+
* Add the current component to an entity, throw an error if the component already exists (use `createOrReplace` instead).
|
|
1615
|
+
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1616
|
+
* @param entity - Entity that will be used to create the component
|
|
1617
|
+
* @param val - The initial value
|
|
1618
|
+
*/
|
|
1619
|
+
create(entity: Entity, val?: Partial<T>): T;
|
|
1620
|
+
/**
|
|
1621
|
+
* Add the current component to an entity or replace the content if the entity already has the component
|
|
1622
|
+
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1623
|
+
* @param entity - Entity that will be used to create or replace the component
|
|
1624
|
+
* @param val - The initial or new value
|
|
1625
|
+
*/
|
|
1626
|
+
createOrReplace(entity: Entity, val?: Partial<T>): T;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
/**
|
|
1630
|
+
* @public
|
|
1631
|
+
*/
|
|
1632
|
+
export declare type MapResult<T extends Spec> = ToOptional<{
|
|
1633
|
+
[K in keyof T]: T[K] extends ISchema ? ReturnType<T[K]['deserialize']> : T[K] extends Spec ? MapResult<T[K]> : never;
|
|
1634
|
+
}>;
|
|
1635
|
+
|
|
1691
1636
|
export declare const Material: MaterialComponentDefinitionExtended;
|
|
1692
1637
|
|
|
1693
1638
|
/**
|
|
1694
1639
|
* @public
|
|
1695
1640
|
*/
|
|
1696
|
-
export declare type MaterialComponentDefinition = ComponentDefinition<
|
|
1641
|
+
export declare type MaterialComponentDefinition = ComponentDefinition<PBMaterial>;
|
|
1697
1642
|
|
|
1698
1643
|
/**
|
|
1699
1644
|
* @public
|
|
@@ -1717,13 +1662,6 @@ export declare interface MaterialComponentDefinitionExtended extends MaterialCom
|
|
|
1717
1662
|
setPbrMaterial: (entity: Entity, material: PBMaterial_PbrMaterial) => void;
|
|
1718
1663
|
}
|
|
1719
1664
|
|
|
1720
|
-
/**
|
|
1721
|
-
*
|
|
1722
|
-
*/
|
|
1723
|
-
export declare const MaterialSchema: ISchema<PBMaterial> & {
|
|
1724
|
-
COMPONENT_ID: number;
|
|
1725
|
-
};
|
|
1726
|
-
|
|
1727
1665
|
export declare const enum MaterialTransparencyMode {
|
|
1728
1666
|
MTM_OPAQUE = 0,
|
|
1729
1667
|
MTM_ALPHA_TEST = 1,
|
|
@@ -2468,7 +2406,7 @@ export declare const MeshCollider: MeshColliderComponentDefinitionExtended;
|
|
|
2468
2406
|
/**
|
|
2469
2407
|
* @public
|
|
2470
2408
|
*/
|
|
2471
|
-
export declare type MeshColliderComponentDefinition = ComponentDefinition<
|
|
2409
|
+
export declare type MeshColliderComponentDefinition = ComponentDefinition<PBMeshCollider>;
|
|
2472
2410
|
|
|
2473
2411
|
/**
|
|
2474
2412
|
* @public
|
|
@@ -2506,19 +2444,12 @@ export declare interface MeshColliderComponentDefinitionExtended extends MeshCol
|
|
|
2506
2444
|
setSphere(entity: Entity, colliderLayers?: ColliderLayer | ColliderLayer[]): void;
|
|
2507
2445
|
}
|
|
2508
2446
|
|
|
2509
|
-
/**
|
|
2510
|
-
*
|
|
2511
|
-
*/
|
|
2512
|
-
export declare const MeshColliderSchema: ISchema<PBMeshCollider> & {
|
|
2513
|
-
COMPONENT_ID: number;
|
|
2514
|
-
};
|
|
2515
|
-
|
|
2516
2447
|
export declare const MeshRenderer: MeshRendererComponentDefinitionExtended;
|
|
2517
2448
|
|
|
2518
2449
|
/**
|
|
2519
2450
|
* @public
|
|
2520
2451
|
*/
|
|
2521
|
-
export declare type MeshRendererComponentDefinition = ComponentDefinition<
|
|
2452
|
+
export declare type MeshRendererComponentDefinition = ComponentDefinition<PBMeshRenderer>;
|
|
2522
2453
|
|
|
2523
2454
|
/**
|
|
2524
2455
|
* @public
|
|
@@ -2554,13 +2485,6 @@ export declare interface MeshRendererComponentDefinitionExtended extends MeshRen
|
|
|
2554
2485
|
setSphere(entity: Entity): void;
|
|
2555
2486
|
}
|
|
2556
2487
|
|
|
2557
|
-
/**
|
|
2558
|
-
*
|
|
2559
|
-
*/
|
|
2560
|
-
export declare const MeshRendererSchema: ISchema<PBMeshRenderer> & {
|
|
2561
|
-
COMPONENT_ID: number;
|
|
2562
|
-
};
|
|
2563
|
-
|
|
2564
2488
|
export declare class MessageBus {
|
|
2565
2489
|
private messageQueue;
|
|
2566
2490
|
private flushing;
|
|
@@ -2597,14 +2521,7 @@ export declare const enum NftFrameType {
|
|
|
2597
2521
|
}
|
|
2598
2522
|
|
|
2599
2523
|
/** @public */
|
|
2600
|
-
export declare const NftShape: ComponentDefinition<
|
|
2601
|
-
|
|
2602
|
-
/**
|
|
2603
|
-
*
|
|
2604
|
-
*/
|
|
2605
|
-
export declare const NftShapeSchema: ISchema<PBNftShape> & {
|
|
2606
|
-
COMPONENT_ID: number;
|
|
2607
|
-
};
|
|
2524
|
+
export declare const NftShape: ComponentDefinition<PBNftShape>;
|
|
2608
2525
|
|
|
2609
2526
|
export declare class Observable<T> {
|
|
2610
2527
|
private _observers;
|
|
@@ -3631,14 +3548,7 @@ export declare namespace Plane {
|
|
|
3631
3548
|
}
|
|
3632
3549
|
|
|
3633
3550
|
/** @public */
|
|
3634
|
-
export declare const PointerEventsResult: ComponentDefinition<
|
|
3635
|
-
|
|
3636
|
-
/**
|
|
3637
|
-
*
|
|
3638
|
-
*/
|
|
3639
|
-
export declare const PointerEventsResultSchema: ISchema<PBPointerEventsResult> & {
|
|
3640
|
-
COMPONENT_ID: number;
|
|
3641
|
-
};
|
|
3551
|
+
export declare const PointerEventsResult: ComponentDefinition<PBPointerEventsResult>;
|
|
3642
3552
|
|
|
3643
3553
|
export declare type PointerEventsSystem = ReturnType<typeof createPointerEventSystem>;
|
|
3644
3554
|
|
|
@@ -3659,24 +3569,10 @@ export declare const enum PointerEventType {
|
|
|
3659
3569
|
}
|
|
3660
3570
|
|
|
3661
3571
|
/** @public */
|
|
3662
|
-
export declare const PointerHoverFeedback: ComponentDefinition<
|
|
3663
|
-
|
|
3664
|
-
/**
|
|
3665
|
-
*
|
|
3666
|
-
*/
|
|
3667
|
-
export declare const PointerHoverFeedbackSchema: ISchema<PBPointerHoverFeedback> & {
|
|
3668
|
-
COMPONENT_ID: number;
|
|
3669
|
-
};
|
|
3572
|
+
export declare const PointerHoverFeedback: ComponentDefinition<PBPointerHoverFeedback>;
|
|
3670
3573
|
|
|
3671
3574
|
/** @public */
|
|
3672
|
-
export declare const PointerLock: ComponentDefinition<
|
|
3673
|
-
|
|
3674
|
-
/**
|
|
3675
|
-
*
|
|
3676
|
-
*/
|
|
3677
|
-
export declare const PointerLockSchema: ISchema<PBPointerLock> & {
|
|
3678
|
-
COMPONENT_ID: number;
|
|
3679
|
-
};
|
|
3575
|
+
export declare const PointerLock: ComponentDefinition<PBPointerLock>;
|
|
3680
3576
|
|
|
3681
3577
|
/**
|
|
3682
3578
|
* @public
|
|
@@ -3954,7 +3850,7 @@ export declare type QuaternionType = {
|
|
|
3954
3850
|
export declare const RAD2DEG: number;
|
|
3955
3851
|
|
|
3956
3852
|
/** @public */
|
|
3957
|
-
export declare const Raycast: ComponentDefinition<
|
|
3853
|
+
export declare const Raycast: ComponentDefinition<PBRaycast>;
|
|
3958
3854
|
|
|
3959
3855
|
/** Position will be relative to the scene */
|
|
3960
3856
|
export declare interface RaycastHit {
|
|
@@ -3987,21 +3883,7 @@ export declare type RaycastResponsePayload<T> = {
|
|
|
3987
3883
|
};
|
|
3988
3884
|
|
|
3989
3885
|
/** @public */
|
|
3990
|
-
export declare const RaycastResult: ComponentDefinition<
|
|
3991
|
-
|
|
3992
|
-
/**
|
|
3993
|
-
*
|
|
3994
|
-
*/
|
|
3995
|
-
export declare const RaycastResultSchema: ISchema<PBRaycastResult> & {
|
|
3996
|
-
COMPONENT_ID: number;
|
|
3997
|
-
};
|
|
3998
|
-
|
|
3999
|
-
/**
|
|
4000
|
-
*
|
|
4001
|
-
*/
|
|
4002
|
-
export declare const RaycastSchema: ISchema<PBRaycast> & {
|
|
4003
|
-
COMPONENT_ID: number;
|
|
4004
|
-
};
|
|
3886
|
+
export declare const RaycastResult: ComponentDefinition<PBRaycastResult>;
|
|
4005
3887
|
|
|
4006
3888
|
export declare type ReactBasedUiSystem = {
|
|
4007
3889
|
destroy(): void;
|
|
@@ -4024,8 +3906,8 @@ export declare const ReactEcsRenderer: ReactBasedUiSystem;
|
|
|
4024
3906
|
/**
|
|
4025
3907
|
* @public
|
|
4026
3908
|
*/
|
|
4027
|
-
export declare type ReadonlyComponentSchema<T extends [ComponentDefinition<
|
|
4028
|
-
[K in keyof T]: T[K] extends ComponentDefinition<
|
|
3909
|
+
export declare type ReadonlyComponentSchema<T extends [ComponentDefinition<unknown>, ...ComponentDefinition<unknown>[]]> = {
|
|
3910
|
+
[K in keyof T]: T[K] extends ComponentDefinition<unknown> ? ReturnType<T[K]['get']> : never;
|
|
4029
3911
|
};
|
|
4030
3912
|
|
|
4031
3913
|
/**
|
|
@@ -4043,13 +3925,6 @@ export declare type ReceiveMessage = {
|
|
|
4043
3925
|
messageBuffer: Uint8Array;
|
|
4044
3926
|
};
|
|
4045
3927
|
|
|
4046
|
-
/**
|
|
4047
|
-
* @public
|
|
4048
|
-
*/
|
|
4049
|
-
export declare type Result<T extends Spec> = ToOptional<{
|
|
4050
|
-
[K in keyof T]: T[K] extends ISchema ? ReturnType<T[K]['deserialize']> : T[K] extends Spec ? Result<T[K]> : never;
|
|
4051
|
-
}>;
|
|
4052
|
-
|
|
4053
3928
|
export declare type RPCSendableMessage = {
|
|
4054
3929
|
jsonrpc: '2.0';
|
|
4055
3930
|
id: number;
|
|
@@ -4286,6 +4161,12 @@ export declare interface Spec {
|
|
|
4286
4161
|
*/
|
|
4287
4162
|
export declare type SystemFn = (dt: number) => void;
|
|
4288
4163
|
|
|
4164
|
+
export declare type SystemItem = {
|
|
4165
|
+
fn: SystemFn;
|
|
4166
|
+
priority: number;
|
|
4167
|
+
name?: string;
|
|
4168
|
+
};
|
|
4169
|
+
|
|
4289
4170
|
export declare type Task<T = unknown> = () => Promise<T>;
|
|
4290
4171
|
|
|
4291
4172
|
export declare const enum TextAlignMode {
|
|
@@ -4301,14 +4182,7 @@ export declare const enum TextAlignMode {
|
|
|
4301
4182
|
}
|
|
4302
4183
|
|
|
4303
4184
|
/** @public */
|
|
4304
|
-
export declare const TextShape: ComponentDefinition<
|
|
4305
|
-
|
|
4306
|
-
/**
|
|
4307
|
-
*
|
|
4308
|
-
*/
|
|
4309
|
-
export declare const TextShapeSchema: ISchema<PBTextShape> & {
|
|
4310
|
-
COMPONENT_ID: number;
|
|
4311
|
-
};
|
|
4185
|
+
export declare const TextShape: ComponentDefinition<PBTextShape>;
|
|
4312
4186
|
|
|
4313
4187
|
export declare interface Texture {
|
|
4314
4188
|
src: string;
|
|
@@ -4385,9 +4259,20 @@ export declare const ToLinearSpace = 2.2;
|
|
|
4385
4259
|
|
|
4386
4260
|
export declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
|
|
4387
4261
|
|
|
4388
|
-
export declare const Transform:
|
|
4262
|
+
export declare const Transform: TransformComponentExtended;
|
|
4389
4263
|
|
|
4390
|
-
|
|
4264
|
+
/**
|
|
4265
|
+
* @public
|
|
4266
|
+
*/
|
|
4267
|
+
export declare type TransformComponent = ComponentDefinition<TransformType>;
|
|
4268
|
+
|
|
4269
|
+
/**
|
|
4270
|
+
* @public
|
|
4271
|
+
*/
|
|
4272
|
+
export declare interface TransformComponentExtended extends TransformComponent {
|
|
4273
|
+
create(entity: Entity, val?: TransformTypeWithOptionals): TransformType;
|
|
4274
|
+
createOrReplace(entity: Entity, val?: TransformTypeWithOptionals): TransformType;
|
|
4275
|
+
}
|
|
4391
4276
|
|
|
4392
4277
|
/**
|
|
4393
4278
|
* @public
|
|
@@ -4412,6 +4297,11 @@ export declare type TransformType = {
|
|
|
4412
4297
|
parent?: Entity;
|
|
4413
4298
|
};
|
|
4414
4299
|
|
|
4300
|
+
/**
|
|
4301
|
+
* @public
|
|
4302
|
+
*/
|
|
4303
|
+
export declare type TransformTypeWithOptionals = Partial<TransformType>;
|
|
4304
|
+
|
|
4415
4305
|
export declare type Transport = {
|
|
4416
4306
|
send(message: Uint8Array): Promise<void>;
|
|
4417
4307
|
onmessage?(message: Uint8Array): void;
|
|
@@ -4421,14 +4311,7 @@ export declare type Transport = {
|
|
|
4421
4311
|
export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
|
|
4422
4312
|
|
|
4423
4313
|
/** @public */
|
|
4424
|
-
export declare const UiBackground: ComponentDefinition<
|
|
4425
|
-
|
|
4426
|
-
/**
|
|
4427
|
-
*
|
|
4428
|
-
*/
|
|
4429
|
-
export declare const UiBackgroundSchema: ISchema<PBUiBackground> & {
|
|
4430
|
-
COMPONENT_ID: number;
|
|
4431
|
-
};
|
|
4314
|
+
export declare const UiBackground: ComponentDefinition<PBUiBackground>;
|
|
4432
4315
|
|
|
4433
4316
|
export declare type UiComponent = () => JSX.Element;
|
|
4434
4317
|
|
|
@@ -4438,17 +4321,10 @@ export declare type UiComponent = () => JSX.Element;
|
|
|
4438
4321
|
export declare function UiEntity(props: EntityPropTypes & Partial<CommonProps>): ReactEcs.JSX.Element;
|
|
4439
4322
|
|
|
4440
4323
|
/** @public */
|
|
4441
|
-
export declare const UiText: ComponentDefinition<
|
|
4442
|
-
|
|
4443
|
-
/**
|
|
4444
|
-
*
|
|
4445
|
-
*/
|
|
4446
|
-
export declare const UiTextSchema: ISchema<PBUiText> & {
|
|
4447
|
-
COMPONENT_ID: number;
|
|
4448
|
-
};
|
|
4324
|
+
export declare const UiText: ComponentDefinition<PBUiText>;
|
|
4449
4325
|
|
|
4450
4326
|
/** @public */
|
|
4451
|
-
export declare const UiTransform: ComponentDefinition<
|
|
4327
|
+
export declare const UiTransform: ComponentDefinition<PBUiTransform>;
|
|
4452
4328
|
|
|
4453
4329
|
/**
|
|
4454
4330
|
* @public
|
|
@@ -4478,13 +4354,6 @@ export declare interface UiTransformProps {
|
|
|
4478
4354
|
overflow?: YGOverflow;
|
|
4479
4355
|
}
|
|
4480
4356
|
|
|
4481
|
-
/**
|
|
4482
|
-
*
|
|
4483
|
-
*/
|
|
4484
|
-
export declare const UiTransformSchema: ISchema<PBUiTransform> & {
|
|
4485
|
-
COMPONENT_ID: number;
|
|
4486
|
-
};
|
|
4487
|
-
|
|
4488
4357
|
/**
|
|
4489
4358
|
* @public
|
|
4490
4359
|
*/
|
|
@@ -5094,14 +4963,7 @@ export declare type Vector3Type = {
|
|
|
5094
4963
|
};
|
|
5095
4964
|
|
|
5096
4965
|
/** @public */
|
|
5097
|
-
export declare const VisibilityComponent: ComponentDefinition<
|
|
5098
|
-
|
|
5099
|
-
/**
|
|
5100
|
-
*
|
|
5101
|
-
*/
|
|
5102
|
-
export declare const VisibilityComponentSchema: ISchema<PBVisibilityComponent> & {
|
|
5103
|
-
COMPONENT_ID: number;
|
|
5104
|
-
};
|
|
4966
|
+
export declare const VisibilityComponent: ComponentDefinition<PBVisibilityComponent>;
|
|
5105
4967
|
|
|
5106
4968
|
export declare namespace WireMessage {
|
|
5107
4969
|
export type Uint32 = number;
|
|
@@ -5126,7 +4988,7 @@ export declare namespace WireMessage {
|
|
|
5126
4988
|
*/
|
|
5127
4989
|
export function validate(buf: ByteBuffer): boolean;
|
|
5128
4990
|
export function readHeader(buf: ByteBuffer): Header | null;
|
|
5129
|
-
export function getType(component: ComponentDefinition<
|
|
4991
|
+
export function getType(component: ComponentDefinition<unknown>, entity: Entity): Enum;
|
|
5130
4992
|
}
|
|
5131
4993
|
|
|
5132
4994
|
export declare const enum YGAlign {
|