| 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='title' content=' SliderIntegerExample.x3d '/> |
| 6 | <meta name='description' content='This is an example of the SliderInteger prototype, showing a slider bar starting at 12 and ranging from 0 to 24.'/> |
| 7 | <meta name='creator' content='Jane Wu'/> |
| 8 | <meta name='created' content='19 September 2001'/> |
| 9 | <meta name='modified' content='28 November 2019'/> |
| 10 | <meta name='subject' content='slider example'/> |
| 11 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerExample.x3d '/> |
| 12 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 13 | <meta name='license' content='../../license.html'/> |
| 14 | </head> |
| 15 | <Scene> |
| 16 | <WorldInfo title='SliderIntegerExample.x3d'/> |
| 17 | <ExternProtoDeclare name='SliderInteger' appinfo='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='height' type='SFFloat' accessType='initializeOnly'
appinfo='default value 1.0'/> |
| 19 |
<field name='radius' type='SFFloat' accessType='initializeOnly'
appinfo='default value 0.1'/> |
| 20 |
<field name='sliderBarColor' type='SFColor' accessType='initializeOnly'
appinfo='default value .8 .4 .8'/> |
| 21 |
<field name='sliderBallColor' type='SFColor' accessType='initializeOnly'
appinfo='default value .3 .4 .8'/> |
| 22 |
<field name='sliderEndColor' type='SFColor' accessType='initializeOnly'
appinfo='default value .2 .3 .9'/> |
| 23 |
<field name='min' type='SFInt32' accessType='initializeOnly'
appinfo='default value 0'/> |
| 24 |
<field name='max' type='SFInt32' accessType='initializeOnly'
appinfo='default value 10'/> |
| 25 |
<field name='value' type='SFInt32' accessType='initializeOnly'
appinfo='default value 0'/> |
| 26 |
<field name='setMin' type='SFInt32' accessType='inputOnly'
appinfo='set minimum value for slider bar'/> |
| 27 |
<field name='setMax' type='SFInt32' accessType='inputOnly'
appinfo='set maximum value for slider bar'/> |
| 28 |
<field name='setValue' type='SFInt32' accessType='inputOnly'
appinfo='set value for slider bar'/> |
| 29 |
<field name='valueChanged' type='SFInt32' accessType='outputOnly'
appinfo='output value for slider bar'/> |
| 30 |
<field name='barRadius' type='SFFloat' accessType='initializeOnly'
appinfo='default value 0.02'/> |
| 31 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='Enable/disable console output for troubleshooting'/> |
| 32 |
<field name='layoutDirection' type='SFString' accessType='initializeOnly'
appinfo='Allowed values: vertical, horizontal'/> |
| 33 | </ExternProtoDeclare> |
| 34 | <ExternProtoDeclare name='SingleTypeConversion' appinfo='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='decimalPlaces' type='SFInt32' accessType='initializeOnly'
appinfo='decimalPlaces is the number of significant digits after the decimal point, use -1 to indicate no round off'/> |
| 36 | <field name='setDecimalPlaces' type='SFInt32' accessType='inputOnly'/> |
| 37 | <field name='BooleanValue' type='SFBool' accessType='inputOnly'/> |
| 38 | <field name='FloatValue' type='SFFloat' accessType='inputOnly'/> |
| 39 | <field name='IntegerValue' type='SFInt32' accessType='inputOnly'/> |
| 40 | <field name='TimeValue' type='SFTime' accessType='inputOnly'/> |
| 41 | <field name='BooleanResult' type='SFBool' accessType='outputOnly'/> |
| 42 | <field name='FloatResult' type='SFFloat' accessType='outputOnly'/> |
| 43 | <field name='IntegerResult' type='SFInt32' accessType='outputOnly'/> |
| 44 | <field name='TimeResult' type='SFTime' accessType='outputOnly'/> |
| 45 | <field name='StringResult' type='SFString' accessType='outputOnly'/> |
| 46 | <field name='StringsResult' type='MFString' accessType='outputOnly'/> |
| 47 | </ExternProtoDeclare> |
| 48 | <!-- Scene graph begins here --> |
| 49 | <Viewpoint description='Drag slider ball to change values' position='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='SliderInteger' DEF='SliderExample'> |
| 71 | <fieldValue name='layoutDirection' value='horizontal'/> |
| 72 | <fieldValue name='height' value='5'/> |
| 73 | <fieldValue name='radius' value='0.1'/> |
| 74 | <fieldValue name='min' value='0'/> |
| 75 | <fieldValue name='max' value='24'/> |
| 76 | <fieldValue name='value' value='12'/> |
| 77 | <fieldValue name='sliderBarColor' value='0.8 0.4 0.8'/> |
| 78 | <fieldValue name='sliderBallColor' value='0.3 0.4 0.8'/> |
| 79 | <fieldValue name='sliderEndColor' value='0.2 0.3 0.9'/> |
| 80 | <fieldValue name='traceEnabled' value='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='SingleTypeConversion' DEF='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 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 |
ResultString
Text set_string MFString |
|
SliderExample
ProtoInstance valueChanged SFInt32 |
IntegerConverter
ProtoInstance IntegerValue SFInt32 |
then
|
IntegerConverter
ProtoInstance StringsResult MFString |
ResultString
Text set_string MFString |
<!--
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)
<ProtoInstance name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->