提交 5d892789 编写于 作者: S Sébastien Valette 提交者: Mr.doob

allow THREE.Box3 as an input of Boxhelper (#8609)

This helps when when the bounding box is not computed from an object, but comes from elsewhere
上级 f22472f3
......@@ -30,7 +30,15 @@ THREE.BoxHelper.prototype.update = ( function () {
return function ( object ) {
box.setFromObject( object );
if ( object instanceof THREE.Box3 ) {
box.copy( object );
} else {
box.setFromObject( object );
}
if ( box.isEmpty() ) return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册