@prefix :        <https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/ScriptSimpleStateEvents.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_10, :meta_1_11, :meta_1_12 .
:meta_1_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'ScriptSimpleStateEvents.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'A Script node drives an animated push button that turns a light on and off.' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Leonard Daly and Don Brutzman' ;
  x3do:name 'creator' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '10 June 2006' ;
  x3do:name 'created' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '20 October 2019' ;
  x3do:name 'modified' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://X3dGraphics.com' ;
  x3do:name 'reference' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/X3dResources.html' ;
  x3do:name 'reference' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Copyright 2006, Daly Realism and Don Brutzman' ;
  x3do:name 'rights' .
:meta_1_9 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com' ;
  x3do:name 'subject' .
:meta_1_10 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/ScriptSimpleStateEvents.x3d' ;
  x3do:name 'identifier' .
:meta_1_11 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit' ;
  x3do:name 'generator' .
:meta_1_12 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "ScriptSimpleStateEvents.x3d" .
:meta dcterms:description "A Script node drives an animated push button that turns a light on and off." .
:meta dcterms:creator "Leonard Daly and Don Brutzman" .
:meta dcterms:created "10 June 2006" .
:meta dcterms:modified "20 October 2019" .
:meta dcterms:reference "https://X3dGraphics.com" .
:meta dcterms:reference "https://www.web3d.org/x3d/content/examples/X3dResources.html" .
:meta dcterms:rights "Copyright 2006, Daly Realism and Don Brutzman" .
:meta dcterms:subject "X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/ScriptSimpleStateEvents.x3d" .
:meta dcterms:generator "X3D-Edit 3.3, 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, :Background_2_2, :Viewpoint_2_3, :PushBox, :Lamp, :ControlScript ;
  x3do:hasROUTE :ROUTE_2_7, :ROUTE_2_8, :ROUTE_2_9 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'ScriptSimpleStateEvents.x3d' .
:Background_2_2 a owl:NamedIndividual, x3do:Background ;
  x3do:hasParent :Scene ;
  x3do:skyColor ( 1 1 1 ) .
:Viewpoint_2_3 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Scene ;
  x3do:description 'click switch to toggle light' ;
  x3do:orientation ( -0.993 0.101 -0.063 1.06 ) ;
  x3do:position ( 0.06 3.63 2.29 ) .
:PushBox a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :ControlBox, :ControlButton ;
  x3do:DEF 'PushBox' ;
  x3do:translation ( -2 0 0 ) .
:ControlBox a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :PushBox ;
  x3do:hasChildren :Shape_2_4_1_1 ;
  x3do:DEF 'ControlBox' .
:Shape_2_4_1_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :ControlBox ;
  x3do:hasAppearance :Appearance_2_4_1_1_1 ;
  x3do:hasGeometry :Box_2_4_1_1_2 .
:Appearance_2_4_1_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_4_1_1 ;
  x3do:hasMaterial :Material_2_4_1_1_1_1 .
:Material_2_4_1_1_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_4_1_1_1 ;
  x3do:diffuseColor ( 0 .8 0 ) .
:Box_2_4_1_1_2 a owl:NamedIndividual, x3do:Box ;
  x3do:hasParent :Shape_2_4_1_1 ;
  x3do:size ( 1 .5 1 ) .
:ControlButton a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :PushBox ;
  x3do:hasChildren :ButtonTouch, :Shape_2_4_2_2, :ButtonMover, :ButtonTimer ;
  x3do:hasROUTE :ROUTE_2_4_2_5, :ROUTE_2_4_2_6, :ROUTE_2_4_2_7 ;
  x3do:DEF 'ControlButton' ;
  x3do:translation ( 0 .25 0 ) .
:ButtonTouch a owl:NamedIndividual, x3do:TouchSensor ;
  x3do:hasParent :ControlButton ;
  x3do:DEF 'ButtonTouch' ;
  x3do:description 'touch to toggle' .
:Shape_2_4_2_2 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :ControlButton ;
  x3do:hasAppearance :Appearance_2_4_2_2_1 ;
  x3do:hasGeometry :Button .
:Appearance_2_4_2_2_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_4_2_2 ;
  x3do:hasMaterial :Material_2_4_2_2_1_1 .
:Material_2_4_2_2_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_4_2_2_1 ;
  x3do:diffuseColor ( 1 0 0 ) .
