@dcl/playground-assets 7.4.10-8392909116.commit-6487246 → 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.10-8392909116.commit-6487246",
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": "64872460277fc8eeaacd25ac366eb9e22195dec5"
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>;
@@ -4133,6 +4157,13 @@ export declare namespace PBAnimator {
4133
4157
  * Note that the `audio_clip_url` is not actually a URL, but rather the path of a file bundled with
4134
4158
  * the scene and declared in its manifest. The name was chosen because the URL use-case will
4135
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)
4136
4167
  */
4137
4168
  /**
4138
4169
  * @public
@@ -4148,6 +4179,10 @@ export declare interface PBAudioSource {
4148
4179
  pitch?: number | undefined;
4149
4180
  /** the clip path as given in the `files` array of the scene's manifest. */
4150
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;
4151
4186
  }
4152
4187
 
4153
4188
  /**
@@ -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",
@@ -36194,6 +36366,60 @@
36194
36366
  "endIndex": 2
36195
36367
  }
36196
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
+ },
36197
36423
  {
36198
36424
  "kind": "PropertySignature",
36199
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
+ //
53
55
  // @public (undocumented)
54
- export const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
56
+ export const AudioSource: AudioSourceComponentDefinitionExtended;
57
+
58
+ // @public (undocumented)
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>;
@@ -2075,6 +2083,8 @@ export namespace PBAnimator {
2075
2083
  // @public (undocumented)
2076
2084
  export interface PBAudioSource {
2077
2085
  audioClipUrl: string;
2086
+ currentTime?: number | undefined;
2087
+ global?: boolean | undefined;
2078
2088
  loop?: boolean | undefined;
2079
2089
  pitch?: number | undefined;
2080
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.10-8392909116.commit-6487246",
4
+ "version": "7.4.10-8394982680.commit-841a9e7",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.4.10-8392909116.commit-6487246",
8
- "@dcl/sdk": "7.4.10-8392909116.commit-6487246"
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": "64872460277fc8eeaacd25ac366eb9e22195dec5"
35
+ "commit": "841a9e70897121a4e420f983c632544bb7ff7f12"
36
36
  }