提交 75a63020 authored 作者: 王健's avatar 王健

坑洞

上级 3bdc6855
......@@ -161,7 +161,6 @@ export default {
// 重新计算一下车道宽
this.lineHeight = this.lineHeightm * this.ratio;
this.init();
this.loop();
},
watch: {
lineHeightm(val) {
......@@ -381,19 +380,6 @@ export default {
const b = Math.floor(Math.random() * 255);
return "rgba(" + r + "," + g + "," + b + ",0.8)";
},
loop() {
this.ctx.beginPath();
this.ctx.moveTo(1, 100);
for (var i = 1; i < 10; i += 0.1) {
// x 应该等于canvas的 width/10
var x = i * 10;
var y = Math.sin(i) * 5 + 100;
this.ctx.lineTo(x, y);
console.log(x, y);
}
this.ctx.stroke();
this.ctx.closePath();
},
},
};
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论