@dcl/playground-assets 7.3.40-7698451743.commit-c9c61fe → 7.3.40-7717066166.commit-ece036d
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 +128 -16
- package/dist/beta.d.ts +128 -16
- package/dist/index.bundled.d.ts +128 -16
- package/dist/index.js +6 -6
- package/dist/index.js.map +4 -4
- package/dist/playground/sdk/apis.d.ts +18 -0
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +128 -16
- package/etc/playground-assets.api.json +1898 -518
- package/etc/playground-assets.api.md +105 -20
- package/package.json +4 -4
package/dist/alpha.d.ts
CHANGED
@@ -110,6 +110,15 @@ export declare const enum AvatarAnchorPointType {
|
|
110
110
|
/** @public */
|
111
111
|
export declare const AvatarAttach: LastWriteWinElementSetComponentDefinition<PBAvatarAttach>;
|
112
112
|
|
113
|
+
/** @public */
|
114
|
+
export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
|
115
|
+
|
116
|
+
/** @public */
|
117
|
+
export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>;
|
118
|
+
|
119
|
+
/** @public */
|
120
|
+
export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
|
121
|
+
|
113
122
|
/** @public */
|
114
123
|
export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
|
115
124
|
|
@@ -217,6 +226,12 @@ export declare interface BaseComponent<T> {
|
|
217
226
|
* @returns
|
218
227
|
*/
|
219
228
|
get(entity: Entity): any;
|
229
|
+
/**
|
230
|
+
* @public
|
231
|
+
* Triggers the callback if the entity has changed on the last tick.
|
232
|
+
* If the value is undefined, the component was deleted.
|
233
|
+
*/
|
234
|
+
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
220
235
|
}
|
221
236
|
|
222
237
|
/** @public */
|
@@ -1166,6 +1181,9 @@ export declare const componentDefinitionByName: {
|
|
1166
1181
|
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
1167
1182
|
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
1168
1183
|
"core::AvatarAttach": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
1184
|
+
"core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
1185
|
+
"core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
|
1186
|
+
"core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
1169
1187
|
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
1170
1188
|
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
1171
1189
|
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
@@ -1178,6 +1196,7 @@ export declare const componentDefinitionByName: {
|
|
1178
1196
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
1179
1197
|
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
1180
1198
|
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
1199
|
+
"core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
|
1181
1200
|
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
1182
1201
|
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
1183
1202
|
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
@@ -1425,6 +1444,13 @@ export declare enum CrdtMessageType {
|
|
1425
1444
|
*/
|
1426
1445
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
1427
1446
|
|
1447
|
+
/**
|
1448
|
+
* @public
|
1449
|
+
*/
|
1450
|
+
export declare function createEntityContainer(opts?: {
|
1451
|
+
reservedStaticEntities: number;
|
1452
|
+
}): IEntityContainer;
|
1453
|
+
|
1428
1454
|
export declare function createEthereumProvider(): {
|
1429
1455
|
send(message: RPCSendableMessage, callback?: ((error: Error | null, result?: any) => void) | undefined): void;
|
1430
1456
|
sendAsync(message: RPCSendableMessage, callback: (error: Error | null, result?: any) => void): void;
|
@@ -1718,20 +1744,6 @@ export declare type EntityComponents = {
|
|
1718
1744
|
onMouseUp: Callback;
|
1719
1745
|
};
|
1720
1746
|
|
1721
|
-
/**
|
1722
|
-
* @intenral
|
1723
|
-
*/
|
1724
|
-
export declare type EntityContainer = {
|
1725
|
-
generateEntity(networked?: boolean): Entity;
|
1726
|
-
removeEntity(entity: Entity): boolean;
|
1727
|
-
getEntityState(entity: Entity): EntityState;
|
1728
|
-
getExistingEntities(): Set<Entity>;
|
1729
|
-
releaseRemovedEntities(): Entity[];
|
1730
|
-
updateRemovedEntity(entity: Entity): boolean;
|
1731
|
-
updateUsedEntity(entity: Entity): boolean;
|
1732
|
-
setNetworkEntitiesRange(reservedLocalEntities: number, range: [number, number]): void;
|
1733
|
-
};
|
1734
|
-
|
1735
1747
|
/** @public */
|
1736
1748
|
export declare enum EntityMappingMode {
|
1737
1749
|
EMM_NONE = 0,
|
@@ -2128,8 +2140,22 @@ export declare interface IEngine {
|
|
2128
2140
|
*/
|
2129
2141
|
export declare interface IEngineOptions {
|
2130
2142
|
onChangeFunction: OnChangeFunction;
|
2143
|
+
entityContainer?: IEntityContainer;
|
2131
2144
|
}
|
2132
2145
|
|
2146
|
+
/**
|
2147
|
+
* @public
|
2148
|
+
*/
|
2149
|
+
export declare type IEntityContainer = {
|
2150
|
+
generateEntity(networked?: boolean): Entity;
|
2151
|
+
removeEntity(entity: Entity): boolean;
|
2152
|
+
getEntityState(entity: Entity): EntityState;
|
2153
|
+
getExistingEntities(): Set<Entity>;
|
2154
|
+
releaseRemovedEntities(): Entity[];
|
2155
|
+
updateRemovedEntity(entity: Entity): boolean;
|
2156
|
+
updateUsedEntity(entity: Entity): boolean;
|
2157
|
+
};
|
2158
|
+
|
2133
2159
|
export declare type IEventNames = keyof IEvents;
|
2134
2160
|
|
2135
2161
|
export declare interface IEvents {
|
@@ -3783,6 +3809,69 @@ export declare namespace PBAvatarAttach {
|
|
3783
3809
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarAttach;
|
3784
3810
|
}
|
3785
3811
|
|
3812
|
+
/** AvatarBase sets all modifiers over the avatar's apparence. */
|
3813
|
+
/**
|
3814
|
+
* @public
|
3815
|
+
*/
|
3816
|
+
export declare interface PBAvatarBase {
|
3817
|
+
skinColor: PBColor3 | undefined;
|
3818
|
+
eyesColor: PBColor3 | undefined;
|
3819
|
+
hairColor: PBColor3 | undefined;
|
3820
|
+
bodyShapeUrn: string;
|
3821
|
+
name: string;
|
3822
|
+
}
|
3823
|
+
|
3824
|
+
/**
|
3825
|
+
* @public
|
3826
|
+
*/
|
3827
|
+
export declare namespace PBAvatarBase {
|
3828
|
+
export function encode(message: PBAvatarBase, writer?: _m0.Writer): _m0.Writer;
|
3829
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarBase;
|
3830
|
+
}
|
3831
|
+
|
3832
|
+
/**
|
3833
|
+
* AvatarEmoteCommand is a grow only value set, used to signal the renderer about
|
3834
|
+
* avatar emotes playback.
|
3835
|
+
*/
|
3836
|
+
/**
|
3837
|
+
* @public
|
3838
|
+
*/
|
3839
|
+
export declare interface PBAvatarEmoteCommand {
|
3840
|
+
emoteUrn: string;
|
3841
|
+
loop: boolean;
|
3842
|
+
/** monotonic counter */
|
3843
|
+
timestamp: number;
|
3844
|
+
}
|
3845
|
+
|
3846
|
+
/**
|
3847
|
+
* @public
|
3848
|
+
*/
|
3849
|
+
export declare namespace PBAvatarEmoteCommand {
|
3850
|
+
export function encode(message: PBAvatarEmoteCommand, writer?: _m0.Writer): _m0.Writer;
|
3851
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEmoteCommand;
|
3852
|
+
}
|
3853
|
+
|
3854
|
+
/**
|
3855
|
+
* AvatarEquipData is used to read the information about the avatar's owneables.
|
3856
|
+
* this component is written by the engine using the communications transports'
|
3857
|
+
* data.
|
3858
|
+
*/
|
3859
|
+
/**
|
3860
|
+
* @public
|
3861
|
+
*/
|
3862
|
+
export declare interface PBAvatarEquippedData {
|
3863
|
+
wearableUrns: string[];
|
3864
|
+
emoteUrns: string[];
|
3865
|
+
}
|
3866
|
+
|
3867
|
+
/**
|
3868
|
+
* @public
|
3869
|
+
*/
|
3870
|
+
export declare namespace PBAvatarEquippedData {
|
3871
|
+
export function encode(message: PBAvatarEquippedData, writer?: _m0.Writer): _m0.Writer;
|
3872
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
|
3873
|
+
}
|
3874
|
+
|
3786
3875
|
/**
|
3787
3876
|
* The AvatarModifierArea component can be attached to an Entity to define a region of space where
|
3788
3877
|
* avatar behavior changes.
|
@@ -4378,6 +4467,28 @@ export declare namespace PBNftShape {
|
|
4378
4467
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBNftShape;
|
4379
4468
|
}
|
4380
4469
|
|
4470
|
+
/**
|
4471
|
+
* PlayerIdentityData is used to read the information about the avatar's
|
4472
|
+
* identity. this component is written by the engine using the communications
|
4473
|
+
* transports' data.
|
4474
|
+
*/
|
4475
|
+
/**
|
4476
|
+
* @public
|
4477
|
+
*/
|
4478
|
+
export declare interface PBPlayerIdentityData {
|
4479
|
+
/** ethereum address of this player */
|
4480
|
+
address: string;
|
4481
|
+
isGuest: boolean;
|
4482
|
+
}
|
4483
|
+
|
4484
|
+
/**
|
4485
|
+
* @public
|
4486
|
+
*/
|
4487
|
+
export declare namespace PBPlayerIdentityData {
|
4488
|
+
export function encode(message: PBPlayerIdentityData, writer?: _m0.Writer): _m0.Writer;
|
4489
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBPlayerIdentityData;
|
4490
|
+
}
|
4491
|
+
|
4381
4492
|
/**
|
4382
4493
|
* PointerEvents adds configurable pointer-based interactions to the attached Entity.
|
4383
4494
|
*
|
@@ -5211,6 +5322,9 @@ export declare namespace Plane {
|
|
5211
5322
|
export function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
5212
5323
|
}
|
5213
5324
|
|
5325
|
+
/** @public */
|
5326
|
+
export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
5327
|
+
|
5214
5328
|
/** @public */
|
5215
5329
|
export declare const PointerEvents: LastWriteWinElementSetComponentDefinition<PBPointerEvents>;
|
5216
5330
|
|
@@ -5992,8 +6106,6 @@ export declare namespace Rect {
|
|
5992
6106
|
*/
|
5993
6107
|
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity' | 'defineComponent'>, entity: Entity): void;
|
5994
6108
|
|
5995
|
-
export declare const RESERVED_LOCAL_ENTITIES = 65535;
|
5996
|
-
|
5997
6109
|
/**
|
5998
6110
|
* This first 512 entities are reserved by the renderer
|
5999
6111
|
*/
|
package/dist/beta.d.ts
CHANGED
@@ -110,6 +110,15 @@ export declare const enum AvatarAnchorPointType {
|
|
110
110
|
/** @public */
|
111
111
|
export declare const AvatarAttach: LastWriteWinElementSetComponentDefinition<PBAvatarAttach>;
|
112
112
|
|
113
|
+
/** @public */
|
114
|
+
export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
|
115
|
+
|
116
|
+
/** @public */
|
117
|
+
export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>;
|
118
|
+
|
119
|
+
/** @public */
|
120
|
+
export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
|
121
|
+
|
113
122
|
/** @public */
|
114
123
|
export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
|
115
124
|
|
@@ -217,6 +226,12 @@ export declare interface BaseComponent<T> {
|
|
217
226
|
* @returns
|
218
227
|
*/
|
219
228
|
get(entity: Entity): any;
|
229
|
+
/**
|
230
|
+
* @public
|
231
|
+
* Triggers the callback if the entity has changed on the last tick.
|
232
|
+
* If the value is undefined, the component was deleted.
|
233
|
+
*/
|
234
|
+
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
220
235
|
}
|
221
236
|
|
222
237
|
/** @public */
|
@@ -1166,6 +1181,9 @@ export declare const componentDefinitionByName: {
|
|
1166
1181
|
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
1167
1182
|
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
1168
1183
|
"core::AvatarAttach": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
1184
|
+
"core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
1185
|
+
"core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
|
1186
|
+
"core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
1169
1187
|
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
1170
1188
|
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
1171
1189
|
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
@@ -1178,6 +1196,7 @@ export declare const componentDefinitionByName: {
|
|
1178
1196
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
1179
1197
|
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
1180
1198
|
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
1199
|
+
"core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
|
1181
1200
|
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
1182
1201
|
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
1183
1202
|
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
@@ -1425,6 +1444,13 @@ export declare enum CrdtMessageType {
|
|
1425
1444
|
*/
|
1426
1445
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
1427
1446
|
|
1447
|
+
/**
|
1448
|
+
* @public
|
1449
|
+
*/
|
1450
|
+
export declare function createEntityContainer(opts?: {
|
1451
|
+
reservedStaticEntities: number;
|
1452
|
+
}): IEntityContainer;
|
1453
|
+
|
1428
1454
|
export declare function createEthereumProvider(): {
|
1429
1455
|
send(message: RPCSendableMessage, callback?: ((error: Error | null, result?: any) => void) | undefined): void;
|
1430
1456
|
sendAsync(message: RPCSendableMessage, callback: (error: Error | null, result?: any) => void): void;
|
@@ -1718,20 +1744,6 @@ export declare type EntityComponents = {
|
|
1718
1744
|
onMouseUp: Callback;
|
1719
1745
|
};
|
1720
1746
|
|
1721
|
-
/**
|
1722
|
-
* @intenral
|
1723
|
-
*/
|
1724
|
-
export declare type EntityContainer = {
|
1725
|
-
generateEntity(networked?: boolean): Entity;
|
1726
|
-
removeEntity(entity: Entity): boolean;
|
1727
|
-
getEntityState(entity: Entity): EntityState;
|
1728
|
-
getExistingEntities(): Set<Entity>;
|
1729
|
-
releaseRemovedEntities(): Entity[];
|
1730
|
-
updateRemovedEntity(entity: Entity): boolean;
|
1731
|
-
updateUsedEntity(entity: Entity): boolean;
|
1732
|
-
setNetworkEntitiesRange(reservedLocalEntities: number, range: [number, number]): void;
|
1733
|
-
};
|
1734
|
-
|
1735
1747
|
/** @public */
|
1736
1748
|
export declare enum EntityMappingMode {
|
1737
1749
|
EMM_NONE = 0,
|
@@ -2119,8 +2131,22 @@ export declare interface IEngine {
|
|
2119
2131
|
*/
|
2120
2132
|
export declare interface IEngineOptions {
|
2121
2133
|
onChangeFunction: OnChangeFunction;
|
2134
|
+
entityContainer?: IEntityContainer;
|
2122
2135
|
}
|
2123
2136
|
|
2137
|
+
/**
|
2138
|
+
* @public
|
2139
|
+
*/
|
2140
|
+
export declare type IEntityContainer = {
|
2141
|
+
generateEntity(networked?: boolean): Entity;
|
2142
|
+
removeEntity(entity: Entity): boolean;
|
2143
|
+
getEntityState(entity: Entity): EntityState;
|
2144
|
+
getExistingEntities(): Set<Entity>;
|
2145
|
+
releaseRemovedEntities(): Entity[];
|
2146
|
+
updateRemovedEntity(entity: Entity): boolean;
|
2147
|
+
updateUsedEntity(entity: Entity): boolean;
|
2148
|
+
};
|
2149
|
+
|
2124
2150
|
export declare type IEventNames = keyof IEvents;
|
2125
2151
|
|
2126
2152
|
export declare interface IEvents {
|
@@ -3766,6 +3792,69 @@ export declare namespace PBAvatarAttach {
|
|
3766
3792
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarAttach;
|
3767
3793
|
}
|
3768
3794
|
|
3795
|
+
/** AvatarBase sets all modifiers over the avatar's apparence. */
|
3796
|
+
/**
|
3797
|
+
* @public
|
3798
|
+
*/
|
3799
|
+
export declare interface PBAvatarBase {
|
3800
|
+
skinColor: PBColor3 | undefined;
|
3801
|
+
eyesColor: PBColor3 | undefined;
|
3802
|
+
hairColor: PBColor3 | undefined;
|
3803
|
+
bodyShapeUrn: string;
|
3804
|
+
name: string;
|
3805
|
+
}
|
3806
|
+
|
3807
|
+
/**
|
3808
|
+
* @public
|
3809
|
+
*/
|
3810
|
+
export declare namespace PBAvatarBase {
|
3811
|
+
export function encode(message: PBAvatarBase, writer?: _m0.Writer): _m0.Writer;
|
3812
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarBase;
|
3813
|
+
}
|
3814
|
+
|
3815
|
+
/**
|
3816
|
+
* AvatarEmoteCommand is a grow only value set, used to signal the renderer about
|
3817
|
+
* avatar emotes playback.
|
3818
|
+
*/
|
3819
|
+
/**
|
3820
|
+
* @public
|
3821
|
+
*/
|
3822
|
+
export declare interface PBAvatarEmoteCommand {
|
3823
|
+
emoteUrn: string;
|
3824
|
+
loop: boolean;
|
3825
|
+
/** monotonic counter */
|
3826
|
+
timestamp: number;
|
3827
|
+
}
|
3828
|
+
|
3829
|
+
/**
|
3830
|
+
* @public
|
3831
|
+
*/
|
3832
|
+
export declare namespace PBAvatarEmoteCommand {
|
3833
|
+
export function encode(message: PBAvatarEmoteCommand, writer?: _m0.Writer): _m0.Writer;
|
3834
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEmoteCommand;
|
3835
|
+
}
|
3836
|
+
|
3837
|
+
/**
|
3838
|
+
* AvatarEquipData is used to read the information about the avatar's owneables.
|
3839
|
+
* this component is written by the engine using the communications transports'
|
3840
|
+
* data.
|
3841
|
+
*/
|
3842
|
+
/**
|
3843
|
+
* @public
|
3844
|
+
*/
|
3845
|
+
export declare interface PBAvatarEquippedData {
|
3846
|
+
wearableUrns: string[];
|
3847
|
+
emoteUrns: string[];
|
3848
|
+
}
|
3849
|
+
|
3850
|
+
/**
|
3851
|
+
* @public
|
3852
|
+
*/
|
3853
|
+
export declare namespace PBAvatarEquippedData {
|
3854
|
+
export function encode(message: PBAvatarEquippedData, writer?: _m0.Writer): _m0.Writer;
|
3855
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
|
3856
|
+
}
|
3857
|
+
|
3769
3858
|
/**
|
3770
3859
|
* The AvatarModifierArea component can be attached to an Entity to define a region of space where
|
3771
3860
|
* avatar behavior changes.
|
@@ -4361,6 +4450,28 @@ export declare namespace PBNftShape {
|
|
4361
4450
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBNftShape;
|
4362
4451
|
}
|
4363
4452
|
|
4453
|
+
/**
|
4454
|
+
* PlayerIdentityData is used to read the information about the avatar's
|
4455
|
+
* identity. this component is written by the engine using the communications
|
4456
|
+
* transports' data.
|
4457
|
+
*/
|
4458
|
+
/**
|
4459
|
+
* @public
|
4460
|
+
*/
|
4461
|
+
export declare interface PBPlayerIdentityData {
|
4462
|
+
/** ethereum address of this player */
|
4463
|
+
address: string;
|
4464
|
+
isGuest: boolean;
|
4465
|
+
}
|
4466
|
+
|
4467
|
+
/**
|
4468
|
+
* @public
|
4469
|
+
*/
|
4470
|
+
export declare namespace PBPlayerIdentityData {
|
4471
|
+
export function encode(message: PBPlayerIdentityData, writer?: _m0.Writer): _m0.Writer;
|
4472
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBPlayerIdentityData;
|
4473
|
+
}
|
4474
|
+
|
4364
4475
|
/**
|
4365
4476
|
* PointerEvents adds configurable pointer-based interactions to the attached Entity.
|
4366
4477
|
*
|
@@ -5194,6 +5305,9 @@ export declare namespace Plane {
|
|
5194
5305
|
export function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
5195
5306
|
}
|
5196
5307
|
|
5308
|
+
/** @public */
|
5309
|
+
export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
5310
|
+
|
5197
5311
|
/** @public */
|
5198
5312
|
export declare const PointerEvents: LastWriteWinElementSetComponentDefinition<PBPointerEvents>;
|
5199
5313
|
|
@@ -5975,8 +6089,6 @@ export declare namespace Rect {
|
|
5975
6089
|
*/
|
5976
6090
|
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity' | 'defineComponent'>, entity: Entity): void;
|
5977
6091
|
|
5978
|
-
export declare const RESERVED_LOCAL_ENTITIES = 65535;
|
5979
|
-
|
5980
6092
|
/**
|
5981
6093
|
* This first 512 entities are reserved by the renderer
|
5982
6094
|
*/
|
package/dist/index.bundled.d.ts
CHANGED
@@ -110,6 +110,15 @@ export declare const enum AvatarAnchorPointType {
|
|
110
110
|
/** @public */
|
111
111
|
export declare const AvatarAttach: LastWriteWinElementSetComponentDefinition<PBAvatarAttach>;
|
112
112
|
|
113
|
+
/** @public */
|
114
|
+
export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
|
115
|
+
|
116
|
+
/** @public */
|
117
|
+
export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>;
|
118
|
+
|
119
|
+
/** @public */
|
120
|
+
export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
|
121
|
+
|
113
122
|
/** @public */
|
114
123
|
export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
|
115
124
|
|
@@ -217,6 +226,12 @@ export declare interface BaseComponent<T> {
|
|
217
226
|
* @returns
|
218
227
|
*/
|
219
228
|
get(entity: Entity): any;
|
229
|
+
/**
|
230
|
+
* @public
|
231
|
+
* Triggers the callback if the entity has changed on the last tick.
|
232
|
+
* If the value is undefined, the component was deleted.
|
233
|
+
*/
|
234
|
+
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
220
235
|
}
|
221
236
|
|
222
237
|
/** @public */
|
@@ -1166,6 +1181,9 @@ export declare const componentDefinitionByName: {
|
|
1166
1181
|
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
1167
1182
|
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
1168
1183
|
"core::AvatarAttach": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
1184
|
+
"core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
1185
|
+
"core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
|
1186
|
+
"core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
1169
1187
|
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
1170
1188
|
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
1171
1189
|
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
@@ -1178,6 +1196,7 @@ export declare const componentDefinitionByName: {
|
|
1178
1196
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
1179
1197
|
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
1180
1198
|
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
1199
|
+
"core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
|
1181
1200
|
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
1182
1201
|
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
1183
1202
|
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
@@ -1425,6 +1444,13 @@ export declare enum CrdtMessageType {
|
|
1425
1444
|
*/
|
1426
1445
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
1427
1446
|
|
1447
|
+
/**
|
1448
|
+
* @public
|
1449
|
+
*/
|
1450
|
+
export declare function createEntityContainer(opts?: {
|
1451
|
+
reservedStaticEntities: number;
|
1452
|
+
}): IEntityContainer;
|
1453
|
+
|
1428
1454
|
export declare function createEthereumProvider(): {
|
1429
1455
|
send(message: RPCSendableMessage, callback?: ((error: Error | null, result?: any) => void) | undefined): void;
|
1430
1456
|
sendAsync(message: RPCSendableMessage, callback: (error: Error | null, result?: any) => void): void;
|
@@ -1718,20 +1744,6 @@ export declare type EntityComponents = {
|
|
1718
1744
|
onMouseUp: Callback;
|
1719
1745
|
};
|
1720
1746
|
|
1721
|
-
/**
|
1722
|
-
* @intenral
|
1723
|
-
*/
|
1724
|
-
export declare type EntityContainer = {
|
1725
|
-
generateEntity(networked?: boolean): Entity;
|
1726
|
-
removeEntity(entity: Entity): boolean;
|
1727
|
-
getEntityState(entity: Entity): EntityState;
|
1728
|
-
getExistingEntities(): Set<Entity>;
|
1729
|
-
releaseRemovedEntities(): Entity[];
|
1730
|
-
updateRemovedEntity(entity: Entity): boolean;
|
1731
|
-
updateUsedEntity(entity: Entity): boolean;
|
1732
|
-
setNetworkEntitiesRange(reservedLocalEntities: number, range: [number, number]): void;
|
1733
|
-
};
|
1734
|
-
|
1735
1747
|
/** @public */
|
1736
1748
|
export declare enum EntityMappingMode {
|
1737
1749
|
EMM_NONE = 0,
|
@@ -2119,8 +2131,22 @@ export declare interface IEngine {
|
|
2119
2131
|
*/
|
2120
2132
|
export declare interface IEngineOptions {
|
2121
2133
|
onChangeFunction: OnChangeFunction;
|
2134
|
+
entityContainer?: IEntityContainer;
|
2122
2135
|
}
|
2123
2136
|
|
2137
|
+
/**
|
2138
|
+
* @public
|
2139
|
+
*/
|
2140
|
+
export declare type IEntityContainer = {
|
2141
|
+
generateEntity(networked?: boolean): Entity;
|
2142
|
+
removeEntity(entity: Entity): boolean;
|
2143
|
+
getEntityState(entity: Entity): EntityState;
|
2144
|
+
getExistingEntities(): Set<Entity>;
|
2145
|
+
releaseRemovedEntities(): Entity[];
|
2146
|
+
updateRemovedEntity(entity: Entity): boolean;
|
2147
|
+
updateUsedEntity(entity: Entity): boolean;
|
2148
|
+
};
|
2149
|
+
|
2124
2150
|
export declare type IEventNames = keyof IEvents;
|
2125
2151
|
|
2126
2152
|
export declare interface IEvents {
|
@@ -3766,6 +3792,69 @@ export declare namespace PBAvatarAttach {
|
|
3766
3792
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarAttach;
|
3767
3793
|
}
|
3768
3794
|
|
3795
|
+
/** AvatarBase sets all modifiers over the avatar's apparence. */
|
3796
|
+
/**
|
3797
|
+
* @public
|
3798
|
+
*/
|
3799
|
+
export declare interface PBAvatarBase {
|
3800
|
+
skinColor: PBColor3 | undefined;
|
3801
|
+
eyesColor: PBColor3 | undefined;
|
3802
|
+
hairColor: PBColor3 | undefined;
|
3803
|
+
bodyShapeUrn: string;
|
3804
|
+
name: string;
|
3805
|
+
}
|
3806
|
+
|
3807
|
+
/**
|
3808
|
+
* @public
|
3809
|
+
*/
|
3810
|
+
export declare namespace PBAvatarBase {
|
3811
|
+
export function encode(message: PBAvatarBase, writer?: _m0.Writer): _m0.Writer;
|
3812
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarBase;
|
3813
|
+
}
|
3814
|
+
|
3815
|
+
/**
|
3816
|
+
* AvatarEmoteCommand is a grow only value set, used to signal the renderer about
|
3817
|
+
* avatar emotes playback.
|
3818
|
+
*/
|
3819
|
+
/**
|
3820
|
+
* @public
|
3821
|
+
*/
|
3822
|
+
export declare interface PBAvatarEmoteCommand {
|
3823
|
+
emoteUrn: string;
|
3824
|
+
loop: boolean;
|
3825
|
+
/** monotonic counter */
|
3826
|
+
timestamp: number;
|
3827
|
+
}
|
3828
|
+
|
3829
|
+
/**
|
3830
|
+
* @public
|
3831
|
+
*/
|
3832
|
+
export declare namespace PBAvatarEmoteCommand {
|
3833
|
+
export function encode(message: PBAvatarEmoteCommand, writer?: _m0.Writer): _m0.Writer;
|
3834
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEmoteCommand;
|
3835
|
+
}
|
3836
|
+
|
3837
|
+
/**
|
3838
|
+
* AvatarEquipData is used to read the information about the avatar's owneables.
|
3839
|
+
* this component is written by the engine using the communications transports'
|
3840
|
+
* data.
|
3841
|
+
*/
|
3842
|
+
/**
|
3843
|
+
* @public
|
3844
|
+
*/
|
3845
|
+
export declare interface PBAvatarEquippedData {
|
3846
|
+
wearableUrns: string[];
|
3847
|
+
emoteUrns: string[];
|
3848
|
+
}
|
3849
|
+
|
3850
|
+
/**
|
3851
|
+
* @public
|
3852
|
+
*/
|
3853
|
+
export declare namespace PBAvatarEquippedData {
|
3854
|
+
export function encode(message: PBAvatarEquippedData, writer?: _m0.Writer): _m0.Writer;
|
3855
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
|
3856
|
+
}
|
3857
|
+
|
3769
3858
|
/**
|
3770
3859
|
* The AvatarModifierArea component can be attached to an Entity to define a region of space where
|
3771
3860
|
* avatar behavior changes.
|
@@ -4361,6 +4450,28 @@ export declare namespace PBNftShape {
|
|
4361
4450
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBNftShape;
|
4362
4451
|
}
|
4363
4452
|
|
4453
|
+
/**
|
4454
|
+
* PlayerIdentityData is used to read the information about the avatar's
|
4455
|
+
* identity. this component is written by the engine using the communications
|
4456
|
+
* transports' data.
|
4457
|
+
*/
|
4458
|
+
/**
|
4459
|
+
* @public
|
4460
|
+
*/
|
4461
|
+
export declare interface PBPlayerIdentityData {
|
4462
|
+
/** ethereum address of this player */
|
4463
|
+
address: string;
|
4464
|
+
isGuest: boolean;
|
4465
|
+
}
|
4466
|
+
|
4467
|
+
/**
|
4468
|
+
* @public
|
4469
|
+
*/
|
4470
|
+
export declare namespace PBPlayerIdentityData {
|
4471
|
+
export function encode(message: PBPlayerIdentityData, writer?: _m0.Writer): _m0.Writer;
|
4472
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBPlayerIdentityData;
|
4473
|
+
}
|
4474
|
+
|
4364
4475
|
/**
|
4365
4476
|
* PointerEvents adds configurable pointer-based interactions to the attached Entity.
|
4366
4477
|
*
|
@@ -5194,6 +5305,9 @@ export declare namespace Plane {
|
|
5194
5305
|
export function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
5195
5306
|
}
|
5196
5307
|
|
5308
|
+
/** @public */
|
5309
|
+
export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
5310
|
+
|
5197
5311
|
/** @public */
|
5198
5312
|
export declare const PointerEvents: LastWriteWinElementSetComponentDefinition<PBPointerEvents>;
|
5199
5313
|
|
@@ -5975,8 +6089,6 @@ export declare namespace Rect {
|
|
5975
6089
|
*/
|
5976
6090
|
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity' | 'defineComponent'>, entity: Entity): void;
|
5977
6091
|
|
5978
|
-
export declare const RESERVED_LOCAL_ENTITIES = 65535;
|
5979
|
-
|
5980
6092
|
/**
|
5981
6093
|
* This first 512 entities are reserved by the renderer
|
5982
6094
|
*/
|