From d402d8200b3a72ad94d790daaefa324a2dff1dc0 Mon Sep 17 00:00:00 2001 From: Andrew Rahn Date: Sat, 6 Jul 2019 10:22:50 -0500 Subject: [PATCH] Add support for emission and transparent material properties --- ios/RCTConvert+ARKit.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ios/RCTConvert+ARKit.m b/ios/RCTConvert+ARKit.m index 16c1f133..9e39756c 100644 --- a/ios/RCTConvert+ARKit.m +++ b/ios/RCTConvert+ARKit.m @@ -405,10 +405,18 @@ + (void)setMaterialProperties:(SCNMaterial *)material properties:(id)json { [self setMaterialPropertyContents:json[@"displacement"] material:material.displacement]; } + if (json[@"emission"]) { + [self setMaterialPropertyContents:json[@"emission"] material:material.emission]; + } + if (json[@"specular"]) { [self setMaterialPropertyContents:json[@"specular"] material:material.specular]; } + if (json[@"transparent"]) { + [self setMaterialPropertyContents:json[@"transparent"] material:material.transparent]; + } + if (json[@"transparency"]) { material.transparency = [json[@"transparency"] floatValue]; }