{"version":"1.0","type":"rich","title":"Pinning all PDFs present in a Mozilla Hubs scene","description":"This example demonstrates a script that pins every PDF present in a Mozilla Hubs scene. It shows how to programmatically iterate over all scene elements tagged with the `media-pdf` attribute and set them as pinned, making them static in the 3D environment. The code uses the A-Frame API to query the scene (`AFRAME.scenes[0].querySelectorAll`) and the Networked-Aframe (NAF) library to access and manage ownership of each entity via `NAF.utils.getNetworkedEntity`, `NAF.utils.isMine`, and `NAF.utils.takeOwnership`. Finally, it applies the `pinnable` component’s `pinned` attribute to lock each PDF in place.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-ec899c4cef2f3710a3c86f1b1ab8d5e6?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}