@@ -20,11 +20,7 @@ import {
2020 scale ,
2121 transition ,
2222} from './propTypes' ;
23- import {
24- processColor ,
25- processColorInMaterial ,
26- processMaterialPropertyContents ,
27- } from './parseMaterial' ;
23+ import { processColor , processMaterialPropertyContents } from './parseMaterial' ;
2824import generateId from './generateId' ;
2925
3026const { ARGeosManager } = NativeModules ;
@@ -73,11 +69,11 @@ export default (mountConfig, propTypes = {}, nonUpdateablePropKeys = []) => {
7369 // any custom props (material, shape, ...)
7470 const nonNodePropKeys = keys ( propTypes ) ;
7571
76- const processColors = props => {
72+ const parseMaterials = props => {
7773 const material = props . material || { } ;
7874
7975 if ( props . color ) {
80- material . color = props . color ;
76+ material . diffuse = { ... material . diffuse , color : props . color } ;
8177 }
8278
8379 return {
@@ -93,7 +89,7 @@ export default (mountConfig, propTypes = {}, nonUpdateablePropKeys = []) => {
9389
9490 const getNonNodeProps = props => ( {
9591 ...pick ( props , nonNodePropKeys ) ,
96- ...processColors ( props ) ,
92+ ...parseMaterials ( props ) ,
9793 } ) ;
9894
9995 const mountFunc =
@@ -169,7 +165,7 @@ export default (mountConfig, propTypes = {}, nonUpdateablePropKeys = []) => {
169165 ...this . props . transition ,
170166 ...props . transition ,
171167 } ,
172- ...processColors ( pick ( props , changedKeys ) ) ,
168+ ...parseMaterials ( pick ( props , changedKeys ) ) ,
173169 } ;
174170
175171 if ( DEBUG ) console . log ( 'update node' , propsToupdate ) ;
0 commit comments