This repository has been archived by the owner on Jul 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 604
Replace ViewRenderable #1064
Comments
Well, what I found so far. The ViewRenderable for the type if I change
to
Or introduce a fourth ViewRenerable, the points in between behave normal, getting the new ViewRenderable and don't flicker. So whatever ViewRenderable is attached the first time, can't be reattached. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to update the ViewRenderable of a Node.
For that usecase I build a Map with all my ViewRenderables I want to attach to a Node. Actually the ViewRenderables are not stored directly into the Map but as a CompletableFuture Object.
In my application I can place Nodes on the Scene. I also store them into a List to keep track of the amount of Nodes I have already placed. Based on the position of the Node in the List I want to change the ViewRenderbale.
The check is done on every onUpdate(Frame frame) call. Sure I only want to replace the Renderable once, for that I have a check if a Renderable was already replaced.
The function to replace the ViewRenderable on a Node looks like this
I'm not sure about the getNode().setRenderable(null); part.
and the decission is made by this simple loop
The result ist very Inconsistent. The first and the last point is rendered as expected, but the points in between have the complete variety of ViewRenderables attached to them. They flicker. The following is shown:
And flickering happens if I move the smartphone.
Maybe someone could explain to me the propper way to replace a Renderable, because I'm lost.
Sceneform-Version: 1.15.0
The text was updated successfully, but these errors were encountered: