@prefix :        <https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/PushButtonPrototype.ttl#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema:  <http://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix x3d:     <https://www.web3d.org/specifications/x3d-4.0.xsd#> .
@prefix x3do:    <https://www.web3d.org/specifications/X3dOntology4.0#> .

:X3D a owl:NamedIndividual, x3do:X3D ;
  x3do:hasHead :head ;
  x3do:hasScene :Scene ;
  x3do:profile 'Immersive' ;
  x3do:version '3.3' ;
  x3do:noNamespaceSchemaLocation 'https://www.web3d.org/specifications/x3d-3.3.xsd' .
:head a owl:NamedIndividual, x3do:head ;
  x3do:hasParent :X3D ;
  x3do:hasMeta :meta_1_1, :meta_1_2, :meta_1_3, :meta_1_4, :meta_1_5, :meta_1_6, :meta_1_7, :meta_1_8, :meta_1_9 .
:meta_1_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'PushButtonPrototype.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'PushButton widget prototype declaration, inner button and outer shape can be round or square' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Don Brutzman, Murat Onder and MV4205 class, Spring 2004 Quarter' ;
  x3do:name 'creator' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '11 May 2004' ;
  x3do:name 'created' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '2 January 2025' ;
  x3do:name 'modified' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'PushButtonExample.x3d' ;
  x3do:name 'reference' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/PushButtonPrototype.x3d' ;
  x3do:name 'identifier' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit' ;
  x3do:name 'generator' .
:meta_1_9 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "PushButtonPrototype.x3d" .
:meta dcterms:description "PushButton widget prototype declaration, inner button and outer shape can be round or square" .
:meta dcterms:creator "Don Brutzman, Murat Onder and MV4205 class, Spring 2004 Quarter" .
:meta dcterms:created "11 May 2004" .
:meta dcterms:modified "2 January 2025" .
:meta dcterms:reference "PushButtonExample.x3d" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/PushButtonPrototype.x3d" .
:meta dcterms:generator "X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit" .
:meta dcterms:license "../../license.html" .
:Scene a owl:NamedIndividual, x3do:Scene ;
  x3do:hasParent :X3D ;
  x3do:hasChildren :WorldInfo_2_1, :Anchor_2_5 ;
  x3do:hasExternProtoDeclare :ExternProtoDeclare_2_2, :ExternProtoDeclare_2_3 ;
  x3do:hasProtoDeclare :ProtoDeclare_2_4 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'PushButtonPrototype.x3d' .
:ExternProtoDeclare_2_2 a owl:NamedIndividual, x3do:ExternProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasField :field_2_2_1, :field_2_2_2, :field_2_2_3, :field_2_2_4, :field_2_2_5, :field_2_2_6, :field_2_2_7 ;
  x3do:appinfo 'MaterialToggle selects one of two different Material values' ;
  x3do:name 'MaterialToggle' ;
  x3do:url '"MaterialTogglePrototype.x3d#MaterialToggle" "../../Tools/Animation/MaterialTogglePrototype.x3d#MaterialToggle" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/MaterialTogglePrototype.x3d#MaterialToggle" "../../Tools/Animation/MaterialTogglePrototype.wrl#MaterialToggle" "MaterialTogglePrototype.wrl#MaterialToggle" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/MaterialTogglePrototype.wrl#MaterialToggle"' .
:field_2_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Material node that is enabled when toggle=false' ;
  x3do:name 'defaultMaterial' ;
  x3do:type 'SFNode' .
:field_2_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Material node that is enabled when toggle=true' ;
  x3do:name 'toggleMaterial' ;
  x3do:type 'SFNode' .
:field_2_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_toggle' ;
  x3do:type 'SFBool' .
:field_2_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'provide replacement default Material node' ;
  x3do:name 'set_defaultMaterial' ;
  x3do:type 'SFNode' .
:field_2_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'whether to use DefaultMaterial or ToggleMaterial' ;
  x3do:name 'toggle' ;
  x3do:type 'SFBool' .
:field_2_2_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'toggle_changed' ;
  x3do:type 'SFBool' .
:field_2_2_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'provide replacement toggle Material node' ;
  x3do:name 'set_toggleMaterial' ;
  x3do:type 'SFNode' .
