@dcl/playground-assets 7.22.4 → 7.22.5-24779418349.commit-111fd7e
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 +98 -511
- package/dist/beta.d.ts +98 -511
- package/dist/index.bundled.d.ts +98 -511
- package/dist/index.js +9 -9
- package/dist/index.js.map +8 -0
- package/dist/playground/sdk/apis.d.ts +0 -5
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground/snippets/pointer-events.ts +7 -14
- package/dist/playground-assets.d.ts +98 -511
- package/dist/tsdoc-metadata.json +1 -1
- package/etc/playground-assets.api.json +6008 -10356
- package/etc/playground-assets.api.md +75 -307
- package/package.json +6 -5
package/dist/alpha.d.ts
CHANGED
|
@@ -163,6 +163,42 @@ 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
|
+
|
|
166
202
|
/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
|
|
167
203
|
/**
|
|
168
204
|
* @public
|
|
@@ -322,6 +358,22 @@ export declare interface BaseComponent<T> {
|
|
|
322
358
|
* If the value is undefined, the component was deleted.
|
|
323
359
|
*/
|
|
324
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;
|
|
325
377
|
}
|
|
326
378
|
|
|
327
379
|
/** @public */
|
|
@@ -1288,23 +1340,6 @@ export declare type Color4Type = {
|
|
|
1288
1340
|
a: number;
|
|
1289
1341
|
};
|
|
1290
1342
|
|
|
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
|
-
|
|
1308
1343
|
/**
|
|
1309
1344
|
* @public
|
|
1310
1345
|
*/
|
|
@@ -1361,7 +1396,6 @@ export declare const componentDefinitionByName: {
|
|
|
1361
1396
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
1362
1397
|
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
1363
1398
|
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
|
1364
|
-
"core::ParticleSystem": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBParticleSystem>>;
|
|
1365
1399
|
"core::PhysicsCombinedForce": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>>;
|
|
1366
1400
|
"core::PhysicsCombinedImpulse": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>>;
|
|
1367
1401
|
"core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
|
|
@@ -1550,12 +1584,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1550
1584
|
/**
|
|
1551
1585
|
* @public
|
|
1552
1586
|
*/
|
|
1553
|
-
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1587
|
+
export declare type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1554
1588
|
|
|
1555
1589
|
/**
|
|
1556
1590
|
* @public
|
|
1557
1591
|
*/
|
|
1558
|
-
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1592
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1559
1593
|
|
|
1560
1594
|
/**
|
|
1561
1595
|
* Min length = 8 bytes
|
|
@@ -1610,7 +1644,8 @@ export declare enum CrdtMessageType {
|
|
|
1610
1644
|
PUT_COMPONENT_NETWORK = 5,
|
|
1611
1645
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1612
1646
|
DELETE_ENTITY_NETWORK = 7,
|
|
1613
|
-
|
|
1647
|
+
AUTHORITATIVE_PUT_COMPONENT = 8,
|
|
1648
|
+
MAX_MESSAGE_TYPE = 9
|
|
1614
1649
|
}
|
|
1615
1650
|
|
|
1616
1651
|
/**
|
|
@@ -1618,6 +1653,8 @@ export declare enum CrdtMessageType {
|
|
|
1618
1653
|
*/
|
|
1619
1654
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1620
1655
|
|
|
1656
|
+
export declare const CreatedBy: ICreatedBy;
|
|
1657
|
+
|
|
1621
1658
|
/**
|
|
1622
1659
|
* @public
|
|
1623
1660
|
*/
|
|
@@ -2052,7 +2089,6 @@ export declare type EventSystemOptions = {
|
|
|
2052
2089
|
showFeedback?: boolean;
|
|
2053
2090
|
showHighlight?: boolean;
|
|
2054
2091
|
maxPlayerDistance?: number;
|
|
2055
|
-
priority?: number;
|
|
2056
2092
|
};
|
|
2057
2093
|
|
|
2058
2094
|
/**
|
|
@@ -2166,23 +2202,6 @@ export declare type FlexWrapType = 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
|
2166
2202
|
/** @public */
|
|
2167
2203
|
export declare type FloatArray = number[];
|
|
2168
2204
|
|
|
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
|
-
|
|
2186
2205
|
/**
|
|
2187
2206
|
* @public
|
|
2188
2207
|
*/
|
|
@@ -2337,6 +2356,12 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2337
2356
|
|
|
2338
2357
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2339
2358
|
|
|
2359
|
+
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2360
|
+
|
|
2361
|
+
export declare interface ICreatedByType {
|
|
2362
|
+
address: string;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2340
2365
|
/**
|
|
2341
2366
|
* @public
|
|
2342
2367
|
*/
|
|
@@ -2781,11 +2806,32 @@ export declare type InstanceCompositeOptions = {
|
|
|
2781
2806
|
};
|
|
2782
2807
|
|
|
2783
2808
|
/**
|
|
2784
|
-
*
|
|
2809
|
+
* Internal component interface that exposes all internal methods for SDK use
|
|
2810
|
+
* This is not exposed to users, only for internal SDK operations
|
|
2785
2811
|
*/
|
|
2786
|
-
export declare
|
|
2787
|
-
|
|
2788
|
-
|
|
2812
|
+
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
2813
|
+
/**
|
|
2814
|
+
* @public
|
|
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;
|
|
2789
2835
|
}
|
|
2790
2836
|
|
|
2791
2837
|
/**
|
|
@@ -2866,19 +2912,6 @@ export declare type JustifyType = 'flex-start' | 'center' | 'flex-end' | 'space-
|
|
|
2866
2912
|
*/
|
|
2867
2913
|
export declare type Key = number | string;
|
|
2868
2914
|
|
|
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
|
-
|
|
2882
2915
|
/**
|
|
2883
2916
|
*
|
|
2884
2917
|
* @public
|
|
@@ -4408,30 +4441,6 @@ export declare const onVideoEvent: Observable<{
|
|
|
4408
4441
|
*/
|
|
4409
4442
|
export declare type OverflowType = 'hidden' | 'scroll' | 'visible';
|
|
4410
4443
|
|
|
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
|
-
|
|
4435
4444
|
/** AnimationState indicates the status and configuration of one available animation. */
|
|
4436
4445
|
/**
|
|
4437
4446
|
* @public
|
|
@@ -5483,267 +5492,6 @@ export declare namespace PBNftShape {
|
|
|
5483
5492
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBNftShape;
|
|
5484
5493
|
}
|
|
5485
5494
|
|
|
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
|
-
|
|
5747
5495
|
/**
|
|
5748
5496
|
* This component applies a continuous physics force.
|
|
5749
5497
|
*
|
|
@@ -5881,8 +5629,6 @@ export declare interface PBPointerEvents_Entry {
|
|
|
5881
5629
|
eventType: PointerEventType;
|
|
5882
5630
|
/** additional configuration for this detection */
|
|
5883
5631
|
eventInfo: PBPointerEvents_Info | undefined;
|
|
5884
|
-
/** the type of interaction source (default 0 == CURSOR) */
|
|
5885
|
-
interactionType?: InteractionType | undefined;
|
|
5886
5632
|
}
|
|
5887
5633
|
|
|
5888
5634
|
/**
|
|
@@ -5909,8 +5655,6 @@ export declare interface PBPointerEvents_Info {
|
|
|
5909
5655
|
showHighlight?: boolean | undefined;
|
|
5910
5656
|
/** range of interaction from the avatar's position (default 0) */
|
|
5911
5657
|
maxPlayerDistance?: number | undefined;
|
|
5912
|
-
/** resolution order when multiple events overlap, higher wins (default 0) */
|
|
5913
|
-
priority?: number | undefined;
|
|
5914
5658
|
}
|
|
5915
5659
|
|
|
5916
5660
|
/**
|
|
@@ -6828,92 +6572,12 @@ export declare namespace PBVisibilityComponent {
|
|
|
6828
6572
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBVisibilityComponent;
|
|
6829
6573
|
}
|
|
6830
6574
|
|
|
6831
|
-
/**
|
|
6832
|
-
* @public
|
|
6833
|
-
* Physics helpers for applying impulses and forces to the player.
|
|
6834
|
-
*/
|
|
6835
|
-
export declare const Physics: PhysicsSystem;
|
|
6836
|
-
|
|
6837
6575
|
/** @public */
|
|
6838
6576
|
export declare const PhysicsCombinedForce: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>;
|
|
6839
6577
|
|
|
6840
6578
|
/** @public */
|
|
6841
6579
|
export declare const PhysicsCombinedImpulse: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>;
|
|
6842
6580
|
|
|
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
|
-
|
|
6917
6581
|
/**
|
|
6918
6582
|
* Represens a plane by the equation ax + by + cz + d = 0
|
|
6919
6583
|
* @public
|
|
@@ -7069,30 +6733,6 @@ export declare interface PointerEventsSystem {
|
|
|
7069
6733
|
* @param entity - Entity where the callback was attached
|
|
7070
6734
|
*/
|
|
7071
6735
|
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;
|
|
7096
6736
|
/**
|
|
7097
6737
|
* @public
|
|
7098
6738
|
* Execute callback when the user press the InputButton pointing at the entity
|
|
@@ -7147,46 +6787,6 @@ export declare interface PointerEventsSystem {
|
|
|
7147
6787
|
entity: Entity;
|
|
7148
6788
|
opts?: Partial<EventSystemOptions>;
|
|
7149
6789
|
}, 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;
|
|
7190
6790
|
}
|
|
7191
6791
|
|
|
7192
6792
|
/**
|
|
@@ -7203,9 +6803,7 @@ export declare const enum PointerEventType {
|
|
|
7203
6803
|
PET_UP = 0,
|
|
7204
6804
|
PET_DOWN = 1,
|
|
7205
6805
|
PET_HOVER_ENTER = 2,
|
|
7206
|
-
PET_HOVER_LEAVE = 3
|
|
7207
|
-
PET_PROXIMITY_ENTER = 4,
|
|
7208
|
-
PET_PROXIMITY_LEAVE = 5
|
|
6806
|
+
PET_HOVER_LEAVE = 3
|
|
7209
6807
|
}
|
|
7210
6808
|
|
|
7211
6809
|
/**
|
|
@@ -8100,13 +7698,6 @@ export declare namespace RotateContinuous {
|
|
|
8100
7698
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): RotateContinuous;
|
|
8101
7699
|
}
|
|
8102
7700
|
|
|
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
|
-
|
|
8110
7701
|
export declare type RPCSendableMessage = {
|
|
8111
7702
|
jsonrpc: '2.0';
|
|
8112
7703
|
id: number;
|
|
@@ -8803,18 +8394,6 @@ export declare type TransformComponent = LastWriteWinElementSetComponentDefiniti
|
|
|
8803
8394
|
export declare interface TransformComponentExtended extends TransformComponent {
|
|
8804
8395
|
create(entity: Entity, val?: TransformTypeWithOptionals): TransformType;
|
|
8805
8396
|
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;
|
|
8818
8397
|
}
|
|
8819
8398
|
|
|
8820
8399
|
/**
|
|
@@ -9365,6 +8944,14 @@ export declare interface UiTransformProps {
|
|
|
9365
8944
|
*/
|
|
9366
8945
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
9367
8946
|
|
|
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
|
+
|
|
9368
8955
|
/**
|
|
9369
8956
|
* @public
|
|
9370
8957
|
*/
|