Browse Source

Add subScalar()

Corey Birnbaum 10 năm trước cách đây
mục cha
commit
5ff22c17f2
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      src/math/Vector3.js

+ 10 - 0
src/math/Vector3.js

@@ -142,6 +142,16 @@ THREE.Vector3.prototype = {
 		return this;
 
 	},
+	
+	subScalar: function ( s ) {
+
+		this.x -= s;
+		this.y -= s;
+		this.z -= s;
+
+		return this;
+
+	},
 
 	subVectors: function ( a, b ) {