Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
29952255
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,发现更多精彩内容 >>
提交
29952255
编写于
8月 22, 2019
作者:
V
Valentin Lenhart
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add toArray and fromArray function types with array-likes
上级
cfec7dd8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
51 addition
and
6 deletion
+51
-6
src/math/Vector2.d.ts
src/math/Vector2.d.ts
+8
-1
src/math/Vector3.d.ts
src/math/Vector3.d.ts
+15
-3
src/math/Vector4.d.ts
src/math/Vector4.d.ts
+28
-2
未找到文件。
src/math/Vector2.d.ts
浏览文件 @
29952255
...
...
@@ -396,12 +396,19 @@ export class Vector2 implements Vector {
equals
(
v
:
Vector2
):
boolean
;
/**
* Sets this vector's x
value to be array[offset] and y value to be array[offset + 1]
.
* Sets this vector's x
and y value from the provided array
.
* @param array the source array.
* @param offset (optional) offset into the array. Default is 0.
*/
fromArray
(
array
:
number
[],
offset
?:
number
):
this
;
/**
* Sets this vector's x and y value from the provided array-like.
* @param array the source array-like.
* @param offset (optional) offset into the array-like. Default is 0.
*/
fromArray
(
array
:
ArrayLike
<
number
>
,
offset
?:
number
):
this
;
/**
* Returns an array [x, y], or copies x and y into the provided array.
* @param array (optional) array to store the vector to. If this is not provided, a new array will be created.
...
...
src/math/Vector3.d.ts
浏览文件 @
29952255
...
...
@@ -248,7 +248,19 @@ export class Vector3 implements Vector {
*/
equals
(
v
:
Vector3
):
boolean
;
fromArray
(
xyz
:
number
[],
offset
?:
number
):
Vector3
;
/**
* Sets this vector's x, y and z value from the provided array.
* @param array the source array.
* @param offset (optional) offset into the array. Default is 0.
*/
fromArray
(
array
:
number
[],
offset
?:
number
):
this
;
/**
* Sets this vector's x, y and z value from the provided array-lik.
* @param array the source array-like.
* @param offset (optional) offset into the array-like. Default is 0.
*/
fromArray
(
array
:
ArrayLike
<
number
>
,
offset
?:
number
):
this
;
/**
* Returns an array [x, y, z], or copies x, y and z into the provided array.
...
...
@@ -256,7 +268,7 @@ export class Vector3 implements Vector {
* @param offset (optional) optional offset into the array.
* @return The created or provided array.
*/
toArray
(
xyz
?:
number
[],
offset
?:
number
):
number
[];
toArray
(
array
?:
number
[],
offset
?:
number
):
number
[];
/**
* Copies x, y and z into the provided array-like.
...
...
@@ -264,7 +276,7 @@ export class Vector3 implements Vector {
* @param offset (optional) optional offset into the array.
* @return The provided array-like.
*/
toArray
(
xyz
:
ArrayLike
<
number
>
,
offset
?:
number
):
ArrayLike
<
number
>
;
toArray
(
array
:
ArrayLike
<
number
>
,
offset
?:
number
):
ArrayLike
<
number
>
;
fromBufferAttribute
(
attribute
:
BufferAttribute
,
...
...
src/math/Vector4.d.ts
浏览文件 @
29952255
...
...
@@ -174,9 +174,35 @@ export class Vector4 implements Vector {
*/
equals
(
v
:
Vector4
):
boolean
;
fromArray
(
xyzw
:
number
[],
offset
?:
number
):
this
;
/**
* Sets this vector's x, y, z and w value from the provided array.
* @param array the source array.
* @param offset (optional) offset into the array. Default is 0.
*/
fromArray
(
array
:
number
[],
offset
?:
number
):
this
;
/**
* Sets this vector's x, y, z and w value from the provided array-like.
* @param array the source array-like.
* @param offset (optional) offset into the array-like. Default is 0.
*/
fromArray
(
array
:
ArrayLike
<
number
>
,
offset
?:
number
):
this
;
toArray
(
xyzw
?:
number
[],
offset
?:
number
):
number
[];
/**
* Returns an array [x, y, z, w], or copies x, y, z and w into the provided array.
* @param array (optional) array to store the vector to. If this is not provided, a new array will be created.
* @param offset (optional) optional offset into the array.
* @return The created or provided array.
*/
toArray
(
array
?:
number
[],
offset
?:
number
):
number
[];
/**
* Copies x, y, z and w into the provided array-like.
* @param array array-like to store the vector to.
* @param offset (optional) optional offset into the array.
* @return The provided array-like.
*/
toArray
(
array
:
ArrayLike
<
number
>
,
offset
?:
number
):
ArrayLike
<
number
>
;
fromBufferAttribute
(
attribute
:
BufferAttribute
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录