@dcl/sdk 7.0.0-2798614483.commit-4feae69 → 7.0.0-2875155444.commit-bb5e498
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/ecs7/index.d.ts +347 -179
- package/dist/ecs7/index.js +3386 -3310
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/dist/ecs7/proto-definitions/Animator.proto +5 -5
- package/dist/ecs7/proto-definitions/AudioSource.proto +4 -4
- package/dist/ecs7/proto-definitions/AudioStream.proto +2 -2
- package/dist/ecs7/proto-definitions/AvatarShape.proto +10 -10
- package/dist/ecs7/proto-definitions/Billboard.proto +3 -3
- package/dist/ecs7/proto-definitions/BoxShape.proto +6 -3
- package/dist/ecs7/proto-definitions/CylinderShape.proto +8 -5
- package/dist/ecs7/proto-definitions/GLTFShape.proto +6 -3
- package/dist/ecs7/proto-definitions/NFTShape.proto +9 -6
- package/dist/ecs7/proto-definitions/OnPointerDown.proto +4 -4
- package/dist/ecs7/proto-definitions/OnPointerUp.proto +4 -4
- package/dist/ecs7/proto-definitions/PlaneShape.proto +6 -3
- package/dist/ecs7/proto-definitions/SphereShape.proto +6 -3
- package/dist/ecs7/proto-definitions/TextShape.proto +24 -23
- package/package.json +4 -4
- package/types/ecs7/index.d.ts +345 -177
package/dist/ecs7/index.d.ts
CHANGED
@@ -16,10 +16,11 @@ declare const enum ActionButton {
|
|
16
16
|
UNRECOGNIZED = -1
|
17
17
|
}
|
18
18
|
|
19
|
-
/**
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
/** @public */
|
20
|
+
export declare const Animator: ComponentDefinition<ISchema<PBAnimator>>;
|
21
|
+
|
22
|
+
/** @public */
|
23
|
+
export declare const AudioSource: ComponentDefinition<ISchema<PBAudioSource>>;
|
23
24
|
|
24
25
|
declare const enum AvatarAnchorPoint {
|
25
26
|
POSITION = 0,
|
@@ -29,11 +30,29 @@ declare const enum AvatarAnchorPoint {
|
|
29
30
|
UNRECOGNIZED = -1
|
30
31
|
}
|
31
32
|
|
33
|
+
/** @public */
|
34
|
+
export declare const AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach>>;
|
35
|
+
|
36
|
+
/** @public */
|
37
|
+
export declare const AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>>;
|
38
|
+
|
39
|
+
/** @public */
|
40
|
+
export declare const Billboard: ComponentDefinition<ISchema<PBBillboard>>;
|
41
|
+
|
42
|
+
/** @public */
|
43
|
+
export declare const BoxShape: ComponentDefinition<ISchema<PBBoxShape>>;
|
44
|
+
|
32
45
|
/**
|
33
46
|
* @public
|
34
47
|
*/
|
35
48
|
export declare type ByteBuffer = ReturnType<typeof createByteBuffer>;
|
36
49
|
|
50
|
+
/** @public */
|
51
|
+
export declare const CameraMode: ComponentDefinition<ISchema<PBCameraMode>>;
|
52
|
+
|
53
|
+
/** @public */
|
54
|
+
export declare const CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>>;
|
55
|
+
|
37
56
|
declare const enum CameraModeValue {
|
38
57
|
FIRST_PERSON = 0,
|
39
58
|
THIRD_PERSON = 1,
|
@@ -49,7 +68,7 @@ declare interface Color3 {
|
|
49
68
|
/**
|
50
69
|
* @public
|
51
70
|
*/
|
52
|
-
export declare type ComponentDefinition<T extends
|
71
|
+
export declare type ComponentDefinition<T extends ISchema = ISchema<any>> = {
|
53
72
|
_id: number;
|
54
73
|
has(entity: Entity): boolean;
|
55
74
|
getFrom(entity: Entity): DeepReadonly<ComponentType<T>>;
|
@@ -68,17 +87,80 @@ export declare type ComponentDefinition<T extends EcsType = EcsType<any>> = {
|
|
68
87
|
isDirty(entity: Entity): boolean;
|
69
88
|
};
|
70
89
|
|
90
|
+
/** @public */
|
91
|
+
export declare namespace Components {
|
92
|
+
/** @public */
|
93
|
+
const Transform: ComponentDefinition<ISchema< {
|
94
|
+
position: {
|
95
|
+
x: number;
|
96
|
+
y: number;
|
97
|
+
z: number;
|
98
|
+
};
|
99
|
+
rotation: {
|
100
|
+
x: number;
|
101
|
+
y: number;
|
102
|
+
z: number;
|
103
|
+
w: number;
|
104
|
+
};
|
105
|
+
scale: {
|
106
|
+
x: number;
|
107
|
+
y: number;
|
108
|
+
/** @public */
|
109
|
+
z: number;
|
110
|
+
};
|
111
|
+
parent?: Entity | undefined;
|
112
|
+
}>>;
|
113
|
+
/** @public */
|
114
|
+
const Animator: ComponentDefinition<ISchema<PBAnimator>>;
|
115
|
+
/** @public */
|
116
|
+
const AudioSource: ComponentDefinition<ISchema<PBAudioSource>>;
|
117
|
+
/** @public */
|
118
|
+
const AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach>>;
|
119
|
+
/** @public */
|
120
|
+
const AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>>;
|
121
|
+
/** @public */
|
122
|
+
const Billboard: ComponentDefinition<ISchema<PBBillboard>>;
|
123
|
+
/** @public */
|
124
|
+
const BoxShape: ComponentDefinition<ISchema<PBBoxShape>>;
|
125
|
+
/** @public */
|
126
|
+
const CameraMode: ComponentDefinition<ISchema<PBCameraMode>>;
|
127
|
+
/** @public */
|
128
|
+
const CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>>;
|
129
|
+
/** @public */
|
130
|
+
const CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>>;
|
131
|
+
/** @public */
|
132
|
+
const GLTFShape: ComponentDefinition<ISchema<PBGLTFShape>>;
|
133
|
+
/** @public */
|
134
|
+
const NFTShape: ComponentDefinition<ISchema<PBNFTShape>>;
|
135
|
+
/** @public */
|
136
|
+
const OnPointerDown: ComponentDefinition<ISchema<PBOnPointerDown>>;
|
137
|
+
/** @public */
|
138
|
+
const OnPointerDownResult: ComponentDefinition<ISchema<PBOnPointerDownResult>>;
|
139
|
+
/** @public */
|
140
|
+
const OnPointerUp: ComponentDefinition<ISchema<PBOnPointerUp>>;
|
141
|
+
/** @public */
|
142
|
+
const OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult>>;
|
143
|
+
/** @public */
|
144
|
+
const PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>>;
|
145
|
+
/** @public */
|
146
|
+
const PointerLock: ComponentDefinition<ISchema<PBPointerLock>>;
|
147
|
+
/** @public */
|
148
|
+
const SphereShape: ComponentDefinition<ISchema<PBSphereShape>>;
|
149
|
+
/** @public */
|
150
|
+
const TextShape: ComponentDefinition<ISchema<PBTextShape>>;
|
151
|
+
}
|
152
|
+
|
71
153
|
/**
|
72
154
|
* @public
|
73
155
|
*/
|
74
|
-
export declare type
|
156
|
+
export declare type ComponentSchema<T extends [ComponentDefinition, ...ComponentDefinition[]]> = {
|
75
157
|
[K in keyof T]: T[K] extends ComponentDefinition ? ReturnType<T[K]['mutable']> : never;
|
76
158
|
};
|
77
159
|
|
78
160
|
/**
|
79
161
|
* @public
|
80
162
|
*/
|
81
|
-
export declare type ComponentType<T extends
|
163
|
+
export declare type ComponentType<T extends ISchema> = EcsResult<T>;
|
82
164
|
|
83
165
|
/**
|
84
166
|
* ByteBuffer is a wrapper of DataView which also adds a read and write offset.
|
@@ -218,6 +300,9 @@ declare interface CreateByteBufferOptions {
|
|
218
300
|
initialCapacity?: number;
|
219
301
|
}
|
220
302
|
|
303
|
+
/** @public */
|
304
|
+
export declare const CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>>;
|
305
|
+
|
221
306
|
/**
|
222
307
|
* Make each field readonly deeply
|
223
308
|
* @public
|
@@ -226,27 +311,45 @@ export declare type DeepReadonly<T> = {
|
|
226
311
|
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
227
312
|
};
|
228
313
|
|
229
|
-
declare function
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
314
|
+
declare function defineLibraryComponents({ defineComponent }: Pick<IEngine, 'defineComponent'>): {
|
315
|
+
Transform: ComponentDefinition<ISchema< {
|
316
|
+
position: {
|
317
|
+
x: number;
|
318
|
+
y: number;
|
319
|
+
z: number;
|
320
|
+
};
|
321
|
+
rotation: {
|
322
|
+
x: number;
|
323
|
+
y: number;
|
324
|
+
z: number;
|
325
|
+
w: number;
|
326
|
+
};
|
327
|
+
scale: {
|
328
|
+
x: number;
|
329
|
+
y: number;
|
330
|
+
z: number;
|
331
|
+
};
|
332
|
+
parent?: Entity | undefined;
|
333
|
+
}>>;
|
334
|
+
Animator: ComponentDefinition<ISchema<PBAnimator>>;
|
335
|
+
AudioSource: ComponentDefinition<ISchema<PBAudioSource>>;
|
336
|
+
AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach>>;
|
337
|
+
AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>>;
|
338
|
+
Billboard: ComponentDefinition<ISchema<PBBillboard>>;
|
339
|
+
BoxShape: ComponentDefinition<ISchema<PBBoxShape>>;
|
340
|
+
CameraMode: ComponentDefinition<ISchema<PBCameraMode>>;
|
341
|
+
CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>>;
|
342
|
+
CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>>;
|
343
|
+
GLTFShape: ComponentDefinition<ISchema<PBGLTFShape>>;
|
344
|
+
NFTShape: ComponentDefinition<ISchema<PBNFTShape>>;
|
345
|
+
OnPointerDown: ComponentDefinition<ISchema<PBOnPointerDown>>;
|
346
|
+
OnPointerDownResult: ComponentDefinition<ISchema<PBOnPointerDownResult>>;
|
347
|
+
OnPointerUp: ComponentDefinition<ISchema<PBOnPointerUp>>;
|
348
|
+
OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult>>;
|
349
|
+
PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>>;
|
350
|
+
PointerLock: ComponentDefinition<ISchema<PBPointerLock>>;
|
351
|
+
SphereShape: ComponentDefinition<ISchema<PBSphereShape>>;
|
352
|
+
TextShape: ComponentDefinition<ISchema<PBTextShape>>;
|
250
353
|
};
|
251
354
|
|
252
355
|
/**
|
@@ -261,26 +364,7 @@ export declare type double = number;
|
|
261
364
|
/**
|
262
365
|
* @public
|
263
366
|
*/
|
264
|
-
|
265
|
-
|
266
|
-
/**
|
267
|
-
* @public
|
268
|
-
*/
|
269
|
-
declare type EcsResult<T extends EcsType> = T extends EcsType ? ReturnType<T['deserialize']> : never;
|
270
|
-
|
271
|
-
/**
|
272
|
-
* @public
|
273
|
-
*/
|
274
|
-
export declare const EcsString: EcsType<string>;
|
275
|
-
|
276
|
-
/**
|
277
|
-
* @public
|
278
|
-
*/
|
279
|
-
export declare type EcsType<T = any> = {
|
280
|
-
serialize(value: T, builder: ByteBuffer): void;
|
281
|
-
deserialize(reader: ByteBuffer): T;
|
282
|
-
create(): T;
|
283
|
-
};
|
367
|
+
declare type EcsResult<T extends ISchema> = T extends ISchema ? ReturnType<T['deserialize']> : never;
|
284
368
|
|
285
369
|
/**
|
286
370
|
* @public
|
@@ -302,11 +386,6 @@ export declare type Entity = number & {
|
|
302
386
|
|
303
387
|
declare const entitySymbol: unique symbol;
|
304
388
|
|
305
|
-
/**
|
306
|
-
* @public
|
307
|
-
*/
|
308
|
-
export declare function Enum<T>(type: EcsType<any>): EcsType<T>;
|
309
|
-
|
310
389
|
/**
|
311
390
|
* Constant used to define the minimal number value in Babylon.js
|
312
391
|
* @public
|
@@ -318,26 +397,19 @@ declare type ExcludeUndefined<T> = {
|
|
318
397
|
[P in keyof T]: undefined extends T[P] ? never : P;
|
319
398
|
}[keyof T];
|
320
399
|
|
321
|
-
/**
|
322
|
-
* @public
|
323
|
-
*/
|
324
|
-
export declare const FlatString: EcsType<string>;
|
325
|
-
|
326
400
|
/** @public */
|
327
401
|
export declare type float = number;
|
328
402
|
|
329
|
-
/**
|
330
|
-
|
331
|
-
|
332
|
-
|
403
|
+
/** @public */
|
404
|
+
export declare type FloatArray = number[];
|
405
|
+
|
406
|
+
/** @public */
|
407
|
+
export declare const GLTFShape: ComponentDefinition<ISchema<PBGLTFShape>>;
|
333
408
|
|
334
409
|
/**
|
335
410
|
* @public
|
336
411
|
*/
|
337
|
-
|
338
|
-
|
339
|
-
/** @public */
|
340
|
-
export declare type FloatArray = number[];
|
412
|
+
declare function IArray<T>(type: ISchema<T>): ISchema<Array<T>>;
|
341
413
|
|
342
414
|
/**
|
343
415
|
* @public
|
@@ -348,10 +420,10 @@ export declare type IEngine = {
|
|
348
420
|
removeEntity(entity: Entity): void;
|
349
421
|
addSystem(system: Update, priority?: number, name?: string): void;
|
350
422
|
removeSystem(selector: string | Update): boolean;
|
351
|
-
defineComponent<T extends
|
352
|
-
mutableGroupOf<T extends [ComponentDefinition, ...ComponentDefinition[]]>(...components: T): Iterable<[Entity, ...
|
353
|
-
groupOf<T extends [ComponentDefinition, ...ComponentDefinition[]]>(...components: T): Iterable<[Entity, ...DeepReadonly<
|
354
|
-
getComponent<T extends
|
423
|
+
defineComponent<T extends ISchema>(componentId: number, spec: T): ComponentDefinition<T>;
|
424
|
+
mutableGroupOf<T extends [ComponentDefinition, ...ComponentDefinition[]]>(...components: T): Iterable<[Entity, ...ComponentSchema<T>]>;
|
425
|
+
groupOf<T extends [ComponentDefinition, ...ComponentDefinition[]]>(...components: T): Iterable<[Entity, ...DeepReadonly<ComponentSchema<T>>]>;
|
426
|
+
getComponent<T extends ISchema>(componentId: number): ComponentDefinition<T>;
|
355
427
|
update(dt: number): void;
|
356
428
|
baseComponents: SdkComponents;
|
357
429
|
};
|
@@ -363,30 +435,34 @@ export declare type IEngineParams = {
|
|
363
435
|
transports?: Transport[];
|
364
436
|
};
|
365
437
|
|
366
|
-
/** Include property keys from T where the property is assignable to U */
|
367
|
-
declare type IncludeUndefined<T> = {
|
368
|
-
[P in keyof T]: undefined extends T[P] ? P : never;
|
369
|
-
}[keyof T];
|
370
|
-
|
371
438
|
/**
|
372
439
|
* @public
|
373
440
|
*/
|
374
|
-
|
441
|
+
declare function IEnum<T>(type: ISchema<any>): ISchema<T>;
|
375
442
|
|
376
443
|
/**
|
377
444
|
* @public
|
378
445
|
*/
|
379
|
-
|
446
|
+
declare function IMap<T extends Spec>(spec: T): ISchema<Result<T>>;
|
447
|
+
|
448
|
+
/** Include property keys from T where the property is assignable to U */
|
449
|
+
declare type IncludeUndefined<T> = {
|
450
|
+
[P in keyof T]: undefined extends T[P] ? P : never;
|
451
|
+
}[keyof T];
|
380
452
|
|
381
453
|
/**
|
382
454
|
* @public
|
383
455
|
*/
|
384
|
-
|
456
|
+
declare function IOptional<T>(spec: ISchema<T>): ISchema<T | undefined>;
|
385
457
|
|
386
458
|
/**
|
387
459
|
* @public
|
388
460
|
*/
|
389
|
-
|
461
|
+
declare type ISchema<T = any> = {
|
462
|
+
serialize(value: T, builder: ByteBuffer): void;
|
463
|
+
deserialize(reader: ByteBuffer): T;
|
464
|
+
create(): T;
|
465
|
+
};
|
390
466
|
|
391
467
|
/**
|
392
468
|
* Interface for the size containing width and height
|
@@ -403,11 +479,6 @@ export declare interface ISize {
|
|
403
479
|
height: number;
|
404
480
|
}
|
405
481
|
|
406
|
-
/**
|
407
|
-
* @public
|
408
|
-
*/
|
409
|
-
export declare function MapType<T extends Spec>(spec: T): EcsType<Result<T>>;
|
410
|
-
|
411
482
|
/**
|
412
483
|
* Class used to store matrix data (4x4)
|
413
484
|
* @public
|
@@ -1127,6 +1198,9 @@ declare namespace Matrix {
|
|
1127
1198
|
function toggleProjectionMatrixHandInPlace(self: MutableMatrix): void;
|
1128
1199
|
}
|
1129
1200
|
|
1201
|
+
/** @public */
|
1202
|
+
export declare const NFTShape: ComponentDefinition<ISchema<PBNFTShape>>;
|
1203
|
+
|
1130
1204
|
/** @public */
|
1131
1205
|
export declare type Nullable<T> = T | null;
|
1132
1206
|
|
@@ -1138,10 +1212,17 @@ declare type OnlyOptionalUndefinedTypes<T> = {
|
|
1138
1212
|
[K in IncludeUndefined<T>]?: T[K];
|
1139
1213
|
};
|
1140
1214
|
|
1141
|
-
/**
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1215
|
+
/** @public */
|
1216
|
+
export declare const OnPointerDown: ComponentDefinition<ISchema<PBOnPointerDown>>;
|
1217
|
+
|
1218
|
+
/** @public */
|
1219
|
+
export declare const OnPointerDownResult: ComponentDefinition<ISchema<PBOnPointerDownResult>>;
|
1220
|
+
|
1221
|
+
/** @public */
|
1222
|
+
export declare const OnPointerUp: ComponentDefinition<ISchema<PBOnPointerUp>>;
|
1223
|
+
|
1224
|
+
/** @public */
|
1225
|
+
export declare const OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult>>;
|
1145
1226
|
|
1146
1227
|
/**
|
1147
1228
|
* Defines potential orientation for back face culling
|
@@ -1159,11 +1240,14 @@ export declare enum Orientation {
|
|
1159
1240
|
declare interface PBAnimationState {
|
1160
1241
|
name: string;
|
1161
1242
|
clip: string;
|
1162
|
-
playing
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1243
|
+
playing?: boolean | undefined;
|
1244
|
+
/** default=1.0s */
|
1245
|
+
weight?: number | undefined;
|
1246
|
+
/** default=1.0 */
|
1247
|
+
speed?: number | undefined;
|
1248
|
+
/** default=true */
|
1249
|
+
loop?: boolean | undefined;
|
1250
|
+
shouldReset?: boolean | undefined;
|
1167
1251
|
}
|
1168
1252
|
|
1169
1253
|
declare interface PBAnimator {
|
@@ -1171,10 +1255,12 @@ declare interface PBAnimator {
|
|
1171
1255
|
}
|
1172
1256
|
|
1173
1257
|
declare interface PBAudioSource {
|
1174
|
-
playing
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1258
|
+
playing?: boolean | undefined;
|
1259
|
+
/** default=1.0f */
|
1260
|
+
volume?: number | undefined;
|
1261
|
+
loop?: boolean | undefined;
|
1262
|
+
/** default=1.0f */
|
1263
|
+
pitch?: number | undefined;
|
1178
1264
|
audioClipUrl: string;
|
1179
1265
|
}
|
1180
1266
|
|
@@ -1185,29 +1271,35 @@ declare interface PBAvatarAttach {
|
|
1185
1271
|
|
1186
1272
|
declare interface PBAvatarShape {
|
1187
1273
|
id: string;
|
1188
|
-
name
|
1189
|
-
bodyShape
|
1190
|
-
skinColor
|
1191
|
-
hairColor
|
1192
|
-
eyeColor
|
1274
|
+
name?: string | undefined;
|
1275
|
+
bodyShape?: string | undefined;
|
1276
|
+
skinColor?: Color3 | undefined;
|
1277
|
+
hairColor?: Color3 | undefined;
|
1278
|
+
eyeColor?: Color3 | undefined;
|
1193
1279
|
wearables: string[];
|
1194
|
-
expressionTriggerId
|
1195
|
-
expressionTriggerTimestamp
|
1196
|
-
stickerTriggerId
|
1197
|
-
stickerTriggerTimestamp
|
1198
|
-
talking
|
1280
|
+
expressionTriggerId?: string | undefined;
|
1281
|
+
expressionTriggerTimestamp?: number | undefined;
|
1282
|
+
stickerTriggerId?: string | undefined;
|
1283
|
+
stickerTriggerTimestamp?: number | undefined;
|
1284
|
+
talking?: boolean | undefined;
|
1199
1285
|
}
|
1200
1286
|
|
1201
1287
|
declare interface PBBillboard {
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1288
|
+
/** default=true */
|
1289
|
+
x?: boolean | undefined;
|
1290
|
+
/** default=true */
|
1291
|
+
y?: boolean | undefined;
|
1292
|
+
/** default=true */
|
1293
|
+
z?: boolean | undefined;
|
1205
1294
|
}
|
1206
1295
|
|
1207
1296
|
declare interface PBBoxShape {
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1297
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1298
|
+
withCollisions?: boolean | undefined;
|
1299
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1300
|
+
isPointerBlocker?: boolean | undefined;
|
1301
|
+
/** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
|
1302
|
+
visible?: boolean | undefined;
|
1211
1303
|
uvs: number[];
|
1212
1304
|
}
|
1213
1305
|
|
@@ -1221,35 +1313,50 @@ declare interface PBCameraModeArea {
|
|
1221
1313
|
}
|
1222
1314
|
|
1223
1315
|
declare interface PBCylinderShape {
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1316
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1317
|
+
withCollisions?: boolean | undefined;
|
1318
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1319
|
+
isPointerBlocker?: boolean | undefined;
|
1320
|
+
/** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
|
1321
|
+
visible?: boolean | undefined;
|
1322
|
+
/** default=1.0 */
|
1323
|
+
radiusTop?: number | undefined;
|
1324
|
+
/** default=1.0 */
|
1325
|
+
radiusBottom?: number | undefined;
|
1229
1326
|
}
|
1230
1327
|
|
1231
1328
|
declare interface PBGLTFShape {
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1329
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1330
|
+
withCollisions?: boolean | undefined;
|
1331
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1332
|
+
isPointerBlocker?: boolean | undefined;
|
1333
|
+
/** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
|
1334
|
+
visible?: boolean | undefined;
|
1235
1335
|
src: string;
|
1236
1336
|
}
|
1237
1337
|
|
1238
1338
|
declare interface PBNFTShape {
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1339
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1340
|
+
withCollisions?: boolean | undefined;
|
1341
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1342
|
+
isPointerBlocker?: boolean | undefined;
|
1343
|
+
/** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
|
1344
|
+
visible?: boolean | undefined;
|
1242
1345
|
src: string;
|
1243
|
-
assetId
|
1244
|
-
style
|
1245
|
-
color
|
1346
|
+
assetId?: string | undefined;
|
1347
|
+
style?: number | undefined;
|
1348
|
+
color?: Color3 | undefined;
|
1246
1349
|
}
|
1247
1350
|
|
1248
1351
|
declare interface PBOnPointerDown {
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1352
|
+
/** default=ActionButton.ANY */
|
1353
|
+
button?: ActionButton | undefined;
|
1354
|
+
/** default='Interact' */
|
1355
|
+
hoverText?: string | undefined;
|
1356
|
+
/** default=10 */
|
1357
|
+
maxDistance?: number | undefined;
|
1358
|
+
/** default=true */
|
1359
|
+
showFeedback?: boolean | undefined;
|
1253
1360
|
}
|
1254
1361
|
|
1255
1362
|
declare interface PBOnPointerDownResult {
|
@@ -1264,10 +1371,14 @@ declare interface PBOnPointerDownResult {
|
|
1264
1371
|
}
|
1265
1372
|
|
1266
1373
|
declare interface PBOnPointerUp {
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1374
|
+
/** default=ActionButton.ANY */
|
1375
|
+
button?: ActionButton | undefined;
|
1376
|
+
/** default='Interact' */
|
1377
|
+
hoverText?: string | undefined;
|
1378
|
+
/** default=10 */
|
1379
|
+
maxDistance?: number | undefined;
|
1380
|
+
/** default=true */
|
1381
|
+
showFeedback?: boolean | undefined;
|
1271
1382
|
}
|
1272
1383
|
|
1273
1384
|
declare interface PBOnPointerUpResult {
|
@@ -1282,9 +1393,12 @@ declare interface PBOnPointerUpResult {
|
|
1282
1393
|
}
|
1283
1394
|
|
1284
1395
|
declare interface PBPlaneShape {
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1396
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1397
|
+
withCollisions?: boolean | undefined;
|
1398
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1399
|
+
isPointerBlocker?: boolean | undefined;
|
1400
|
+
/** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
|
1401
|
+
visible?: boolean | undefined;
|
1288
1402
|
uvs: number[];
|
1289
1403
|
}
|
1290
1404
|
|
@@ -1293,36 +1407,49 @@ declare interface PBPointerLock {
|
|
1293
1407
|
}
|
1294
1408
|
|
1295
1409
|
declare interface PBSphereShape {
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1410
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1411
|
+
withCollisions?: boolean | undefined;
|
1412
|
+
/** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
|
1413
|
+
isPointerBlocker?: boolean | undefined;
|
1414
|
+
/** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
|
1415
|
+
visible?: boolean | undefined;
|
1299
1416
|
}
|
1300
1417
|
|
1301
1418
|
declare interface PBTextShape {
|
1302
1419
|
text: string;
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1420
|
+
/** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
|
1421
|
+
visible?: boolean | undefined;
|
1422
|
+
font?: string | undefined;
|
1423
|
+
/** default=1.0f */
|
1424
|
+
opacity?: number | undefined;
|
1425
|
+
/** default=10 */
|
1426
|
+
fontSize?: number | undefined;
|
1427
|
+
fontAutoSize?: boolean | undefined;
|
1428
|
+
/** default='center' */
|
1429
|
+
hTextAlign?: string | undefined;
|
1430
|
+
/** default='center' */
|
1431
|
+
vTextAlign?: string | undefined;
|
1432
|
+
/** default=1 */
|
1433
|
+
width?: number | undefined;
|
1434
|
+
/** default=1 */
|
1435
|
+
height?: number | undefined;
|
1436
|
+
paddingTop?: number | undefined;
|
1437
|
+
paddingRight?: number | undefined;
|
1438
|
+
paddingBottom?: number | undefined;
|
1439
|
+
paddingLeft?: number | undefined;
|
1440
|
+
lineSpacing?: number | undefined;
|
1441
|
+
lineCount?: number | undefined;
|
1442
|
+
textWrapping?: boolean | undefined;
|
1443
|
+
shadowBlur?: number | undefined;
|
1444
|
+
shadowOffsetX?: number | undefined;
|
1445
|
+
shadowOffsetY?: number | undefined;
|
1446
|
+
outlineWidth?: number | undefined;
|
1447
|
+
/** default=(1.0,1.0,1.0) */
|
1448
|
+
shadowColor?: Color3 | undefined;
|
1449
|
+
/** default=(1.0,1.0,1.0) */
|
1450
|
+
outlineColor?: Color3 | undefined;
|
1451
|
+
/** default=(1.0,1.0,1.0) */
|
1452
|
+
textColor?: Color3 | undefined;
|
1326
1453
|
}
|
1327
1454
|
|
1328
1455
|
/**
|
@@ -1434,6 +1561,12 @@ declare namespace Plane {
|
|
1434
1561
|
function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
1435
1562
|
}
|
1436
1563
|
|
1564
|
+
/** @public */
|
1565
|
+
export declare const PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>>;
|
1566
|
+
|
1567
|
+
/** @public */
|
1568
|
+
export declare const PointerLock: ComponentDefinition<ISchema<PBPointerLock>>;
|
1569
|
+
|
1437
1570
|
/**
|
1438
1571
|
* @public
|
1439
1572
|
*/
|
@@ -1617,14 +1750,34 @@ declare type ReceiveMessage = {
|
|
1617
1750
|
/**
|
1618
1751
|
* @public
|
1619
1752
|
*/
|
1620
|
-
|
1621
|
-
[K in keyof T]: T[K] extends
|
1753
|
+
declare type Result<T extends Spec> = ToOptional<{
|
1754
|
+
[K in keyof T]: T[K] extends ISchema ? ReturnType<T[K]['deserialize']> : T[K] extends Spec ? Result<T[K]> : never;
|
1622
1755
|
}>;
|
1623
1756
|
|
1624
1757
|
/**
|
1625
1758
|
* @public
|
1626
1759
|
*/
|
1627
|
-
export declare
|
1760
|
+
export declare namespace Schemas {
|
1761
|
+
export type SchemaType = ISchema;
|
1762
|
+
const Boolean: ISchema<boolean>;
|
1763
|
+
const String: ISchema<string>;
|
1764
|
+
const Float: ISchema<number>;
|
1765
|
+
const Double: ISchema<number>;
|
1766
|
+
const Byte: ISchema<number>;
|
1767
|
+
const Short: ISchema<number>;
|
1768
|
+
const Int: ISchema<number>;
|
1769
|
+
const Int64: ISchema<number>;
|
1770
|
+
const Number: ISchema<number>;
|
1771
|
+
const Enum: typeof IEnum;
|
1772
|
+
const Array: typeof IArray;
|
1773
|
+
const Map: typeof IMap;
|
1774
|
+
const Optional: typeof IOptional;
|
1775
|
+
}
|
1776
|
+
|
1777
|
+
/**
|
1778
|
+
* @public
|
1779
|
+
*/
|
1780
|
+
declare type SdkComponents = ReturnType<typeof defineLibraryComponents>;
|
1628
1781
|
|
1629
1782
|
/**
|
1630
1783
|
* Defines supported spaces
|
@@ -1642,10 +1795,16 @@ export declare enum Space {
|
|
1642
1795
|
/**
|
1643
1796
|
* @public
|
1644
1797
|
*/
|
1645
|
-
|
1646
|
-
[key: string]:
|
1798
|
+
declare interface Spec {
|
1799
|
+
[key: string]: ISchema;
|
1647
1800
|
}
|
1648
1801
|
|
1802
|
+
/** @public */
|
1803
|
+
export declare const SphereShape: ComponentDefinition<ISchema<PBSphereShape>>;
|
1804
|
+
|
1805
|
+
/** @public */
|
1806
|
+
export declare const TextShape: ComponentDefinition<ISchema<PBTextShape>>;
|
1807
|
+
|
1649
1808
|
/**
|
1650
1809
|
* Constant used to convert a value to gamma space
|
1651
1810
|
* @public
|
@@ -1660,17 +1819,26 @@ export declare const ToLinearSpace = 2.2;
|
|
1660
1819
|
|
1661
1820
|
declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
|
1662
1821
|
|
1663
|
-
/**
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
scale: Vector3.MutableVector3;
|
1670
|
-
parent?: Entity;
|
1822
|
+
/** @public */
|
1823
|
+
export declare const Transform: ComponentDefinition<ISchema< {
|
1824
|
+
position: {
|
1825
|
+
x: number;
|
1826
|
+
y: number;
|
1827
|
+
z: number;
|
1671
1828
|
};
|
1672
|
-
|
1673
|
-
|
1829
|
+
rotation: {
|
1830
|
+
x: number;
|
1831
|
+
y: number;
|
1832
|
+
z: number;
|
1833
|
+
w: number;
|
1834
|
+
};
|
1835
|
+
scale: {
|
1836
|
+
x: number;
|
1837
|
+
y: number;
|
1838
|
+
z: number;
|
1839
|
+
};
|
1840
|
+
parent?: Entity | undefined;
|
1841
|
+
}>>;
|
1674
1842
|
|
1675
1843
|
declare type Transport = {
|
1676
1844
|
type: string;
|