d3 js 动画呼吸应用
我希望能够创建一个以特定时间间隔围绕路径旋转的圆圈动画,并能够控制该间隔以加快/减慢速度。
我的代码目前看起来像这样。如何设置圆圈沿着圆圈路径移动 - 甚至可以让母圆圈本身“呼吸”进出
2023 年 7 月 27 日 - 当前基地
multibar d3
svg = d3.create("svg");
var circle = svg
.append("circle")
.attr("cx", 150)
.attr("cy", 75)
.attr("r", 50);
circle
.transition()
.duration(2000)
.attr('r', 75);
d3
.select("#container")
.append(() => svg.node());
var circle = svg
.append("circle")
.attr("cx", 150)
.attr("cy", 75)
.attr("r", 50);
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号