File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ const ARPlane = createArComponent('addPlane', {
1313 shape : PropTypes . shape ( {
1414 width : PropTypes . number ,
1515 height : PropTypes . number ,
16+ cornerRadius : PropTypes . number ,
17+ cornerSegmentCount : PropTypes . number ,
18+ widthSegmentCount : PropTypes . number ,
19+ heightSegmentCount : PropTypes . number ,
1620 } ) ,
1721} ) ;
1822
Original file line number Diff line number Diff line change @@ -149,7 +149,18 @@ + (SCNPlane *)SCNPlane:(id)json {
149149 CGFloat width = [shape[@" width" ] floatValue ];
150150 CGFloat height = [shape[@" height" ] floatValue ];
151151 SCNPlane *geometry = [SCNPlane planeWithWidth: width height: height];
152-
152+ if (shape[@" cornerRadius" ]) {
153+ geometry.cornerRadius = [shape[@" cornerRadius" ] floatValue ];
154+ }
155+ if (shape[@" cornerSegmentCount" ]) {
156+ geometry.cornerSegmentCount = [shape[@" cornerSegmentCount" ] intValue ];
157+ }
158+ if (shape[@" widthSegmentCount" ]) {
159+ geometry.widthSegmentCount = [shape[@" widthSegmentCount" ] intValue ];
160+ }
161+ if (shape[@" heightSegmentCount" ]) {
162+ geometry.heightSegmentCount = [shape[@" heightSegmentCount" ] intValue ];
163+ }
153164 SCNMaterial *material = [self SCNMaterial: json[@" material" ]];
154165 material.doubleSided = YES ;
155166 geometry.materials = @[material];
You can’t perform that action at this time.
0 commit comments