### X3DLightNode HTML Encoding Example Source: https://doc.x3dom.org/index.html/author/Lighting/X3DLightNode Demonstrates the basic HTML encoding for an X3DLightNode, showing its default attribute values. ```HTML ``` -------------------------------- ### HTML Example for ToneMappedVolumeStyle Node Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/ToneMappedVolumeStyle Demonstrates how to declare and configure the ToneMappedVolumeStyle node in an HTML/X3D context, showing default values for its attributes. ```HTML ``` -------------------------------- ### X3DSensorNode HTML Encoding Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/X3DSensorNode Demonstrates the basic HTML/XML structure for an X3DSensorNode with default attributes, showing how it would be represented in a declarative scene. ```HTML ``` -------------------------------- ### Accessing X3D/X3DOM Node Fields via DOM Source: https://doc.x3dom.org/index.html/author/Geospatial/GeoViewpoint Example demonstrating how to set and get values for X3D/X3DOM node fields using standard DOM `setAttribute` and `getAttribute` functions. ```JavaScript element.setAttribute("myFieldName", "myFieldValue"); let value = element.getAttribute("myFieldName"); ``` -------------------------------- ### Setup Basic X3DOM HTML Page Source: https://doc.x3dom.org/index.html/tutorials/basics/hello/index This snippet provides the foundational HTML structure for an X3DOM page. It includes the necessary X3DOM JavaScript library and CSS file via script and link tags, preparing the environment for embedding 3D content. ```HTML My first X3DOM page

Hello, X3DOM!

This is my first html page with some 3d objects.