:ExternProtoDeclare_2_3 a owl:NamedIndividual, x3do:ExternProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasField :field_2_3_1, :field_2_3_2, :field_2_3_3, :field_2_3_4, :field_2_3_5, :field_2_3_6 ;
  x3do:appinfo 'TimeSensor functionality commences after delayInterval pause' ;
  x3do:name 'TimeDelaySensor' ;
  x3do:url '"TimeDelaySensorPrototype.x3d#TimeDelaySensor" "../../Tools/Animation/TimeDelaySensorPrototype.x3d#TimeDelaySensor" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/TimeDelaySensorPrototype.x3d#TimeDelaySensor" "../../Tools/Animation/TimeDelaySensorPrototype.wrl#TimeDelaySensor" "TimeDelaySensorPrototype.wrl#TimeDelaySensor" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/TimeDelaySensorPrototype.wrl#TimeDelaySensor"' .
:field_2_3_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_3 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'when current time exceeds startTime, isActive becomes true and sensor becomes active' ;
  x3do:name 'startTime' ;
  x3do:type 'SFTime' .
:field_2_3_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_3 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'seconds' ;
  x3do:name 'delayInterval' ;
  x3do:type 'SFTime' .
:field_2_3_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_3 ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'delayCompleteTime' ;
  x3do:type 'SFTime' .
:field_2_3_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_3 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'whether sensor is active' ;
  x3do:name 'enabled' ;
  x3do:type 'SFBool' .
:field_2_3_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_3 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'describe the purpose of this sensor' ;
  x3do:name 'description' ;
  x3do:type 'SFString' .
:field_2_3_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_3 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'traceEnabled' ;
  x3do:type 'SFBool' .
:ProtoDeclare_2_4 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_4_1 ;
  x3do:hasProtoBody :ProtoBody_2_4_2 ;
  x3do:appinfo 'PushButton widget, inner button and outer shape can be round or square' ;
  x3do:name 'PushButton' .
:ProtoInterface_2_4_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_4 ;
  x3do:hasField :field_2_4_1_1, :field_2_4_1_2, :field_2_4_1_3, :field_2_4_1_4, :field_2_4_1_5, :field_2_4_1_6, :field_2_4_1_7, :field_2_4_1_8, :field_2_4_1_9, :field_2_4_1_10 .
:field_2_4_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'enables the console print-out in case of assigning wrong values default is true' ;
  x3do:name 'traceEnabled' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:field_2_4_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:hasMaterial :Blue ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'outerShapeMaterial' ;
  x3do:type 'SFNode' .
:Blue a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :field_2_4_1_2 ;
  x3do:DEF 'Blue' ;
  x3do:diffuseColor ( 0 0 1 ) .
:field_2_4_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:hasMaterial :Red ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'defaultMaterial for inner pushbutton' ;
  x3do:name 'defaultMaterial' ;
  x3do:type 'SFNode' .
:Red a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :field_2_4_1_3 ;
  x3do:DEF 'Red' ;
  x3do:diffuseColor ( 0.8 0.1 0 ) .
:field_2_4_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:hasMaterial :Green ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'toggleMaterial for inner pushbutton' ;
  x3do:name 'toggleMaterial' ;
  x3do:type 'SFNode' .
:Green a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :field_2_4_1_4 ;
  x3do:DEF 'Green' ;
  x3do:diffuseColor ( 0.1 0.8 0 ) .
:field_2_4_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'boolean output of button selection' ;
  x3do:name 'value_changed' ;
  x3do:type 'SFBool' .
:field_2_4_1_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'allowed values: round or square default is round' ;
  x3do:name 'outerSwitchStyle' ;
  x3do:type 'SFString' ;
  x3do:value 'round' .
:field_2_4_1_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'allowed values: round or square default is round' ;
  x3do:name 'set_outerSwitchStyle' ;
  x3do:type 'SFString' .
:field_2_4_1_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'allowed values: round square. default is round' ;
  x3do:name 'innerSwitchStyle' ;
  x3do:type 'SFString' ;
  x3do:value 'round' .
:field_2_4_1_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'allowed values: round square. default is round' ;
  x3do:name 'set_innerSwitchStyle' ;
  x3do:type 'SFString' .
