@dcl/playground-assets 7.25.1-30310486734.commit-5ffe873 → 7.25.1-30391610123.commit-26cb925
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 +117 -103
- package/dist/beta.d.ts +117 -103
- package/dist/index.bundled.d.ts +117 -103
- package/dist/index.js +9 -9
- package/dist/playground/sdk/apis.d.ts +37 -0
- package/dist/playground/sdk/dcl-sdk.package.json +3 -4
- package/dist/playground-assets.d.ts +117 -103
- package/etc/playground-assets.api.json +903 -1001
- package/etc/playground-assets.api.md +57 -79
- package/package.json +5 -6
package/dist/alpha.d.ts
CHANGED
|
@@ -220,42 +220,6 @@ export declare interface AudioStreamComponentDefinitionExtended extends LastWrit
|
|
|
220
220
|
getAudioState(entity: Entity): PBAudioEvent | undefined;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
/**
|
|
224
|
-
* @public
|
|
225
|
-
*/
|
|
226
|
-
export declare type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Server authoritative message - identical to PutComponentMessageBody but with forced processing
|
|
230
|
-
* Min. length = header (8 bytes) + 16 bytes = 24 bytes
|
|
231
|
-
*
|
|
232
|
-
* @param entity - Uint32 number of the entity
|
|
233
|
-
* @param componentId - Uint32 number of id
|
|
234
|
-
* @param timestamp - Uint32 Lamport timestamp (server's authoritative timestamp)
|
|
235
|
-
* @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
|
|
236
|
-
* @public
|
|
237
|
-
*/
|
|
238
|
-
export declare type AuthoritativePutComponentMessageBody = {
|
|
239
|
-
type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
|
|
240
|
-
entityId: Entity;
|
|
241
|
-
componentId: number;
|
|
242
|
-
timestamp: number;
|
|
243
|
-
data: Uint8Array;
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* @public
|
|
248
|
-
*/
|
|
249
|
-
export declare namespace AuthoritativePutComponentOperation {
|
|
250
|
-
const MESSAGE_HEADER_LENGTH = 16;
|
|
251
|
-
/**
|
|
252
|
-
* Call this function for an optimal writing data passing the ByteBuffer
|
|
253
|
-
* already allocated
|
|
254
|
-
*/
|
|
255
|
-
export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
|
|
256
|
-
export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
223
|
/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
|
|
260
224
|
/**
|
|
261
225
|
* @public
|
|
@@ -428,22 +392,6 @@ export declare interface BaseComponent<T> {
|
|
|
428
392
|
* If the value is undefined, the component was deleted.
|
|
429
393
|
*/
|
|
430
394
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
431
|
-
/**
|
|
432
|
-
* @public
|
|
433
|
-
*
|
|
434
|
-
*/
|
|
435
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
436
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
437
|
-
/**
|
|
438
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
439
|
-
* @param entity - Entity to get the CRDT state for
|
|
440
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
441
|
-
* @public
|
|
442
|
-
*/
|
|
443
|
-
getCrdtState(entity: Entity): {
|
|
444
|
-
data: Uint8Array;
|
|
445
|
-
timestamp: number;
|
|
446
|
-
} | null;
|
|
447
395
|
}
|
|
448
396
|
|
|
449
397
|
/** @public */
|
|
@@ -1499,6 +1447,7 @@ export declare const componentDefinitionByName: {
|
|
|
1499
1447
|
"core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
|
|
1500
1448
|
"core::SkyboxTime": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkyboxTime>>;
|
|
1501
1449
|
"core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
|
|
1450
|
+
"core::TouchScreenControls": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>>;
|
|
1502
1451
|
"core::TriggerArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTriggerArea>>;
|
|
1503
1452
|
"core::TriggerAreaResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBTriggerAreaResult>>;
|
|
1504
1453
|
"core::Tween": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTween>>;
|
|
@@ -1509,6 +1458,7 @@ export declare const componentDefinitionByName: {
|
|
|
1509
1458
|
"core::UiDropdown": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
|
|
1510
1459
|
"core::UiDropdownResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
|
|
1511
1460
|
"core::UiInput": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
|
|
1461
|
+
"core::UiInputBinding": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputBinding>>;
|
|
1512
1462
|
"core::UiInputResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputResult>>;
|
|
1513
1463
|
"core::UiText": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiText>>;
|
|
1514
1464
|
"core::UiTransform": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiTransform>>;
|
|
@@ -1682,12 +1632,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1682
1632
|
/**
|
|
1683
1633
|
* @public
|
|
1684
1634
|
*/
|
|
1685
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1635
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1686
1636
|
|
|
1687
1637
|
/**
|
|
1688
1638
|
* @public
|
|
1689
1639
|
*/
|
|
1690
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1640
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1691
1641
|
|
|
1692
1642
|
/**
|
|
1693
1643
|
* Min length = 8 bytes
|
|
@@ -1742,8 +1692,7 @@ export declare enum CrdtMessageType {
|
|
|
1742
1692
|
PUT_COMPONENT_NETWORK = 5,
|
|
1743
1693
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1744
1694
|
DELETE_ENTITY_NETWORK = 7,
|
|
1745
|
-
|
|
1746
|
-
MAX_MESSAGE_TYPE = 9
|
|
1695
|
+
MAX_MESSAGE_TYPE = 8
|
|
1747
1696
|
}
|
|
1748
1697
|
|
|
1749
1698
|
/**
|
|
@@ -1751,8 +1700,6 @@ export declare enum CrdtMessageType {
|
|
|
1751
1700
|
*/
|
|
1752
1701
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1753
1702
|
|
|
1754
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1755
|
-
|
|
1756
1703
|
/**
|
|
1757
1704
|
* @public
|
|
1758
1705
|
*/
|
|
@@ -2479,12 +2426,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2479
2426
|
|
|
2480
2427
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2481
2428
|
|
|
2482
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2483
|
-
|
|
2484
|
-
export declare interface ICreatedByType {
|
|
2485
|
-
address: string;
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
2429
|
/**
|
|
2489
2430
|
* @public
|
|
2490
2431
|
*/
|
|
@@ -2960,35 +2901,6 @@ export declare const enum InteractionType {
|
|
|
2960
2901
|
PROXIMITY = 1
|
|
2961
2902
|
}
|
|
2962
2903
|
|
|
2963
|
-
/**
|
|
2964
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
2965
|
-
* This is not exposed to users, only for internal SDK operations
|
|
2966
|
-
*/
|
|
2967
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
2968
|
-
/**
|
|
2969
|
-
* @public
|
|
2970
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
2971
|
-
*/
|
|
2972
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
2973
|
-
/**
|
|
2974
|
-
* @public
|
|
2975
|
-
* Get the iterator to every entity has the component
|
|
2976
|
-
*/
|
|
2977
|
-
iterator(): Iterable<[Entity, any]>;
|
|
2978
|
-
/**
|
|
2979
|
-
* @public
|
|
2980
|
-
*/
|
|
2981
|
-
dirtyIterator(): Iterable<Entity>;
|
|
2982
|
-
/**
|
|
2983
|
-
* @public
|
|
2984
|
-
*/
|
|
2985
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
2986
|
-
/**
|
|
2987
|
-
* @public
|
|
2988
|
-
*/
|
|
2989
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
2990
|
-
}
|
|
2991
|
-
|
|
2992
2904
|
/**
|
|
2993
2905
|
* @public
|
|
2994
2906
|
*/
|
|
@@ -4911,8 +4823,9 @@ export declare namespace PBAvatarBase {
|
|
|
4911
4823
|
}
|
|
4912
4824
|
|
|
4913
4825
|
/**
|
|
4914
|
-
* AvatarEmoteCommand is a grow only value set,
|
|
4915
|
-
* avatar
|
|
4826
|
+
* AvatarEmoteCommand is a grow only value set, written by the explorer to report
|
|
4827
|
+
* avatar emote playback to the scene. It is appended to every player entity in the
|
|
4828
|
+
* scene (the local player and remote avatars alike).
|
|
4916
4829
|
*/
|
|
4917
4830
|
/**
|
|
4918
4831
|
* @public
|
|
@@ -6523,6 +6436,70 @@ export declare namespace PBTextShape {
|
|
|
6523
6436
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
|
|
6524
6437
|
}
|
|
6525
6438
|
|
|
6439
|
+
/**
|
|
6440
|
+
* The TouchScreenControls component lets a scene configure the native on-screen touch
|
|
6441
|
+
* controls (the mobile joystick + gamepad). It must be set on the RootEntity.
|
|
6442
|
+
*
|
|
6443
|
+
* By default every on-screen button is shown; list a button in `touch_inputs` with
|
|
6444
|
+
* `hide = true` to remove it (declutter). `main_action` picks which action the large
|
|
6445
|
+
* central button triggers, and `hide_joystick` removes the native virtual joystick. It is
|
|
6446
|
+
* a no-op on platforms without native on-screen controls (e.g. desktop).
|
|
6447
|
+
*
|
|
6448
|
+
* Accepted actions: only the on-screen gamepad actions map to a button — `IA_POINTER`,
|
|
6449
|
+
* `IA_PRIMARY`, `IA_SECONDARY`, `IA_JUMP`, and `IA_ACTION_3`..`IA_ACTION_6`. Any other
|
|
6450
|
+
* `InputAction` (movement actions, `IA_ANY`, `IA_MODIFIER`, or unknown/future values) is
|
|
6451
|
+
* ignored: a `TouchInput` entry naming a non-button action has no effect, and a `main_action`
|
|
6452
|
+
* that isn't a valid gamepad action falls back to the default central button (`IA_JUMP`).
|
|
6453
|
+
*/
|
|
6454
|
+
/**
|
|
6455
|
+
* @public
|
|
6456
|
+
*/
|
|
6457
|
+
export declare interface PBTouchScreenControls {
|
|
6458
|
+
touchInputs: PBTouchScreenControls_TouchInput[];
|
|
6459
|
+
/**
|
|
6460
|
+
* The large central button's action. Only the gamepad actions are valid:
|
|
6461
|
+
* jump / pointer / primary (E) / secondary (F) / action_3..action_6 (1/2/3/4).
|
|
6462
|
+
* When unset, the default central button (jump) is kept.
|
|
6463
|
+
*/
|
|
6464
|
+
mainAction?: InputAction | undefined;
|
|
6465
|
+
/** hide the native virtual joystick */
|
|
6466
|
+
hideJoystick: boolean;
|
|
6467
|
+
/** hide the on-screen crosshair / reticle */
|
|
6468
|
+
hideCrosshair: boolean;
|
|
6469
|
+
}
|
|
6470
|
+
|
|
6471
|
+
/**
|
|
6472
|
+
* @public
|
|
6473
|
+
*/
|
|
6474
|
+
export declare namespace PBTouchScreenControls {
|
|
6475
|
+
export function encode(message: PBTouchScreenControls, writer?: _m0.Writer): _m0.Writer;
|
|
6476
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTouchScreenControls;
|
|
6477
|
+
}
|
|
6478
|
+
|
|
6479
|
+
/** Per-button configuration. A button not listed here keeps its default (shown). */
|
|
6480
|
+
/**
|
|
6481
|
+
* @public
|
|
6482
|
+
*/
|
|
6483
|
+
export declare interface PBTouchScreenControls_TouchInput {
|
|
6484
|
+
/** which on-screen button this configures */
|
|
6485
|
+
inputAction: InputAction;
|
|
6486
|
+
/** hide this button (default: shown) */
|
|
6487
|
+
hide: boolean;
|
|
6488
|
+
/**
|
|
6489
|
+
* Override the button glyph with this texture. For the jump button it replaces all
|
|
6490
|
+
* of its dynamic states (jump / double-jump / glide).
|
|
6491
|
+
*/
|
|
6492
|
+
icon?: TextureUnion | undefined;
|
|
6493
|
+
}
|
|
6494
|
+
|
|
6495
|
+
/**
|
|
6496
|
+
* @public
|
|
6497
|
+
*/
|
|
6498
|
+
export declare namespace PBTouchScreenControls_TouchInput {
|
|
6499
|
+
export function encode(message: PBTouchScreenControls_TouchInput, writer?: _m0.Writer): _m0.Writer;
|
|
6500
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTouchScreenControls_TouchInput;
|
|
6501
|
+
}
|
|
6502
|
+
|
|
6526
6503
|
/**
|
|
6527
6504
|
* The PBTriggerArea component is used to raise collision triggering events (through the TriggerAreaResult component)
|
|
6528
6505
|
* when entities enter this component's defined area.
|
|
@@ -6811,6 +6788,42 @@ export declare namespace PBUiInput {
|
|
|
6811
6788
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiInput;
|
|
6812
6789
|
}
|
|
6813
6790
|
|
|
6791
|
+
/**
|
|
6792
|
+
* The UiInputBinding component binds a UI entity to one or more InputActions. While the
|
|
6793
|
+
* element is pressed (touch or pointer) the listed actions are held down, driving both
|
|
6794
|
+
* the local player input and scene InputAction listeners, just like the native on-screen
|
|
6795
|
+
* buttons. It is typically combined with PBTouchScreenControls to replace the native
|
|
6796
|
+
* controls with a custom touch UI.
|
|
6797
|
+
*
|
|
6798
|
+
* Release semantics: the held actions are released as soon as the press that started them
|
|
6799
|
+
* ends. A renderer MUST release all actions held by this binding when any of the following
|
|
6800
|
+
* happens: the press/touch is lifted or cancelled, the pointer/touch leaves the element
|
|
6801
|
+
* (loses press ownership), the actions list changes (the previous set is released before
|
|
6802
|
+
* the new set is applied), the component is removed or its actions list becomes empty, the
|
|
6803
|
+
* UI element is hidden, disabled or removed from the tree, or the scene unloads. In short,
|
|
6804
|
+
* no action may remain held once the element is no longer both present and actively pressed.
|
|
6805
|
+
*
|
|
6806
|
+
* Multi-touch: the binding is a single held state, not reference-counted per pointer. The
|
|
6807
|
+
* actions are held while the element is pressed and released when that press ends; a second
|
|
6808
|
+
* simultaneous press on the same element does not stack, and does not extend the hold past
|
|
6809
|
+
* the first release.
|
|
6810
|
+
*/
|
|
6811
|
+
/**
|
|
6812
|
+
* @public
|
|
6813
|
+
*/
|
|
6814
|
+
export declare interface PBUiInputBinding {
|
|
6815
|
+
/** the input actions fired while this element is pressed */
|
|
6816
|
+
actions: InputAction[];
|
|
6817
|
+
}
|
|
6818
|
+
|
|
6819
|
+
/**
|
|
6820
|
+
* @public
|
|
6821
|
+
*/
|
|
6822
|
+
export declare namespace PBUiInputBinding {
|
|
6823
|
+
export function encode(message: PBUiInputBinding, writer?: _m0.Writer): _m0.Writer;
|
|
6824
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiInputBinding;
|
|
6825
|
+
}
|
|
6826
|
+
|
|
6814
6827
|
/**
|
|
6815
6828
|
* @public
|
|
6816
6829
|
*/
|
|
@@ -7079,6 +7092,7 @@ export declare namespace PBVideoPlayer {
|
|
|
7079
7092
|
* an 'instant' transition (like using speed/time = 0)
|
|
7080
7093
|
* * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
|
|
7081
7094
|
* the holding entity transform).
|
|
7095
|
+
* * The fov defines the Field of View of the virtual camera
|
|
7082
7096
|
*/
|
|
7083
7097
|
/**
|
|
7084
7098
|
* @public
|
|
@@ -7086,6 +7100,8 @@ export declare namespace PBVideoPlayer {
|
|
|
7086
7100
|
export declare interface PBVirtualCamera {
|
|
7087
7101
|
defaultTransition?: CameraTransition | undefined;
|
|
7088
7102
|
lookAtEntity?: number | undefined;
|
|
7103
|
+
/** default: 60 */
|
|
7104
|
+
fov?: number | undefined;
|
|
7089
7105
|
}
|
|
7090
7106
|
|
|
7091
7107
|
/**
|
|
@@ -9111,6 +9127,9 @@ export declare const ToLinearSpace = 2.2;
|
|
|
9111
9127
|
*/
|
|
9112
9128
|
export declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
|
|
9113
9129
|
|
|
9130
|
+
/** @public */
|
|
9131
|
+
export declare const TouchScreenControls: LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>;
|
|
9132
|
+
|
|
9114
9133
|
export declare const Transform: TransformComponentExtended;
|
|
9115
9134
|
|
|
9116
9135
|
/**
|
|
@@ -9557,6 +9576,9 @@ export declare type UiFontType = 'sans-serif' | 'serif' | 'monospace';
|
|
|
9557
9576
|
/** @public */
|
|
9558
9577
|
export declare const UiInput: LastWriteWinElementSetComponentDefinition<PBUiInput>;
|
|
9559
9578
|
|
|
9579
|
+
/** @public */
|
|
9580
|
+
export declare const UiInputBinding: LastWriteWinElementSetComponentDefinition<PBUiInputBinding>;
|
|
9581
|
+
|
|
9560
9582
|
/**
|
|
9561
9583
|
* @public
|
|
9562
9584
|
*/
|
|
@@ -9736,14 +9758,6 @@ export declare interface UiTransformProps {
|
|
|
9736
9758
|
*/
|
|
9737
9759
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
9738
9760
|
|
|
9739
|
-
export declare type ValidateCallback<T> = (value: {
|
|
9740
|
-
entity: Entity;
|
|
9741
|
-
currentValue: T | undefined;
|
|
9742
|
-
newValue: T | undefined;
|
|
9743
|
-
senderAddress: string;
|
|
9744
|
-
createdBy: string;
|
|
9745
|
-
}) => boolean;
|
|
9746
|
-
|
|
9747
9761
|
/**
|
|
9748
9762
|
* @public
|
|
9749
9763
|
*/
|
package/dist/beta.d.ts
CHANGED
|
@@ -220,42 +220,6 @@ export declare interface AudioStreamComponentDefinitionExtended extends LastWrit
|
|
|
220
220
|
getAudioState(entity: Entity): PBAudioEvent | undefined;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
/**
|
|
224
|
-
* @public
|
|
225
|
-
*/
|
|
226
|
-
export declare type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Server authoritative message - identical to PutComponentMessageBody but with forced processing
|
|
230
|
-
* Min. length = header (8 bytes) + 16 bytes = 24 bytes
|
|
231
|
-
*
|
|
232
|
-
* @param entity - Uint32 number of the entity
|
|
233
|
-
* @param componentId - Uint32 number of id
|
|
234
|
-
* @param timestamp - Uint32 Lamport timestamp (server's authoritative timestamp)
|
|
235
|
-
* @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
|
|
236
|
-
* @public
|
|
237
|
-
*/
|
|
238
|
-
export declare type AuthoritativePutComponentMessageBody = {
|
|
239
|
-
type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
|
|
240
|
-
entityId: Entity;
|
|
241
|
-
componentId: number;
|
|
242
|
-
timestamp: number;
|
|
243
|
-
data: Uint8Array;
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* @public
|
|
248
|
-
*/
|
|
249
|
-
export declare namespace AuthoritativePutComponentOperation {
|
|
250
|
-
const MESSAGE_HEADER_LENGTH = 16;
|
|
251
|
-
/**
|
|
252
|
-
* Call this function for an optimal writing data passing the ByteBuffer
|
|
253
|
-
* already allocated
|
|
254
|
-
*/
|
|
255
|
-
export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
|
|
256
|
-
export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
223
|
/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
|
|
260
224
|
/**
|
|
261
225
|
* @public
|
|
@@ -428,22 +392,6 @@ export declare interface BaseComponent<T> {
|
|
|
428
392
|
* If the value is undefined, the component was deleted.
|
|
429
393
|
*/
|
|
430
394
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
431
|
-
/**
|
|
432
|
-
* @public
|
|
433
|
-
*
|
|
434
|
-
*/
|
|
435
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
436
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
437
|
-
/**
|
|
438
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
439
|
-
* @param entity - Entity to get the CRDT state for
|
|
440
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
441
|
-
* @public
|
|
442
|
-
*/
|
|
443
|
-
getCrdtState(entity: Entity): {
|
|
444
|
-
data: Uint8Array;
|
|
445
|
-
timestamp: number;
|
|
446
|
-
} | null;
|
|
447
395
|
}
|
|
448
396
|
|
|
449
397
|
/** @public */
|
|
@@ -1499,6 +1447,7 @@ export declare const componentDefinitionByName: {
|
|
|
1499
1447
|
"core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
|
|
1500
1448
|
"core::SkyboxTime": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkyboxTime>>;
|
|
1501
1449
|
"core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
|
|
1450
|
+
"core::TouchScreenControls": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>>;
|
|
1502
1451
|
"core::TriggerArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTriggerArea>>;
|
|
1503
1452
|
"core::TriggerAreaResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBTriggerAreaResult>>;
|
|
1504
1453
|
"core::Tween": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTween>>;
|
|
@@ -1509,6 +1458,7 @@ export declare const componentDefinitionByName: {
|
|
|
1509
1458
|
"core::UiDropdown": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
|
|
1510
1459
|
"core::UiDropdownResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
|
|
1511
1460
|
"core::UiInput": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
|
|
1461
|
+
"core::UiInputBinding": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputBinding>>;
|
|
1512
1462
|
"core::UiInputResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputResult>>;
|
|
1513
1463
|
"core::UiText": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiText>>;
|
|
1514
1464
|
"core::UiTransform": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiTransform>>;
|
|
@@ -1682,12 +1632,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1682
1632
|
/**
|
|
1683
1633
|
* @public
|
|
1684
1634
|
*/
|
|
1685
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1635
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1686
1636
|
|
|
1687
1637
|
/**
|
|
1688
1638
|
* @public
|
|
1689
1639
|
*/
|
|
1690
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1640
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1691
1641
|
|
|
1692
1642
|
/**
|
|
1693
1643
|
* Min length = 8 bytes
|
|
@@ -1742,8 +1692,7 @@ export declare enum CrdtMessageType {
|
|
|
1742
1692
|
PUT_COMPONENT_NETWORK = 5,
|
|
1743
1693
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1744
1694
|
DELETE_ENTITY_NETWORK = 7,
|
|
1745
|
-
|
|
1746
|
-
MAX_MESSAGE_TYPE = 9
|
|
1695
|
+
MAX_MESSAGE_TYPE = 8
|
|
1747
1696
|
}
|
|
1748
1697
|
|
|
1749
1698
|
/**
|
|
@@ -1751,8 +1700,6 @@ export declare enum CrdtMessageType {
|
|
|
1751
1700
|
*/
|
|
1752
1701
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1753
1702
|
|
|
1754
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1755
|
-
|
|
1756
1703
|
/**
|
|
1757
1704
|
* @public
|
|
1758
1705
|
*/
|
|
@@ -2479,12 +2426,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2479
2426
|
|
|
2480
2427
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2481
2428
|
|
|
2482
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2483
|
-
|
|
2484
|
-
export declare interface ICreatedByType {
|
|
2485
|
-
address: string;
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
2429
|
/**
|
|
2489
2430
|
* @public
|
|
2490
2431
|
*/
|
|
@@ -2951,35 +2892,6 @@ export declare const enum InteractionType {
|
|
|
2951
2892
|
PROXIMITY = 1
|
|
2952
2893
|
}
|
|
2953
2894
|
|
|
2954
|
-
/**
|
|
2955
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
2956
|
-
* This is not exposed to users, only for internal SDK operations
|
|
2957
|
-
*/
|
|
2958
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
2959
|
-
/**
|
|
2960
|
-
* @public
|
|
2961
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
2962
|
-
*/
|
|
2963
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
2964
|
-
/**
|
|
2965
|
-
* @public
|
|
2966
|
-
* Get the iterator to every entity has the component
|
|
2967
|
-
*/
|
|
2968
|
-
iterator(): Iterable<[Entity, any]>;
|
|
2969
|
-
/**
|
|
2970
|
-
* @public
|
|
2971
|
-
*/
|
|
2972
|
-
dirtyIterator(): Iterable<Entity>;
|
|
2973
|
-
/**
|
|
2974
|
-
* @public
|
|
2975
|
-
*/
|
|
2976
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
2977
|
-
/**
|
|
2978
|
-
* @public
|
|
2979
|
-
*/
|
|
2980
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
2981
|
-
}
|
|
2982
|
-
|
|
2983
2895
|
/**
|
|
2984
2896
|
* @public
|
|
2985
2897
|
*/
|
|
@@ -4883,8 +4795,9 @@ export declare namespace PBAvatarBase {
|
|
|
4883
4795
|
}
|
|
4884
4796
|
|
|
4885
4797
|
/**
|
|
4886
|
-
* AvatarEmoteCommand is a grow only value set,
|
|
4887
|
-
* avatar
|
|
4798
|
+
* AvatarEmoteCommand is a grow only value set, written by the explorer to report
|
|
4799
|
+
* avatar emote playback to the scene. It is appended to every player entity in the
|
|
4800
|
+
* scene (the local player and remote avatars alike).
|
|
4888
4801
|
*/
|
|
4889
4802
|
/**
|
|
4890
4803
|
* @public
|
|
@@ -6495,6 +6408,70 @@ export declare namespace PBTextShape {
|
|
|
6495
6408
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
|
|
6496
6409
|
}
|
|
6497
6410
|
|
|
6411
|
+
/**
|
|
6412
|
+
* The TouchScreenControls component lets a scene configure the native on-screen touch
|
|
6413
|
+
* controls (the mobile joystick + gamepad). It must be set on the RootEntity.
|
|
6414
|
+
*
|
|
6415
|
+
* By default every on-screen button is shown; list a button in `touch_inputs` with
|
|
6416
|
+
* `hide = true` to remove it (declutter). `main_action` picks which action the large
|
|
6417
|
+
* central button triggers, and `hide_joystick` removes the native virtual joystick. It is
|
|
6418
|
+
* a no-op on platforms without native on-screen controls (e.g. desktop).
|
|
6419
|
+
*
|
|
6420
|
+
* Accepted actions: only the on-screen gamepad actions map to a button — `IA_POINTER`,
|
|
6421
|
+
* `IA_PRIMARY`, `IA_SECONDARY`, `IA_JUMP`, and `IA_ACTION_3`..`IA_ACTION_6`. Any other
|
|
6422
|
+
* `InputAction` (movement actions, `IA_ANY`, `IA_MODIFIER`, or unknown/future values) is
|
|
6423
|
+
* ignored: a `TouchInput` entry naming a non-button action has no effect, and a `main_action`
|
|
6424
|
+
* that isn't a valid gamepad action falls back to the default central button (`IA_JUMP`).
|
|
6425
|
+
*/
|
|
6426
|
+
/**
|
|
6427
|
+
* @public
|
|
6428
|
+
*/
|
|
6429
|
+
export declare interface PBTouchScreenControls {
|
|
6430
|
+
touchInputs: PBTouchScreenControls_TouchInput[];
|
|
6431
|
+
/**
|
|
6432
|
+
* The large central button's action. Only the gamepad actions are valid:
|
|
6433
|
+
* jump / pointer / primary (E) / secondary (F) / action_3..action_6 (1/2/3/4).
|
|
6434
|
+
* When unset, the default central button (jump) is kept.
|
|
6435
|
+
*/
|
|
6436
|
+
mainAction?: InputAction | undefined;
|
|
6437
|
+
/** hide the native virtual joystick */
|
|
6438
|
+
hideJoystick: boolean;
|
|
6439
|
+
/** hide the on-screen crosshair / reticle */
|
|
6440
|
+
hideCrosshair: boolean;
|
|
6441
|
+
}
|
|
6442
|
+
|
|
6443
|
+
/**
|
|
6444
|
+
* @public
|
|
6445
|
+
*/
|
|
6446
|
+
export declare namespace PBTouchScreenControls {
|
|
6447
|
+
export function encode(message: PBTouchScreenControls, writer?: _m0.Writer): _m0.Writer;
|
|
6448
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTouchScreenControls;
|
|
6449
|
+
}
|
|
6450
|
+
|
|
6451
|
+
/** Per-button configuration. A button not listed here keeps its default (shown). */
|
|
6452
|
+
/**
|
|
6453
|
+
* @public
|
|
6454
|
+
*/
|
|
6455
|
+
export declare interface PBTouchScreenControls_TouchInput {
|
|
6456
|
+
/** which on-screen button this configures */
|
|
6457
|
+
inputAction: InputAction;
|
|
6458
|
+
/** hide this button (default: shown) */
|
|
6459
|
+
hide: boolean;
|
|
6460
|
+
/**
|
|
6461
|
+
* Override the button glyph with this texture. For the jump button it replaces all
|
|
6462
|
+
* of its dynamic states (jump / double-jump / glide).
|
|
6463
|
+
*/
|
|
6464
|
+
icon?: TextureUnion | undefined;
|
|
6465
|
+
}
|
|
6466
|
+
|
|
6467
|
+
/**
|
|
6468
|
+
* @public
|
|
6469
|
+
*/
|
|
6470
|
+
export declare namespace PBTouchScreenControls_TouchInput {
|
|
6471
|
+
export function encode(message: PBTouchScreenControls_TouchInput, writer?: _m0.Writer): _m0.Writer;
|
|
6472
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTouchScreenControls_TouchInput;
|
|
6473
|
+
}
|
|
6474
|
+
|
|
6498
6475
|
/**
|
|
6499
6476
|
* The PBTriggerArea component is used to raise collision triggering events (through the TriggerAreaResult component)
|
|
6500
6477
|
* when entities enter this component's defined area.
|
|
@@ -6783,6 +6760,42 @@ export declare namespace PBUiInput {
|
|
|
6783
6760
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiInput;
|
|
6784
6761
|
}
|
|
6785
6762
|
|
|
6763
|
+
/**
|
|
6764
|
+
* The UiInputBinding component binds a UI entity to one or more InputActions. While the
|
|
6765
|
+
* element is pressed (touch or pointer) the listed actions are held down, driving both
|
|
6766
|
+
* the local player input and scene InputAction listeners, just like the native on-screen
|
|
6767
|
+
* buttons. It is typically combined with PBTouchScreenControls to replace the native
|
|
6768
|
+
* controls with a custom touch UI.
|
|
6769
|
+
*
|
|
6770
|
+
* Release semantics: the held actions are released as soon as the press that started them
|
|
6771
|
+
* ends. A renderer MUST release all actions held by this binding when any of the following
|
|
6772
|
+
* happens: the press/touch is lifted or cancelled, the pointer/touch leaves the element
|
|
6773
|
+
* (loses press ownership), the actions list changes (the previous set is released before
|
|
6774
|
+
* the new set is applied), the component is removed or its actions list becomes empty, the
|
|
6775
|
+
* UI element is hidden, disabled or removed from the tree, or the scene unloads. In short,
|
|
6776
|
+
* no action may remain held once the element is no longer both present and actively pressed.
|
|
6777
|
+
*
|
|
6778
|
+
* Multi-touch: the binding is a single held state, not reference-counted per pointer. The
|
|
6779
|
+
* actions are held while the element is pressed and released when that press ends; a second
|
|
6780
|
+
* simultaneous press on the same element does not stack, and does not extend the hold past
|
|
6781
|
+
* the first release.
|
|
6782
|
+
*/
|
|
6783
|
+
/**
|
|
6784
|
+
* @public
|
|
6785
|
+
*/
|
|
6786
|
+
export declare interface PBUiInputBinding {
|
|
6787
|
+
/** the input actions fired while this element is pressed */
|
|
6788
|
+
actions: InputAction[];
|
|
6789
|
+
}
|
|
6790
|
+
|
|
6791
|
+
/**
|
|
6792
|
+
* @public
|
|
6793
|
+
*/
|
|
6794
|
+
export declare namespace PBUiInputBinding {
|
|
6795
|
+
export function encode(message: PBUiInputBinding, writer?: _m0.Writer): _m0.Writer;
|
|
6796
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiInputBinding;
|
|
6797
|
+
}
|
|
6798
|
+
|
|
6786
6799
|
/**
|
|
6787
6800
|
* @public
|
|
6788
6801
|
*/
|
|
@@ -7051,6 +7064,7 @@ export declare namespace PBVideoPlayer {
|
|
|
7051
7064
|
* an 'instant' transition (like using speed/time = 0)
|
|
7052
7065
|
* * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
|
|
7053
7066
|
* the holding entity transform).
|
|
7067
|
+
* * The fov defines the Field of View of the virtual camera
|
|
7054
7068
|
*/
|
|
7055
7069
|
/**
|
|
7056
7070
|
* @public
|
|
@@ -7058,6 +7072,8 @@ export declare namespace PBVideoPlayer {
|
|
|
7058
7072
|
export declare interface PBVirtualCamera {
|
|
7059
7073
|
defaultTransition?: CameraTransition | undefined;
|
|
7060
7074
|
lookAtEntity?: number | undefined;
|
|
7075
|
+
/** default: 60 */
|
|
7076
|
+
fov?: number | undefined;
|
|
7061
7077
|
}
|
|
7062
7078
|
|
|
7063
7079
|
/**
|
|
@@ -9078,6 +9094,9 @@ export declare const ToLinearSpace = 2.2;
|
|
|
9078
9094
|
*/
|
|
9079
9095
|
export declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
|
|
9080
9096
|
|
|
9097
|
+
/** @public */
|
|
9098
|
+
export declare const TouchScreenControls: LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>;
|
|
9099
|
+
|
|
9081
9100
|
export declare const Transform: TransformComponentExtended;
|
|
9082
9101
|
|
|
9083
9102
|
/**
|
|
@@ -9524,6 +9543,9 @@ export declare type UiFontType = 'sans-serif' | 'serif' | 'monospace';
|
|
|
9524
9543
|
/** @public */
|
|
9525
9544
|
export declare const UiInput: LastWriteWinElementSetComponentDefinition<PBUiInput>;
|
|
9526
9545
|
|
|
9546
|
+
/** @public */
|
|
9547
|
+
export declare const UiInputBinding: LastWriteWinElementSetComponentDefinition<PBUiInputBinding>;
|
|
9548
|
+
|
|
9527
9549
|
/**
|
|
9528
9550
|
* @public
|
|
9529
9551
|
*/
|
|
@@ -9703,14 +9725,6 @@ export declare interface UiTransformProps {
|
|
|
9703
9725
|
*/
|
|
9704
9726
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
9705
9727
|
|
|
9706
|
-
export declare type ValidateCallback<T> = (value: {
|
|
9707
|
-
entity: Entity;
|
|
9708
|
-
currentValue: T | undefined;
|
|
9709
|
-
newValue: T | undefined;
|
|
9710
|
-
senderAddress: string;
|
|
9711
|
-
createdBy: string;
|
|
9712
|
-
}) => boolean;
|
|
9713
|
-
|
|
9714
9728
|
/**
|
|
9715
9729
|
* @public
|
|
9716
9730
|
*/
|