12Aug/080
Tribal One: Picture Frame Web App
Now for the third video showing an example of the Tribal Server Web API and how you can create custom applications with it - in this case a simple Facebook Picture Frame for Tribal One.
This Video Clip shows the user 'entering' his own home region (which is created on demand as he does it) and clicks on a picture frame to set what pictures are shown; then adds another and finally re-arranges the frames .
Points of interest:
- User Data is fetched thru the "Community Provider", the simple interface that you need to implement to enable the region to pull data from your community or intranet.
- When the user clicks on the picture frame, the viewport action 'OnOwnerClick' is invoked, setting the hybrid web page to the 3D-aware 'choose facebook photo' application web page - in this case, an aspx page.
- The photo album data and photos is fetched from facebook.
- When the photo is clicked, the web application posts an "UpdateTexture" xml message to the Tribal Server, setting the photo frame texture of that object. The UpdateTexture command takes an object, surface and an web image url, which is internally converted to an SL texture.
- When the user pulls a frame from the inventory onto the wall, he's really pulling a command object, with a URL pointing to the web application that will create the picture frame for that exact user, with the configured image, frame type and OnOwnerClick/OnNotOwnerClick actions.
- The pictureframes are viewports, and therefore 'snap' to compatible surfaces; every 'viewport' has a set of 'ranges' on which objects of compatible types 'snap' to with an 'orientation' - so books could snap into a bookshelf, for example, and cutlery to the surface of a table. Even if it's not showed in the clip, the frames snap to all walls and flip thru corners. Quite neat!