Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
9171d077
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,发现更多精彩内容 >>
提交
9171d077
编写于
11月 23, 2012
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'alteredq/dev' into dev
上级
a4fa91fa
b6331a85
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
44 addition
and
22 deletion
+44
-22
build/three.js
build/three.js
+20
-9
build/three.min.js
build/three.min.js
+4
-4
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+20
-9
未找到文件。
build/three.js
浏览文件 @
9171d077
...
...
@@ -19353,7 +19353,7 @@ THREE.WebGLRenderer = function ( parameters ) {
var attributes = material.program.attributes;
if ( object.morphTargetBase !== -1 ) {
if ( object.morphTargetBase !== -1
&& attributes.position >= 0
) {
_gl.bindBuffer( _gl.ARRAY_BUFFER, geometryGroup.__webglMorphTargetsBuffers[ object.morphTargetBase ] );
enableAttribute( attributes.position );
...
...
@@ -19377,11 +19377,15 @@ THREE.WebGLRenderer = function ( parameters ) {
while ( m < material.numSupportedMorphTargets && m < order.length ) {
_gl.bindBuffer( _gl.ARRAY_BUFFER, geometryGroup.__webglMorphTargetsBuffers[ order[ m ] ] );
enableAttribute( attributes[ "morphTarget" + m ] );
_gl.vertexAttribPointer( attributes[ "morphTarget" + m ], 3, _gl.FLOAT, false, 0, 0 );
if ( attributes[ "morphTarget" + m ] >= 0 ) {
if ( material.morphNormals ) {
_gl.bindBuffer( _gl.ARRAY_BUFFER, geometryGroup.__webglMorphTargetsBuffers[ order[ m ] ] );
enableAttribute( attributes[ "morphTarget" + m ] );
_gl.vertexAttribPointer( attributes[ "morphTarget" + m ], 3, _gl.FLOAT, false, 0, 0 );
}
if ( attributes[ "morphNormal" + m ] >= 0 && material.morphNormals ) {
_gl.bindBuffer( _gl.ARRAY_BUFFER, geometryGroup.__webglMorphNormalsBuffers[ order[ m ] ] );
enableAttribute( attributes[ "morphNormal" + m ] );
...
...
@@ -19437,22 +19441,28 @@ THREE.WebGLRenderer = function ( parameters ) {
influenceIndex = activeInfluenceIndices[ m ][ 0 ];
_gl.bindBuffer( _gl.ARRAY_BUFFER, geometryGroup.__webglMorphTargetsBuffers[ influenceIndex ] );
enableAttribute( attributes[ "morphTarget" + m ] );
_gl.vertexAttribPointer( attributes[ "morphTarget" + m ], 3, _gl.FLOAT, false, 0, 0 );
if ( attributes[ "morphTarget" + m ] >= 0 ) {
if ( material.morphNormals ) {
_gl.bindBuffer( _gl.ARRAY_BUFFER, geometryGroup.__webglMorphTargetsBuffers[ influenceIndex ] );
enableAttribute( attributes[ "morphTarget" + m ] );
_gl.vertexAttribPointer( attributes[ "morphTarget" + m ], 3, _gl.FLOAT, false, 0, 0 );
}
if ( attributes[ "morphNormal" + m ] >= 0 && material.morphNormals ) {
_gl.bindBuffer( _gl.ARRAY_BUFFER, geometryGroup.__webglMorphNormalsBuffers[ influenceIndex ] );
enableAttribute( attributes[ "morphNormal" + m ] );
_gl.vertexAttribPointer( attributes[ "morphNormal" + m ], 3, _gl.FLOAT, false, 0, 0 );
}
object.__webglMorphTargetInfluences[ m ] = influences[ influenceIndex ];
} else {
/*
_gl.vertexAttribPointer( attributes[ "morphTarget" + m ], 3, _gl.FLOAT, false, 0, 0 );
if ( material.morphNormals ) {
...
...
@@ -19460,6 +19470,7 @@ THREE.WebGLRenderer = function ( parameters ) {
_gl.vertexAttribPointer( attributes[ "morphNormal" + m ], 3, _gl.FLOAT, false, 0, 0 );
}
*/
object.__webglMorphTargetInfluences[ m ] = 0;
...
...
build/three.min.js
浏览文件 @
9171d077
...
...
@@ -358,10 +358,10 @@ j&&(n=j.itemSize,k.bindBuffer(k.ARRAY_BUFFER,j.buffer),l(a.uv),k.vertexAttribPoi
k
.
UNSIGNED_SHORT
,
2
*
d
[
c
].
start
);
H
.
info
.
render
.
calls
++
;
H
.
info
.
render
.
vertices
+=
d
[
c
].
count
;
H
.
info
.
render
.
faces
+=
d
[
c
].
count
/
3
}}
else
b
&&
(
i
=
e
.
attributes
.
position
,
j
=
i
.
itemSize
,
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
i
.
buffer
),
l
(
a
.
position
),
k
.
vertexAttribPointer
(
a
.
position
,
j
,
k
.
FLOAT
,
!
1
,
0
,
0
),
j
=
e
.
attributes
.
normal
,
0
<=
a
.
normal
&&
j
&&
(
n
=
j
.
itemSize
,
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
j
.
buffer
),
l
(
a
.
normal
),
k
.
vertexAttribPointer
(
a
.
normal
,
n
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
j
=
e
.
attributes
.
uv
,
0
<=
a
.
uv
&&
j
&&
(
n
=
j
.
itemSize
,
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
j
.
buffer
),
l
(
a
.
uv
),
k
.
vertexAttribPointer
(
a
.
uv
,
n
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
j
=
e
.
attributes
.
color
,
0
<=
a
.
color
&&
j
&&
(
n
=
j
.
itemSize
,
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
j
.
buffer
),
l
(
a
.
color
),
k
.
vertexAttribPointer
(
a
.
color
,
n
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
j
=
e
.
attributes
.
tangent
,
0
<=
a
.
tangent
&&
j
&&
(
n
=
j
.
itemSize
,
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
j
.
buffer
),
l
(
a
.
tangent
),
k
.
vertexAttribPointer
(
a
.
tangent
,
n
,
k
.
FLOAT
,
!
1
,
0
,
0
))),
k
.
drawArrays
(
k
.
TRIANGLES
,
0
,
i
.
numItems
/
3
),
H
.
info
.
render
.
calls
++
,
H
.
info
.
render
.
vertices
+=
i
.
numItems
/
3
,
H
.
info
.
render
.
faces
+=
i
.
numItems
/
3
/
3
;
else
f
instanceof
THREE
.
ParticleSystem
&&
b
&&
(
i
=
e
.
attributes
.
position
,
j
=
i
.
itemSize
,
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
i
.
buffer
),
l
(
a
.
position
),
k
.
vertexAttribPointer
(
a
.
position
,
j
,
k
.
FLOAT
,
!
1
,
0
,
0
),
j
=
e
.
attributes
.
color
,
0
<=
a
.
color
&&
j
&&
(
n
=
j
.
itemSize
,
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
j
.
buffer
),
l
(
a
.
color
),
k
.
vertexAttribPointer
(
a
.
color
,
n
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
k
.
drawArrays
(
k
.
POINTS
,
0
,
i
.
numItems
/
3
),
H
.
info
.
render
.
calls
++
,
H
.
info
.
render
.
points
+=
i
.
numItems
/
3
)};
this
.
renderBuffer
=
function
(
a
,
b
,
c
,
d
,
e
,
f
){
if
(
!
1
!==
d
.
visible
){
var
g
,
h
,
c
=
A
(
a
,
b
,
c
,
d
,
f
),
b
=
c
.
attributes
,
a
=!
1
,
c
=
16777215
*
e
.
id
+
2
*
c
.
id
+
(
d
.
wireframe
?
1
:
0
);
c
!==
ba
&&
(
ba
=
c
,
a
=!
0
);
a
&&
m
();
if
(
!
d
.
morphTargets
&&
0
<=
b
.
position
)
a
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglVertexBuffer
),
l
(
b
.
position
),
k
.
vertexAttribPointer
(
b
.
position
,
3
,
k
.
FLOAT
,
!
1
,
0
,
0
));
else
if
(
f
.
morphTargetBase
){
c
=
d
.
program
.
attributes
;
-
1
!==
f
.
morphTargetBase
?(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphTargetsBuffers
[
f
.
morphTargetBase
]),
l
(
c
.
position
),
k
.
vertexAttribPointer
(
c
.
position
,
3
,
k
.
FLOAT
,
!
1
,
0
,
0
)):
0
<=
c
.
position
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglVertexBuffer
)
,
l
(
c
.
position
),
k
.
vertexAttribPointer
(
c
.
position
,
3
,
k
.
FLOAT
,
!
1
,
0
,
0
));
if
(
f
.
morphTargetForcedOrder
.
length
){
var
i
=
0
;
h
=
f
.
morphTargetForcedOrder
;
for
(
g
=
f
.
morphTargetInfluences
;
i
<
d
.
numSupportedMorphTargets
&&
i
<
h
.
length
;)
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphTargetsBuffers
[
h
[
i
]]),
l
(
c
[
"
morphTarget
"
+
i
]),
k
.
vertexAttribPointer
(
c
[
"
morphTarget
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
),
d
.
morphNormals
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphNormalsBuffers
[
h
[
i
]]),
l
(
c
[
"
morphNormal
"
+
i
]),
k
.
vertexAttribPointer
(
c
[
"
morphNormal
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
f
.
__webglMorphTargetInfluences
[
i
]
=
g
[
h
[
i
]],
i
++
}
else
{
h
=
[];
g
=
f
.
morphTargetInfluences
;
var
j
,
n
=
g
.
length
;
for
(
j
=
0
;
j
<
n
;
j
++
)
i
=
g
[
j
],
0
<
i
&&
h
.
push
([
j
,
i
]);
h
.
length
>
d
.
numSupportedMorphTargets
?(
h
.
sort
(
p
),
h
.
length
=
d
.
numSupportedMorphTargets
):
h
.
length
>
d
.
numSupportedMorphNormals
?
h
.
sort
(
p
):
0
===
h
.
length
&&
h
.
push
([
0
,
0
]);
for
(
i
=
0
;
i
<
d
.
numSupportedMorphTargets
;)
h
[
i
]?(
j
=
h
[
i
][
0
],
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphTargetsBuffers
[
j
]),
l
(
c
[
"
morphTarget
"
+
i
]),
k
.
vertexAttribPointer
(
c
[
"
morphTarget
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
),
d
.
morphNormals
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphNormalsBuffers
[
j
]),
l
(
c
[
"
morphNormal
"
+
i
]),
k
.
vertexAttribPointer
(
c
[
"
morphNormal
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
f
.
__webglMorphTargetInfluences
[
i
]
=
g
[
j
]):(
k
.
vertexAttribPointer
(
c
[
"
morphTarget
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
),
d
.
morphNormals
&&
k
.
vertexAttribPointer
(
c
[
"
morphNormal
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
),
f
.
__webglMorphTargetInfluences
[
i
]
=
0
)
,
i
++
}
null
!==
d
.
program
.
uniforms
.
morphTargetInfluences
&&
k
.
uniform1fv
(
d
.
program
.
uniforms
.
morphTargetInfluences
,
f
.
__webglMorphTargetInfluences
)}
if
(
a
){
if
(
e
.
__webglCustomAttributesList
){
g
=
a
=!
1
,
c
=
16777215
*
e
.
id
+
2
*
c
.
id
+
(
d
.
wireframe
?
1
:
0
);
c
!==
ba
&&
(
ba
=
c
,
a
=!
0
);
a
&&
m
();
if
(
!
d
.
morphTargets
&&
0
<=
b
.
position
)
a
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglVertexBuffer
),
l
(
b
.
position
),
k
.
vertexAttribPointer
(
b
.
position
,
3
,
k
.
FLOAT
,
!
1
,
0
,
0
));
else
if
(
f
.
morphTargetBase
){
c
=
d
.
program
.
attributes
;
-
1
!==
f
.
morphTargetBase
&&
0
<=
c
.
position
?(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphTargetsBuffers
[
f
.
morphTargetBase
]),
l
(
c
.
position
),
k
.
vertexAttribPointer
(
c
.
position
,
3
,
k
.
FLOAT
,
!
1
,
0
,
0
)):
0
<=
c
.
position
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglVertexBuffer
),
l
(
c
.
position
),
k
.
vertexAttribPointer
(
c
.
position
,
3
,
k
.
FLOAT
,
!
1
,
0
,
0
));
if
(
f
.
morphTargetForcedOrder
.
length
){
var
i
=
0
;
h
=
f
.
morphTargetForcedOrder
;
for
(
g
=
f
.
morphTargetInfluences
;
i
<
d
.
numSupportedMorphTargets
&&
i
<
h
.
length
;)
0
<=
c
[
"
morphTarget
"
+
i
]
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphTargetsBuffers
[
h
[
i
]]),
l
(
c
[
"
morphTarget
"
+
i
]),
k
.
vertexAttribPointer
(
c
[
"
morphTarget
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
0
<=
c
[
"
morphNormal
"
+
i
]
&&
d
.
morphNormals
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphNormalsBuffers
[
h
[
i
]])
,
l
(
c
[
"
morphNormal
"
+
i
]),
k
.
vertexAttribPointer
(
c
[
"
morphNormal
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
f
.
__webglMorphTargetInfluences
[
i
]
=
g
[
h
[
i
]],
i
++
}
else
{
h
=
[];
g
=
f
.
morphTargetInfluences
;
var
j
,
n
=
g
.
length
;
for
(
j
=
0
;
j
<
n
;
j
++
)
i
=
g
[
j
],
0
<
i
&&
h
.
push
([
j
,
i
]);
h
.
length
>
d
.
numSupportedMorphTargets
?(
h
.
sort
(
p
),
h
.
length
=
d
.
numSupportedMorphTargets
):
h
.
length
>
d
.
numSupportedMorphNormals
?
h
.
sort
(
p
):
0
===
h
.
length
&&
h
.
push
([
0
,
0
]);
for
(
i
=
0
;
i
<
d
.
numSupportedMorphTargets
;)
h
[
i
]?(
j
=
h
[
i
][
0
],
0
<=
c
[
"
morphTarget
"
+
i
]
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphTargetsBuffers
[
j
])
,
l
(
c
[
"
morphTarget
"
+
i
]),
k
.
vertexAttribPointer
(
c
[
"
morphTarget
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
0
<=
c
[
"
morphNormal
"
+
i
]
&&
d
.
morphNormals
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglMorphNormalsBuffers
[
j
]),
l
(
c
[
"
morphNormal
"
+
i
]),
k
.
vertexAttribPointer
(
c
[
"
morphNormal
"
+
i
],
3
,
k
.
FLOAT
,
!
1
,
0
,
0
)),
f
.
__webglMorphTargetInfluences
[
i
]
=
g
[
j
]):
f
.
__webglMorphTargetInfluences
[
i
]
=
0
,
i
++
}
null
!==
d
.
program
.
uniforms
.
morphTargetInfluences
&&
k
.
uniform1fv
(
d
.
program
.
uniforms
.
morphTargetInfluences
,
f
.
__webglMorphTargetInfluences
)}
if
(
a
){
if
(
e
.
__webglCustomAttributesList
){
g
=
0
;
for
(
h
=
e
.
__webglCustomAttributesList
.
length
;
g
<
h
;
g
++
)
c
=
e
.
__webglCustomAttributesList
[
g
],
0
<=
b
[
c
.
buffer
.
belongsToAttribute
]
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
c
.
buffer
),
l
(
b
[
c
.
buffer
.
belongsToAttribute
]),
k
.
vertexAttribPointer
(
b
[
c
.
buffer
.
belongsToAttribute
],
c
.
size
,
k
.
FLOAT
,
!
1
,
0
,
0
))}
0
<=
b
.
color
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglColorBuffer
),
l
(
b
.
color
),
k
.
vertexAttribPointer
(
b
.
color
,
3
,
k
.
FLOAT
,
!
1
,
0
,
0
));
0
<=
b
.
normal
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglNormalBuffer
),
l
(
b
.
normal
),
k
.
vertexAttribPointer
(
b
.
normal
,
3
,
k
.
FLOAT
,
!
1
,
0
,
0
));
0
<=
b
.
tangent
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglTangentBuffer
),
l
(
b
.
tangent
),
k
.
vertexAttribPointer
(
b
.
tangent
,
4
,
k
.
FLOAT
,
!
1
,
0
,
0
));
0
<=
b
.
uv
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglUVBuffer
),
l
(
b
.
uv
),
k
.
vertexAttribPointer
(
b
.
uv
,
2
,
k
.
FLOAT
,
!
1
,
0
,
0
));
0
<=
b
.
uv2
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglUV2Buffer
),
l
(
b
.
uv2
),
k
.
vertexAttribPointer
(
b
.
uv2
,
2
,
k
.
FLOAT
,
!
1
,
0
,
0
));
d
.
skinning
&&
(
0
<=
b
.
skinIndex
&&
0
<=
b
.
skinWeight
)
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglSkinIndicesBuffer
),
l
(
b
.
skinIndex
),
k
.
vertexAttribPointer
(
b
.
skinIndex
,
4
,
k
.
FLOAT
,
!
1
,
0
,
0
),
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglSkinWeightsBuffer
),
l
(
b
.
skinWeight
),
k
.
vertexAttribPointer
(
b
.
skinWeight
,
4
,
k
.
FLOAT
,
!
1
,
0
,
0
));
0
<=
b
.
lineDistance
&&
(
k
.
bindBuffer
(
k
.
ARRAY_BUFFER
,
e
.
__webglLineDistanceBuffer
),
l
(
b
.
lineDistance
),
k
.
vertexAttribPointer
(
b
.
lineDistance
,
1
,
k
.
FLOAT
,
!
1
,
0
,
0
))}
f
instanceof
THREE
.
Mesh
?(
d
.
wireframe
?(
d
=
d
.
wireframeLinewidth
,
d
!==
ra
&&
(
k
.
lineWidth
(
d
),
ra
=
d
),
a
&&
k
.
bindBuffer
(
k
.
ELEMENT_ARRAY_BUFFER
,
e
.
__webglLineBuffer
),
k
.
drawElements
(
k
.
LINES
,
e
.
__webglLineCount
,
k
.
UNSIGNED_SHORT
,
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
9171d077
...
...
@@ -3727,7 +3727,7 @@ THREE.WebGLRenderer = function ( parameters ) {
var
attributes
=
material
.
program
.
attributes
;
if
(
object
.
morphTargetBase
!==
-
1
)
{
if
(
object
.
morphTargetBase
!==
-
1
&&
attributes
.
position
>=
0
)
{
_gl
.
bindBuffer
(
_gl
.
ARRAY_BUFFER
,
geometryGroup
.
__webglMorphTargetsBuffers
[
object
.
morphTargetBase
]
);
enableAttribute
(
attributes
.
position
);
...
...
@@ -3751,11 +3751,15 @@ THREE.WebGLRenderer = function ( parameters ) {
while
(
m
<
material
.
numSupportedMorphTargets
&&
m
<
order
.
length
)
{
_gl
.
bindBuffer
(
_gl
.
ARRAY_BUFFER
,
geometryGroup
.
__webglMorphTargetsBuffers
[
order
[
m
]
]
);
enableAttribute
(
attributes
[
"
morphTarget
"
+
m
]
);
_gl
.
vertexAttribPointer
(
attributes
[
"
morphTarget
"
+
m
],
3
,
_gl
.
FLOAT
,
false
,
0
,
0
);
if
(
attributes
[
"
morphTarget
"
+
m
]
>=
0
)
{
if
(
material
.
morphNormals
)
{
_gl
.
bindBuffer
(
_gl
.
ARRAY_BUFFER
,
geometryGroup
.
__webglMorphTargetsBuffers
[
order
[
m
]
]
);
enableAttribute
(
attributes
[
"
morphTarget
"
+
m
]
);
_gl
.
vertexAttribPointer
(
attributes
[
"
morphTarget
"
+
m
],
3
,
_gl
.
FLOAT
,
false
,
0
,
0
);
}
if
(
attributes
[
"
morphNormal
"
+
m
]
>=
0
&&
material
.
morphNormals
)
{
_gl
.
bindBuffer
(
_gl
.
ARRAY_BUFFER
,
geometryGroup
.
__webglMorphNormalsBuffers
[
order
[
m
]
]
);
enableAttribute
(
attributes
[
"
morphNormal
"
+
m
]
);
...
...
@@ -3811,22 +3815,28 @@ THREE.WebGLRenderer = function ( parameters ) {
influenceIndex
=
activeInfluenceIndices
[
m
][
0
];
_gl
.
bindBuffer
(
_gl
.
ARRAY_BUFFER
,
geometryGroup
.
__webglMorphTargetsBuffers
[
influenceIndex
]
);
enableAttribute
(
attributes
[
"
morphTarget
"
+
m
]
);
_gl
.
vertexAttribPointer
(
attributes
[
"
morphTarget
"
+
m
],
3
,
_gl
.
FLOAT
,
false
,
0
,
0
);
if
(
attributes
[
"
morphTarget
"
+
m
]
>=
0
)
{
if
(
material
.
morphNormals
)
{
_gl
.
bindBuffer
(
_gl
.
ARRAY_BUFFER
,
geometryGroup
.
__webglMorphTargetsBuffers
[
influenceIndex
]
);
enableAttribute
(
attributes
[
"
morphTarget
"
+
m
]
);
_gl
.
vertexAttribPointer
(
attributes
[
"
morphTarget
"
+
m
],
3
,
_gl
.
FLOAT
,
false
,
0
,
0
);
}
if
(
attributes
[
"
morphNormal
"
+
m
]
>=
0
&&
material
.
morphNormals
)
{
_gl
.
bindBuffer
(
_gl
.
ARRAY_BUFFER
,
geometryGroup
.
__webglMorphNormalsBuffers
[
influenceIndex
]
);
enableAttribute
(
attributes
[
"
morphNormal
"
+
m
]
);
_gl
.
vertexAttribPointer
(
attributes
[
"
morphNormal
"
+
m
],
3
,
_gl
.
FLOAT
,
false
,
0
,
0
);
}
object
.
__webglMorphTargetInfluences
[
m
]
=
influences
[
influenceIndex
];
}
else
{
/*
_gl.vertexAttribPointer( attributes[ "morphTarget" + m ], 3, _gl.FLOAT, false, 0, 0 );
if ( material.morphNormals ) {
...
...
@@ -3834,6 +3844,7 @@ THREE.WebGLRenderer = function ( parameters ) {
_gl.vertexAttribPointer( attributes[ "morphNormal" + m ], 3, _gl.FLOAT, false, 0, 0 );
}
*/
object
.
__webglMorphTargetInfluences
[
m
]
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录