We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30776bb commit 27f2f4eCopy full SHA for 27f2f4e
examples/jsm/loaders/usd/USDComposer.js
@@ -856,6 +856,35 @@ class USDComposer {
856
857
}
858
859
+ // Apply displayOpacity for transparency
860
+ const displayOpacity = attrs[ 'primvars:displayOpacity' ];
861
+ if ( displayOpacity && displayOpacity.length >= 1 ) {
862
+
863
+ const opacity = displayOpacity[ 0 ];
864
865
+ const applyDisplayOpacity = ( mat ) => {
866
867
+ if ( opacity < 1 ) {
868
869
+ mat.opacity = opacity;
870
+ mat.transparent = true;
871
872
+ }
873
874
+ };
875
876
+ if ( Array.isArray( material ) ) {
877
878
+ material.forEach( applyDisplayOpacity );
879
880
+ } else {
881
882
+ applyDisplayOpacity( material );
883
884
885
886
887
888
let mesh;
889
890
if ( hasSkinning ) {
0 commit comments