@dcl/playground-assets 7.1.2-4415683908.commit-0a210fd → 7.1.2-4426178080.commit-9504360
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 +80 -2
- package/dist/beta.d.ts +80 -2
- package/dist/index.bundled.d.ts +80 -2
- package/dist/index.js +272 -4
- 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 +80 -2
- package/etc/playground-assets.api.json +1126 -2
- package/etc/playground-assets.api.md +64 -2
- package/package.json +3 -3
package/dist/alpha.d.ts
CHANGED
|
@@ -1085,6 +1085,39 @@ export declare type Color4Type = {
|
|
|
1085
1085
|
*/
|
|
1086
1086
|
export declare type ComponentDefinition<T> = LastWriteWinElementSetComponentDefinition<T> | GrowOnlyValueSetComponentDefinition<T>;
|
|
1087
1087
|
|
|
1088
|
+
/** public */
|
|
1089
|
+
export declare const componentDefinitionByName: {
|
|
1090
|
+
"core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
|
|
1091
|
+
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
1092
|
+
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
1093
|
+
"core::AvatarAttach": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
|
1094
|
+
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
1095
|
+
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
1096
|
+
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
1097
|
+
"core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
|
|
1098
|
+
"core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
|
|
1099
|
+
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
1100
|
+
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
1101
|
+
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
1102
|
+
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
1103
|
+
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
|
1104
|
+
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
|
1105
|
+
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
|
1106
|
+
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
|
1107
|
+
"core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
|
|
1108
|
+
"core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
|
|
1109
|
+
"core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
|
|
1110
|
+
"core::UiBackground": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiBackground>>;
|
|
1111
|
+
"core::UiDropdown": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
|
|
1112
|
+
"core::UiDropdownResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
|
|
1113
|
+
"core::UiInput": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
|
|
1114
|
+
"core::UiInputResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputResult>>;
|
|
1115
|
+
"core::UiText": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiText>>;
|
|
1116
|
+
"core::UiTransform": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiTransform>>;
|
|
1117
|
+
"core::VideoPlayer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBVideoPlayer>>;
|
|
1118
|
+
"core::VisibilityComponent": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBVisibilityComponent>>;
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1088
1121
|
/**
|
|
1089
1122
|
* Component types are used to pick the wire protocol and the conflict resolution algorithm
|
|
1090
1123
|
* @public
|
|
@@ -1094,6 +1127,33 @@ export declare const enum ComponentType {
|
|
|
1094
1127
|
GrowOnlyValueSet = 1
|
|
1095
1128
|
}
|
|
1096
1129
|
|
|
1130
|
+
/**
|
|
1131
|
+
* @public
|
|
1132
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
1133
|
+
*/
|
|
1134
|
+
export declare type Composite = {
|
|
1135
|
+
id: string;
|
|
1136
|
+
components: {
|
|
1137
|
+
name: string;
|
|
1138
|
+
schema?: JsonSchemaExtended;
|
|
1139
|
+
data: Map<Entity, unknown>;
|
|
1140
|
+
}[];
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* @public
|
|
1145
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
1146
|
+
*/
|
|
1147
|
+
export declare function compositeFromJson(jsonComposite: any): Composite;
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* @public
|
|
1151
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
1152
|
+
*/
|
|
1153
|
+
export declare type CompositeProvider = {
|
|
1154
|
+
getCompositeOrNull: (id: string) => Composite | null;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1097
1157
|
/**
|
|
1098
1158
|
* A conflict resolution message is the response to an outdated or invalid state
|
|
1099
1159
|
* in the CRDT.
|
|
@@ -1628,7 +1688,7 @@ export declare interface IEngine {
|
|
|
1628
1688
|
* const StateComponent = engine.getComponent(StateComponentId)
|
|
1629
1689
|
* ```
|
|
1630
1690
|
*/
|
|
1631
|
-
getComponent<T>(componentId: number): ComponentDefinition<T>;
|
|
1691
|
+
getComponent<T>(componentId: number | string): ComponentDefinition<T>;
|
|
1632
1692
|
/**
|
|
1633
1693
|
* Get the component definition from the component id.
|
|
1634
1694
|
* @param componentId - component number or name used to identify the component descriptor
|
|
@@ -1638,7 +1698,7 @@ export declare interface IEngine {
|
|
|
1638
1698
|
* const StateComponent = engine.getComponent(StateComponentId)
|
|
1639
1699
|
* ```
|
|
1640
1700
|
*/
|
|
1641
|
-
getComponentOrNull<T>(componentId: number): ComponentDefinition<T> | null;
|
|
1701
|
+
getComponentOrNull<T>(componentId: number | string): ComponentDefinition<T> | null;
|
|
1642
1702
|
/**
|
|
1643
1703
|
* @public
|
|
1644
1704
|
* Get a iterator of entities that has all the component requested.
|
|
@@ -1935,6 +1995,18 @@ export declare type InputEventResult = {
|
|
|
1935
1995
|
*/
|
|
1936
1996
|
export declare const inputSystem: IInputSystem;
|
|
1937
1997
|
|
|
1998
|
+
/**
|
|
1999
|
+
* Instance a composite and returns its root entity
|
|
2000
|
+
* @param compositeData state serialized by the CRDT protocol
|
|
2001
|
+
* @param getNextAvailableEntity function that gives unused entities
|
|
2002
|
+
* @param rootEntity (optional) suggested mapped rootEntity for the composite
|
|
2003
|
+
*
|
|
2004
|
+
* @public
|
|
2005
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
2006
|
+
*
|
|
2007
|
+
*/
|
|
2008
|
+
export declare function instanceComposite(engine: IEngine, compositeData: Composite, getNextAvailableEntity: () => Entity | null, compositeProvider: CompositeProvider, rootEntity?: Entity, alreadyRequestedId?: Set<string>): Entity;
|
|
2009
|
+
|
|
1938
2010
|
/**
|
|
1939
2011
|
* @public
|
|
1940
2012
|
*/
|
|
@@ -4658,6 +4730,12 @@ export declare namespace Schemas {
|
|
|
4658
4730
|
const Map: <T extends Spec>(spec: T, defaultValue?: Partial<MapResult<T>> | undefined) => ISchema<MapResult<T>>;
|
|
4659
4731
|
/** @public */
|
|
4660
4732
|
const Optional: <T>(spec: ISchema<T>) => ISchema<T | undefined>;
|
|
4733
|
+
/**
|
|
4734
|
+
* @public Create an ISchema object from the json-schema
|
|
4735
|
+
* @param jsonSchema
|
|
4736
|
+
* @returns a ISchema or fail for unsupported json-schema
|
|
4737
|
+
*/
|
|
4738
|
+
const fromJson: (json: JsonSchemaExtended) => ISchema<unknown>;
|
|
4661
4739
|
}
|
|
4662
4740
|
|
|
4663
4741
|
/**
|
package/dist/beta.d.ts
CHANGED
|
@@ -1085,6 +1085,39 @@ export declare type Color4Type = {
|
|
|
1085
1085
|
*/
|
|
1086
1086
|
export declare type ComponentDefinition<T> = LastWriteWinElementSetComponentDefinition<T> | GrowOnlyValueSetComponentDefinition<T>;
|
|
1087
1087
|
|
|
1088
|
+
/** public */
|
|
1089
|
+
export declare const componentDefinitionByName: {
|
|
1090
|
+
"core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
|
|
1091
|
+
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
1092
|
+
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
1093
|
+
"core::AvatarAttach": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
|
1094
|
+
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
1095
|
+
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
1096
|
+
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
1097
|
+
"core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
|
|
1098
|
+
"core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
|
|
1099
|
+
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
1100
|
+
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
1101
|
+
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
1102
|
+
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
1103
|
+
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
|
1104
|
+
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
|
1105
|
+
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
|
1106
|
+
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
|
1107
|
+
"core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
|
|
1108
|
+
"core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
|
|
1109
|
+
"core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
|
|
1110
|
+
"core::UiBackground": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiBackground>>;
|
|
1111
|
+
"core::UiDropdown": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
|
|
1112
|
+
"core::UiDropdownResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
|
|
1113
|
+
"core::UiInput": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
|
|
1114
|
+
"core::UiInputResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputResult>>;
|
|
1115
|
+
"core::UiText": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiText>>;
|
|
1116
|
+
"core::UiTransform": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiTransform>>;
|
|
1117
|
+
"core::VideoPlayer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBVideoPlayer>>;
|
|
1118
|
+
"core::VisibilityComponent": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBVisibilityComponent>>;
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1088
1121
|
/**
|
|
1089
1122
|
* Component types are used to pick the wire protocol and the conflict resolution algorithm
|
|
1090
1123
|
* @public
|
|
@@ -1094,6 +1127,33 @@ export declare const enum ComponentType {
|
|
|
1094
1127
|
GrowOnlyValueSet = 1
|
|
1095
1128
|
}
|
|
1096
1129
|
|
|
1130
|
+
/**
|
|
1131
|
+
* @public
|
|
1132
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
1133
|
+
*/
|
|
1134
|
+
export declare type Composite = {
|
|
1135
|
+
id: string;
|
|
1136
|
+
components: {
|
|
1137
|
+
name: string;
|
|
1138
|
+
schema?: JsonSchemaExtended;
|
|
1139
|
+
data: Map<Entity, unknown>;
|
|
1140
|
+
}[];
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* @public
|
|
1145
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
1146
|
+
*/
|
|
1147
|
+
export declare function compositeFromJson(jsonComposite: any): Composite;
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* @public
|
|
1151
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
1152
|
+
*/
|
|
1153
|
+
export declare type CompositeProvider = {
|
|
1154
|
+
getCompositeOrNull: (id: string) => Composite | null;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1097
1157
|
/**
|
|
1098
1158
|
* A conflict resolution message is the response to an outdated or invalid state
|
|
1099
1159
|
* in the CRDT.
|
|
@@ -1628,7 +1688,7 @@ export declare interface IEngine {
|
|
|
1628
1688
|
* const StateComponent = engine.getComponent(StateComponentId)
|
|
1629
1689
|
* ```
|
|
1630
1690
|
*/
|
|
1631
|
-
getComponent<T>(componentId: number): ComponentDefinition<T>;
|
|
1691
|
+
getComponent<T>(componentId: number | string): ComponentDefinition<T>;
|
|
1632
1692
|
/**
|
|
1633
1693
|
* Get the component definition from the component id.
|
|
1634
1694
|
* @param componentId - component number or name used to identify the component descriptor
|
|
@@ -1638,7 +1698,7 @@ export declare interface IEngine {
|
|
|
1638
1698
|
* const StateComponent = engine.getComponent(StateComponentId)
|
|
1639
1699
|
* ```
|
|
1640
1700
|
*/
|
|
1641
|
-
getComponentOrNull<T>(componentId: number): ComponentDefinition<T> | null;
|
|
1701
|
+
getComponentOrNull<T>(componentId: number | string): ComponentDefinition<T> | null;
|
|
1642
1702
|
/**
|
|
1643
1703
|
* @public
|
|
1644
1704
|
* Get a iterator of entities that has all the component requested.
|
|
@@ -1931,6 +1991,18 @@ export declare type InputEventResult = {
|
|
|
1931
1991
|
*/
|
|
1932
1992
|
export declare const inputSystem: IInputSystem;
|
|
1933
1993
|
|
|
1994
|
+
/**
|
|
1995
|
+
* Instance a composite and returns its root entity
|
|
1996
|
+
* @param compositeData state serialized by the CRDT protocol
|
|
1997
|
+
* @param getNextAvailableEntity function that gives unused entities
|
|
1998
|
+
* @param rootEntity (optional) suggested mapped rootEntity for the composite
|
|
1999
|
+
*
|
|
2000
|
+
* @public
|
|
2001
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
2002
|
+
*
|
|
2003
|
+
*/
|
|
2004
|
+
export declare function instanceComposite(engine: IEngine, compositeData: Composite, getNextAvailableEntity: () => Entity | null, compositeProvider: CompositeProvider, rootEntity?: Entity, alreadyRequestedId?: Set<string>): Entity;
|
|
2005
|
+
|
|
1934
2006
|
/**
|
|
1935
2007
|
* @public
|
|
1936
2008
|
*/
|
|
@@ -4654,6 +4726,12 @@ export declare namespace Schemas {
|
|
|
4654
4726
|
const Map: <T extends Spec>(spec: T, defaultValue?: Partial<MapResult<T>> | undefined) => ISchema<MapResult<T>>;
|
|
4655
4727
|
/** @public */
|
|
4656
4728
|
const Optional: <T>(spec: ISchema<T>) => ISchema<T | undefined>;
|
|
4729
|
+
/**
|
|
4730
|
+
* @public Create an ISchema object from the json-schema
|
|
4731
|
+
* @param jsonSchema
|
|
4732
|
+
* @returns a ISchema or fail for unsupported json-schema
|
|
4733
|
+
*/
|
|
4734
|
+
const fromJson: (json: JsonSchemaExtended) => ISchema<unknown>;
|
|
4657
4735
|
}
|
|
4658
4736
|
|
|
4659
4737
|
/**
|
package/dist/index.bundled.d.ts
CHANGED
|
@@ -1085,6 +1085,39 @@ export declare type Color4Type = {
|
|
|
1085
1085
|
*/
|
|
1086
1086
|
export declare type ComponentDefinition<T> = LastWriteWinElementSetComponentDefinition<T> | GrowOnlyValueSetComponentDefinition<T>;
|
|
1087
1087
|
|
|
1088
|
+
/** public */
|
|
1089
|
+
export declare const componentDefinitionByName: {
|
|
1090
|
+
"core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
|
|
1091
|
+
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
1092
|
+
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
1093
|
+
"core::AvatarAttach": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
|
1094
|
+
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
1095
|
+
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
1096
|
+
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
1097
|
+
"core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
|
|
1098
|
+
"core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
|
|
1099
|
+
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
1100
|
+
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
1101
|
+
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
1102
|
+
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
1103
|
+
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
|
1104
|
+
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
|
1105
|
+
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
|
1106
|
+
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
|
1107
|
+
"core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
|
|
1108
|
+
"core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
|
|
1109
|
+
"core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
|
|
1110
|
+
"core::UiBackground": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiBackground>>;
|
|
1111
|
+
"core::UiDropdown": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
|
|
1112
|
+
"core::UiDropdownResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
|
|
1113
|
+
"core::UiInput": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
|
|
1114
|
+
"core::UiInputResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputResult>>;
|
|
1115
|
+
"core::UiText": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiText>>;
|
|
1116
|
+
"core::UiTransform": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiTransform>>;
|
|
1117
|
+
"core::VideoPlayer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBVideoPlayer>>;
|
|
1118
|
+
"core::VisibilityComponent": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBVisibilityComponent>>;
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1088
1121
|
/**
|
|
1089
1122
|
* Component types are used to pick the wire protocol and the conflict resolution algorithm
|
|
1090
1123
|
* @public
|
|
@@ -1094,6 +1127,33 @@ export declare const enum ComponentType {
|
|
|
1094
1127
|
GrowOnlyValueSet = 1
|
|
1095
1128
|
}
|
|
1096
1129
|
|
|
1130
|
+
/**
|
|
1131
|
+
* @public
|
|
1132
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
1133
|
+
*/
|
|
1134
|
+
export declare type Composite = {
|
|
1135
|
+
id: string;
|
|
1136
|
+
components: {
|
|
1137
|
+
name: string;
|
|
1138
|
+
schema?: JsonSchemaExtended;
|
|
1139
|
+
data: Map<Entity, unknown>;
|
|
1140
|
+
}[];
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* @public
|
|
1145
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
1146
|
+
*/
|
|
1147
|
+
export declare function compositeFromJson(jsonComposite: any): Composite;
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* @public
|
|
1151
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
1152
|
+
*/
|
|
1153
|
+
export declare type CompositeProvider = {
|
|
1154
|
+
getCompositeOrNull: (id: string) => Composite | null;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1097
1157
|
/**
|
|
1098
1158
|
* A conflict resolution message is the response to an outdated or invalid state
|
|
1099
1159
|
* in the CRDT.
|
|
@@ -1628,7 +1688,7 @@ export declare interface IEngine {
|
|
|
1628
1688
|
* const StateComponent = engine.getComponent(StateComponentId)
|
|
1629
1689
|
* ```
|
|
1630
1690
|
*/
|
|
1631
|
-
getComponent<T>(componentId: number): ComponentDefinition<T>;
|
|
1691
|
+
getComponent<T>(componentId: number | string): ComponentDefinition<T>;
|
|
1632
1692
|
/**
|
|
1633
1693
|
* Get the component definition from the component id.
|
|
1634
1694
|
* @param componentId - component number or name used to identify the component descriptor
|
|
@@ -1638,7 +1698,7 @@ export declare interface IEngine {
|
|
|
1638
1698
|
* const StateComponent = engine.getComponent(StateComponentId)
|
|
1639
1699
|
* ```
|
|
1640
1700
|
*/
|
|
1641
|
-
getComponentOrNull<T>(componentId: number): ComponentDefinition<T> | null;
|
|
1701
|
+
getComponentOrNull<T>(componentId: number | string): ComponentDefinition<T> | null;
|
|
1642
1702
|
/**
|
|
1643
1703
|
* @public
|
|
1644
1704
|
* Get a iterator of entities that has all the component requested.
|
|
@@ -1931,6 +1991,18 @@ export declare type InputEventResult = {
|
|
|
1931
1991
|
*/
|
|
1932
1992
|
export declare const inputSystem: IInputSystem;
|
|
1933
1993
|
|
|
1994
|
+
/**
|
|
1995
|
+
* Instance a composite and returns its root entity
|
|
1996
|
+
* @param compositeData state serialized by the CRDT protocol
|
|
1997
|
+
* @param getNextAvailableEntity function that gives unused entities
|
|
1998
|
+
* @param rootEntity (optional) suggested mapped rootEntity for the composite
|
|
1999
|
+
*
|
|
2000
|
+
* @public
|
|
2001
|
+
* @deprecated composite is not being supported so far, please do not use this feature
|
|
2002
|
+
*
|
|
2003
|
+
*/
|
|
2004
|
+
export declare function instanceComposite(engine: IEngine, compositeData: Composite, getNextAvailableEntity: () => Entity | null, compositeProvider: CompositeProvider, rootEntity?: Entity, alreadyRequestedId?: Set<string>): Entity;
|
|
2005
|
+
|
|
1934
2006
|
/**
|
|
1935
2007
|
* @public
|
|
1936
2008
|
*/
|
|
@@ -4654,6 +4726,12 @@ export declare namespace Schemas {
|
|
|
4654
4726
|
const Map: <T extends Spec>(spec: T, defaultValue?: Partial<MapResult<T>> | undefined) => ISchema<MapResult<T>>;
|
|
4655
4727
|
/** @public */
|
|
4656
4728
|
const Optional: <T>(spec: ISchema<T>) => ISchema<T | undefined>;
|
|
4729
|
+
/**
|
|
4730
|
+
* @public Create an ISchema object from the json-schema
|
|
4731
|
+
* @param jsonSchema
|
|
4732
|
+
* @returns a ISchema or fail for unsupported json-schema
|
|
4733
|
+
*/
|
|
4734
|
+
const fromJson: (json: JsonSchemaExtended) => ISchema<unknown>;
|
|
4657
4735
|
}
|
|
4658
4736
|
|
|
4659
4737
|
/**
|