diff --git a/public/X3DOMTutorial/colorbrewer2.html b/public/X3DOMTutorial/colorbrewer2.html index 41fc20fb15eb3c47033acb465e7e1104c3e485d4..a4ed47a628593ec9325c2742b0f1e1043856ed5b 100644 --- a/public/X3DOMTutorial/colorbrewer2.html +++ b/public/X3DOMTutorial/colorbrewer2.html @@ -1,133 +1,133 @@ - - -
- -|
- |
-
- The following example will show you haw to interactively modify the 3D scene. - - - -
- - <X3D id="shapedata" width="600px" height="600px" style="float:left"> - <Scene> - <Shape> - <Appearance> - <Material id="material" diffuseColor="0.980, 0.502, 0.447"> </Material> - </Appearance> - <Sphere radius="2.0"> </Sphere> - </Shape> - </Scene> - </X3D> -- - For example, if the diffuse color should be set to red, the Material node is referenced by its id and the - attribute diffuseColor is set to - "1.0 0.0 0.0". The attribute value is always a string. -
- var mat = document.getElementById("material");
- mat.setAttribute("diffuseColor", "1.0 0.0 0.0");
-
- In the example, the RGB value is fetched from the slider. As the slider gives the RGB values between 0 and 255,
- they have to be transformed to
- arithmetic values between 0.0 and 1.0. After that, the RBG value has to be formatted as string.
-
- var mat = document.getElementById("material");
- rgbstring = " "+ red/255 + " " + green/255 + " " + blue/255;
- mat.setAttribute("diffuseColor", rgbstring);
-
-
- |
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
|
+ |
+
+ The following example will show you haw to interactively modify the 3D scene. + + + +
+ + <X3D id="shapedata" width="600px" height="600px" style="float:left"> + <Scene> + <Shape> + <Appearance> + <Material id="material" diffuseColor="0.980, 0.502, 0.447"> </Material> + </Appearance> + <Sphere radius="2.0"> </Sphere> + </Shape> + </Scene> + </X3D> ++ + For example, if the diffuse color should be set to red, the Material node is referenced by its id and the + attribute diffuseColor is set to + "1.0 0.0 0.0". The attribute value is always a string. +
+ var mat = document.getElementById("material");
+ mat.setAttribute("diffuseColor", "1.0 0.0 0.0");
+
+ In the example, the RGB value is fetched from the slider. As the slider gives the RGB values between 0 and 255,
+ they have to be transformed to
+ arithmetic values between 0.0 and 1.0. After that, the RBG value has to be formatted as string.
+
+ var mat = document.getElementById("material");
+ rgbstring = " "+ red/255 + " " + green/255 + " " + blue/255;
+ mat.setAttribute("diffuseColor", rgbstring);
+
+
+ |
+
+
+
+
+