@applemusic-like-lyrics/vue 0.4.2 → 0.5.0

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/amll-vue.cjs CHANGED
@@ -3,38 +3,74 @@ let vue = require("vue");
3
3
  let _applemusic_like_lyrics_core = require("@applemusic-like-lyrics/core");
4
4
  //#region src/BackgroundRender.tsx
5
5
  const backgroundRenderProps = {
6
+ /**
7
+ * 设置背景专辑资源
8
+ */
6
9
  album: {
7
10
  type: [String, Object],
8
11
  required: false
9
12
  },
13
+ /**
14
+ * 设置专辑资源是否为视频
15
+ */
10
16
  albumIsVideo: {
11
17
  type: Boolean,
12
18
  required: false
13
19
  },
20
+ /**
21
+ * 设置当前背景动画帧率,如果为 `undefined` 则默认为 `30`
22
+ */
14
23
  fps: {
15
24
  type: Number,
16
25
  required: false
17
26
  },
27
+ /**
28
+ * 设置当前播放状态,如果为 `undefined` 则默认为 `true`
29
+ */
18
30
  playing: {
19
31
  type: Boolean,
20
32
  required: false
21
33
  },
34
+ /**
35
+ * 设置当前动画流动速度,如果为 `undefined` 则默认为 `2`
36
+ */
22
37
  flowSpeed: {
23
38
  type: Number,
24
39
  required: false
25
40
  },
41
+ /**
42
+ * 设置背景是否根据“是否有歌词”这个特征调整自身效果,例如有歌词时会变得更加活跃
43
+ *
44
+ * 部分渲染器会根据这个特征调整自身效果
45
+ *
46
+ * 如果不确定是否需要赋值或无法知晓是否包含歌词,请传入 true 或不做任何处理(默认值为 true)
47
+ */
26
48
  hasLyric: {
27
49
  type: Boolean,
28
50
  required: false
29
51
  },
52
+ /**
53
+ * 设置低频的音量大小,范围在 80hz-120hz 之间为宜,取值范围在 [0.0-1.0] 之间
54
+ *
55
+ * 部分渲染器会根据音量大小调整背景效果(例如根据鼓点跳动)
56
+ *
57
+ * 如果无法获取到类似的数据,请传入 undefined 或 1.0 作为默认值,或不做任何处理(默认值即 1.0)
58
+ */
30
59
  lowFreqVolume: {
31
60
  type: Number,
32
61
  required: false
33
62
  },
63
+ /**
64
+ * 设置当前渲染缩放比例,如果为 `undefined` 则默认为 `0.5`
65
+ */
34
66
  renderScale: {
35
67
  type: Number,
36
68
  required: false
37
69
  },
70
+ /**
71
+ * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`
72
+ * 默认渲染器有可能会随着版本更新而更换
73
+ */
38
74
  renderer: {
39
75
  type: Object,
40
76
  required: false
@@ -93,70 +129,152 @@ const BackgroundRender = (0, vue.defineComponent)({
93
129
  //#endregion
94
130
  //#region src/LyricPlayer.tsx
95
131
  const lyricPlayerProps = {
132
+ /**
133
+ * 是否禁用歌词播放组件,默认为 `false`,歌词组件启用后将会开始逐帧更新歌词的动画效果,并对传入的其他参数变更做出反馈。
134
+ *
135
+ * 如果禁用了歌词组件动画,你也可以通过引用取得原始渲染组件实例,手动逐帧调用其 `update` 函数来更新动画效果。
136
+ */
96
137
  disabled: {
97
138
  type: Boolean,
98
139
  default: false
99
140
  },
141
+ /**
142
+ * 是否演出部分效果,目前会控制播放间奏点的动画的播放暂停与否,默认为 `true`
143
+ */
100
144
  playing: {
101
145
  type: Boolean,
102
146
  default: true
103
147
  },
148
+ /**
149
+ * 设置歌词行的对齐方式,如果为 `undefined` 则默认为 `center`
150
+ *
151
+ * - 设置成 `top` 的话将会向目标歌词行的顶部对齐
152
+ * - 设置成 `bottom` 的话将会向目标歌词行的底部对齐
153
+ * - 设置成 `center` 的话将会向目标歌词行的垂直中心对齐
154
+ */
104
155
  alignAnchor: {
105
156
  type: String,
106
157
  default: "center"
107
158
  },
159
+ /**
160
+ * 设置默认的歌词行对齐位置,相对于整个歌词播放组件的大小位置,如果为 `undefined`
161
+ * 则默认为 `0.5`
162
+ *
163
+ * 可以设置一个 `[0.0-1.0]` 之间的任意数字,代表组件高度由上到下的比例位置
164
+ */
108
165
  alignPosition: {
109
166
  type: Number,
110
167
  default: .5
111
168
  },
169
+ /**
170
+ * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用
171
+ *
172
+ * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行
173
+ *
174
+ * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一
175
+ */
112
176
  enableSpring: {
113
177
  type: Boolean,
114
178
  default: true
115
179
  },
180
+ /**
181
+ * 设置是否启用歌词行的模糊效果,默认为 `true`
182
+ */
116
183
  enableBlur: {
117
184
  type: Boolean,
118
185
  default: true
119
186
  },
187
+ /**
188
+ * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用
189
+ *
190
+ * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行
191
+ *
192
+ * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一
193
+ */
120
194
  enableScale: {
121
195
  type: Boolean,
122
196
  default: true
123
197
  },
198
+ /**
199
+ * 设置是否隐藏已经播放过的歌词行,默认不隐藏
200
+ */
124
201
  hidePassedLines: {
125
202
  type: Boolean,
126
203
  default: false
127
204
  },
205
+ /**
206
+ * 设置歌词中不雅用语的掩码模式,默认为 `MaskObsceneWordsMode.Disabled`,即不掩码
207
+ */
128
208
  maskObsceneWordsMode: {
129
209
  type: String,
130
210
  default: _applemusic_like_lyrics_core.MaskObsceneWordsMode.Disabled
131
211
  },
212
+ /**
213
+ * 设置歌词优化选项
214
+ */
132
215
  optimizeOptions: {
133
216
  type: Object,
134
217
  required: false
135
218
  },
219
+ /**
220
+ * 设置当前播放歌词,要注意传入后这个数组内的信息不得修改,否则会发生错误
221
+ */
136
222
  lyricLines: {
137
223
  type: Object,
138
224
  required: false
139
225
  },
226
+ /**
227
+ * 设置当前播放进度,单位为毫秒且**必须是整数**,此时将会更新内部的歌词进度信息
228
+ * 内部会根据调用间隔和播放进度自动决定如何滚动和显示歌词,所以这个的调用频率越快越准确越好
229
+ */
140
230
  currentTime: {
141
231
  type: Number,
142
232
  default: 0
143
233
  },
234
+ /**
235
+ * 设置文字动画的渐变宽度,单位以歌词行的主文字字体大小的倍数为单位,默认为 0.5,即一个全角字符的一半宽度
236
+ *
237
+ * 如果要模拟 Apple Music for Android 的效果,可以设置为 1
238
+ *
239
+ * 如果要模拟 Apple Music for iPad 的效果,可以设置为 0.5
240
+ *
241
+ * 如果想要近乎禁用渐变效果,可以设置成非常接近 0 的小数(例如 `0.0001` ),但是**不可以为 0**
242
+ */
144
243
  wordFadeWidth: {
145
244
  type: Number,
146
245
  default: .5
147
246
  },
247
+ /**
248
+ * 设置所有歌词行在横坐标上的弹簧属性,包括重量、弹力和阻力。
249
+ *
250
+ * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样
251
+ */
148
252
  linePosXSpringParams: {
149
253
  type: Object,
150
254
  required: false
151
255
  },
256
+ /**
257
+ * 设置所有歌词行在​纵坐标上的弹簧属性,包括重量、弹力和阻力。
258
+ *
259
+ * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样
260
+ */
152
261
  linePosYSpringParams: {
153
262
  type: Object,
154
263
  required: false
155
264
  },
265
+ /**
266
+ * 设置所有歌词行在​缩放大小上的弹簧属性,包括重量、弹力和阻力。
267
+ *
268
+ * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样
269
+ */
156
270
  lineScaleSpringParams: {
157
271
  type: Object,
158
272
  required: false
159
273
  },
274
+ /**
275
+ * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`
276
+ * 默认渲染器有可能会随着版本更新而更换
277
+ */
160
278
  lyricPlayer: {
161
279
  type: Object,
162
280
  required: false
@@ -1 +1 @@
1
- {"version":3,"file":"amll-vue.cjs","names":["AbstractBaseRenderer","BaseRenderer","BackgroundRender","CoreBackgroundRender","MeshGradientRenderer","defineComponent","ExtractPublicPropTypes","onMounted","onUnmounted","PropType","Ref","ref","ShallowRef","useTemplateRef","watchEffect","BackgroundRenderRef","bgRender","wrapperEl","Readonly","HTMLDivElement","backgroundRenderProps","album","type","String","Object","HTMLImageElement","HTMLVideoElement","required","albumIsVideo","Boolean","fps","Number","playing","flowSpeed","hasLyric","lowFreqVolume","renderScale","renderer","args","ConstructorParameters","const","BackgroundRenderProps","name","props","setup","expose","wrapperRef","bgRenderRef","value","new","el","getElement","style","width","height","appendChild","dispose","setAlbum","setFPS","pause","resume","setFlowSpeed","setRenderScale","setLowFreqVolume","undefined","setHasLyric","_createVNode","BaseRenderer","LyricPlayer","CoreLyricPlayer","LyricLine","LyricLineMouseEvent","LyricPlayerBase","MaskObsceneWordsMode","OptimizeLyricOptions","spring","computed","defineComponent","ExtractPublicPropTypes","onMounted","onUnmounted","PropType","Ref","ref","ShallowRef","SlotsType","Teleport","useTemplateRef","watch","watchEffect","lyricPlayerProps","disabled","type","Boolean","default","playing","alignAnchor","String","alignPosition","Number","enableSpring","enableBlur","enableScale","hidePassedLines","maskObsceneWordsMode","Disabled","optimizeOptions","Object","required","lyricLines","currentTime","wordFadeWidth","linePosXSpringParams","Partial","SpringParams","linePosYSpringParams","lineScaleSpringParams","lyricPlayer","args","ConstructorParameters","const","LyricPlayerProps","lyricPlayerEmits","lineClick","_","lineContextmenu","LyricPlayerEmits","LyricPlayerRef","wrapperEl","Readonly","HTMLDivElement","name","props","emits","slots","setup","expose","emit","attrs","wrapperRef","playerRef","lineClickHandler","e","Event","lineContextMenuHandler","wrapper","value","appendChild","getElement","addEventListener","removeEventListener","dispose","onCleanup","canceled","lastTime","onFrame","time","update","requestAnimationFrame","undefined","resume","pause","setAlignAnchor","setHidePassedLines","setMaskObsceneWords","setAlignPosition","setEnableSpring","setEnableBlur","setEnableScale","player","setOptimizeOptions","setLyricLines","setCurrentTime","immediate","setWordFadeWidth","setLinePosXSpringParams","setLinePosYSpringParams","setLineScaleSpringParams","bottomLineEl","getBottomLineElement","_createVNode","_mergeProps"],"sources":["../src/BackgroundRender.tsx","../src/LyricPlayer.tsx"],"sourcesContent":["import {\n\ttype AbstractBaseRenderer,\n\ttype BaseRenderer,\n\tBackgroundRender as CoreBackgroundRender,\n\tMeshGradientRenderer,\n} from \"@applemusic-like-lyrics/core\";\nimport {\n\tdefineComponent,\n\ttype ExtractPublicPropTypes,\n\tonMounted,\n\tonUnmounted,\n\ttype PropType,\n\ttype Ref,\n\tref,\n\ttype ShallowRef,\n\tuseTemplateRef,\n\twatchEffect,\n} from \"vue\";\n\n/**\n * 背景渲染组件的引用\n */\nexport interface BackgroundRenderRef {\n\t/**\n\t * 背景渲染实例引用\n\t */\n\tbgRender?: Ref<AbstractBaseRenderer | undefined>;\n\t/**\n\t * 将背景渲染实例的元素包裹起来的 DIV 元素实例\n\t */\n\twrapperEl: Readonly<ShallowRef<HTMLDivElement | null>>;\n}\n\nconst backgroundRenderProps = {\n\t/**\n\t * 设置背景专辑资源\n\t */\n\talbum: {\n\t\ttype: [String, Object] as PropType<\n\t\t\tstring | HTMLImageElement | HTMLVideoElement\n\t\t>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置专辑资源是否为视频\n\t */\n\talbumIsVideo: {\n\t\ttype: Boolean,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前背景动画帧率,如果为 `undefined` 则默认为 `30`\n\t */\n\tfps: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前播放状态,如果为 `undefined` 则默认为 `true`\n\t */\n\tplaying: {\n\t\ttype: Boolean,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前动画流动速度,如果为 `undefined` 则默认为 `2`\n\t */\n\tflowSpeed: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置背景是否根据“是否有歌词”这个特征调整自身效果,例如有歌词时会变得更加活跃\n\t *\n\t * 部分渲染器会根据这个特征调整自身效果\n\t *\n\t * 如果不确定是否需要赋值或无法知晓是否包含歌词,请传入 true 或不做任何处理(默认值为 true)\n\t */\n\thasLyric: {\n\t\ttype: Boolean,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置低频的音量大小,范围在 80hz-120hz 之间为宜,取值范围在 [0.0-1.0] 之间\n\t *\n\t * 部分渲染器会根据音量大小调整背景效果(例如根据鼓点跳动)\n\t *\n\t * 如果无法获取到类似的数据,请传入 undefined 或 1.0 作为默认值,或不做任何处理(默认值即 1.0)\n\t */\n\tlowFreqVolume: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前渲染缩放比例,如果为 `undefined` 则默认为 `0.5`\n\t */\n\trenderScale: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`\n\t * 默认渲染器有可能会随着版本更新而更换\n\t */\n\trenderer: {\n\t\ttype: Object as PropType<{\n\t\t\tnew (...args: ConstructorParameters<typeof BaseRenderer>): BaseRenderer;\n\t\t}>,\n\t\trequired: false,\n\t},\n} as const;\n\nexport type BackgroundRenderProps = ExtractPublicPropTypes<\n\ttypeof backgroundRenderProps\n>;\n\nexport const BackgroundRender = defineComponent({\n\tname: \"BackgroundRender\",\n\tprops: backgroundRenderProps,\n\tsetup(props, { expose }) {\n\t\tconst wrapperRef = useTemplateRef<HTMLDivElement>(\"wrapper-ref\");\n\t\tconst bgRenderRef = ref<AbstractBaseRenderer>();\n\n\t\tonMounted(() => {\n\t\t\tif (wrapperRef.value) {\n\t\t\t\tbgRenderRef.value = CoreBackgroundRender.new(\n\t\t\t\t\tprops.renderer ?? MeshGradientRenderer,\n\t\t\t\t);\n\t\t\t\tconst el = bgRenderRef.value.getElement();\n\t\t\t\tel.style.width = \"100%\";\n\t\t\t\tel.style.height = \"100%\";\n\t\t\t\twrapperRef.value.appendChild(el);\n\t\t\t}\n\t\t});\n\n\t\tonUnmounted(() => {\n\t\t\tif (bgRenderRef.value) {\n\t\t\t\tbgRenderRef.value.dispose();\n\t\t\t}\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.album)\n\t\t\t\tbgRenderRef.value?.setAlbum(props.album, props.albumIsVideo);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.fps) bgRenderRef.value?.setFPS(props.fps);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.playing) bgRenderRef.value?.pause();\n\t\t\telse bgRenderRef.value?.resume();\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.flowSpeed) bgRenderRef.value?.setFlowSpeed(props.flowSpeed);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.renderScale)\n\t\t\t\tbgRenderRef.value?.setRenderScale(props.renderScale);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.lowFreqVolume)\n\t\t\t\tbgRenderRef.value?.setLowFreqVolume(props.lowFreqVolume);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.hasLyric !== undefined)\n\t\t\t\tbgRenderRef.value?.setHasLyric(props.hasLyric ?? true);\n\t\t});\n\n\t\texpose<BackgroundRenderRef>({\n\t\t\tbgRender: bgRenderRef,\n\t\t\twrapperEl: wrapperRef,\n\t\t});\n\n\t\treturn () => <div style=\"display: contents;\" ref=\"wrapper-ref\" />;\n\t},\n});\n","import {\n\ttype BaseRenderer,\n\tLyricPlayer as CoreLyricPlayer,\n\ttype LyricLine,\n\ttype LyricLineMouseEvent,\n\ttype LyricPlayerBase,\n\tMaskObsceneWordsMode,\n\ttype OptimizeLyricOptions,\n\ttype spring,\n} from \"@applemusic-like-lyrics/core\";\nimport {\n\tcomputed,\n\tdefineComponent,\n\ttype ExtractPublicPropTypes,\n\tonMounted,\n\tonUnmounted,\n\ttype PropType,\n\ttype Ref,\n\tref,\n\ttype ShallowRef,\n\ttype SlotsType,\n\tTeleport,\n\tuseTemplateRef,\n\twatch,\n\twatchEffect,\n} from \"vue\";\n\nconst lyricPlayerProps = {\n\t/**\n\t * 是否禁用歌词播放组件,默认为 `false`,歌词组件启用后将会开始逐帧更新歌词的动画效果,并对传入的其他参数变更做出反馈。\n\t *\n\t * 如果禁用了歌词组件动画,你也可以通过引用取得原始渲染组件实例,手动逐帧调用其 `update` 函数来更新动画效果。\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\t/**\n\t * 是否演出部分效果,目前会控制播放间奏点的动画的播放暂停与否,默认为 `true`\n\t */\n\tplaying: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置歌词行的对齐方式,如果为 `undefined` 则默认为 `center`\n\t *\n\t * - 设置成 `top` 的话将会向目标歌词行的顶部对齐\n\t * - 设置成 `bottom` 的话将会向目标歌词行的底部对齐\n\t * - 设置成 `center` 的话将会向目标歌词行的垂直中心对齐\n\t */\n\talignAnchor: {\n\t\ttype: String as PropType<\"top\" | \"bottom\" | \"center\">,\n\t\tdefault: \"center\",\n\t},\n\t/**\n\t * 设置默认的歌词行对齐位置,相对于整个歌词播放组件的大小位置,如果为 `undefined`\n\t * 则默认为 `0.5`\n\t *\n\t * 可以设置一个 `[0.0-1.0]` 之间的任意数字,代表组件高度由上到下的比例位置\n\t */\n\talignPosition: {\n\t\ttype: Number,\n\t\tdefault: 0.5,\n\t},\n\t/**\n\t * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用\n\t *\n\t * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行\n\t *\n\t * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一\n\t */\n\tenableSpring: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置是否启用歌词行的模糊效果,默认为 `true`\n\t */\n\tenableBlur: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用\n\t *\n\t * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行\n\t *\n\t * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一\n\t */\n\tenableScale: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置是否隐藏已经播放过的歌词行,默认不隐藏\n\t */\n\thidePassedLines: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\t/**\n\t * 设置歌词中不雅用语的掩码模式,默认为 `MaskObsceneWordsMode.Disabled`,即不掩码\n\t */\n\tmaskObsceneWordsMode: {\n\t\ttype: String as PropType<MaskObsceneWordsMode>,\n\t\tdefault: MaskObsceneWordsMode.Disabled,\n\t},\n\t/**\n\t * 设置歌词优化选项\n\t */\n\toptimizeOptions: {\n\t\ttype: Object as PropType<OptimizeLyricOptions>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前播放歌词,要注意传入后这个数组内的信息不得修改,否则会发生错误\n\t */\n\tlyricLines: {\n\t\ttype: Object as PropType<LyricLine[]>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前播放进度,单位为毫秒且**必须是整数**,此时将会更新内部的歌词进度信息\n\t * 内部会根据调用间隔和播放进度自动决定如何滚动和显示歌词,所以这个的调用频率越快越准确越好\n\t */\n\tcurrentTime: {\n\t\ttype: Number,\n\t\tdefault: 0,\n\t},\n\t/**\n\t * 设置文字动画的渐变宽度,单位以歌词行的主文字字体大小的倍数为单位,默认为 0.5,即一个全角字符的一半宽度\n\t *\n\t * 如果要模拟 Apple Music for Android 的效果,可以设置为 1\n\t *\n\t * 如果要模拟 Apple Music for iPad 的效果,可以设置为 0.5\n\t *\n\t * 如果想要近乎禁用渐变效果,可以设置成非常接近 0 的小数(例如 `0.0001` ),但是**不可以为 0**\n\t */\n\twordFadeWidth: {\n\t\ttype: Number,\n\t\tdefault: 0.5,\n\t},\n\t/**\n\t * 设置所有歌词行在横坐标上的弹簧属性,包括重量、弹力和阻力。\n\t *\n\t * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样\n\t */\n\tlinePosXSpringParams: {\n\t\ttype: Object as PropType<Partial<spring.SpringParams>>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置所有歌词行在​纵坐标上的弹簧属性,包括重量、弹力和阻力。\n\t *\n\t * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样\n\t */\n\tlinePosYSpringParams: {\n\t\ttype: Object as PropType<Partial<spring.SpringParams>>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置所有歌词行在​缩放大小上的弹簧属性,包括重量、弹力和阻力。\n\t *\n\t * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样\n\t */\n\tlineScaleSpringParams: {\n\t\ttype: Object as PropType<Partial<spring.SpringParams>>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`\n\t * 默认渲染器有可能会随着版本更新而更换\n\t */\n\tlyricPlayer: {\n\t\ttype: Object as PropType<{\n\t\t\tnew (...args: ConstructorParameters<typeof BaseRenderer>): BaseRenderer;\n\t\t}>,\n\t\trequired: false,\n\t},\n} as const;\n\n/**\n * 歌词播放组件的属性\n */\nexport type LyricPlayerProps = ExtractPublicPropTypes<typeof lyricPlayerProps>;\n\nconst lyricPlayerEmits = {\n\tlineClick: (_: LyricLineMouseEvent) => true,\n\tlineContextmenu: (_: LyricLineMouseEvent) => true,\n} as const;\n\n/**\n * 歌词播放组件的事件\n */\nexport type LyricPlayerEmits = typeof lyricPlayerEmits;\n\n/**\n * 歌词播放组件的引用\n */\nexport interface LyricPlayerRef {\n\t/**\n\t * 歌词播放实例\n\t */\n\tlyricPlayer: Ref<LyricPlayerBase | undefined>;\n\t/**\n\t * 将歌词播放实例的元素包裹起来的 DIV 元素实例\n\t */\n\twrapperEl: Readonly<ShallowRef<HTMLDivElement | null>>;\n}\n\nexport const LyricPlayer = defineComponent({\n\tname: \"LyricPlayer\",\n\tprops: lyricPlayerProps,\n\temits: lyricPlayerEmits,\n\tslots: Object as SlotsType<{\n\t\t\"bottom-line\": () => void;\n\t}>,\n\tsetup(props, { expose, emit, attrs, slots }) {\n\t\tconst wrapperRef = useTemplateRef<HTMLDivElement>(\"wrapper-ref\");\n\t\tconst playerRef = ref<CoreLyricPlayer>();\n\n\t\tconst lineClickHandler = (e: Event) =>\n\t\t\temit(\"lineClick\", e as LyricLineMouseEvent);\n\t\tconst lineContextMenuHandler = (e: Event) =>\n\t\t\temit(\"lineContextmenu\", e as LyricLineMouseEvent);\n\n\t\tonMounted(() => {\n\t\t\tconst wrapper = wrapperRef.value;\n\t\t\tif (wrapper) {\n\t\t\t\tplayerRef.value = new CoreLyricPlayer();\n\t\t\t\twrapper.appendChild(playerRef.value.getElement());\n\t\t\t\tplayerRef.value.addEventListener(\"line-click\", lineClickHandler);\n\t\t\t\tplayerRef.value.addEventListener(\n\t\t\t\t\t\"line-contextmenu\",\n\t\t\t\t\tlineContextMenuHandler,\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\tonUnmounted(() => {\n\t\t\tif (playerRef.value) {\n\t\t\t\tplayerRef.value.removeEventListener(\"line-click\", lineClickHandler);\n\t\t\t\tplayerRef.value.removeEventListener(\n\t\t\t\t\t\"line-contextmenu\",\n\t\t\t\t\tlineContextMenuHandler,\n\t\t\t\t);\n\t\t\t\tplayerRef.value.dispose();\n\t\t\t}\n\t\t});\n\n\t\twatchEffect((onCleanup) => {\n\t\t\tif (!props.disabled) {\n\t\t\t\tlet canceled = false;\n\t\t\t\tlet lastTime = -1;\n\t\t\t\tconst onFrame = (time: number) => {\n\t\t\t\t\tif (canceled) return;\n\t\t\t\t\tif (lastTime === -1) {\n\t\t\t\t\t\tlastTime = time;\n\t\t\t\t\t}\n\t\t\t\t\tplayerRef.value?.update(time - lastTime);\n\t\t\t\t\tlastTime = time;\n\t\t\t\t\trequestAnimationFrame(onFrame);\n\t\t\t\t};\n\t\t\t\trequestAnimationFrame(onFrame);\n\t\t\t\tonCleanup(() => {\n\t\t\t\t\tcanceled = true;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.playing !== undefined) {\n\t\t\t\tif (props.playing) {\n\t\t\t\t\tplayerRef.value?.resume();\n\t\t\t\t} else {\n\t\t\t\t\tplayerRef.value?.pause();\n\t\t\t\t}\n\t\t\t} else playerRef.value?.resume();\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.alignAnchor !== undefined)\n\t\t\t\tplayerRef.value?.setAlignAnchor(props.alignAnchor);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.hidePassedLines !== undefined)\n\t\t\t\tplayerRef.value?.setHidePassedLines(props.hidePassedLines);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.maskObsceneWordsMode !== undefined)\n\t\t\t\tplayerRef.value?.setMaskObsceneWords(props.maskObsceneWordsMode);\n\t\t\telse playerRef.value?.setMaskObsceneWords(MaskObsceneWordsMode.Disabled);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.alignPosition !== undefined)\n\t\t\t\tplayerRef.value?.setAlignPosition(props.alignPosition);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.enableSpring !== undefined)\n\t\t\t\tplayerRef.value?.setEnableSpring(props.enableSpring);\n\t\t\telse playerRef.value?.setEnableSpring(true);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.enableBlur !== undefined)\n\t\t\t\tplayerRef.value?.setEnableBlur(props.enableBlur);\n\t\t\telse playerRef.value?.setEnableBlur(true);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.enableScale !== undefined)\n\t\t\t\tplayerRef.value?.setEnableScale(props.enableScale);\n\t\t\telse playerRef.value?.setEnableScale(true);\n\t\t});\n\n\t\twatch(\n\t\t\t[playerRef, () => props.lyricLines, () => props.optimizeOptions],\n\t\t\t([player, lyricLines, optimizeOptions]) => {\n\t\t\t\tif (!player) return;\n\n\t\t\t\tif (optimizeOptions !== undefined) {\n\t\t\t\t\tplayer.setOptimizeOptions(optimizeOptions);\n\t\t\t\t}\n\n\t\t\t\tif (lyricLines !== undefined) {\n\t\t\t\t\tplayer.setLyricLines(lyricLines);\n\t\t\t\t} else {\n\t\t\t\t\tplayer.setLyricLines([]);\n\t\t\t\t}\n\n\t\t\t\tif (props.currentTime !== undefined) {\n\t\t\t\t\tplayer.setCurrentTime(props.currentTime, true);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ immediate: true },\n\t\t);\n\n\t\twatchEffect(() => {\n\t\t\tif (props.currentTime !== undefined)\n\t\t\t\tplayerRef.value?.setCurrentTime(props.currentTime);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.wordFadeWidth !== undefined)\n\t\t\t\tplayerRef.value?.setWordFadeWidth(props.wordFadeWidth);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.linePosXSpringParams !== undefined)\n\t\t\t\tplayerRef.value?.setLinePosXSpringParams(props.linePosXSpringParams);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.linePosYSpringParams !== undefined)\n\t\t\t\tplayerRef.value?.setLinePosYSpringParams(props.linePosYSpringParams);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.lineScaleSpringParams !== undefined)\n\t\t\t\tplayerRef.value?.setLineScaleSpringParams(props.lineScaleSpringParams);\n\t\t});\n\n\t\tconst bottomLineEl = computed(() =>\n\t\t\tplayerRef.value?.getBottomLineElement(),\n\t\t);\n\n\t\texpose<LyricPlayerRef>({\n\t\t\tlyricPlayer: playerRef,\n\t\t\twrapperEl: wrapperRef,\n\t\t});\n\n\t\treturn () => (\n\t\t\t<div ref=\"wrapper-ref\" {...attrs}>\n\t\t\t\t{bottomLineEl.value && (\n\t\t\t\t\t<Teleport to={bottomLineEl.value}>\n\t\t\t\t\t\t{slots[\"bottom-line\"]?.()}\n\t\t\t\t\t</Teleport>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t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ClCnB,WAAUM,OAAO6B,wBAAwB3C,MAAMpB,qBAAqB;IACpE;AAEFvB,GAAAA,GAAAA,IAAAA,mBAAkB;AACjB,OAAI2C,MAAMjB,yBAAyB4C,KAAAA,EAClCnB,WAAUM,OAAO8B,wBAAwB5C,MAAMjB,qBAAqB;IACpE;AAEF1B,GAAAA,GAAAA,IAAAA,mBAAkB;AACjB,OAAI2C,MAAMhB,0BAA0B2C,KAAAA,EACnCnB,WAAUM,OAAO+B,yBAAyB7C,MAAMhB,sBAAsB;IACtE;EAEF,MAAM8D,gBAAAA,GAAAA,IAAAA,gBACLtC,UAAUM,OAAOiC,sBAClB,CAAC;AAED3C,SAAuB;GACtBnB,aAAauB;GACbZ,WAAWW;GACX,CAAC;AAEF,gBAAA,GAAA,IAAA,aAAO,QAAA,GAAA,IAAA,YAAA,EAAA,OAAA,eAAA,EACqBD,MAAK,EAAA,CAC9BwC,aAAahC,UAAAA,GAAAA,IAAAA,aAAK5D,IAAAA,UAAA,EAAA,MACJ4F,aAAahC,OAAK,EAAA,EAAApD,eAAA,CAC9BwC,MAAM,kBAAkB,CAAA,EAAA,CAE1B,CAAA,CAEF;;CAEF,CAAC"}
1
+ {"version":3,"file":"amll-vue.cjs","names":["AbstractBaseRenderer","BaseRenderer","BackgroundRender","CoreBackgroundRender","MeshGradientRenderer","defineComponent","ExtractPublicPropTypes","onMounted","onUnmounted","PropType","Ref","ref","ShallowRef","useTemplateRef","watchEffect","BackgroundRenderRef","bgRender","wrapperEl","Readonly","HTMLDivElement","backgroundRenderProps","album","type","String","Object","HTMLImageElement","HTMLVideoElement","required","albumIsVideo","Boolean","fps","Number","playing","flowSpeed","hasLyric","lowFreqVolume","renderScale","renderer","args","ConstructorParameters","const","BackgroundRenderProps","name","props","setup","expose","wrapperRef","bgRenderRef","value","new","el","getElement","style","width","height","appendChild","dispose","setAlbum","setFPS","pause","resume","setFlowSpeed","setRenderScale","setLowFreqVolume","undefined","setHasLyric","_createVNode","BaseRenderer","LyricPlayer","CoreLyricPlayer","LyricLine","LyricLineMouseEvent","LyricPlayerBase","MaskObsceneWordsMode","OptimizeLyricOptions","spring","computed","defineComponent","ExtractPublicPropTypes","onMounted","onUnmounted","PropType","Ref","ref","ShallowRef","SlotsType","Teleport","useTemplateRef","watch","watchEffect","lyricPlayerProps","disabled","type","Boolean","default","playing","alignAnchor","String","alignPosition","Number","enableSpring","enableBlur","enableScale","hidePassedLines","maskObsceneWordsMode","Disabled","optimizeOptions","Object","required","lyricLines","currentTime","wordFadeWidth","linePosXSpringParams","Partial","SpringParams","linePosYSpringParams","lineScaleSpringParams","lyricPlayer","args","ConstructorParameters","const","LyricPlayerProps","lyricPlayerEmits","lineClick","_","lineContextmenu","LyricPlayerEmits","LyricPlayerRef","wrapperEl","Readonly","HTMLDivElement","name","props","emits","slots","setup","expose","emit","attrs","wrapperRef","playerRef","lineClickHandler","e","Event","lineContextMenuHandler","wrapper","value","appendChild","getElement","addEventListener","removeEventListener","dispose","onCleanup","canceled","lastTime","onFrame","time","update","requestAnimationFrame","undefined","resume","pause","setAlignAnchor","setHidePassedLines","setMaskObsceneWords","setAlignPosition","setEnableSpring","setEnableBlur","setEnableScale","player","setOptimizeOptions","setLyricLines","setCurrentTime","immediate","setWordFadeWidth","setLinePosXSpringParams","setLinePosYSpringParams","setLineScaleSpringParams","bottomLineEl","getBottomLineElement","_createVNode","_mergeProps"],"sources":["../src/BackgroundRender.tsx","../src/LyricPlayer.tsx"],"sourcesContent":["import {\n\ttype AbstractBaseRenderer,\n\ttype BaseRenderer,\n\tBackgroundRender as CoreBackgroundRender,\n\tMeshGradientRenderer,\n} from \"@applemusic-like-lyrics/core\";\nimport {\n\tdefineComponent,\n\ttype ExtractPublicPropTypes,\n\tonMounted,\n\tonUnmounted,\n\ttype PropType,\n\ttype Ref,\n\tref,\n\ttype ShallowRef,\n\tuseTemplateRef,\n\twatchEffect,\n} from \"vue\";\n\n/**\n * 背景渲染组件的引用\n */\nexport interface BackgroundRenderRef {\n\t/**\n\t * 背景渲染实例引用\n\t */\n\tbgRender?: Ref<AbstractBaseRenderer | undefined>;\n\t/**\n\t * 将背景渲染实例的元素包裹起来的 DIV 元素实例\n\t */\n\twrapperEl: Readonly<ShallowRef<HTMLDivElement | null>>;\n}\n\nconst backgroundRenderProps = {\n\t/**\n\t * 设置背景专辑资源\n\t */\n\talbum: {\n\t\ttype: [String, Object] as PropType<\n\t\t\tstring | HTMLImageElement | HTMLVideoElement\n\t\t>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置专辑资源是否为视频\n\t */\n\talbumIsVideo: {\n\t\ttype: Boolean,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前背景动画帧率,如果为 `undefined` 则默认为 `30`\n\t */\n\tfps: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前播放状态,如果为 `undefined` 则默认为 `true`\n\t */\n\tplaying: {\n\t\ttype: Boolean,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前动画流动速度,如果为 `undefined` 则默认为 `2`\n\t */\n\tflowSpeed: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置背景是否根据“是否有歌词”这个特征调整自身效果,例如有歌词时会变得更加活跃\n\t *\n\t * 部分渲染器会根据这个特征调整自身效果\n\t *\n\t * 如果不确定是否需要赋值或无法知晓是否包含歌词,请传入 true 或不做任何处理(默认值为 true)\n\t */\n\thasLyric: {\n\t\ttype: Boolean,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置低频的音量大小,范围在 80hz-120hz 之间为宜,取值范围在 [0.0-1.0] 之间\n\t *\n\t * 部分渲染器会根据音量大小调整背景效果(例如根据鼓点跳动)\n\t *\n\t * 如果无法获取到类似的数据,请传入 undefined 或 1.0 作为默认值,或不做任何处理(默认值即 1.0)\n\t */\n\tlowFreqVolume: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前渲染缩放比例,如果为 `undefined` 则默认为 `0.5`\n\t */\n\trenderScale: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`\n\t * 默认渲染器有可能会随着版本更新而更换\n\t */\n\trenderer: {\n\t\ttype: Object as PropType<{\n\t\t\tnew (...args: ConstructorParameters<typeof BaseRenderer>): BaseRenderer;\n\t\t}>,\n\t\trequired: false,\n\t},\n} as const;\n\nexport type BackgroundRenderProps = ExtractPublicPropTypes<\n\ttypeof backgroundRenderProps\n>;\n\nexport const BackgroundRender = defineComponent({\n\tname: \"BackgroundRender\",\n\tprops: backgroundRenderProps,\n\tsetup(props, { expose }) {\n\t\tconst wrapperRef = useTemplateRef<HTMLDivElement>(\"wrapper-ref\");\n\t\tconst bgRenderRef = ref<AbstractBaseRenderer>();\n\n\t\tonMounted(() => {\n\t\t\tif (wrapperRef.value) {\n\t\t\t\tbgRenderRef.value = CoreBackgroundRender.new(\n\t\t\t\t\tprops.renderer ?? MeshGradientRenderer,\n\t\t\t\t);\n\t\t\t\tconst el = bgRenderRef.value.getElement();\n\t\t\t\tel.style.width = \"100%\";\n\t\t\t\tel.style.height = \"100%\";\n\t\t\t\twrapperRef.value.appendChild(el);\n\t\t\t}\n\t\t});\n\n\t\tonUnmounted(() => {\n\t\t\tif (bgRenderRef.value) {\n\t\t\t\tbgRenderRef.value.dispose();\n\t\t\t}\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.album)\n\t\t\t\tbgRenderRef.value?.setAlbum(props.album, props.albumIsVideo);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.fps) bgRenderRef.value?.setFPS(props.fps);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.playing) bgRenderRef.value?.pause();\n\t\t\telse bgRenderRef.value?.resume();\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.flowSpeed) bgRenderRef.value?.setFlowSpeed(props.flowSpeed);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.renderScale)\n\t\t\t\tbgRenderRef.value?.setRenderScale(props.renderScale);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.lowFreqVolume)\n\t\t\t\tbgRenderRef.value?.setLowFreqVolume(props.lowFreqVolume);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.hasLyric !== undefined)\n\t\t\t\tbgRenderRef.value?.setHasLyric(props.hasLyric ?? true);\n\t\t});\n\n\t\texpose<BackgroundRenderRef>({\n\t\t\tbgRender: bgRenderRef,\n\t\t\twrapperEl: wrapperRef,\n\t\t});\n\n\t\treturn () => <div style=\"display: contents;\" ref=\"wrapper-ref\" />;\n\t},\n});\n","import {\n\ttype BaseRenderer,\n\tLyricPlayer as CoreLyricPlayer,\n\ttype LyricLine,\n\ttype LyricLineMouseEvent,\n\ttype LyricPlayerBase,\n\tMaskObsceneWordsMode,\n\ttype OptimizeLyricOptions,\n\ttype spring,\n} from \"@applemusic-like-lyrics/core\";\nimport {\n\tcomputed,\n\tdefineComponent,\n\ttype ExtractPublicPropTypes,\n\tonMounted,\n\tonUnmounted,\n\ttype PropType,\n\ttype Ref,\n\tref,\n\ttype ShallowRef,\n\ttype SlotsType,\n\tTeleport,\n\tuseTemplateRef,\n\twatch,\n\twatchEffect,\n} from \"vue\";\n\nconst lyricPlayerProps = {\n\t/**\n\t * 是否禁用歌词播放组件,默认为 `false`,歌词组件启用后将会开始逐帧更新歌词的动画效果,并对传入的其他参数变更做出反馈。\n\t *\n\t * 如果禁用了歌词组件动画,你也可以通过引用取得原始渲染组件实例,手动逐帧调用其 `update` 函数来更新动画效果。\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\t/**\n\t * 是否演出部分效果,目前会控制播放间奏点的动画的播放暂停与否,默认为 `true`\n\t */\n\tplaying: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置歌词行的对齐方式,如果为 `undefined` 则默认为 `center`\n\t *\n\t * - 设置成 `top` 的话将会向目标歌词行的顶部对齐\n\t * - 设置成 `bottom` 的话将会向目标歌词行的底部对齐\n\t * - 设置成 `center` 的话将会向目标歌词行的垂直中心对齐\n\t */\n\talignAnchor: {\n\t\ttype: String as PropType<\"top\" | \"bottom\" | \"center\">,\n\t\tdefault: \"center\",\n\t},\n\t/**\n\t * 设置默认的歌词行对齐位置,相对于整个歌词播放组件的大小位置,如果为 `undefined`\n\t * 则默认为 `0.5`\n\t *\n\t * 可以设置一个 `[0.0-1.0]` 之间的任意数字,代表组件高度由上到下的比例位置\n\t */\n\talignPosition: {\n\t\ttype: Number,\n\t\tdefault: 0.5,\n\t},\n\t/**\n\t * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用\n\t *\n\t * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行\n\t *\n\t * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一\n\t */\n\tenableSpring: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置是否启用歌词行的模糊效果,默认为 `true`\n\t */\n\tenableBlur: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用\n\t *\n\t * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行\n\t *\n\t * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一\n\t */\n\tenableScale: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置是否隐藏已经播放过的歌词行,默认不隐藏\n\t */\n\thidePassedLines: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\t/**\n\t * 设置歌词中不雅用语的掩码模式,默认为 `MaskObsceneWordsMode.Disabled`,即不掩码\n\t */\n\tmaskObsceneWordsMode: {\n\t\ttype: String as PropType<MaskObsceneWordsMode>,\n\t\tdefault: MaskObsceneWordsMode.Disabled,\n\t},\n\t/**\n\t * 设置歌词优化选项\n\t */\n\toptimizeOptions: {\n\t\ttype: Object as PropType<OptimizeLyricOptions>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前播放歌词,要注意传入后这个数组内的信息不得修改,否则会发生错误\n\t */\n\tlyricLines: {\n\t\ttype: Object as PropType<LyricLine[]>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前播放进度,单位为毫秒且**必须是整数**,此时将会更新内部的歌词进度信息\n\t * 内部会根据调用间隔和播放进度自动决定如何滚动和显示歌词,所以这个的调用频率越快越准确越好\n\t */\n\tcurrentTime: {\n\t\ttype: Number,\n\t\tdefault: 0,\n\t},\n\t/**\n\t * 设置文字动画的渐变宽度,单位以歌词行的主文字字体大小的倍数为单位,默认为 0.5,即一个全角字符的一半宽度\n\t *\n\t * 如果要模拟 Apple Music for Android 的效果,可以设置为 1\n\t *\n\t * 如果要模拟 Apple Music for iPad 的效果,可以设置为 0.5\n\t *\n\t * 如果想要近乎禁用渐变效果,可以设置成非常接近 0 的小数(例如 `0.0001` ),但是**不可以为 0**\n\t */\n\twordFadeWidth: {\n\t\ttype: Number,\n\t\tdefault: 0.5,\n\t},\n\t/**\n\t * 设置所有歌词行在横坐标上的弹簧属性,包括重量、弹力和阻力。\n\t *\n\t * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样\n\t */\n\tlinePosXSpringParams: {\n\t\ttype: Object as PropType<Partial<spring.SpringParams>>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置所有歌词行在​纵坐标上的弹簧属性,包括重量、弹力和阻力。\n\t *\n\t * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样\n\t */\n\tlinePosYSpringParams: {\n\t\ttype: Object as PropType<Partial<spring.SpringParams>>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置所有歌词行在​缩放大小上的弹簧属性,包括重量、弹力和阻力。\n\t *\n\t * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样\n\t */\n\tlineScaleSpringParams: {\n\t\ttype: Object as PropType<Partial<spring.SpringParams>>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`\n\t * 默认渲染器有可能会随着版本更新而更换\n\t */\n\tlyricPlayer: {\n\t\ttype: Object as PropType<{\n\t\t\tnew (...args: ConstructorParameters<typeof BaseRenderer>): BaseRenderer;\n\t\t}>,\n\t\trequired: false,\n\t},\n} as const;\n\n/**\n * 歌词播放组件的属性\n */\nexport type LyricPlayerProps = ExtractPublicPropTypes<typeof lyricPlayerProps>;\n\nconst lyricPlayerEmits = {\n\tlineClick: (_: LyricLineMouseEvent) => true,\n\tlineContextmenu: (_: LyricLineMouseEvent) => true,\n} as const;\n\n/**\n * 歌词播放组件的事件\n */\nexport type LyricPlayerEmits = typeof lyricPlayerEmits;\n\n/**\n * 歌词播放组件的引用\n */\nexport interface LyricPlayerRef {\n\t/**\n\t * 歌词播放实例\n\t */\n\tlyricPlayer: Ref<LyricPlayerBase | undefined>;\n\t/**\n\t * 将歌词播放实例的元素包裹起来的 DIV 元素实例\n\t */\n\twrapperEl: Readonly<ShallowRef<HTMLDivElement | null>>;\n}\n\nexport const LyricPlayer = defineComponent({\n\tname: \"LyricPlayer\",\n\tprops: lyricPlayerProps,\n\temits: lyricPlayerEmits,\n\tslots: Object as SlotsType<{\n\t\t\"bottom-line\": () => void;\n\t}>,\n\tsetup(props, { expose, emit, attrs, slots }) {\n\t\tconst wrapperRef = useTemplateRef<HTMLDivElement>(\"wrapper-ref\");\n\t\tconst playerRef = ref<CoreLyricPlayer>();\n\n\t\tconst lineClickHandler = (e: Event) =>\n\t\t\temit(\"lineClick\", e as LyricLineMouseEvent);\n\t\tconst lineContextMenuHandler = (e: Event) =>\n\t\t\temit(\"lineContextmenu\", e as LyricLineMouseEvent);\n\n\t\tonMounted(() => {\n\t\t\tconst wrapper = wrapperRef.value;\n\t\t\tif (wrapper) {\n\t\t\t\tplayerRef.value = new CoreLyricPlayer();\n\t\t\t\twrapper.appendChild(playerRef.value.getElement());\n\t\t\t\tplayerRef.value.addEventListener(\"line-click\", lineClickHandler);\n\t\t\t\tplayerRef.value.addEventListener(\n\t\t\t\t\t\"line-contextmenu\",\n\t\t\t\t\tlineContextMenuHandler,\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\tonUnmounted(() => {\n\t\t\tif (playerRef.value) {\n\t\t\t\tplayerRef.value.removeEventListener(\"line-click\", lineClickHandler);\n\t\t\t\tplayerRef.value.removeEventListener(\n\t\t\t\t\t\"line-contextmenu\",\n\t\t\t\t\tlineContextMenuHandler,\n\t\t\t\t);\n\t\t\t\tplayerRef.value.dispose();\n\t\t\t}\n\t\t});\n\n\t\twatchEffect((onCleanup) => {\n\t\t\tif (!props.disabled) {\n\t\t\t\tlet canceled = false;\n\t\t\t\tlet lastTime = -1;\n\t\t\t\tconst onFrame = (time: number) => {\n\t\t\t\t\tif (canceled) return;\n\t\t\t\t\tif (lastTime === -1) {\n\t\t\t\t\t\tlastTime = time;\n\t\t\t\t\t}\n\t\t\t\t\tplayerRef.value?.update(time - lastTime);\n\t\t\t\t\tlastTime = time;\n\t\t\t\t\trequestAnimationFrame(onFrame);\n\t\t\t\t};\n\t\t\t\trequestAnimationFrame(onFrame);\n\t\t\t\tonCleanup(() => {\n\t\t\t\t\tcanceled = true;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.playing !== undefined) {\n\t\t\t\tif (props.playing) {\n\t\t\t\t\tplayerRef.value?.resume();\n\t\t\t\t} else {\n\t\t\t\t\tplayerRef.value?.pause();\n\t\t\t\t}\n\t\t\t} else playerRef.value?.resume();\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.alignAnchor !== undefined)\n\t\t\t\tplayerRef.value?.setAlignAnchor(props.alignAnchor);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.hidePassedLines !== undefined)\n\t\t\t\tplayerRef.value?.setHidePassedLines(props.hidePassedLines);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.maskObsceneWordsMode !== undefined)\n\t\t\t\tplayerRef.value?.setMaskObsceneWords(props.maskObsceneWordsMode);\n\t\t\telse playerRef.value?.setMaskObsceneWords(MaskObsceneWordsMode.Disabled);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.alignPosition !== undefined)\n\t\t\t\tplayerRef.value?.setAlignPosition(props.alignPosition);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.enableSpring !== undefined)\n\t\t\t\tplayerRef.value?.setEnableSpring(props.enableSpring);\n\t\t\telse playerRef.value?.setEnableSpring(true);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.enableBlur !== undefined)\n\t\t\t\tplayerRef.value?.setEnableBlur(props.enableBlur);\n\t\t\telse playerRef.value?.setEnableBlur(true);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.enableScale !== undefined)\n\t\t\t\tplayerRef.value?.setEnableScale(props.enableScale);\n\t\t\telse playerRef.value?.setEnableScale(true);\n\t\t});\n\n\t\twatch(\n\t\t\t[playerRef, () => props.lyricLines, () => props.optimizeOptions],\n\t\t\t([player, lyricLines, optimizeOptions]) => {\n\t\t\t\tif (!player) return;\n\n\t\t\t\tif (optimizeOptions !== undefined) {\n\t\t\t\t\tplayer.setOptimizeOptions(optimizeOptions);\n\t\t\t\t}\n\n\t\t\t\tif (lyricLines !== undefined) {\n\t\t\t\t\tplayer.setLyricLines(lyricLines);\n\t\t\t\t} else {\n\t\t\t\t\tplayer.setLyricLines([]);\n\t\t\t\t}\n\n\t\t\t\tif (props.currentTime !== undefined) {\n\t\t\t\t\tplayer.setCurrentTime(props.currentTime, true);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ immediate: true },\n\t\t);\n\n\t\twatchEffect(() => {\n\t\t\tif (props.currentTime !== undefined)\n\t\t\t\tplayerRef.value?.setCurrentTime(props.currentTime);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.wordFadeWidth !== undefined)\n\t\t\t\tplayerRef.value?.setWordFadeWidth(props.wordFadeWidth);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.linePosXSpringParams !== undefined)\n\t\t\t\tplayerRef.value?.setLinePosXSpringParams(props.linePosXSpringParams);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.linePosYSpringParams !== undefined)\n\t\t\t\tplayerRef.value?.setLinePosYSpringParams(props.linePosYSpringParams);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.lineScaleSpringParams !== undefined)\n\t\t\t\tplayerRef.value?.setLineScaleSpringParams(props.lineScaleSpringParams);\n\t\t});\n\n\t\tconst bottomLineEl = computed(() =>\n\t\t\tplayerRef.value?.getBottomLineElement(),\n\t\t);\n\n\t\texpose<LyricPlayerRef>({\n\t\t\tlyricPlayer: playerRef,\n\t\t\twrapperEl: wrapperRef,\n\t\t});\n\n\t\treturn () => (\n\t\t\t<div ref=\"wrapper-ref\" {...attrs}>\n\t\t\t\t{bottomLineEl.value && (\n\t\t\t\t\t<Teleport to={bottomLineEl.value}>\n\t\t\t\t\t\t{slots[\"bottom-line\"]?.()}\n\t\t\t\t\t</Teleport>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n});\n"],"mappings":";;;;AAiCA,MAAMoB,wBAAwB;;;;CAI7BC,OAAO;EACNC,MAAM,CAACC,QAAQC,OAAO;EAGtBG,UAAU;EACV;;;;CAIDC,cAAc;EACbN,MAAMO;EACNF,UAAU;EACV;;;;CAIDG,KAAK;EACJR,MAAMS;EACNJ,UAAU;EACV;;;;CAIDK,SAAS;EACRV,MAAMO;EACNF,UAAU;EACV;;;;CAIDM,WAAW;EACVX,MAAMS;EACNJ,UAAU;EACV;;;;;;;;CA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AMjB,qBAAqB;IACpE;AAEF1B,GAAAA,GAAAA,IAAAA,mBAAkB;AACjB,OAAI2C,MAAMhB,0BAA0B2C,KAAAA,EACnCnB,WAAUM,OAAO+B,yBAAyB7C,MAAMhB,sBAAsB;IACtE;EAEF,MAAM8D,gBAAAA,GAAAA,IAAAA,gBACLtC,UAAUM,OAAOiC,sBAClB,CAAC;AAED3C,SAAuB;GACtBnB,aAAauB;GACbZ,WAAWW;GACX,CAAC;AAEF,gBAAA,GAAA,IAAA,aAAO,QAAA,GAAA,IAAA,YAAA,EAAA,OAAA,eAAA,EACqBD,MAAK,EAAA,CAC9BwC,aAAahC,UAAAA,GAAAA,IAAAA,aAAK5D,IAAAA,UAAA,EAAA,MACJ4F,aAAahC,OAAK,EAAA,EAAApD,eAAA,CAC9BwC,MAAM,kBAAkB,CAAA,EAAA,CAE1B,CAAA,CAEF;;CAEF,CAAC"}
@@ -330,7 +330,7 @@ declare const lyricPlayerProps: {
330
330
  */
331
331
  readonly maskObsceneWordsMode: {
332
332
  readonly type: PropType<MaskObsceneWordsMode>;
333
- readonly default: MaskObsceneWordsMode.Disabled;
333
+ readonly default: "";
334
334
  };
335
335
  /**
336
336
  * 设置歌词优化选项
@@ -509,7 +509,7 @@ declare const LyricPlayer: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
509
509
  */
510
510
  readonly maskObsceneWordsMode: {
511
511
  readonly type: PropType<MaskObsceneWordsMode>;
512
- readonly default: MaskObsceneWordsMode.Disabled;
512
+ readonly default: "";
513
513
  };
514
514
  /**
515
515
  * 设置歌词优化选项
@@ -665,7 +665,7 @@ declare const LyricPlayer: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
665
665
  */
666
666
  readonly maskObsceneWordsMode: {
667
667
  readonly type: PropType<MaskObsceneWordsMode>;
668
- readonly default: MaskObsceneWordsMode.Disabled;
668
+ readonly default: "";
669
669
  };
670
670
  /**
671
671
  * 设置歌词优化选项
@@ -330,7 +330,7 @@ declare const lyricPlayerProps: {
330
330
  */
331
331
  readonly maskObsceneWordsMode: {
332
332
  readonly type: PropType<MaskObsceneWordsMode>;
333
- readonly default: MaskObsceneWordsMode.Disabled;
333
+ readonly default: "";
334
334
  };
335
335
  /**
336
336
  * 设置歌词优化选项
@@ -509,7 +509,7 @@ declare const LyricPlayer: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
509
509
  */
510
510
  readonly maskObsceneWordsMode: {
511
511
  readonly type: PropType<MaskObsceneWordsMode>;
512
- readonly default: MaskObsceneWordsMode.Disabled;
512
+ readonly default: "";
513
513
  };
514
514
  /**
515
515
  * 设置歌词优化选项
@@ -665,7 +665,7 @@ declare const LyricPlayer: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
665
665
  */
666
666
  readonly maskObsceneWordsMode: {
667
667
  readonly type: PropType<MaskObsceneWordsMode>;
668
- readonly default: MaskObsceneWordsMode.Disabled;
668
+ readonly default: "";
669
669
  };
670
670
  /**
671
671
  * 设置歌词优化选项
package/dist/amll-vue.mjs CHANGED
@@ -3,38 +3,74 @@ import { BackgroundRender as BackgroundRender$1, LyricPlayer as LyricPlayer$1, M
3
3
  const BackgroundRender = defineComponent({
4
4
  name: "BackgroundRender",
5
5
  props: {
6
+ /**
7
+ * 设置背景专辑资源
8
+ */
6
9
  album: {
7
10
  type: [String, Object],
8
11
  required: false
9
12
  },
13
+ /**
14
+ * 设置专辑资源是否为视频
15
+ */
10
16
  albumIsVideo: {
11
17
  type: Boolean,
12
18
  required: false
13
19
  },
20
+ /**
21
+ * 设置当前背景动画帧率,如果为 `undefined` 则默认为 `30`
22
+ */
14
23
  fps: {
15
24
  type: Number,
16
25
  required: false
17
26
  },
27
+ /**
28
+ * 设置当前播放状态,如果为 `undefined` 则默认为 `true`
29
+ */
18
30
  playing: {
19
31
  type: Boolean,
20
32
  required: false
21
33
  },
34
+ /**
35
+ * 设置当前动画流动速度,如果为 `undefined` 则默认为 `2`
36
+ */
22
37
  flowSpeed: {
23
38
  type: Number,
24
39
  required: false
25
40
  },
41
+ /**
42
+ * 设置背景是否根据“是否有歌词”这个特征调整自身效果,例如有歌词时会变得更加活跃
43
+ *
44
+ * 部分渲染器会根据这个特征调整自身效果
45
+ *
46
+ * 如果不确定是否需要赋值或无法知晓是否包含歌词,请传入 true 或不做任何处理(默认值为 true)
47
+ */
26
48
  hasLyric: {
27
49
  type: Boolean,
28
50
  required: false
29
51
  },
52
+ /**
53
+ * 设置低频的音量大小,范围在 80hz-120hz 之间为宜,取值范围在 [0.0-1.0] 之间
54
+ *
55
+ * 部分渲染器会根据音量大小调整背景效果(例如根据鼓点跳动)
56
+ *
57
+ * 如果无法获取到类似的数据,请传入 undefined 或 1.0 作为默认值,或不做任何处理(默认值即 1.0)
58
+ */
30
59
  lowFreqVolume: {
31
60
  type: Number,
32
61
  required: false
33
62
  },
63
+ /**
64
+ * 设置当前渲染缩放比例,如果为 `undefined` 则默认为 `0.5`
65
+ */
34
66
  renderScale: {
35
67
  type: Number,
36
68
  required: false
37
69
  },
70
+ /**
71
+ * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`
72
+ * 默认渲染器有可能会随着版本更新而更换
73
+ */
38
74
  renderer: {
39
75
  type: Object,
40
76
  required: false
@@ -90,70 +126,152 @@ const BackgroundRender = defineComponent({
90
126
  const LyricPlayer = defineComponent({
91
127
  name: "LyricPlayer",
92
128
  props: {
129
+ /**
130
+ * 是否禁用歌词播放组件,默认为 `false`,歌词组件启用后将会开始逐帧更新歌词的动画效果,并对传入的其他参数变更做出反馈。
131
+ *
132
+ * 如果禁用了歌词组件动画,你也可以通过引用取得原始渲染组件实例,手动逐帧调用其 `update` 函数来更新动画效果。
133
+ */
93
134
  disabled: {
94
135
  type: Boolean,
95
136
  default: false
96
137
  },
138
+ /**
139
+ * 是否演出部分效果,目前会控制播放间奏点的动画的播放暂停与否,默认为 `true`
140
+ */
97
141
  playing: {
98
142
  type: Boolean,
99
143
  default: true
100
144
  },
145
+ /**
146
+ * 设置歌词行的对齐方式,如果为 `undefined` 则默认为 `center`
147
+ *
148
+ * - 设置成 `top` 的话将会向目标歌词行的顶部对齐
149
+ * - 设置成 `bottom` 的话将会向目标歌词行的底部对齐
150
+ * - 设置成 `center` 的话将会向目标歌词行的垂直中心对齐
151
+ */
101
152
  alignAnchor: {
102
153
  type: String,
103
154
  default: "center"
104
155
  },
156
+ /**
157
+ * 设置默认的歌词行对齐位置,相对于整个歌词播放组件的大小位置,如果为 `undefined`
158
+ * 则默认为 `0.5`
159
+ *
160
+ * 可以设置一个 `[0.0-1.0]` 之间的任意数字,代表组件高度由上到下的比例位置
161
+ */
105
162
  alignPosition: {
106
163
  type: Number,
107
164
  default: .5
108
165
  },
166
+ /**
167
+ * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用
168
+ *
169
+ * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行
170
+ *
171
+ * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一
172
+ */
109
173
  enableSpring: {
110
174
  type: Boolean,
111
175
  default: true
112
176
  },
177
+ /**
178
+ * 设置是否启用歌词行的模糊效果,默认为 `true`
179
+ */
113
180
  enableBlur: {
114
181
  type: Boolean,
115
182
  default: true
116
183
  },
184
+ /**
185
+ * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用
186
+ *
187
+ * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行
188
+ *
189
+ * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一
190
+ */
117
191
  enableScale: {
118
192
  type: Boolean,
119
193
  default: true
120
194
  },
195
+ /**
196
+ * 设置是否隐藏已经播放过的歌词行,默认不隐藏
197
+ */
121
198
  hidePassedLines: {
122
199
  type: Boolean,
123
200
  default: false
124
201
  },
202
+ /**
203
+ * 设置歌词中不雅用语的掩码模式,默认为 `MaskObsceneWordsMode.Disabled`,即不掩码
204
+ */
125
205
  maskObsceneWordsMode: {
126
206
  type: String,
127
207
  default: MaskObsceneWordsMode.Disabled
128
208
  },
209
+ /**
210
+ * 设置歌词优化选项
211
+ */
129
212
  optimizeOptions: {
130
213
  type: Object,
131
214
  required: false
132
215
  },
216
+ /**
217
+ * 设置当前播放歌词,要注意传入后这个数组内的信息不得修改,否则会发生错误
218
+ */
133
219
  lyricLines: {
134
220
  type: Object,
135
221
  required: false
136
222
  },
223
+ /**
224
+ * 设置当前播放进度,单位为毫秒且**必须是整数**,此时将会更新内部的歌词进度信息
225
+ * 内部会根据调用间隔和播放进度自动决定如何滚动和显示歌词,所以这个的调用频率越快越准确越好
226
+ */
137
227
  currentTime: {
138
228
  type: Number,
139
229
  default: 0
140
230
  },
231
+ /**
232
+ * 设置文字动画的渐变宽度,单位以歌词行的主文字字体大小的倍数为单位,默认为 0.5,即一个全角字符的一半宽度
233
+ *
234
+ * 如果要模拟 Apple Music for Android 的效果,可以设置为 1
235
+ *
236
+ * 如果要模拟 Apple Music for iPad 的效果,可以设置为 0.5
237
+ *
238
+ * 如果想要近乎禁用渐变效果,可以设置成非常接近 0 的小数(例如 `0.0001` ),但是**不可以为 0**
239
+ */
141
240
  wordFadeWidth: {
142
241
  type: Number,
143
242
  default: .5
144
243
  },
244
+ /**
245
+ * 设置所有歌词行在横坐标上的弹簧属性,包括重量、弹力和阻力。
246
+ *
247
+ * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样
248
+ */
145
249
  linePosXSpringParams: {
146
250
  type: Object,
147
251
  required: false
148
252
  },
253
+ /**
254
+ * 设置所有歌词行在​纵坐标上的弹簧属性,包括重量、弹力和阻力。
255
+ *
256
+ * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样
257
+ */
149
258
  linePosYSpringParams: {
150
259
  type: Object,
151
260
  required: false
152
261
  },
262
+ /**
263
+ * 设置所有歌词行在​缩放大小上的弹簧属性,包括重量、弹力和阻力。
264
+ *
265
+ * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样
266
+ */
153
267
  lineScaleSpringParams: {
154
268
  type: Object,
155
269
  required: false
156
270
  },
271
+ /**
272
+ * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`
273
+ * 默认渲染器有可能会随着版本更新而更换
274
+ */
157
275
  lyricPlayer: {
158
276
  type: Object,
159
277
  required: false