mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 01:12:42 +08:00
add get for position,scale,rotation (#4196)
* add get for position,scale,rotation * fix problem * fix get
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user