I’m trying to load Three.js in Android 14 (API 34) but the canvas of every demo I tried so far is black and there is no error in the logs (the webpage itself loads).
Does anyone know of any solution?
@Composable
fun WebViewExample() {
val url = "https://threejs.org/examples/webgl_camera.html"
Column(
modifier = Modifier.fillMaxSize()
) {
AndroidView(
factory = { context ->
WebView(context).apply {
webViewClient = WebViewClient()
}
},
update = { webView ->
if (webView.url != url) {
webView.loadUrl(url)
}
},
modifier = Modifier.fillMaxSize()
)
}
}