Future to the fantasy ★ ★
X3D Editor

Cobweb 3.2

WebGL X3D Browser

Something special, something more!


A full standard compliant VRML browser!

Donate to your favourite X3D Editor and Browser on PayPal!

Cobweb X3D Browser

Cobweb is a new X3D Browser engine entirely written in JavaScript and uses WebGL for 3D rendering. Authors can publish X3D source within an HTML5 page with Cobweb that works with Web browsers without prior plugin installation. This gives X3D authors the ability to displays content in 3D, using WebGL 3D graphics technology to display X3D content in several different browsers across several different operating systems. Cobweb supports shadows, custom shaders, clip planes, reflection mapping, script nodes, prototyping capabilities and event driven programming to provide you with an improved quality level of virtual effects and tools ready for the Internet.

Developer note: Now, Cobweb runs in fresh installs of Google Chrome, Chromium, Firefox, Microsoft Edge, Opera, and Safari. Cobweb uses functions from the new JavaScript 6 standard, this standard becomes more and more popular and is either now available on your desktop computer or on your modern smart-phone.


Developer Information

  • Supported browsers: Google Chrome, Chromium, Firefox, Microsoft Edge, Opera Browser, and Safari.
  • Right click to display the context menu.
  • Click into the X3D browser window to activate keyboard input.
  • Use Page Up and Page Down to navigate between viewpoints if any.
  • Errors are reported in the JavaScript Console of each browser.

X3D Examples Library

All examples are available at GitHub. They are not specially made for Cobweb but most of them are found on the Internet and are provided »as is«. Follow the instruction to download here.

Also have a look at the Web3D.org examples. Most of them are very simple and easy to understand. They are well documented and screenshots are available.

Download Cobweb

There is a ZIP archive available to locally install Cobweb on your server. Compressed and uncompressed copies of Cobweb files are available. The uncompressed file (cobweb.js) is best used during development or debugging; the compressed file (cobweb.min.js) saves bandwidth and improves performance in production.

Download Cobweb 3.2 ZIP archive

Using Cobweb with a CDN

CDNs can offer a performance benefit by hosting Cobweb on servers spread across the globe. This also offers an advantage that if the visitor to your webpage has already downloaded a copy of Cobweb from the same CDN, it won't have to be re-downloaded.

To use the Cobweb CDN, just reference the CSS and JavaScript file in the script tag directly from the GitHub CDN domain.


<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/create3000/cobweb/master/stable/3/3.2/cobweb.css"/>
<script type="text/javascript" src="https://cdn.rawgit.com/create3000/cobweb/master/stable/3/3.2/cobweb.min.js"></script>

Cobweb 3.2 Released

Leipzig, 29th April 2017: The X3DCanvas element becomes a major change in its CSS styles, it is now similar to the HTML5 canvas element a display inline-block element instead of block with a default width and height of 300x150 pixels. Additionally there are four new attributes splashScreen, notifications, timings, and contextMenu, these attribute are especially useful if the X3DCanvas element is very small. Have a look at »Attributes of the X3DCanvas Element« to see how these attributes work. Additionally we changed the data type mapping of SF/MFRotation in custom shaders from uniform vec4 quaternion representation to uniform mat3 3x3 rotation matrix representation, which are easier to operate with.

New Features and Bug Fixes

  • Changed default CSS style display of X3DCanvas element to inline-block.
  • Changed default width and height of X3DCanvas element to 300x150 pixels.
  • Added new X3DCanvas attributes splashScreen, notifications, timings, contextMenu.
  • Implemented JavaScript browser option SplashScreen.
  • Implemented SFColorRGBA.prototype.set/getHSVA.
  • Use uniform mat3 in custom shaders for SF/MFRotation fields.

Cobweb 3.1 Released

Leipzig, 13th April 2017: We finally released version 3.1 now. This release is a bug fix release and fixes a fatal bug with shader uniform handling. Thanks to Sgeo. Externprotos have now the missing loadNow function implemented, although this function is normally not needed.

Cobweb 3.0 Released

