@dcl/playground-assets 7.22.4-24525731607.commit-cda77a9 → 7.22.5-24776890516.commit-b10e9ab

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 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
@@ -261,21 +242,9 @@ export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAva
261
242
  /** @public */
262
243
  export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>;
263
244
 
264
- /** Mask for which bones an animation applies to. */
265
- /**
266
- * @public
267
- */
268
- export declare const enum AvatarEmoteMask {
269
- AEM_FULL_BODY = 0,
270
- AEM_UPPER_BODY = 1
271
- }
272
-
273
245
  /** @public */
274
246
  export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
275
247
 
276
- /** @public */
277
- export declare const AvatarLocomotionSettings: LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>;
278
-
279
248
  /** @public */
280
249
  export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
281
250
 
@@ -389,6 +358,22 @@ export declare interface BaseComponent<T> {
389
358
  * If the value is undefined, the component was deleted.
390
359
  */
391
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;
392
377
  }
393
378
 
394
379
  /** @public */
@@ -1355,23 +1340,6 @@ export declare type Color4Type = {
1355
1340
  a: number;
1356
1341
  };
1357
1342
 
1358
- /** A range of Color4 values. Randomized or lerped between start and end. */
1359
- /**
1360
- * @public
1361
- */
1362
- export declare interface ColorRange {
1363
- start: PBColor4 | undefined;
1364
- end: PBColor4 | undefined;
1365
- }
1366
-
1367
- /**
1368
- * @public
1369
- */
1370
- export declare namespace ColorRange {
1371
- export function encode(message: ColorRange, writer?: _m0.Writer): _m0.Writer;
1372
- export function decode(input: _m0.Reader | Uint8Array, length?: number): ColorRange;
1373
- }
1374
-
1375
1343
  /**
1376
1344
  * @public
1377
1345
  */