:field_2_4_1_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'time delay for button movement so for color change default is 0.5 sec.' ;
  x3do:name 'delayInterval' ;
  x3do:type 'SFTime' ;
  x3do:value '.5' .
:ProtoBody_2_4_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_4 ;
  x3do:hasChildren :Group_2_4_2_1, :Script_2_4_2_2 .
:Group_2_4_2_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_4_2 ;
  x3do:hasChildren :DelayTimer, :OuterShapeTransform, :InnerShapeTransform, :AnimationGroup .
:DelayTimer a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Group_2_4_2_1 ;
  x3do:hasIS :IS_2_4_2_1_1_1 ;
  x3do:DEF 'DelayTimer' ;
  x3do:name 'TimeDelaySensor' .
:IS_2_4_2_1_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :DelayTimer ;
  x3do:hasConnect :connect_2_4_2_1_1_1_1 .
:connect_2_4_2_1_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_1_1 ;
  x3do:nodeField 'delayInterval' ;
  x3do:protoField 'delayInterval' .
:OuterShapeTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_4_2_1 ;
  x3do:hasChildren :OuterShapeSwitchRound, :OuterShapeSwitchSquare ;
  x3do:DEF 'OuterShapeTransform' ;
  x3do:rotation ( 1 0 0 1.57 ) .
:OuterShapeSwitchRound a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :OuterShapeTransform ;
  x3do:hasChildren :Shape_2_4_2_1_2_1_1 ;
  x3do:DEF 'OuterShapeSwitchRound' ;
  x3do:whichChoice -1 .
:Shape_2_4_2_1_2_1_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :OuterShapeSwitchRound ;
  x3do:hasGeometry :Cylinder_2_4_2_1_2_1_1_1 ;
  x3do:hasAppearance :Appearance_2_4_2_1_2_1_1_2 .
:Cylinder_2_4_2_1_2_1_1_1 a owl:NamedIndividual, x3do:Cylinder ;
  x3do:hasParent :Shape_2_4_2_1_2_1_1 ;
  x3do:height .12 ;
  x3do:radius .5 .
:Appearance_2_4_2_1_2_1_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_4_2_1_2_1_1 ;
  x3do:hasIS :IS_2_4_2_1_2_1_1_2_1 .
:IS_2_4_2_1_2_1_1_2_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :Appearance_2_4_2_1_2_1_1_2 ;
  x3do:hasConnect :connect_2_4_2_1_2_1_1_2_1_1 .
:connect_2_4_2_1_2_1_1_2_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_2_1_1_2_1 ;
  x3do:nodeField 'material' ;
  x3do:protoField 'outerShapeMaterial' .
:OuterShapeSwitchSquare a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :OuterShapeTransform ;
  x3do:hasChildren :Shape_2_4_2_1_2_2_1 ;
  x3do:DEF 'OuterShapeSwitchSquare' ;
  x3do:whichChoice -1 .
:Shape_2_4_2_1_2_2_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :OuterShapeSwitchSquare ;
  x3do:hasGeometry :Box_2_4_2_1_2_2_1_1 ;
  x3do:hasAppearance :Appearance_2_4_2_1_2_2_1_2 .
:Box_2_4_2_1_2_2_1_1 a owl:NamedIndividual, x3do:Box ;
  x3do:hasParent :Shape_2_4_2_1_2_2_1 ;
  x3do:size ( 1 .12 1 ) .
:Appearance_2_4_2_1_2_2_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_4_2_1_2_2_1 ;
  x3do:hasIS :IS_2_4_2_1_2_2_1_2_1 .
:IS_2_4_2_1_2_2_1_2_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :Appearance_2_4_2_1_2_2_1_2 ;
  x3do:hasConnect :connect_2_4_2_1_2_2_1_2_1_1 .
:connect_2_4_2_1_2_2_1_2_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_2_2_1_2_1 ;
  x3do:nodeField 'material' ;
  x3do:protoField 'outerShapeMaterial' .
:InnerShapeTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_4_2_1 ;
  x3do:hasChildren :InnerShapeSwitchRound, :InnerShapeSwitchSquare, :Sound_2_4_2_1_3_3, :Toucher ;
  x3do:hasROUTE :ROUTE_2_4_2_1_3_5, :ROUTE_2_4_2_1_3_6 ;
  x3do:DEF 'InnerShapeTransform' ;
  x3do:rotation ( 1 0 0 1.57 ) ;
  x3do:translation ( 0 0 .1 ) .
:InnerShapeSwitchRound a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :InnerShapeTransform ;
  x3do:hasChildren :Shape_2_4_2_1_3_1_1 ;
  x3do:DEF 'InnerShapeSwitchRound' ;
  x3do:whichChoice -1 .
:Shape_2_4_2_1_3_1_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :InnerShapeSwitchRound ;
  x3do:hasGeometry :Cylinder_2_4_2_1_3_1_1_1 ;
  x3do:hasAppearance :Appearance_2_4_2_1_3_1_1_2 .
:Cylinder_2_4_2_1_3_1_1_1 a owl:NamedIndividual, x3do:Cylinder ;
  x3do:hasParent :Shape_2_4_2_1_3_1_1 ;
  x3do:height .12 ;
  x3do:radius .35 .
:Appearance_2_4_2_1_3_1_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_4_2_1_3_1_1 ;
  x3do:hasMaterial :PushButtonToggleMaterial .
:PushButtonToggleMaterial a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Appearance_2_4_2_1_3_1_1_2 ;
  x3do:hasIS :IS_2_4_2_1_3_1_1_2_1_1 ;
  x3do:DEF 'PushButtonToggleMaterial' ;
  x3do:name 'MaterialToggle' .
:IS_2_4_2_1_3_1_1_2_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :PushButtonToggleMaterial ;
  x3do:hasConnect :connect_2_4_2_1_3_1_1_2_1_1_1, :connect_2_4_2_1_3_1_1_2_1_1_2 .
:connect_2_4_2_1_3_1_1_2_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_3_1_1_2_1_1 ;
  x3do:nodeField 'defaultMaterial' ;
  x3do:protoField 'defaultMaterial' .
:connect_2_4_2_1_3_1_1_2_1_1_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_3_1_1_2_1_1 ;
  x3do:nodeField 'toggleMaterial' ;
  x3do:protoField 'toggleMaterial' .
:InnerShapeSwitchSquare a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :InnerShapeTransform ;
  x3do:hasChildren :Shape_2_4_2_1_3_2_1 ;
  x3do:DEF 'InnerShapeSwitchSquare' ;
  x3do:whichChoice -1 .
:Shape_2_4_2_1_3_2_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :InnerShapeSwitchSquare ;
  x3do:hasGeometry :Box_2_4_2_1_3_2_1_1 ;
  x3do:hasAppearance :Appearance_2_4_2_1_3_2_1_2 .
:Box_2_4_2_1_3_2_1_1 a owl:NamedIndividual, x3do:Box ;
  x3do:hasParent :Shape_2_4_2_1_3_2_1 ;
  x3do:size ( .57 .12 .57 ) .
:Appearance_2_4_2_1_3_2_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_4_2_1_3_2_1 ;
  x3do:hasMaterial :PushButtonToggleMaterial-USE-1 .
:PushButtonToggleMaterial-USE-1 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Appearance_2_4_2_1_3_2_1_2 ;
  owl:sameAs :PushButtonToggleMaterial . # DEF matching this USE
:Sound_2_4_2_1_3_3 a owl:NamedIndividual, x3do:Sound ;
  x3do:hasParent :InnerShapeTransform ;
  x3do:hasSource :ClickAudio .
:ClickAudio a owl:NamedIndividual, x3do:AudioClip ;
  x3do:hasParent :Sound_2_4_2_1_3_3 ;
  x3do:DEF 'ClickAudio' ;
  x3do:description 'click sound' ;
  x3do:url '"click.wav" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/click.wav"' .
:Toucher a owl:NamedIndividual, x3do:TouchSensor ;
  x3do:hasParent :InnerShapeTransform ;
  x3do:DEF 'Toucher' ;
  x3do:description 'touch to push the button' .
:ROUTE_2_4_2_1_3_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :InnerShapeTransform ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'Toucher' ;
  x3do:toField 'set_startTime' ;
  x3do:toNode 'ClickAudio' .
