@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/index.bundled.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
|
*/
|