@@ -1405,7 +1373,6 @@ export declare const componentDefinitionByName: {
1405
1373
  "core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
1406
1374
  "core::AssetLoad": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAssetLoad>>;
1407
1375
  "core::AssetLoadLoadingState": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAssetLoadLoadingState>>;
1408
- "core::AudioAnalysis": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>>;
1409
1376
  "core::AudioEvent": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAudioEvent>>;
1410
1377
  "core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
1411
1378
  "core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
@@ -1413,7 +1380,6 @@ export declare const componentDefinitionByName: {
1413
1380
  "core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
1414
1381
  "core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
1415
1382
  "core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
1416
- "core::AvatarLocomotionSettings": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
1417
1383
  "core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
1418
1384
  "core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
1419
1385
  "core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
@@ -1430,7 +1396,6 @@ export declare const componentDefinitionByName: {
1430
1396
  "core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
1431
1397
  "core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
1432
1398
  "core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
1433
- "core::ParticleSystem": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBParticleSystem>>;
1434
1399
  "core::PhysicsCombinedForce": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>>;
1435
1400
  "core::PhysicsCombinedImpulse": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>>;
1436
1401
  "core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
@@ -1619,12 +1584,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
1619
1584
  /**
1620
1585
  * @public
1621
1586
  */
1622
- export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
1587
+ export declare type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
1623
1588
 
1624
1589
  /**
1625
1590
  * @public
1626
1591
  */
1627
- export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
1592
+ export declare type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
1628
1593
 
1629
1594
  /**
1630
1595
  * Min length = 8 bytes
@@ -1679,7 +1644,8 @@ export declare enum CrdtMessageType {
1679
1644
  PUT_COMPONENT_NETWORK = 5,
1680
1645
  DELETE_COMPONENT_NETWORK = 6,
1681
1646
  DELETE_ENTITY_NETWORK = 7,
1682
- MAX_MESSAGE_TYPE = 8
1647
+ AUTHORITATIVE_PUT_COMPONENT = 8,
1648
+ MAX_MESSAGE_TYPE = 9
1683
1649
  }
1684
1650
 
1685
1651
  /**
@@ -1687,6 +1653,8 @@ export declare enum CrdtMessageType {
1687
1653
  */
1688
1654
  export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
1689
1655
 
1656
+ export declare const CreatedBy: ICreatedBy;
1657
+
1690
1658
  /**
1691
1659
  * @public
1692
1660
  */
@@ -2121,7 +2089,6 @@ export declare type EventSystemOptions = {
2121
2089
  showFeedback?: boolean;
2122
2090
  showHighlight?: boolean;
2123
2091
  maxPlayerDistance?: number;
2124
- priority?: number;
2125
2092
  };
2126
2093
 
2127
2094
  /**
@@ -2235,23 +2202,6 @@ export declare type FlexWrapType = 'wrap' | 'nowrap' | 'wrap-reverse';
2235
2202
  /** @public */
2236
2203
  export declare type FloatArray = number[];
2237
2204
 
2238
- /** A range of float values. Randomized or lerped between start and end. */
2239
- /**
2240
- * @public
2241
- */
2242
- export declare interface FloatRange {
2243
- start: number;
2244
- end: number;
2245
- }
2246
-
2247
- /**
2248
- * @public
2249
- */
2250
- export declare namespace FloatRange {
2251
- export function encode(message: FloatRange, writer?: _m0.Writer): _m0.Writer;
2252
- export function decode(input: _m0.Reader | Uint8Array, length?: number): FloatRange;
2253
- }
2254
-
2255
2205
  /**
2256
2206
  * @public
2257
2207
  */
@@ -2406,6 +2356,12 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
2406
2356
 
2407
2357
  export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
2408
2358
 
2359
+ export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
2360
+
2361
+ export declare interface ICreatedByType {
2362
+ address: string;
2363
+ }
2364
+
2409
2365
  /**
2410
2366
  * @public
2411
2367
  */
@@ -2801,8 +2757,7 @@ export declare const enum InputAction {
2801
2757
  IA_ACTION_3 = 10,
2802
2758
  IA_ACTION_4 = 11,
2803
2759
  IA_ACTION_5 = 12,
2804
- IA_ACTION_6 = 13,
2805
- IA_MODIFIER = 14
2760
+ IA_ACTION_6 = 13
2806
2761
  }
2807
2762
 
2808
2763
  export declare const InputModifier: InputModifierComponentDefinitionExtended;
@@ -2851,11 +2806,32 @@ export declare type InstanceCompositeOptions = {
2851
2806
  };
2852
2807
 
2853
2808
  /**
2854
- * @public
2809
+ * Internal component interface that exposes all internal methods for SDK use
2810
+ * This is not exposed to users, only for internal SDK operations
2855
2811
  */
2856
- export declare const enum InteractionType {
2857
- CURSOR = 0,
2858
- PROXIMITY = 1
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;
2859
2835
  }
2860
2836
 
2861
2837
  /**
@@ -2936,19 +2912,6 @@ export declare type JustifyType = 'flex-start' | 'center' | 'flex-end' | 'space-
2936
2912
  */
2937
2913
  export declare type Key = number | string;
2938
2914
 
2939
- /**
2940
- * @public
2941
- * Falloff mode for knockback force over distance.
2942
- */
2943
- export declare enum KnockbackFalloff {
2944
- /** Same force at any distance within radius */
2945
- CONSTANT = 0,
2946
- /** Smooth linear decrease to 0 at radius edge: F = magnitude * (1 - distance / radius) */
2947
- LINEAR = 1,
2948
- /** Sharp drop-off, physically realistic: F = magnitude / (distance^2 + 1) */
2949
- INVERSE_SQUARE = 2
2950
- }
2951
-
2952
2915
  /**
2953
2916
  *
2954
2917
  * @public
@@ -4478,30 +4441,6 @@ export declare const onVideoEvent: Observable<{
4478
4441
  */
4479
4442
  export declare type OverflowType = 'hidden' | 'scroll' | 'visible';
4480
4443
 
4481
- export declare const ParticleSystem: ParticleSystemComponentDefinitionExtended;
4482
-
4483
- /**
4484
- * @public
4485
- */
4486
- export declare interface ParticleSystemComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBParticleSystem> {
4487
- /** Helpers for constructing emitter shapes */
4488
- Shape: ParticleSystemHelper;
4489
- }
4490
-
4491
- /**
4492
- * @public
4493
- */
4494
- export declare interface ParticleSystemHelper {
4495
- /** Emit from a single point */
4496
- Point: (point?: PBParticleSystem_Point) => PBParticleSystem['shape'];
4497
- /** Emit from the surface or volume of a sphere */
4498
- Sphere: (sphere?: PBParticleSystem_Sphere) => PBParticleSystem['shape'];
4499
- /** Emit from the base of a cone, projecting outward */
4500
- Cone: (cone?: PBParticleSystem_Cone) => PBParticleSystem['shape'];
4501
- /** Emit from the surface or volume of a box */
4502
- Box: (box?: PBParticleSystem_Box) => PBParticleSystem['shape'];
4503
- }
4504
-
4505
4444
  /** AnimationState indicates the status and configuration of one available animation. */
4506
4445
  /**
4507
4446
  * @public
@@ -4594,45 +4533,6 @@ export declare namespace PBAssetLoadLoadingState {
4594
4533
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAssetLoadLoadingState;
4595
4534
  }
4596
4535
 
4597
- /**
4598
- * @public
4599
- */
4600
- export declare interface PBAudioAnalysis {
4601
- /** Parameters section */
4602
- mode: PBAudioAnalysisMode;
4603
- /** Used only when mode == MODE_LOGARITHMIC */
4604
- amplitudeGain?: number | undefined;
4605
- /** End when mode == MODE_LOGARITHMIC */
4606
- bandsGain?: number | undefined;
4607
- /** Result section */
4608
- amplitude: number;
4609
- /** Protobuf doesn't support fixed arrays -> 8 band fields */
4610
- band0: number;
4611
- band1: number;
4612
- band2: number;
4613
- band3: number;
4614
- band4: number;
4615
- band5: number;
4616
- band6: number;
4617
- band7: number;
4618
- }
4619
-
4620
- /**
4621
- * @public
4622
- */
4623
- export declare namespace PBAudioAnalysis {
4624
- export function encode(message: PBAudioAnalysis, writer?: _m0.Writer): _m0.Writer;
4625
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioAnalysis;
4626
- }
4627
-
4628
- /**
4629
- * @public
4630
- */
4631
- export declare const enum PBAudioAnalysisMode {
4632
- MODE_RAW = 0,
4633
- MODE_LOGARITHMIC = 1
4634
- }
4635
-
4636
4536
  /**
4637
4537
  * @public
4638
4538
  */
@@ -4822,42 +4722,6 @@ export declare namespace PBAvatarEquippedData {
4822
4722
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
4823
4723
  }
4824
4724
 
4825
- /**
4826
- * The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
4827
- * as the avatar movement speed, jump height etc.
4828
- */
4829
- /**
4830
- * @public
4831
- */
4832
- export declare interface PBAvatarLocomotionSettings {
4833
- /** Maximum speed when walking (in meters per second) */
4834
- walkSpeed?: number | undefined;
4835
- /** Maximum speed when jogging (in meters per second) */
4836
- jogSpeed?: number | undefined;
4837
- /** Maximum speed when running (in meters per second) */
4838
- runSpeed?: number | undefined;
4839
- /** Height of a regular jump (in meters) */
4840
- jumpHeight?: number | undefined;
4841
- /** Height of a jump while running (in meters) */
4842
- runJumpHeight?: number | undefined;
4843
- /** Cooldown time after a hard landing before the avatar can move again (in seconds) */
4844
- hardLandingCooldown?: number | undefined;
4845
- /** Height of the double jump (in meters) */
4846
- doubleJumpHeight?: number | undefined;
4847
- /** Maximum speed when gliding (in meters per second) */
4848
- glidingSpeed?: number | undefined;
4849
- /** Maximum falling speed when gliding (in meters per second) */
4850
- glidingFallingSpeed?: number | undefined;
4851
- }
4852
-
4853
- /**
4854
- * @public
4855
- */
4856
- export declare namespace PBAvatarLocomotionSettings {
4857
- export function encode(message: PBAvatarLocomotionSettings, writer?: _m0.Writer): _m0.Writer;
4858
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings;
4859
- }
4860
-
4861
4725
  /**
4862
4726
  * The AvatarModifierArea component can be attached to an Entity to define a region of space where
4863
4727
  * avatar behavior changes.
@@ -5628,267 +5492,6 @@ export declare namespace PBNftShape {
5628
5492
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBNftShape;
5629
5493
  }
5630
5494
 
5631
- /**
5632
- * @public
5633
- */
5634
- export declare interface PBParticleSystem {
5635
- /** --- Emission --- */
5636
- active?: boolean | undefined;
5637
- /** default = 10. Particles emitted per second. */
5638
- rate?: number | undefined;
5639
- /** default = 1000. Maximum number of live particles. */
5640
- maxParticles?: number | undefined;
5641
- /** default = 5. Particle lifetime in seconds. */
5642
- lifetime?: number | undefined;
5643
- /** --- Motion --- */
5644
- gravity?: number | undefined;
5645
- /** Constant force vector applied to each particle (world space). */
5646
- additionalForce?: PBVector3 | undefined;
5647
- /** --- Size --- */
5648
- initialSize?: FloatRange | undefined;
5649
- /** default = {1, 1}. Particle size lerped from start to end over its lifetime. */
5650
- sizeOverTime?: FloatRange | undefined;
5651
- /** --- Rotation --- */
5652
- initialRotation?: PBQuaternion | undefined;
5653
- /** default = identity (0,0,0,1). Per-axis angular velocity as quaternion; converted to Euler XYZ. */
5654
- rotationOverTime?: PBQuaternion | undefined;
5655
- /** default = false. Particles orient along their velocity direction. */
5656
- faceTravelDirection?: boolean | undefined;
5657
- /** --- Color --- */
5658
- initialColor?: ColorRange | undefined;
5659
- /** default = {white, white}. Particle color lerped from start to end over its lifetime. */
5660
- colorOverTime?: ColorRange | undefined;
5661
- /** --- Velocity --- */
5662
- initialVelocitySpeed?: FloatRange | undefined;
5663
- /** --- Rendering --- */
5664
- texture?: Texture | undefined;
5665
- /** default = PSB_ALPHA */
5666
- blendMode?: PBParticleSystem_BlendMode | undefined;
5667
- /** default = true */
5668
- billboard?: boolean | undefined;
5669
- /** --- Sprite Sheet Animation --- */
5670
- spriteSheet?: PBParticleSystem_SpriteSheetAnimation | undefined;
5671
- shape?: {
5672
- $case: "point";
5673
- point: PBParticleSystem_Point;
5674
- } | {
5675
- $case: "sphere";
5676
- sphere: PBParticleSystem_Sphere;
5677
- } | {
5678
- $case: "cone";
5679
- cone: PBParticleSystem_Cone;
5680
- } | {
5681
- $case: "box";
5682
- box: PBParticleSystem_Box;
5683
- } | undefined;
5684
- /** --- Simulation --- */
5685
- loop?: boolean | undefined;
5686
- /** default = false. Start as if already simulated for one full loop cycle. Requires loop = true. */
5687
- prewarm?: boolean | undefined;
5688
- /** default = PSS_LOCAL. Controls whether particles simulate in local or world space. */
5689
- simulationSpace?: PBParticleSystem_SimulationSpace | undefined;
5690
- /** --- Limit Velocity Over Lifetime --- */
5691
- limitVelocity?: PBParticleSystem_LimitVelocity | undefined;
5692
- /** --- Playback --- */
5693
- playbackState?: PBParticleSystem_PlaybackState | undefined;
5694
- /** --- Emission Bursts --- */
5695
- bursts?: PBParticleSystem_BurstConfiguration | undefined;
5696
- }
5697
-
5698
- /**
5699
- * @public
5700
- */
5701
- export declare namespace PBParticleSystem {
5702
- export function encode(message: PBParticleSystem, writer?: _m0.Writer): _m0.Writer;
5703
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem;
5704
- }
5705
-
5706
- /**
5707
- * @public
5708
- */
5709
- declare const enum PBParticleSystem_BlendMode {
5710
- /** PSB_ALPHA - Standard alpha transparency. */
5711
- PSB_ALPHA = 0,
5712
- /** PSB_ADD - Additive blending (brightens underlying pixels). */
5713
- PSB_ADD = 1,
5714
- /** PSB_MULTIPLY - Multiply blending (darkens underlying pixels). */
5715
- PSB_MULTIPLY = 2
5716
- }
5717
- export { PBParticleSystem_BlendMode }
5718
- export { PBParticleSystem_BlendMode as ParticleSystemBlendMode }
5719
-
5720
- /** Emitter spawns particles from the surface or volume of a box. */
5721
- /**
5722
- * @public
5723
- */
5724
- export declare interface PBParticleSystem_Box {
5725
- /** default = {1, 1, 1} */
5726
- size?: PBVector3 | undefined;
5727
- }
5728
-
5729
- /**
5730
- * @public
5731
- */
5732
- export declare namespace PBParticleSystem_Box {
5733
- export function encode(message: PBParticleSystem_Box, writer?: _m0.Writer): _m0.Writer;
5734
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Box;
5735
- }
5736
-
5737
- /**
5738
- * @public
5739
- */
5740
- export declare interface PBParticleSystem_Burst {
5741
- /** Seconds from start of cycle. */
5742
- time: number;
5743
- /** Particles to emit. */
5744
- count: number;
5745
- /** default = 1. Repeat count (0 = infinite). */
5746
- cycles?: number | undefined;
5747
- /** default = 0.01. Seconds between cycles. */
5748
- interval?: number | undefined;
5749
- /** default = 1.0. Emission chance [0,1]. */
5750
- probability?: number | undefined;
5751
- }
5752
-
5753
- /**
5754
- * @public
5755
- */
5756
- export declare namespace PBParticleSystem_Burst {
5757
- export function encode(message: PBParticleSystem_Burst, writer?: _m0.Writer): _m0.Writer;
5758
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Burst;
5759
- }
5760
-
5761
- /** Emission burst configuration. */
5762
- /**
5763
- * @public
5764
- */
5765
- export declare interface PBParticleSystem_BurstConfiguration {
5766
- values: PBParticleSystem_Burst[];
5767
- }
5768
-
5769
- /**
5770
- * @public
5771
- */
5772
- export declare namespace PBParticleSystem_BurstConfiguration {
5773
- export function encode(message: PBParticleSystem_BurstConfiguration, writer?: _m0.Writer): _m0.Writer;
5774
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_BurstConfiguration;
5775
- }
5776
-
5777
- /** Emitter spawns particles from the base of a cone and projects them outward. */
5778
- /**
5779
- * @public
5780
- */
5781
- export declare interface PBParticleSystem_Cone {
5782
- /** default = 25. Half-angle of the cone in degrees. */
5783
- angle?: number | undefined;
5784
- /** default = 1. Base radius in meters. */
5785
- radius?: number | undefined;
5786
- }
5787
-
5788
- /**
5789
- * @public
5790
- */
5791
- export declare namespace PBParticleSystem_Cone {
5792
- export function encode(message: PBParticleSystem_Cone, writer?: _m0.Writer): _m0.Writer;
5793
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Cone;
5794
- }
5795
-
5796
- /** Clamps particle speed over lifetime. */
5797
- /**
5798
- * @public
5799
- */
5800
- export declare interface PBParticleSystem_LimitVelocity {
5801
- /** Maximum particle speed (m/s). */
5802
- speed: number;
5803
- /** default = 1. Fraction (0–1) of excess velocity removed per frame. 1 = hard clamp. */
5804
- dampen?: number | undefined;
5805
- }
5806
-
5807
- /**
5808
- * @public
5809
- */
5810
- export declare namespace PBParticleSystem_LimitVelocity {
5811
- export function encode(message: PBParticleSystem_LimitVelocity, writer?: _m0.Writer): _m0.Writer;
5812
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_LimitVelocity;
5813
- }
5814
-
5815
- /**
5816
- * @public
5817
- */
5818
- declare const enum PBParticleSystem_PlaybackState {
5819
- /** PS_PLAYING - Particle system is emitting and simulating. */
5820
- PS_PLAYING = 0,
5821
- /** PS_PAUSED - Simulation is frozen; no new particles are emitted. */
5822
- PS_PAUSED = 1,
5823
- /** PS_STOPPED - Simulation stopped and existing particles cleared. */
5824
- PS_STOPPED = 2
5825
- }
5826
- export { PBParticleSystem_PlaybackState }
5827
- export { PBParticleSystem_PlaybackState as ParticleSystemPlaybackState }
5828
-
5829
- /** Emitter spawns particles from a single point. */
5830
- /**
5831
- * @public
5832
- */
5833
- export declare interface PBParticleSystem_Point {
5834
- }
5835
-
5836
- /**
5837
- * @public
5838
- */
5839
- export declare namespace PBParticleSystem_Point {
5840
- export function encode(_: PBParticleSystem_Point, writer?: _m0.Writer): _m0.Writer;
5841
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Point;
5842
- }
5843
-
5844
- /**
5845
- * @public
5846
- */
5847
- export declare const enum PBParticleSystem_SimulationSpace {
5848
- /** PSS_LOCAL - Particles move with the entity transform. */
5849
- PSS_LOCAL = 0,
5850
- /** PSS_WORLD - Particles stay in world position after emission. */
5851
- PSS_WORLD = 1
5852
- }
5853
-
5854
- /** Emitter spawns particles from the surface or volume of a sphere. */
5855
- /**
5856
- * @public
5857
- */
5858
- export declare interface PBParticleSystem_Sphere {
5859
- /** default = 1 */
5860
- radius?: number | undefined;
5861
- }
5862
-
5863
- /**
5864
- * @public
5865
- */
5866
- export declare namespace PBParticleSystem_Sphere {
5867
- export function encode(message: PBParticleSystem_Sphere, writer?: _m0.Writer): _m0.Writer;
5868
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Sphere;
5869
- }
5870
-
5871
- /** Sprite sheet (texture atlas) animation settings. */
5872
- /**
5873
- * @public
5874
- */
5875
- export declare interface PBParticleSystem_SpriteSheetAnimation {
5876
- /** Number of columns in the sprite sheet. */
5877
- tilesX: number;
5878
- /** Number of rows in the sprite sheet. */
5879
- tilesY: number;
5880
- /** default = 30. Playback speed in frames per second. */
5881
- framesPerSecond?: number | undefined;
5882
- }
5883
-
5884
- /**
5885
- * @public
5886
- */
5887
- export declare namespace PBParticleSystem_SpriteSheetAnimation {
5888
- export function encode(message: PBParticleSystem_SpriteSheetAnimation, writer?: _m0.Writer): _m0.Writer;
5889
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_SpriteSheetAnimation;
5890
- }
5891
-
5892
5495
  /**
5893
5496
  * This component applies a continuous physics force.
5894
5497
  *
@@ -6026,8 +5629,6 @@ export declare interface PBPointerEvents_Entry {
6026
5629
  eventType: PointerEventType;
6027
5630
  /** additional configuration for this detection */
6028
5631
  eventInfo: PBPointerEvents_Info | undefined;
6029
- /** the type of interaction source (default 0 == CURSOR) */
6030
- interactionType?: InteractionType | undefined;
6031
5632
  }
6032
5633
 
6033
5634
  /**
@@ -6054,8 +5655,6 @@ export declare interface PBPointerEvents_Info {
6054
5655
  showHighlight?: boolean | undefined;
6055
5656
  /** range of interaction from the avatar's position (default 0) */
6056
5657
  maxPlayerDistance?: number | undefined;
6057
- /** resolution order when multiple events overlap, higher wins (default 0) */
6058
- priority?: number | undefined;
6059
5658
  }
6060
5659
 
6061
5660
  /**
@@ -6932,7 +6531,6 @@ export declare namespace PBVideoPlayer {
6932
6531
  * an 'instant' transition (like using speed/time = 0)
6933
6532
  * * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
6934
6533
  * the holding entity transform).
6935
- * * The fov defines the Field of View of the virtual camera
6936
6534
  */
6937
6535
  /**
6938
6536
  * @public
@@ -6940,8 +6538,6 @@ export declare namespace PBVideoPlayer {
6940
6538
  export declare interface PBVirtualCamera {
6941
6539
  defaultTransition?: CameraTransition | undefined;
6942
6540
  lookAtEntity?: number | undefined;
6943
- /** default: 60 */
6944
- fov?: number | undefined;
6945
6541
  }
