Преглед изворни кода

Color.getHex() de-obfuscated.
Is not used so much anymore so we can have it with a less obfuscating syntax.

Mr.doob пре 14 година
родитељ
комит
8749fe04db
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/core/Color.js

+ 1 - 1
src/core/Color.js

@@ -106,7 +106,7 @@ THREE.Color.prototype = {
 
 
 	getHex: function () {
 	getHex: function () {
 
 
-		return ~~ ( this.r * 255 ) << 16 ^ ~~ ( this.g * 255 ) << 8 ^ ~~ ( this.b * 255 );
+		return Math.floor( this.r * 255 ) << 16 ^ Math.floor( this.g * 255 ) << 8 ^ Math.floor( this.b * 255 );
 
 
 	},
 	},
 
 

粤ICP备19079148号