Skip to content

Commit 6b7068a

Browse files
committed
default model scale to 1
1 parent b70689d commit 6b7068a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ios/components/ARModelManager.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ @implementation ARModelManager
2222
// we need to do the model loading in its own queue, otherwise it can block, so that react-to-native-calls get out of order
2323
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
2424
NSDictionary *model = property[@"model"];
25-
CGFloat scale = [model[@"scale"] floatValue];
25+
CGFloat scale = 1;
26+
if(model[@"scale"]) {
27+
// deprecated
28+
scale = [model[@"scale"] floatValue];
29+
}
2630

2731
NSString *path = [NSString stringWithFormat:@"%@", model[@"file"]];
2832
//NSLog(@"mounting model: %@ %@", node.name, path);

0 commit comments

Comments
 (0)