-
Hello,
If you have a code sample feel free to share it here, thank you |
Beta Was this translation helpful? Give feedback.
Answered by
RGregat
Jun 11, 2024
Replies: 2 comments
-
As a workaround you can use a Image-Loading Library. For example Glide App-Gradle
private fun addImageNode(anchor: Anchor) {
Glide
.with(this)
.asBitmap()
.load("https://upload.wikimedia.org/wikipedia/commons/0/01/Cat-1044750.jpg")
.fitCenter()
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
.apply(RequestOptions.timeoutOf(5 * 60 * 1000))
.into(object : CustomTarget<Bitmap>(){
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
val imageNode = ImageNode(
materialLoader = sceneView.materialLoader,
bitmap = resource
)
val anchorNode = AnchorNode(sceneView.engine, anchor)
anchorNode.addChildNode(imageNode)
sceneView.addChildNode(anchorNode)
}
override fun onLoadCleared(placeholder: Drawable?) {
}
})
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ThomasGorisse
-
Thanks, this helped |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a workaround you can use a Image-Loading Library. For example Glide
App-Gradle