@dcl/playground-assets 7.22.5-24836126953.commit-ddc8da1 → 7.22.5
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 +511 -98
- package/dist/beta.d.ts +511 -98
- package/dist/index.bundled.d.ts +511 -98
- package/dist/index.js +9 -9
- package/dist/playground/sdk/apis.d.ts +5 -0
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground/snippets/pointer-events.ts +14 -7
- package/dist/playground-assets.d.ts +511 -98
- package/etc/playground-assets.api.json +10304 -5956
- package/etc/playground-assets.api.md +307 -75
- package/package.json +5 -6
- package/dist/index.js.map +0 -8
package/dist/alpha.d.ts
CHANGED
|
@@ -163,42 +163,6 @@ export declare interface AudioStreamComponentDefinitionExtended extends LastWrit
|
|
|
163
163
|
getAudioState(entity: Entity): PBAudioEvent | undefined;
|
|
164
164
|
}
|
|
165
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
|
-
|
|
202
166
|
/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
|
|
203
167
|
/**
|
|
204
168
|
* @public
|
|
@@ -358,22 +322,6 @@ export declare interface BaseComponent<T> {
|
|
|
358
322
|
* If the value is undefined, the component was deleted.
|
|
359
323
|
*/
|
|
360
324
|
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;
|
|
377
325
|
}
|
|
378
326
|
|
|
379
327
|
/** @public */
|
|
@@ -1340,6 +1288,23 @@ export declare type Color4Type = {
|
|
|
1340
1288
|
a: number;
|
|
1341
1289
|
};
|
|
1342
1290
|
|
|
1291
|
+
/** A range of Color4 values. Randomized or lerped between start and end. */
|
|
1292
|
+
/**
|
|
1293
|
+
* @public
|
|
1294
|
+
*/
|
|
1295
|
+
export declare interface ColorRange {
|
|
1296
|
+
start: PBColor4 | undefined;
|
|
1297
|
+
end: PBColor4 | undefined;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* @public
|
|
1302
|
+
*/
|
|
1303
|
+
export declare namespace ColorRange {
|
|
1304
|
+
export function encode(message: ColorRange, writer?: _m0.Writer): _m0.Writer;
|
|
1305
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): ColorRange;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1343
1308
|
/**
|
|
1344
1309
|
* @public
|
|
1345
1310
|
*/
|
|
@@ -1396,6 +1361,7 @@ export declare const componentDefinitionByName: {
|
|
|
1396
1361
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
1397
1362
|
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
1398
1363
|
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
|
1364
|
+
"core::ParticleSystem": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBParticleSystem>>;
|
|
1399
1365
|
"core::PhysicsCombinedForce": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>>;
|
|
1400
1366
|
"core::PhysicsCombinedImpulse": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>>;
|
|
1401
1367
|
"core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
|
|
@@ -1584,12 +1550,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1584
1550
|
/**
|
|
1585
1551
|
* @public
|
|
1586
1552
|
*/
|
|
1587
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1553
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1588
1554
|
|
|
1589
1555
|
/**
|
|
1590
1556
|
* @public
|
|
1591
1557
|
*/
|
|
1592
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1558
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1593
1559
|
|
|
1594
1560
|
/**
|
|
1595
1561
|
* Min length = 8 bytes
|
|
@@ -1644,8 +1610,7 @@ export declare enum CrdtMessageType {
|
|
|
1644
1610
|
PUT_COMPONENT_NETWORK = 5,
|
|
1645
1611
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1646
1612
|
DELETE_ENTITY_NETWORK = 7,
|
|
1647
|
-
|
|
1648
|
-
MAX_MESSAGE_TYPE = 9
|
|
1613
|
+
MAX_MESSAGE_TYPE = 8
|
|
1649
1614
|
}
|
|
1650
1615
|
|
|
1651
1616
|
/**
|
|
@@ -1653,8 +1618,6 @@ export declare enum CrdtMessageType {
|
|
|
1653
1618
|
*/
|
|
1654
1619
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1655
1620
|
|
|
1656
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1657
|
-
|
|
1658
1621
|
/**
|
|
1659
1622
|
* @public
|
|
1660
1623
|
*/
|
|
@@ -2089,6 +2052,7 @@ export declare type EventSystemOptions = {
|
|
|
2089
2052
|
showFeedback?: boolean;
|
|
2090
2053
|
showHighlight?: boolean;
|
|
2091
2054
|
maxPlayerDistance?: number;
|
|
2055
|
+
priority?: number;
|
|
2092
2056
|
};
|
|
2093
2057
|
|
|
2094
2058
|
/**
|
|
@@ -2202,6 +2166,23 @@ export declare type FlexWrapType = 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
|
2202
2166
|
/** @public */
|
|
2203
2167
|
export declare type FloatArray = number[];
|
|
2204
2168
|
|
|
2169
|
+
/** A range of float values. Randomized or lerped between start and end. */
|
|
2170
|
+
/**
|
|
2171
|
+
* @public
|
|
2172
|
+
*/
|
|
2173
|
+
export declare interface FloatRange {
|
|
2174
|
+
start: number;
|
|
2175
|
+
end: number;
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* @public
|
|
2180
|
+
*/
|
|
2181
|
+
export declare namespace FloatRange {
|
|
2182
|
+
export function encode(message: FloatRange, writer?: _m0.Writer): _m0.Writer;
|
|
2183
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): FloatRange;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2205
2186
|
/**
|
|
2206
2187
|
* @public
|
|
2207
2188
|
*/
|
|
@@ -2356,12 +2337,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2356
2337
|
|
|
2357
2338
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2358
2339
|
|
|
2359
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2360
|
-
|
|
2361
|
-
export declare interface ICreatedByType {
|
|
2362
|
-
address: string;
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
2340
|
/**
|
|
2366
2341
|
* @public
|
|
2367
2342
|
*/
|
|
@@ -2806,32 +2781,11 @@ export declare type InstanceCompositeOptions = {
|
|
|
2806
2781
|
};
|
|
2807
2782
|
|
|
2808
2783
|
/**
|
|
2809
|
-
*
|
|
2810
|
-
* This is not exposed to users, only for internal SDK operations
|
|
2784
|
+
* @public
|
|
2811
2785
|
*/
|
|
2812
|
-
export declare
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
2816
|
-
*/
|
|
2817
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
2818
|
-
/**
|
|
2819
|
-
* @public
|
|
2820
|
-
* Get the iterator to every entity has the component
|
|
2821
|
-
*/
|
|
2822
|
-
iterator(): Iterable<[Entity, any]>;
|
|
2823
|
-
/**
|
|
2824
|
-
* @public
|
|
2825
|
-
*/
|
|
2826
|
-
dirtyIterator(): Iterable<Entity>;
|
|
2827
|
-
/**
|
|
2828
|
-
* @public
|
|
2829
|
-
*/
|
|
2830
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
2831
|
-
/**
|
|
2832
|
-
* @public
|
|
2833
|
-
*/
|
|
2834
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
2786
|
+
export declare const enum InteractionType {
|
|
2787
|
+
CURSOR = 0,
|
|
2788
|
+
PROXIMITY = 1
|
|
2835
2789
|
}
|
|
2836
2790
|
|
|
2837
2791
|
/**
|
|
@@ -2912,6 +2866,19 @@ export declare type JustifyType = 'flex-start' | 'center' | 'flex-end' | 'space-
|
|
|
2912
2866
|
*/
|
|
2913
2867
|
export declare type Key = number | string;
|
|
2914
2868
|
|
|
2869
|
+
/**
|
|
2870
|
+
* @public
|
|
2871
|
+
* Falloff mode for knockback force over distance.
|
|
2872
|
+
*/
|
|
2873
|
+
export declare enum KnockbackFalloff {
|
|
2874
|
+
/** Same force at any distance within radius */
|
|
2875
|
+
CONSTANT = 0,
|
|
2876
|
+
/** Smooth linear decrease to 0 at radius edge: F = magnitude * (1 - distance / radius) */
|
|
2877
|
+
LINEAR = 1,
|
|
2878
|
+
/** Sharp drop-off, physically realistic: F = magnitude / (distance^2 + 1) */
|
|
2879
|
+
INVERSE_SQUARE = 2
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2915
2882
|
/**
|
|
2916
2883
|
*
|
|
2917
2884
|
* @public
|
|
@@ -4441,6 +4408,30 @@ export declare const onVideoEvent: Observable<{
|
|
|
4441
4408
|
*/
|
|
4442
4409
|
export declare type OverflowType = 'hidden' | 'scroll' | 'visible';
|
|
4443
4410
|
|
|
4411
|
+
export declare const ParticleSystem: ParticleSystemComponentDefinitionExtended;
|
|
4412
|
+
|
|
4413
|
+
/**
|
|
4414
|
+
* @public
|
|
4415
|
+
*/
|
|
4416
|
+
export declare interface ParticleSystemComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBParticleSystem> {
|
|
4417
|
+
/** Helpers for constructing emitter shapes */
|
|
4418
|
+
Shape: ParticleSystemHelper;
|
|
4419
|
+
}
|
|
4420
|
+
|
|
4421
|
+
/**
|
|
4422
|
+
* @public
|
|
4423
|
+
*/
|
|
4424
|
+
export declare interface ParticleSystemHelper {
|
|
4425
|
+
/** Emit from a single point */
|
|
4426
|
+
Point: (point?: PBParticleSystem_Point) => PBParticleSystem['shape'];
|
|
4427
|
+
/** Emit from the surface or volume of a sphere */
|
|
4428
|
+
Sphere: (sphere?: PBParticleSystem_Sphere) => PBParticleSystem['shape'];
|
|
4429
|
+
/** Emit from the base of a cone, projecting outward */
|
|
4430
|
+
Cone: (cone?: PBParticleSystem_Cone) => PBParticleSystem['shape'];
|
|
4431
|
+
/** Emit from the surface or volume of a box */
|
|
4432
|
+
Box: (box?: PBParticleSystem_Box) => PBParticleSystem['shape'];
|
|
4433
|
+
}
|
|
4434
|
+
|
|
4444
4435
|
/** AnimationState indicates the status and configuration of one available animation. */
|
|
4445
4436
|
/**
|
|
4446
4437
|
* @public
|
|
@@ -5492,6 +5483,267 @@ export declare namespace PBNftShape {
|
|
|
5492
5483
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBNftShape;
|
|
5493
5484
|
}
|
|
5494
5485
|
|
|
5486
|
+
/**
|
|
5487
|
+
* @public
|
|
5488
|
+
*/
|
|
5489
|
+
export declare interface PBParticleSystem {
|
|
5490
|
+
/** --- Emission --- */
|
|
5491
|
+
active?: boolean | undefined;
|
|
5492
|
+
/** default = 10. Particles emitted per second. */
|
|
5493
|
+
rate?: number | undefined;
|
|
5494
|
+
/** default = 1000. Maximum number of live particles. */
|
|
5495
|
+
maxParticles?: number | undefined;
|
|
5496
|
+
/** default = 5. Particle lifetime in seconds. */
|
|
5497
|
+
lifetime?: number | undefined;
|
|
5498
|
+
/** --- Motion --- */
|
|
5499
|
+
gravity?: number | undefined;
|
|
5500
|
+
/** Constant force vector applied to each particle (world space). */
|
|
5501
|
+
additionalForce?: PBVector3 | undefined;
|
|
5502
|
+
/** --- Size --- */
|
|
5503
|
+
initialSize?: FloatRange | undefined;
|
|
5504
|
+
/** default = {1, 1}. Particle size lerped from start to end over its lifetime. */
|
|
5505
|
+
sizeOverTime?: FloatRange | undefined;
|
|
5506
|
+
/** --- Rotation --- */
|
|
5507
|
+
initialRotation?: PBQuaternion | undefined;
|
|
5508
|
+
/** default = identity (0,0,0,1). Per-axis angular velocity as quaternion; converted to Euler XYZ. */
|
|
5509
|
+
rotationOverTime?: PBQuaternion | undefined;
|
|
5510
|
+
/** default = false. Particles orient along their velocity direction. */
|
|
5511
|
+
faceTravelDirection?: boolean | undefined;
|
|
5512
|
+
/** --- Color --- */
|
|
5513
|
+
initialColor?: ColorRange | undefined;
|
|
5514
|
+
/** default = {white, white}. Particle color lerped from start to end over its lifetime. */
|
|
5515
|
+
colorOverTime?: ColorRange | undefined;
|
|
5516
|
+
/** --- Velocity --- */
|
|
5517
|
+
initialVelocitySpeed?: FloatRange | undefined;
|
|
5518
|
+
/** --- Rendering --- */
|
|
5519
|
+
texture?: Texture | undefined;
|
|
5520
|
+
/** default = PSB_ALPHA */
|
|
5521
|
+
blendMode?: PBParticleSystem_BlendMode | undefined;
|
|
5522
|
+
/** default = true */
|
|
5523
|
+
billboard?: boolean | undefined;
|
|
5524
|
+
/** --- Sprite Sheet Animation --- */
|
|
5525
|
+
spriteSheet?: PBParticleSystem_SpriteSheetAnimation | undefined;
|
|
5526
|
+
shape?: {
|
|
5527
|
+
$case: "point";
|
|
5528
|
+
point: PBParticleSystem_Point;
|
|
5529
|
+
} | {
|
|
5530
|
+
$case: "sphere";
|
|
5531
|
+
sphere: PBParticleSystem_Sphere;
|
|
5532
|
+
} | {
|
|
5533
|
+
$case: "cone";
|
|
5534
|
+
cone: PBParticleSystem_Cone;
|
|
5535
|
+
} | {
|
|
5536
|
+
$case: "box";
|
|
5537
|
+
box: PBParticleSystem_Box;
|
|
5538
|
+
} | undefined;
|
|
5539
|
+
/** --- Simulation --- */
|
|
5540
|
+
loop?: boolean | undefined;
|
|
5541
|
+
/** default = false. Start as if already simulated for one full loop cycle. Requires loop = true. */
|
|
5542
|
+
prewarm?: boolean | undefined;
|
|
5543
|
+
/** default = PSS_LOCAL. Controls whether particles simulate in local or world space. */
|
|
5544
|
+
simulationSpace?: PBParticleSystem_SimulationSpace | undefined;
|
|
5545
|
+
/** --- Limit Velocity Over Lifetime --- */
|
|
5546
|
+
limitVelocity?: PBParticleSystem_LimitVelocity | undefined;
|
|
5547
|
+
/** --- Playback --- */
|
|
5548
|
+
playbackState?: PBParticleSystem_PlaybackState | undefined;
|
|
5549
|
+
/** --- Emission Bursts --- */
|
|
5550
|
+
bursts?: PBParticleSystem_BurstConfiguration | undefined;
|
|
5551
|
+
}
|
|
5552
|
+
|
|
5553
|
+
/**
|
|
5554
|
+
* @public
|
|
5555
|
+
*/
|
|
5556
|
+
export declare namespace PBParticleSystem {
|
|
5557
|
+
export function encode(message: PBParticleSystem, writer?: _m0.Writer): _m0.Writer;
|
|
5558
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem;
|
|
5559
|
+
}
|
|
5560
|
+
|
|
5561
|
+
/**
|
|
5562
|
+
* @public
|
|
5563
|
+
*/
|
|
5564
|
+
declare const enum PBParticleSystem_BlendMode {
|
|
5565
|
+
/** PSB_ALPHA - Standard alpha transparency. */
|
|
5566
|
+
PSB_ALPHA = 0,
|
|
5567
|
+
/** PSB_ADD - Additive blending (brightens underlying pixels). */
|
|
5568
|
+
PSB_ADD = 1,
|
|
5569
|
+
/** PSB_MULTIPLY - Multiply blending (darkens underlying pixels). */
|
|
5570
|
+
PSB_MULTIPLY = 2
|
|
5571
|
+
}
|
|
5572
|
+
export { PBParticleSystem_BlendMode }
|
|
5573
|
+
export { PBParticleSystem_BlendMode as ParticleSystemBlendMode }
|
|
5574
|
+
|
|
5575
|
+
/** Emitter spawns particles from the surface or volume of a box. */
|
|
5576
|
+
/**
|
|
5577
|
+
* @public
|
|
5578
|
+
*/
|
|
5579
|
+
export declare interface PBParticleSystem_Box {
|
|
5580
|
+
/** default = {1, 1, 1} */
|
|
5581
|
+
size?: PBVector3 | undefined;
|
|
5582
|
+
}
|
|
5583
|
+
|
|
5584
|
+
/**
|
|
5585
|
+
* @public
|
|
5586
|
+
*/
|
|
5587
|
+
export declare namespace PBParticleSystem_Box {
|
|
5588
|
+
export function encode(message: PBParticleSystem_Box, writer?: _m0.Writer): _m0.Writer;
|
|
5589
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Box;
|
|
5590
|
+
}
|
|
5591
|
+
|
|
5592
|
+
/**
|
|
5593
|
+
* @public
|
|
5594
|
+
*/
|
|
5595
|
+
export declare interface PBParticleSystem_Burst {
|
|
5596
|
+
/** Seconds from start of cycle. */
|
|
5597
|
+
time: number;
|
|
5598
|
+
/** Particles to emit. */
|
|
5599
|
+
count: number;
|
|
5600
|
+
/** default = 1. Repeat count (0 = infinite). */
|
|
5601
|
+
cycles?: number | undefined;
|
|
5602
|
+
/** default = 0.01. Seconds between cycles. */
|
|
5603
|
+
interval?: number | undefined;
|
|
5604
|
+
/** default = 1.0. Emission chance [0,1]. */
|
|
5605
|
+
probability?: number | undefined;
|
|
5606
|
+
}
|
|
5607
|
+
|
|
5608
|
+
/**
|
|
5609
|
+
* @public
|
|
5610
|
+
*/
|
|
5611
|
+
export declare namespace PBParticleSystem_Burst {
|
|
5612
|
+
export function encode(message: PBParticleSystem_Burst, writer?: _m0.Writer): _m0.Writer;
|
|
5613
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Burst;
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5616
|
+
/** Emission burst configuration. */
|
|
5617
|
+
/**
|
|
5618
|
+
* @public
|
|
5619
|
+
*/
|
|
5620
|
+
export declare interface PBParticleSystem_BurstConfiguration {
|
|
5621
|
+
values: PBParticleSystem_Burst[];
|
|
5622
|
+
}
|
|
5623
|
+
|
|
5624
|
+
/**
|
|
5625
|
+
* @public
|
|
5626
|
+
*/
|
|
5627
|
+
export declare namespace PBParticleSystem_BurstConfiguration {
|
|
5628
|
+
export function encode(message: PBParticleSystem_BurstConfiguration, writer?: _m0.Writer): _m0.Writer;
|
|
5629
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_BurstConfiguration;
|
|
5630
|
+
}
|
|
5631
|
+
|
|
5632
|
+
/** Emitter spawns particles from the base of a cone and projects them outward. */
|
|
5633
|
+
/**
|
|
5634
|
+
* @public
|
|
5635
|
+
*/
|
|
5636
|
+
export declare interface PBParticleSystem_Cone {
|
|
5637
|
+
/** default = 25. Half-angle of the cone in degrees. */
|
|
5638
|
+
angle?: number | undefined;
|
|
5639
|
+
/** default = 1. Base radius in meters. */
|
|
5640
|
+
radius?: number | undefined;
|
|
5641
|
+
}
|
|
5642
|
+
|
|
5643
|
+
/**
|
|
5644
|
+
* @public
|
|
5645
|
+
*/
|
|
5646
|
+
export declare namespace PBParticleSystem_Cone {
|
|
5647
|
+
export function encode(message: PBParticleSystem_Cone, writer?: _m0.Writer): _m0.Writer;
|
|
5648
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Cone;
|
|
5649
|
+
}
|
|
5650
|
+
|
|
5651
|
+
/** Clamps particle speed over lifetime. */
|
|
5652
|
+
/**
|
|
5653
|
+
* @public
|
|
5654
|
+
*/
|
|
5655
|
+
export declare interface PBParticleSystem_LimitVelocity {
|
|
5656
|
+
/** Maximum particle speed (m/s). */
|
|
5657
|
+
speed: number;
|
|
5658
|
+
/** default = 1. Fraction (0–1) of excess velocity removed per frame. 1 = hard clamp. */
|
|
5659
|
+
dampen?: number | undefined;
|
|
5660
|
+
}
|
|
5661
|
+
|
|
5662
|
+
/**
|
|
5663
|
+
* @public
|
|
5664
|
+
*/
|
|
5665
|
+
export declare namespace PBParticleSystem_LimitVelocity {
|
|
5666
|
+
export function encode(message: PBParticleSystem_LimitVelocity, writer?: _m0.Writer): _m0.Writer;
|
|
5667
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_LimitVelocity;
|
|
5668
|
+
}
|
|
5669
|
+
|
|
5670
|
+
/**
|
|
5671
|
+
* @public
|
|
5672
|
+
*/
|
|
5673
|
+
declare const enum PBParticleSystem_PlaybackState {
|
|
5674
|
+
/** PS_PLAYING - Particle system is emitting and simulating. */
|
|
5675
|
+
PS_PLAYING = 0,
|
|
5676
|
+
/** PS_PAUSED - Simulation is frozen; no new particles are emitted. */
|
|
5677
|
+
PS_PAUSED = 1,
|
|
5678
|
+
/** PS_STOPPED - Simulation stopped and existing particles cleared. */
|
|
5679
|
+
PS_STOPPED = 2
|
|
5680
|
+
}
|
|
5681
|
+
export { PBParticleSystem_PlaybackState }
|
|
5682
|
+
export { PBParticleSystem_PlaybackState as ParticleSystemPlaybackState }
|
|
5683
|
+
|
|
5684
|
+
/** Emitter spawns particles from a single point. */
|
|
5685
|
+
/**
|
|
5686
|
+
* @public
|
|
5687
|
+
*/
|
|
5688
|
+
export declare interface PBParticleSystem_Point {
|
|
5689
|
+
}
|
|
5690
|
+
|
|
5691
|
+
/**
|
|
5692
|
+
* @public
|
|
5693
|
+
*/
|
|
5694
|
+
export declare namespace PBParticleSystem_Point {
|
|
5695
|
+
export function encode(_: PBParticleSystem_Point, writer?: _m0.Writer): _m0.Writer;
|
|
5696
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Point;
|
|
5697
|
+
}
|
|
5698
|
+
|
|
5699
|
+
/**
|
|
5700
|
+
* @public
|
|
5701
|
+
*/
|
|
5702
|
+
export declare const enum PBParticleSystem_SimulationSpace {
|
|
5703
|
+
/** PSS_LOCAL - Particles move with the entity transform. */
|
|
5704
|
+
PSS_LOCAL = 0,
|
|
5705
|
+
/** PSS_WORLD - Particles stay in world position after emission. */
|
|
5706
|
+
PSS_WORLD = 1
|
|
5707
|
+
}
|
|
5708
|
+
|
|
5709
|
+
/** Emitter spawns particles from the surface or volume of a sphere. */
|
|
5710
|
+
/**
|
|
5711
|
+
* @public
|
|
5712
|
+
*/
|
|
5713
|
+
export declare interface PBParticleSystem_Sphere {
|
|
5714
|
+
/** default = 1 */
|
|
5715
|
+
radius?: number | undefined;
|
|
5716
|
+
}
|
|
5717
|
+
|
|
5718
|
+
/**
|
|
5719
|
+
* @public
|
|
5720
|
+
*/
|
|
5721
|
+
export declare namespace PBParticleSystem_Sphere {
|
|
5722
|
+
export function encode(message: PBParticleSystem_Sphere, writer?: _m0.Writer): _m0.Writer;
|
|
5723
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Sphere;
|
|
5724
|
+
}
|
|
5725
|
+
|
|
5726
|
+
/** Sprite sheet (texture atlas) animation settings. */
|
|
5727
|
+
/**
|
|
5728
|
+
* @public
|
|
5729
|
+
*/
|
|
5730
|
+
export declare interface PBParticleSystem_SpriteSheetAnimation {
|
|
5731
|
+
/** Number of columns in the sprite sheet. */
|
|
5732
|
+
tilesX: number;
|
|
5733
|
+
/** Number of rows in the sprite sheet. */
|
|
5734
|
+
tilesY: number;
|
|
5735
|
+
/** default = 30. Playback speed in frames per second. */
|
|
5736
|
+
framesPerSecond?: number | undefined;
|
|
5737
|
+
}
|
|
5738
|
+
|
|
5739
|
+
/**
|
|
5740
|
+
* @public
|
|
5741
|
+
*/
|
|
5742
|
+
export declare namespace PBParticleSystem_SpriteSheetAnimation {
|
|
5743
|
+
export function encode(message: PBParticleSystem_SpriteSheetAnimation, writer?: _m0.Writer): _m0.Writer;
|
|
5744
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_SpriteSheetAnimation;
|
|
5745
|
+
}
|
|
5746
|
+
|
|
5495
5747
|
/**
|
|
5496
5748
|
* This component applies a continuous physics force.
|
|
5497
5749
|
*
|
|
@@ -5629,6 +5881,8 @@ export declare interface PBPointerEvents_Entry {
|
|
|
5629
5881
|
eventType: PointerEventType;
|
|
5630
5882
|
/** additional configuration for this detection */
|
|
5631
5883
|
eventInfo: PBPointerEvents_Info | undefined;
|
|
5884
|
+
/** the type of interaction source (default 0 == CURSOR) */
|
|
5885
|
+
interactionType?: InteractionType | undefined;
|
|
5632
5886
|
}
|
|
5633
5887
|
|
|
5634
5888
|
/**
|
|
@@ -5655,6 +5909,8 @@ export declare interface PBPointerEvents_Info {
|
|
|
5655
5909
|
showHighlight?: boolean | undefined;
|
|
5656
5910
|
/** range of interaction from the avatar's position (default 0) */
|
|
5657
5911
|
maxPlayerDistance?: number | undefined;
|
|
5912
|
+
/** resolution order when multiple events overlap, higher wins (default 0) */
|
|
5913
|
+
priority?: number | undefined;
|
|
5658
5914
|
}
|
|
5659
5915
|
|
|
5660
5916
|
/**
|
|
@@ -6572,12 +6828,92 @@ export declare namespace PBVisibilityComponent {
|
|
|
6572
6828
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBVisibilityComponent;
|
|
6573
6829
|
}
|
|
6574
6830
|
|
|
6831
|
+
/**
|
|
6832
|
+
* @public
|
|
6833
|
+
* Physics helpers for applying impulses and forces to the player.
|
|
6834
|
+
*/
|
|
6835
|
+
export declare const Physics: PhysicsSystem;
|
|
6836
|
+
|
|
6575
6837
|
/** @public */
|
|
6576
6838
|
export declare const PhysicsCombinedForce: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>;
|
|
6577
6839
|
|
|
6578
6840
|
/** @public */
|
|
6579
6841
|
export declare const PhysicsCombinedImpulse: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>;
|
|
6580
6842
|
|
|
6843
|
+
/**
|
|
6844
|
+
* @public
|
|
6845
|
+
*/
|
|
6846
|
+
export declare interface PhysicsSystem {
|
|
6847
|
+
/**
|
|
6848
|
+
* Apply a one-shot impulse to the player entity.
|
|
6849
|
+
* Multiple calls within the same frame are accumulated (summed).
|
|
6850
|
+
*
|
|
6851
|
+
* @param vector - a single `vector` whose length encodes the strength.
|
|
6852
|
+
* or use overload for `direction` with a separate `magnitude` — the direction will be normalized before scaling.
|
|
6853
|
+
*/
|
|
6854
|
+
applyImpulseToPlayer(vector: Vector3Type): void;
|
|
6855
|
+
applyImpulseToPlayer(direction: Vector3Type, magnitude: number): void;
|
|
6856
|
+
/**
|
|
6857
|
+
* Apply a continuous force to the player from a given source entity.
|
|
6858
|
+
* Multiple sources are accumulated: the registry sums all active forces
|
|
6859
|
+
* and writes a single PBPhysicsCombinedForce component.
|
|
6860
|
+
* Calling again with the same source replaces its previous force.
|
|
6861
|
+
*
|
|
6862
|
+
* @param source - Entity key identifying this force source
|
|
6863
|
+
* @param vector - single `vector` whose length encodes the strength
|
|
6864
|
+
* or use overload for `direction` with a separate `magnitude` — the direction will be normalized before scaling.
|
|
6865
|
+
*/
|
|
6866
|
+
applyForceToPlayer(source: Entity, vector: Vector3Type): void;
|
|
6867
|
+
applyForceToPlayer(source: Entity, direction: Vector3Type, magnitude: number): void;
|
|
6868
|
+
/**
|
|
6869
|
+
* Remove a continuous force from the player. Remaining sources are
|
|
6870
|
+
* re-summed; if none remain the force is cleared. No-op if the source
|
|
6871
|
+
* is not registered.
|
|
6872
|
+
*
|
|
6873
|
+
* @param source - Entity key identifying the force source to remove
|
|
6874
|
+
*/
|
|
6875
|
+
removeForceFromPlayer(source: Entity): void;
|
|
6876
|
+
/**
|
|
6877
|
+
* Push the player away from a point. Computes direction from
|
|
6878
|
+
* `fromPosition` to the player, applies falloff, and delegates
|
|
6879
|
+
* to applyImpulseToPlayer.
|
|
6880
|
+
*
|
|
6881
|
+
* If the player is exactly at `fromPosition`, pushes upward.
|
|
6882
|
+
*
|
|
6883
|
+
* @param fromPosition - world-space origin of the knockback (explosion center, enemy position, etc.)
|
|
6884
|
+
* @param magnitude - base impulse strength
|
|
6885
|
+
* @param radius - max distance of effect (default: Infinity)
|
|
6886
|
+
* @param falloff - how force decreases with distance (default: CONSTANT)
|
|
6887
|
+
*/
|
|
6888
|
+
applyKnockbackToPlayer(fromPosition: Vector3Type, magnitude: number, radius?: number, falloff?: KnockbackFalloff): void;
|
|
6889
|
+
/**
|
|
6890
|
+
* Apply a continuous force to the player for a limited duration.
|
|
6891
|
+
* After `duration` seconds the force is automatically removed.
|
|
6892
|
+
* Calling again with the same source resets the timer.
|
|
6893
|
+
*
|
|
6894
|
+
* @param source - Entity key identifying this force source
|
|
6895
|
+
* @param duration - how long the force lasts, in seconds
|
|
6896
|
+
* @param vector - single `vector` whose length encodes the strength
|
|
6897
|
+
* or use overload for `direction` with a separate `magnitude` — the direction will be normalized before scaling.
|
|
6898
|
+
*/
|
|
6899
|
+
applyForceToPlayerForDuration(source: Entity, duration: number, vector: Vector3Type): void;
|
|
6900
|
+
applyForceToPlayerForDuration(source: Entity, duration: number, direction: Vector3Type, magnitude: number): void;
|
|
6901
|
+
/**
|
|
6902
|
+
* Apply a continuous repulsion force that pushes the player away from a point,
|
|
6903
|
+
* recalculating direction every tick as the player moves.
|
|
6904
|
+
* Remove with `removeForceFromPlayer(source)`.
|
|
6905
|
+
*
|
|
6906
|
+
* Negative magnitude = attraction (pulls toward the source).
|
|
6907
|
+
*
|
|
6908
|
+
* @param source - Entity key identifying this force source
|
|
6909
|
+
* @param fromPosition - world-space origin of repulsion
|
|
6910
|
+
* @param magnitude - base force strength
|
|
6911
|
+
* @param radius - max distance of effect (default: Infinity)
|
|
6912
|
+
* @param falloff - how force decreases with distance (default: CONSTANT)
|
|
6913
|
+
*/
|
|
6914
|
+
applyRepulsionForceToPlayer(source: Entity, fromPosition: Vector3Type, magnitude: number, radius?: number, falloff?: KnockbackFalloff): void;
|
|
6915
|
+
}
|
|
6916
|
+
|
|
6581
6917
|
/**
|
|
6582
6918
|
* Represens a plane by the equation ax + by + cz + d = 0
|
|
6583
6919
|
* @public
|
|
@@ -6733,6 +7069,30 @@ export declare interface PointerEventsSystem {
|
|
|
6733
7069
|
* @param entity - Entity where the callback was attached
|
|
6734
7070
|
*/
|
|
6735
7071
|
removeOnPointerHoverLeave(entity: Entity): void;
|
|
7072
|
+
/**
|
|
7073
|
+
* @public
|
|
7074
|
+
* Remove the callback for onProximityDown event
|
|
7075
|
+
* @param entity - Entity where the callback was attached
|
|
7076
|
+
*/
|
|
7077
|
+
removeOnProximityDown(entity: Entity): void;
|
|
7078
|
+
/**
|
|
7079
|
+
* @public
|
|
7080
|
+
* Remove the callback for onProximityUp event
|
|
7081
|
+
* @param entity - Entity where the callback was attached
|
|
7082
|
+
*/
|
|
7083
|
+
removeOnProximityUp(entity: Entity): void;
|
|
7084
|
+
/**
|
|
7085
|
+
* @public
|
|
7086
|
+
* Remove the callback for onProximityEnter event
|
|
7087
|
+
* @param entity - Entity where the callback was attached
|
|
7088
|
+
*/
|
|
7089
|
+
removeOnProximityEnter(entity: Entity): void;
|
|
7090
|
+
/**
|
|
7091
|
+
* @public
|
|
7092
|
+
* Remove the callback for onProximityLeave event
|
|
7093
|
+
* @param entity - Entity where the callback was attached
|
|
7094
|
+
*/
|
|
7095
|
+
removeOnProximityLeave(entity: Entity): void;
|
|
6736
7096
|
/**
|
|
6737
7097
|
* @public
|
|
6738
7098
|
* Execute callback when the user press the InputButton pointing at the entity
|
|
@@ -6787,6 +7147,46 @@ export declare interface PointerEventsSystem {
|
|
|
6787
7147
|
entity: Entity;
|
|
6788
7148
|
opts?: Partial<EventSystemOptions>;
|
|
6789
7149
|
}, cb: EventSystemCallback): void;
|
|
7150
|
+
/**
|
|
7151
|
+
* @public
|
|
7152
|
+
* Execute callback when the user presses the proximity button on the entity
|
|
7153
|
+
* @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
|
|
7154
|
+
* @param cb - Function to execute when click fires
|
|
7155
|
+
*/
|
|
7156
|
+
onProximityDown(pointerData: {
|
|
7157
|
+
entity: Entity;
|
|
7158
|
+
opts?: Partial<EventSystemOptions>;
|
|
7159
|
+
}, cb: EventSystemCallback): void;
|
|
7160
|
+
/**
|
|
7161
|
+
* @public
|
|
7162
|
+
* Execute callback when the user releases the proximity button on the entity
|
|
7163
|
+
* @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
|
|
7164
|
+
* @param cb - Function to execute when event fires
|
|
7165
|
+
*/
|
|
7166
|
+
onProximityUp(pointerData: {
|
|
7167
|
+
entity: Entity;
|
|
7168
|
+
opts?: Partial<EventSystemOptions>;
|
|
7169
|
+
}, cb: EventSystemCallback): void;
|
|
7170
|
+
/**
|
|
7171
|
+
* @public
|
|
7172
|
+
* Execute callback when the entity enters the proximity zone of the user
|
|
7173
|
+
* @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
|
|
7174
|
+
* @param cb - Function to execute when event fires
|
|
7175
|
+
*/
|
|
7176
|
+
onProximityEnter(pointerData: {
|
|
7177
|
+
entity: Entity;
|
|
7178
|
+
opts?: Partial<EventSystemOptions>;
|
|
7179
|
+
}, cb: EventSystemCallback): void;
|
|
7180
|
+
/**
|
|
7181
|
+
* @public
|
|
7182
|
+
* Execute callback when the entity leaves the proximity zone of the user
|
|
7183
|
+
* @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
|
|
7184
|
+
* @param cb - Function to execute when event fires
|
|
7185
|
+
*/
|
|
7186
|
+
onProximityLeave(pointerData: {
|
|
7187
|
+
entity: Entity;
|
|
7188
|
+
opts?: Partial<EventSystemOptions>;
|
|
7189
|
+
}, cb: EventSystemCallback): void;
|
|
6790
7190
|
}
|
|
6791
7191
|
|
|
6792
7192
|
/**
|
|
@@ -6803,7 +7203,9 @@ export declare const enum PointerEventType {
|
|
|
6803
7203
|
PET_UP = 0,
|
|
6804
7204
|
PET_DOWN = 1,
|
|
6805
7205
|
PET_HOVER_ENTER = 2,
|
|
6806
|
-
PET_HOVER_LEAVE = 3
|
|
7206
|
+
PET_HOVER_LEAVE = 3,
|
|
7207
|
+
PET_PROXIMITY_ENTER = 4,
|
|
7208
|
+
PET_PROXIMITY_LEAVE = 5
|
|
6807
7209
|
}
|
|
6808
7210
|
|
|
6809
7211
|
/**
|
|
@@ -7698,6 +8100,13 @@ export declare namespace RotateContinuous {
|
|
|
7698
8100
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): RotateContinuous;
|
|
7699
8101
|
}
|
|
7700
8102
|
|
|
8103
|
+
/**
|
|
8104
|
+
* @public
|
|
8105
|
+
* Rotate a vector by a quaternion
|
|
8106
|
+
* Uses the formula: v' = q * v * q^(-1), optimized version
|
|
8107
|
+
*/
|
|
8108
|
+
export declare function rotateVectorByQuaternion(v: Vector3Type, q: QuaternionType): Vector3Type;
|
|
8109
|
+
|
|
7701
8110
|
export declare type RPCSendableMessage = {
|
|
7702
8111
|
jsonrpc: '2.0';
|
|
7703
8112
|
id: number;
|
|
@@ -8394,6 +8803,18 @@ export declare type TransformComponent = LastWriteWinElementSetComponentDefiniti
|
|
|
8394
8803
|
export declare interface TransformComponentExtended extends TransformComponent {
|
|
8395
8804
|
create(entity: Entity, val?: TransformTypeWithOptionals): TransformType;
|
|
8396
8805
|
createOrReplace(entity: Entity, val?: TransformTypeWithOptionals): TransformType;
|
|
8806
|
+
/**
|
|
8807
|
+
* Transforms a direction vector from an entity's local coordinate space
|
|
8808
|
+
* to world space, accounting for the full parent hierarchy.
|
|
8809
|
+
*
|
|
8810
|
+
* This applies only rotation (not translation or scale) — suitable for
|
|
8811
|
+
* direction vectors like force/impulse directions.
|
|
8812
|
+
*
|
|
8813
|
+
* @param entity - The source entity whose local space defines the direction
|
|
8814
|
+
* @param localDirection - Direction vector in the entity's local coordinates
|
|
8815
|
+
* @returns The direction vector in world coordinates
|
|
8816
|
+
*/
|
|
8817
|
+
localToWorldDirection(entity: Entity, localDirection: Vector3Type): Vector3Type;
|
|
8397
8818
|
}
|
|
8398
8819
|
|
|
8399
8820
|
/**
|
|
@@ -8944,14 +9365,6 @@ export declare interface UiTransformProps {
|
|
|
8944
9365
|
*/
|
|
8945
9366
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
8946
9367
|
|
|
8947
|
-
export declare type ValidateCallback<T> = (value: {
|
|
8948
|
-
entity: Entity;
|
|
8949
|
-
currentValue: T | undefined;
|
|
8950
|
-
newValue: T | undefined;
|
|
8951
|
-
senderAddress: string;
|
|
8952
|
-
createdBy: string;
|
|
8953
|
-
}) => boolean;
|
|
8954
|
-
|
|
8955
9368
|
/**
|
|
8956
9369
|
* @public
|
|
8957
9370
|
*/
|