|
@@ -83,7 +83,7 @@ export function initSmoothAnimation() {
|
|
|
const batePos2 = createSmoothCurvePoints(batePos1, _numberOfSegments)
|
|
|
smoothAnimationState.pointsPos = batePos2
|
|
|
// 初始化旋律线
|
|
|
- initCanvasSmooth()
|
|
|
+ //initCanvasSmooth() 暂时关闭旋律线
|
|
|
// 谱面的平均速度(因为可能有反复的情况所以实际距离要加上反复的距离)
|
|
|
const canvasDomPath = batePos.reduce((path, item, index, arr) => {
|
|
|
if (index !== 0) {
|
|
@@ -138,7 +138,7 @@ export function destroySmoothAnimation() {
|
|
|
smoothAnimationState.isShow.value = false
|
|
|
window.removeEventListener("resize", calcClientWidth)
|
|
|
// 销毁组件 防止内存泄漏
|
|
|
- smoothAnimationState.smoothBotDom && render(null, smoothAnimationState.smoothBotDom)
|
|
|
+ //smoothAnimationState.smoothBotDom && render(null, smoothAnimationState.smoothBotDom) //关闭旋律线
|
|
|
smoothAnimationState.smoothAnimationBoxDom?.remove()
|
|
|
Object.assign(smoothAnimationState, {
|
|
|
canvasDom: null,
|
|
@@ -356,7 +356,7 @@ export function moveTranslateXNum(translateXNum: number) {
|
|
|
*/
|
|
|
function smoothAnimationMove(pos: { x: number; y: number }, progresspointsPos: pointsPosType) {
|
|
|
smoothAnimationState.smoothBotDom && (smoothAnimationState.smoothBotDom.style.transform = `translate(${pos.x}px, ${pos.y}px)`)
|
|
|
- smoothAnimationState.canvasCtx && drawSmoothCurveProgress(smoothAnimationState.canvasCtx, progresspointsPos, "#36CFB3")
|
|
|
+ //smoothAnimationState.canvasCtx && drawSmoothCurveProgress(smoothAnimationState.canvasCtx, progresspointsPos, "#36CFB3") 暂时关闭旋律线
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -403,7 +403,7 @@ function createSmoothAnimation() {
|
|
|
smoothBotDom.className = "smoothBot"
|
|
|
smoothAnimationState.smoothBotDom = smoothBotDom
|
|
|
// 添加小鸟
|
|
|
- render(h(Bird), smoothBotDom)
|
|
|
+ //render(h(Bird), smoothBotDom) //关闭旋律线
|
|
|
smoothAnimationConDom.appendChild(smoothCanvasDom)
|
|
|
smoothAnimationConDom.appendChild(smoothBotDom)
|
|
|
smoothAnimationBoxDom.appendChild(smoothAnimationConDom)
|