2
0
Эх сурвалжийг харах

Added style strings support THREE.Color.

So far these work:
new THREE.Color( 'rgb(255,0,0)' );
new THREE.Color( 'purple' );
new THREE.Color( 0xff0000 );
Mr.doob 12 жил өмнө
parent
commit
95b17a53c8

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 41 - 7
src/core/Color.js


+ 2 - 2
src/materials/Material.js

@@ -62,9 +62,9 @@ THREE.Material.prototype.setValues = function ( values ) {
 
 				currentValue.copy( newValue );
 
-			} else if ( currentValue instanceof THREE.Color && typeof( newValue ) === "number" ) {
+			} else if ( currentValue instanceof THREE.Color ) {
 
-				currentValue.setHex( newValue );
+				currentValue.set( newValue );
 
 			} else if ( currentValue instanceof THREE.Vector3 && newValue instanceof THREE.Vector3 ) {
 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно