Transparent background android viewer #3671
-
Hi! I am trying to render a 3d object on a model-viewer on Android Studio with Kotlin, it works fine but it shows a white background that I want to remove. Do you know how can i do it? Thanks in advance! The code of the modelViewer.html: Code of loadModel function: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
MV itself does render transparent; I'd guess your webview is putting in the default white background that most browsers do. I don't know much about Android development, but hopefully the webview has some configuration for that background, or for enabling alpha. |
Beta Was this translation helpful? Give feedback.
-
Solved, thanks @elalish , i didn't know that MV does render transparent itself so i started taking a look to webviewer and not to ModelViewer, i had to set transparent color putting on my LoginActivity.kt this line: |
Beta Was this translation helpful? Give feedback.
Solved, thanks @elalish , i didn't know that MV does render transparent itself so i started taking a look to webviewer and not to ModelViewer, i had to set transparent color putting on my LoginActivity.kt this line:
webview.setBackgroundColor(Color.TRANSPARENT)