瀏覽代碼

Add subScalar()

Corey Birnbaum 10 年之前
父節點
當前提交
5ff22c17f2
共有 1 個文件被更改,包括 10 次插入0 次删除
  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 ) {