Closed dortizesquivel closed 7 years ago
Hi @dortizesquivel - yes there's an issue with the remove() call. Until this is fixed we'd recommend using visibility to just hide any projections you want gone.
awe.projections.update({ data:{ visible:true }, where: { id:"top_label" } })
Also note that you don't need the second object parameter for the delete function (when it's fixed).
Hi Robman, thank you very much, I will give a try to the visibility.
The reason why I wanted to remove the projection is because I didn't manage to update the projection's text. In my POC I'm polling an HTTP service which return a simple string every 5 seconds. I would like to show this string in my projection. I'm using a geometry with the shape 'text', I managed to update its position, material etc but not the actual text. By any chance do you know if it is possible to update the text?
You'll need to make your text projection visible:false and then add a new one. Then do the same again when really new text is returned from your http service. This will end up creating a lot of invisible projections - but it should be able to handle 10's or even hundreds of these before you notice any performance issues. This is just a temporary work around until the delete() function is restored. Also see the notes about visibility in https://github.com/buildar/awe.js/issues/8#issuecomment-123255086 - if you call delete() and it fails silently, then it seems the visible:false updates will fail on some objects.
Hi @dortizesquivel please checkout our updated repos at https://github.com/awe-media/awe.js which had a major refactor including how this is handled. Checkout the docs in the wiki and please raise an issue there if you find anything that doesn't work.
Hi guys, thanks for sharing this library it is awesome. I have been working in a little POC and I found I can not remove a projection once it is added to a POI. So basically the steps to replicate this issue are:
1 - Create a point of interest like this:
2 - Add a projection
3 - Then once the scene is rendered in a timeout I try to remove the projection
I can see how the projection object has been removed from the awe.projections collection, but when the scene is rendered again it still contains the projection.