未验证 提交 85978c16 编写于 作者: M Mr.doob 提交者: GitHub

Layers: Clean up.

上级 87f983d6
......@@ -22,33 +22,33 @@ Object.assign( Layers.prototype, {
},
toggle: function ( channel ) {
enableAll: function () {
this.mask ^= 1 << channel | 0;
this.mask = 0xffffffff | 0;
},
disable: function ( channel ) {
toggle: function ( channel ) {
this.mask &= ~ ( 1 << channel | 0 );
this.mask ^= 1 << channel | 0;
},
test: function ( layers ) {
disable: function ( channel ) {
return ( this.mask & layers.mask ) !== 0;
this.mask &= ~ ( 1 << channel | 0 );
},
enableAll: function () {
disableAll: function () {
this.mask = 0xffffffff | 0;
this.mask = 0;
},
disableAll: function () {
test: function ( layers ) {
this.mask = 0;
return ( this.mask & layers.mask ) !== 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册