Mr.doob 10 лет назад
Родитель
Сommit
e7d7a1fa58
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      src/math/Rectangle.js

+ 6 - 0
src/math/Rectangle.js

@@ -32,6 +32,12 @@ THREE.Rectangle.prototype = {
 
 		return this;
 
+	},
+
+	equals: function ( rectangle ) {
+
+		return this.x === rectangle.x && this.y === rectangle.y && this.width === rectangle.width && this.height === rectangle.height;
+
 	}
 
 };

粤ICP备19079148号