@dcl/playground-assets 7.24.4-28592331167.commit-697ce9e → 7.24.4-28675700559.commit-a1edb39
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 +48 -101
- package/dist/beta.d.ts +48 -101
- package/dist/index.bundled.d.ts +48 -101
- package/dist/index.js +7 -7
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +48 -101
- package/etc/playground-assets.api.json +117 -1000
- package/etc/playground-assets.api.md +13 -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
|
|
@@ -418,22 +382,6 @@ export declare interface BaseComponent<T> {
|
|
|
418
382
|
* If the value is undefined, the component was deleted.
|
|
419
383
|
*/
|
|
420
384
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
421
|
-
/**
|
|
422
|
-
* @public
|
|
423
|
-
*
|
|
424
|
-
*/
|
|
425
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
426
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
427
|
-
/**
|
|
428
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
429
|
-
* @param entity - Entity to get the CRDT state for
|
|
430
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
431
|
-
* @public
|
|
432
|
-
*/
|
|
433
|
-
getCrdtState(entity: Entity): {
|
|
434
|
-
data: Uint8Array;
|
|
435
|
-
timestamp: number;
|
|
436
|
-
} | null;
|
|
437
385
|
}
|
|
438
386
|
|
|
439
387
|
/** @public */
|
|
@@ -1672,12 +1620,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1672
1620
|
/**
|
|
1673
1621
|
* @public
|
|
1674
1622
|
*/
|
|
1675
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1623
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1676
1624
|
|
|
1677
1625
|
/**
|
|
1678
1626
|
* @public
|
|
1679
1627
|
*/
|
|
1680
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1628
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1681
1629
|
|
|
1682
1630
|
/**
|
|
1683
1631
|
* Min length = 8 bytes
|
|
@@ -1732,8 +1680,7 @@ export declare enum CrdtMessageType {
|
|
|
1732
1680
|
PUT_COMPONENT_NETWORK = 5,
|
|
1733
1681
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1734
1682
|
DELETE_ENTITY_NETWORK = 7,
|
|
1735
|
-
|
|
1736
|
-
MAX_MESSAGE_TYPE = 9
|
|
1683
|
+
MAX_MESSAGE_TYPE = 8
|
|
1737
1684
|
}
|
|
1738
1685
|
|
|
1739
1686
|
/**
|
|
@@ -1741,8 +1688,6 @@ export declare enum CrdtMessageType {
|
|
|
1741
1688
|
*/
|
|
1742
1689
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1743
1690
|
|
|
1744
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1745
|
-
|
|
1746
1691
|
/**
|
|
1747
1692
|
* @public
|
|
1748
1693
|
*/
|
|
@@ -2469,12 +2414,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2469
2414
|
|
|
2470
2415
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2471
2416
|
|
|
2472
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2473
|
-
|
|
2474
|
-
export declare interface ICreatedByType {
|
|
2475
|
-
address: string;
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
2417
|
/**
|
|
2479
2418
|
* @public
|
|
2480
2419
|
*/
|
|
@@ -2920,6 +2859,28 @@ export declare type InstanceCompositeOptions = {
|
|
|
2920
2859
|
alreadyRequestedSrc?: Set<string>;
|
|
2921
2860
|
};
|
|
2922
2861
|
|
|
2862
|
+
/**
|
|
2863
|
+
*
|
|
2864
|
+
* @public
|
|
2865
|
+
* InteractableArea component
|
|
2866
|
+
*
|
|
2867
|
+
* Constrains its children to the area inside the renderer-reported interactable
|
|
2868
|
+
* area. This is the portion of the screen not covered by client UI such as the
|
|
2869
|
+
* minimap, chat window, or other platform overlays. On the Unity desktop client
|
|
2870
|
+
* the left 25% of the screen is reserved for client UI, so this container
|
|
2871
|
+
* positions its children within the remaining 75%.
|
|
2872
|
+
*
|
|
2873
|
+
* The container is absolutely positioned with top/left/right/bottom matching
|
|
2874
|
+
* the current `UiCanvasInformation.interactableArea`, so a child sized
|
|
2875
|
+
* 100%x100% fills the interactable area exactly.
|
|
2876
|
+
*
|
|
2877
|
+
* @example
|
|
2878
|
+
* <InteractableArea><MyHud /></InteractableArea>
|
|
2879
|
+
*
|
|
2880
|
+
* @category Component
|
|
2881
|
+
*/
|
|
2882
|
+
export declare function InteractableArea(props: UiInteractableAreaProps): ReactEcs.JSX.Element;
|
|
2883
|
+
|
|
2923
2884
|
/**
|
|
2924
2885
|
* @public
|
|
2925
2886
|
*/
|
|
@@ -2928,35 +2889,6 @@ export declare const enum InteractionType {
|
|
|
2928
2889
|
PROXIMITY = 1
|
|
2929
2890
|
}
|
|
2930
2891
|
|
|
2931
|
-
/**
|
|
2932
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
2933
|
-
* This is not exposed to users, only for internal SDK operations
|
|
2934
|
-
*/
|
|
2935
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
2936
|
-
/**
|
|
2937
|
-
* @public
|
|
2938
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
2939
|
-
*/
|
|
2940
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
2941
|
-
/**
|
|
2942
|
-
* @public
|
|
2943
|
-
* Get the iterator to every entity has the component
|
|
2944
|
-
*/
|
|
2945
|
-
iterator(): Iterable<[Entity, any]>;
|
|
2946
|
-
/**
|
|
2947
|
-
* @public
|
|
2948
|
-
*/
|
|
2949
|
-
dirtyIterator(): Iterable<Entity>;
|
|
2950
|
-
/**
|
|
2951
|
-
* @public
|
|
2952
|
-
*/
|
|
2953
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
2954
|
-
/**
|
|
2955
|
-
* @public
|
|
2956
|
-
*/
|
|
2957
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
2958
|
-
}
|
|
2959
|
-
|
|
2960
2892
|
/**
|
|
2961
2893
|
* @public
|
|
2962
2894
|
*/
|
|
@@ -9533,6 +9465,29 @@ export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlig
|
|
|
9533
9465
|
/** @public */
|
|
9534
9466
|
export declare const UiInputResult: LastWriteWinElementSetComponentDefinition<PBUiInputResult>;
|
|
9535
9467
|
|
|
9468
|
+
/**
|
|
9469
|
+
* InteractableArea component props
|
|
9470
|
+
*
|
|
9471
|
+
* The container reads the current `interactableArea` reported by the renderer
|
|
9472
|
+
* via `UiCanvasInformation` (the HUD-safe zone — the portion of the screen not
|
|
9473
|
+
* covered by client UI such as the minimap, chat window, or other overlays) and
|
|
9474
|
+
* constrains its children to the area inside those insets using absolute
|
|
9475
|
+
* positioning. Layout props that control the container's own position
|
|
9476
|
+
* (`positionType`, `position`) are owned by the component and are not
|
|
9477
|
+
* configurable from props — every other layout, background and event prop is
|
|
9478
|
+
* forwarded as usual.
|
|
9479
|
+
*
|
|
9480
|
+
* @public
|
|
9481
|
+
*/
|
|
9482
|
+
export declare type UiInteractableAreaProps = Omit<EntityPropTypes, 'uiTransform'> & {
|
|
9483
|
+
/**
|
|
9484
|
+
* Layout overrides forwarded to the underlying entity. The
|
|
9485
|
+
* `positionType` and `position` fields are reserved by the container and
|
|
9486
|
+
* any value provided here is ignored.
|
|
9487
|
+
*/
|
|
9488
|
+
uiTransform?: Omit<NonNullable<EntityPropTypes['uiTransform']>, 'positionType' | 'position'>;
|
|
9489
|
+
};
|
|
9490
|
+
|
|
9536
9491
|
/**
|
|
9537
9492
|
* Label component props
|
|
9538
9493
|
* @public
|
|
@@ -9673,14 +9628,6 @@ export declare interface UiTransformProps {
|
|
|
9673
9628
|
*/
|
|
9674
9629
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
9675
9630
|
|
|
9676
|
-
export declare type ValidateCallback<T> = (value: {
|
|
9677
|
-
entity: Entity;
|
|
9678
|
-
currentValue: T | undefined;
|
|
9679
|
-
newValue: T | undefined;
|
|
9680
|
-
senderAddress: string;
|
|
9681
|
-
createdBy: string;
|
|
9682
|
-
}) => boolean;
|
|
9683
|
-
|
|
9684
9631
|
/**
|
|
9685
9632
|
* @public
|
|
9686
9633
|
*/
|
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
|
|
@@ -418,22 +382,6 @@ export declare interface BaseComponent<T> {
|
|
|
418
382
|
* If the value is undefined, the component was deleted.
|
|
419
383
|
*/
|
|
420
384
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
421
|
-
/**
|
|
422
|
-
* @public
|
|
423
|
-
*
|
|
424
|
-
*/
|
|
425
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
426
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
427
|
-
/**
|
|
428
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
429
|
-
* @param entity - Entity to get the CRDT state for
|
|
430
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
431
|
-
* @public
|
|
432
|
-
*/
|
|
433
|
-
getCrdtState(entity: Entity): {
|
|
434
|
-
data: Uint8Array;
|
|
435
|
-
timestamp: number;
|
|
436
|
-
} | null;
|
|
437
385
|
}
|
|
438
386
|
|
|
439
387
|
/** @public */
|
|
@@ -1672,12 +1620,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1672
1620
|
/**
|
|
1673
1621
|
* @public
|
|
1674
1622
|
*/
|
|
1675
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1623
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1676
1624
|
|
|
1677
1625
|
/**
|
|
1678
1626
|
* @public
|
|
1679
1627
|
*/
|
|
1680
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1628
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1681
1629
|
|
|
1682
1630
|
/**
|
|
1683
1631
|
* Min length = 8 bytes
|
|
@@ -1732,8 +1680,7 @@ export declare enum CrdtMessageType {
|
|
|
1732
1680
|
PUT_COMPONENT_NETWORK = 5,
|
|
1733
1681
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1734
1682
|
DELETE_ENTITY_NETWORK = 7,
|
|
1735
|
-
|
|
1736
|
-
MAX_MESSAGE_TYPE = 9
|
|
1683
|
+
MAX_MESSAGE_TYPE = 8
|
|
1737
1684
|
}
|
|
1738
1685
|
|
|
1739
1686
|
/**
|
|
@@ -1741,8 +1688,6 @@ export declare enum CrdtMessageType {
|
|
|
1741
1688
|
*/
|
|
1742
1689
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1743
1690
|
|
|
1744
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1745
|
-
|
|
1746
1691
|
/**
|
|
1747
1692
|
* @public
|
|
1748
1693
|
*/
|
|
@@ -2469,12 +2414,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2469
2414
|
|
|
2470
2415
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2471
2416
|
|
|
2472
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2473
|
-
|
|
2474
|
-
export declare interface ICreatedByType {
|
|
2475
|
-
address: string;
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
2417
|
/**
|
|
2479
2418
|
* @public
|
|
2480
2419
|
*/
|
|
@@ -2911,6 +2850,28 @@ export declare type InstanceCompositeOptions = {
|
|
|
2911
2850
|
alreadyRequestedSrc?: Set<string>;
|
|
2912
2851
|
};
|
|
2913
2852
|
|
|
2853
|
+
/**
|
|
2854
|
+
*
|
|
2855
|
+
* @public
|
|
2856
|
+
* InteractableArea component
|
|
2857
|
+
*
|
|
2858
|
+
* Constrains its children to the area inside the renderer-reported interactable
|
|
2859
|
+
* area. This is the portion of the screen not covered by client UI such as the
|
|
2860
|
+
* minimap, chat window, or other platform overlays. On the Unity desktop client
|
|
2861
|
+
* the left 25% of the screen is reserved for client UI, so this container
|
|
2862
|
+
* positions its children within the remaining 75%.
|
|
2863
|
+
*
|
|
2864
|
+
* The container is absolutely positioned with top/left/right/bottom matching
|
|
2865
|
+
* the current `UiCanvasInformation.interactableArea`, so a child sized
|
|
2866
|
+
* 100%x100% fills the interactable area exactly.
|
|
2867
|
+
*
|
|
2868
|
+
* @example
|
|
2869
|
+
* <InteractableArea><MyHud /></InteractableArea>
|
|
2870
|
+
*
|
|
2871
|
+
* @category Component
|
|
2872
|
+
*/
|
|
2873
|
+
export declare function InteractableArea(props: UiInteractableAreaProps): ReactEcs.JSX.Element;
|
|
2874
|
+
|
|
2914
2875
|
/**
|
|
2915
2876
|
* @public
|
|
2916
2877
|
*/
|
|
@@ -2919,35 +2880,6 @@ export declare const enum InteractionType {
|
|
|
2919
2880
|
PROXIMITY = 1
|
|
2920
2881
|
}
|
|
2921
2882
|
|
|
2922
|
-
/**
|
|
2923
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
2924
|
-
* This is not exposed to users, only for internal SDK operations
|
|
2925
|
-
*/
|
|
2926
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
2927
|
-
/**
|
|
2928
|
-
* @public
|
|
2929
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
2930
|
-
*/
|
|
2931
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
2932
|
-
/**
|
|
2933
|
-
* @public
|
|
2934
|
-
* Get the iterator to every entity has the component
|
|
2935
|
-
*/
|
|
2936
|
-
iterator(): Iterable<[Entity, any]>;
|
|
2937
|
-
/**
|
|
2938
|
-
* @public
|
|
2939
|
-
*/
|
|
2940
|
-
dirtyIterator(): Iterable<Entity>;
|
|
2941
|
-
/**
|
|
2942
|
-
* @public
|
|
2943
|
-
*/
|
|
2944
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
2945
|
-
/**
|
|
2946
|
-
* @public
|
|
2947
|
-
*/
|
|
2948
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
2949
|
-
}
|
|
2950
|
-
|
|
2951
2883
|
/**
|
|
2952
2884
|
* @public
|
|
2953
2885
|
*/
|
|
@@ -9500,6 +9432,29 @@ export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlig
|
|
|
9500
9432
|
/** @public */
|
|
9501
9433
|
export declare const UiInputResult: LastWriteWinElementSetComponentDefinition<PBUiInputResult>;
|
|
9502
9434
|
|
|
9435
|
+
/**
|
|
9436
|
+
* InteractableArea component props
|
|
9437
|
+
*
|
|
9438
|
+
* The container reads the current `interactableArea` reported by the renderer
|
|
9439
|
+
* via `UiCanvasInformation` (the HUD-safe zone — the portion of the screen not
|
|
9440
|
+
* covered by client UI such as the minimap, chat window, or other overlays) and
|
|
9441
|
+
* constrains its children to the area inside those insets using absolute
|
|
9442
|
+
* positioning. Layout props that control the container's own position
|
|
9443
|
+
* (`positionType`, `position`) are owned by the component and are not
|
|
9444
|
+
* configurable from props — every other layout, background and event prop is
|
|
9445
|
+
* forwarded as usual.
|
|
9446
|
+
*
|
|
9447
|
+
* @public
|
|
9448
|
+
*/
|
|
9449
|
+
export declare type UiInteractableAreaProps = Omit<EntityPropTypes, 'uiTransform'> & {
|
|
9450
|
+
/**
|
|
9451
|
+
* Layout overrides forwarded to the underlying entity. The
|
|
9452
|
+
* `positionType` and `position` fields are reserved by the container and
|
|
9453
|
+
* any value provided here is ignored.
|
|
9454
|
+
*/
|
|
9455
|
+
uiTransform?: Omit<NonNullable<EntityPropTypes['uiTransform']>, 'positionType' | 'position'>;
|
|
9456
|
+
};
|
|
9457
|
+
|
|
9503
9458
|
/**
|
|
9504
9459
|
* Label component props
|
|
9505
9460
|
* @public
|
|
@@ -9640,14 +9595,6 @@ export declare interface UiTransformProps {
|
|
|
9640
9595
|
*/
|
|
9641
9596
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
9642
9597
|
|
|
9643
|
-
export declare type ValidateCallback<T> = (value: {
|
|
9644
|
-
entity: Entity;
|
|
9645
|
-
currentValue: T | undefined;
|
|
9646
|
-
newValue: T | undefined;
|
|
9647
|
-
senderAddress: string;
|
|
9648
|
-
createdBy: string;
|
|
9649
|
-
}) => boolean;
|
|
9650
|
-
|
|
9651
9598
|
/**
|
|
9652
9599
|
* @public
|
|
9653
9600
|
*/
|
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
|
|
@@ -418,22 +382,6 @@ export declare interface BaseComponent<T> {
|
|
|
418
382
|
* If the value is undefined, the component was deleted.
|
|
419
383
|
*/
|
|
420
384
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
421
|
-
/**
|
|
422
|
-
* @public
|
|
423
|
-
*
|
|
424
|
-
*/
|
|
425
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
426
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
427
|
-
/**
|
|
428
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
429
|
-
* @param entity - Entity to get the CRDT state for
|
|
430
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
431
|
-
* @public
|
|
432
|
-
*/
|
|
433
|
-
getCrdtState(entity: Entity): {
|
|
434
|
-
data: Uint8Array;
|
|
435
|
-
timestamp: number;
|
|
436
|
-
} | null;
|
|
437
385
|
}
|
|
438
386
|
|
|
439
387
|
/** @public */
|
|
@@ -1672,12 +1620,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1672
1620
|
/**
|
|
1673
1621
|
* @public
|
|
1674
1622
|
*/
|
|
1675
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1623
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1676
1624
|
|
|
1677
1625
|
/**
|
|
1678
1626
|
* @public
|
|
1679
1627
|
*/
|
|
1680
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1628
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1681
1629
|
|
|
1682
1630
|
/**
|
|
1683
1631
|
* Min length = 8 bytes
|
|
@@ -1732,8 +1680,7 @@ export declare enum CrdtMessageType {
|
|
|
1732
1680
|
PUT_COMPONENT_NETWORK = 5,
|
|
1733
1681
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1734
1682
|
DELETE_ENTITY_NETWORK = 7,
|
|
1735
|
-
|
|
1736
|
-
MAX_MESSAGE_TYPE = 9
|
|
1683
|
+
MAX_MESSAGE_TYPE = 8
|
|
1737
1684
|
}
|
|
1738
1685
|
|
|
1739
1686
|
/**
|
|
@@ -1741,8 +1688,6 @@ export declare enum CrdtMessageType {
|
|
|
1741
1688
|
*/
|
|
1742
1689
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1743
1690
|
|
|
1744
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1745
|
-
|
|
1746
1691
|
/**
|
|
1747
1692
|
* @public
|
|
1748
1693
|
*/
|
|
@@ -2469,12 +2414,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2469
2414
|
|
|
2470
2415
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2471
2416
|
|
|
2472
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2473
|
-
|
|
2474
|
-
export declare interface ICreatedByType {
|
|
2475
|
-
address: string;
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
2417
|
/**
|
|
2479
2418
|
* @public
|
|
2480
2419
|
*/
|
|
@@ -2911,6 +2850,28 @@ export declare type InstanceCompositeOptions = {
|
|
|
2911
2850
|
alreadyRequestedSrc?: Set<string>;
|
|
2912
2851
|
};
|
|
2913
2852
|
|
|
2853
|
+
/**
|
|
2854
|
+
*
|
|
2855
|
+
* @public
|
|
2856
|
+
* InteractableArea component
|
|
2857
|
+
*
|
|
2858
|
+
* Constrains its children to the area inside the renderer-reported interactable
|
|
2859
|
+
* area. This is the portion of the screen not covered by client UI such as the
|
|
2860
|
+
* minimap, chat window, or other platform overlays. On the Unity desktop client
|
|
2861
|
+
* the left 25% of the screen is reserved for client UI, so this container
|
|
2862
|
+
* positions its children within the remaining 75%.
|
|
2863
|
+
*
|
|
2864
|
+
* The container is absolutely positioned with top/left/right/bottom matching
|
|
2865
|
+
* the current `UiCanvasInformation.interactableArea`, so a child sized
|
|
2866
|
+
* 100%x100% fills the interactable area exactly.
|
|
2867
|
+
*
|
|
2868
|
+
* @example
|
|
2869
|
+
* <InteractableArea><MyHud /></InteractableArea>
|
|
2870
|
+
*
|
|
2871
|
+
* @category Component
|
|
2872
|
+
*/
|
|
2873
|
+
export declare function InteractableArea(props: UiInteractableAreaProps): ReactEcs.JSX.Element;
|
|
2874
|
+
|
|
2914
2875
|
/**
|
|
2915
2876
|
* @public
|
|
2916
2877
|
*/
|
|
@@ -2919,35 +2880,6 @@ export declare const enum InteractionType {
|
|
|
2919
2880
|
PROXIMITY = 1
|
|
2920
2881
|
}
|
|
2921
2882
|
|
|
2922
|
-
/**
|
|
2923
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
2924
|
-
* This is not exposed to users, only for internal SDK operations
|
|
2925
|
-
*/
|
|
2926
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
2927
|
-
/**
|
|
2928
|
-
* @public
|
|
2929
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
2930
|
-
*/
|
|
2931
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
2932
|
-
/**
|
|
2933
|
-
* @public
|
|
2934
|
-
* Get the iterator to every entity has the component
|
|
2935
|
-
*/
|
|
2936
|
-
iterator(): Iterable<[Entity, any]>;
|
|
2937
|
-
/**
|
|
2938
|
-
* @public
|
|
2939
|
-
*/
|
|
2940
|
-
dirtyIterator(): Iterable<Entity>;
|
|
2941
|
-
/**
|
|
2942
|
-
* @public
|
|
2943
|
-
*/
|
|
2944
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
2945
|
-
/**
|
|
2946
|
-
* @public
|
|
2947
|
-
*/
|
|
2948
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
2949
|
-
}
|
|
2950
|
-
|
|
2951
2883
|
/**
|
|
2952
2884
|
* @public
|
|
2953
2885
|
*/
|
|
@@ -9500,6 +9432,29 @@ export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlig
|
|
|
9500
9432
|
/** @public */
|
|
9501
9433
|
export declare const UiInputResult: LastWriteWinElementSetComponentDefinition<PBUiInputResult>;
|
|
9502
9434
|
|
|
9435
|
+
/**
|
|
9436
|
+
* InteractableArea component props
|
|
9437
|
+
*
|
|
9438
|
+
* The container reads the current `interactableArea` reported by the renderer
|
|
9439
|
+
* via `UiCanvasInformation` (the HUD-safe zone — the portion of the screen not
|
|
9440
|
+
* covered by client UI such as the minimap, chat window, or other overlays) and
|
|
9441
|
+
* constrains its children to the area inside those insets using absolute
|
|
9442
|
+
* positioning. Layout props that control the container's own position
|
|
9443
|
+
* (`positionType`, `position`) are owned by the component and are not
|
|
9444
|
+
* configurable from props — every other layout, background and event prop is
|
|
9445
|
+
* forwarded as usual.
|
|
9446
|
+
*
|
|
9447
|
+
* @public
|
|
9448
|
+
*/
|
|
9449
|
+
export declare type UiInteractableAreaProps = Omit<EntityPropTypes, 'uiTransform'> & {
|
|
9450
|
+
/**
|
|
9451
|
+
* Layout overrides forwarded to the underlying entity. The
|
|
9452
|
+
* `positionType` and `position` fields are reserved by the container and
|
|
9453
|
+
* any value provided here is ignored.
|
|
9454
|
+
*/
|
|
9455
|
+
uiTransform?: Omit<NonNullable<EntityPropTypes['uiTransform']>, 'positionType' | 'position'>;
|
|
9456
|
+
};
|
|
9457
|
+
|
|
9503
9458
|
/**
|
|
9504
9459
|
* Label component props
|
|
9505
9460
|
* @public
|
|
@@ -9640,14 +9595,6 @@ export declare interface UiTransformProps {
|
|
|
9640
9595
|
*/
|
|
9641
9596
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
9642
9597
|
|
|
9643
|
-
export declare type ValidateCallback<T> = (value: {
|
|
9644
|
-
entity: Entity;
|
|
9645
|
-
currentValue: T | undefined;
|
|
9646
|
-
newValue: T | undefined;
|
|
9647
|
-
senderAddress: string;
|
|
9648
|
-
createdBy: string;
|
|
9649
|
-
}) => boolean;
|
|
9650
|
-
|
|
9651
9598
|
/**
|
|
9652
9599
|
* @public
|
|
9653
9600
|
*/
|