Skip to content
Kristian Sons edited this page Feb 25, 2014 · 8 revisions

In xml3d.js, general parameters are part of the DOM, for instance attributes of a node. However, some parameters are rather implementation-specific or tied to a certain rendering algorithm. Configuring the implementation or a specific renderer is done through options.

Global Options

Available options can be queried:

 > XML3D.options.getKeys()
   ["loglevel", "renderer-frustumculling", "renderer-faceculling", "renderer-frontface"] 

Setting and getting of option values with getValue and setValue:

 > XML3D.options.getValue("loglevel")
   "warning"
 > XML3D.options.setValue("loglevel", "debug")`

Alternatively, global options can be set via query string of the URL. Then the option key needs to be prefixed with xml3d-:

  http://xml3d.github.io/xml3d-examples/examples/shaderOverrides/index.html?stats&xml3d-renderer-frustumculling=false

Available Options

Key Default Value Possible Values Description
loglevel warning exception, error, warning, info, debug Configure the verbosity of the console logger
renderer-frustumculling true true, false (De-)activate frustum culling
renderer-faceculling none none, back, front, both (De-)activate face culling
renderer-frontface ccw ccw, cw Define, what is front side of a polygon

Per-element options

Not yet available

Clone this wiki locally