参考官方文档:https://gojs.net/latest/api/symbols/Animation.html
var node = myDiagram.nodes.first(); //找到一个需要加动画效果的节点
var shape = part.findObject("SHAPE"); // 假设这个节点的go.Shape 里面有一个.name = "SHAPE"的形状
var animation = new go.Animation();
animation.add(node, "position", node.position, new go.Point(400, 500));// 将此节点从其当前位置移动到(400,500)的位置
animation.add(shape, "fill", shape.fill, "blue");// 将此节点的颜色从当前颜色变为蓝色
animation.duration = 1000; //设定时间为一秒
animation.reversible = true; // 重新向后运行
animation.runCount = Infinity; // 动画一直进行 值也可以为数字,表示动画进行几次
animation.start();