|
185 | 185 |
|
186 | 186 | } ); |
187 | 187 |
|
188 | | - var REVISION = '104dev'; |
| 188 | + var REVISION = '104'; |
189 | 189 | var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 }; |
190 | 190 | var CullFaceNone = 0; |
191 | 191 | var CullFaceBack = 1; |
|
12044 | 12044 | var attribute2 = geometry.attributes[ key ]; |
12045 | 12045 | var attributeArray2 = attribute2.array; |
12046 | 12046 |
|
12047 | | - var attributeSize = attribute2.itemSize; |
| 12047 | + var attributeOffset = attribute2.itemSize * offset; |
| 12048 | + var length = Math.min( attributeArray2.length, attributeArray1.length - attributeOffset ); |
12048 | 12049 |
|
12049 | | - for ( var i = 0, j = attributeSize * offset; i < attributeArray2.length; i ++, j ++ ) { |
| 12050 | + for ( var i = 0, j = attributeOffset; i < length; i ++, j ++ ) { |
12050 | 12051 |
|
12051 | 12052 | attributeArray1[ j ] = attributeArray2[ i ]; |
12052 | 12053 |
|
|
24560 | 24561 |
|
24561 | 24562 | } else if ( material.isShadowMaterial ) { |
24562 | 24563 |
|
24563 | | - m_uniforms.color.value = material.color; |
| 24564 | + m_uniforms.color.value.copy( material.color ); |
24564 | 24565 | m_uniforms.opacity.value = material.opacity; |
24565 | 24566 |
|
24566 | 24567 | } |
|
24606 | 24607 |
|
24607 | 24608 | if ( material.color ) { |
24608 | 24609 |
|
24609 | | - uniforms.diffuse.value = material.color; |
| 24610 | + uniforms.diffuse.value.copy( material.color ); |
24610 | 24611 |
|
24611 | 24612 | } |
24612 | 24613 |
|
|
24736 | 24737 |
|
24737 | 24738 | function refreshUniformsLine( uniforms, material ) { |
24738 | 24739 |
|
24739 | | - uniforms.diffuse.value = material.color; |
| 24740 | + uniforms.diffuse.value.copy( material.color ); |
24740 | 24741 | uniforms.opacity.value = material.opacity; |
24741 | 24742 |
|
24742 | 24743 | } |
|
24751 | 24752 |
|
24752 | 24753 | function refreshUniformsPoints( uniforms, material ) { |
24753 | 24754 |
|
24754 | | - uniforms.diffuse.value = material.color; |
| 24755 | + uniforms.diffuse.value.copy( material.color ); |
24755 | 24756 | uniforms.opacity.value = material.opacity; |
24756 | 24757 | uniforms.size.value = material.size * _pixelRatio; |
24757 | 24758 | uniforms.scale.value = _height * 0.5; |
|
24774 | 24775 |
|
24775 | 24776 | function refreshUniformsSprites( uniforms, material ) { |
24776 | 24777 |
|
24777 | | - uniforms.diffuse.value = material.color; |
| 24778 | + uniforms.diffuse.value.copy( material.color ); |
24778 | 24779 | uniforms.opacity.value = material.opacity; |
24779 | 24780 | uniforms.rotation.value = material.rotation; |
24780 | 24781 | uniforms.map.value = material.map; |
|
24795 | 24796 |
|
24796 | 24797 | function refreshUniformsFog( uniforms, fog ) { |
24797 | 24798 |
|
24798 | | - uniforms.fogColor.value = fog.color; |
| 24799 | + uniforms.fogColor.value.copy( fog.color ); |
24799 | 24800 |
|
24800 | 24801 | if ( fog.isFog ) { |
24801 | 24802 |
|
|
24822 | 24823 |
|
24823 | 24824 | function refreshUniformsPhong( uniforms, material ) { |
24824 | 24825 |
|
24825 | | - uniforms.specular.value = material.specular; |
| 24826 | + uniforms.specular.value.copy( material.specular ); |
24826 | 24827 | uniforms.shininess.value = Math.max( material.shininess, 1e-4 ); // to prevent pow( 0.0, 0.0 ) |
24827 | 24828 |
|
24828 | 24829 | if ( material.emissiveMap ) { |
|
0 commit comments