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!
Tribal One: Darren Arrives
So, time for clip two in the Tribal One concepts series;
This video clip shows how a user arrives on a public island (islands created on demand, as users crowd them) - bringing with him his "garden" which is a 'viewport' (a web-based parcel-on demand which exists only as long as the user is online) and how the 'viewport' content is restored and the terrain smoothed out to accomodate it.
Points of interest:
- The white line demarks the "garden" - anyhing placed within it is private and will move with the garden as it's taken down and re-created on next login. Anything placed outside will be stored together with the island, as that too is taken down and re-created.
- The garden terrain is smoothed with the surrounding terrain.
- The garden is a 3D "viewport", defined by a cube and a web url pointing to either an (read-only) xml document, or to a REST service that manages updates within that cube. In this case, we implemented a generic "Viewport Content Storage" that would serve and manage content nodes over the web.
Tribal One: Entering
I've promised a few people to show you what we've done with integrating web and 3D. It's a good example of what can be done with OpenSim as it's so modular.
This video clip shows how a facebook user checks a friend out, and decides to enter Tribal One.
Points of interest:
- The 'Friends' list on the facebook app page shows "join" and/or "visit" depending on whether that friend is online in the world. "join" places your avatar next to your friend. "visit" lets you visit that friends on-demand home region.
- When the user presses "Enter Tribal Net" a client is launched, and the user is seamlessly logged-thru into Tribal Net.
- The avatar information is taken from Facebook.
- The left and top panel is web content - the left panel is the web hybrid mini-browser, initially contains Tribal One-aware facebook applications and your facebook web profile/friends and photos.
- The 'Gazebo' next to the avatar is content placed on it's 'garden', a parcel-on-demand that only exists while the user is in-world.
- When an island is full of "gardens", another island is created "on demand".