@dcl/playground-assets 7.4.18 → 7.4.19-8818968750.commit-6d2ec97

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.
@@ -1245,6 +1245,7 @@ export declare const componentDefinitionByName: {
1245
1245
  "core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
1246
1246
  "core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
1247
1247
  "core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
1248
+ "core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
1248
1249
  "core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
1249
1250
  "core::Tween": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTween>>;
1250
1251
  "core::TweenSequence": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTweenSequence>>;
@@ -1787,13 +1788,6 @@ export declare function Engine(options?: IEngineOptions): IEngine;
1787
1788
  */
1788
1789
  export declare const engine: IEngine;
1789
1790
 
1790
- /** @public */
1791
- export declare type EngineEvent<T extends IEventNames = IEventNames, V = IEvents[T]> = {
1792
- /** eventName */
1793
- type: T;
1794
- data: Readonly<V>;
1795
- };
1796
-
1797
1791
  /** @public */
1798
1792
  export declare const EngineInfo: LastWriteWinElementSetComponentDefinition<PBEngineInfo>;
1799
1793
 
@@ -1966,39 +1960,12 @@ export declare function getComponentEntityTree<T>(engine: Pick<IEngine, 'getEnti
1966
1960
  */
1967
1961
  export declare function getCompositeRootComponent(engine: IEngine): LastWriteWinElementSetComponentDefinition<CompositeRootType>;
1968
1962
 
1969
- /** @public */
1970
- export declare type GizmoDragEndEvent = {
1971
- type: 'gizmoDragEnded';
1972
- transforms: Array<{
1973
- position: Vector3Type;
1974
- rotation: QuaternionType;
1975
- scale: Vector3Type;
1976
- entityId: unknown;
1977
- }>;
1978
- };
1979
-
1980
- /** @public */
1981
- export declare type GizmoSelectedEvent = {
1982
- type: 'gizmoSelected';
1983
- gizmoType: 'MOVE' | 'ROTATE' | 'SCALE' | 'NONE';
1984
- entities: string[];
1985
- };
1986
-
1987
1963
  export declare type GlobalDirectionRaycastOptions = RaycastSystemOptions & GlobalDirectionRaycastSystemOptions;
1988
1964
 
1989
1965
  export declare type GlobalDirectionRaycastSystemOptions = {
1990
1966
  direction?: PBVector3;
1991
1967
  };
1992
1968
 
1993
- /** @public */
1994
- export declare type GlobalInputEventResult = InputEventResult & {
1995
- /**
1996
- * DOWN = 0,
1997
- * UP = 1
1998
- */
1999
- type: 0 | 1;
2000
- };
2001
-
2002
1969
  export declare type GlobalTargetRaycastOptions = RaycastSystemOptions & GlobalTargetRaycastSystemOptions;
2003
1970
 
2004
1971
  export declare type GlobalTargetRaycastSystemOptions = {
@@ -2245,156 +2212,9 @@ export declare type IEventNames = keyof IEvents;
2245
2212
  * Note: Don't use `on` prefix for IEvents to avoid redundancy with `event.on("onEventName")` syntax.
2246
2213
  */
2247
2214
  export declare interface IEvents {
2248
- /**
2249
- * `positionChanged` is triggered when the position of the camera changes
2250
- * This event is throttled to 10 times per second.
2251
- */
2252
- positionChanged: {
2253
- /** Camera position relative to the base parcel of the scene */
2254
- position: Vector3Type;
2255
- /** Camera position, this is a absolute world position */
2256
- cameraPosition: Vector3Type;
2257
- /** Eye height, in meters. */
2258
- playerHeight: number;
2259
- };
2260
- /**
2261
- * `rotationChanged` is triggered when the rotation of the camera changes.
2262
- * This event is throttled to 10 times per second.
2263
- */
2264
- rotationChanged: {
2265
- /** Degree vector. Same as entities */
2266
- rotation: Vector3Type;
2267
- /** Rotation quaternion, useful in some scenarios. */
2268
- quaternion: QuaternionType;
2269
- };
2270
- /**
2271
- * `cameraModeChanged` is triggered when the user changes the camera mode
2272
- */
2273
- cameraModeChanged: {
2274
- /**
2275
- * FIRST_PERSON = 0,
2276
- * THIRD_PERSON = 1,
2277
- * FREE_CAMERA = 2
2278
- */
2279
- cameraMode: 0 | 1 | 2;
2280
- };
2281
- /**
2282
- * `idleStateChanged` is triggered when the user not moves for a defined period of time
2283
- */
2284
- idleStateChanged: {
2285
- isIdle: boolean;
2286
- };
2287
2215
  playerExpression: {
2288
2216
  expressionId: string;
2289
2217
  };
2290
- /**
2291
- * `pointerUp` is triggered when the user releases an input pointer.
2292
- * It could be a VR controller, a touch screen or the mouse.
2293
- */
2294
- pointerUp: InputEventResult;
2295
- /**
2296
- * `pointerDown` is triggered when the user press an input pointer.
2297
- * It could be a VR controller, a touch screen or the mouse.
2298
- */
2299
- pointerDown: InputEventResult;
2300
- /**
2301
- * `pointerEvent` is triggered when the user press or releases an input pointer.
2302
- * It could be a VR controller, a touch screen or the mouse.
2303
- *
2304
- * @deprecated use actionButtonEvent instead
2305
- */
2306
- pointerEvent: GlobalInputEventResult;
2307
- /**
2308
- * `actionButtonEvent` is triggered when the user press or releases an input pointer.
2309
- * It could be a VR controller, a touch screen or the mouse.
2310
- *
2311
- * This event is exactly the same as `pointerEvent` but the logic in the ECS had an unsolvable
2312
- * condition that required us to create this new event to handle more cases for new buttons.
2313
- */
2314
- actionButtonEvent: GlobalInputEventResult;
2315
- /**
2316
- * `raycastResponse` is triggered in response to a raycast query
2317
- */
2318
- raycastResponse: RaycastResponsePayload<any>;
2319
- /**
2320
- * `chatMessage` is triggered when the user sends a message through chat entity.
2321
- */
2322
- chatMessage: {
2323
- id: string;
2324
- sender: string;
2325
- message: string;
2326
- isCommand: boolean;
2327
- };
2328
- /**
2329
- * `onChange` is triggered when an entity changes its own internal state.
2330
- * Dispatched by the `ui-*` entities when their value is changed. It triggers a callback.
2331
- * Notice: Only entities with ID will be listening for click events.
2332
- */
2333
- onChange: {
2334
- value?: any;
2335
- /** ID of the pointer that triggered the event */
2336
- pointerId?: number;
2337
- };
2338
- /**
2339
- * `onEnter` is triggered when the user hits the "Enter" key from the keyboard
2340
- * Used principally by the Chat internal scene
2341
- */
2342
- onEnter: unknown;
2343
- /**
2344
- * `onPointerLock` is triggered when the user clicks the world canvas and the
2345
- * pointer locks to it so the pointer moves the camera
2346
- */
2347
- onPointerLock: {
2348
- locked?: boolean;
2349
- };
2350
- /**
2351
- * `onAnimationEnd` is triggered when an animation clip gets finish
2352
- */
2353
- onAnimationEnd: {
2354
- clipName: string;
2355
- };
2356
- /**
2357
- * `onFocus` is triggered when an entity focus is active.
2358
- * Dispatched by the `ui-input` and `ui-password` entities when the value is changed.
2359
- * It triggers a callback.
2360
- *
2361
- * Notice: Only entities with ID will be listening for click events.
2362
- */
2363
- onFocus: {
2364
- /** ID of the entitiy of the event */
2365
- entityId: unknown;
2366
- /** ID of the pointer that triggered the event */
2367
- pointerId: number;
2368
- };
2369
- /**
2370
- * `onBlur` is triggered when an entity loses its focus.
2371
- * Dispatched by the `ui-input` and `ui-password` entities when the value is changed.
2372
- * It triggers a callback.
2373
- *
2374
- * Notice: Only entities with ID will be listening for click events.
2375
- */
2376
- onBlur: {
2377
- /** ID of the entitiy of the event */
2378
- entityId: unknown;
2379
- /** ID of the pointer that triggered the event */
2380
- pointerId: number;
2381
- };
2382
- /** The onClick event is only used for UI elements */
2383
- onClick: {
2384
- entityId: unknown;
2385
- };
2386
- /**
2387
- * This event gets triggered when an entity leaves the scene fences.
2388
- */
2389
- entityOutOfScene: {
2390
- entityId: unknown;
2391
- };
2392
- /**
2393
- * This event gets triggered when an entity enters the scene fences.
2394
- */
2395
- entityBackInScene: {
2396
- entityId: unknown;
2397
- };
2398
2218
  /**
2399
2219
  * This event gets triggered when the user enters the scene
2400
2220
  */
@@ -2418,46 +2238,6 @@ export declare interface IEvents {
2418
2238
  * This is triggered once the scene should start.
2419
2239
  */
2420
2240
  sceneStart: unknown;
2421
- /**
2422
- * This is triggered once the builder scene is loaded.
2423
- */
2424
- builderSceneStart: unknown;
2425
- /**
2426
- * This is triggered once the builder scene is unloaded.
2427
- */
2428
- builderSceneUnloaded: unknown;
2429
- /**
2430
- * After checking entities outside the fences, if any is outside, this event
2431
- * will be triggered with all the entities outside the scene.
2432
- */
2433
- entitiesOutOfBoundaries: {
2434
- entities: string[];
2435
- };
2436
- uuidEvent: {
2437
- uuid: string;
2438
- payload: any;
2439
- };
2440
- onTextSubmit: {
2441
- text: string;
2442
- };
2443
- metricsUpdate: {
2444
- given: Record<string, number>;
2445
- limit: Record<string, number>;
2446
- };
2447
- limitsExceeded: {
2448
- given: Record<string, number>;
2449
- limit: Record<string, number>;
2450
- };
2451
- /** For gizmos */
2452
- gizmoEvent: GizmoDragEndEvent | GizmoSelectedEvent;
2453
- externalAction: {
2454
- type: string;
2455
- [key: string]: any;
2456
- };
2457
- stateEvent: {
2458
- type: string;
2459
- payload: any;
2460
- };
2461
2241
  /** This is triggered at least for each videoStatus change */
2462
2242
  videoEvent: {
2463
2243
  componentId: string;
@@ -2498,10 +2278,6 @@ export declare interface IEvents {
2498
2278
  distance: number;
2499
2279
  };
2500
2280
  };
2501
- /** Triggered when pointer start hovering an entities' shape */
2502
- pointerHoverEnter: unknown;
2503
- /** Triggered when pointer stop hovering an entities' shape */
2504
- pointerHoverExit: unknown;
2505
2281
  }
2506
2282
 
2507
2283
  /**
@@ -2600,31 +2376,6 @@ export declare const enum InputAction {
2600
2376
  IA_ACTION_6 = 13
2601
2377
  }
2602
2378
 
2603
- /** @public */
2604
- export declare type InputEventResult = {
2605
- /** Origin of the ray, relative to the scene */
2606
- origin: Vector3Type;
2607
- /** Direction vector of the ray (normalized) */
2608
- direction: Vector3Type;
2609
- /** ID of the pointer that triggered the event */
2610
- buttonId: number;
2611
- /** Does this pointer event hit any object? */
2612
- hit?: {
2613
- /** Length of the ray */
2614
- length: number;
2615
- /** If the ray hits a mesh the intersection point will be this */
2616
- hitPoint: Vector3Type;
2617
- /** If the mesh has a name, it will be assigned to meshName */
2618
- meshName: string;
2619
- /** Normal of the hit */
2620
- normal: Vector3Type;
2621
- /** Normal of the hit, in world space */
2622
- worldNormal: Vector3Type;
2623
- /** Hit entity ID if any */
2624
- entityId: unknown;
2625
- };
2626
- };
2627
-
2628
2379
  /**
2629
2380
  * @public
2630
2381
  * Input system manager. Check for button events
@@ -5181,6 +4932,26 @@ export declare namespace PBRaycastResult {
5181
4932
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBRaycastResult;
5182
4933
  }
5183
4934
 
4935
+ /**
4936
+ * @public
4937
+ */
4938
+ export declare interface PBRealmInfo {
4939
+ baseUrl: string;
4940
+ realmName: string;
4941
+ networkId: number;
4942
+ commsAdapter: string;
4943
+ isPreview: boolean;
4944
+ room?: string | undefined;
4945
+ }
4946
+
4947
+ /**
4948
+ * @public
4949
+ */
4950
+ export declare namespace PBRealmInfo {
4951
+ export function encode(message: PBRealmInfo, writer?: _m0.Writer): _m0.Writer;
4952
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBRealmInfo;
4953
+ }
4954
+
5184
4955
  /**
5185
4956
  * The TextShape component renders customizable floating text.
5186
4957
  *
@@ -6324,13 +6095,6 @@ export declare const enum RaycastQueryType {
6324
6095
  RQT_NONE = 2
6325
6096
  }
6326
6097
 
6327
- /** @public */
6328
- export declare type RaycastResponsePayload<T> = {
6329
- queryId: string;
6330
- queryType: string;
6331
- payload: T;
6332
- };
6333
-
6334
6098
  /** @public */
6335
6099
  export declare const RaycastResult: LastWriteWinElementSetComponentDefinition<PBRaycastResult>;
6336
6100
 
@@ -6531,6 +6295,9 @@ export declare type ReadOnlyLastWriteWinElementSetComponentDefinition<T> = Omit<
6531
6295
  */
6532
6296
  export declare type ReadonlyPrimitive = number | string | number[] | string[] | boolean | boolean[];
6533
6297
 
6298
+ /** @public */
6299
+ export declare const RealmInfo: LastWriteWinElementSetComponentDefinition<PBRealmInfo>;
6300
+
6534
6301
  /**
6535
6302
  * @public
6536
6303
  */