Cobweb is a work in progress. The goal is a full standard WebGL X3D browser for all major web browsers.
For more information and live preview please visit http://titania.create3000.de/cobweb/.
To display your X3D scene in a HTML5 page first save your scene as X3D XML Encoded file or as X3D Classic Encoded file, i.e. create a file with the extension .x3d ,.x3dv or .wrl.
The HTML5 page is quite easy to create, the HTML5 code below shows you the minimum requirements. The path to the X3D scene is specified in the src attribute of the
Note: it is important to use a HTML5 page and to save it as .html file.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/create3000/cobweb/master/stable/2/2.1/cobweb.css"/>
<script type="text/javascript" src="https://cdn.rawgit.com/create3000/cobweb/master/stable/2/2.1/cobweb.min.js"></script>
<style>
X3DCanvas {
width: 768px;
height: 432px;
}
</style>
</head>
<body>
<X3DCanvas src="https://github.com/Sgeo/cobweb/raw/master/path/to/your/X3D/world.x3d">
<p>Your browser may not support all features required by Cobweb!</p>
</X3DCanvas>
</body>
</html>
To get Cobweb working you must include the CSS file »cobweb.css« and the JavaScript file »cobweb.min.js «. After cobweb is successfully loaded a new HTML tag
You can style the
As of version 1.19, Cobweb can now parse either X3D XML Encoding or X3D Classic Encoding. This gives authors the capability to display their existing projects like .wrl worlds, too.
Additionally files can be compressed using GZip compression.
The
Providing fallback content is very straightforward: just insert the alternate content inside the
For example, we could provide a text description of the X3D element or provide a static image of the dynamically rendered content. This can look something like this:
<X3DCanvas src="https://github.com/Sgeo/cobweb/raw/master/world.x3d">
<p>Current stock price: $3.15 +0.15</p>
</X3DCanvas>
<X3DCanvas src="https://github.com/Sgeo/cobweb/raw/master/world.x3dv">
<img src="https://github.com/Sgeo/cobweb/raw/master/images/clock.png"/>
</X3DCanvas>
The HTML
A String value with the URL that should be loaded on page load. If no URL is specified or the src field is empty an empty scene is displayed.
A Boolean value (true or false) to indicate whether files transferred over the internet should be cached on the local computer. The default value for the cache attribute is true. It works by appending "_={timestamp}" to the GET parameters of every request. Example
<X3DCanvas cache="true" src="https://github.com/Sgeo/cobweb/raw/master/path/to/your/X3D/world.x3d"></X3DCanvas>
Programmers who want to work on Cobweb shall first read the Style Guide.
All authors contributed to this project can be found in the list of authors.
Cobweb is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 only, as published by the Free Software Foundation.