提交 e51495a5 编写于 作者: S Sergey Linev

Support BufferGeometry in THREE.Points

上级 d3decdea
...@@ -776,6 +776,25 @@ THREE.Projector = function () { ...@@ -776,6 +776,25 @@ THREE.Projector = function () {
} }
} else if ( geometry instanceof THREE.BufferGeometry ) {
var attributes = geometry.attributes;
if ( attributes.position !== undefined ) {
var positions = attributes.position.array;
for ( var i = 0, l = positions.length; i < l; i += 3 ) {
_vector4.set( positions[ i ], positions[ i + 1 ], positions[ i + 2 ], 1 );
_vector4.applyMatrix4( _modelViewProjectionMatrix );
pushPoint( _vector4, object, camera );
}
}
} }
} else if ( object instanceof THREE.Sprite ) { } else if ( object instanceof THREE.Sprite ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册