This tutorial will learn how to modify important properties of the x3dom runtime using declarative code. There are several parameters that change default behaviour, for example to show debug information or influence how the scene is rendered.
Lets set a param for our runtime:
<x3d showStat="true"> <scene> ... </scene> </x3d>
The param you just added activates the statistics window, giving you some debug information that may be relevant during development. Since the user normally should not see this, the stat window is deactivated by default. If you only need it sometimes, you may also toggle its visibility using the space bar on your keyboard.
The values of params are not restricted to boolean values. Using the param
can influence how many triangles are used to approximate primitives. The default value is
you may set it to
Low or any float value between 0.0 and 1.0. A smaller value
means less triangles used. You can compare the effect in the picture below.
If you want your application to use less triangles (for example because of performance limits), just add the following argument.
The resulting page should now look like this:
Visit the Scene Author Configuration Documentation page to
learn about more possible params.
You can configure even more rendering details using the environment node. Some examples can be found in the Tutorials about Simple Screen-Space Ambient Occlusion and Culling Technologies.