Annotations

29 April 2015 00:32
I was playing around with the Annotations feature. I realized this only works if I export the blender file as HTML. If I export it just as a json file and load it using my custom environment nothing shows up. Am I not turning on a required setting? Also is there a direct API for the 'Empty' object to dynamically control the Annotation? If so, I wasn't able to find it. Thanks for this feature. If I can figure out how to control it a bit more I believe I can create some really neat things with it.
29 April 2015 10:24
Hi,

Everything that is possible in html should be achievable in json. Anchors are not an exception.
We have a code snippet for them in the free SDK. You can find it under "apps_dev/code_snippets_dev.html". One of these demos is using "scripts/custom_anchors.js" from this folder. Check it and report if you will succeed, please.

Also is there a direct API for the 'Empty' object to dynamically control the Annotation?
If you just want to translate an annotation with an API, you can do it with the transform.set_translation() method. The only thing you need to do is to enable the "Force Dynamic Object" flag on the Empty object. (This will disable static optimizations for it and will allow movement)
29 April 2015 17:33
Thanks for the direction. Yesterday I wasn't able to get the Code Snippets document running correctly. This morning, however, it's running with no problem. I'll take a look later today. Thanks again.
29 April 2015 18:57
I noticed when I "required" the anchors API, the anchor shows up. I cannot see it though, for some reason it is sitting behind the 3Dcanvas. So both the anchor and my frame rate are hidden. I was able to find these elements via the inspect feature of Firefox. I will have to bring the z-index forward for those elements or move the canvas back.
29 April 2015 19:21
Ответ на сообщение пользователя Ryan Uttech
I noticed when I "required" the anchors API, the anchor shows up. I cannot see it though, for some reason it is sitting behind the 3Dcanvas. So both the anchor and my frame rate are hidden. I was able to find these elements via the inspect feature of Firefox. I will have to bring the z-index forward for those elements or move the canvas back.
You are correct. This is the only solution for now. The programmer is fully responsible for the drawing order of html elements (which the anchors are). In future releases we are planning to automate z-indexes assignment. So the things will become easier.
 
Please register or log in to leave a reply.