6946
6542
 
6947
6543
  /**
@@ -6976,92 +6572,12 @@ export declare namespace PBVisibilityComponent {
6976
6572
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBVisibilityComponent;
6977
6573
  }
6978
6574
 
6979
- /**
6980
- * @public
6981
- * Physics helpers for applying impulses and forces to the player.
6982
- */
6983
- export declare const Physics: PhysicsSystem;
6984
-
6985
6575
  /** @public */
6986
6576
  export declare const PhysicsCombinedForce: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>;
6987
6577
 
6988
6578
  /** @public */
6989
6579
  export declare const PhysicsCombinedImpulse: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>;
6990
6580
 
6991
- /**
6992
- * @public
6993
- */
6994
- export declare interface PhysicsSystem {
6995
- /**
6996
- * Apply a one-shot impulse to the player entity.
6997
- * Multiple calls within the same frame are accumulated (summed).
6998
- *
6999
- * @param vector - a single `vector` whose length encodes the strength.
7000
- * or use overload for `direction` with a separate `magnitude` — the direction will be normalized before scaling.
7001
- */
7002
- applyImpulseToPlayer(vector: Vector3Type): void;
7003
- applyImpulseToPlayer(direction: Vector3Type, magnitude: number): void;
7004
- /**
7005
- * Apply a continuous force to the player from a given source entity.
7006
- * Multiple sources are accumulated: the registry sums all active forces
7007
- * and writes a single PBPhysicsCombinedForce component.
7008
- * Calling again with the same source replaces its previous force.
7009
- *
7010
- * @param source - Entity key identifying this force source
7011
- * @param vector - single `vector` whose length encodes the strength
7012
- * or use overload for `direction` with a separate `magnitude` — the direction will be normalized before scaling.
7013
- */
7014
- applyForceToPlayer(source: Entity, vector: Vector3Type): void;
7015
- applyForceToPlayer(source: Entity, direction: Vector3Type, magnitude: number): void;
7016
- /**
7017
- * Remove a continuous force from the player. Remaining sources are
7018
- * re-summed; if none remain the force is cleared. No-op if the source
7019
- * is not registered.
7020
- *
7021
- * @param source - Entity key identifying the force source to remove
7022
- */
7023
- removeForceFromPlayer(source: Entity): void;
7024
- /**
7025
- * Push the player away from a point. Computes direction from
7026
- * `fromPosition` to the player, applies falloff, and delegates
7027
- * to applyImpulseToPlayer.
7028
- *
7029
- * If the player is exactly at `fromPosition`, pushes upward.
7030
- *
7031
- * @param fromPosition - world-space origin of the knockback (explosion center, enemy position, etc.)
7032
- * @param magnitude - base impulse strength
7033
- * @param radius - max distance of effect (default: Infinity)
7034
- * @param falloff - how force decreases with distance (default: CONSTANT)
7035
- */
7036
- applyKnockbackToPlayer(fromPosition: Vector3Type, magnitude: number, radius?: number, falloff?: KnockbackFalloff): void;
7037
- /**
7038
- * Apply a continuous force to the player for a limited duration.
7039
- * After `duration` seconds the force is automatically removed.
7040
- * Calling again with the same source resets the timer.
7041
- *
7042
- * @param source - Entity key identifying this force source
7043
- * @param duration - how long the force lasts, in seconds
7044
- * @param vector - single `vector` whose length encodes the strength
7045
- * or use overload for `direction` with a separate `magnitude` — the direction will be normalized before scaling.
7046
- */
7047
- applyForceToPlayerForDuration(source: Entity, duration: number, vector: Vector3Type): void;
7048
- applyForceToPlayerForDuration(source: Entity, duration: number, direction: Vector3Type, magnitude: number): void;
7049
- /**
7050
- * Apply a continuous repulsion force that pushes the player away from a point,
7051
- * recalculating direction every tick as the player moves.
7052
- * Remove with `removeForceFromPlayer(source)`.
7053
- *
7054
- * Negative magnitude = attraction (pulls toward the source).
7055
- *
7056
- * @param source - Entity key identifying this force source
7057
- * @param fromPosition - world-space origin of repulsion
7058
- * @param magnitude - base force strength
7059
- * @param radius - max distance of effect (default: Infinity)
7060
- * @param falloff - how force decreases with distance (default: CONSTANT)
7061
- */
7062
- applyRepulsionForceToPlayer(source: Entity, fromPosition: Vector3Type, magnitude: number, radius?: number, falloff?: KnockbackFalloff): void;
7063
- }
7064
-
7065
6581
  /**
7066
6582
  * Represens a plane by the equation ax + by + cz + d = 0
7067
6583
  * @public
@@ -7217,30 +6733,6 @@ export declare interface PointerEventsSystem {
7217
6733
  * @param entity - Entity where the callback was attached
7218
6734
  */
