add get for position,scale,rotation (#4196)

* add get for position,scale,rotation

* fix problem

* fix get
This commit is contained in:
gameu3d
2019-04-16 20:08:50 +08:00
committed by pandamicro
parent a568f5adb0
commit 544e19c0f8
+12
View File
@@ -846,5 +846,17 @@ if (CC_EDITOR) {
});
}
Object.defineProperty(Node.prototype, 'position', {
get: Node.prototype.getPosition,
});
Object.defineProperty(Node.prototype, 'rotation', {
get: Node.prototype.getRotation,
});
Object.defineProperty(Node.prototype, 'scale', {
get: Node.prototype.getScale,
});
cc.Node = Node;
export { Node };