``` -------------------------------- ### Accessing X3DChaserNode Fields via DOM Functions Source: https://doc.x3dom.org/index.html/author/Followers/X3DChaserNode This snippet illustrates how to interact with the fields of an X3DChaserNode using standard DOM functions in JavaScript. It shows examples of setting and getting attribute values. ```JavaScript element.setAttribute("myFieldName", "myFieldValue"); element.getAttribute("myFieldName"); ``` -------------------------------- ### SpotLight Constructor API Documentation Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/SpotLight This API documentation details the constructor for the `SpotLight` class, outlining its parameters, their types, argument requirements (optionality), default values, and a brief description of their purpose. This information is crucial for developers looking to programmatically instantiate and configure new SpotLight objects. ```APIDOC Constructor: SpotLight(ctx) Description: Constructor for SpotLight Parameters: ctx: Type: Object Argument: optional Default: null Description: context object, containing initial settings like namespace ``` -------------------------------- ### Interact with X3D/X3DOM Node Fields using DOM Source: https://doc.x3dom.org/index.html/author/Lighting/PointLight Example of how to set and get values for X3D/X3DOM node fields using standard DOM `setAttribute` and `getAttribute` functions. Values should typically be handled as strings. ```JavaScript setAttribute("myFieldName", "myFieldValue") getAttribute("myFieldName") ``` -------------------------------- ### BufferAccessor Class Constructor API Documentation Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/BufferAccessor Provides the API documentation for the `BufferAccessor` class constructor. It details the `ctx` parameter, including its type, optionality, default value, and a description of its purpose as a context object for initial settings. ```APIDOC BufferAccessor(ctx) Description: Constructor for BufferAccessor Parameters: ctx: Type: Object Argument: Default: null Description: context object, containing initial settings like namespace ``` -------------------------------- ### X3DOM PhysicalEnvironmentLight Constructor API Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/PhysicalEnvironmentLight Documents the constructor for the PhysicalEnvironmentLight class, detailing its parameters and their types, arguments, default values, and descriptions. ```APIDOC Constructor: PhysicalEnvironmentLight(ctx) Description: Constructor for PhysicalEnvironmentLight Parameters: ctx: Type: Object Argument: optional Default: null Description: context object, containing initial settings like namespace ``` -------------------------------- ### Set and Get X3D/X3DOM Node Field Values via DOM Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/DirectionalLight Examples demonstrating how to programmatically set and retrieve field values of X3D/X3DOM nodes using standard DOM `setAttribute` and `getAttribute` functions. Values should usually be handled as strings. ```JavaScript setAttribute("myFieldName", "myFieldValue") ``` ```JavaScript getAttribute("myFieldName") ``` -------------------------------- ### PointLight Class Constructor API Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/PointLight Documents the constructor for the PointLight class, detailing its parameters and their types. The constructor allows for initial settings to be passed, such as a context object for namespace configuration. ```APIDOC PointLight(ctx) Description: Constructor for PointLight Parameters: ctx: Object (optional, default: null) Description: context object, containing initial settings like namespace ``` -------------------------------- ### HTML Encoding Example for X3DAppearanceNode Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/X3DAppearanceNode An example demonstrating the HTML encoding for the X3DAppearanceNode, showing how it can be represented in an X3D scene graph. ```HTML ``` -------------------------------- ### HTML Encoding Example for X3DVertexAttributeNode Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/X3DVertexAttributeNode An example of how the X3DVertexAttributeNode can be represented in HTML, showing its attributes and structure. This snippet demonstrates the basic XML-like syntax for embedding X3D nodes. ```HTML ``` -------------------------------- ### Include X3DOM Version 1.3 with Geospatial Component and Flash Support Source: https://doc.x3dom.org/index.html/gettingStarted/x3domVersions/index This snippet shows how to include a specific regular X3DOM release (version 1.3) along with an additional component (Geospatial.js) and Flash support (x3dom.swf). It demonstrates how to combine the base library with modular components and legacy support. ```HTML ``` -------------------------------- ### X3DOM MetadataString Node HTML Encoding Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/MetadataString Example of the HTML encoding for the MetadataString node in X3DOM, showing its attributes and default values for integration into X3D scenes. ```HTML ``` -------------------------------- ### X3DOM BlendedVolumeStyle HTML Encoding Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/BlendedVolumeStyle An example of the BlendedVolumeStyle node in HTML, showing its default attributes and their values. This snippet demonstrates how the node can be declared within an X3DOM scene. ```HTML ``` -------------------------------- ### X3DTextureNode Constructor Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/X3DTextureNode Documents the constructor for the X3DTextureNode class, detailing its 'ctx' parameter, which is an optional object containing initial settings like namespace. ```APIDOC Constructor: X3DTextureNode(ctx) Description: Constructor for X3DTextureNode Parameters: - Name: ctx Type: Object Argument: optional Default: null Description: context object, containing initial settings like namespace ``` -------------------------------- ### X3DOM CoordinateDouble HTML Encoding Example Source: https://doc.x3dom.org/index.html/author/Nurbs/CoordinateDouble Provides an example of how to declare the CoordinateDouble node directly within an HTML document, showing its basic structure and the optional 'metadata' attribute. ```HTML ``` -------------------------------- ### X3DVolumeDataNode Constructor API Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/X3DVolumeDataNode Documents the constructor for the X3DVolumeDataNode class, detailing its parameters and their types, arguments, default values, and descriptions. ```APIDOC Constructor: X3DVolumeDataNode(ctx) Description: Constructor for X3DVolumeDataNode Parameters: - Name: ctx Type: Object Argument: optional Default: null Description: context object, containing initial settings like namespace ``` -------------------------------- ### ImageTexture3D HTML Encoding Example Source: https://doc.x3dom.org/index.html/author/Texturing3D/ImageTexture3D An example of how the ImageTexture3D node is represented in HTML/X3D markup, showing its default attributes and structure. This snippet demonstrates the basic XML-like syntax for embedding the node. ```X3D ``` -------------------------------- ### HTML/X3D Node Example for MPRPlane Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/MPRPlane Demonstrates the basic HTML/X3D syntax for defining an MPRPlane node with its default attributes, used within X3DOM for volume rendering. ```HTML ``` -------------------------------- ### X3DOM OrthoViewpoint Node HTML Example with Defaults Source: https://doc.x3dom.org/index.html/author/Navigation/OrthoViewpoint An example of the HTML/X3D markup for the OrthoViewpoint node, illustrating its structure and all default attribute values. This snippet can be directly used in an X3DOM scene. ```HTML ``` -------------------------------- ### X3DOM MetadataString Node HTML/XML Example Source: https://doc.x3dom.org/index.html/author/Core/MetadataString An example of the MetadataString node's structure in HTML/XML, showing its attributes and their default values. This snippet demonstrates how to declare a MetadataString node within an X3DOM scene. ```HTML ``` -------------------------------- ### Initialize X3DOM Scene with Inline Node Source: https://doc.x3dom.org/index.html/tutorials/applicationTutorials/virtualCatalogue/index This X3DOM snippet sets up the main 3D scene. It defines an context with a specified width and height, containing a element. Inside the scene, an node is used to load an external X3D file, specified by its 'url' attribute, into the current 3D environment. The 'id' and 'nameSpaceName' attributes are also set for later manipulation. ```HTML ``` -------------------------------- ### Include X3DOM-Full Release Version 1.5 in HTML Source: https://doc.x3dom.org/index.html/gettingStarted/x3domVersions/index This snippet illustrates how to include the X3DOM-Full release of version 1.5, which bundles the HTML profile and all other available components. It uses the `script` tag for the full JavaScript library and the `link` tag for the stylesheet, pointing to the specific version's download URLs. ```HTML ``` -------------------------------- ### Get X3D/X3DOM Node Field Value using DOM Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/TwoSidedMaterial Demonstrates how to get the value of an X3D/X3DOM node field using the standard DOM `getAttribute` function. Values should typically be received/set as strings. ```JavaScript getAttribute("myFieldName") ``` -------------------------------- ### X3DOM Scripting Context: Available Variables Source: https://doc.x3dom.org/index.html/tutorials/basics/fields/example This section describes the predefined variables available for scripting within the X3DOM test environment, including their types and meanings. These variables facilitate interaction with the X3DOM scene graph. ```APIDOC colorNode: Type: Color Meaning: Color DOM node, using a "color" field for vertex colors colors1_str: Type: String Meaning: Attribute string, containing values of color testset 1 colors2_str: Type: String Meaning: Attribute string, containing values of color testset 2 colors1_obj: Type: MFColorRGBA Meaning: Field object, containing values of color testset 1 colors2_obj: Type: MFColorRGBA Meaning: Field object, containing values of color testset 2 ``` -------------------------------- ### HTML X3DOM TextureProperties Node Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/TextureProperties An example of how to declare a TextureProperties node in HTML/X3D markup, showing its default attributes for anisotropic filtering, border color, boundary modes, mipmap generation, and texture filtering. ```HTML ``` -------------------------------- ### ElevationGrid Constructor API Documentation Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/ElevationGrid Provides API documentation for the ElevationGrid class constructor. It details the `ctx` parameter, including its type, optionality, default value, and a description of its purpose for initial settings. ```APIDOC ElevationGrid(ctx) Description: Constructor for ElevationGrid Parameters: ctx: Type: Object Argument: optional Default: null Description: context object, containing initial settings like namespace ``` -------------------------------- ### X3DOM ShaderPart Node HTML Encoding Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/ShaderPart Example of the HTML encoding for the X3DOM ShaderPart node, showing its attributes and their default or typical values. This snippet demonstrates how to declare a ShaderPart node directly in HTML. ```HTML ``` -------------------------------- ### X3DOM GeoLOD Node HTML Encoding Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/GeoLOD Example of how to define a GeoLOD node in X3D/HTML, showing its various attributes and their default values. This node is used for managing levels of detail for terrain objects. ```HTML ``` -------------------------------- ### HTML Example: X3DOM Param Element Structure Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/Param Illustrates the basic HTML markup for the X3DOM Param element, demonstrating its 'metadata' attribute for associating metadata objects. ```HTML ``` -------------------------------- ### Set and Get X3D/X3DOM Node Field Values using DOM Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/Transform Demonstrates how to interact with X3D/X3DOM node fields by setting and getting their values as strings using standard DOM `setAttribute` and `getAttribute` functions. ```JavaScript setAttribute("myFieldName", "myFieldValue") getAttribute("myFieldName") ``` -------------------------------- ### HTML Example for X3DBoundedObject Node Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/X3DBoundedObject Demonstrates the basic HTML structure and default attribute values for an X3DBoundedObject node in X3D/X3DOM, showing how to define its bounding box properties, metadata, and rendering flags. ```HTML ``` -------------------------------- ### X3DOM SilhouetteEnhancementVolumeStyle Class API Documentation Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/SilhouetteEnhancementVolumeStyle Detailed API documentation for the SilhouetteEnhancementVolumeStyle class, including its description, inheritance, constructor parameters, and a comprehensive list of its fields with their types, default values, and descriptions. ```APIDOC Class: SilhouetteEnhancementVolumeStyle Description: The SilhouetteEnhancementVolumeStyle node specifies that silhouettes of the assocciated volume data are going to be enhanced. Voxels opacity are modified based on their normals orientation relative to the view direction. When the normal orientation is perpendicular towards the view direction, voxels are darkened, whereas when it is parallel towards the view direction, the opacity is not enhanced. Inheritance: X3DNode -> X3DVolumeRenderStyleNode -> X3DComposableVolumeRenderStyleNode -> SilhouetteEnhancementVolumeStyle Constructor: SilhouetteEnhancementVolumeStyle(ctx) Parameters: ctx: Type: Object Argument: optional Default: null Description: context object, containing initial settings like namespace Fields: enabled: Type: SFBool Default Value: true Description: Specifies whether the render style is enabled or disabled. metadata: Type: SFNode Default Value: X3DMetadataObject Description: Field to add metadata information silhouetteBoundaryOpacity: Type: SFFloat Default Value: 0 Description: The silhouetteBoundaryOpacity field is a factor to specify the amount of silhouette enhancement to use. silhouetteRetainedOpacity: Type: SFFloat Default Value: 1 Description: The silhouetteRetainedOpacity field is a factor to specify the amount of original opacity to retain. silhouetteSharpness: Type: SFFloat Default Value: 0.5 Description: The silhouetteSharpness field is an exponent factor to specify the silhouette sharpness. surfaceNormals: Type: SFNode Default Value: [Texture](Texture.html) Description: The surfaceNormals field allows to provide the normals of the volume data. It takes an ImageTextureAtlas of the same dimensions of the volume data. If it is not provided, it is computed on the fly. ``` -------------------------------- ### Set and Get X3D/X3DOM Field Values using DOM Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/Appearance Demonstrates how to interact with X3D/X3DOM node fields by setting and getting their values as strings using standard DOM `setAttribute` and `getAttribute` functions, which are the recommended methods for manipulation. ```JavaScript setAttribute("myFieldName", "myFieldValue") getAttribute("myFieldName") ``` -------------------------------- ### Add X3DOM 3D Context and Basic Box Shape Source: https://doc.x3dom.org/index.html/tutorials/basics/hello/index This code demonstrates how to embed an X3DOM 3D context within an HTML page. It defines an 'x3d' element with specified dimensions, containing a 'scene' that holds a 'shape' node with a simple 'box' geometry, creating the first 3D object. ```HTML ``` -------------------------------- ### Set and Get X3D/X3DOM Node Field Values using DOM Source: https://doc.x3dom.org/index.html/author/Networking/Anchor Demonstrates how to interact with X3D/X3DOM node fields by setting and getting their values using standard DOM `setAttribute` and `getAttribute` functions. Values should usually be received/set as strings. ```JavaScript setAttribute("myFieldName", "myFieldValue") getAttribute("myFieldName") ``` -------------------------------- ### Applying Page-Wide CSS Styles to X3DOM and HTML Elements Source: https://doc.x3dom.org/index.html/tutorials/basics/htmlCSS/index This CSS snippet expands on the styling of the X3DOM context and introduces general page styles. It defines a darkorange border for 'x3d', sets font properties and a background image for 'body', and colors 'h1' elements darkorange, demonstrating how X3DOM integrates with overall page design. ```CSS x3d { border:2px solid darkorange; } body { font-size:110%; font-family:verdana, sans-serif; background-image: url('pattern.png'); margin: 3em; color: lightgray; } h1 { color: darkorange; } ``` -------------------------------- ### X3DOM Text Node HTML Encoding Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/Text An example demonstrating the basic HTML encoding for the X3DOM Text node, showcasing its common attributes and their default values for defining text properties within an X3D scene. ```HTML ``` -------------------------------- ### X3DOM PositionChaser2D Node HTML Encoding Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/PositionChaser2D Example of how the PositionChaser2D node is represented in HTML/X3D markup, showing its default attributes and their initial values. This snippet illustrates the basic structure for embedding the node within an X3D scene. ```HTML ``` -------------------------------- ### ToneMappedVolumeStyle Class API Reference Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/ToneMappedVolumeStyle Detailed API documentation for the X3DOM ToneMappedVolumeStyle class, including its description, inheritance hierarchy, constructor parameters, and field definitions with types, default values, and descriptions. ```APIDOC Class: ToneMappedVolumeStyle Description: The ToneMappedVolumeStyle node specifies that the associated volume rendering data is going to be rendered following the Gooch et. al. shading model. Two colors are used: warm and cool to shade the volume data based on the light direction. Inheritance: - X3DNode - X3DVolumeRenderStyleNode - X3DComposableVolumeRenderStyleNode Constructor: ToneMappedVolumeStyle(ctx) Parameters: ctx: Object (optional, default: null) - context object, containing initial settings like namespace Fields: - coolColor: SFColor (Default: 0,0,1) - The coolColor field specifies the color to be used for surfaces facing away of the light direction. - enabled: SFBool (Default: true) - Specifies whether the render style is enabled or disabled. - metadata: SFNode (Default: X3DMetadataObject) - Field to add metadata information - surfaceNormals: SFNode (Default: Texture) - The surfaceNormals field allows to provide the normals of the volume data. It takes an ImageTextureAtlas of the same dimensions of the volume data. If it is not provided, it is computed on the fly. - warmColor: SFColor (Default: 1,1,0) - The warmColor field specifies the color to be used for surfaces facing towards the light direction. ``` -------------------------------- ### X3DOM ShadedVolumeStyle Class Constructor API Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/ShadedVolumeStyle API documentation for the `ShadedVolumeStyle` class constructor, detailing the `ctx` parameter which is an optional context object for initial settings like namespace. ```APIDOC ShadedVolumeStyle(ctx) Parameters: ctx: Object null - context object, containing initial settings like namespace ``` -------------------------------- ### HTML X3DOM Group Node Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/Group Example HTML markup for defining an X3DOM `Group` node, showing its default attributes and their initial values. This snippet demonstrates how to embed a `Group` element within an X3D scene. ```HTML ``` -------------------------------- ### X3DBackgroundNode Constructor API Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/X3DBackgroundNode Details the constructor for the X3DBackgroundNode class, which allows for initial settings like namespace via a context object. ```APIDOC Constructor: X3DBackgroundNode(ctx) Description: Constructor for X3DBackgroundNode Parameters: - Name: ctx Type: Object Optional: true Default: null Description: context object, containing initial settings like namespace ``` -------------------------------- ### Set and Get X3D/X3DOM Node Field Values using DOM Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/OrthoViewpoint Demonstrates how to interact with X3D/X3DOM node fields by setting and getting their values as strings using standard DOM `setAttribute` and `getAttribute` functions. This is the recommended approach for field manipulation. ```JavaScript // Set a field value myNode.setAttribute("myFieldName", "myFieldValue"); // Get a field value const fieldValue = myNode.getAttribute("myFieldName"); ``` -------------------------------- ### X3DOM Coordinate Class HTML Usage Example Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/Coordinate An example of how the X3DOM Coordinate node is represented in HTML, showing its attributes and their default values. This snippet demonstrates the basic structure for embedding Coordinate data within an X3D scene in an HTML document. ```HTML ``` -------------------------------- ### X3DGroupingNode Constructor Documentation Source: https://doc.x3dom.org/index.html/developer/x3dom/nodeTypes/X3DGroupingNode Documents the constructor for the X3DGroupingNode class. It explains the 'ctx' parameter, which is an optional context object for initial settings like namespace. ```APIDOC Constructor: X3DGroupingNode(ctx) Description: Constructor for X3DGroupingNode Parameters: - Name: ctx Type: Object Argument: optional Default: null Description: context object, containing initial settings like namespace ```