@dcl/playground-assets 7.27.1-33533530571.commit-451d001 → 7.27.1-33533891406.commit-6a98834
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 +21 -122
- package/dist/beta.d.ts +21 -122
- package/dist/index.bundled.d.ts +21 -122
- package/dist/index.js +7 -7
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +21 -122
- package/etc/playground-assets.api.json +34 -1004
- package/etc/playground-assets.api.md +6 -80
- package/package.json +5 -6
package/dist/alpha.d.ts
CHANGED
|
@@ -245,42 +245,6 @@ export declare interface AudioStreamComponentDefinitionExtended extends LastWrit
|
|
|
245
245
|
getAudioState(entity: Entity): PBAudioEvent | undefined;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
/**
|
|
249
|
-
* @public
|
|
250
|
-
*/
|
|
251
|
-
export declare type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Server authoritative message - identical to PutComponentMessageBody but with forced processing
|
|
255
|
-
* Min. length = header (8 bytes) + 16 bytes = 24 bytes
|
|
256
|
-
*
|
|
257
|
-
* @param entity - Uint32 number of the entity
|
|
258
|
-
* @param componentId - Uint32 number of id
|
|
259
|
-
* @param timestamp - Uint32 Lamport timestamp (server's authoritative timestamp)
|
|
260
|
-
* @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
|
|
261
|
-
* @public
|
|
262
|
-
*/
|
|
263
|
-
export declare type AuthoritativePutComponentMessageBody = {
|
|
264
|
-
type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
|
|
265
|
-
entityId: Entity;
|
|
266
|
-
componentId: number;
|
|
267
|
-
timestamp: number;
|
|
268
|
-
data: Uint8Array;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* @public
|
|
273
|
-
*/
|
|
274
|
-
export declare namespace AuthoritativePutComponentOperation {
|
|
275
|
-
const MESSAGE_HEADER_LENGTH = 16;
|
|
276
|
-
/**
|
|
277
|
-
* Call this function for an optimal writing data passing the ByteBuffer
|
|
278
|
-
* already allocated
|
|
279
|
-
*/
|
|
280
|
-
export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
|
|
281
|
-
export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
248
|
/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
|
|
285
249
|
/**
|
|
286
250
|
* @public
|
|
@@ -453,22 +417,6 @@ export declare interface BaseComponent<T> {
|
|
|
453
417
|
* If the value is undefined, the component was deleted.
|
|
454
418
|
*/
|
|
455
419
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
456
|
-
/**
|
|
457
|
-
* @public
|
|
458
|
-
*
|
|
459
|
-
*/
|
|
460
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
461
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
462
|
-
/**
|
|
463
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
464
|
-
* @param entity - Entity to get the CRDT state for
|
|
465
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
466
|
-
* @public
|
|
467
|
-
*/
|
|
468
|
-
getCrdtState(entity: Entity): {
|
|
469
|
-
data: Uint8Array;
|
|
470
|
-
timestamp: number;
|
|
471
|
-
} | null;
|
|
472
420
|
}
|
|
473
421
|
|
|
474
422
|
/** @public */
|
|
@@ -1710,12 +1658,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1710
1658
|
/**
|
|
1711
1659
|
* @public
|
|
1712
1660
|
*/
|
|
1713
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1661
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1714
1662
|
|
|
1715
1663
|
/**
|
|
1716
1664
|
* @public
|
|
1717
1665
|
*/
|
|
1718
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1666
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1719
1667
|
|
|
1720
1668
|
/**
|
|
1721
1669
|
* Min length = 8 bytes
|
|
@@ -1770,8 +1718,7 @@ export declare enum CrdtMessageType {
|
|
|
1770
1718
|
PUT_COMPONENT_NETWORK = 5,
|
|
1771
1719
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1772
1720
|
DELETE_ENTITY_NETWORK = 7,
|
|
1773
|
-
|
|
1774
|
-
MAX_MESSAGE_TYPE = 9
|
|
1721
|
+
MAX_MESSAGE_TYPE = 8
|
|
1775
1722
|
}
|
|
1776
1723
|
|
|
1777
1724
|
/**
|
|
@@ -1779,8 +1726,6 @@ export declare enum CrdtMessageType {
|
|
|
1779
1726
|
*/
|
|
1780
1727
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1781
1728
|
|
|
1782
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1783
|
-
|
|
1784
1729
|
/**
|
|
1785
1730
|
* @public
|
|
1786
1731
|
*/
|
|
@@ -2237,8 +2182,10 @@ export declare type EventSystemOptions = {
|
|
|
2237
2182
|
maxDistance?: number;
|
|
2238
2183
|
showFeedback?: boolean;
|
|
2239
2184
|
showHighlight?: boolean;
|
|
2185
|
+
/** @deprecated use `maxDistance` instead (same semantics: distance from the player) */
|
|
2240
2186
|
maxPlayerDistance?: number;
|
|
2241
2187
|
priority?: number;
|
|
2188
|
+
maxCameraDistance?: number;
|
|
2242
2189
|
};
|
|
2243
2190
|
|
|
2244
2191
|
/**
|
|
@@ -2550,12 +2497,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2550
2497
|
|
|
2551
2498
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2552
2499
|
|
|
2553
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2554
|
-
|
|
2555
|
-
export declare interface ICreatedByType {
|
|
2556
|
-
address: string;
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
2500
|
/**
|
|
2560
2501
|
* @public
|
|
2561
2502
|
*/
|
|
@@ -3038,35 +2979,6 @@ export declare const enum InteractionType {
|
|
|
3038
2979
|
PROXIMITY = 1
|
|
3039
2980
|
}
|
|
3040
2981
|
|
|
3041
|
-
/**
|
|
3042
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
3043
|
-
* This is not exposed to users, only for internal SDK operations
|
|
3044
|
-
*/
|
|
3045
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
3046
|
-
/**
|
|
3047
|
-
* @public
|
|
3048
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
3049
|
-
*/
|
|
3050
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
3051
|
-
/**
|
|
3052
|
-
* @public
|
|
3053
|
-
* Get the iterator to every entity has the component
|
|
3054
|
-
*/
|
|
3055
|
-
iterator(): Iterable<[Entity, any]>;
|
|
3056
|
-
/**
|
|
3057
|
-
* @public
|
|
3058
|
-
*/
|
|
3059
|
-
dirtyIterator(): Iterable<Entity>;
|
|
3060
|
-
/**
|
|
3061
|
-
* @public
|
|
3062
|
-
*/
|
|
3063
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
3064
|
-
/**
|
|
3065
|
-
* @public
|
|
3066
|
-
*/
|
|
3067
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
3068
|
-
}
|
|
3069
|
-
|
|
3070
2982
|
/**
|
|
3071
2983
|
* @public
|
|
3072
2984
|
*/
|
|
@@ -6268,24 +6180,27 @@ export declare namespace PBPlayerIdentityData {
|
|
|
6268
6180
|
* --------------
|
|
6269
6181
|
* PointerEvents can enforce interaction range using two independent distance checks:
|
|
6270
6182
|
*
|
|
6271
|
-
* -
|
|
6272
|
-
* -
|
|
6183
|
+
* - Player distance (`max_distance`): distance from the avatar/player position to the target entity.
|
|
6184
|
+
* - Camera distance (`max_camera_distance`): distance from the active camera to the target entity.
|
|
6185
|
+
*
|
|
6186
|
+
* `max_player_distance` is deprecated: it is an alias for `max_distance` (both are player distance).
|
|
6187
|
+
* If both are present, the larger of the two is used as the player distance threshold.
|
|
6273
6188
|
*
|
|
6274
6189
|
* How the interaction checks are combined:
|
|
6275
6190
|
*
|
|
6276
6191
|
* 1) Only `max_distance` is present
|
|
6277
|
-
* - The interaction is allowed only if the
|
|
6192
|
+
* - The interaction is allowed only if the player distance is <= `max_distance`.
|
|
6278
6193
|
*
|
|
6279
|
-
* 2) Only `
|
|
6280
|
-
* - The interaction is allowed only if the
|
|
6194
|
+
* 2) Only `max_camera_distance` is present
|
|
6195
|
+
* - The interaction is allowed only if the camera distance is <= `max_camera_distance`.
|
|
6281
6196
|
*
|
|
6282
|
-
* 3) Both `max_distance` and `
|
|
6197
|
+
* 3) Both `max_distance` and `max_camera_distance` are present
|
|
6283
6198
|
* - The interaction is allowed if ANY of the checks passes (OR logic):
|
|
6284
|
-
* (
|
|
6199
|
+
* (player distance <= `max_distance`) OR (camera distance <= `max_camera_distance`).
|
|
6285
6200
|
*
|
|
6286
|
-
* 4) Neither `max_distance` nor `
|
|
6201
|
+
* 4) Neither `max_distance` nor `max_camera_distance` is present
|
|
6287
6202
|
* - The system behaves as if `max_distance` were set to its default value (10),
|
|
6288
|
-
* i.e., it uses the
|
|
6203
|
+
* i.e., it uses the player distance check with a threshold of 10.
|
|
6289
6204
|
*/
|
|
6290
6205
|
/**
|
|
6291
6206
|
* @public
|
|
@@ -6331,16 +6246,18 @@ export declare interface PBPointerEvents_Info {
|
|
|
6331
6246
|
button?: InputAction | undefined;
|
|
6332
6247
|
/** feedback on hover (default 'Interact') */
|
|
6333
6248
|
hoverText?: string | undefined;
|
|
6334
|
-
/** range of interaction (default 10) */
|
|
6249
|
+
/** range of interaction from the avatar's position (default 10) */
|
|
6335
6250
|
maxDistance?: number | undefined;
|
|
6336
6251
|
/** enable or disable hover text and highlight (default true) */
|
|
6337
6252
|
showFeedback?: boolean | undefined;
|
|
6338
6253
|
/** enable or disable hover highlight (default true) */
|
|
6339
6254
|
showHighlight?: boolean | undefined;
|
|
6340
|
-
/**
|
|
6255
|
+
/** @deprecated use `max_distance` instead (same semantics) */
|
|
6341
6256
|
maxPlayerDistance?: number | undefined;
|
|
6342
6257
|
/** resolution order when multiple events overlap, higher wins (default 0) */
|
|
6343
6258
|
priority?: number | undefined;
|
|
6259
|
+
/** range of interaction from the active camera's position (default none) */
|
|
6260
|
+
maxCameraDistance?: number | undefined;
|
|
6344
6261
|
}
|
|
6345
6262
|
|
|
6346
6263
|
/**
|
|
@@ -9480,16 +9397,6 @@ export declare type Transport = {
|
|
|
9480
9397
|
onmessage?(message: Uint8Array): void;
|
|
9481
9398
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
9482
9399
|
type?: string;
|
|
9483
|
-
/**
|
|
9484
|
-
* Whether this transport is allowed to mutate reserved-range entities
|
|
9485
|
-
* (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
|
|
9486
|
-
* Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
|
|
9487
|
-
* or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
|
|
9488
|
-
* AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
|
|
9489
|
-
* this flag (a comms peer, or any scene-added transport) is rejected — see
|
|
9490
|
-
* `receiveMessages`.
|
|
9491
|
-
*/
|
|
9492
|
-
allowReservedEntities?: boolean;
|
|
9493
9400
|
};
|
|
9494
9401
|
|
|
9495
9402
|
/**
|
|
@@ -10058,14 +9965,6 @@ export declare interface UiTransformProps {
|
|
|
10058
9965
|
*/
|
|
10059
9966
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10060
9967
|
|
|
10061
|
-
export declare type ValidateCallback<T> = (value: {
|
|
10062
|
-
entity: Entity;
|
|
10063
|
-
currentValue: T | undefined;
|
|
10064
|
-
newValue: T | undefined;
|
|
10065
|
-
senderAddress: string;
|
|
10066
|
-
createdBy: string;
|
|
10067
|
-
}) => boolean;
|
|
10068
|
-
|
|
10069
9968
|
/**
|
|
10070
9969
|
* @public
|
|
10071
9970
|
*/
|
package/dist/beta.d.ts
CHANGED
|
@@ -245,42 +245,6 @@ export declare interface AudioStreamComponentDefinitionExtended extends LastWrit
|
|
|
245
245
|
getAudioState(entity: Entity): PBAudioEvent | undefined;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
/**
|
|
249
|
-
* @public
|
|
250
|
-
*/
|
|
251
|
-
export declare type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Server authoritative message - identical to PutComponentMessageBody but with forced processing
|
|
255
|
-
* Min. length = header (8 bytes) + 16 bytes = 24 bytes
|
|
256
|
-
*
|
|
257
|
-
* @param entity - Uint32 number of the entity
|
|
258
|
-
* @param componentId - Uint32 number of id
|
|
259
|
-
* @param timestamp - Uint32 Lamport timestamp (server's authoritative timestamp)
|
|
260
|
-
* @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
|
|
261
|
-
* @public
|
|
262
|
-
*/
|
|
263
|
-
export declare type AuthoritativePutComponentMessageBody = {
|
|
264
|
-
type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
|
|
265
|
-
entityId: Entity;
|
|
266
|
-
componentId: number;
|
|
267
|
-
timestamp: number;
|
|
268
|
-
data: Uint8Array;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* @public
|
|
273
|
-
*/
|
|
274
|
-
export declare namespace AuthoritativePutComponentOperation {
|
|
275
|
-
const MESSAGE_HEADER_LENGTH = 16;
|
|
276
|
-
/**
|
|
277
|
-
* Call this function for an optimal writing data passing the ByteBuffer
|
|
278
|
-
* already allocated
|
|
279
|
-
*/
|
|
280
|
-
export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
|
|
281
|
-
export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
248
|
/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
|
|
285
249
|
/**
|
|
286
250
|
* @public
|
|
@@ -453,22 +417,6 @@ export declare interface BaseComponent<T> {
|
|
|
453
417
|
* If the value is undefined, the component was deleted.
|
|
454
418
|
*/
|
|
455
419
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
456
|
-
/**
|
|
457
|
-
* @public
|
|
458
|
-
*
|
|
459
|
-
*/
|
|
460
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
461
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
462
|
-
/**
|
|
463
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
464
|
-
* @param entity - Entity to get the CRDT state for
|
|
465
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
466
|
-
* @public
|
|
467
|
-
*/
|
|
468
|
-
getCrdtState(entity: Entity): {
|
|
469
|
-
data: Uint8Array;
|
|
470
|
-
timestamp: number;
|
|
471
|
-
} | null;
|
|
472
420
|
}
|
|
473
421
|
|
|
474
422
|
/** @public */
|
|
@@ -1710,12 +1658,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1710
1658
|
/**
|
|
1711
1659
|
* @public
|
|
1712
1660
|
*/
|
|
1713
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1661
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1714
1662
|
|
|
1715
1663
|
/**
|
|
1716
1664
|
* @public
|
|
1717
1665
|
*/
|
|
1718
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1666
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1719
1667
|
|
|
1720
1668
|
/**
|
|
1721
1669
|
* Min length = 8 bytes
|
|
@@ -1770,8 +1718,7 @@ export declare enum CrdtMessageType {
|
|
|
1770
1718
|
PUT_COMPONENT_NETWORK = 5,
|
|
1771
1719
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1772
1720
|
DELETE_ENTITY_NETWORK = 7,
|
|
1773
|
-
|
|
1774
|
-
MAX_MESSAGE_TYPE = 9
|
|
1721
|
+
MAX_MESSAGE_TYPE = 8
|
|
1775
1722
|
}
|
|
1776
1723
|
|
|
1777
1724
|
/**
|
|
@@ -1779,8 +1726,6 @@ export declare enum CrdtMessageType {
|
|
|
1779
1726
|
*/
|
|
1780
1727
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1781
1728
|
|
|
1782
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1783
|
-
|
|
1784
1729
|
/**
|
|
1785
1730
|
* @public
|
|
1786
1731
|
*/
|
|
@@ -2237,8 +2182,10 @@ export declare type EventSystemOptions = {
|
|
|
2237
2182
|
maxDistance?: number;
|
|
2238
2183
|
showFeedback?: boolean;
|
|
2239
2184
|
showHighlight?: boolean;
|
|
2185
|
+
/** @deprecated use `maxDistance` instead (same semantics: distance from the player) */
|
|
2240
2186
|
maxPlayerDistance?: number;
|
|
2241
2187
|
priority?: number;
|
|
2188
|
+
maxCameraDistance?: number;
|
|
2242
2189
|
};
|
|
2243
2190
|
|
|
2244
2191
|
/**
|
|
@@ -2550,12 +2497,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2550
2497
|
|
|
2551
2498
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2552
2499
|
|
|
2553
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2554
|
-
|
|
2555
|
-
export declare interface ICreatedByType {
|
|
2556
|
-
address: string;
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
2500
|
/**
|
|
2560
2501
|
* @public
|
|
2561
2502
|
*/
|
|
@@ -3029,35 +2970,6 @@ export declare const enum InteractionType {
|
|
|
3029
2970
|
PROXIMITY = 1
|
|
3030
2971
|
}
|
|
3031
2972
|
|
|
3032
|
-
/**
|
|
3033
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
3034
|
-
* This is not exposed to users, only for internal SDK operations
|
|
3035
|
-
*/
|
|
3036
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
3037
|
-
/**
|
|
3038
|
-
* @public
|
|
3039
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
3040
|
-
*/
|
|
3041
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
3042
|
-
/**
|
|
3043
|
-
* @public
|
|
3044
|
-
* Get the iterator to every entity has the component
|
|
3045
|
-
*/
|
|
3046
|
-
iterator(): Iterable<[Entity, any]>;
|
|
3047
|
-
/**
|
|
3048
|
-
* @public
|
|
3049
|
-
*/
|
|
3050
|
-
dirtyIterator(): Iterable<Entity>;
|
|
3051
|
-
/**
|
|
3052
|
-
* @public
|
|
3053
|
-
*/
|
|
3054
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
3055
|
-
/**
|
|
3056
|
-
* @public
|
|
3057
|
-
*/
|
|
3058
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
3059
|
-
}
|
|
3060
|
-
|
|
3061
2973
|
/**
|
|
3062
2974
|
* @public
|
|
3063
2975
|
*/
|
|
@@ -6240,24 +6152,27 @@ export declare namespace PBPlayerIdentityData {
|
|
|
6240
6152
|
* --------------
|
|
6241
6153
|
* PointerEvents can enforce interaction range using two independent distance checks:
|
|
6242
6154
|
*
|
|
6243
|
-
* -
|
|
6244
|
-
* -
|
|
6155
|
+
* - Player distance (`max_distance`): distance from the avatar/player position to the target entity.
|
|
6156
|
+
* - Camera distance (`max_camera_distance`): distance from the active camera to the target entity.
|
|
6157
|
+
*
|
|
6158
|
+
* `max_player_distance` is deprecated: it is an alias for `max_distance` (both are player distance).
|
|
6159
|
+
* If both are present, the larger of the two is used as the player distance threshold.
|
|
6245
6160
|
*
|
|
6246
6161
|
* How the interaction checks are combined:
|
|
6247
6162
|
*
|
|
6248
6163
|
* 1) Only `max_distance` is present
|
|
6249
|
-
* - The interaction is allowed only if the
|
|
6164
|
+
* - The interaction is allowed only if the player distance is <= `max_distance`.
|
|
6250
6165
|
*
|
|
6251
|
-
* 2) Only `
|
|
6252
|
-
* - The interaction is allowed only if the
|
|
6166
|
+
* 2) Only `max_camera_distance` is present
|
|
6167
|
+
* - The interaction is allowed only if the camera distance is <= `max_camera_distance`.
|
|
6253
6168
|
*
|
|
6254
|
-
* 3) Both `max_distance` and `
|
|
6169
|
+
* 3) Both `max_distance` and `max_camera_distance` are present
|
|
6255
6170
|
* - The interaction is allowed if ANY of the checks passes (OR logic):
|
|
6256
|
-
* (
|
|
6171
|
+
* (player distance <= `max_distance`) OR (camera distance <= `max_camera_distance`).
|
|
6257
6172
|
*
|
|
6258
|
-
* 4) Neither `max_distance` nor `
|
|
6173
|
+
* 4) Neither `max_distance` nor `max_camera_distance` is present
|
|
6259
6174
|
* - The system behaves as if `max_distance` were set to its default value (10),
|
|
6260
|
-
* i.e., it uses the
|
|
6175
|
+
* i.e., it uses the player distance check with a threshold of 10.
|
|
6261
6176
|
*/
|
|
6262
6177
|
/**
|
|
6263
6178
|
* @public
|
|
@@ -6303,16 +6218,18 @@ export declare interface PBPointerEvents_Info {
|
|
|
6303
6218
|
button?: InputAction | undefined;
|
|
6304
6219
|
/** feedback on hover (default 'Interact') */
|
|
6305
6220
|
hoverText?: string | undefined;
|
|
6306
|
-
/** range of interaction (default 10) */
|
|
6221
|
+
/** range of interaction from the avatar's position (default 10) */
|
|
6307
6222
|
maxDistance?: number | undefined;
|
|
6308
6223
|
/** enable or disable hover text and highlight (default true) */
|
|
6309
6224
|
showFeedback?: boolean | undefined;
|
|
6310
6225
|
/** enable or disable hover highlight (default true) */
|
|
6311
6226
|
showHighlight?: boolean | undefined;
|
|
6312
|
-
/**
|
|
6227
|
+
/** @deprecated use `max_distance` instead (same semantics) */
|
|
6313
6228
|
maxPlayerDistance?: number | undefined;
|
|
6314
6229
|
/** resolution order when multiple events overlap, higher wins (default 0) */
|
|
6315
6230
|
priority?: number | undefined;
|
|
6231
|
+
/** range of interaction from the active camera's position (default none) */
|
|
6232
|
+
maxCameraDistance?: number | undefined;
|
|
6316
6233
|
}
|
|
6317
6234
|
|
|
6318
6235
|
/**
|
|
@@ -9447,16 +9364,6 @@ export declare type Transport = {
|
|
|
9447
9364
|
onmessage?(message: Uint8Array): void;
|
|
9448
9365
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
9449
9366
|
type?: string;
|
|
9450
|
-
/**
|
|
9451
|
-
* Whether this transport is allowed to mutate reserved-range entities
|
|
9452
|
-
* (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
|
|
9453
|
-
* Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
|
|
9454
|
-
* or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
|
|
9455
|
-
* AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
|
|
9456
|
-
* this flag (a comms peer, or any scene-added transport) is rejected — see
|
|
9457
|
-
* `receiveMessages`.
|
|
9458
|
-
*/
|
|
9459
|
-
allowReservedEntities?: boolean;
|
|
9460
9367
|
};
|
|
9461
9368
|
|
|
9462
9369
|
/**
|
|
@@ -10025,14 +9932,6 @@ export declare interface UiTransformProps {
|
|
|
10025
9932
|
*/
|
|
10026
9933
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10027
9934
|
|
|
10028
|
-
export declare type ValidateCallback<T> = (value: {
|
|
10029
|
-
entity: Entity;
|
|
10030
|
-
currentValue: T | undefined;
|
|
10031
|
-
newValue: T | undefined;
|
|
10032
|
-
senderAddress: string;
|
|
10033
|
-
createdBy: string;
|
|
10034
|
-
}) => boolean;
|
|
10035
|
-
|
|
10036
9935
|
/**
|
|
10037
9936
|
* @public
|
|
10038
9937
|
*/
|