@dcl/playground-assets 7.8.1 → 7.8.2-14264974837.commit-e768832
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 +815 -18
- package/dist/beta.d.ts +815 -18
- package/dist/index.bundled.d.ts +815 -18
- package/dist/index.js +7 -7
- package/dist/index.js.map +4 -4
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +815 -18
- package/etc/playground-assets.api.json +10141 -2299
- package/etc/playground-assets.api.md +534 -20
- package/package.json +4 -4
package/dist/alpha.d.ts
CHANGED
@@ -178,11 +178,32 @@ export declare const AvatarAttach: LastWriteWinElementSetComponentDefinition<PBA
|
|
178
178
|
/** @public */
|
179
179
|
export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
|
180
180
|
|
181
|
+
/**
|
182
|
+
* @public
|
183
|
+
*/
|
184
|
+
export declare const enum AvatarControlType {
|
185
|
+
/** CCT_NONE - avatar cannot move */
|
186
|
+
CCT_NONE = 0,
|
187
|
+
/** CCT_RELATIVE - avatar moves relative to the camera origin */
|
188
|
+
CCT_RELATIVE = 1,
|
189
|
+
/** CCT_TANK - avatar moves like a tank: left/right rotate the player, forward/backward advance/retreat the player */
|
190
|
+
CCT_TANK = 2
|
191
|
+
}
|
192
|
+
|
181
193
|
/** @public */
|
182
194
|
export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>;
|
183
195
|
|
184
|
-
|
185
|
-
|
196
|
+
export declare const AvatarEquippedData: AvatarEquippedDataComponentDefinitionExtended;
|
197
|
+
|
198
|
+
/**
|
199
|
+
* @public
|
200
|
+
*/
|
201
|
+
export declare interface AvatarEquippedDataComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<AvatarEquippedDataType> {
|
202
|
+
}
|
203
|
+
|
204
|
+
export declare type AvatarEquippedDataType = Omit<PBAvatarEquippedData, 'forceRender'> & {
|
205
|
+
forceRender?: string[] | undefined;
|
206
|
+
};
|
186
207
|
|
187
208
|
/** @public */
|
188
209
|
export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
|
@@ -198,8 +219,48 @@ export declare const enum AvatarModifierType {
|
|
198
219
|
AMT_DISABLE_PASSPORTS = 1
|
199
220
|
}
|
200
221
|
|
201
|
-
/**
|
202
|
-
|
222
|
+
/**
|
223
|
+
* @public
|
224
|
+
*/
|
225
|
+
export declare interface AvatarMovementSettings {
|
226
|
+
controlMode?: AvatarControlType | undefined;
|
227
|
+
/** if not explicitly set, the following properties default to user's preference settings */
|
228
|
+
runSpeed?: number | undefined;
|
229
|
+
/** how fast the player gets up to speed or comes to rest. higher = more responsive */
|
230
|
+
friction?: number | undefined;
|
231
|
+
/** how fast the player accelerates vertically when not on a solid surface, in m/s. should normally be negative */
|
232
|
+
gravity?: number | undefined;
|
233
|
+
/** how high the player can jump, in meters. should normally be positive. gravity must have the same sign for jumping to be possible */
|
234
|
+
jumpHeight?: number | undefined;
|
235
|
+
/** max fall speed in m/s. should normally be negative */
|
236
|
+
maxFallSpeed?: number | undefined;
|
237
|
+
/** speed the player turns in tank mode, in radians/s */
|
238
|
+
turnSpeed?: number | undefined;
|
239
|
+
/** speed the player walks at, in m/s */
|
240
|
+
walkSpeed?: number | undefined;
|
241
|
+
/** whether to allow player to move at a slower speed (e.g. with a walk-key or when using a gamepad/joystick). defaults to true */
|
242
|
+
allowWeightedMovement?: boolean | undefined;
|
243
|
+
}
|
244
|
+
|
245
|
+
/**
|
246
|
+
* @public
|
247
|
+
*/
|
248
|
+
export declare namespace AvatarMovementSettings {
|
249
|
+
export function encode(message: AvatarMovementSettings, writer?: _m0.Writer): _m0.Writer;
|
250
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): AvatarMovementSettings;
|
251
|
+
}
|
252
|
+
|
253
|
+
export declare const AvatarShape: AvatarShapeComponentDefinitionExtended;
|
254
|
+
|
255
|
+
/**
|
256
|
+
* @public
|
257
|
+
*/
|
258
|
+
export declare interface AvatarShapeComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<AvatarShapeType> {
|
259
|
+
}
|
260
|
+
|
261
|
+
export declare type AvatarShapeType = Omit<PBAvatarShape, 'forceRender'> & {
|
262
|
+
forceRender?: string[] | undefined;
|
263
|
+
};
|
203
264
|
|
204
265
|
/**
|
205
266
|
* @public
|
@@ -473,6 +534,12 @@ export declare interface ByteBuffer {
|
|
473
534
|
*/
|
474
535
|
export declare type Callback = () => void;
|
475
536
|
|
537
|
+
/** @public */
|
538
|
+
export declare const CameraLayer: LastWriteWinElementSetComponentDefinition<PBCameraLayer>;
|
539
|
+
|
540
|
+
/** @public */
|
541
|
+
export declare const CameraLayers: LastWriteWinElementSetComponentDefinition<PBCameraLayers>;
|
542
|
+
|
476
543
|
/** @public */
|
477
544
|
export declare const CameraMode: LastWriteWinElementSetComponentDefinition<PBCameraMode>;
|
478
545
|
|
@@ -530,6 +597,39 @@ export declare const enum CameraType {
|
|
530
597
|
|
531
598
|
export declare type Children = ReactEcs.JSX.ReactNode;
|
532
599
|
|
600
|
+
/**
|
601
|
+
* @public
|
602
|
+
*/
|
603
|
+
export declare interface CinematicSettings {
|
604
|
+
/** Entity that defines the cinematic camera transform. */
|
605
|
+
cameraEntity: number;
|
606
|
+
/**
|
607
|
+
* Position -> camera's position
|
608
|
+
* Rotation -> camera's direction
|
609
|
+
* scale.z -> zoom level
|
610
|
+
* scale.x and scale.y -> unused
|
611
|
+
*/
|
612
|
+
allowManualRotation?: boolean | undefined;
|
613
|
+
/** how far the camera can rotate around the y-axis / look left/right, in radians. default unrestricted */
|
614
|
+
yawRange?: number | undefined;
|
615
|
+
/** how far the camera can rotate around the x-axis / look up-down, in radians. default unrestricted */
|
616
|
+
pitchRange?: number | undefined;
|
617
|
+
/** note: cameras can never look up/down further than Vec3::Y */
|
618
|
+
rollRange?: number | undefined;
|
619
|
+
/** minimum zoom level. must be greater than 0. defaults to the input zoom level */
|
620
|
+
zoomMin?: number | undefined;
|
621
|
+
/** maximum zoom level. must be greater than 0. defaults to the input zoom level */
|
622
|
+
zoomMax?: number | undefined;
|
623
|
+
}
|
624
|
+
|
625
|
+
/**
|
626
|
+
* @public
|
627
|
+
*/
|
628
|
+
export declare namespace CinematicSettings {
|
629
|
+
export function encode(message: CinematicSettings, writer?: _m0.Writer): _m0.Writer;
|
630
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): CinematicSettings;
|
631
|
+
}
|
632
|
+
|
533
633
|
/** ColliderLayer determines the kind of collision to detect, in OR-able bit flag form. */
|
534
634
|
/**
|
535
635
|
* @public
|
@@ -1303,12 +1403,18 @@ export declare const componentDefinitionByName: {
|
|
1303
1403
|
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
1304
1404
|
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
1305
1405
|
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
1406
|
+
"core::CameraLayer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraLayer>>;
|
1407
|
+
"core::CameraLayers": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraLayers>>;
|
1306
1408
|
"core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
|
1307
1409
|
"core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
|
1308
1410
|
"core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
|
1411
|
+
"core::GlobalLight": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGlobalLight>>;
|
1309
1412
|
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
1310
1413
|
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
1414
|
+
"core::GltfNode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfNode>>;
|
1415
|
+
"core::GltfNodeState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfNodeState>>;
|
1311
1416
|
"core::InputModifier": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
1417
|
+
"core::Light": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBLight>>;
|
1312
1418
|
"core::MainCamera": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMainCamera>>;
|
1313
1419
|
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
1314
1420
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
@@ -1318,19 +1424,24 @@ export declare const componentDefinitionByName: {
|
|
1318
1424
|
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
1319
1425
|
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
1320
1426
|
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
1427
|
+
"core::PrimaryPointerInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPrimaryPointerInfo>>;
|
1321
1428
|
"core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
|
1322
1429
|
"core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
|
1323
1430
|
"core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
|
1431
|
+
"core::Spotlight": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSpotlight>>;
|
1324
1432
|
"core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
|
1433
|
+
"core::TextureCamera": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextureCamera>>;
|
1325
1434
|
"core::Tween": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTween>>;
|
1326
1435
|
"core::TweenSequence": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTweenSequence>>;
|
1327
1436
|
"core::TweenState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTweenState>>;
|
1328
1437
|
"core::UiBackground": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiBackground>>;
|
1438
|
+
"core::UiCanvas": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiCanvas>>;
|
1329
1439
|
"core::UiCanvasInformation": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiCanvasInformation>>;
|
1330
1440
|
"core::UiDropdown": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
|
1331
1441
|
"core::UiDropdownResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
|
1332
1442
|
"core::UiInput": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
|
1333
1443
|
"core::UiInputResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputResult>>;
|
1444
|
+
"core::UiScrollResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiScrollResult>>;
|
1334
1445
|
"core::UiText": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiText>>;
|
1335
1446
|
"core::UiTransform": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiTransform>>;
|
1336
1447
|
"core::VideoEvent": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBVideoEvent>>;
|
@@ -1901,6 +2012,9 @@ export declare type EntityComponents = {
|
|
1901
2012
|
onMouseUp: Callback;
|
1902
2013
|
onMouseEnter: Callback;
|
1903
2014
|
onMouseLeave: Callback;
|
2015
|
+
onMouseDrag: Callback;
|
2016
|
+
onMouseDragLocked: Callback;
|
2017
|
+
onMouseDragEnd: Callback;
|
1904
2018
|
};
|
1905
2019
|
|
1906
2020
|
/** @public */
|
@@ -2052,6 +2166,9 @@ export declare type GlobalDirectionRaycastSystemOptions = {
|
|
2052
2166
|
direction?: PBVector3;
|
2053
2167
|
};
|
2054
2168
|
|
2169
|
+
/** @public */
|
2170
|
+
export declare const GlobalLight: LastWriteWinElementSetComponentDefinition<PBGlobalLight>;
|
2171
|
+
|
2055
2172
|
export declare type GlobalTargetRaycastOptions = RaycastSystemOptions & GlobalTargetRaycastSystemOptions;
|
2056
2173
|
|
2057
2174
|
export declare type GlobalTargetRaycastSystemOptions = {
|
@@ -2064,6 +2181,21 @@ export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PB
|
|
2064
2181
|
/** @public */
|
2065
2182
|
export declare const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
|
2066
2183
|
|
2184
|
+
/** @public */
|
2185
|
+
export declare const GltfNode: LastWriteWinElementSetComponentDefinition<PBGltfNode>;
|
2186
|
+
|
2187
|
+
/** @public */
|
2188
|
+
export declare const GltfNodeState: LastWriteWinElementSetComponentDefinition<PBGltfNodeState>;
|
2189
|
+
|
2190
|
+
/**
|
2191
|
+
* @public
|
2192
|
+
*/
|
2193
|
+
export declare const enum GltfNodeStateValue {
|
2194
|
+
GNSV_PENDING = 0,
|
2195
|
+
GNSV_FAILED = 1,
|
2196
|
+
GNSV_READY = 2
|
2197
|
+
}
|
2198
|
+
|
2067
2199
|
/**
|
2068
2200
|
* @public
|
2069
2201
|
*/
|
@@ -2667,6 +2799,9 @@ export declare interface LastWriteWinElementSetComponentDefinition<T> extends Ba
|
|
2667
2799
|
getOrCreateMutable(entity: Entity, initialValue?: T): T;
|
2668
2800
|
}
|
2669
2801
|
|
2802
|
+
/** @public */
|
2803
|
+
export declare const Light: LastWriteWinElementSetComponentDefinition<PBLight>;
|
2804
|
+
|
2670
2805
|
/**
|
2671
2806
|
* User key event Listeners
|
2672
2807
|
* @public
|
@@ -2680,6 +2815,12 @@ export declare type Listeners = {
|
|
2680
2815
|
onMouseEnter?: Callback;
|
2681
2816
|
/** triggered on mouse leave event */
|
2682
2817
|
onMouseLeave?: Callback;
|
2818
|
+
/** triggered on mouse drag event */
|
2819
|
+
onMouseDrag?: Callback;
|
2820
|
+
/** triggered on mouse drag event */
|
2821
|
+
onMouseDragLocked?: Callback;
|
2822
|
+
/** triggered on mouse drag event */
|
2823
|
+
onMouseDragEnd?: Callback;
|
2683
2824
|
};
|
2684
2825
|
|
2685
2826
|
/**
|
@@ -3548,6 +3689,14 @@ export declare interface MeshColliderComponentDefinitionExtended extends LastWri
|
|
3548
3689
|
* @param colliderMask - the set of layer where the collider reacts, default: Physics and Pointer
|
3549
3690
|
*/
|
3550
3691
|
setSphere(entity: Entity, colliderLayers?: ColliderLayer | ColliderLayer[]): void;
|
3692
|
+
/**
|
3693
|
+
* @public
|
3694
|
+
* Set a gltf internal mesh in the MeshCollider component
|
3695
|
+
* @param entity - entity to create or replace the MeshRenderer component
|
3696
|
+
* @param source - the path to the gltf
|
3697
|
+
* @param meshName - the name of the mesh in the gltf
|
3698
|
+
*/
|
3699
|
+
setGltfMesh(entity: Entity, source: string, meshName: string, colliderLayers?: ColliderLayer | ColliderLayer[]): void;
|
3551
3700
|
}
|
3552
3701
|
|
3553
3702
|
export declare const MeshRenderer: MeshRendererComponentDefinitionExtended;
|
@@ -3584,6 +3733,14 @@ export declare interface MeshRendererComponentDefinitionExtended extends LastWri
|
|
3584
3733
|
* @param entity - entity to create or replace the MeshRenderer component
|
3585
3734
|
*/
|
3586
3735
|
setSphere(entity: Entity): void;
|
3736
|
+
/**
|
3737
|
+
* @public
|
3738
|
+
* Set a gltf internal mesh in the MeshRenderer component
|
3739
|
+
* @param entity - entity to create or replace the MeshRenderer component
|
3740
|
+
* @param source - the path to the gltf
|
3741
|
+
* @param meshName - the name of the mesh in the gltf
|
3742
|
+
*/
|
3743
|
+
setGltfMesh(entity: Entity, source: string, meshName: string): void;
|
3587
3744
|
}
|
3588
3745
|
|
3589
3746
|
/**
|
@@ -3996,6 +4153,25 @@ export declare const onVideoEvent: Observable<{
|
|
3996
4153
|
totalVideoLength: number;
|
3997
4154
|
}>;
|
3998
4155
|
|
4156
|
+
/**
|
4157
|
+
* @public
|
4158
|
+
*/
|
4159
|
+
export declare interface Orthographic {
|
4160
|
+
/**
|
4161
|
+
* vertical extent of the visible range in meters
|
4162
|
+
* defaults to 4m
|
4163
|
+
*/
|
4164
|
+
verticalRange?: number | undefined;
|
4165
|
+
}
|
4166
|
+
|
4167
|
+
/**
|
4168
|
+
* @public
|
4169
|
+
*/
|
4170
|
+
export declare namespace Orthographic {
|
4171
|
+
export function encode(message: Orthographic, writer?: _m0.Writer): _m0.Writer;
|
4172
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): Orthographic;
|
4173
|
+
}
|
4174
|
+
|
3999
4175
|
/**
|
4000
4176
|
* @public
|
4001
4177
|
* The overflow property controls what happens to content that is too big to fit into an area
|
@@ -4222,6 +4398,8 @@ export declare namespace PBAvatarEmoteCommand {
|
|
4222
4398
|
export declare interface PBAvatarEquippedData {
|
4223
4399
|
wearableUrns: string[];
|
4224
4400
|
emoteUrns: string[];
|
4401
|
+
/** slots that will render even if hidden */
|
4402
|
+
forceRender: string[];
|
4225
4403
|
}
|
4226
4404
|
|
4227
4405
|
/**
|
@@ -4256,6 +4434,9 @@ export declare interface PBAvatarModifierArea {
|
|
4256
4434
|
excludeIds: string[];
|
4257
4435
|
/** list of modifiers to apply */
|
4258
4436
|
modifiers: AvatarModifierType[];
|
4437
|
+
movementSettings?: AvatarMovementSettings | undefined;
|
4438
|
+
/** if true, the player will be considered inside the area when they are within 0.3m of the area. default true */
|
4439
|
+
useColliderRange?: boolean | undefined;
|
4259
4440
|
}
|
4260
4441
|
|
4261
4442
|
/**
|
@@ -4312,6 +4493,8 @@ export declare interface PBAvatarShape {
|
|
4312
4493
|
wearables: string[];
|
4313
4494
|
/** available emotes (default empty) */
|
4314
4495
|
emotes: string[];
|
4496
|
+
/** slots that will render even if hidden */
|
4497
|
+
forceRender: string[];
|
4315
4498
|
}
|
4316
4499
|
|
4317
4500
|
/**
|
@@ -4346,6 +4529,51 @@ export declare namespace PBBillboard {
|
|
4346
4529
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBBillboard;
|
4347
4530
|
}
|
4348
4531
|
|
4532
|
+
/**
|
4533
|
+
* @public
|
4534
|
+
*/
|
4535
|
+
export declare interface PBCameraLayer {
|
4536
|
+
/**
|
4537
|
+
* layer to which these settings apply. must be > 0
|
4538
|
+
* Layer 0 is the default "real world" layer viewed by the player and cannot be modified.
|
4539
|
+
*/
|
4540
|
+
layer: number;
|
4541
|
+
/** should the sun light affect this layer? default false */
|
4542
|
+
directionalLight?: boolean | undefined;
|
4543
|
+
/** should this layer show player avatars? default false */
|
4544
|
+
showAvatars?: boolean | undefined;
|
4545
|
+
/** should this layer show the sky? default false */
|
4546
|
+
showSkybox?: boolean | undefined;
|
4547
|
+
/** should this layer show distance fog? default false */
|
4548
|
+
showFog?: boolean | undefined;
|
4549
|
+
/** ambient light overrides for this layer. default -> use same as main camera */
|
4550
|
+
ambientColorOverride?: PBColor3 | undefined;
|
4551
|
+
ambientBrightnessOverride?: number | undefined;
|
4552
|
+
}
|
4553
|
+
|
4554
|
+
/**
|
4555
|
+
* @public
|
4556
|
+
*/
|
4557
|
+
export declare namespace PBCameraLayer {
|
4558
|
+
export function encode(message: PBCameraLayer, writer?: _m0.Writer): _m0.Writer;
|
4559
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBCameraLayer;
|
4560
|
+
}
|
4561
|
+
|
4562
|
+
/**
|
4563
|
+
* @public
|
4564
|
+
*/
|
4565
|
+
export declare interface PBCameraLayers {
|
4566
|
+
layers: number[];
|
4567
|
+
}
|
4568
|
+
|
4569
|
+
/**
|
4570
|
+
* @public
|
4571
|
+
*/
|
4572
|
+
export declare namespace PBCameraLayers {
|
4573
|
+
export function encode(message: PBCameraLayers, writer?: _m0.Writer): _m0.Writer;
|
4574
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBCameraLayers;
|
4575
|
+
}
|
4576
|
+
|
4349
4577
|
/**
|
4350
4578
|
* The CameraMode component can be used to determine whether the player is using a first-person o
|
4351
4579
|
* third-person view.
|
@@ -4368,7 +4596,7 @@ export declare namespace PBCameraMode {
|
|
4368
4596
|
|
4369
4597
|
/**
|
4370
4598
|
* The CameraModeArea component can be attached to an Entity to define a region of space where
|
4371
|
-
* the player's camera mode (1st-person
|
4599
|
+
* the player's camera mode (1st-person, 3rd-person or cinematic) is overridden.
|
4372
4600
|
*
|
4373
4601
|
* The Entity's Transform position determines the center-point of the region, while its size is
|
4374
4602
|
* given as a vector in the `area` property below. The Transform rotation is applied, but the scale
|
@@ -4378,6 +4606,8 @@ export declare namespace PBCameraMode {
|
|
4378
4606
|
*
|
4379
4607
|
* Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
|
4380
4608
|
* is actually a 3D volume.
|
4609
|
+
*
|
4610
|
+
* When mode is set to CtCinematic, the cinematic_settings field must also be provided.
|
4381
4611
|
*/
|
4382
4612
|
/**
|
4383
4613
|
* @public
|
@@ -4387,6 +4617,9 @@ export declare interface PBCameraModeArea {
|
|
4387
4617
|
area: PBVector3 | undefined;
|
4388
4618
|
/** the camera mode to enforce */
|
4389
4619
|
mode: CameraType;
|
4620
|
+
cinematicSettings?: CinematicSettings | undefined;
|
4621
|
+
/** if true, the player will be considered inside the area when they are within 0.3m of the area. default true */
|
4622
|
+
useColliderRange?: boolean | undefined;
|
4390
4623
|
}
|
4391
4624
|
|
4392
4625
|
/**
|
@@ -4458,6 +4691,39 @@ export declare namespace PBEngineInfo {
|
|
4458
4691
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBEngineInfo;
|
4459
4692
|
}
|
4460
4693
|
|
4694
|
+
/**
|
4695
|
+
* defines the global scene light settings. must be added to the scene root.
|
4696
|
+
* to control sunlight color, intensity, shadows etc, you can also add a PBLight to the scene root.
|
4697
|
+
*/
|
4698
|
+
/**
|
4699
|
+
* @public
|
4700
|
+
*/
|
4701
|
+
export declare interface PBGlobalLight {
|
4702
|
+
/**
|
4703
|
+
* the direction the directional light shines in.
|
4704
|
+
* default depends on time of day and explorer implementation
|
4705
|
+
*/
|
4706
|
+
direction?: PBVector3 | undefined;
|
4707
|
+
/**
|
4708
|
+
* ambient light color
|
4709
|
+
* default: White
|
4710
|
+
*/
|
4711
|
+
ambientColor?: PBColor3 | undefined;
|
4712
|
+
/**
|
4713
|
+
* ambient light intensity. the explorer default ambient brightness is multiplied by this non-physical quantity.
|
4714
|
+
* default 1
|
4715
|
+
*/
|
4716
|
+
ambientBrightness?: number | undefined;
|
4717
|
+
}
|
4718
|
+
|
4719
|
+
/**
|
4720
|
+
* @public
|
4721
|
+
*/
|
4722
|
+
export declare namespace PBGlobalLight {
|
4723
|
+
export function encode(message: PBGlobalLight, writer?: _m0.Writer): _m0.Writer;
|
4724
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBGlobalLight;
|
4725
|
+
}
|
4726
|
+
|
4461
4727
|
/**
|
4462
4728
|
* GltfContainer loads a GLTF file (and any additional files packaged inside) attached to an Entity.
|
4463
4729
|
*
|
@@ -4493,6 +4759,25 @@ export declare namespace PBGltfContainer {
|
|
4493
4759
|
*/
|
4494
4760
|
export declare interface PBGltfContainerLoadingState {
|
4495
4761
|
currentState: LoadingState;
|
4762
|
+
/** all node paths in the gltf, which can be used with a GltfNode to inspect and modify the gltf contents */
|
4763
|
+
nodePaths: string[];
|
4764
|
+
/** all meshes in the gltf. unnamed meshes will be auto-assigned a name of the form `MeshX` or `MeshX/PrimitiveY` */
|
4765
|
+
meshNames: string[];
|
4766
|
+
/**
|
4767
|
+
* where X is the mesh index and Y is the primitive index (and there is more than 1 primitive). note this may
|
4768
|
+
* conflict with manually named meshes - to avoid any issues make sure all your meshes are explicitly named.
|
4769
|
+
*/
|
4770
|
+
materialNames: string[];
|
4771
|
+
/**
|
4772
|
+
* X is the material index. note this may conflict with manually named materials - to avoid any issues make
|
4773
|
+
* sure all your materials are explicitly named.
|
4774
|
+
*/
|
4775
|
+
skinNames: string[];
|
4776
|
+
/**
|
4777
|
+
* X is the skin index. note this may conflict with manually named skins - to avoid any issues make sure all
|
4778
|
+
* your skins are explicitly named.
|
4779
|
+
*/
|
4780
|
+
animationNames: string[];
|
4496
4781
|
}
|
4497
4782
|
|
4498
4783
|
/**
|
@@ -4503,6 +4788,77 @@ export declare namespace PBGltfContainerLoadingState {
|
|
4503
4788
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBGltfContainerLoadingState;
|
4504
4789
|
}
|
4505
4790
|
|
4791
|
+
/**
|
4792
|
+
* a GltfNode links a scene entity with a node from within a gltf, allowing the scene to inspect it or modify it.
|
4793
|
+
* This component must be added to a direct child of an entity with a PBGltfContainer component, or
|
4794
|
+
* to a direct child of another entity with a GltfNode component, and the referenced gltf node must be a descendent of the gltf node
|
4795
|
+
* in the parent.
|
4796
|
+
* The name must match the path of one of the nodes within the Gltf. These are available on the GltfContainerLoadingState component.
|
4797
|
+
*
|
4798
|
+
* The renderer will attach a PBGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
|
4799
|
+
* - the `Transform` will be updated to match the position of the node within the gltf (relative to the gltf root, or the parent node),
|
4800
|
+
* - a `MeshRenderer` with a GltfMesh mesh type will be added (if the gltf node has a mesh).
|
4801
|
+
* - a `MeshCollider` with a GltfMesh mesh type will be added (if the gltf node has a collider).
|
4802
|
+
* - a `Material` component including a GltfMaterial reference will be added (if the gltf node has a material).
|
4803
|
+
*
|
4804
|
+
* After creation, if an animation moves the node, the `Transform` will be updated.
|
4805
|
+
*
|
4806
|
+
* From the scene, you can modify various components to alter the gltf node:
|
4807
|
+
* - modifying the `Transform` position/rotation/scale will move the node. The position is interpreted relative to the gltf root (or parent node),
|
4808
|
+
* regardless of any intermediate gltf node hierarchy.
|
4809
|
+
* If an animation is playing, the animation takes priority and the scene entity's position will be updated to match the animation.
|
4810
|
+
* - `Visibility` can be added to hide or show the node and it's children in the gltf hierarchy.
|
4811
|
+
* - `MeshRenderer` can be added/modified/removed to create/modify/remove a mesh on the node.
|
4812
|
+
* - `MeshCollider` can be added/modified/removed to create/modify/remove a collider on the node.
|
4813
|
+
* - `Material` can be added or modified to change the material properties. If the gltf node has a material, the original material will be
|
4814
|
+
* used as a base, and any gltf features (e.g. occlusion maps) from the gtlf spec that the renderer supports but that are not exposed in the
|
4815
|
+
* PBMaterial will be maintained.
|
4816
|
+
*
|
4817
|
+
* The scene can add additional entities as children to the gltf node, but structural modifications of the gltf are not possible:
|
4818
|
+
* - changing the scene hierarchy will not change the gltf node hierarchy. Moving the entity out of the gltf will sever the link and
|
4819
|
+
* change the state to `GNS_FAILED`.
|
4820
|
+
* - deleting the scene entity will not delete the gltf node.
|
4821
|
+
*
|
4822
|
+
* Removing the GltfNode will revert any changes to the original gltf. If the GltfNode component is removed and the mesh/collider/material
|
4823
|
+
* are not removed, this will result in a duplication of these components as the previously-linked entity will retain it's components and
|
4824
|
+
* the gltf node will also be displayed.
|
4825
|
+
*/
|
4826
|
+
/**
|
4827
|
+
* @public
|
4828
|
+
*/
|
4829
|
+
export declare interface PBGltfNode {
|
4830
|
+
/** the path of the target node in the Gltf. */
|
4831
|
+
path: string;
|
4832
|
+
}
|
4833
|
+
|
4834
|
+
/**
|
4835
|
+
* @public
|
4836
|
+
*/
|
4837
|
+
export declare namespace PBGltfNode {
|
4838
|
+
export function encode(message: PBGltfNode, writer?: _m0.Writer): _m0.Writer;
|
4839
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBGltfNode;
|
4840
|
+
}
|
4841
|
+
|
4842
|
+
/**
|
4843
|
+
* The state of a linked gltf node.
|
4844
|
+
* If the state is GNSV_FAILED, the renderer may describe the failure in the error string.
|
4845
|
+
*/
|
4846
|
+
/**
|
4847
|
+
* @public
|
4848
|
+
*/
|
4849
|
+
export declare interface PBGltfNodeState {
|
4850
|
+
state: GltfNodeStateValue;
|
4851
|
+
error?: string | undefined;
|
4852
|
+
}
|
4853
|
+
|
4854
|
+
/**
|
4855
|
+
* @public
|
4856
|
+
*/
|
4857
|
+
export declare namespace PBGltfNodeState {
|
4858
|
+
export function encode(message: PBGltfNodeState, writer?: _m0.Writer): _m0.Writer;
|
4859
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBGltfNodeState;
|
4860
|
+
}
|
4861
|
+
|
4506
4862
|
/**
|
4507
4863
|
* @public
|
4508
4864
|
*/
|
@@ -4542,6 +4898,62 @@ export declare namespace PBInputModifier_StandardInput {
|
|
4542
4898
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBInputModifier_StandardInput;
|
4543
4899
|
}
|
4544
4900
|
|
4901
|
+
/**
|
4902
|
+
* defines a light source.
|
4903
|
+
* the world has a default directional light (like sunlight) which can be overridden by adding the light component to the scene root.
|
4904
|
+
* a PBGlobalLight component can also be added to the root to control the directional light direction.
|
4905
|
+
* point lights (lightbulbs) or spotlights can be created by attaching the light component to non-root entities.
|
4906
|
+
*/
|
4907
|
+
/**
|
4908
|
+
* @public
|
4909
|
+
*/
|
4910
|
+
export declare interface PBLight {
|
4911
|
+
/**
|
4912
|
+
* whether the light is on
|
4913
|
+
* default true
|
4914
|
+
*/
|
4915
|
+
enabled?: boolean | undefined;
|
4916
|
+
/**
|
4917
|
+
* light brightness in lux (lumens/m^2).
|
4918
|
+
*
|
4919
|
+
* for global directional light, this applies as a constant value at all surfaces and distances (though the effect on the surface still depends on incidence angle).
|
4920
|
+
* the default global light illuminance varies from 400 (sunrise/sunset) to 10,000 (midday).
|
4921
|
+
* for typical values, see https://en.wikipedia.org/wiki/Lux#Illuminance
|
4922
|
+
*
|
4923
|
+
* for point and spot lights, this is the lumens/m^2 at 1m distance from the light. to transform from raw lumens,
|
4924
|
+
* divide lumens by ~12 (4*pi).
|
4925
|
+
* e.g. a 100w household bulb with 1200 lumens would have an illuminance of ~100.
|
4926
|
+
* a lighthouse bulb with 200,000 lumens would have an illuminance of ~15,000 (ignoring beam reflections)
|
4927
|
+
*
|
4928
|
+
* default
|
4929
|
+
* for point/spotlights: 10,000
|
4930
|
+
* for global directional light: depends on explorer implementation. may vary on light direction, time of day, etc
|
4931
|
+
*/
|
4932
|
+
illuminance?: number | undefined;
|
4933
|
+
/**
|
4934
|
+
* whether the light should cast shadows.
|
4935
|
+
* note: even when set to true the engine may not display shadows, or may only show shadows for a limited number
|
4936
|
+
* of lights depending on the implementation, platform, and user settings.
|
4937
|
+
* default
|
4938
|
+
* for point/spotlights: false / off
|
4939
|
+
* for global directional light: true / on
|
4940
|
+
*/
|
4941
|
+
shadows?: boolean | undefined;
|
4942
|
+
/**
|
4943
|
+
* light color
|
4944
|
+
* default White
|
4945
|
+
*/
|
4946
|
+
color?: PBColor3 | undefined;
|
4947
|
+
}
|
4948
|
+
|
4949
|
+
/**
|
4950
|
+
* @public
|
4951
|
+
*/
|
4952
|
+
export declare namespace PBLight {
|
4953
|
+
export function encode(message: PBLight, writer?: _m0.Writer): _m0.Writer;
|
4954
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBLight;
|
4955
|
+
}
|
4956
|
+
|
4545
4957
|
/**
|
4546
4958
|
* PBMainCamera.virtualCameraEntity defines which VirtualCamera entity is active at the moment.
|
4547
4959
|
* This component may hold 'repeated common.CameraTransition' transitionOverrides in the future
|
@@ -4573,6 +4985,14 @@ export declare interface PBMaterial {
|
|
4573
4985
|
$case: "pbr";
|
4574
4986
|
pbr: PBMaterial_PbrMaterial;
|
4575
4987
|
} | undefined;
|
4988
|
+
/**
|
4989
|
+
* A gltf material that may provide additional features not supported by the PbMaterial fields.
|
4990
|
+
* If both gltf and material fields are provided, the gltf will be used only for extended features not
|
4991
|
+
* supported by the PbMaterial.
|
4992
|
+
* If this is provided and the `material` field is not provided, the renderer will update the material
|
4993
|
+
* field with data that reflects the gltf material once it is loaded.
|
4994
|
+
*/
|
4995
|
+
gltf?: PBMaterial_GltfMaterial | undefined;
|
4576
4996
|
}
|
4577
4997
|
|
4578
4998
|
/**
|
@@ -4583,6 +5003,22 @@ export declare namespace PBMaterial {
|
|
4583
5003
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBMaterial;
|
4584
5004
|
}
|
4585
5005
|
|
5006
|
+
/**
|
5007
|
+
* @public
|
5008
|
+
*/
|
5009
|
+
export declare interface PBMaterial_GltfMaterial {
|
5010
|
+
gltfSrc: string;
|
5011
|
+
name: string;
|
5012
|
+
}
|
5013
|
+
|
5014
|
+
/**
|
5015
|
+
* @public
|
5016
|
+
*/
|
5017
|
+
export declare namespace PBMaterial_GltfMaterial {
|
5018
|
+
export function encode(message: PBMaterial_GltfMaterial, writer?: _m0.Writer): _m0.Writer;
|
5019
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBMaterial_GltfMaterial;
|
5020
|
+
}
|
5021
|
+
|
4586
5022
|
/**
|
4587
5023
|
* @public
|
4588
5024
|
*/
|
@@ -4679,6 +5115,9 @@ export declare interface PBMeshCollider {
|
|
4679
5115
|
} | {
|
4680
5116
|
$case: "plane";
|
4681
5117
|
plane: PBMeshCollider_PlaneMesh;
|
5118
|
+
} | {
|
5119
|
+
$case: "gltf";
|
5120
|
+
gltf: PBMeshCollider_GltfMesh;
|
4682
5121
|
} | undefined;
|
4683
5122
|
}
|
4684
5123
|
|
@@ -4724,6 +5163,25 @@ export declare namespace PBMeshCollider_CylinderMesh {
|
|
4724
5163
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshCollider_CylinderMesh;
|
4725
5164
|
}
|
4726
5165
|
|
5166
|
+
/** A collider constructed from a Gltf Mesh. */
|
5167
|
+
/**
|
5168
|
+
* @public
|
5169
|
+
*/
|
5170
|
+
export declare interface PBMeshCollider_GltfMesh {
|
5171
|
+
/** the GLTF file path as listed in the scene's manifest. */
|
5172
|
+
gltfSrc: string;
|
5173
|
+
/** the name of the mesh asset */
|
5174
|
+
name: string;
|
5175
|
+
}
|
5176
|
+
|
5177
|
+
/**
|
5178
|
+
* @public
|
5179
|
+
*/
|
5180
|
+
export declare namespace PBMeshCollider_GltfMesh {
|
5181
|
+
export function encode(message: PBMeshCollider_GltfMesh, writer?: _m0.Writer): _m0.Writer;
|
5182
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshCollider_GltfMesh;
|
5183
|
+
}
|
5184
|
+
|
4727
5185
|
/** PlaneMesh is a 2D rectangle described by the Entity's Transform. */
|
4728
5186
|
/**
|
4729
5187
|
* @public
|
@@ -4756,13 +5214,11 @@ export declare namespace PBMeshCollider_SphereMesh {
|
|
4756
5214
|
|
4757
5215
|
/**
|
4758
5216
|
* The MeshRenderer component renders a basic geometric shape for an Entity. It can be a cube, a
|
4759
|
-
* plane, a sphere or a
|
5217
|
+
* plane, a sphere, a cylinder, or a Gltf mesh.
|
4760
5218
|
*
|
4761
5219
|
* The cube and plane variants can include a UV texture mapping, so specific areas of a material
|
4762
5220
|
* texture are rendered on different faces of the shape. They are serialized as a sequence of 2D
|
4763
5221
|
* `float` coordinates, one for each corner of each side of each face.
|
4764
|
-
*
|
4765
|
-
* More complex shapes require the use of a `GltfContainer` component.
|
4766
5222
|
*/
|
4767
5223
|
/**
|
4768
5224
|
* @public
|
@@ -4780,6 +5236,9 @@ export declare interface PBMeshRenderer {
|
|
4780
5236
|
} | {
|
4781
5237
|
$case: "plane";
|
4782
5238
|
plane: PBMeshRenderer_PlaneMesh;
|
5239
|
+
} | {
|
5240
|
+
$case: "gltf";
|
5241
|
+
gltf: PBMeshRenderer_GltfMesh;
|
4783
5242
|
} | undefined;
|
4784
5243
|
}
|
4785
5244
|
|
@@ -4827,6 +5286,25 @@ export declare namespace PBMeshRenderer_CylinderMesh {
|
|
4827
5286
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshRenderer_CylinderMesh;
|
4828
5287
|
}
|
4829
5288
|
|
5289
|
+
/** A mesh from a Gltf. */
|
5290
|
+
/**
|
5291
|
+
* @public
|
5292
|
+
*/
|
5293
|
+
export declare interface PBMeshRenderer_GltfMesh {
|
5294
|
+
/** the GLTF file path as listed in the scene's manifest. */
|
5295
|
+
gltfSrc: string;
|
5296
|
+
/** the name of the mesh asset */
|
5297
|
+
name: string;
|
5298
|
+
}
|
5299
|
+
|
5300
|
+
/**
|
5301
|
+
* @public
|
5302
|
+
*/
|
5303
|
+
export declare namespace PBMeshRenderer_GltfMesh {
|
5304
|
+
export function encode(message: PBMeshRenderer_GltfMesh, writer?: _m0.Writer): _m0.Writer;
|
5305
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBMeshRenderer_GltfMesh;
|
5306
|
+
}
|
5307
|
+
|
4830
5308
|
/** PlaneMesh renders a 2D rectangular shape. */
|
4831
5309
|
/**
|
4832
5310
|
* @public
|
@@ -5045,6 +5523,30 @@ export declare namespace PBPosition {
|
|
5045
5523
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBPosition;
|
5046
5524
|
}
|
5047
5525
|
|
5526
|
+
/**
|
5527
|
+
* @public
|
5528
|
+
*/
|
5529
|
+
export declare interface PBPrimaryPointerInfo {
|
5530
|
+
pointerType?: PointerType | undefined;
|
5531
|
+
/** in pixels */
|
5532
|
+
screenCoordinates?: PBVector2 | undefined;
|
5533
|
+
/** in pixels */
|
5534
|
+
screenDelta?: PBVector2 | undefined;
|
5535
|
+
/**
|
5536
|
+
* ray direction that can be used with the primary camera origin for
|
5537
|
+
* raycasting from the cursor into the world
|
5538
|
+
*/
|
5539
|
+
worldRayDirection?: PBVector3 | undefined;
|
5540
|
+
}
|
5541
|
+
|
5542
|
+
/**
|
5543
|
+
* @public
|
5544
|
+
*/
|
5545
|
+
export declare namespace PBPrimaryPointerInfo {
|
5546
|
+
export function encode(message: PBPrimaryPointerInfo, writer?: _m0.Writer): _m0.Writer;
|
5547
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBPrimaryPointerInfo;
|
5548
|
+
}
|
5549
|
+
|
5048
5550
|
/**
|
5049
5551
|
* @public
|
5050
5552
|
*/
|
@@ -5166,6 +5668,39 @@ export declare namespace PBRealmInfo {
|
|
5166
5668
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBRealmInfo;
|
5167
5669
|
}
|
5168
5670
|
|
5671
|
+
/**
|
5672
|
+
* defines a spotlight.
|
5673
|
+
* spotlights are point lights that emit light only in a cone around the transform's forward direction.
|
5674
|
+
* add this component together with the PBLight component to transform a point light into a spotlight.
|
5675
|
+
* note that spotlights do not model any internal reflections / focus, they only restrict the area of effect.
|
5676
|
+
* so for e.g. a torch beam, the bulb illuminance should be multiplied by the solid angle.
|
5677
|
+
* a typical torch with a beam width of 15 degrees would use outer angle of 0.15 (7.5 degrees in radians),
|
5678
|
+
* and an illuminance approximately equal to the bulb's lumens, e.g. 1200.
|
5679
|
+
*/
|
5680
|
+
/**
|
5681
|
+
* @public
|
5682
|
+
*/
|
5683
|
+
export declare interface PBSpotlight {
|
5684
|
+
/**
|
5685
|
+
* the cone radius in radians. distance away from forward in which the light is visible.
|
5686
|
+
* for a torch a value around 0.15 is appropriate.
|
5687
|
+
*/
|
5688
|
+
angle: number;
|
5689
|
+
/**
|
5690
|
+
* optional angle at which the light is brightest. should be <= outer angle.
|
5691
|
+
* if specified, the light will fall off smoothly between `inner_angle` and `angle`.
|
5692
|
+
*/
|
5693
|
+
innerAngle?: number | undefined;
|
5694
|
+
}
|
5695
|
+
|
5696
|
+
/**
|
5697
|
+
* @public
|
5698
|
+
*/
|
5699
|
+
export declare namespace PBSpotlight {
|
5700
|
+
export function encode(message: PBSpotlight, writer?: _m0.Writer): _m0.Writer;
|
5701
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSpotlight;
|
5702
|
+
}
|
5703
|
+
|
5169
5704
|
/**
|
5170
5705
|
* The TextShape component renders customizable floating text.
|
5171
5706
|
*
|
@@ -5230,6 +5765,46 @@ export declare namespace PBTextShape {
|
|
5230
5765
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
|
5231
5766
|
}
|
5232
5767
|
|
5768
|
+
/**
|
5769
|
+
* @public
|
5770
|
+
*/
|
5771
|
+
export declare interface PBTextureCamera {
|
5772
|
+
/** rendered texture width */
|
5773
|
+
width?: number | undefined;
|
5774
|
+
/** rendered texture height */
|
5775
|
+
height?: number | undefined;
|
5776
|
+
/**
|
5777
|
+
* which layer of entities to render. entity layers can be specified by adding PBCameraLayers to target entities.
|
5778
|
+
* defaults to 0
|
5779
|
+
*/
|
5780
|
+
layer?: number | undefined;
|
5781
|
+
/** default black */
|
5782
|
+
clearColor?: PBColor4 | undefined;
|
5783
|
+
/** default infinity */
|
5784
|
+
farPlane?: number | undefined;
|
5785
|
+
mode?: {
|
5786
|
+
$case: "perspective";
|
5787
|
+
perspective: Perspective;
|
5788
|
+
} | {
|
5789
|
+
$case: "orthographic";
|
5790
|
+
orthographic: Orthographic;
|
5791
|
+
} | undefined;
|
5792
|
+
/**
|
5793
|
+
* controls whether this camera acts as a receiver for audio on sources with matching `PBCameraLayers`.
|
5794
|
+
* range: 0 (off) - 1 (full volume)
|
5795
|
+
* default: 0
|
5796
|
+
*/
|
5797
|
+
volume?: number | undefined;
|
5798
|
+
}
|
5799
|
+
|
5800
|
+
/**
|
5801
|
+
* @public
|
5802
|
+
*/
|
5803
|
+
export declare namespace PBTextureCamera {
|
5804
|
+
export function encode(message: PBTextureCamera, writer?: _m0.Writer): _m0.Writer;
|
5805
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextureCamera;
|
5806
|
+
}
|
5807
|
+
|
5233
5808
|
/**
|
5234
5809
|
* @public
|
5235
5810
|
*/
|
@@ -5319,6 +5894,25 @@ export declare namespace PBUiBackground {
|
|
5319
5894
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiBackground;
|
5320
5895
|
}
|
5321
5896
|
|
5897
|
+
/** The UiCanvas component can be attached to a ui root entity to specify properties of the ui texture. */
|
5898
|
+
/**
|
5899
|
+
* @public
|
5900
|
+
*/
|
5901
|
+
export declare interface PBUiCanvas {
|
5902
|
+
width: number;
|
5903
|
+
height: number;
|
5904
|
+
/** default = (0.0, 0.0, 0.0, 0.0) / transparent */
|
5905
|
+
color?: PBColor4 | undefined;
|
5906
|
+
}
|
5907
|
+
|
5908
|
+
/**
|
5909
|
+
* @public
|
5910
|
+
*/
|
5911
|
+
export declare namespace PBUiCanvas {
|
5912
|
+
export function encode(message: PBUiCanvas, writer?: _m0.Writer): _m0.Writer;
|
5913
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiCanvas;
|
5914
|
+
}
|
5915
|
+
|
5322
5916
|
/** This component is created by the renderer and used by the scenes to know the resolution of the UI canvas */
|
5323
5917
|
/**
|
5324
5918
|
* @public
|
@@ -5435,6 +6029,21 @@ export declare namespace PBUiInputResult {
|
|
5435
6029
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiInputResult;
|
5436
6030
|
}
|
5437
6031
|
|
6032
|
+
/**
|
6033
|
+
* @public
|
6034
|
+
*/
|
6035
|
+
export declare interface PBUiScrollResult {
|
6036
|
+
value: PBVector2 | undefined;
|
6037
|
+
}
|
6038
|
+
|
6039
|
+
/**
|
6040
|
+
* @public
|
6041
|
+
*/
|
6042
|
+
export declare namespace PBUiScrollResult {
|
6043
|
+
export function encode(message: PBUiScrollResult, writer?: _m0.Writer): _m0.Writer;
|
6044
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiScrollResult;
|
6045
|
+
}
|
6046
|
+
|
5438
6047
|
/**
|
5439
6048
|
* @public
|
5440
6049
|
*/
|
@@ -5451,6 +6060,10 @@ export declare interface PBUiText {
|
|
5451
6060
|
fontSize?: number | undefined;
|
5452
6061
|
/** wrap text when the border is reached (default: TW_WRAP) */
|
5453
6062
|
textWrap?: TextWrap | undefined;
|
6063
|
+
/** width of the outline (default: 0) */
|
6064
|
+
outlineWidth?: number | undefined;
|
6065
|
+
/** RGBA color of the outline (default: opaque black) */
|
6066
|
+
outlineColor?: PBColor4 | undefined;
|
5454
6067
|
}
|
5455
6068
|
|
5456
6069
|
/**
|
@@ -5576,6 +6189,16 @@ export declare interface PBUiTransform {
|
|
5576
6189
|
borderBottomColor?: PBColor4 | undefined;
|
5577
6190
|
borderLeftColor?: PBColor4 | undefined;
|
5578
6191
|
borderRightColor?: PBColor4 | undefined;
|
6192
|
+
/** default: 1 */
|
6193
|
+
opacity?: number | undefined;
|
6194
|
+
/** reference for scroll_position. default empty */
|
6195
|
+
elementId?: string | undefined;
|
6196
|
+
/** default position=(0,0) */
|
6197
|
+
scrollPosition?: ScrollPositionValue | undefined;
|
6198
|
+
/** default ShowScrollBar.SSB_BOTH */
|
6199
|
+
scrollVisible?: ShowScrollBar | undefined;
|
6200
|
+
/** default 0 */
|
6201
|
+
zIndex?: number | undefined;
|
5579
6202
|
}
|
5580
6203
|
|
5581
6204
|
/**
|
@@ -5705,6 +6328,25 @@ export declare namespace PBVisibilityComponent {
|
|
5705
6328
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBVisibilityComponent;
|
5706
6329
|
}
|
5707
6330
|
|
6331
|
+
/**
|
6332
|
+
* @public
|
6333
|
+
*/
|
6334
|
+
export declare interface Perspective {
|
6335
|
+
/**
|
6336
|
+
* vertical field of view in radians
|
6337
|
+
* defaults to pi/4 = 45 degrees
|
6338
|
+
*/
|
6339
|
+
fieldOfView?: number | undefined;
|
6340
|
+
}
|
6341
|
+
|
6342
|
+
/**
|
6343
|
+
* @public
|
6344
|
+
*/
|
6345
|
+
export declare namespace Perspective {
|
6346
|
+
export function encode(message: Perspective, writer?: _m0.Writer): _m0.Writer;
|
6347
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): Perspective;
|
6348
|
+
}
|
6349
|
+
|
5708
6350
|
/**
|
5709
6351
|
* Represens a plane by the equation ax + by + cz + d = 0
|
5710
6352
|
* @public
|
@@ -5860,6 +6502,24 @@ export declare interface PointerEventsSystem {
|
|
5860
6502
|
* @param entity - Entity where the callback was attached
|
5861
6503
|
*/
|
5862
6504
|
removeOnPointerHoverLeave(entity: Entity): void;
|
6505
|
+
/**
|
6506
|
+
* @public
|
6507
|
+
* Remove the callback for onPointerDrag event
|
6508
|
+
* @param entity - Entity where the callback was attached
|
6509
|
+
*/
|
6510
|
+
removeOnPointerDrag(entity: Entity): void;
|
6511
|
+
/**
|
6512
|
+
* @public
|
6513
|
+
* Remove the callback for onPointerDragLocked event
|
6514
|
+
* @param entity - Entity where the callback was attached
|
6515
|
+
*/
|
6516
|
+
removeOnPointerDragLocked(entity: Entity): void;
|
6517
|
+
/**
|
6518
|
+
* @public
|
6519
|
+
* Remove the callback for onPointerDragEnd event
|
6520
|
+
* @param entity - Entity where the callback was attached
|
6521
|
+
*/
|
6522
|
+
removeOnPointerDragEnd(entity: Entity): void;
|
5863
6523
|
/**
|
5864
6524
|
* @public
|
5865
6525
|
* Execute callback when the user press the InputButton pointing at the entity
|
@@ -5914,6 +6574,37 @@ export declare interface PointerEventsSystem {
|
|
5914
6574
|
entity: Entity;
|
5915
6575
|
opts?: Partial<EventSystemOptions>;
|
5916
6576
|
}, cb: EventSystemCallback): void;
|
6577
|
+
/**
|
6578
|
+
* @public
|
6579
|
+
* Execute callback when the user clicks and drags the pointer from inside the entity
|
6580
|
+
* @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
|
6581
|
+
* @param cb - Function to execute when click fires
|
6582
|
+
*/
|
6583
|
+
onPointerDrag(pointerData: {
|
6584
|
+
entity: Entity;
|
6585
|
+
opts?: Partial<EventSystemOptions>;
|
6586
|
+
}, cb: EventSystemCallback): void;
|
6587
|
+
/**
|
6588
|
+
* @public
|
6589
|
+
* Execute callback when the user clicks and drags the pointer from inside the entity,
|
6590
|
+
* locking the cursor in place
|
6591
|
+
* @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
|
6592
|
+
* @param cb - Function to execute when click fires
|
6593
|
+
*/
|
6594
|
+
onPointerDragLocked(pointerData: {
|
6595
|
+
entity: Entity;
|
6596
|
+
opts?: Partial<EventSystemOptions>;
|
6597
|
+
}, cb: EventSystemCallback): void;
|
6598
|
+
/**
|
6599
|
+
* @public
|
6600
|
+
* Execute callback when the user releases the button after a drag
|
6601
|
+
* @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
|
6602
|
+
* @param cb - Function to execute when click fires
|
6603
|
+
*/
|
6604
|
+
onPointerDragEnd(pointerData: {
|
6605
|
+
entity: Entity;
|
6606
|
+
opts?: Partial<EventSystemOptions>;
|
6607
|
+
}, cb: EventSystemCallback): void;
|
5917
6608
|
}
|
5918
6609
|
|
5919
6610
|
/**
|
@@ -5930,7 +6621,10 @@ export declare const enum PointerEventType {
|
|
5930
6621
|
PET_UP = 0,
|
5931
6622
|
PET_DOWN = 1,
|
5932
6623
|
PET_HOVER_ENTER = 2,
|
5933
|
-
PET_HOVER_LEAVE = 3
|
6624
|
+
PET_HOVER_LEAVE = 3,
|
6625
|
+
PET_DRAG_LOCKED = 4,
|
6626
|
+
PET_DRAG = 5,
|
6627
|
+
PET_DRAG_END = 6
|
5934
6628
|
}
|
5935
6629
|
|
5936
6630
|
/**
|
@@ -5950,6 +6644,17 @@ export declare type PointerFilterType = 'none' | 'block';
|
|
5950
6644
|
/** @public */
|
5951
6645
|
export declare const PointerLock: LastWriteWinElementSetComponentDefinition<PBPointerLock>;
|
5952
6646
|
|
6647
|
+
/**
|
6648
|
+
* @public
|
6649
|
+
*/
|
6650
|
+
export declare const enum PointerType {
|
6651
|
+
POT_NONE = 0,
|
6652
|
+
POT_MOUSE = 1,
|
6653
|
+
POT_PAD = 2,
|
6654
|
+
POT_TOUCH = 3,
|
6655
|
+
POT_WAND = 4
|
6656
|
+
}
|
6657
|
+
|
5953
6658
|
/**
|
5954
6659
|
* Type used for defining the position of the element. i.e. margin, padding
|
5955
6660
|
* @public
|
@@ -5987,6 +6692,9 @@ export declare type PositionType = 'absolute' | 'relative';
|
|
5987
6692
|
*/
|
5988
6693
|
export declare type PositionUnit = `${number}px` | `${number}%` | number | `${number}` | ScaleUnit;
|
5989
6694
|
|
6695
|
+
/** @public */
|
6696
|
+
export declare const PrimaryPointerInfo: LastWriteWinElementSetComponentDefinition<PBPrimaryPointerInfo>;
|
6697
|
+
|
5990
6698
|
export declare enum ProcessMessageResultType {
|
5991
6699
|
/**
|
5992
6700
|
* Typical message and new state set.
|
@@ -6541,6 +7249,7 @@ export declare type RaycastSystemOptions = {
|
|
6541
7249
|
export declare interface ReactBasedUiSystem {
|
6542
7250
|
destroy(): void;
|
6543
7251
|
setUiRenderer(ui: UiComponent): void;
|
7252
|
+
setTextureRenderer(entity: Entity, ui: UiComponent): void;
|
6544
7253
|
}
|
6545
7254
|
|
6546
7255
|
/**
|
@@ -6571,15 +7280,6 @@ export declare namespace ReactEcs {
|
|
6571
7280
|
}
|
6572
7281
|
}
|
6573
7282
|
const createElement: any;
|
6574
|
-
export type SetStateAction<T> = T | ((prevState: T) => T);
|
6575
|
-
export type Dispatch<T> = (action: SetStateAction<T>) => void;
|
6576
|
-
export type StateHook = <T>(initialState: T | (() => T)) => [T, Dispatch<T>];
|
6577
|
-
export type DependencyList = ReadonlyArray<any>;
|
6578
|
-
export type EffectCallback = () => void | (() => void | undefined);
|
6579
|
-
export type EffectHook = (effect: EffectCallback, deps?: DependencyList) => void;
|
6580
|
-
const useEffect: EffectHook;
|
6581
|
-
const useState: StateHook;
|
6582
|
-
{};
|
6583
7283
|
}
|
6584
7284
|
|
6585
7285
|
/**
|
@@ -7003,6 +7703,43 @@ export declare namespace Schemas {
|
|
7003
7703
|
}) => void;
|
7004
7704
|
}
|
7005
7705
|
|
7706
|
+
/**
|
7707
|
+
* @public
|
7708
|
+
*/
|
7709
|
+
export declare interface ScrollPositionValue {
|
7710
|
+
value?: {
|
7711
|
+
$case: "position";
|
7712
|
+
position: PBVector2;
|
7713
|
+
} | {
|
7714
|
+
$case: "reference";
|
7715
|
+
reference: string;
|
7716
|
+
} | undefined;
|
7717
|
+
}
|
7718
|
+
|
7719
|
+
/**
|
7720
|
+
* @public
|
7721
|
+
*/
|
7722
|
+
export declare namespace ScrollPositionValue {
|
7723
|
+
export function encode(message: ScrollPositionValue, writer?: _m0.Writer): _m0.Writer;
|
7724
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): ScrollPositionValue;
|
7725
|
+
}
|
7726
|
+
|
7727
|
+
/**
|
7728
|
+
* @public
|
7729
|
+
* The scroll-visible determines if the scrollbars are shown when the scroll overflow is enabled
|
7730
|
+
*/
|
7731
|
+
export declare type ScrollVisibleType = 'horizontal' | 'vertical' | 'both' | 'hidden';
|
7732
|
+
|
7733
|
+
/**
|
7734
|
+
* @public
|
7735
|
+
*/
|
7736
|
+
export declare const enum ShowScrollBar {
|
7737
|
+
SSB_BOTH = 0,
|
7738
|
+
SSB_ONLY_VERTICAL = 1,
|
7739
|
+
SSB_ONLY_HORIZONTAL = 2,
|
7740
|
+
SSB_HIDDEN = 3
|
7741
|
+
}
|
7742
|
+
|
7006
7743
|
/**
|
7007
7744
|
* @public
|
7008
7745
|
*/
|
@@ -7010,6 +7747,9 @@ export declare interface Spec {
|
|
7010
7747
|
[key: string]: ISchema;
|
7011
7748
|
}
|
7012
7749
|
|
7750
|
+
/** @public */
|
7751
|
+
export declare const Spotlight: LastWriteWinElementSetComponentDefinition<PBSpotlight>;
|
7752
|
+
|
7013
7753
|
/**
|
7014
7754
|
* @alpha
|
7015
7755
|
* This is going to be used for sync components through a server.
|
@@ -7084,6 +7824,9 @@ export declare namespace Texture {
|
|
7084
7824
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): Texture;
|
7085
7825
|
}
|
7086
7826
|
|
7827
|
+
/** @public */
|
7828
|
+
export declare const TextureCamera: LastWriteWinElementSetComponentDefinition<PBTextureCamera>;
|
7829
|
+
|
7087
7830
|
/**
|
7088
7831
|
* @public
|
7089
7832
|
*/
|
@@ -7176,6 +7919,9 @@ export declare interface TextureUnion {
|
|
7176
7919
|
} | {
|
7177
7920
|
$case: "videoTexture";
|
7178
7921
|
videoTexture: VideoTexture;
|
7922
|
+
} | {
|
7923
|
+
$case: "uiTexture";
|
7924
|
+
uiTexture: UiCanvasTexture;
|
7179
7925
|
} | undefined;
|
7180
7926
|
}
|
7181
7927
|
|
@@ -7383,6 +8129,8 @@ export declare interface UiBackgroundProps {
|
|
7383
8129
|
uvs?: number[];
|
7384
8130
|
/** AvatarTexture for the background */
|
7385
8131
|
avatarTexture?: UiAvatarTexture;
|
8132
|
+
/** VideoTexture for the background */
|
8133
|
+
videoTexture?: UiVideoTexture;
|
7386
8134
|
/** Texture for the background */
|
7387
8135
|
texture?: UiTexture;
|
7388
8136
|
}
|
@@ -7402,9 +8150,31 @@ export declare interface UiButtonProps extends UiLabelProps, EntityPropTypes {
|
|
7402
8150
|
disabled?: boolean;
|
7403
8151
|
}
|
7404
8152
|
|
8153
|
+
/** @public */
|
8154
|
+
export declare const UiCanvas: LastWriteWinElementSetComponentDefinition<PBUiCanvas>;
|
8155
|
+
|
7405
8156
|
/** @public */
|
7406
8157
|
export declare const UiCanvasInformation: LastWriteWinElementSetComponentDefinition<PBUiCanvasInformation>;
|
7407
8158
|
|
8159
|
+
/**
|
8160
|
+
* @public
|
8161
|
+
*/
|
8162
|
+
export declare interface UiCanvasTexture {
|
8163
|
+
uiCanvasEntity: number;
|
8164
|
+
/** default = TextureWrapMode.Clamp */
|
8165
|
+
wrapMode?: TextureWrapMode | undefined;
|
8166
|
+
/** default = FilterMode.Bilinear */
|
8167
|
+
filterMode?: TextureFilterMode | undefined;
|
8168
|
+
}
|
8169
|
+
|
8170
|
+
/**
|
8171
|
+
* @public
|
8172
|
+
*/
|
8173
|
+
export declare namespace UiCanvasTexture {
|
8174
|
+
export function encode(message: UiCanvasTexture, writer?: _m0.Writer): _m0.Writer;
|
8175
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): UiCanvasTexture;
|
8176
|
+
}
|
8177
|
+
|
7408
8178
|
/**
|
7409
8179
|
* @public
|
7410
8180
|
*/
|
@@ -7474,6 +8244,10 @@ export declare interface UiLabelProps {
|
|
7474
8244
|
textAlign?: TextAlignType | undefined;
|
7475
8245
|
/** Label font type. @defaultValue 'sans-serif' */
|
7476
8246
|
font?: UiFontType | undefined;
|
8247
|
+
/** Outline width of the text. @defaultValue 0 */
|
8248
|
+
outlineWidth?: number | undefined;
|
8249
|
+
/** Outline color of the text. @defaultValue `{ r: 0, g: 0, b: 0, a: 1 }` */
|
8250
|
+
outlineColor?: PBColor4 | undefined;
|
7477
8251
|
/** Behaviour when text reached. @defaultValue 'wrap' */
|
7478
8252
|
textWrap?: UiTextWrapType | undefined;
|
7479
8253
|
}
|
@@ -7483,6 +8257,9 @@ export declare interface UiLabelProps {
|
|
7483
8257
|
*/
|
7484
8258
|
export declare type uint32 = number;
|
7485
8259
|
|
8260
|
+
/** @public */
|
8261
|
+
export declare const UiScrollResult: LastWriteWinElementSetComponentDefinition<PBUiScrollResult>;
|
8262
|
+
|
7486
8263
|
/** @public */
|
7487
8264
|
export declare const UiText: LastWriteWinElementSetComponentDefinition<PBUiText>;
|
7488
8265
|
|
@@ -7558,6 +8335,26 @@ export declare interface UiTransformProps {
|
|
7558
8335
|
borderColor?: Record<keyof Partial<Position>, PBColor4> | PBColor4 | undefined;
|
7559
8336
|
borderRadius?: Partial<BorderRadius> | PositionUnit;
|
7560
8337
|
borderWidth?: Partial<Position> | PositionUnit;
|
8338
|
+
/** The opacity property sets the opacity level for an element, it's accumulated across children @defaultValue 1 */
|
8339
|
+
opacity?: number;
|
8340
|
+
/** A reference value to identify the element, default empty */
|
8341
|
+
elementId?: string;
|
8342
|
+
/** default position=(0,0) if it aplies, a vector or a reference-id */
|
8343
|
+
scrollPosition?: PBVector2 | string;
|
8344
|
+
/** default ShowScrollBar.SSB_BOTH */
|
8345
|
+
scrollVisible?: ScrollVisibleType;
|
8346
|
+
/** default 0 */
|
8347
|
+
zIndex?: number;
|
8348
|
+
}
|
8349
|
+
|
8350
|
+
/**
|
8351
|
+
* Texture
|
8352
|
+
* @public
|
8353
|
+
*/
|
8354
|
+
export declare interface UiVideoTexture {
|
8355
|
+
videoPlayerEntity: Entity;
|
8356
|
+
wrapMode?: TextureWrapType;
|
8357
|
+
filterMode?: TextureFilterType;
|
7561
8358
|
}
|
7562
8359
|
|
7563
8360
|
/**
|