Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
a4454947
T
three.js
项目概览
Ablesons
/
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,发现更多精彩内容 >>
提交
a4454947
编写于
2月 20, 2017
作者:
J
Jing Ma
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed several typos and minor errors
上级
bffb7ac4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
21 deletion
+20
-21
docs/api/math/Vector2.html
docs/api/math/Vector2.html
+20
-21
未找到文件。
docs/api/math/Vector2.html
浏览文件 @
a4454947
...
...
@@ -54,7 +54,7 @@
[page:Float x] - the x value of the vector. Default is *0*.
<br
/>
[page:Float y] - the y value of the vector. Default is *0*.
<br
/><br
/>
Create
d
a new [name].
Create
s
a new [name].
</div>
...
...
@@ -64,7 +64,7 @@
<div>
Used to check whether this or derived classes are Vector2s. Default is *true*.
<br
/><br
/>
You should not change this, as it used internally for optimisation.
You should not change this, as it
is
used internally for optimisation.
</div>
<h3>
[property:Float height]
</h3>
...
...
@@ -84,7 +84,7 @@
<div>
Adds [page:Vector2 v] to this vector.
</div>
<h3>
[method:Vector2 addScalar]( [page:Float s] )
</h3>
<div>
Add
the scalar value s
to this vector's [page:.x x] and [page:.y y] values.
</div>
<div>
Add
s the scalar value [page:Float s]
to this vector's [page:.x x] and [page:.y y] values.
</div>
<h3>
[method:Vector2 addScaledVector]( [page:Vector2 v], [page:Float s] )
</h3>
<div>
Adds the multiple of [page:Vector2 v] and [page:Float s] to this vector.
</div>
...
...
@@ -131,13 +131,13 @@
<h3>
[method:Vector2 clone]()
</h3>
<div>
Returns a new
v
ector2 with the same [page:.x x] and [page:.y y] values as this one.
Returns a new
V
ector2 with the same [page:.x x] and [page:.y y] values as this one.
</div>
<h3>
[method:Vector2 copy]( [page:Vector2 v] )
</h3>
<div>
Copies the values of the passed
v
ector2's [page:.x x] and [page:.y y]
properties to this
v
ector2.
Copies the values of the passed
V
ector2's [page:.x x] and [page:.y y]
properties to this
V
ector2.
</div>
<h3>
[method:Float distanceTo]( [page:Vector2 v] )
</h3>
...
...
@@ -166,7 +166,7 @@
<h3>
[method:Float dot]( [page:Vector2 v] )
</h3>
<div>
Calculate the [link:https://en.wikipedia.org/wiki/Dot_product dot product] of this
Calculate
s
the [link:https://en.wikipedia.org/wiki/Dot_product dot product] of this
vector and [page:Vector2 v].
</div>
...
...
@@ -179,9 +179,9 @@
<h3>
[method:Vector2 fromArray]( [page:Array array], [page:Integer offset] )
</h3>
<div>
[page:Array array] - the source array.
<br
/>
[page:Integer offset] - (
optional) offset into the array. Default is 0.
<br
/><br
/>
[page:Integer offset] - (optional) offset into the array. Default is 0.
<br
/><br
/>
Sets this vector's [page:.x x] value to be array[
0] and [page:.y y] value to be array[1
].
Sets this vector's [page:.x x] value to be array[
offset ] and [page:.y y] value to be array[ offset + 1
].
</div>
<h3>
[method:Vector2 fromBufferAttribute]( [page:BufferAttribute attribute], [page:Integer index] )
</h3>
...
...
@@ -221,7 +221,7 @@
[page:Vector2 v] - [page:Vector2] to interpolate towards.
<br
/>
alpha - interpolation factor in the closed interval [0, 1].
<br
/><br
/>
Linearly interpolate between this vector and [page:Vector2 v], where alpha is the
Linearly interpolate
s
between this vector and [page:Vector2 v], where alpha is the
distance along the line - alpha = 0 will be this vector, and alpha = 1 will be [page:Vector2 v].
</div>
...
...
@@ -241,19 +241,19 @@
<h3>
[method:Vector2 normalize]()
</h3>
<div>
Convert this vector to a [link:https://en.wikipedia.org/wiki/Unit_vector unit vector] - that is, sets it equal to the vector with the same direction
Convert
s
this vector to a [link:https://en.wikipedia.org/wiki/Unit_vector unit vector] - that is, sets it equal to the vector with the same direction
as this one, but [page:.length length] 1.
</div>
<h3>
[method:Vector2 max]( [page:Vector2 v] )
</h3>
<div>
If this vector's x or y value is less than [page:Vector2 v
's]
x or y value, replace
If this vector's x or y value is less than [page:Vector2 v
]'s
x or y value, replace
that value with the corresponding max value.
</div>
<h3>
[method:Vector2 min]( [page:Vector2 v] )
</h3>
<div>
If this vector's x or y value is greater than [page:Vector2 v
's]
x or y value, replace
If this vector's x or y value is greater than [page:Vector2 v
]'s
x or y value, replace
that value with the corresponding min value.
</div>
...
...
@@ -269,7 +269,7 @@
[page:Vector2 center] - the point around which to rotate.
<br
/>
[page:float angle] - the angle to rotate, in radians.
<br
/><br
/>
Rotate
the vector arounf
[page:Vector2 center] by [page:float angle] radians.
Rotate
s the vector around
[page:Vector2 center] by [page:float angle] radians.
</div>
<h3>
[method:Vector2 round]()
</h3>
...
...
@@ -294,34 +294,33 @@
<h3>
[method:Vector2 setLength]( [page:Float l] )
</h3>
<div>
Set this vector to the vector with the same direction as this one, but [page:.length length]
Set
s
this vector to the vector with the same direction as this one, but [page:.length length]
[page:Float l].
</div>
<h3>
[method:Vector2 setScalar]( [page:Float scalar] )
</h3>
<div>
Set the [page:.x x] and [page:.y y] values of this vector both equal to [page:Float scalar].
Set
s
the [page:.x x] and [page:.y y] values of this vector both equal to [page:Float scalar].
</div>
<h3>
[method:Vector2 setX]( [page:Float x] )
</h3>
<div>
Replace this vector's [page:.x x] value with [page:Float x].
</div>
<div>
Replace
s
this vector's [page:.x x] value with [page:Float x].
</div>
<h3>
[method:Vector2 setY]( [page:Float y] )
</h3>
<div>
Replace this vector's [page:.y y] value with [page:Float y].
</div>
<div>
Replace
s
this vector's [page:.y y] value with [page:Float y].
</div>
<h3>
[method:Vector2 sub]( [page:Vector2 v] )
</h3>
<div>
Subtracts [page:Vector2 v] from this vector.
</div>
<h3>
[method:Vector2 subScalar]( [page:Float s] )
</h3>
<div>
Subtracts [page:Float s] from this vector's [page:.x x] and [page:.y y] compnents.
</div>
<div>
Subtracts [page:Float s] from this vector's [page:.x x] and [page:.y y] comp
o
nents.
</div>
<h3>
[method:Vector2 subVectors]( [page:Vector2 a], [page:Vector2 b] )
</h3>
<div>
Sets this vector to [page:Vector2 a] - [page:Vector2 b].
</div>
<h3>
[method:Array toArray]( [page:Array array], [page:Integer offset] )
</h3>
<div>
[page:Array array] - (optional) array to store the vector to. If this is not provided
a new array will be created.
<br
/>
[page:Array array] - (optional) array to store the vector to. If this is not provided, a new array will be created.
<br
/>
[page:Integer offset] - (optional) optional offset into the array.
<br
/><br
/>
Returns an array [x, y], or copies x and y into the provided [page:Array array].
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录