:ROUTE_2_4_2_1_3_6 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :InnerShapeTransform ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'Toucher' ;
  x3do:toField 'startTime' ;
  x3do:toNode 'DelayTimer' .
:AnimationGroup a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :Group_2_4_2_1 ;
  x3do:hasChildren :Clock1, :SwitchAnimator1, :Clock2, :SwitchAnimator2, :BooleanToggler ;
  x3do:hasROUTE :ROUTE_2_4_2_1_4_2, :ROUTE_2_4_2_1_4_4, :ROUTE_2_4_2_1_4_5, :ROUTE_2_4_2_1_4_7, :ROUTE_2_4_2_1_4_9, :ROUTE_2_4_2_1_4_10, :ROUTE_2_4_2_1_4_12, :ROUTE_2_4_2_1_4_13 ;
  x3do:DEF 'AnimationGroup' .
:Clock1 a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :AnimationGroup ;
  x3do:DEF 'Clock1' .
:ROUTE_2_4_2_1_4_2 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :AnimationGroup ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'Toucher' ;
  x3do:toField 'set_startTime' ;
  x3do:toNode 'Clock1' .
:SwitchAnimator1 a owl:NamedIndividual, x3do:PositionInterpolator ;
  x3do:hasParent :AnimationGroup ;
  x3do:DEF 'SwitchAnimator1' ;
  x3do:key ( 0 .5 1 ) ;
  x3do:keyValue ( 0 0 .1 0 0 .05 0 0 .007 ) .
:ROUTE_2_4_2_1_4_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :AnimationGroup ;
  x3do:fromField 'fraction_changed' ;
  x3do:fromNode 'Clock1' ;
  x3do:toField 'set_fraction' ;
  x3do:toNode 'SwitchAnimator1' .
:ROUTE_2_4_2_1_4_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :AnimationGroup ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'SwitchAnimator1' ;
  x3do:toField 'set_translation' ;
  x3do:toNode 'InnerShapeTransform' .
:Clock2 a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :AnimationGroup ;
  x3do:DEF 'Clock2' .
:ROUTE_2_4_2_1_4_7 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :AnimationGroup ;
  x3do:fromField 'delayCompleteTime' ;
  x3do:fromNode 'DelayTimer' ;
  x3do:toField 'set_startTime' ;
  x3do:toNode 'Clock2' .
:SwitchAnimator2 a owl:NamedIndividual, x3do:PositionInterpolator ;
  x3do:hasParent :AnimationGroup ;
  x3do:DEF 'SwitchAnimator2' ;
  x3do:key ( 0 .5 1 ) ;
  x3do:keyValue ( 0 0 .007 0 0 .05 0 0 .1 ) .
:ROUTE_2_4_2_1_4_9 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :AnimationGroup ;
  x3do:fromField 'fraction_changed' ;
  x3do:fromNode 'Clock2' ;
  x3do:toField 'set_fraction' ;
  x3do:toNode 'SwitchAnimator2' .
:ROUTE_2_4_2_1_4_10 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :AnimationGroup ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'SwitchAnimator2' ;
  x3do:toField 'set_translation' ;
  x3do:toNode 'InnerShapeTransform' .
:BooleanToggler a owl:NamedIndividual, x3do:BooleanToggle ;
  x3do:hasParent :AnimationGroup ;
  x3do:hasIS :IS_2_4_2_1_4_11_1 ;
  x3do:DEF 'BooleanToggler' .
:IS_2_4_2_1_4_11_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :BooleanToggler ;
  x3do:hasConnect :connect_2_4_2_1_4_11_1_1 .
:connect_2_4_2_1_4_11_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_4_11_1 ;
  x3do:nodeField 'toggle_changed' ;
  x3do:protoField 'value_changed' .
:ROUTE_2_4_2_1_4_12 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :AnimationGroup ;
  x3do:fromField 'isActive' ;
  x3do:fromNode 'Clock2' ;
  x3do:toField 'set_boolean' ;
  x3do:toNode 'BooleanToggler' .
