@@ -78,6 +78,12 @@ var d = a.dot( b );
<h3>[property:Float w]</h3>
+ <h3>[property:Float width]</h3>
+ <p>Alias for [page:.z z].</p>
+
+ <h3>[property:Float height]</h3>
+ <p>Alias for [page:.w w].</p>
<h2>Methods</h2>
@@ -21,6 +21,8 @@ export class Vector4 implements Vector {
y: number;
z: number;
w: number;
+ width: number;
+ height: number;
isVector4: true;
/**
@@ -15,6 +15,42 @@ function Vector4( x, y, z, w ) {
}
+Object.defineProperties( Vector4.prototype, {
+ "width": {
+ get: function () {
+ return this.z;
+ },
+ set: function ( value ) {
+ this.z = value;
+ }
+ "height": {
+ return this.w;
+ this.w = value;
+} );
Object.assign( Vector4.prototype, {
isVector4: true,