Browse Source

Layers: Fix set() (#22867)

Related issue: #22817
Description:
After calling `set(31)`, the value of mask will be updated to 2147483648 instead of -2147483648
Matrix 3 years ago
parent
commit
bf9f2eceb8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/Layers.js

+ 1 - 1
src/core/Layers.js

@@ -8,7 +8,7 @@ class Layers {
 
 	set( channel ) {
 
-		this.mask = 1 << channel | 0;
+		this.mask = ( 1 << channel | 0 ) >>> 0;
 
 	}