X3D Model Documentation: Slabs.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <X3D profile='Interchange' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  4       <head>
  5            <meta name='titlecontent='Slabs.x3d'/>
  6            <meta name='descriptioncontent='Slab World example illustrates use of Appearance and Material nodes to set the main shading color (diffuseColor), glow color (emissiveColor), and transparency level of a shape.'/>
  7            <meta name='creatorcontent='David R. Nadeau'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='1 July 1998'/>
 10            <meta name='translatedcontent='2 February 2014'/>
 11            <meta name='modifiedcontent='20 October 2019'/>
 12            <meta name='referencecontent='originals/slabs.wrl'/>
 13            <meta name='referencecontent='http://www.siggraph.org/s98'/>
 14            <meta name='referencecontent='http://www.siggraph.org/s98/conference/courses/18.html'/>
 15            <meta name='referencecontent='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0080.htm'/>
 16            <meta name='referencecontent='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm'/>
 17            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dResources.html'/>
 18            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Slabs.x3d'/>
 19            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 20            <meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
 21            <meta name='licensecontent='../license.html'/>
 22       </head>
<!--

<!-- -->

<!-- to top Index for DEF nodes: Entry, Slab

Index for Viewpoint node: Entry
-->
 23       <Scene>
 24            <!-- Seven slabs are created, each using a Box node. Each slab is shaded a different material: -->
 25            <!-- Slab Diffuse Emissive Transparency; 1. White white black 0.0; 2. Red black red 0.0; 3. Green green black 0.5; 4. Blue blue white 0.25; 5. Yellow yellow black 0.5; 6. Cyan cyan black 0.0; 7. Magenta red magenta 0.0 -->
 26            <!-- Some PC browsers may not support transparency. Others may not support shading using both diffuse and emissive colors. So, your results may vary. -->
 27            <!-- Things to experiment with: -->
 28            <!-- Try different transparency levels. -->
 29            <!-- Turn off the headlight on your VRML browser and observe which slabs glow. -->
 30            <WorldInfo info='"Copyright (c) 1996, David R. Nadeau"title='Slab World'/>
 31            <Viewpoint DEF='Entrydescription='Entry viewposition='0.0 1.66 15.0'/>
 32            <NavigationInfo/>
 33            <Transform translation='0.0 2.0 4.0'>
 34                 <Shape>
 35                      <Appearance>
 36                           <Material diffuseColor='1.0 1.0 1.0'/>
 37                      </Appearance>
 38 
                    <!-- Box Slab is a DEF node that has 6 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5, USE_6 -->
                    <Box DEF='Slabsize='2.0 4.0 0.3'/>
 39                 </Shape>
 40            </Transform>
 41            <Transform translation='0.0 2.0 0.0'>
 42                 <Shape>
 43                      <Appearance>
 44                           <Material diffuseColor='0.0 0.0 0.0emissiveColor='1.0 0.0 0.0'/>
 45                      </Appearance>
 46                      <Box USE='Slab'/>
 47                 </Shape>
 48            </Transform>
 49            <Transform translation='-3.0 2.0 2.0'>
 50                 <Shape>
 51                      <Appearance>
 52                           <Material diffuseColor='0.0 1.0 0.0transparency='0.5'/>
 53                      </Appearance>
 54                      <Box USE='Slab'/>
 55                 </Shape>
 56            </Transform>
 57            <Transform translation='4.0 2.0 -2.0'>
 58                 <Shape>
 59                      <Appearance>
 60                           <Material diffuseColor='0.2 0.2 0.2emissiveColor='0.0 0.0 0.8transparency='0.25'/>
 61                      </Appearance>
 62                      <Box USE='Slab'/>
 63                 </Shape>
 64            </Transform>
 65            <Transform translation='4.5 2.0 3.0'>
 66                 <Shape>
 67                      <Appearance>
 68                           <Material diffuseColor='1.0 1.0 0.0transparency='0.5'/>
 69                      </Appearance>
 70                      <Box USE='Slab'/>
 71                 </Shape>
 72            </Transform>
 73            <Transform translation='-3.5 2.0 -5.0'>
 74                 <Shape>
 75                      <Appearance>
 76                           <Material diffuseColor='0.0 1.0 1.0'/>
 77                      </Appearance>
 78                      <Box USE='Slab'/>
 79                 </Shape>
 80            </Transform>
 81            <Transform translation='2.0 2.0 -6.0'>
 82                 <Shape>
 83                      <Appearance>
 84                           <Material diffuseColor='0.5 0.0 0.0emissiveColor='0.5 0.0 0.5'/>
 85                      </Appearance>
 86                      <Box USE='Slab'/>
 87                 </Shape>
 88            </Transform>
 89       </Scene>
 90  </X3D>
<!--

<!-- -->

<!-- to top Index for DEF nodes: Entry, Slab

Index for Viewpoint node: Entry
-->
X3D Tooltips element index: Appearance, Box, head, Material, meta, NavigationInfo, Scene, Shape, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/SlabsIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Slabs.x3d -->

<!-- Color 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. -->