@dcl/sdk 7.0.0-2910409620.commit-f5c436b → 7.0.0-2947735169.commit-65163b3
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/ecs7/index.d.ts +161 -125
- package/dist/ecs7/index.js +658 -330
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/dist/ecs7/proto-definitions/MeshRenderer.proto +29 -0
- package/dist/ecs7/proto-definitions/UiText.proto +11 -0
- package/dist/ecs7/proto-definitions/UiTransform.proto +2 -0
- package/package.json +4 -4
- package/types/ecs7/index.d.ts +161 -125
package/dist/ecs7/index.d.ts
CHANGED
@@ -17,10 +17,10 @@ declare const enum ActionButton {
|
|
17
17
|
}
|
18
18
|
|
19
19
|
/** @public */
|
20
|
-
export declare const Animator: ComponentDefinition<ISchema<PBAnimator
|
20
|
+
export declare const Animator: ComponentDefinition<ISchema<PBAnimator>, PBAnimator>;
|
21
21
|
|
22
22
|
/** @public */
|
23
|
-
export declare const AudioSource: ComponentDefinition<ISchema<PBAudioSource
|
23
|
+
export declare const AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
24
24
|
|
25
25
|
declare const enum AvatarAnchorPoint {
|
26
26
|
POSITION = 0,
|
@@ -31,7 +31,7 @@ declare const enum AvatarAnchorPoint {
|
|
31
31
|
}
|
32
32
|
|
33
33
|
/** @public */
|
34
|
-
export declare const AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach
|
34
|
+
export declare const AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach>, PBAvatarAttach>;
|
35
35
|
|
36
36
|
declare const enum AvatarModifier {
|
37
37
|
HIDE_AVATARS = 0,
|
@@ -40,16 +40,16 @@ declare const enum AvatarModifier {
|
|
40
40
|
}
|
41
41
|
|
42
42
|
/** @public */
|
43
|
-
export declare const AvatarModifierArea: ComponentDefinition<ISchema<PBAvatarModifierArea
|
43
|
+
export declare const AvatarModifierArea: ComponentDefinition<ISchema<PBAvatarModifierArea>, PBAvatarModifierArea>;
|
44
44
|
|
45
45
|
/** @public */
|
46
|
-
export declare const AvatarShape: ComponentDefinition<ISchema<PBAvatarShape
|
46
|
+
export declare const AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>, PBAvatarShape>;
|
47
47
|
|
48
48
|
/** @public */
|
49
|
-
export declare const Billboard: ComponentDefinition<ISchema<PBBillboard
|
49
|
+
export declare const Billboard: ComponentDefinition<ISchema<PBBillboard>, PBBillboard>;
|
50
50
|
|
51
51
|
/** @public */
|
52
|
-
export declare const BoxShape: ComponentDefinition<ISchema<PBBoxShape
|
52
|
+
export declare const BoxShape: ComponentDefinition<ISchema<PBBoxShape>, PBBoxShape>;
|
53
53
|
|
54
54
|
/**
|
55
55
|
* @public
|
@@ -57,10 +57,10 @@ export declare const BoxShape: ComponentDefinition<ISchema<PBBoxShape>>;
|
|
57
57
|
export declare type ByteBuffer = ReturnType<typeof createByteBuffer>;
|
58
58
|
|
59
59
|
/** @public */
|
60
|
-
export declare const CameraMode: ComponentDefinition<ISchema<PBCameraMode
|
60
|
+
export declare const CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
|
61
61
|
|
62
62
|
/** @public */
|
63
|
-
export declare const CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea
|
63
|
+
export declare const CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>, PBCameraModeArea>;
|
64
64
|
|
65
65
|
declare const enum CameraModeValue {
|
66
66
|
FIRST_PERSON = 0,
|
@@ -77,7 +77,7 @@ declare interface Color3 {
|
|
77
77
|
/**
|
78
78
|
* @public
|
79
79
|
*/
|
80
|
-
export declare type ComponentDefinition<T extends ISchema = ISchema<any>> = {
|
80
|
+
export declare type ComponentDefinition<T extends ISchema = ISchema<any>, ConstructorType = ComponentType<T>> = {
|
81
81
|
_id: number;
|
82
82
|
/**
|
83
83
|
* Return the default value of the current component
|
@@ -141,7 +141,7 @@ export declare type ComponentDefinition<T extends ISchema = ISchema<any>> = {
|
|
141
141
|
* Transform.create(myEntity) // throw an error, the `Transform` component already exists in `myEntity`
|
142
142
|
* ````
|
143
143
|
*/
|
144
|
-
create(entity: Entity, val?:
|
144
|
+
create(entity: Entity, val?: ConstructorType): ComponentType<T>;
|
145
145
|
/**
|
146
146
|
* Add the current component to an entity or replace the content if the entity already has the component
|
147
147
|
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
@@ -203,68 +203,53 @@ export declare type ComponentDefinition<T extends ISchema = ISchema<any>> = {
|
|
203
203
|
/** @public */
|
204
204
|
export declare namespace Components {
|
205
205
|
/** @public */
|
206
|
-
const Transform: ComponentDefinition<ISchema<
|
207
|
-
position: {
|
208
|
-
x: number;
|
209
|
-
y: number;
|
210
|
-
z: number;
|
211
|
-
};
|
212
|
-
rotation: {
|
213
|
-
x: number;
|
214
|
-
y: number;
|
215
|
-
z: number;
|
216
|
-
w: number;
|
217
|
-
};
|
218
|
-
scale: {
|
219
|
-
x: number;
|
220
|
-
y: number;
|
206
|
+
const Transform: ComponentDefinition<ISchema<TransformType>, Partial<TransformType>>;
|
221
207
|
/** @public */
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
}>>;
|
208
|
+
const Animator: ComponentDefinition<ISchema<PBAnimator>, PBAnimator>;
|
209
|
+
/** @public */
|
210
|
+
const AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
226
211
|
/** @public */
|
227
|
-
const
|
212
|
+
const AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach>, PBAvatarAttach>;
|
228
213
|
/** @public */
|
229
|
-
const
|
214
|
+
const AvatarModifierArea: ComponentDefinition<ISchema<PBAvatarModifierArea>, PBAvatarModifierArea>;
|
230
215
|
/** @public */
|
231
|
-
const
|
216
|
+
const AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>, PBAvatarShape>;
|
232
217
|
/** @public */
|
233
|
-
const
|
218
|
+
const Billboard: ComponentDefinition<ISchema<PBBillboard>, PBBillboard>;
|
234
219
|
/** @public */
|
235
|
-
const
|
220
|
+
const BoxShape: ComponentDefinition<ISchema<PBBoxShape>, PBBoxShape>;
|
236
221
|
/** @public */
|
237
|
-
const
|
222
|
+
const CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
|
238
223
|
/** @public */
|
239
|
-
const
|
224
|
+
const CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>, PBCameraModeArea>;
|
240
225
|
/** @public */
|
241
|
-
const
|
226
|
+
const CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>, PBCylinderShape>;
|
242
227
|
/** @public */
|
243
|
-
const
|
228
|
+
const GLTFShape: ComponentDefinition<ISchema<PBGLTFShape>, PBGLTFShape>;
|
244
229
|
/** @public */
|
245
|
-
const
|
230
|
+
const Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
|
246
231
|
/** @public */
|
247
|
-
const
|
232
|
+
const MeshRenderer: ComponentDefinition<ISchema<PBMeshRenderer>, Partial<PBMeshRenderer>>;
|
248
233
|
/** @public */
|
249
|
-
const
|
234
|
+
const NFTShape: ComponentDefinition<ISchema<PBNFTShape>, PBNFTShape>;
|
250
235
|
/** @public */
|
251
|
-
const
|
236
|
+
const OnPointerDown: ComponentDefinition<ISchema<PBOnPointerDown>, PBOnPointerDown>;
|
252
237
|
/** @public */
|
253
|
-
const
|
238
|
+
const OnPointerDownResult: ComponentDefinition<ISchema<PBOnPointerDownResult>, PBOnPointerDownResult>;
|
254
239
|
/** @public */
|
255
|
-
const
|
240
|
+
const OnPointerUp: ComponentDefinition<ISchema<PBOnPointerUp>, PBOnPointerUp>;
|
256
241
|
/** @public */
|
257
|
-
const
|
242
|
+
const OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult>, PBOnPointerUpResult>;
|
258
243
|
/** @public */
|
259
|
-
const
|
244
|
+
const PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>, PBPlaneShape>;
|
260
245
|
/** @public */
|
261
|
-
const
|
246
|
+
const PointerLock: ComponentDefinition<ISchema<PBPointerLock>, PBPointerLock>;
|
262
247
|
/** @public */
|
263
|
-
const
|
248
|
+
const SphereShape: ComponentDefinition<ISchema<PBSphereShape>, PBSphereShape>;
|
264
249
|
/** @public */
|
265
|
-
const
|
250
|
+
const TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
|
266
251
|
/** @public */
|
267
|
-
const
|
252
|
+
const UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
|
268
253
|
}
|
269
254
|
|
270
255
|
/**
|
@@ -418,7 +403,7 @@ declare interface CreateByteBufferOptions {
|
|
418
403
|
}
|
419
404
|
|
420
405
|
/** @public */
|
421
|
-
export declare const CylinderShape: ComponentDefinition<ISchema<PBCylinderShape
|
406
|
+
export declare const CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>, PBCylinderShape>;
|
422
407
|
|
423
408
|
/**
|
424
409
|
* Make each field readonly deeply
|
@@ -428,47 +413,31 @@ export declare type DeepReadonly<T> = {
|
|
428
413
|
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
429
414
|
};
|
430
415
|
|
431
|
-
declare function
|
432
|
-
Transform: ComponentDefinition<ISchema<
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
Billboard: ComponentDefinition<ISchema<PBBillboard>>;
|
457
|
-
BoxShape: ComponentDefinition<ISchema<PBBoxShape>>;
|
458
|
-
CameraMode: ComponentDefinition<ISchema<PBCameraMode>>;
|
459
|
-
CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>>;
|
460
|
-
CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>>;
|
461
|
-
GLTFShape: ComponentDefinition<ISchema<PBGLTFShape>>;
|
462
|
-
Material: ComponentDefinition<ISchema<PBMaterial>>;
|
463
|
-
NFTShape: ComponentDefinition<ISchema<PBNFTShape>>;
|
464
|
-
OnPointerDown: ComponentDefinition<ISchema<PBOnPointerDown>>;
|
465
|
-
OnPointerDownResult: ComponentDefinition<ISchema<PBOnPointerDownResult>>;
|
466
|
-
OnPointerUp: ComponentDefinition<ISchema<PBOnPointerUp>>;
|
467
|
-
OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult>>;
|
468
|
-
PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>>;
|
469
|
-
PointerLock: ComponentDefinition<ISchema<PBPointerLock>>;
|
470
|
-
SphereShape: ComponentDefinition<ISchema<PBSphereShape>>;
|
471
|
-
TextShape: ComponentDefinition<ISchema<PBTextShape>>;
|
416
|
+
declare function defineSdkComponents(engine: PreEngine): {
|
417
|
+
Transform: ComponentDefinition<ISchema<TransformType>, Partial<TransformType>>;
|
418
|
+
MeshRenderer: ComponentDefinition<ISchema<PBMeshRenderer>, Partial<PBMeshRenderer>>;
|
419
|
+
Animator: ComponentDefinition<ISchema<PBAnimator>, PBAnimator>;
|
420
|
+
AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
421
|
+
AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach>, PBAvatarAttach>;
|
422
|
+
AvatarModifierArea: ComponentDefinition<ISchema<PBAvatarModifierArea>, PBAvatarModifierArea>;
|
423
|
+
AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>, PBAvatarShape>;
|
424
|
+
Billboard: ComponentDefinition<ISchema<PBBillboard>, PBBillboard>;
|
425
|
+
BoxShape: ComponentDefinition<ISchema<PBBoxShape>, PBBoxShape>;
|
426
|
+
CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
|
427
|
+
CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>, PBCameraModeArea>;
|
428
|
+
CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>, PBCylinderShape>;
|
429
|
+
GLTFShape: ComponentDefinition<ISchema<PBGLTFShape>, PBGLTFShape>;
|
430
|
+
Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
|
431
|
+
NFTShape: ComponentDefinition<ISchema<PBNFTShape>, PBNFTShape>;
|
432
|
+
OnPointerDown: ComponentDefinition<ISchema<PBOnPointerDown>, PBOnPointerDown>;
|
433
|
+
OnPointerDownResult: ComponentDefinition<ISchema<PBOnPointerDownResult>, PBOnPointerDownResult>;
|
434
|
+
OnPointerUp: ComponentDefinition<ISchema<PBOnPointerUp>, PBOnPointerUp>;
|
435
|
+
OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult>, PBOnPointerUpResult>;
|
436
|
+
PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>, PBPlaneShape>;
|
437
|
+
PointerLock: ComponentDefinition<ISchema<PBPointerLock>, PBPointerLock>;
|
438
|
+
SphereShape: ComponentDefinition<ISchema<PBSphereShape>, PBSphereShape>;
|
439
|
+
TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
|
440
|
+
UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
|
472
441
|
};
|
473
442
|
|
474
443
|
/**
|
@@ -532,7 +501,7 @@ export declare type float = number;
|
|
532
501
|
export declare type FloatArray = number[];
|
533
502
|
|
534
503
|
/** @public */
|
535
|
-
export declare const GLTFShape: ComponentDefinition<ISchema<PBGLTFShape
|
504
|
+
export declare const GLTFShape: ComponentDefinition<ISchema<PBGLTFShape>, PBGLTFShape>;
|
536
505
|
|
537
506
|
/**
|
538
507
|
* @public
|
@@ -586,6 +555,7 @@ export declare type IEngine = {
|
|
586
555
|
* Define a component and add it to the engine.
|
587
556
|
* @param spec An object with schema fields
|
588
557
|
* @param componentId unique id to identify the component, if the component id already exist, it will fail.
|
558
|
+
* @param constructorDefault the initial value prefilled when a component is created without a value
|
589
559
|
* @return The component definition
|
590
560
|
*
|
591
561
|
* ```ts
|
@@ -597,7 +567,7 @@ export declare type IEngine = {
|
|
597
567
|
*
|
598
568
|
* ```
|
599
569
|
*/
|
600
|
-
defineComponent<T extends Spec
|
570
|
+
defineComponent<T extends Spec, ConstructorType = Partial<Result<T>>>(spec: Spec, componentId: number, constructorDefault?: Partial<Result<T>>): ComponentDefinition<ISchema<Result<T>>, ConstructorType>;
|
601
571
|
/**
|
602
572
|
* Define a component and add it to the engine.
|
603
573
|
* @param spec An object with schema fields
|
@@ -609,7 +579,7 @@ export declare type IEngine = {
|
|
609
579
|
* const StateComponent = engine.defineComponent(Schemas.Bool, VisibleComponentId)
|
610
580
|
* ```
|
611
581
|
*/
|
612
|
-
defineComponentFromSchema<T extends ISchema
|
582
|
+
defineComponentFromSchema<T extends ISchema<Record<string, any>>, ConstructorType = ComponentType<T>>(spec: T, componentId: number, constructorDefault?: ConstructorType): ComponentDefinition<T, ConstructorType>;
|
613
583
|
/**
|
614
584
|
* Get the component definition from the component id.
|
615
585
|
* @param componentId
|
@@ -690,7 +660,7 @@ export declare interface ISize {
|
|
690
660
|
export declare const log: (...a: any[]) => void;
|
691
661
|
|
692
662
|
/** @public */
|
693
|
-
export declare const Material: ComponentDefinition<ISchema<PBMaterial
|
663
|
+
export declare const Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
|
694
664
|
|
695
665
|
/**
|
696
666
|
* Class used to store matrix data (4x4)
|
@@ -1412,7 +1382,10 @@ declare namespace Matrix {
|
|
1412
1382
|
}
|
1413
1383
|
|
1414
1384
|
/** @public */
|
1415
|
-
export declare const
|
1385
|
+
export declare const MeshRenderer: ComponentDefinition<ISchema<PBMeshRenderer>, Partial<PBMeshRenderer>>;
|
1386
|
+
|
1387
|
+
/** @public */
|
1388
|
+
export declare const NFTShape: ComponentDefinition<ISchema<PBNFTShape>, PBNFTShape>;
|
1416
1389
|
|
1417
1390
|
/** @public */
|
1418
1391
|
export declare type Nullable<T> = T | null;
|
@@ -1426,16 +1399,16 @@ declare type OnlyOptionalUndefinedTypes<T> = {
|
|
1426
1399
|
};
|
1427
1400
|
|
1428
1401
|
/** @public */
|
1429
|
-
export declare const OnPointerDown: ComponentDefinition<ISchema<PBOnPointerDown
|
1402
|
+
export declare const OnPointerDown: ComponentDefinition<ISchema<PBOnPointerDown>, PBOnPointerDown>;
|
1430
1403
|
|
1431
1404
|
/** @public */
|
1432
|
-
export declare const OnPointerDownResult: ComponentDefinition<ISchema<PBOnPointerDownResult
|
1405
|
+
export declare const OnPointerDownResult: ComponentDefinition<ISchema<PBOnPointerDownResult>, PBOnPointerDownResult>;
|
1433
1406
|
|
1434
1407
|
/** @public */
|
1435
|
-
export declare const OnPointerUp: ComponentDefinition<ISchema<PBOnPointerUp
|
1408
|
+
export declare const OnPointerUp: ComponentDefinition<ISchema<PBOnPointerUp>, PBOnPointerUp>;
|
1436
1409
|
|
1437
1410
|
/** @public */
|
1438
|
-
export declare const OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult
|
1411
|
+
export declare const OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult>, PBOnPointerUpResult>;
|
1439
1412
|
|
1440
1413
|
/**
|
1441
1414
|
* Defines potential orientation for back face culling
|
@@ -1597,6 +1570,31 @@ declare interface PBMaterial_Texture {
|
|
1597
1570
|
filterMode?: FilterMode | undefined;
|
1598
1571
|
}
|
1599
1572
|
|
1573
|
+
declare interface PBMeshRenderer {
|
1574
|
+
box: PBMeshRenderer_BoxMesh | undefined;
|
1575
|
+
sphere: PBMeshRenderer_SphereMesh | undefined;
|
1576
|
+
cylinder: PBMeshRenderer_CylinderMesh | undefined;
|
1577
|
+
plane: PBMeshRenderer_PlaneMesh | undefined;
|
1578
|
+
}
|
1579
|
+
|
1580
|
+
declare interface PBMeshRenderer_BoxMesh {
|
1581
|
+
uvs: number[];
|
1582
|
+
}
|
1583
|
+
|
1584
|
+
declare interface PBMeshRenderer_CylinderMesh {
|
1585
|
+
/** default=1.0 */
|
1586
|
+
radiusTop?: number | undefined;
|
1587
|
+
/** default=1.0 */
|
1588
|
+
radiusBottom?: number | undefined;
|
1589
|
+
}
|
1590
|
+
|
1591
|
+
declare interface PBMeshRenderer_PlaneMesh {
|
1592
|
+
uvs: number[];
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
declare interface PBMeshRenderer_SphereMesh {
|
1596
|
+
}
|
1597
|
+
|
1600
1598
|
declare interface PBNFTShape {
|
1601
1599
|
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1602
1600
|
withCollisions?: boolean | undefined;
|
@@ -1714,6 +1712,11 @@ declare interface PBTextShape {
|
|
1714
1712
|
textColor?: Color3 | undefined;
|
1715
1713
|
}
|
1716
1714
|
|
1715
|
+
declare interface PBUiText {
|
1716
|
+
text: string;
|
1717
|
+
textColor: Color3 | undefined;
|
1718
|
+
}
|
1719
|
+
|
1717
1720
|
/**
|
1718
1721
|
* Represens a plane by the equation ax + by + cz + d = 0
|
1719
1722
|
* @public
|
@@ -1824,10 +1827,35 @@ declare namespace Plane {
|
|
1824
1827
|
}
|
1825
1828
|
|
1826
1829
|
/** @public */
|
1827
|
-
export declare const PlaneShape: ComponentDefinition<ISchema<PBPlaneShape
|
1830
|
+
export declare const PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>, PBPlaneShape>;
|
1828
1831
|
|
1829
1832
|
/** @public */
|
1830
|
-
export declare const PointerLock: ComponentDefinition<ISchema<PBPointerLock
|
1833
|
+
export declare const PointerLock: ComponentDefinition<ISchema<PBPointerLock>, PBPointerLock>;
|
1834
|
+
|
1835
|
+
/**
|
1836
|
+
* @public
|
1837
|
+
*/
|
1838
|
+
export declare type PreEngine = ReturnType<typeof preEngine>;
|
1839
|
+
|
1840
|
+
declare function preEngine(): {
|
1841
|
+
entitiesComponent: Map<number, Set<number>>;
|
1842
|
+
componentsDefinition: Map<number, ComponentDefinition<any, any>>;
|
1843
|
+
addEntity: (dynamic?: boolean) => Entity;
|
1844
|
+
addDynamicEntity: () => Entity;
|
1845
|
+
removeEntity: (entity: Entity) => boolean;
|
1846
|
+
addSystem: (fn: Update, priority?: number, name?: string | undefined) => void;
|
1847
|
+
getSystems: () => {
|
1848
|
+
fn: Update;
|
1849
|
+
priority: number;
|
1850
|
+
name?: string | undefined;
|
1851
|
+
}[];
|
1852
|
+
removeSystem: (selector: string | Update) => boolean;
|
1853
|
+
defineComponent: <T extends Spec, ConstructorType = Partial<Result<T>>>(spec: T, componentId: number, constructorDefault?: ConstructorType | undefined) => ComponentDefinition<ISchema<Result<T>>, ConstructorType>;
|
1854
|
+
defineComponentFromSchema: <T_1 extends ISchema<any>, ConstructorType_1 = EcsResult<T_1>>(spec: T_1, componentId: number, constructorDefault?: ConstructorType_1 | undefined) => ComponentDefinition<T_1, ConstructorType_1>;
|
1855
|
+
getEntitiesWith: <T_2 extends [ComponentDefinition<ISchema<any>, any>, ...ComponentDefinition<ISchema<any>, any>[]]>(...components: T_2) => Iterable<[Entity, ...DeepReadonly<ComponentSchema<T_2>>]>;
|
1856
|
+
getComponent: <T_3 extends ISchema<any>>(componentId: number) => ComponentDefinition<T_3, EcsResult<T_3>>;
|
1857
|
+
removeComponentDefinition: (componentId: number) => void;
|
1858
|
+
};
|
1831
1859
|
|
1832
1860
|
/**
|
1833
1861
|
* @public
|
@@ -2039,7 +2067,7 @@ export declare namespace Schemas {
|
|
2039
2067
|
/**
|
2040
2068
|
* @public
|
2041
2069
|
*/
|
2042
|
-
export declare type SdkComponents = ReturnType<typeof
|
2070
|
+
export declare type SdkComponents = ReturnType<typeof defineSdkComponents>;
|
2043
2071
|
|
2044
2072
|
/**
|
2045
2073
|
* Defines supported spaces
|
@@ -2062,10 +2090,10 @@ export declare interface Spec {
|
|
2062
2090
|
}
|
2063
2091
|
|
2064
2092
|
/** @public */
|
2065
|
-
export declare const SphereShape: ComponentDefinition<ISchema<PBSphereShape
|
2093
|
+
export declare const SphereShape: ComponentDefinition<ISchema<PBSphereShape>, PBSphereShape>;
|
2066
2094
|
|
2067
2095
|
/** @public */
|
2068
|
-
export declare const TextShape: ComponentDefinition<ISchema<PBTextShape
|
2096
|
+
export declare const TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
|
2069
2097
|
|
2070
2098
|
declare const enum TextureWrapMode {
|
2071
2099
|
Repeat = 0,
|
@@ -2090,25 +2118,30 @@ export declare const ToLinearSpace = 2.2;
|
|
2090
2118
|
declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
|
2091
2119
|
|
2092
2120
|
/** @public */
|
2093
|
-
export declare const Transform: ComponentDefinition<ISchema<
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
x: number;
|
2101
|
-
y: number;
|
2102
|
-
z: number;
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2121
|
+
export declare const Transform: ComponentDefinition<ISchema<TransformType>, Partial<TransformType>>;
|
2122
|
+
|
2123
|
+
/**
|
2124
|
+
* @public
|
2125
|
+
*/
|
2126
|
+
declare type TransformType = {
|
2127
|
+
position: {
|
2128
|
+
x: number;
|
2129
|
+
y: number;
|
2130
|
+
z: number;
|
2131
|
+
};
|
2132
|
+
rotation: {
|
2133
|
+
x: number;
|
2134
|
+
y: number;
|
2135
|
+
z: number;
|
2136
|
+
w: number;
|
2137
|
+
};
|
2138
|
+
scale: {
|
2139
|
+
x: number;
|
2140
|
+
y: number;
|
2141
|
+
z: number;
|
2142
|
+
};
|
2143
|
+
parent?: Entity;
|
2109
2144
|
};
|
2110
|
-
parent?: Entity | undefined;
|
2111
|
-
}>>;
|
2112
2145
|
|
2113
2146
|
declare const enum TransparencyMode {
|
2114
2147
|
Opaque = 0,
|
@@ -2130,6 +2163,9 @@ export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
|
|
2130
2163
|
|
2131
2164
|
declare type Uint32 = number;
|
2132
2165
|
|
2166
|
+
/** @public */
|
2167
|
+
export declare const UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
|
2168
|
+
|
2133
2169
|
/**
|
2134
2170
|
* @public
|
2135
2171
|
*/
|