@dcl/playground-assets 7.1.4-4670008948.commit-217b840 → 7.1.4-4672664161.commit-7ba5d40
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 +24 -0
- package/dist/beta.d.ts +24 -0
- package/dist/index.bundled.d.ts +24 -0
- package/dist/index.js +8 -8
- package/dist/index.js.map +3 -3
- package/dist/playground/sdk/apis.d.ts +43 -2
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +24 -0
- package/etc/playground-assets.api.json +102 -0
- package/etc/playground-assets.api.md +5 -0
- package/package.json +4 -4
|
@@ -395,12 +395,23 @@ declare module "~system/Players" {
|
|
|
395
395
|
*/
|
|
396
396
|
declare module "~system/RestrictedActions" {
|
|
397
397
|
|
|
398
|
+
export interface Position {
|
|
399
|
+
x: number;
|
|
400
|
+
y: number;
|
|
401
|
+
z: number;
|
|
402
|
+
}
|
|
398
403
|
export interface Vector3 {
|
|
399
404
|
x: number;
|
|
400
405
|
y: number;
|
|
401
406
|
z: number;
|
|
402
407
|
}
|
|
403
|
-
export interface
|
|
408
|
+
export interface Vector2 {
|
|
409
|
+
x: number;
|
|
410
|
+
y: number;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// Function declaration section
|
|
414
|
+
export interface MovePlayerToResponse {
|
|
404
415
|
}
|
|
405
416
|
export interface MovePlayerToRequest {
|
|
406
417
|
newRelativePosition: Vector3 | undefined;
|
|
@@ -449,7 +460,13 @@ declare module "~system/RestrictedActions" {
|
|
|
449
460
|
*/
|
|
450
461
|
declare module "~system/Runtime" {
|
|
451
462
|
|
|
452
|
-
|
|
463
|
+
export interface ContentMapping {
|
|
464
|
+
file: string;
|
|
465
|
+
hash: string;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// Function declaration section
|
|
469
|
+
export interface RealmInfo {
|
|
453
470
|
baseUrl: string;
|
|
454
471
|
realmName: string;
|
|
455
472
|
networkId: number;
|
|
@@ -465,11 +482,35 @@ declare module "~system/Runtime" {
|
|
|
465
482
|
export interface GetRealmRequest {
|
|
466
483
|
}
|
|
467
484
|
export interface GetWorldTimeRequest {
|
|
485
|
+
}
|
|
486
|
+
export interface ReadFileRequest {
|
|
487
|
+
/** name of the deployed file */
|
|
488
|
+
fileName: string;
|
|
489
|
+
}
|
|
490
|
+
export interface ReadFileResponse {
|
|
491
|
+
/** contents of the file */
|
|
492
|
+
content: Uint8Array;
|
|
493
|
+
/** deployed hash/CID */
|
|
494
|
+
hash: string;
|
|
495
|
+
}
|
|
496
|
+
export interface CurrentSceneEntityRequest {
|
|
497
|
+
}
|
|
498
|
+
export interface CurrentSceneEntityResponse {
|
|
499
|
+
/** this is either the entityId or the full URN of the scene that is running */
|
|
500
|
+
urn: string;
|
|
501
|
+
/** contents of the deployed entities */
|
|
502
|
+
content: ContentMapping[];
|
|
503
|
+
/** JSON serialization of the entity.metadata field */
|
|
504
|
+
metadataJson: string;
|
|
505
|
+
/** baseUrl used to resolve all content files */
|
|
506
|
+
baseUrl: string;
|
|
468
507
|
}
|
|
469
508
|
|
|
470
509
|
// Function declaration section
|
|
471
510
|
export function getRealm(body: GetRealmRequest): Promise<GetRealmResponse>;
|
|
472
511
|
export function getWorldTime(body: GetWorldTimeRequest): Promise<GetWorldTimeResponse>;
|
|
512
|
+
export function readFile(body: ReadFileRequest): Promise<ReadFileResponse>;
|
|
513
|
+
export function getSceneInformation(body: CurrentSceneEntityRequest): Promise<CurrentSceneEntityResponse>;
|
|
473
514
|
|
|
474
515
|
}
|
|
475
516
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/sdk",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.1.4-
|
|
4
|
+
"version": "7.1.4-4672664161.commit-7ba5d40",
|
|
5
5
|
"author": "Decentraland",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@dcl/ecs": "file:../ecs",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
},
|
|
31
31
|
"types": "./index.d.ts",
|
|
32
32
|
"typings": "./index.d.ts",
|
|
33
|
-
"commit": "
|
|
33
|
+
"commit": "7ba5d4034c725e90e5c8ca8e37275bbb5e20b297"
|
|
34
34
|
}
|
|
@@ -2255,6 +2255,13 @@ export declare interface LastWriteWinElementSetComponentDefinition<T> extends Ba
|
|
|
2255
2255
|
* @param entity - Entity to get the component from
|
|
2256
2256
|
*/
|
|
2257
2257
|
getMutableOrNull(entity: Entity): T | null;
|
|
2258
|
+
/**
|
|
2259
|
+
* Get the mutable component of the entity. If the entity doesn't have the component, it's created.
|
|
2260
|
+
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
2261
|
+
* @param entity - Entity to get the component from
|
|
2262
|
+
* @param val - The initial value if it doesn't exist
|
|
2263
|
+
*/
|
|
2264
|
+
getOrCreateMutable(entity: Entity, initialValue?: T): T;
|
|
2258
2265
|
}
|
|
2259
2266
|
|
|
2260
2267
|
/**
|
|
@@ -5112,6 +5119,23 @@ export declare namespace Schemas {
|
|
|
5112
5119
|
* @returns a ISchema or fail for unsupported json-schema
|
|
5113
5120
|
*/
|
|
5114
5121
|
const fromJson: (json: JsonSchemaExtended) => ISchema<unknown>;
|
|
5122
|
+
/**
|
|
5123
|
+
* @public
|
|
5124
|
+
*
|
|
5125
|
+
* Traverses and mutates values in a JSON schema-based structure, applying the given mutation function to each value.
|
|
5126
|
+
* The function is designed to work with nested maps and arrays, recursively processing each element.
|
|
5127
|
+
*
|
|
5128
|
+
* @param jsonSchema - The JSON schema object that describes the structure of the value.
|
|
5129
|
+
* It must have a serializationType of 'map', 'array', or other custom types like 'entity'.
|
|
5130
|
+
* @param value - The value to be mutated, which should conform to the provided JSON schema.
|
|
5131
|
+
* @param mutateFn - A function that takes a value and its corresponding valueType (JsonSchemaExtended) as arguments
|
|
5132
|
+
* and returns a tuple [boolean, any]. The boolean indicates whether the mutation should be applied,
|
|
5133
|
+
* and the second element is the mutated value.
|
|
5134
|
+
*/
|
|
5135
|
+
const mutateNestedValues: (jsonSchema: JsonSchemaExtended, value: unknown, mutateFn: (value: unknown, valueType: JsonSchemaExtended) => {
|
|
5136
|
+
changed: boolean;
|
|
5137
|
+
value?: any;
|
|
5138
|
+
}) => void;
|
|
5115
5139
|
}
|
|
5116
5140
|
|
|
5117
5141
|
/**
|
|
@@ -19349,6 +19349,68 @@
|
|
|
19349
19349
|
],
|
|
19350
19350
|
"name": "getMutableOrNull"
|
|
19351
19351
|
},
|
|
19352
|
+
{
|
|
19353
|
+
"kind": "MethodSignature",
|
|
19354
|
+
"canonicalReference": "@dcl/playground-assets!LastWriteWinElementSetComponentDefinition#getOrCreateMutable:member(1)",
|
|
19355
|
+
"docComment": "/**\n * Get the mutable component of the entity. If the entity doesn't have the component, it's created. - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame\n *\n * @param entity - Entity to get the component from\n *\n * @param val - The initial value if it doesn't exist\n */\n",
|
|
19356
|
+
"excerptTokens": [
|
|
19357
|
+
{
|
|
19358
|
+
"kind": "Content",
|
|
19359
|
+
"text": "getOrCreateMutable(entity: "
|
|
19360
|
+
},
|
|
19361
|
+
{
|
|
19362
|
+
"kind": "Reference",
|
|
19363
|
+
"text": "Entity",
|
|
19364
|
+
"canonicalReference": "@dcl/playground-assets!Entity:type"
|
|
19365
|
+
},
|
|
19366
|
+
{
|
|
19367
|
+
"kind": "Content",
|
|
19368
|
+
"text": ", initialValue?: "
|
|
19369
|
+
},
|
|
19370
|
+
{
|
|
19371
|
+
"kind": "Content",
|
|
19372
|
+
"text": "T"
|
|
19373
|
+
},
|
|
19374
|
+
{
|
|
19375
|
+
"kind": "Content",
|
|
19376
|
+
"text": "): "
|
|
19377
|
+
},
|
|
19378
|
+
{
|
|
19379
|
+
"kind": "Content",
|
|
19380
|
+
"text": "T"
|
|
19381
|
+
},
|
|
19382
|
+
{
|
|
19383
|
+
"kind": "Content",
|
|
19384
|
+
"text": ";"
|
|
19385
|
+
}
|
|
19386
|
+
],
|
|
19387
|
+
"isOptional": false,
|
|
19388
|
+
"returnTypeTokenRange": {
|
|
19389
|
+
"startIndex": 5,
|
|
19390
|
+
"endIndex": 6
|
|
19391
|
+
},
|
|
19392
|
+
"releaseTag": "Public",
|
|
19393
|
+
"overloadIndex": 1,
|
|
19394
|
+
"parameters": [
|
|
19395
|
+
{
|
|
19396
|
+
"parameterName": "entity",
|
|
19397
|
+
"parameterTypeTokenRange": {
|
|
19398
|
+
"startIndex": 1,
|
|
19399
|
+
"endIndex": 2
|
|
19400
|
+
},
|
|
19401
|
+
"isOptional": false
|
|
19402
|
+
},
|
|
19403
|
+
{
|
|
19404
|
+
"parameterName": "initialValue",
|
|
19405
|
+
"parameterTypeTokenRange": {
|
|
19406
|
+
"startIndex": 3,
|
|
19407
|
+
"endIndex": 4
|
|
19408
|
+
},
|
|
19409
|
+
"isOptional": true
|
|
19410
|
+
}
|
|
19411
|
+
],
|
|
19412
|
+
"name": "getOrCreateMutable"
|
|
19413
|
+
},
|
|
19352
19414
|
{
|
|
19353
19415
|
"kind": "MethodSignature",
|
|
19354
19416
|
"canonicalReference": "@dcl/playground-assets!LastWriteWinElementSetComponentDefinition#getOrNull:member(1)",
|
|
@@ -44810,6 +44872,46 @@
|
|
|
44810
44872
|
"endIndex": 12
|
|
44811
44873
|
}
|
|
44812
44874
|
},
|
|
44875
|
+
{
|
|
44876
|
+
"kind": "Variable",
|
|
44877
|
+
"canonicalReference": "@dcl/playground-assets!Schemas.mutateNestedValues:var",
|
|
44878
|
+
"docComment": "/**\n * Traverses and mutates values in a JSON schema-based structure, applying the given mutation function to each value. The function is designed to work with nested maps and arrays, recursively processing each element.\n *\n * @param jsonSchema - The JSON schema object that describes the structure of the value. It must have a serializationType of 'map', 'array', or other custom types like 'entity'.\n *\n * @param value - The value to be mutated, which should conform to the provided JSON schema.\n *\n * @param mutateFn - A function that takes a value and its corresponding valueType (JsonSchemaExtended) as arguments and returns a tuple [boolean, any]. The boolean indicates whether the mutation should be applied, and the second element is the mutated value.\n *\n * @public\n */\n",
|
|
44879
|
+
"excerptTokens": [
|
|
44880
|
+
{
|
|
44881
|
+
"kind": "Content",
|
|
44882
|
+
"text": "mutateNestedValues: "
|
|
44883
|
+
},
|
|
44884
|
+
{
|
|
44885
|
+
"kind": "Content",
|
|
44886
|
+
"text": "(jsonSchema: "
|
|
44887
|
+
},
|
|
44888
|
+
{
|
|
44889
|
+
"kind": "Reference",
|
|
44890
|
+
"text": "JsonSchemaExtended",
|
|
44891
|
+
"canonicalReference": "@dcl/playground-assets!JsonSchemaExtended:type"
|
|
44892
|
+
},
|
|
44893
|
+
{
|
|
44894
|
+
"kind": "Content",
|
|
44895
|
+
"text": ", value: unknown, mutateFn: (value: unknown, valueType: "
|
|
44896
|
+
},
|
|
44897
|
+
{
|
|
44898
|
+
"kind": "Reference",
|
|
44899
|
+
"text": "JsonSchemaExtended",
|
|
44900
|
+
"canonicalReference": "@dcl/playground-assets!JsonSchemaExtended:type"
|
|
44901
|
+
},
|
|
44902
|
+
{
|
|
44903
|
+
"kind": "Content",
|
|
44904
|
+
"text": ") => {\n changed: boolean;\n value?: any;\n }) => void"
|
|
44905
|
+
}
|
|
44906
|
+
],
|
|
44907
|
+
"isReadonly": true,
|
|
44908
|
+
"releaseTag": "Public",
|
|
44909
|
+
"name": "mutateNestedValues",
|
|
44910
|
+
"variableTypeTokenRange": {
|
|
44911
|
+
"startIndex": 1,
|
|
44912
|
+
"endIndex": 6
|
|
44913
|
+
}
|
|
44914
|
+
},
|
|
44813
44915
|
{
|
|
44814
44916
|
"kind": "Variable",
|
|
44815
44917
|
"canonicalReference": "@dcl/playground-assets!Schemas.Number:var",
|
|
@@ -1284,6 +1284,7 @@ export interface LastWriteWinElementSetComponentDefinition<T> extends BaseCompon
|
|
|
1284
1284
|
get(entity: Entity): DeepReadonly<T>;
|
|
1285
1285
|
getMutable(entity: Entity): T;
|
|
1286
1286
|
getMutableOrNull(entity: Entity): T | null;
|
|
1287
|
+
getOrCreateMutable(entity: Entity, initialValue?: T): T;
|
|
1287
1288
|
getOrNull(entity: Entity): DeepReadonly<T> | null;
|
|
1288
1289
|
}
|
|
1289
1290
|
|
|
@@ -2607,6 +2608,10 @@ export namespace Schemas {
|
|
|
2607
2608
|
Optional: <T>(spec: ISchema<T>) => ISchema<T | undefined>;
|
|
2608
2609
|
const // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
|
|
2609
2610
|
fromJson: (json: JsonSchemaExtended) => ISchema<unknown>;
|
|
2611
|
+
const mutateNestedValues: (jsonSchema: JsonSchemaExtended, value: unknown, mutateFn: (value: unknown, valueType: JsonSchemaExtended) => {
|
|
2612
|
+
changed: boolean;
|
|
2613
|
+
value?: any;
|
|
2614
|
+
}) => void;
|
|
2610
2615
|
}
|
|
2611
2616
|
|
|
2612
2617
|
// @public (undocumented)
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/playground-assets",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.1.4-
|
|
4
|
+
"version": "7.1.4-4672664161.commit-7ba5d40",
|
|
5
5
|
"author": "Decentraland",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dcl/js-runtime": "7.1.4-
|
|
8
|
-
"@dcl/sdk": "7.1.4-
|
|
7
|
+
"@dcl/js-runtime": "7.1.4-4672664161.commit-7ba5d40",
|
|
8
|
+
"@dcl/sdk": "7.1.4-4672664161.commit-7ba5d40"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@microsoft/api-extractor": "^7.33.8"
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
},
|
|
29
29
|
"types": "./dist/index.d.ts",
|
|
30
30
|
"typings": "./dist/index.d.ts",
|
|
31
|
-
"commit": "
|
|
31
|
+
"commit": "7ba5d4034c725e90e5c8ca8e37275bbb5e20b297"
|
|
32
32
|
}
|