Ver código fonte

Layers: Clean up.

Mr.doob 6 anos atrás
pai
commit
85978c168b
1 arquivos alterados com 10 adições e 10 exclusões
  1. 10 10
      src/core/Layers.js

+ 10 - 10
src/core/Layers.js

@@ -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;
 
 	}