File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 castsShadow ,
1313 categoryBitMask ,
1414 eulerAngles ,
15+ opacity ,
1516 orientation ,
1617 position ,
1718 renderingOrder ,
@@ -42,6 +43,7 @@ const PROP_TYPES_NODE = {
4243 categoryBitMask,
4344 castsShadow,
4445 renderingOrder,
46+ opacity,
4547} ;
4648
4749const NODE_PROPS = keys ( PROP_TYPES_NODE ) ;
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ export const shadowMode = PropTypes.oneOf(values(ARKitManager.ShadowMode));
5858export const colorBufferWriteMask = PropTypes . oneOf (
5959 values ( ARKitManager . ColorMask ) ,
6060) ;
61+
62+ export const opacity = PropTypes . number ;
63+
6164export const material = PropTypes . shape ( {
6265 color,
6366 metalness : PropTypes . number ,
@@ -69,5 +72,6 @@ export const material = PropTypes.shape({
6972 colorBufferWriteMask,
7073 doubleSided : PropTypes . bool ,
7174 litPerPixel : PropTypes . bool ,
75+ transparency : PropTypes . number ,
7276 fillMode,
7377} ) ;
Original file line number Diff line number Diff line change @@ -323,6 +323,9 @@ + (void)setMaterialProperties:(SCNMaterial *)material properties:(id)json {
323323 if (json[@" diffuse" ]) {
324324 material.diffuse .contents = [self UIColor: json[@" diffuse" ]];
325325 }
326+ if (json[@" transparency" ]) {
327+ material.transparency = [json[@" transparency" ] floatValue ];
328+ }
326329
327330 if (json[@" metalness" ]) {
328331 material.lightingModelName = SCNLightingModelPhysicallyBased;
@@ -353,6 +356,7 @@ + (void)setMaterialProperties:(SCNMaterial *)material properties:(id)json {
353356 material.doubleSided = [json[@" doubleSided" ] boolValue ];
354357 }
355358
359+
356360 if (json[@" litPerPixel" ]) {
357361 material.litPerPixel = [json[@" litPerPixel" ] boolValue ];
358362 }
@@ -401,6 +405,10 @@ + (void)setNodeProperties:(SCNNode *)node properties:(id)json {
401405 if (json[@" rotation" ]) {
402406 node.rotation = [self SCNVector4: json[@" rotation" ]];
403407 }
408+
409+ if (json[@" opacity" ]) {
410+ node.opacity = [json[@" opacity" ] floatValue ];
411+ }
404412}
405413
406414
You can’t perform that action at this time.
0 commit comments