提交 7e004257 编写于 作者: M Mr.doob

Object3D: Added isVisible().

上级 45edcc2e
......@@ -500,6 +500,12 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
}(),
isVisible: function ( camera ) {
return this.visible;
},
raycast: function () {},
traverse: function ( callback ) {
......
......@@ -1228,7 +1228,7 @@ function WebGLRenderer( parameters ) {
function projectObject( object, camera, sortObjects ) {
if ( ! object.visible ) return;
if ( ! object.isVisible( camera ) ) return;
var visible = object.layers.test( camera.layers );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册