Leipzig, 12th April 2017: We finally released version 3.0 now. All fields derived from X3DArrayField have now two new functions »push« and »unshift« which operate like the corresponding JavaScript Array functions. All fields derived from X3DField have now a new function »equals« which makes it easy to compare two field values. The XMLParser was reworked and is now more secure and several issues are fixed. And last but not least we are proud to announce that prototypes do completely work now with XMTML DOM Integration.

New Shader Example »Mountains«

New Features and Bug Fixes

  • New shader uniform x3d_Viewport
  • Prototypes do completely work now with XHTML DOM Integration.
  • Implemented X3DArrayField push and unshift
  • Implemented X3DField equals
  • Reworked XMLParser
  • Fixed ScreenFontStyle text picking
  • Fixed issue with touch sensibility of Disk2D
  • Fixed an issue of X3DPrototypeInstance in toXMLString

Full History

Read more about Cobweb in the Release Notes.

Core Features

Cobweb is freely downloadable for any usage and licensed under the GPL3.

  • Cobweb works seamlessly together with Titania
  • Full VRML2 support, complete and standard compliant
  • High performance JavaScript rendering engine
  • Full VRML Script support
  • Advanced prototyping support
    • unlimited nested prototypes
    • multiple IS references
    • extern prototypes support
  • Advanced shading
    • specification conform Gouraud and Phong shading
    • support for eight simultaneous lights for each Shape node
    • Color node support
    • smooth texture mapping
    • autogenerated normals depending on creaseAngle value
  • Support for complex routing graphs
  • Unbreakable collision detection and terrain following support
  • Support for MovieTexture and Sound node
  • Support for Text and remote font files
  • Prepared for the rich set of standard X3D nodes,
  • and everything you dreamed of.

Embedding Cobweb within a Web Page

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 <X3DCanvas> tag.

Note: it is important to use a HTML5 page and to save it as .html or if you prefer XHTML as .xhtml file.

<!DOCTYPE html>
      <meta charset="utf-8"/>
      <link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/create3000/cobweb/master/stable/3/3.2/cobweb.css"/>
      <script type="text/javascript" src="https://cdn.rawgit.com/create3000/cobweb/master/stable/3/3.2/cobweb.min.js"></script>