:ROUTE_2_4_2_1_4_13 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :AnimationGroup ;
  x3do:fromField 'toggle_changed' ;
  x3do:fromNode 'BooleanToggler' ;
  x3do:toField 'set_toggle' ;
  x3do:toNode 'PushButtonToggleMaterial' .
:Script_2_4_2_2 a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :ProtoBody_2_4_2 ;
  x3do:hasField :field_2_4_2_2_1, :field_2_4_2_2_2, :field_2_4_2_2_3, :field_2_4_2_2_4, :field_2_4_2_2_5, :field_2_4_2_2_6, :field_2_4_2_2_7, :field_2_4_2_2_8, :field_2_4_2_2_9, :field_2_4_2_2_10, :field_2_4_2_2_11, :field_2_4_2_2_12 ;
  x3do:hasIS :IS_2_4_2_2_13 ;
  x3do:directOutput true ;
  x3do:sourceCode """
ecmascript:

function initialize()
{
   clock1.cycleInterval = delayInterval;
   clock2.cycleInterval = delayInterval;

   set_innerSwitchStyle(innerSwitchStyle);
   set_outerSwitchStyle(outerSwitchStyle);
}

function set_innerSwitchStyle(stringValue)
{
   if (stringValue != null)  //security check
   {
      if (stringValue != 'round')
      {
         if (stringValue != 'square')
         {
            printError(stringValue, 'inner');
            innerSwitchStyle = 'round';
         }
         else
         {
            innerSwitchStyle = stringValue;
         }
      }
      else
      {
          innerSwitchStyle = stringValue;
      }
   }

   if      (innerSwitchStyle == 'round')
   {
        switchInnerSquare.whichChoice = -1;
         switchInnerRound.whichChoice =  0;
   }
   else // (innerSwitchStyle == 'square')
   {
        switchInnerSquare.whichChoice =  0;
         switchInnerRound.whichChoice = -1;
   }
}

function set_outerSwitchStyle(stringValue)
{
   if (stringValue != null)    //security check
   {
      if (stringValue != 'round')
      {
         if (stringValue != 'square')
         {
            printError(stringValue, 'outer');
            outerSwitchStyle = 'round';
         }
         else
         {
            outerSwitchStyle = stringValue;
         }
      }
      else
      {
          outerSwitchStyle = stringValue;
      }
   }

   if      (outerSwitchStyle == 'round')
   {
        switchOuterSquare.whichChoice = -1;
         switchOuterRound.whichChoice =  0;
   }
   else // (outerSwitchStyle == 'square')
   {
        switchOuterSquare.whichChoice =  0;
         switchOuterRound.whichChoice = -1;
   }
}

function printError(s1, s2)
{
    if (traceEnabled)
    {
        Browser.println ('\nAllowed values are [round] and [square].');
        Browser.println ('Assigned value [' + s1 + '] (The values are case/whitespace-sensitive).');
        Browser.println ('Default value  [round] will be used for [' + s2 + 'SwitchStyle].');
    }
}
""" .
:field_2_4_2_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'traceEnabled' ;
  x3do:type 'SFBool' .
:field_2_4_2_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'delayInterval' ;
  x3do:type 'SFTime' .
:field_2_4_2_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'allowed values: round square. default is round' ;
  x3do:name 'outerSwitchStyle' ;
  x3do:type 'SFString' .
:field_2_4_2_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'allowed values: round square. default is round' ;
  x3do:name 'set_outerSwitchStyle' ;
  x3do:type 'SFString' .
:field_2_4_2_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'allowed values: round square. default is round' ;
  x3do:name 'innerSwitchStyle' ;
  x3do:type 'SFString' .
:field_2_4_2_2_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'allowed values: round square. default is round' ;
  x3do:name 'set_innerSwitchStyle' ;
  x3do:type 'SFString' .
:field_2_4_2_2_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:hasChildren :OuterShapeSwitchRound-USE-1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'switchOuterRound' ;
  x3do:type 'SFNode' .
:OuterShapeSwitchRound-USE-1 a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :field_2_4_2_2_7 ;
  owl:sameAs :OuterShapeSwitchRound . # DEF matching this USE
:field_2_4_2_2_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:hasChildren :OuterShapeSwitchSquare-USE-1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'switchOuterSquare' ;
  x3do:type 'SFNode' .