7219
6735
  removeOnPointerHoverLeave(entity: Entity): void;
7220
- /**
7221
- * @public
7222
- * Remove the callback for onProximityDown event
7223
- * @param entity - Entity where the callback was attached
7224
- */
7225
- removeOnProximityDown(entity: Entity): void;
7226
- /**
7227
- * @public
7228
- * Remove the callback for onProximityUp event
7229
- * @param entity - Entity where the callback was attached
7230
- */
7231
- removeOnProximityUp(entity: Entity): void;
7232
- /**
7233
- * @public
7234
- * Remove the callback for onProximityEnter event
7235
- * @param entity - Entity where the callback was attached
7236
- */
7237
- removeOnProximityEnter(entity: Entity): void;
7238
- /**
7239
- * @public
7240
- * Remove the callback for onProximityLeave event
7241
- * @param entity - Entity where the callback was attached
7242
- */
7243
- removeOnProximityLeave(entity: Entity): void;
7244
6736
  /**
7245
6737
  * @public
7246
6738
  * Execute callback when the user press the InputButton pointing at the entity
@@ -7295,46 +6787,6 @@ export declare interface PointerEventsSystem {
7295
6787
  entity: Entity;
7296
6788
  opts?: Partial<EventSystemOptions>;
7297
6789
  }, cb: EventSystemCallback): void;
7298
- /**
7299
- * @public
7300
- * Execute callback when the user presses the proximity button on the entity
7301
- * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
7302
- * @param cb - Function to execute when click fires
7303
- */
7304
- onProximityDown(pointerData: {
7305
- entity: Entity;
7306
- opts?: Partial<EventSystemOptions>;
7307
- }, cb: EventSystemCallback): void;
7308
- /**
7309
- * @public
7310
- * Execute callback when the user releases the proximity button on the entity
7311
- * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
7312
- * @param cb - Function to execute when event fires
7313
- */
7314
- onProximityUp(pointerData: {
7315
- entity: Entity;
7316
- opts?: Partial<EventSystemOptions>;
7317
- }, cb: EventSystemCallback): void;
7318
- /**
7319
- * @public
7320
- * Execute callback when the entity enters the proximity zone of the user
7321
- * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
7322
- * @param cb - Function to execute when event fires
7323
- */
7324
- onProximityEnter(pointerData: {
7325
- entity: Entity;
7326
- opts?: Partial<EventSystemOptions>;
7327
- }, cb: EventSystemCallback): void;
7328
- /**
7329
- * @public
7330
- * Execute callback when the entity leaves the proximity zone of the user
7331
- * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
7332
- * @param cb - Function to execute when event fires
7333
- */
7334
- onProximityLeave(pointerData: {
7335
- entity: Entity;
7336
- opts?: Partial<EventSystemOptions>;
7337
- }, cb: EventSystemCallback): void;
7338
6790
  }
