Giter Site home page Giter Site logo

alphastaxllc / worldwebview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from realxtend/worldwebview

0.0 3.0 0.0 184 KB

An interactive browser view UI to 3d virtual worlds that support rendering images on the server

JavaScript 48.05% CSS 5.67% HTML 46.27%

worldwebview's Introduction

There is no live demo for this currently, sorry. Hopefully we'll get one up soon again!

Installation instructions

HTTP Rendering server

Current default backend is realXtend Tundra 2.

To use with that, you need Tundra with Python support (default on Linux, requires working with an own build on Mac and Windows currently).

Pull the feature branch from: https://github.com/therauli/tundra/blob/httpserver/

(it includes a little Quat setting py api support func in c++ so recompile is needed it also has a "custom" screencapturing function used in panorama viewer -- otherwise is just two py files that only depend on the py stdlib)

For server config, copy the template file: https://github.com/therauli/tundra/blob/httpserver/bin/pyplugins/httpserver/config.py.template

.. to config.py in the same dir, and edit the img url and path (how exactly is explain below in 'web server for images')

That branch has the server plugin enabled by default, in plugins.xml, which is always loaded:

<pyplugin path="httpserver/tundrahttphandler.py" />  <!-- to create image frames, render server -->

If you want to enable the server only conditionally (for example for servers only and not for clients too), put that line to a different tundra plugin xml (e.g. a separate httpserver.xml one -- you can load many from the cmdline at startup).

The web clients

WorldWebViewer


Get a copy of worldwebview.html from here, for example by cloning this repository.

To avoid cross-site scripting security sandbox trouble, that html with the client code is delivered from the rendering server's (tundra2) http server. By default, the Tundra http handler expects to find 'worldwebview.html' in ../../worldwebview/.

So to make the default config work, just have your Tundra git clone and WorldWebView git clone side by side in the same directory. (so from tundra/bin/, ../../worldwebview/ is found). Or just edit the py server on this line and load the html from where you want: clienthtml = open("../../worldwebview/worldwebview.html")

By default, the web client connects to a local tundra server: (in https://github.com/realXtend/worldwebview/blob/master/worldwebview.html#L24)

var screenshot_server = "http://127.0.0.1:8886/renderimg";

Change that to your public Internet address to make it work on the net.

WorldPanoramaViewer


Get a copy of worldpanoramaview.html and three.js r52 should work you can get three.js from http://mrdoob.github.com/three.js/)

By default the web client will try connect some test server in a local network :) Change the line https://github.com/realXtend/worldwebview/blob/master/worldpanoramaview.html#L69 to your servers address (unlike in worldwebview don't add the renderimg/ or anything)

Web server for images

The images are not transferred from Tundra's http server, not from Tundra's process at all, but with a separate http server. This is to minimize the load on Tundra, and allow for normal production quality web server use and scalability tricks for the image transfers.

So you must have a web server for static files available. The HTTP render handlers in the Tundra plugin copies / moves the images taken to there. The resulting baseurl for the images, and the directory where they are on the server, are configured in the config.py that you should create based on the config.py.template

The defaults in the template are on unix-like systems where e.g. apache is serving /var/www/ .

If you want to use a separate machine as the web server, you need some way to get the pics over there, and make the http handling py code do that.

Other backends

Tundra 0.x - 1.x

This client was originally developed against Naali 0.x, which became Tundra 1.x, where the http serving counterpart was bundled by default. But AFAIK no one uses Tundra 1 anymore so that is not documented here now.

Opensimulator with Warp3D software rendering

Back 1-2 years ago I also added server side rendering support with http controls to Opensimulator, and Nebadon and Melanie tested using this same web client to their Opensim servers. It worked ok and was sure fun enough, but the Warp3D SW rendering module there had severe memory leaks (was originally made for one-time map rendering, not many subsequent calls like with this) -- I didn't go into fixing those. If someone is interested, is still well possible to use this there too (and the mem leak in the rendering seemed ease to fix with some restructuring of the code).

Do get in touch if you wish to use this against Opensimulator or some other backend! The more the merrier, and the http API is simple to implement and have compatible (the server just needs to answer http gets with cam coords as args, and return the url to the resulting image). Wonderland, Sirikata -- interested?

worldwebview's People

Contributors

antont avatar

Watchers

Steven avatar James Cloos avatar Josh Garrett avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.