X3DCanvas {
   width: 768px;
   height: 432px;

      <X3DCanvas src="path/to/your/X3D/world.x3d">
         <p>Your browser may not support all features required by Cobweb!</p>

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 <X3DCanvas> is available on your page.

You can style the <X3DCanvas> tag as every HTML tag with CSS as well as you can place it everywhere within the DOM tree.

Supported File Formats

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.

X3D EncodingFile ExtensionMIME Type
VRML.wrl, .wrzmodel/vrml
Classic VRML.x3dv, .x3dzmodel/x3d+vrml
XML.x3d, .x3dvz


For more information how to configure your web server see here.

Fallback Content

The <X3DCanvas> element is equal to the <canvas> element in that, it is easy to define some fallback content, to be displayed in older browsers not supporting it. You should always provide fallback content to be displayed by those browsers.

Providing fallback content is very straightforward: just insert the alternate content inside the <X3DCanvas> element. Browsers that don't support <X3DCanvas> will ignore the container and render the fallback content inside it. Browsers that do support <X3DCanvas> will ignore the content inside the container, and just render the canvas normally.

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="world.x3d">
   <p>Current stock price: $3.15 +0.15</p>

<X3DCanvas src="world.x3dv">
   <img src="images/clock.png"/>

Attributes of the X3DCanvas Tag

The HTML <X3DCanvas> tag defines the main content of the X3D document. The <X3DCanvas> tag has three attributes that define different behaviours. All of these attributes are optional.


A String value with the URL that should be loaded on page load. If no src attribute is specified or the src attribute is empty an empty scene is displayed.


A MFString value with urls that should be loaded on page load. If no url attribute is specified or the attribute is empty an empty scene is displayed. If both src and url attribute are specified the src attribute takes precedence.


A Boolean value (true or false) to indicate whether the splash screen should be displayed. The default value for the splashScreen attribute is true. The display of the splash screen can also be toggled via the browser option »SplashScreen« in JavaScript. Call Browser.setBrowserOption("SplashScreen", booleanValue) to toggle the display of the splash screen.


A Boolean value (true or false) to indicate whether the notification bubble should be displayed. The default value for the notifications attribute is true.


A Boolean value (true or false) to indicate whether the browser timings bubble should be displayed if the context menu option is enabled. The default value for the timings attribute is true. This attribute changes the facility if browsers timings can be displayed, if browser timings are really displayed is in the hand of the user if he toggles the context menu option to true.


A Boolean value (true or false) to indicate whether a context menu should be displayed on right click. The default value for the contextMenu attribute is true.


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.


<X3DCanvas cache="true" src="path/to/your/X3D/world.x3d"></X3DCanvas>

Keyboard Shortcuts

Before you can use the keyboard you must click into the X3D browser window to activate keyboard input.

  • Use Page Up and Page Down to navigate between viewpoints.
  • Use Ctrl + + to display some browser timings.
  • You can toggle the shading by pressing Ctrl + [1-5]
    1. Pointset
    2. Wireframe
    3. Flat shading
    4. Gouraud shading (default)
    5. Phong shading
  • Use Ctrl + s to toggle browser live mode.

XHTML DOM Integration

XHTML DOM integration allows you to integrate 3D content seamlessly into your webpage, with just a javascript file included the scene can be written directly into the XHTML markup. There are no further plug-ins needed anymore.

Learn more about how HTML and X3D can operate together.

We show you a simple example how you can manipulate the X3D DOM in JavaScript like you would do it with any HTML.

Custom Shaders

When you display your 3D models with Cobweb by default it will use our Gouraud shader. This is a versatile shader that can cover a lot of your rendering needs. If this is not enough there is also a Phong shader available, adjustable with the browser shading option per scripting.

However, you will often want to perform special effects or special cases for your materials. To do this you will need to write a custom shader.

Learn more about custom shaders.

Dynamic Shadows

As of version 1.28, Cobweb and Titania implement dynamic shadows as an experimental feature which is not included in the current X3D standard yet.

Dynamic shadows in Titania

Learn more about dynamic shadows.

Accessing the External Browser

Cobweb is designed to provide access to a browser and its contained scene graph via JavaScript, either within an internal X3D Script node or an external HTML script.

Learn more how to access the external browser.

Using Google Chrome and Opera with Local Files

Cobweb makes use of the XMLHttpRequest object to load files and there's no way round that. But that means files loading using the file:// scheme protocol are subject to the same origin policy and are handled as cross origin requests (CORS) and cross origin requests are only supported for protocol schemes: http, data and https. That means Cobweb cannot have access to this files.

To work around this problem you must set up a localhost server, than you can access your local files under the web address http://localhost/... This can be done using XAMPP from the https://www.apachefriends.org website. XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.

Enable Cobweb Compatibility in Titania

New feature: To force Titania to provide at least exactly the same functionality and rendering effects as in Cobweb enable Help > Cobweb Compatibility. If enabled ComposedShader nodes will operate equal, Phong shading is available, and lighting will be specification conform.

Supported Profiles

Cobweb has achieved the X3D Immersive Profile support (which matches the VRML97 palette) verified by the X3D consortium at web3d.org.

Supported Components

All nodes listed below are intended to be completely implemented otherwise report a bug.


  • CADAssembly
  • CADFace
  • CADLayer
  • CADPart
  • IndexedQuadSet
  • QuadSet


  • Statements
    • UNIT
    • META
    • PROTO
    • IS
    • DEF
    • USE
    • IMPORT
    • ROUTE
    • EXPORT
  • MetadataBoolean
  • MetadataDouble
  • MetadataFloat
  • MetadataInteger
  • MetadataSet
  • MetadataString
  • WorldInfo


  • ComposedCubeMapTexture
  • GeneratedCubeMapTexture
  • ImageCubeMapTexture


  • Background
  • Fog
  • LocalFog
  • TextureBackground


  • ProximitySensor
  • TransformSensor
  • VisibilitySensor


  • BooleanFilter
  • BooleanSequencer
  • BooleanToggle
  • BooleanTrigger
  • IntegerSequencer
  • IntegerTrigger
  • TimeTrigger


  • ColorChaser
  • ColorDamper
  • CoordinateChaser
  • CoordinateDamper
  • OrientationChaser
  • OrientationDamper
  • PositionChaser
  • PositionDamper
  • PositionChaser2D
  • PositionDamper2D
  • ScalarChaser
  • ScalarDamper
  • TexCoordChaser2D
  • TexCoordDamper2D


  • Arc2D
  • ArcClose2D
  • Circle2D
  • Disk2D
  • Polyline2D
  • Rectangle2D
  • TriangleSet2D


  • Box
  • Cone
  • Cylinder
  • ElevationGrid
  • Extrusion
  • IndexedFaceSet
  • Sphere


  • GeoCoordinate
  • GeoElevationGrid
  • GeoLocation
  • GeoLOD
  • GeoMetadata
  • GeoOrigin
  • GeoPositionInterpolator
  • GeoProximitySensor
  • GeoTouchSensor
  • GeoTransform
  • GeoViewpoint


  • Group
  • StaticGroup
  • Switch
  • Transform


  • ColorInterpolator
  • CoordinateInterpolator
  • CoordinateInterpolator2D
  • EaseInEaseOut
  • NormalInterpolator
  • OrientationInterpolator
  • PositionInterpolator
  • PositionInterpolator2D
  • ScalarInterpolator
  • SplinePositionInterpolator
  • SplinePositionInterpolator2D
  • SplineScalarInterpolator
  • SquadOrientationInterpolator


  • Layer
  • LayerSet
  • Viewport


  • Layout
  • LayoutGroup
  • LayoutLayer
  • ScreenFontStyle
  • ScreenGroup


  • KeySensor


  • DirectionalLight
  • PointLight
  • SpotLight


  • Billboard
  • Collision
  • LOD
  • NavigationInfo
  • OrthoViewpoint
  • Viewpoint
  • ViewpointGroup


  • Anchor
  • Inline
  • LoadSensor


  • CoordinateDouble


  • BoundedPhysicsModel experimental

  • ConeEmitter
  • ExplosionEmitter
  • ForcePhysicsModel
  • ParticleSystem*
  • PointEmitter
  • PolylineEmitter
  • SurfaceEmitter
  • VolumeEmitter
  • WindPhysicsModel

* not clonable


  • CylinderSensor
  • PlaneSensor
  • SphereSensor
  • TouchSensor


  • ClipPlane
  • Color
  • ColorRGBA
  • Coordinate
  • IndexedLineSet
  • IndexedTriangleFanSet
  • IndexedTriangleSet
  • IndexedTriangleStripSet
  • Normal
  • PointSet
  • TriangleFanSet
  • TriangleSet
  • TriangleStripSet


  • Script


  • ComposedShader
  • FloatVertexAttribute
  • Matrix3VertexAttribute
  • Matrix4VertexAttribute
  • ShaderPart


  • Appearance
  • Material
  • Shape
  • TwoSidedMaterial


  • AudioClip
  • Sound


  • FontStyle
  • Text


  • ImageTexture
  • MovieTexture
  • PixelTexture
  • TextureCoordinate
  • TextureProperties
  • TextureTransform


  • TextureCoordinate3D
  • TextureCoordinate4D
  • TextureTransform3D
  • TextureTransformMatrix3D


  • TimeSensor

* Partial implemented, i.e. not all nodes of this component are available.
* New nodes.
* Coming soon

X3D International Standards

Cobweb is based on the the X3D International Standard and this standard is available online on web3d.org on the pages listed below. You can read there all about node types and JavaScript functions and properties available.

X3D Specifications

Language bindings

X3D Examples

VRML Reference

Cobweb is based on the X3D International Standard where VRML is a subset of X3D. Cobweb supports the full VRML standard that is available online at:

Report a Bug

If you run into any bugs or encounter any other abnormal issues with Cobweb, let us know!

Here's an example of a helpful bug report:

I fell through a hole on the Resistance map. I was running along the wall near the pool of water and fell through a black hole in the wall. I got stuck and had to leave the match. This happened while playing Search and Destroy.

Cobweb Feedback Survey and Bug Report