:Button a owl:NamedIndividual, x3do:Cylinder ;
  x3do:hasParent :Shape_2_4_2_2 ;
  x3do:DEF 'Button' ;
  x3do:bottom false ;
  x3do:height .5 ;
  x3do:radius .25 .
:ButtonMover a owl:NamedIndividual, x3do:PositionInterpolator ;
  x3do:hasParent :ControlButton ;
  x3do:DEF 'ButtonMover' ;
  x3do:key ( 0 1 ) ;
  x3do:keyValue ( 0 .25 0 0 .05 0 ) .
:ButtonTimer a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :ControlButton ;
  x3do:DEF 'ButtonTimer' .
:ROUTE_2_4_2_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ControlButton ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'ButtonTouch' ;
  x3do:toField 'startTime' ;
  x3do:toNode 'ButtonTimer' .
:ROUTE_2_4_2_6 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ControlButton ;
  x3do:fromField 'fraction_changed' ;
  x3do:fromNode 'ButtonTimer' ;
  x3do:toField 'set_fraction' ;
  x3do:toNode 'ButtonMover' .
:ROUTE_2_4_2_7 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ControlButton ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'ButtonMover' ;
  x3do:toField 'translation' ;
  x3do:toNode 'ControlButton' .
:Lamp a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Base, :Bulb ;
  x3do:DEF 'Lamp' ;
  x3do:translation ( 1 0 0 ) .
:Base a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Lamp ;
  x3do:hasChildren :Shape_2_5_1_1 ;
  x3do:DEF 'Base' .
:Shape_2_5_1_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Base ;
  x3do:hasAppearance :Appearance_2_5_1_1_1 ;
  x3do:hasGeometry :Cylinder_2_5_1_1_2 .
:Appearance_2_5_1_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_5_1_1 ;
  x3do:hasMaterial :Material_2_5_1_1_1_1 .
:Material_2_5_1_1_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_5_1_1_1 .
:Cylinder_2_5_1_1_2 a owl:NamedIndividual, x3do:Cylinder ;
  x3do:hasParent :Shape_2_5_1_1 ;
  x3do:height .5 ;
  x3do:radius .25 .
:Bulb a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Lamp ;
  x3do:hasChildren :Shape_2_5_2_1 ;
  x3do:DEF 'Bulb' ;
  x3do:translation ( 0 .5 0 ) .
:Shape_2_5_2_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Bulb ;
  x3do:hasAppearance :Appearance_2_5_2_1_1 ;
  x3do:hasGeometry :Sphere_2_5_2_1_2 .
:Appearance_2_5_2_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_5_2_1 ;
  x3do:hasMaterial :LightBulbMaterial .
:LightBulbMaterial a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_5_2_1_1 ;
  x3do:DEF 'LightBulbMaterial' ;
  x3do:diffuseColor ( .4 .4 .4 ) .
:Sphere_2_5_2_1_2 a owl:NamedIndividual, x3do:Sphere ;
  x3do:hasParent :Shape_2_5_2_1 ;
  x3do:radius .5 .
:ControlScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :Scene ;
  x3do:hasField :field_2_6_1, :field_2_6_2, :field_2_6_3, :field_2_6_4 ;
  x3do:DEF 'ControlScript' ;
  x3do:url '"ScriptSimpleStateEvents.js" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/ScriptSimpleStateEvents.js"' .
:field_2_6_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ControlScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'buttonDown' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:field_2_6_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ControlScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'buttonTimerActive' ;
  x3do:type 'SFBool' .
:field_2_6_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ControlScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'newButtonPath' ;
  x3do:type 'MFVec3f' .
:field_2_6_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ControlScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'lightColor' ;
  x3do:type 'SFColor' .
:ROUTE_2_7 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'isActive' ;
  x3do:fromNode 'ButtonTimer' ;
  x3do:toField 'buttonTimerActive' ;
  x3do:toNode 'ControlScript' .
:ROUTE_2_8 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'newButtonPath' ;
  x3do:fromNode 'ControlScript' ;
  x3do:toField 'keyValue' ;
  x3do:toNode 'ButtonMover' .
:ROUTE_2_9 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'lightColor' ;
  x3do:fromNode 'ControlScript' ;
  x3do:toField 'diffuseColor' ;
  x3do:toNode 'LightBulbMaterial' .
