实现在CCGeometry.js
Point:
type: cc.Point(x,y)
help functon:
cc.p(x,y)
cc.pointEqualToPoint(p1, p2)
cc.Size()
cc.size();
cc.sizeEqualToSize
cc.Rect()
cc.rect()
cc.rectEqualToRect()
cc._rectEqualToZero()
cc.rectContainsRect()
cc.rectGetMaxX
cc.rectGetMidX
cc.rectGetMinX
cc.rectGetMaxY
cc.rectGetMidY
cc.rectGetMinY
cc.rectContainsPoint
cc.rectIntersertsRect
cc.rectOverlapsRect
cc.rectUnion
cc.rectInterserction
// 可视区域
cc.visibleRect()
经过实际调试:
Point: 有x y属性可以直接使用
Size: width height
Rect: x y width height