我想做两个动力学形状之间的比较:
这是我的代码:
// -- self.group = Kinetic.Group() With 10 Shapes
//New Group
var Ngroup = new Kinetic.Group();
//ss New Shape
var ss = new Kinetic.Shape();
//Insert Current Shape Into ss
ss = getShape(t);
// Checking If current shape exist in self.group
for(var s in self.group) {
//Check If s = ss <---
if(ss == s){
//Add The Shape to new group
alert("Found");
Ngroup.add(ss);
} else {
//Add the Old Shape to the new group
Ngroup.add(s);
}
}
此代码不起作用
我如何比较两个形状?