|
@@ -12,37 +12,26 @@ function Vector2( x, y ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
-Object.assign( Vector2.prototype, {
|
|
|
-
|
|
|
- constructor: Vector2,
|
|
|
-
|
|
|
- isVector2: true,
|
|
|
-
|
|
|
- get width() {
|
|
|
-
|
|
|
- return this.x;
|
|
|
+Object.defineProperties( Vector2.prototype, {
|
|
|
|
|
|
+ "width" : {
|
|
|
+ get: function () { return this.x; },
|
|
|
+ set: function ( value ) { this.x = value; }
|
|
|
},
|
|
|
|
|
|
- set width( value ) {
|
|
|
-
|
|
|
- this.x = value;
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- get height() {
|
|
|
-
|
|
|
- return this.y;
|
|
|
+ "height" : {
|
|
|
+ get: function () { return this.y; },
|
|
|
+ set: function ( value ) { this.y = value; }
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
+} );
|
|
|
|
|
|
- set height( value ) {
|
|
|
|
|
|
- this.y = value;
|
|
|
+Object.assign( Vector2.prototype, {
|
|
|
|
|
|
- },
|
|
|
+ constructor: Vector2,
|
|
|
|
|
|
- //
|
|
|
+ isVector2: true,
|
|
|
|
|
|
set: function ( x, y ) {
|
|
|
|