javascript - How to change the color in a final object3d with properties THREE.SceneUtils.createMultiMaterialObject? -


i have object combined color , wireframe. want change color base , color mesh material in final object. use meshbasicmaterial multimaterialobject.

if @ source three.sceneutils.createmultimaterialobject see creates multi-material effect creating child meshes of parent object.

use following pattern change material colors:

var object = three.sceneutils.createmultimaterialobject( geometry, materials ); ... object.children[ 0 ].material.color.set( 0xff0000 ); object.children[ 1 ].material.color.set( 0x00ff00 ); 

see three.color source code or docs acceptable formats setting colors.

three.js r.77


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -