@dcl/playground-assets 7.4.9 → 7.4.10-8394982680.commit-841a9e7

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
3
  "description": "",
4
- "version": "7.4.9",
4
+ "version": "7.4.10-8394982680.commit-841a9e7",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
7
  "@dcl/ecs": "file:../ecs",
@@ -35,5 +35,5 @@
35
35
  },
36
36
  "types": "./index.d.ts",
37
37
  "typings": "./index.d.ts",
38
- "commit": "1e8de58e5660b4247319ca8594821cd31e8e2e9a"
38
+ "commit": "841a9e70897121a4e420f983c632544bb7ff7f12"
39
39
  }
@@ -90,8 +90,32 @@ export declare namespace AppendValueOperation {
90
90
  */
91
91
  export declare function areConnected(parcels: Coords[]): boolean;
92
92
 
93
- /** @public */
94
- export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
93
+ export declare const AudioSource: AudioSourceComponentDefinitionExtended;
94
+
95
+ /**
96
+ * @public
97
+ */
98
+ export declare interface AudioSourceComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAudioSource> {
99
+ /**
100
+ * @public
101
+ *
102
+ * Set playing=true the sound `$name`
103
+ * @param entity - entity with AudioSource component
104
+ * @param src - the path to the sound to play
105
+ * @param resetCursor - the sound starts at 0 or continues from the current cursor position
106
+ * @returns true in successful playing, false if it doesn't find the AudioSource component
107
+ */
108
+ playSound(entity: Entity, src: string, resetCursor?: boolean): boolean;
109
+ /**
110
+ * @public
111
+ *
112
+ * Set playing=false all sounds
113
+ * @param entity - entity with AudioSource component
114
+ * @param resetCursor - the sound stops at 0 or at the current cursor position
115
+ * @returns true in successful stopping, false if it doesn't find the AudioSource component
116
+ */
117
+ stopSound(entity: Entity, resetCursor?: boolean): boolean;
118
+ }
95
119
 
96
120
  /** @public */
97
121
  export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
@@ -1487,6 +1511,12 @@ export declare function createInputSystem(engine: IEngine): IInputSystem;
1487
1511
  */
1488
1512
  export declare function createPointerEventsSystem(engine: IEngine, inputSystem: IInputSystem): PointerEventsSystem;
1489
1513
 
1514
+ /**
1515
+ * @public
1516
+ * @returns tween helper to be used on the scene
1517
+ */
1518
+ export declare function createTweenSystem(engine: IEngine): TweenSystem;
1519
+
1490
1520
  /**
1491
1521
  * Transform parenting: cyclic dependency checker
1492
1522
  * It checks only in modified Transforms
@@ -1989,6 +2019,7 @@ export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefin
1989
2019
  * @public
1990
2020
  */
1991
2021
  export declare interface IEngine {
2022
+ _id: number;
1992
2023
  /**
1993
2024
  * @public
1994
2025
  * Increment the used entity counter and return the next one.
@@ -4126,6 +4157,13 @@ export declare namespace PBAnimator {
4126
4157
  * Note that the `audio_clip_url` is not actually a URL, but rather the path of a file bundled with
4127
4158
  * the scene and declared in its manifest. The name was chosen because the URL use-case will
4128
4159
  * eventually be supported.
4160
+ *
4161
+ * `playing=true` when it's previously `playing=true`
4162
+ * a) if clip is playing and `current_time` is NOT SET, the clip remains in the current `current_time`
4163
+ * b) if clip is stopped or `current_time` is set, the clip is played from the `current_time` (if set) or from the beginning
4164
+ *
4165
+ * If other property (volume, loop, pitch) is changed while playing, the clip is keep playing with the new properties
4166
+ * Changing `audio_clip_url` while playing stops the current clip and plays the new one (as a new instance)
4129
4167
  */
4130
4168
  /**
4131
4169
  * @public
@@ -4141,6 +4179,10 @@ export declare interface PBAudioSource {
4141
4179
  pitch?: number | undefined;
4142
4180
  /** the clip path as given in the `files` array of the scene's manifest. */
4143
4181
  audioClipUrl: string;
4182
+ /** specifies the current playback time of the clip in seconds (default: 0). */
4183
+ currentTime?: number | undefined;
4184
+ /** whether the audio plays at constant volume across the scene. */
4185
+ global?: boolean | undefined;
4144
4186
  }
4145
4187
 
4146
4188
  /**
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.42.3"
8
+ "packageVersion": "7.43.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.42.3",
4
+ "toolVersion": "7.43.0",
5
5
  "schemaVersion": 1011,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -883,12 +883,36 @@
883
883
  {
884
884
  "kind": "Variable",
885
885
  "canonicalReference": "@dcl/playground-assets!AudioSource:var",
886
- "docComment": "/**\n * @public\n */\n",
886
+ "docComment": "",
887
887
  "excerptTokens": [
888
888
  {
889
889
  "kind": "Content",
890
890
  "text": "AudioSource: "
891
891
  },
892
+ {
893
+ "kind": "Reference",
894
+ "text": "AudioSourceComponentDefinitionExtended",
895
+ "canonicalReference": "@dcl/playground-assets!AudioSourceComponentDefinitionExtended:interface"
896
+ }
897
+ ],
898
+ "fileUrlPath": "../ecs/dist/index.d.ts",
899
+ "isReadonly": true,
900
+ "releaseTag": "Public",
901
+ "name": "AudioSource",
902
+ "variableTypeTokenRange": {
903
+ "startIndex": 1,
904
+ "endIndex": 2
905
+ }
906
+ },
907
+ {
908
+ "kind": "Interface",
909
+ "canonicalReference": "@dcl/playground-assets!AudioSourceComponentDefinitionExtended:interface",
910
+ "docComment": "/**\n * @public\n */\n",
911
+ "excerptTokens": [
912
+ {
913
+ "kind": "Content",
914
+ "text": "export interface AudioSourceComponentDefinitionExtended extends "
915
+ },
892
916
  {
893
917
  "kind": "Reference",
894
918
  "text": "LastWriteWinElementSetComponentDefinition",
@@ -906,16 +930,164 @@
906
930
  {
907
931
  "kind": "Content",
908
932
  "text": ">"
933
+ },
934
+ {
935
+ "kind": "Content",
936
+ "text": " "
909
937
  }
910
938
  ],
911
- "fileUrlPath": "../ecs/dist/components/generated/global.gen.d.ts",
912
- "isReadonly": true,
939
+ "fileUrlPath": "../ecs/dist/components/extended/AudioSource.d.ts",
913
940
  "releaseTag": "Public",
914
- "name": "AudioSource",
915
- "variableTypeTokenRange": {
916
- "startIndex": 1,
917
- "endIndex": 5
918
- }
941
+ "name": "AudioSourceComponentDefinitionExtended",
942
+ "preserveMemberOrder": false,
943
+ "members": [
944
+ {
945
+ "kind": "MethodSignature",
946
+ "canonicalReference": "@dcl/playground-assets!AudioSourceComponentDefinitionExtended#playSound:member(1)",
947
+ "docComment": "/**\n * Set playing=true the sound `$name`\n *\n * @param entity - entity with AudioSource component\n *\n * @param src - the path to the sound to play\n *\n * @param resetCursor - the sound starts at 0 or continues from the current cursor position\n *\n * @returns true in successful playing, false if it doesn't find the AudioSource component\n *\n * @public\n */\n",
948
+ "excerptTokens": [
949
+ {
950
+ "kind": "Content",
951
+ "text": "playSound(entity: "
952
+ },
953
+ {
954
+ "kind": "Reference",
955
+ "text": "Entity",
956
+ "canonicalReference": "@dcl/playground-assets!Entity:type"
957
+ },
958
+ {
959
+ "kind": "Content",
960
+ "text": ", src: "
961
+ },
962
+ {
963
+ "kind": "Content",
964
+ "text": "string"
965
+ },
966
+ {
967
+ "kind": "Content",
968
+ "text": ", resetCursor?: "
969
+ },
970
+ {
971
+ "kind": "Content",
972
+ "text": "boolean"
973
+ },
974
+ {
975
+ "kind": "Content",
976
+ "text": "): "
977
+ },
978
+ {
979
+ "kind": "Content",
980
+ "text": "boolean"
981
+ },
982
+ {
983
+ "kind": "Content",
984
+ "text": ";"
985
+ }
986
+ ],
987
+ "isOptional": false,
988
+ "returnTypeTokenRange": {
989
+ "startIndex": 7,
990
+ "endIndex": 8
991
+ },
992
+ "releaseTag": "Public",
993
+ "overloadIndex": 1,
994
+ "parameters": [
995
+ {
996
+ "parameterName": "entity",
997
+ "parameterTypeTokenRange": {
998
+ "startIndex": 1,
999
+ "endIndex": 2
1000
+ },
1001
+ "isOptional": false
1002
+ },
1003
+ {
1004
+ "parameterName": "src",
1005
+ "parameterTypeTokenRange": {
1006
+ "startIndex": 3,
1007
+ "endIndex": 4
1008
+ },
1009
+ "isOptional": false
1010
+ },
1011
+ {
1012
+ "parameterName": "resetCursor",
1013
+ "parameterTypeTokenRange": {
1014
+ "startIndex": 5,
1015
+ "endIndex": 6
1016
+ },
1017
+ "isOptional": true
1018
+ }
1019
+ ],
1020
+ "name": "playSound"
1021
+ },
1022
+ {
1023
+ "kind": "MethodSignature",
1024
+ "canonicalReference": "@dcl/playground-assets!AudioSourceComponentDefinitionExtended#stopSound:member(1)",
1025
+ "docComment": "/**\n * Set playing=false all sounds\n *\n * @param entity - entity with AudioSource component\n *\n * @param resetCursor - the sound stops at 0 or at the current cursor position\n *\n * @returns true in successful stopping, false if it doesn't find the AudioSource component\n *\n * @public\n */\n",
1026
+ "excerptTokens": [
1027
+ {
1028
+ "kind": "Content",
1029
+ "text": "stopSound(entity: "
1030
+ },
1031
+ {
1032
+ "kind": "Reference",
1033
+ "text": "Entity",
1034
+ "canonicalReference": "@dcl/playground-assets!Entity:type"
1035
+ },
1036
+ {
1037
+ "kind": "Content",
1038
+ "text": ", resetCursor?: "
1039
+ },
1040
+ {
1041
+ "kind": "Content",
1042
+ "text": "boolean"
1043
+ },
1044
+ {
1045
+ "kind": "Content",
1046
+ "text": "): "
1047
+ },
1048
+ {
1049
+ "kind": "Content",
1050
+ "text": "boolean"
1051
+ },
1052
+ {
1053
+ "kind": "Content",
1054
+ "text": ";"
1055
+ }
1056
+ ],
1057
+ "isOptional": false,
1058
+ "returnTypeTokenRange": {
1059
+ "startIndex": 5,
1060
+ "endIndex": 6
1061
+ },
1062
+ "releaseTag": "Public",
1063
+ "overloadIndex": 1,
1064
+ "parameters": [
1065
+ {
1066
+ "parameterName": "entity",
1067
+ "parameterTypeTokenRange": {
1068
+ "startIndex": 1,
1069
+ "endIndex": 2
1070
+ },
1071
+ "isOptional": false
1072
+ },
1073
+ {
1074
+ "parameterName": "resetCursor",
1075
+ "parameterTypeTokenRange": {
1076
+ "startIndex": 3,
1077
+ "endIndex": 4
1078
+ },
1079
+ "isOptional": true
1080
+ }
1081
+ ],
1082
+ "name": "stopSound"
1083
+ }
1084
+ ],
1085
+ "extendsTokenRanges": [
1086
+ {
1087
+ "startIndex": 1,
1088
+ "endIndex": 5
1089
+ }
1090
+ ]
919
1091
  },
920
1092
  {
921
1093
  "kind": "Variable",
@@ -14805,6 +14977,53 @@
14805
14977
  ],
14806
14978
  "name": "createPointerEventsSystem"
14807
14979
  },
14980
+ {
14981
+ "kind": "Function",
14982
+ "canonicalReference": "@dcl/playground-assets!createTweenSystem:function(1)",
14983
+ "docComment": "/**\n * @returns tween helper to be used on the scene\n *\n * @public\n */\n",
14984
+ "excerptTokens": [
14985
+ {
14986
+ "kind": "Content",
14987
+ "text": "export declare function createTweenSystem(engine: "
14988
+ },
14989
+ {
14990
+ "kind": "Reference",
14991
+ "text": "IEngine",
14992
+ "canonicalReference": "@dcl/playground-assets!IEngine:interface"
14993
+ },
14994
+ {
14995
+ "kind": "Content",
14996
+ "text": "): "
14997
+ },
14998
+ {
14999
+ "kind": "Reference",
15000
+ "text": "TweenSystem",
15001
+ "canonicalReference": "@dcl/playground-assets!TweenSystem:type"
15002
+ },
15003
+ {
15004
+ "kind": "Content",
15005
+ "text": ";"
15006
+ }
15007
+ ],
15008
+ "fileUrlPath": "../ecs/dist/systems/tween.d.ts",
15009
+ "returnTypeTokenRange": {
15010
+ "startIndex": 3,
15011
+ "endIndex": 4
15012
+ },
15013
+ "releaseTag": "Public",
15014
+ "overloadIndex": 1,
15015
+ "parameters": [
15016
+ {
15017
+ "parameterName": "engine",
15018
+ "parameterTypeTokenRange": {
15019
+ "startIndex": 1,
15020
+ "endIndex": 2
15021
+ },
15022
+ "isOptional": false
15023
+ }
15024
+ ],
15025
+ "name": "createTweenSystem"
15026
+ },
14808
15027
  {
14809
15028
  "kind": "Function",
14810
15029
  "canonicalReference": "@dcl/playground-assets!cyclicParentingChecker:function(1)",
@@ -18899,6 +19118,33 @@
18899
19118
  "name": "IEngine",
18900
19119
  "preserveMemberOrder": false,
18901
19120
  "members": [
19121
+ {
19122
+ "kind": "PropertySignature",
19123
+ "canonicalReference": "@dcl/playground-assets!IEngine#_id:member",
19124
+ "docComment": "",
19125
+ "excerptTokens": [
19126
+ {
19127
+ "kind": "Content",
19128
+ "text": "_id: "
19129
+ },
19130
+ {
19131
+ "kind": "Content",
19132
+ "text": "number"
19133
+ },
19134
+ {
19135
+ "kind": "Content",
19136
+ "text": ";"
19137
+ }
19138
+ ],
19139
+ "isReadonly": false,
19140
+ "isOptional": false,
19141
+ "releaseTag": "Public",
19142
+ "name": "_id",
19143
+ "propertyTypeTokenRange": {
19144
+ "startIndex": 1,
19145
+ "endIndex": 2
19146
+ }
19147
+ },
18902
19148
  {
18903
19149
  "kind": "MethodSignature",
18904
19150
  "canonicalReference": "@dcl/playground-assets!IEngine#addEntity:member(1)",
@@ -36120,6 +36366,60 @@
36120
36366
  "endIndex": 2
36121
36367
  }
36122
36368
  },
36369
+ {
36370
+ "kind": "PropertySignature",
36371
+ "canonicalReference": "@dcl/playground-assets!PBAudioSource#currentTime:member",
36372
+ "docComment": "/**\n * specifies the current playback time of the clip in seconds (default: 0).\n */\n",
36373
+ "excerptTokens": [
36374
+ {
36375
+ "kind": "Content",
36376
+ "text": "currentTime?: "
36377
+ },
36378
+ {
36379
+ "kind": "Content",
36380
+ "text": "number | undefined"
36381
+ },
36382
+ {
36383
+ "kind": "Content",
36384
+ "text": ";"
36385
+ }
36386
+ ],
36387
+ "isReadonly": false,
36388
+ "isOptional": true,
36389
+ "releaseTag": "Public",
36390
+ "name": "currentTime",
36391
+ "propertyTypeTokenRange": {
36392
+ "startIndex": 1,
36393
+ "endIndex": 2
36394
+ }
36395
+ },
36396
+ {
36397
+ "kind": "PropertySignature",
36398
+ "canonicalReference": "@dcl/playground-assets!PBAudioSource#global:member",
36399
+ "docComment": "/**\n * whether the audio plays at constant volume across the scene.\n */\n",
36400
+ "excerptTokens": [
36401
+ {
36402
+ "kind": "Content",
36403
+ "text": "global?: "
36404
+ },
36405
+ {
36406
+ "kind": "Content",
36407
+ "text": "boolean | undefined"
36408
+ },
36409
+ {
36410
+ "kind": "Content",
36411
+ "text": ";"
36412
+ }
36413
+ ],
36414
+ "isReadonly": false,
36415
+ "isOptional": true,
36416
+ "releaseTag": "Public",
36417
+ "name": "global",
36418
+ "propertyTypeTokenRange": {
36419
+ "startIndex": 1,
36420
+ "endIndex": 2
36421
+ }
36422
+ },
36123
36423
  {
36124
36424
  "kind": "PropertySignature",
36125
36425
  "canonicalReference": "@dcl/playground-assets!PBAudioSource#loop:member",
@@ -50,8 +50,16 @@ export namespace AppendValueOperation {
50
50
  // @public
51
51
  export function areConnected(parcels: Coords[]): boolean;
52
52
 
53
+ // Warning: (ae-missing-release-tag) "AudioSource" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
54
+ //
55
+ // @public (undocumented)
56
+ export const AudioSource: AudioSourceComponentDefinitionExtended;
57
+
53
58
  // @public (undocumented)
54
- export const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
59
+ export interface AudioSourceComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAudioSource> {
60
+ playSound(entity: Entity, src: string, resetCursor?: boolean): boolean;
61
+ stopSound(entity: Entity, resetCursor?: boolean): boolean;
62
+ }
55
63
 
56
64
  // @public (undocumented)
57
65
  export const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
@@ -751,6 +759,9 @@ export function createInputSystem(engine: IEngine): IInputSystem;
751
759
  // @public
752
760
  export function createPointerEventsSystem(engine: IEngine, inputSystem: IInputSystem): PointerEventsSystem;
753
761
 
762
+ // @public (undocumented)
763
+ export function createTweenSystem(engine: IEngine): TweenSystem;
764
+
754
765
  // Warning: (tsdoc-code-fence-closing-syntax) Unexpected characters after closing delimiter for code fence
755
766
  // Warning: (tsdoc-code-span-missing-delimiter) The code span is missing its closing backtick
756
767
  // Warning: (tsdoc-undefined-tag) The TSDoc tag "@params" is not defined in this configuration
@@ -1158,6 +1169,8 @@ export interface IEngine {
1158
1169
  // @alpha
1159
1170
  getEntityOrNullByName(label: string): Entity | null;
1160
1171
  getEntityState(entity: Entity): EntityState;
1172
+ // (undocumented)
1173
+ _id: number;
1161
1174
  readonly PlayerEntity: Entity;
1162
1175
  registerComponentDefinition<T>(componentName: string, componentDefinition: ComponentDefinition<T>): ComponentDefinition<T>;
1163
1176
  // (undocumented)
@@ -2070,6 +2083,8 @@ export namespace PBAnimator {
2070
2083
  // @public (undocumented)
2071
2084
  export interface PBAudioSource {
2072
2085
  audioClipUrl: string;
2086
+ currentTime?: number | undefined;
2087
+ global?: boolean | undefined;
2073
2088
  loop?: boolean | undefined;
2074
2089
  pitch?: number | undefined;
2075
2090
  playing?: boolean | undefined;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dcl/playground-assets",
3
3
  "description": "",
4
- "version": "7.4.9",
4
+ "version": "7.4.10-8394982680.commit-841a9e7",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.4.9",
8
- "@dcl/sdk": "7.4.9"
7
+ "@dcl/js-runtime": "7.4.10-8394982680.commit-841a9e7",
8
+ "@dcl/sdk": "7.4.10-8394982680.commit-841a9e7"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@microsoft/api-extractor": "^7.33.8"
@@ -32,5 +32,5 @@
32
32
  },
33
33
  "types": "./dist/index.d.ts",
34
34
  "typings": "./dist/index.d.ts",
35
- "commit": "1e8de58e5660b4247319ca8594821cd31e8e2e9a"
35
+ "commit": "841a9e70897121a4e420f983c632544bb7ff7f12"
36
36
  }