浏览代码

Merge branch 'master' of https://github.com/vonWolfehaus/three.js into dev

Mr.doob 10 年之前
父节点
当前提交
6f85b742e5
共有 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 ) {