Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
f9160a17
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,体验更适合开发者的 AI 搜索 >>
提交
f9160a17
编写于
12月 15, 2016
作者:
M
Mugen87
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Matrix3/Matrix4: Removed .applyToVector3Array()
上级
5a24dac5
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
41 addition
and
84 deletion
+41
-84
docs/api/deprecated/DeprecatedList.html
docs/api/deprecated/DeprecatedList.html
+10
-2
docs/api/math/Matrix3.html
docs/api/math/Matrix3.html
+1
-11
docs/api/math/Matrix4.html
docs/api/math/Matrix4.html
+1
-12
editor/js/libs/tern-threejs/threejs.js
editor/js/libs/tern-threejs/threejs.js
+6
-6
examples/webgl_interactive_instances_gpu.html
examples/webgl_interactive_instances_gpu.html
+11
-3
src/Three.Legacy.js
src/Three.Legacy.js
+10
-0
src/core/BufferGeometry.js
src/core/BufferGeometry.js
+2
-2
src/math/Matrix3.js
src/math/Matrix3.js
+0
-24
src/math/Matrix4.js
src/math/Matrix4.js
+0
-24
未找到文件。
docs/api/deprecated/DeprecatedList.html
浏览文件 @
f9160a17
...
...
@@ -297,7 +297,11 @@
Matrix3.multiplyVector3 has been removed. Use vector.applyMatrix3( matrix ) instead.
<br
/><br
/>
Matrix3.multiplyVector3Array has been renamed to [page:Matrix3.applyToVector3Array]( array ).
Matrix3.multiplyVector3Array has been renamed to [page:Matrix3.applyToVector3Array]( array ).
<br
/><br
/>
Matrix3.applyToBuffer has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.
<br
/><br
/>
Matrix3.applyToVector3Array has been removed.
<div>
<h3>
[page:Matrix4]
</h3>
...
...
@@ -327,7 +331,11 @@
Matrix4.rotateZ has been removed.
<br
/><br
/>
Matrix4.rotateByAxis has been removed.
Matrix4.rotateByAxis has been removed.
<br
/><br
/>
Matrix4.applyToBuffer has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.
<br
/><br
/>
Matrix4.applyToVector3Array has been removed.
</div>
...
...
docs/api/math/Matrix3.html
浏览文件 @
f9160a17
...
...
@@ -79,16 +79,6 @@ m.elements = [ 11, 21, 31,
Multiplies (applies) this matrix to every 3D vector in the [page:BufferAttribute attribute].
</div>
<h3>
[method:Array applyToVector3Array]( [page:Array array], [page:Number offset], [page:Number length] )
</h3>
<div>
[page:Array array] - An array of floats in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...],
that represent 3D vectors.
<br
/>
[page:Number offset] - (optional) index in the array of the first vector's x component. Default is 0.
<br
/>
[page:Number length] - (optional) index in the array of the last vector's z component.
Default is the last element in the array.
<br
/><br
/>
Multiplies (applies) this matrix to every 3D vector in the [page:Array array].
</div>
<h3>
[method:Matrix3 clone]()
</h3>
<div>
Creates a new Matrix3 and with identical elements to this one.
</div>
...
...
docs/api/math/Matrix4.html
浏览文件 @
f9160a17
...
...
@@ -118,17 +118,6 @@ m.elements = [ 11, 21, 31, 41,
</div>
<h3>
[method:Array applyToVector3Array]( [page:Array array], [page:Number offset], [page:Number length] )
</h3>
<div>
[page:Array array] - An array of floats in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...],
that represent 3D vectors.
<br
/>
[page:Number offset] - (optional) index in the array of the first vector's x component. Default is 0.
<br
/>
[page:Number length] - (optional) index in the array of the last vector's z component.
Default is the last element in the array.
<br
/><br
/>
Multiplies (applies) the upper 3x3 matrix of this matrix to every 3D vector in the [page:Array array].
</div>
<h3>
[method:Matrix4 clone]()
</h3>
<div>
Creates a new Matrix4 with identical [page:.elements elements] to this one.
</div>
...
...
editor/js/libs/tern-threejs/threejs.js
浏览文件 @
f9160a17
...
...
@@ -3774,9 +3774,9 @@
"
!type
"
:
"
fn(scalar: number) -> +THREE.Matrix3
"
,
"
!doc
"
:
"
Multiply every component of the matrix by a scalar value.
"
},
"
applyTo
Vector3Array
"
:
{
"
!type
"
:
"
fn(a
rray: []) -> []
"
,
"
!doc
"
:
"
Multiply (apply) this matrix to every vector3 in the a
rray
.
"
"
applyTo
BufferAttribute
"
:
{
"
!type
"
:
"
fn(a
ttribute: []) -> +THREE.BufferAttribute
"
,
"
!doc
"
:
"
Multiply (apply) this matrix to every vector3 in the a
ttribute
.
"
},
"
getNormalMatrix
"
:
{
"
!type
"
:
"
fn(matrix4: +THREE.Matrix4) -> +THREE.Matrix3
"
,
...
...
@@ -3937,9 +3937,9 @@
"
!type
"
:
"
fn() -> +THREE.Matrix4
"
,
"
!doc
"
:
"
Clones this matrix.
"
},
"
applyToVector3Array
"
:
{
"
!type
"
:
"
fn(a
: []) -> []
"
,
"
!doc
"
:
"
Multiply (apply) this matrix to every vector3 in the a
rray
.
"
"
applyToBufferAttribute
"
:
{
"
!type
"
:
"
fn(a
ttribute: []) -> +THREE.BufferAttribute
"
,
"
!doc
"
:
"
Multiply (apply) this matrix to every vector3 in the a
ttribute
.
"
},
"
getMaxScaleOnAxis
"
:
{
"
!type
"
:
"
fn() -> number
"
,
...
...
examples/webgl_interactive_instances_gpu.html
浏览文件 @
f9160a17
...
...
@@ -718,16 +718,24 @@
var
vertices
=
new
THREE
.
BufferAttribute
(
new
Float32Array
(
instanceCount
*
posLen
),
3
);
var
vertex
=
new
THREE
.
Vector3
();
var
matrix
=
new
THREE
.
Matrix4
();
for
(
var
i
=
0
,
ul
=
instanceCount
;
i
<
ul
;
i
++
)
{
var
offset
=
i
*
posLen
;
randomizeMatrix
(
matrix
);
var
object
=
new
THREE
.
Object3D
();
objectCount
++
;
object
.
applyMatrix
(
matrix
);
pickingData
[
i
+
1
]
=
object
;
vertices
.
set
(
pos
.
array
,
i
*
posLen
);
matrix
.
applyToVector3Array
(
vertices
.
array
,
i
*
posLen
,
posLen
)
vertices
.
set
(
pos
.
array
,
offset
);
for
(
var
k
=
0
,
l
=
offset
;
k
<
posLen
;
k
+=
3
,
l
+=
3
)
{
vertex
.
fromArray
(
vertices
.
array
,
l
);
vertex
.
applyMatrix4
(
matrix
);
vertex
.
toArray
(
vertices
.
array
,
l
);
}
}
mgeo
.
addAttribute
(
'
position
'
,
vertices
);
...
...
src/Three.Legacy.js
浏览文件 @
f9160a17
...
...
@@ -359,6 +359,11 @@ Object.assign( Matrix3.prototype, {
console
.
warn
(
'
THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.
'
);
return
this
.
applyToBufferAttribute
(
buffer
);
},
applyToVector3Array
:
function
(
array
,
offset
,
length
)
{
console
.
error
(
'
THREE.Matrix3: .applyToVector3Array() has been removed.
'
);
}
}
);
...
...
@@ -456,6 +461,11 @@ Object.assign( Matrix4.prototype, {
console
.
warn
(
'
THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.
'
);
return
this
.
applyToBufferAttribute
(
buffer
);
},
applyToVector3Array
:
function
(
array
,
offset
,
length
)
{
console
.
error
(
'
THREE.Matrix4: .applyToVector3Array() has been removed.
'
);
}
}
);
...
...
src/core/BufferGeometry.js
浏览文件 @
f9160a17
...
...
@@ -126,7 +126,7 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
if
(
position
!==
undefined
)
{
matrix
.
applyTo
Vector3Array
(
position
.
array
);
matrix
.
applyTo
BufferAttribute
(
position
);
position
.
needsUpdate
=
true
;
}
...
...
@@ -137,7 +137,7 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
var
normalMatrix
=
new
Matrix3
().
getNormalMatrix
(
matrix
);
normalMatrix
.
applyTo
Vector3Array
(
normal
.
array
);
normalMatrix
.
applyTo
BufferAttribute
(
normal
);
normal
.
needsUpdate
=
true
;
}
...
...
src/math/Matrix3.js
浏览文件 @
f9160a17
...
...
@@ -95,30 +95,6 @@ Matrix3.prototype = {
},
applyToVector3Array
:
function
()
{
var
v1
;
return
function
applyToVector3Array
(
array
,
offset
,
length
)
{
if
(
v1
===
undefined
)
v1
=
new
Vector3
();
if
(
offset
===
undefined
)
offset
=
0
;
if
(
length
===
undefined
)
length
=
array
.
length
;
for
(
var
i
=
0
,
j
=
offset
;
i
<
length
;
i
+=
3
,
j
+=
3
)
{
v1
.
fromArray
(
array
,
j
);
v1
.
applyMatrix3
(
this
);
v1
.
toArray
(
array
,
j
);
}
return
array
;
};
}(),
applyToBufferAttribute
:
function
()
{
var
v1
;
...
...
src/math/Matrix4.js
浏览文件 @
f9160a17
...
...
@@ -448,30 +448,6 @@ Matrix4.prototype = {
},
applyToVector3Array
:
function
()
{
var
v1
;
return
function
applyToVector3Array
(
array
,
offset
,
length
)
{
if
(
v1
===
undefined
)
v1
=
new
Vector3
();
if
(
offset
===
undefined
)
offset
=
0
;
if
(
length
===
undefined
)
length
=
array
.
length
;
for
(
var
i
=
0
,
j
=
offset
;
i
<
length
;
i
+=
3
,
j
+=
3
)
{
v1
.
fromArray
(
array
,
j
);
v1
.
applyMatrix4
(
this
);
v1
.
toArray
(
array
,
j
);
}
return
array
;
};
}(),
applyToBufferAttribute
:
function
()
{
var
v1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录