X3D Model Documentation: MaterialExample.x3d go to online X3D Example Archives model page

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
  3  <X3D profile='Immersive' version='3.2'  xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.2.xsd'>
  4       <head>
  5            <meta name='title' content=' MaterialExample.x3d '/>
  6            <meta name='description' content='Material node example for X3D-Edit MaterialEditor, which uses Scene Access Interface (SAI) externally to select/deselect different shapes, axes and lights while modifying Material values.'/>
  7            <meta name='creator' content='Don Brutzman'/>
  8            <meta name='created' content='17 December 2006'/>
  9            <meta name='modified' content='20 October 2019'/>
 10            <meta name='subject' content='X3D-Edit example'/>
 11            <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Basic/development/MaterialExample.x3d '/>
 12            <meta name='reference' content=' src/www.web3d.org/x3d/tools/X3dEdit3.3/X3D/src/org/web3d/x3d/templates/MaterialExample.x3d '/>
 13            <meta name='generator' content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 14            <meta name='license' content='../license.html'/>
 15       </head>
<!--

--> <!-- to top DEF nodes index: AppearanceBlue, AppearanceGreen, AppearanceRed, AxesSwitch, BackgroundNode, DirectionalLightNode, LabelStyle, LightDirectionCoordinateNode, LightDirectionLineMaterial, LightDirectionVectorSwitch, MaterialNode, ShapeNode, xAxis, yAxis, zAxis

Index for Viewpoint node: ViewpointNode

-->
 16       <Scene>
 17            <WorldInfo title='MaterialExample.x3d'/>
 18            <Viewpoint DEF='ViewpointNode' description='default' position='0 0 4'/>
 19            <NavigationInfo headlight='false' type='"EXAMINE"'/>
 20            <Background DEF='BackgroundNode'/>
 21            <DirectionalLight DEF='DirectionalLightNode' direction='-0.707 0 -0.707'/>
 22            <Shape DEF='ShapeNode'>
 23                 <Sphere/>
 24                 <Appearance>
 25                      <Material DEF='MaterialNode'/>
 26                 </Appearance>
 27            </Shape>
 28            <Switch DEF='AxesSwitch' whichChoice='0'>
 29                 <Group>
 30                      <Group DEF='xAxis'>
 31                           <Shape>
 32                                <IndexedLineSet coordIndex='0 1'>
 33                                     <Coordinate point='0 0 0 1.25 0 0'/>
 34                                </IndexedLineSet>
 35 
                              <!-- Appearance AppearanceRed is a DEF node that has 1 USE node: USE_1 -->
                              <Appearance DEF='AppearanceRed'>
 36                                     <Material diffuseColor='0 0 0' emissiveColor='0.8 0 0'/>
 37                                </Appearance>
 38                           </Shape>
 39                           <Transform translation='1.4 0 0'>
 40                                <Billboard>
 41                                     <Shape>
 42                                          <Text string='"x"'>
 43 
                                             <!-- FontStyle LabelStyle is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                                             <FontStyle DEF='LabelStyle' justify='"MIDDLE" "MIDDLE"' size='0.3'/>
 44                                          </Text>
 45                                          <Appearance USE='AppearanceRed'/>
 46                                     </Shape>
 47                                </Billboard>
 48                           </Transform>
 49                      </Group>
 50                      <Group DEF='yAxis'>
 51                           <Shape>
 52                                <IndexedLineSet coordIndex='0 1'>
 53                                     <Coordinate point='0 0 0 0 1.25 0'/>
 54                                </IndexedLineSet>
 55 
                              <!-- Appearance AppearanceGreen is a DEF node that has 1 USE node: USE_1 -->
                              <Appearance DEF='AppearanceGreen'>
 56                                     <Material diffuseColor='0 0 0' emissiveColor='0 0.8 0'/>
 57                                </Appearance>
 58                           </Shape>
 59                           <Transform translation='0 1.4 0'>
 60                                <Billboard axisOfRotation='0 0 0'>
 61                                     <Shape>
 62                                          <Text string='"y"'>
 63                                               <FontStyle USE='LabelStyle'/>
 64                                          </Text>
 65                                          <Appearance USE='AppearanceGreen'/>
 66                                     </Shape>
 67                                </Billboard>
 68                           </Transform>
 69                      </Group>
 70                      <Group DEF='zAxis'>
 71                           <Shape>
 72                                <IndexedLineSet coordIndex='0 1'>
 73                                     <Coordinate point='0 0 0 0 0 1.25'/>
 74                                </IndexedLineSet>
 75 
                              <!-- Appearance AppearanceBlue is a DEF node that has 1 USE node: USE_1 -->
                              <Appearance DEF='AppearanceBlue'>
 76                                     <Material diffuseColor='0 0 0' emissiveColor='0 0 0.8'/>
 77                                </Appearance>
 78                           </Shape>
 79                           <Transform translation='0 0 1.4'>
 80                                <Billboard axisOfRotation='0 0 0'>
 81                                     <Shape>
 82                                          <Text string='"z"'>
 83                                               <FontStyle USE='LabelStyle'/>
 84                                          </Text>
 85                                          <Appearance USE='AppearanceBlue'/>
 86                                     </Shape>
 87                                </Billboard>
 88                           </Transform>
 89                      </Group>
 90                 </Group>
 91            </Switch>
 92            <Switch DEF='LightDirectionVectorSwitch' whichChoice='0'>
 93                 <Transform scale='1.25 1.25 1.25'>
 94                      <Shape>
 95                           <IndexedLineSet coordIndex='0 1'>
 96                                <!-- negate direction-vector values so that line approaches from light direction towards origin -->
 97                                <Coordinate DEF='LightDirectionCoordinateNode' point='0.707 0 0.707 0 0 0'/>
 98                           </IndexedLineSet>
 99                           <Appearance>
100                                <Material DEF='LightDirectionLineMaterial' diffuseColor='0 0 0' emissiveColor='1 1 1'/>
101                           </Appearance>
102                      </Shape>
103                 </Transform>
104            </Switch>
105       </Scene>
106  </X3D>
<!--

--> <!-- to top DEF nodes index: AppearanceBlue, AppearanceGreen, AppearanceRed, AxesSwitch, BackgroundNode, DirectionalLightNode, LabelStyle, LightDirectionCoordinateNode, LightDirectionLineMaterial, LightDirectionVectorSwitch, MaterialNode, ShapeNode, xAxis, yAxis, zAxis

Index for Viewpoint node: ViewpointNode

-->

X3D Tooltips element index: to top Appearance, Background, Billboard, Coordinate, DirectionalLight, FontStyle, Group, head, IndexedLineSet, Material, meta, NavigationInfo, Scene, Shape, Sphere, Switch, Text, Transform, Viewpoint, WorldInfo, X3D,
plus documentation for accessType definitions, type definitions, XML data types, and field types

-->
go to online X3D Example Archives model page <!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/development/MaterialExampleIndex.html -->
<!-- SourceForge version control Version control at    
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/development/MaterialExample.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->