@dcl/playground-assets 7.20.2-22104870534.commit-0df3cc0 → 7.20.2-22169778016.commit-030cbfe
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 +102 -137
- package/dist/beta.d.ts +102 -137
- package/dist/index.bundled.d.ts +102 -137
- package/dist/index.js +7 -7
- package/dist/index.js.map +4 -4
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +102 -137
- package/dist/tsdoc-metadata.json +1 -1
- package/etc/playground-assets.api.json +2092 -2529
- package/etc/playground-assets.api.md +79 -94
- package/package.json +6 -5
package/dist/index.bundled.d.ts
CHANGED
|
@@ -115,61 +115,6 @@ export declare const assetLoadLoadingStateSystem: AssetLoadLoadingStateSystem;
|
|
|
115
115
|
*/
|
|
116
116
|
export declare type AssetLoadLoadingStateSystemCallback = (event: DeepReadonlyObject<PBAssetLoadLoadingState>) => void;
|
|
117
117
|
|
|
118
|
-
export declare const AudioAnalysis: AudioAnalysisComponentDefinitionExtended;
|
|
119
|
-
|
|
120
|
-
export declare interface AudioAnalysisComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAudioAnalysis> {
|
|
121
|
-
/**
|
|
122
|
-
* Reads the component data of `entity` into the provided `out` view.
|
|
123
|
-
*
|
|
124
|
-
* @throws Error if the entity does not have an AudioAnalysis component.
|
|
125
|
-
* @param entity - The entity whose AudioAnalysis data will be read.
|
|
126
|
-
* @param out - An existing AudioAnalysisView to populate with the latest values.
|
|
127
|
-
*/
|
|
128
|
-
readIntoView(entity: Entity, out: AudioAnalysisView): void;
|
|
129
|
-
/**
|
|
130
|
-
* Attempts to read the component data of `entity` into the provided `out` view.
|
|
131
|
-
*
|
|
132
|
-
* @returns `true` if the component exists and data was written into `out`,
|
|
133
|
-
* `false` if the entity does not have an AudioAnalysis component.
|
|
134
|
-
* @param entity - The entity whose AudioAnalysis data will be read.
|
|
135
|
-
* @param out - An existing AudioAnalysisView to populate.
|
|
136
|
-
*/
|
|
137
|
-
tryReadIntoView(entity: Entity, out: AudioAnalysisView): boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Creates an AudioAnalysis component for the given `entity`.
|
|
140
|
-
*
|
|
141
|
-
* If a component already exists on the entity, this call fails (does not replace).
|
|
142
|
-
*
|
|
143
|
-
* @param entity - The entity to attach the component to.
|
|
144
|
-
* @param mode - Analysis mode. Defaults to `PBAudioAnalysisMode.MODE_LOGARITHMIC`.
|
|
145
|
-
* @param amplitudeGain - Optional amplitude gain multiplier.
|
|
146
|
-
* @param bandsGain - Optional gain multiplier applied to all frequency bands.
|
|
147
|
-
*/
|
|
148
|
-
createAudioAnalysis(entity: Entity, mode?: PBAudioAnalysisMode, // default is PBAudioAnalysisMode.MODE_LOGARITHMIC
|
|
149
|
-
amplitudeGain?: number, bandsGain?: number): void;
|
|
150
|
-
/**
|
|
151
|
-
* Creates the AudioAnalysis component if missing, or replaces the existing one.
|
|
152
|
-
*
|
|
153
|
-
* @param entity - The target entity.
|
|
154
|
-
* @param mode - Analysis mode. Defaults to `PBAudioAnalysisMode.MODE_LOGARITHMIC`.
|
|
155
|
-
* @param amplitudeGain - Optional amplitude gain multiplier.
|
|
156
|
-
* @param bandsGain - Optional gain multiplier applied to the frequency bands.
|
|
157
|
-
*/
|
|
158
|
-
createOrReplaceAudioAnalysis(entity: Entity, mode?: PBAudioAnalysisMode, // default is PBAudioAnalysisMode.MODE_LOGARITHMIC
|
|
159
|
-
amplitudeGain?: number, bandsGain?: number): void;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* A read-only JavaScript-friendly view of AudioAnalysis ECS data.
|
|
164
|
-
*
|
|
165
|
-
* `amplitude` represents the aggregated signal strength.
|
|
166
|
-
* `bands` represents the processed frequency bands.
|
|
167
|
-
*/
|
|
168
|
-
export declare type AudioAnalysisView = {
|
|
169
|
-
amplitude: number;
|
|
170
|
-
bands: number[];
|
|
171
|
-
};
|
|
172
|
-
|
|
173
118
|
/** @public */
|
|
174
119
|
export declare const AudioEvent: GrowOnlyValueSetComponentDefinition<PBAudioEvent>;
|
|
175
120
|
|
|
@@ -218,6 +163,42 @@ export declare interface AudioStreamComponentDefinitionExtended extends LastWrit
|
|
|
218
163
|
getAudioState(entity: Entity): PBAudioEvent | undefined;
|
|
219
164
|
}
|
|
220
165
|
|
|
166
|
+
/**
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
169
|
+
export declare type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Server authoritative message - identical to PutComponentMessageBody but with forced processing
|
|
173
|
+
* Min. length = header (8 bytes) + 16 bytes = 24 bytes
|
|
174
|
+
*
|
|
175
|
+
* @param entity - Uint32 number of the entity
|
|
176
|
+
* @param componentId - Uint32 number of id
|
|
177
|
+
* @param timestamp - Uint32 Lamport timestamp (server's authoritative timestamp)
|
|
178
|
+
* @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
181
|
+
export declare type AuthoritativePutComponentMessageBody = {
|
|
182
|
+
type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
|
|
183
|
+
entityId: Entity;
|
|
184
|
+
componentId: number;
|
|
185
|
+
timestamp: number;
|
|
186
|
+
data: Uint8Array;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
export declare namespace AuthoritativePutComponentOperation {
|
|
193
|
+
const MESSAGE_HEADER_LENGTH = 16;
|
|
194
|
+
/**
|
|
195
|
+
* Call this function for an optimal writing data passing the ByteBuffer
|
|
196
|
+
* already allocated
|
|
197
|
+
*/
|
|
198
|
+
export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
|
|
199
|
+
export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
|
|
200
|
+
}
|
|
201
|
+
|
|
221
202
|
/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
|
|
222
203
|
/**
|
|
223
204
|
* @public
|
|
@@ -264,9 +245,6 @@ export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBA
|
|
|
264
245
|
/** @public */
|
|
265
246
|
export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
|
|
266
247
|
|
|
267
|
-
/** @public */
|
|
268
|
-
export declare const AvatarLocomotionSettings: LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>;
|
|
269
|
-
|
|
270
248
|
/** @public */
|
|
271
249
|
export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
|
|
272
250
|
|
|
@@ -380,6 +358,22 @@ export declare interface BaseComponent<T> {
|
|
|
380
358
|
* If the value is undefined, the component was deleted.
|
|
381
359
|
*/
|
|
382
360
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
361
|
+
/**
|
|
362
|
+
* @public
|
|
363
|
+
*
|
|
364
|
+
*/
|
|
365
|
+
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
366
|
+
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
367
|
+
/**
|
|
368
|
+
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
369
|
+
* @param entity - Entity to get the CRDT state for
|
|
370
|
+
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
371
|
+
* @public
|
|
372
|
+
*/
|
|
373
|
+
getCrdtState(entity: Entity): {
|
|
374
|
+
data: Uint8Array;
|
|
375
|
+
timestamp: number;
|
|
376
|
+
} | null;
|
|
383
377
|
}
|
|
384
378
|
|
|
385
379
|
/** @public */
|
|
@@ -1379,7 +1373,6 @@ export declare const componentDefinitionByName: {
|
|
|
1379
1373
|
"core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
|
|
1380
1374
|
"core::AssetLoad": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAssetLoad>>;
|
|
1381
1375
|
"core::AssetLoadLoadingState": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAssetLoadLoadingState>>;
|
|
1382
|
-
"core::AudioAnalysis": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>>;
|
|
1383
1376
|
"core::AudioEvent": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAudioEvent>>;
|
|
1384
1377
|
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
1385
1378
|
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
@@ -1387,7 +1380,6 @@ export declare const componentDefinitionByName: {
|
|
|
1387
1380
|
"core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
|
1388
1381
|
"core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
|
|
1389
1382
|
"core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
|
1390
|
-
"core::AvatarLocomotionSettings": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
|
|
1391
1383
|
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
1392
1384
|
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
1393
1385
|
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
@@ -1590,12 +1582,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1590
1582
|
/**
|
|
1591
1583
|
* @public
|
|
1592
1584
|
*/
|
|
1593
|
-
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1585
|
+
export declare type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1594
1586
|
|
|
1595
1587
|
/**
|
|
1596
1588
|
* @public
|
|
1597
1589
|
*/
|
|
1598
|
-
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1590
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1599
1591
|
|
|
1600
1592
|
/**
|
|
1601
1593
|
* Min length = 8 bytes
|
|
@@ -1650,7 +1642,8 @@ export declare enum CrdtMessageType {
|
|
|
1650
1642
|
PUT_COMPONENT_NETWORK = 5,
|
|
1651
1643
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1652
1644
|
DELETE_ENTITY_NETWORK = 7,
|
|
1653
|
-
|
|
1645
|
+
AUTHORITATIVE_PUT_COMPONENT = 8,
|
|
1646
|
+
MAX_MESSAGE_TYPE = 9
|
|
1654
1647
|
}
|
|
1655
1648
|
|
|
1656
1649
|
/**
|
|
@@ -1658,6 +1651,8 @@ export declare enum CrdtMessageType {
|
|
|
1658
1651
|
*/
|
|
1659
1652
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1660
1653
|
|
|
1654
|
+
export declare const CreatedBy: ICreatedBy;
|
|
1655
|
+
|
|
1661
1656
|
/**
|
|
1662
1657
|
* @public
|
|
1663
1658
|
*/
|
|
@@ -2350,6 +2345,12 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2350
2345
|
|
|
2351
2346
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2352
2347
|
|
|
2348
|
+
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2349
|
+
|
|
2350
|
+
export declare interface ICreatedByType {
|
|
2351
|
+
address: string;
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2353
2354
|
/**
|
|
2354
2355
|
* @public
|
|
2355
2356
|
*/
|
|
@@ -2736,8 +2737,7 @@ export declare const enum InputAction {
|
|
|
2736
2737
|
IA_ACTION_3 = 10,
|
|
2737
2738
|
IA_ACTION_4 = 11,
|
|
2738
2739
|
IA_ACTION_5 = 12,
|
|
2739
|
-
IA_ACTION_6 = 13
|
|
2740
|
-
IA_MODIFIER = 14
|
|
2740
|
+
IA_ACTION_6 = 13
|
|
2741
2741
|
}
|
|
2742
2742
|
|
|
2743
2743
|
export declare const InputModifier: InputModifierComponentDefinitionExtended;
|
|
@@ -2785,6 +2785,35 @@ export declare type InstanceCompositeOptions = {
|
|
|
2785
2785
|
alreadyRequestedSrc?: Set<string>;
|
|
2786
2786
|
};
|
|
2787
2787
|
|
|
2788
|
+
/**
|
|
2789
|
+
* Internal component interface that exposes all internal methods for SDK use
|
|
2790
|
+
* This is not exposed to users, only for internal SDK operations
|
|
2791
|
+
*/
|
|
2792
|
+
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
2793
|
+
/**
|
|
2794
|
+
* @public
|
|
2795
|
+
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
2796
|
+
*/
|
|
2797
|
+
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
2798
|
+
/**
|
|
2799
|
+
* @public
|
|
2800
|
+
* Get the iterator to every entity has the component
|
|
2801
|
+
*/
|
|
2802
|
+
iterator(): Iterable<[Entity, any]>;
|
|
2803
|
+
/**
|
|
2804
|
+
* @public
|
|
2805
|
+
*/
|
|
2806
|
+
dirtyIterator(): Iterable<Entity>;
|
|
2807
|
+
/**
|
|
2808
|
+
* @public
|
|
2809
|
+
*/
|
|
2810
|
+
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
2811
|
+
/**
|
|
2812
|
+
* @public
|
|
2813
|
+
*/
|
|
2814
|
+
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2788
2817
|
/**
|
|
2789
2818
|
* @public
|
|
2790
2819
|
*/
|
|
@@ -4422,45 +4451,6 @@ export declare namespace PBAssetLoadLoadingState {
|
|
|
4422
4451
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAssetLoadLoadingState;
|
|
4423
4452
|
}
|
|
4424
4453
|
|
|
4425
|
-
/**
|
|
4426
|
-
* @public
|
|
4427
|
-
*/
|
|
4428
|
-
export declare interface PBAudioAnalysis {
|
|
4429
|
-
/** Parameters section */
|
|
4430
|
-
mode: PBAudioAnalysisMode;
|
|
4431
|
-
/** Used only when mode == MODE_LOGARITHMIC */
|
|
4432
|
-
amplitudeGain?: number | undefined;
|
|
4433
|
-
/** End when mode == MODE_LOGARITHMIC */
|
|
4434
|
-
bandsGain?: number | undefined;
|
|
4435
|
-
/** Result section */
|
|
4436
|
-
amplitude: number;
|
|
4437
|
-
/** Protobuf doesn't support fixed arrays -> 8 band fields */
|
|
4438
|
-
band0: number;
|
|
4439
|
-
band1: number;
|
|
4440
|
-
band2: number;
|
|
4441
|
-
band3: number;
|
|
4442
|
-
band4: number;
|
|
4443
|
-
band5: number;
|
|
4444
|
-
band6: number;
|
|
4445
|
-
band7: number;
|
|
4446
|
-
}
|
|
4447
|
-
|
|
4448
|
-
/**
|
|
4449
|
-
* @public
|
|
4450
|
-
*/
|
|
4451
|
-
export declare namespace PBAudioAnalysis {
|
|
4452
|
-
export function encode(message: PBAudioAnalysis, writer?: _m0.Writer): _m0.Writer;
|
|
4453
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioAnalysis;
|
|
4454
|
-
}
|
|
4455
|
-
|
|
4456
|
-
/**
|
|
4457
|
-
* @public
|
|
4458
|
-
*/
|
|
4459
|
-
export declare const enum PBAudioAnalysisMode {
|
|
4460
|
-
MODE_RAW = 0,
|
|
4461
|
-
MODE_LOGARITHMIC = 1
|
|
4462
|
-
}
|
|
4463
|
-
|
|
4464
4454
|
/**
|
|
4465
4455
|
* @public
|
|
4466
4456
|
*/
|
|
@@ -4650,36 +4640,6 @@ export declare namespace PBAvatarEquippedData {
|
|
|
4650
4640
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
|
|
4651
4641
|
}
|
|
4652
4642
|
|
|
4653
|
-
/**
|
|
4654
|
-
* The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
|
|
4655
|
-
* as the avatar movement speed, jump height etc.
|
|
4656
|
-
*/
|
|
4657
|
-
/**
|
|
4658
|
-
* @public
|
|
4659
|
-
*/
|
|
4660
|
-
export declare interface PBAvatarLocomotionSettings {
|
|
4661
|
-
/** Maximum speed when walking (in meters per second) */
|
|
4662
|
-
walkSpeed?: number | undefined;
|
|
4663
|
-
/** Maximum speed when jogging (in meters per second) */
|
|
4664
|
-
jogSpeed?: number | undefined;
|
|
4665
|
-
/** Maximum speed when running (in meters per second) */
|
|
4666
|
-
runSpeed?: number | undefined;
|
|
4667
|
-
/** Height of a regular jump (in meters) */
|
|
4668
|
-
jumpHeight?: number | undefined;
|
|
4669
|
-
/** Height of a jump while running (in meters) */
|
|
4670
|
-
runJumpHeight?: number | undefined;
|
|
4671
|
-
/** Cooldown time after a hard landing before the avatar can move again (in seconds) */
|
|
4672
|
-
hardLandingCooldown?: number | undefined;
|
|
4673
|
-
}
|
|
4674
|
-
|
|
4675
|
-
/**
|
|
4676
|
-
* @public
|
|
4677
|
-
*/
|
|
4678
|
-
export declare namespace PBAvatarLocomotionSettings {
|
|
4679
|
-
export function encode(message: PBAvatarLocomotionSettings, writer?: _m0.Writer): _m0.Writer;
|
|
4680
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings;
|
|
4681
|
-
}
|
|
4682
|
-
|
|
4683
4643
|
/**
|
|
4684
4644
|
* The AvatarModifierArea component can be attached to an Entity to define a region of space where
|
|
4685
4645
|
* avatar behavior changes.
|
|
@@ -6431,7 +6391,6 @@ export declare namespace PBVideoPlayer {
|
|
|
6431
6391
|
* an 'instant' transition (like using speed/time = 0)
|
|
6432
6392
|
* * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
|
|
6433
6393
|
* the holding entity transform).
|
|
6434
|
-
* * The fov defines the Field of View of the virtual camera
|
|
6435
6394
|
*/
|
|
6436
6395
|
/**
|
|
6437
6396
|
* @public
|
|
@@ -6439,8 +6398,6 @@ export declare namespace PBVideoPlayer {
|
|
|
6439
6398
|
export declare interface PBVirtualCamera {
|
|
6440
6399
|
defaultTransition?: CameraTransition | undefined;
|
|
6441
6400
|
lookAtEntity?: number | undefined;
|
|
6442
|
-
/** default: 60 */
|
|
6443
|
-
fov?: number | undefined;
|
|
6444
6401
|
}
|
|
6445
6402
|
|
|
6446
6403
|
/**
|
|
@@ -8804,6 +8761,14 @@ export declare interface UiTransformProps {
|
|
|
8804
8761
|
*/
|
|
8805
8762
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
8806
8763
|
|
|
8764
|
+
export declare type ValidateCallback<T> = (value: {
|
|
8765
|
+
entity: Entity;
|
|
8766
|
+
currentValue: T | undefined;
|
|
8767
|
+
newValue: T | undefined;
|
|
8768
|
+
senderAddress: string;
|
|
8769
|
+
createdBy: string;
|
|
8770
|
+
}) => boolean;
|
|
8771
|
+
|
|
8807
8772
|
/**
|
|
8808
8773
|
* @public
|
|
8809
8774
|
*/
|