7339
6791
 
7340
6792
  /**
@@ -7351,9 +6803,7 @@ export declare const enum PointerEventType {
7351
6803
  PET_UP = 0,
7352
6804
  PET_DOWN = 1,
7353
6805
  PET_HOVER_ENTER = 2,
7354
- PET_HOVER_LEAVE = 3,
7355
- PET_PROXIMITY_ENTER = 4,
7356
- PET_PROXIMITY_LEAVE = 5
6806
+ PET_HOVER_LEAVE = 3
7357
6807
  }
7358
6808
 
7359
6809
  /**
@@ -8248,13 +7698,6 @@ export declare namespace RotateContinuous {
8248
7698
  export function decode(input: _m0.Reader | Uint8Array, length?: number): RotateContinuous;
8249
7699
  }
8250
7700
 
8251
- /**
8252
- * @public
8253
- * Rotate a vector by a quaternion
8254
- * Uses the formula: v' = q * v * q^(-1), optimized version
8255
- */
8256
- export declare function rotateVectorByQuaternion(v: Vector3Type, q: QuaternionType): Vector3Type;
8257
-
8258
7701
  export declare type RPCSendableMessage = {
8259
7702
  jsonrpc: '2.0';
8260
7703
  id: number;
@@ -8951,18 +8394,6 @@ export declare type TransformComponent = LastWriteWinElementSetComponentDefiniti
8951
8394
  export declare interface TransformComponentExtended extends TransformComponent {
8952
8395
  create(entity: Entity, val?: TransformTypeWithOptionals): TransformType;
8953
8396
  createOrReplace(entity: Entity, val?: TransformTypeWithOptionals): TransformType;
8954
- /**
8955
- * Transforms a direction vector from an entity's local coordinate space
8956
- * to world space, accounting for the full parent hierarchy.
8957
- *
8958
- * This applies only rotation (not translation or scale) — suitable for
8959
- * direction vectors like force/impulse directions.
8960
- *
8961
- * @param entity - The source entity whose local space defines the direction
8962
- * @param localDirection - Direction vector in the entity's local coordinates
8963
- * @returns The direction vector in world coordinates
8964
- */
8965
- localToWorldDirection(entity: Entity, localDirection: Vector3Type): Vector3Type;
8966
8397
  }
8967
8398
 
8968
8399
  /**
@@ -9513,6 +8944,14 @@ export declare interface UiTransformProps {
9513
8944
  */
9514
8945
  export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
9515
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
+
9516
8955
  /**
9517
8956
  * @public
9518
8957
  */