Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
a7c32a0d
T
three.js
项目概览
车家大少爷
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a7c32a0d
编写于
10月 13, 2017
作者:
M
Mr.doob
提交者:
GitHub
10月 13, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #12387 from WestLangley/dev-manhattan2
lengthManhattan() -> manhattanLength()
上级
6a63d7b3
0304a552
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
26 addition
and
8 deletion
+26
-8
docs/api/math/Vector2.html
docs/api/math/Vector2.html
+1
-1
docs/api/math/Vector3.html
docs/api/math/Vector3.html
+1
-1
docs/api/math/Vector4.html
docs/api/math/Vector4.html
+1
-1
src/Three.Legacy.js
src/Three.Legacy.js
+18
-0
src/math/Vector2.js
src/math/Vector2.js
+1
-1
src/math/Vector3.js
src/math/Vector3.js
+1
-1
src/math/Vector4.js
src/math/Vector4.js
+1
-1
src/objects/SkinnedMesh.js
src/objects/SkinnedMesh.js
+2
-2
未找到文件。
docs/api/math/Vector2.html
浏览文件 @
a7c32a0d
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
<div>
Computes the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
<div>
Computes the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
(straight-line length) from (0, 0) to (x, y).
</div>
(straight-line length) from (0, 0) to (x, y).
</div>
<h3>
[method:Float
lengthManhattan
]()
</h3>
<h3>
[method:Float
manhattanLength
]()
</h3>
<div>
<div>
Computes the [link:http://en.wikipedia.org/wiki/Taxicab_geometry Manhattan length] of this vector.
Computes the [link:http://en.wikipedia.org/wiki/Taxicab_geometry Manhattan length] of this vector.
</div>
</div>
...
...
docs/api/math/Vector3.html
浏览文件 @
a7c32a0d
...
@@ -241,7 +241,7 @@ var d = a.distanceTo( b );
...
@@ -241,7 +241,7 @@ var d = a.distanceTo( b );
<div>
Computes the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
<div>
Computes the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
(straight-line length) from (0, 0, 0) to (x, y, z).
</div>
(straight-line length) from (0, 0, 0) to (x, y, z).
</div>
<h3>
[method:Float
lengthManhattan
]()
</h3>
<h3>
[method:Float
manhattanLength
]()
</h3>
<div>
<div>
Computes the [link:http://en.wikipedia.org/wiki/Taxicab_geometry Manhattan length] of this vector.
Computes the [link:http://en.wikipedia.org/wiki/Taxicab_geometry Manhattan length] of this vector.
</div>
</div>
...
...
docs/api/math/Vector4.html
浏览文件 @
a7c32a0d
...
@@ -188,7 +188,7 @@ var d = a.dot( b );
...
@@ -188,7 +188,7 @@ var d = a.dot( b );
<div>
Computes the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
<div>
Computes the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
(straight-line length) from (0, 0, 0, 0) to (x, y, z, w).
</div>
(straight-line length) from (0, 0, 0, 0) to (x, y, z, w).
</div>
<h3>
[method:Float
lengthManhattan
]()
</h3>
<h3>
[method:Float
manhattanLength
]()
</h3>
<div>
<div>
Computes the [link:http://en.wikipedia.org/wiki/Taxicab_geometry Manhattan length] of this vector.
Computes the [link:http://en.wikipedia.org/wiki/Taxicab_geometry Manhattan length] of this vector.
</div>
</div>
...
...
src/Three.Legacy.js
浏览文件 @
a7c32a0d
...
@@ -666,6 +666,12 @@ Object.assign( Vector2.prototype, {
...
@@ -666,6 +666,12 @@ Object.assign( Vector2.prototype, {
console
.
warn
(
'
THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().
'
);
console
.
warn
(
'
THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().
'
);
return
this
.
manhattanDistanceTo
(
v
);
return
this
.
manhattanDistanceTo
(
v
);
},
lengthManhattan
:
function
()
{
console
.
warn
(
'
THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().
'
);
return
this
.
manhattanLength
();
}
}
}
);
}
);
...
@@ -717,6 +723,12 @@ Object.assign( Vector3.prototype, {
...
@@ -717,6 +723,12 @@ Object.assign( Vector3.prototype, {
console
.
warn
(
'
THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().
'
);
console
.
warn
(
'
THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().
'
);
return
this
.
manhattanDistanceTo
(
v
);
return
this
.
manhattanDistanceTo
(
v
);
},
lengthManhattan
:
function
()
{
console
.
warn
(
'
THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().
'
);
return
this
.
manhattanLength
();
}
}
}
);
}
);
...
@@ -728,6 +740,12 @@ Object.assign( Vector4.prototype, {
...
@@ -728,6 +740,12 @@ Object.assign( Vector4.prototype, {
console
.
warn
(
'
THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().
'
);
console
.
warn
(
'
THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().
'
);
return
this
.
fromBufferAttribute
(
attribute
,
index
,
offset
);
return
this
.
fromBufferAttribute
(
attribute
,
index
,
offset
);
},
lengthManhattan
:
function
()
{
console
.
warn
(
'
THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().
'
);
return
this
.
manhattanLength
();
}
}
}
);
}
);
...
...
src/math/Vector2.js
浏览文件 @
a7c32a0d
...
@@ -365,7 +365,7 @@ Object.assign( Vector2.prototype, {
...
@@ -365,7 +365,7 @@ Object.assign( Vector2.prototype, {
},
},
lengthManhattan
:
function
()
{
manhattanLength
:
function
()
{
return
Math
.
abs
(
this
.
x
)
+
Math
.
abs
(
this
.
y
);
return
Math
.
abs
(
this
.
x
)
+
Math
.
abs
(
this
.
y
);
...
...
src/math/Vector3.js
浏览文件 @
a7c32a0d
...
@@ -496,7 +496,7 @@ Object.assign( Vector3.prototype, {
...
@@ -496,7 +496,7 @@ Object.assign( Vector3.prototype, {
},
},
lengthManhattan
:
function
()
{
manhattanLength
:
function
()
{
return
Math
.
abs
(
this
.
x
)
+
Math
.
abs
(
this
.
y
)
+
Math
.
abs
(
this
.
z
);
return
Math
.
abs
(
this
.
x
)
+
Math
.
abs
(
this
.
y
)
+
Math
.
abs
(
this
.
z
);
...
...
src/math/Vector4.js
浏览文件 @
a7c32a0d
...
@@ -538,7 +538,7 @@ Object.assign( Vector4.prototype, {
...
@@ -538,7 +538,7 @@ Object.assign( Vector4.prototype, {
},
},
lengthManhattan
:
function
()
{
manhattanLength
:
function
()
{
return
Math
.
abs
(
this
.
x
)
+
Math
.
abs
(
this
.
y
)
+
Math
.
abs
(
this
.
z
)
+
Math
.
abs
(
this
.
w
);
return
Math
.
abs
(
this
.
x
)
+
Math
.
abs
(
this
.
y
)
+
Math
.
abs
(
this
.
z
)
+
Math
.
abs
(
this
.
w
);
...
...
src/objects/SkinnedMesh.js
浏览文件 @
a7c32a0d
...
@@ -130,7 +130,7 @@ SkinnedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
...
@@ -130,7 +130,7 @@ SkinnedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
var
sw
=
this
.
geometry
.
skinWeights
[
i
];
var
sw
=
this
.
geometry
.
skinWeights
[
i
];
scale
=
1.0
/
sw
.
lengthManhattan
();
scale
=
1.0
/
sw
.
manhattanLength
();
if
(
scale
!==
Infinity
)
{
if
(
scale
!==
Infinity
)
{
...
@@ -157,7 +157,7 @@ SkinnedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
...
@@ -157,7 +157,7 @@ SkinnedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
vec
.
z
=
skinWeight
.
getZ
(
i
);
vec
.
z
=
skinWeight
.
getZ
(
i
);
vec
.
w
=
skinWeight
.
getW
(
i
);
vec
.
w
=
skinWeight
.
getW
(
i
);
scale
=
1.0
/
vec
.
lengthManhattan
();
scale
=
1.0
/
vec
.
manhattanLength
();
if
(
scale
!==
Infinity
)
{
if
(
scale
!==
Infinity
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录