@@ -223,7 +223,8 @@ - (void)addModel:(NSDictionary *)property {
223223- (void )addImage : (NSDictionary *)property {}
224224
225225- (SCNMaterial *)materialFromProperty : (NSDictionary *)property {
226- SCNMaterial *material = [SCNMaterial new ];
226+ SCNMaterial *scnMaterial = [SCNMaterial new ];
227+
227228 NSDictionary * material = property[@" material" ];
228229
229230 if (material[@" color" ]) {
@@ -232,21 +233,21 @@ - (SCNMaterial *)materialFromProperty:(NSDictionary *)property {
232233 CGFloat b = [material[@" color" ][@" b" ] floatValue ];
233234 CGFloat alpha = [material[@" color" ][@" alpha" ] floatValue ];
234235 UIColor *color = [[UIColor alloc ] initWithRed: r green: g blue: b alpha: alpha];
235- material .diffuse .contents = color;
236+ scnMaterial .diffuse .contents = color;
236237 } else {
237- material .diffuse .contents = [UIColor whiteColor ];
238+ scnMaterial .diffuse .contents = [UIColor whiteColor ];
238239 }
239240
240241 if (material[@" metalness" ]) {
241- material .lightingModelName = SCNLightingModelPhysicallyBased;
242- material .metalness .contents = @([material[@" metalness" ] floatValue ]);
242+ scnMaterial .lightingModelName = SCNLightingModelPhysicallyBased;
243+ scnMaterial .metalness .contents = @([material[@" metalness" ] floatValue ]);
243244 }
244245 if (material[@" roughness" ]) {
245- material .lightingModelName = SCNLightingModelPhysicallyBased;
246- material .roughness .contents = @([material[@" roughness" ] floatValue ]);
246+ scnMaterial .lightingModelName = SCNLightingModelPhysicallyBased;
247+ scnMaterial .roughness .contents = @([material[@" roughness" ] floatValue ]);
247248 }
248249
249- return material ;
250+ return scnMaterial ;
250251}
251252
252253@end
0 commit comments