X3D Model Documentation: Torch.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
  3  <X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  4       <head>
  5            <meta name='titlecontent='Torch.x3d'/>
  6            <meta name='descriptioncontent='Example torch using MovieTexture and flickering lights.'/>
  7            <meta name='creatorcontent='Panos Michalopoulos'/>
  8            <meta name='createdcontent='19 February 2001'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/Torch.x3d'/>
 11            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 12            <meta name='licensecontent='../license.html'/>
 13       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: Flame, flames, Light, LightTimer, LightValues, Soil1, Torch, TorchMetal, Wall

Index for Viewpoint node: Viewpoint_1
-->
 14       <Scene>
 15            <WorldInfo title='Torch.x3d'/>
 16            <NavigationInfo headlight='false'/>
 17            <Viewpoint description='Standardorientation='0 1 0 0.1position='0.5 0 8'/>
 18            <Transform scale='0.2 0.2 0.2translation='-2.3 1 0'>
 19 
               <!-- Group Torch is a DEF node that has 1 USE node: USE_1 -->
               <Group DEF='Torch'>
 20                      <Shape>
 21                           <Extrusion creaseAngle='2crossSection='-1 0 0 1 1 0 0 -1 -1 0scale='0.1 0.1 0.2 0.2spine='0 -1 0 0 1 0'/>
 22 
                         <!-- Appearance TorchMetal is a DEF node that has 1 USE node: USE_1 -->
                         <Appearance DEF='TorchMetal'>
 23                                <Material diffuseColor='1 0.9 0.3'/>
 24                           </Appearance>
 25                      </Shape>
 26                      <Transform translation='0 1.15 0'>
 27                           <Shape>
 28                                <Cylinder height='0.3radius='0.3'/>
 29                                <Appearance USE='TorchMetal'/>
 30                           </Shape>
 31                      </Transform>
 32                      <Transform rotation='0 1 0 -1.7scale='1.5 1.5 1.5translation='0 1.3 0'>
 33                           <Shape>
 34                                <Extrusion crossSection='-1 0 0 1 1 0 0 -1 -1 0scale='0.1 0.1 0.3 0.3 0.5 0.5 0.5 0.5 0.3 0.3 0.1 0.1 0.001 0.001spine='0 0 0 0 0.2 0 0 0.5 0 0 0.6 0 0 1 0 0 1.5 0 0 2 0'/>
 35                                <Appearance DEF='Flame'>
 36                                     <MovieTexture DEF='flamesloop='truerepeatS='falserepeatT='false'   url=' "flames.mpg" "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/flames.mpg" '/>
 37                                </Appearance>
 38                           </Shape>
 39                      </Transform>
 40 
                    <!-- ROUTE information for Light node:  [from LightValues.value_changed to set_intensity ] -->
                    <PointLight DEF='LightambientIntensity='0.3attenuation='0 0 0.1color='1 1 0.5location='0 2 0'/>
 41 
                    <!-- ROUTE information for LightTimer node:  [from fraction_changed to LightValues.set_fraction ] -->
                    <TimeSensor DEF='LightTimercycleInterval='1.5loop='true'/>
 42 
                    <!-- ROUTE information for LightValues node:  [from LightTimer.fraction_changed to set_fraction ] [from value_changed to Light.set_intensity ] -->
                    <ScalarInterpolator DEF='LightValueskey='0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1keyValue='1 0.7 0.5 0.8 1 0.5 0.8 0.7 1 0.5 1'/>
 43                 </Group>
 44            </Transform>
 45            <Transform scale='0.2 0.2 0.2translation='2.3 1 0'>
 46                 <Group USE='Torch'/>
 47            </Transform>
 48            <Transform translation='0 -2.5 0'>
 49                 <Shape>
 50                      <Box size='5 0.1 5'/>
 51 
                    <!-- Appearance Wall is a DEF node that has 4 USE nodes: USE_1, USE_2, USE_3, USE_4 -->
                    <Appearance DEF='Wall'>
 52                           <Material diffuseColor='0.9 0.9 0.9specularColor='0 0.1 0'/>
 53                           <ImageTexture DEF='Soil1'   url=' "Soil1.jpg " "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/Soil1.jpg " '/>
 54                      </Appearance>
 55                 </Shape>
 56            </Transform>
 57            <Transform translation='0 2.5 0'>
 58                 <Shape>
 59                      <Box size='5 0.1 5'/>
 60                      <Appearance USE='Wall'/>
 61                 </Shape>
 62            </Transform>
 63            <Transform translation='-2.5 0 0'>
 64                 <Shape>
 65                      <Box size='0.1 5 5'/>
 66                      <Appearance USE='Wall'/>
 67                 </Shape>
 68            </Transform>
 69            <Transform translation='2.5 0 0'>
 70                 <Shape>
 71                      <Box size='0.1 5 5'/>
 72                      <Appearance USE='Wall'/>
 73                 </Shape>
 74            </Transform>
 75            <Transform translation='0 0 -2.5'>
 76                 <Shape>
 77                      <Box size='5 5 0.1'/>
 78                      <Appearance USE='Wall'/>
 79                 </Shape>
 80            </Transform>
 81            < ROUTE  fromNode='LightTimer' fromField='fraction_changed' toNode='LightValues' toField='set_fraction'/>
 82            < ROUTE  fromNode='LightValues' fromField='value_changed' toNode='Light' toField='set_intensity'/>
 83       </Scene>
 84  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: Flame, flames, Light, LightTimer, LightValues, Soil1, Torch, TorchMetal, Wall

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, Box, Cylinder, Extrusion, Group, head, ImageTexture, Material, meta, MovieTexture, NavigationInfo, PointLight, ROUTE, ScalarInterpolator, Scene, Shape, TimeSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table with 2 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.

LightTimer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
LightValues
ScalarInterpolator
set_fraction
SFFloat
then
 
 
 
LightValues
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(2)
Light
PointLight
set_intensity
SFFloat
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/TorchIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/StudentProjects/Torch.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. -->