X3D Model Documentation: SliderIntegerExample.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=' SliderIntegerExample.x3d '/>
  6            <meta name='descriptioncontent='This is an example of the SliderInteger prototype, showing a slider bar starting at 12 and ranging from 0 to 24.'/>
  7            <meta name='creatorcontent='Jane Wu'/>
  8            <meta name='createdcontent='19 September 2001'/>
  9            <meta name='modifiedcontent='28 November 2019'/>
 10            <meta name='subjectcontent='slider example'/>
 11            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerExample.x3d '/>
 12            <meta name='generatorcontent='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 13            <meta name='licensecontent='../../license.html'/>
 14       </head>
<!--

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

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definitions: SingleTypeConversion, SliderInteger
-->
 15       <Scene>
 16            <WorldInfo title='SliderIntegerExample.x3d'/>
 17            <ExternProtoDeclare name='SliderIntegerappinfo='Slider user-interface widget that produces integer output values'   url=' "../../../Savage/Tools/Animation/SliderIntegerPrototype.x3d#SliderInteger" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerPrototype.x3d#SliderInteger" "../../../Savage/Tools/Animation/SliderIntegerPrototype.wrl#SliderInteger" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerPrototype.wrl#SliderInteger" '>
 18                 <field name='heighttype='SFFloataccessType='initializeOnly'
                appinfo='default value 1.0'/>
 19                 <field name='radiustype='SFFloataccessType='initializeOnly'
                appinfo='default value 0.1'/>
 20                 <field name='sliderBarColortype='SFColoraccessType='initializeOnly'
                appinfo='default value .8 .4 .8'/>
 21                 <field name='sliderBallColortype='SFColoraccessType='initializeOnly'
                appinfo='default value .3 .4 .8'/>
 22                 <field name='sliderEndColortype='SFColoraccessType='initializeOnly'
                appinfo='default value .2 .3 .9'/>
 23                 <field name='mintype='SFInt32accessType='initializeOnly'
                appinfo='default value 0'/>
 24                 <field name='maxtype='SFInt32accessType='initializeOnly'
                appinfo='default value 10'/>
 25                 <field name='valuetype='SFInt32accessType='initializeOnly'
                appinfo='default value 0'/>
 26                 <field name='setMintype='SFInt32accessType='inputOnly'
                appinfo='set minimum value for slider bar'/>
 27                 <field name='setMaxtype='SFInt32accessType='inputOnly'
                appinfo='set maximum value for slider bar'/>
 28                 <field name='setValuetype='SFInt32accessType='inputOnly'
                appinfo='set value for slider bar'/>
 29                 <field name='valueChangedtype='SFInt32accessType='outputOnly'
                appinfo='output value for slider bar'/>
 30                 <field name='barRadiustype='SFFloataccessType='initializeOnly'
                appinfo='default value 0.02'/>
 31                 <field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
                appinfo='Enable/disable console output for troubleshooting'/>
 32                 <field name='layoutDirectiontype='SFStringaccessType='initializeOnly'
                appinfo='Allowed values: vertical, horizontal'/>
 33            </ExternProtoDeclare>
 34            <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" '>
 35                 <field name='decimalPlacestype='SFInt32accessType='initializeOnly'
                appinfo='decimalPlaces is the number of significant digits after the decimal point, use -1 to indicate no round off'/>
 36                 <field name='setDecimalPlacestype='SFInt32accessType='inputOnly'/>
 37                 <field name='BooleanValuetype='SFBoolaccessType='inputOnly'/>
 38                 <field name='FloatValuetype='SFFloataccessType='inputOnly'/>
 39                 <field name='IntegerValuetype='SFInt32accessType='inputOnly'/>
 40                 <field name='TimeValuetype='SFTimeaccessType='inputOnly'/>
 41                 <field name='BooleanResulttype='SFBoolaccessType='outputOnly'/>
 42                 <field name='FloatResulttype='SFFloataccessType='outputOnly'/>
 43                 <field name='IntegerResulttype='SFInt32accessType='outputOnly'/>
 44                 <field name='TimeResulttype='SFTimeaccessType='outputOnly'/>
 45                 <field name='StringResulttype='SFStringaccessType='outputOnly'/>
 46                 <field name='StringsResulttype='MFStringaccessType='outputOnly'/>
 47            </ExternProtoDeclare>
 48            <!-- Scene graph begins here -->
 49            <Viewpoint description='Drag slider ball to change valuesposition='0 1 9'/>
 50            <Billboard axisOfRotation='0 0 0'>
 51                 <Transform translation='0 2 0'>
 52                      <Shape>
 53                           <Appearance>
 54                                <Material diffuseColor='0 1 1'/>
 55                           </Appearance>
 56                           <Text string=' "Drag slider ball" "to change values," "select end stops to" "increment/decrement" '>
 57                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
 58                           </Text>
 59                      </Shape>
 60                 </Transform>
 61                 <Transform translation='-0.4 -1.2 0'>
 62                      <Shape>
 63                           <Appearance>
 64                                <Material/>
 65                           </Appearance>
 66 
                         <!-- ROUTE information for ResultString node:  [from IntegerConverter.StringsResult to set_string ] -->
                         <Text DEF='ResultString'/>
 67                      </Shape>
 68                 </Transform>
 69                 <Transform translation='0 -2 0'>
 70 
                    <!-- ROUTE information for SliderExample node:  [from valueChanged to IntegerConverter.IntegerValue ] -->
                    <ProtoInstance name='SliderIntegerDEF='SliderExample'>
 71                           <fieldValue name='layoutDirectionvalue='horizontal'/>
 72                           <fieldValue name='heightvalue='5'/>
 73                           <fieldValue name='radiusvalue='0.1'/>
 74                           <fieldValue name='minvalue='0'/>
 75                           <fieldValue name='maxvalue='24'/>
 76                           <fieldValue name='valuevalue='12'/>
 77                           <fieldValue name='sliderBarColorvalue='0.8 0.4 0.8'/>
 78                           <fieldValue name='sliderBallColorvalue='0.3 0.4 0.8'/>
 79                           <fieldValue name='sliderEndColorvalue='0.2 0.3 0.9'/>
 80                           <fieldValue name='traceEnabledvalue='true'/>
 81                      </ProtoInstance>
 82                 </Transform>
 83            </Billboard>
 84 
          <!-- ROUTE information for IntegerConverter node:  [from SliderExample.valueChanged to IntegerValue ] [from StringsResult to ResultString.set_string ] -->
          <ProtoInstance name='SingleTypeConversionDEF='IntegerConverter'/>
 85            < ROUTE  fromNode='SliderExample' fromField='valueChanged' toNode='IntegerConverter' toField='IntegerValue'/>
 86            < ROUTE  fromNode='IntegerConverter' fromField='StringsResult' toNode='ResultString' toField='set_string'/>
 87       </Scene>
 88  </X3D>
<!--

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

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definitions: SingleTypeConversion, SliderInteger
-->
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.

      IntegerConverter
ProtoInstance
StringsResult
MFString

ROUTE
event to
(1)
ResultString
Text
set_string
MFString

SliderExample
ProtoInstance
valueChanged
SFInt32

ROUTE
event to
(1)
IntegerConverter
ProtoInstance
IntegerValue
SFInt32
then
 
 
 
IntegerConverter
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/SliderIntegerExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerExample.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. -->