:OuterShapeSwitchSquare-USE-1 a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :field_2_4_2_2_8 ;
  owl:sameAs :OuterShapeSwitchSquare . # DEF matching this USE
:field_2_4_2_2_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:hasChildren :InnerShapeSwitchRound-USE-1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'switchInnerRound' ;
  x3do:type 'SFNode' .
:InnerShapeSwitchRound-USE-1 a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :field_2_4_2_2_9 ;
  owl:sameAs :InnerShapeSwitchRound . # DEF matching this USE
:field_2_4_2_2_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:hasChildren :InnerShapeSwitchSquare-USE-1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'switchInnerSquare' ;
  x3do:type 'SFNode' .
:InnerShapeSwitchSquare-USE-1 a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :field_2_4_2_2_10 ;
  owl:sameAs :InnerShapeSwitchSquare . # DEF matching this USE
:field_2_4_2_2_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:hasChildren :Clock1-USE-1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'clock1' ;
  x3do:type 'SFNode' .
:Clock1-USE-1 a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :field_2_4_2_2_11 ;
  owl:sameAs :Clock1 . # DEF matching this USE
:field_2_4_2_2_12 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:hasChildren :Clock2-USE-1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'clock2' ;
  x3do:type 'SFNode' .
:Clock2-USE-1 a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :field_2_4_2_2_12 ;
  owl:sameAs :Clock2 . # DEF matching this USE
:IS_2_4_2_2_13 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :Script_2_4_2_2 ;
  x3do:hasConnect :connect_2_4_2_2_13_1, :connect_2_4_2_2_13_2, :connect_2_4_2_2_13_3, :connect_2_4_2_2_13_4, :connect_2_4_2_2_13_5, :connect_2_4_2_2_13_6 .
:connect_2_4_2_2_13_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_2_13 ;
  x3do:nodeField 'traceEnabled' ;
  x3do:protoField 'traceEnabled' .
:connect_2_4_2_2_13_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_2_13 ;
  x3do:nodeField 'outerSwitchStyle' ;
  x3do:protoField 'outerSwitchStyle' .
:connect_2_4_2_2_13_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_2_13 ;
  x3do:nodeField 'set_outerSwitchStyle' ;
  x3do:protoField 'set_outerSwitchStyle' .
:connect_2_4_2_2_13_4 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_2_13 ;
  x3do:nodeField 'innerSwitchStyle' ;
  x3do:protoField 'innerSwitchStyle' .
:connect_2_4_2_2_13_5 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_2_13 ;
  x3do:nodeField 'set_innerSwitchStyle' ;
  x3do:protoField 'set_innerSwitchStyle' .
:connect_2_4_2_2_13_6 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_2_13 ;
  x3do:nodeField 'delayInterval' ;
  x3do:protoField 'delayInterval' .
:Anchor_2_5 a owl:NamedIndividual, x3do:Anchor ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Shape_2_5_1 ;
  x3do:description 'PushButtonExample' ;
  x3do:parameter '"target=_blank"' ;
  x3do:url '"PushButtonExample.x3d" "../../Tools/Animation/PushButtonExample.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/PushButtonExample.x3d" "../../Tools/Animation/PushButtonExample.wrl" "PushButtonExample.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/PushButtonExample.wrl"' .
:Shape_2_5_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Anchor_2_5 ;
  x3do:hasGeometry :Text_2_5_1_1 ;
  x3do:hasAppearance :Appearance_2_5_1_2 .
:Text_2_5_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :Shape_2_5_1 ;
  x3do:hasFontStyle :FontStyle_2_5_1_1_1 ;
  x3do:string '"PushButtonPrototype" "defines a prototype" "" "Click text to see example scene" "" "You can define 4 different buttons" "with the combination of round and square" "(default is round-round)"' .
:FontStyle_2_5_1_1_1 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_5_1_1 ;
  x3do:justify '"MIDDLE" "MIDDLE"' ;
  x3do:size 0.7 .
:Appearance_2_5_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_5_1 ;
  x3do:hasMaterial :Material_2_5_1_2_1 .
:Material_2_5_1_2_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_5_1_2 ;
  x3do:diffuseColor ( .8 .7 0.2 ) .
