X3D Model Documentation: SliderFloatExample.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=' SliderFloatExample.x3d '/>
  6            <meta name='descriptioncontent='This is an example of the SliderFloatPrototype, showing a slider bar starting at 12 and ranging from 0 to 24.'/>
  7            <meta name='creatorcontent='Jane Wu'/>
  8            <meta name='createdcontent='17 October 2001'/>
  9            <meta name='modifiedcontent='28 November 2019'/>
 10            <meta name=' TODO content=' slow it down, change to positive control by user selection '/>
 11            <meta name='subjectcontent='float slider example'/>
 12            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatExample.x3d '/>
 13            <meta name='generatorcontent='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 14            <meta name='licensecontent='../../license.html'/>
 15       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: FloatConverter, FontOutputText, ResultString, SliderExample

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definitions: SingleTypeConversion, SliderFloat
-->
 16       <Scene>
 17            <WorldInfo title='SliderFloatExample.x3d'/>
 18            <ExternProtoDeclare name='SliderFloatappinfo='Slider user-interface widget that produces floating-point output values'   url=' "SliderFloatPrototype.x3d#SliderFloat" "../../../Savage/Tools/Animation/SliderFloatPrototype.x3d#SliderFloat" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatPrototype.x3d#SliderFloat" "SliderFloatPrototype.wrl#SliderFloat" "../../../Savage/Tools/Animation/SliderFloatPrototype.wrl#SliderFloat" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatPrototype.wrl#SliderFloat" '>
 19                 <field name='layoutDirectiontype='SFStringaccessType='initializeOnly'
                appinfo='Allowed values: vertical, horizontal'/>
 20                 <field name='heighttype='SFFloataccessType='initializeOnly'
                appinfo='default value 1.0'/>
 21                 <field name='radiustype='SFFloataccessType='initializeOnly'
                appinfo='default value 0.1'/>
 22                 <field name='barRadiustype='SFFloataccessType='initializeOnly'
                appinfo='default value 0.02'/>
 23                 <field name='sliderBarColortype='SFColoraccessType='initializeOnly'
                appinfo='default value .8 .4 .8'/>
 24                 <field name='sliderBallColortype='SFColoraccessType='initializeOnly'
                appinfo='default value .3 .4 .8'/>
 25                 <field name='sliderEndColortype='SFColoraccessType='initializeOnly'
                appinfo='default value .2 .3 .9'/>
 26                 <field name='mintype='SFFloataccessType='initializeOnly'
                appinfo='default value 0.0'/>
 27                 <field name='maxtype='SFFloataccessType='initializeOnly'
                appinfo='default value 10.0'/>
 28                 <field name='valuetype='SFFloataccessType='initializeOnly'
                appinfo='default value 0.0'/>
 29                 <field name='setMintype='SFFloataccessType='inputOnly'
                appinfo='set minimum value for slider bar'/>
 30                 <field name='setMaxtype='SFFloataccessType='inputOnly'
                appinfo='set maximum value for slider bar'/>
 31                 <field name='setValuetype='SFFloataccessType='inputOnly'
                appinfo='set value for slider bar'/>
 32                 <field name='valueChangedtype='SFFloataccessType='outputOnly'
                appinfo='output value for slider bar'/>
 33                 <field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
                appinfo='enable/disable console output for troubleshooting'/>
 34            </ExternProtoDeclare>
 35            <ExternProtoDeclare name='SingleTypeConversionappinfo='SingleTypeConversion converts from a single typed value to various other types of values'   url=' "../../../Savage/Tools/Authoring/SingleTypeConversionPrototype.x3d#SingleTypeConversion" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/SingleTypeConversionPrototype.x3d#SingleTypeConversion" "../../../Savage/Tools/Authoring/SingleTypeConversionPrototype.wrl#SingleTypeConversion" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/SingleTypeConversionPrototype.wrl#SingleTypeConversion" '>
 36                 <field name='decimalPlacestype='SFInt32accessType='initializeOnly'
                appinfo='decimalPlaces is the number of significant digits after the decimal point, use -1 to indicate no round off'/>
 37                 <field name='setDecimalPlacestype='SFInt32accessType='inputOnly'/>
 38                 <field name='BooleanValuetype='SFBoolaccessType='inputOnly'/>
 39                 <field name='FloatValuetype='SFFloataccessType='inputOnly'/>
 40                 <field name='IntegerValuetype='SFInt32accessType='inputOnly'/>
 41                 <field name='BooleanResulttype='SFBoolaccessType='outputOnly'/>
 42                 <field name='FloatResulttype='SFFloataccessType='outputOnly'/>
 43                 <field name='IntegerResulttype='SFInt32accessType='outputOnly'/>
 44                 <field name='StringResulttype='SFStringaccessType='outputOnly'/>
 45                 <field name='StringsResulttype='MFStringaccessType='outputOnly'/>
 46                 <field name='TimeResulttype='SFTimeaccessType='outputOnly'/>
 47                 <field name='TimeValuetype='SFTimeaccessType='inputOnly'/>
 48            </ExternProtoDeclare>
 49            <!-- Scene graph begins here -->
 50            <Viewpoint description='Drag slider ball to change valuesposition='0 1 9'/>
 51            <Billboard axisOfRotation='0 0 0'>
 52                 <Transform translation='0 2.5 0'>
 53                      <Shape>
 54                           <Appearance>
 55                                <Material diffuseColor='0 1 1'/>
 56                           </Appearance>
 57                           <Text string=' "Drag slider ball" "to change values," "select end stops to" "increment/decrement" '>
 58 
                              <!-- FontStyle FontOutputText is a DEF node that has 1 USE node: USE_1 -->
                              <FontStyle DEF='FontOutputTextjustify='"MIDDLE" "MIDDLE"size='0.9'/>
 59                           </Text>
 60                      </Shape>
 61                 </Transform>
 62                 <Transform translation='-0.8 -0.7 0'>
 63                      <Shape>
 64                           <Appearance>
 65                                <Material/>
 66                           </Appearance>
 67 
                         <!-- ROUTE information for ResultString node:  [from FloatConverter.StringsResult to set_string ] -->
                         <Text DEF='ResultString'>
 68                                <FontStyle USE='FontOutputText'/>
 69                           </Text>
 70                      </Shape>
 71                 </Transform>
 72                 <Transform translation='0 -2 0'>
 73 
                    <!-- ROUTE information for SliderExample node:  [from valueChanged to FloatConverter.FloatValue ] -->
                    <ProtoInstance name='SliderFloatDEF='SliderExample'>
 74                           <fieldValue name='layoutDirectionvalue='horizontal'/>
 75                           <fieldValue name='heightvalue='5'/>
 76                           <fieldValue name='radiusvalue='0.1'/>
 77                           <fieldValue name='barRadiusvalue='0.04'/>
 78                           <fieldValue name='sliderBarColorvalue='0.75 0.75 0.75'/>
 79                           <fieldValue name='minvalue='0.0'/>
 80                           <fieldValue name='maxvalue='24.0'/>
 81                           <fieldValue name='valuevalue='12.0'/>
 82                           <fieldValue name='traceEnabledvalue='true'/>
 83                      </ProtoInstance>
 84                 </Transform>
 85            </Billboard>
 86 
          <!-- ROUTE information for FloatConverter node:  [from SliderExample.valueChanged to FloatValue ] [from StringsResult to ResultString.set_string ] -->
          <ProtoInstance name='SingleTypeConversionDEF='FloatConverter'>
 87                 <fieldValue name='decimalPlacesvalue='2'/>
 88            </ProtoInstance>
 89            < ROUTE  fromNode='SliderExample' fromField='valueChanged' toNode='FloatConverter' toField='FloatValue'/>
 90            < ROUTE  fromNode='FloatConverter' fromField='StringsResult' toNode='ResultString' toField='set_string'/>
 91       </Scene>
 92  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: FloatConverter, FontOutputText, ResultString, SliderExample

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definitions: SingleTypeConversion, SliderFloat
-->
X3D Tooltips element index: Appearance, Billboard, ExternProtoDeclare, field, fieldValue, FontStyle, head, Material, meta, ProtoInstance, ROUTE, Scene, Shape, Text, Transform, Viewpoint, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

Event Graph ROUTE Table entries 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.

      FloatConverter
ProtoInstance
StringsResult
MFString

ROUTE
event to
(1)
ResultString
Text
set_string
MFString

SliderExample
ProtoInstance
valueChanged
SFFloat

ROUTE
event to
(1)
FloatConverter
ProtoInstance
FloatValue
SFFloat
then
 
 
 
FloatConverter
ProtoInstance
StringsResult
MFString

ROUTE
event to
(2)
ResultString
Text
set_string
MFString

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/Savage/Tools/Animation/SliderFloatExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatExample.x3d -->

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

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