@prefix :        <https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorExamples.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 'MaterialModulatorExamples.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Demonstrate multiple instances of an external prototype.' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Learning suggestion for authors: try changing the modulation script so that it goes from [0 ... 1] and then [1 ... 0] alternating, rather than abruptly shifting from 1 immediately back to 0.' ;
  x3do:name 'hint' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Don Brutzman' ;
  x3do:name 'creator' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '7 September 2017' ;
  x3do:name 'created' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '2 January 2025' ;
  x3do:name 'modified' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D prototype instances DEF USE' ;
  x3do:name 'subject' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'MaterialModulator.png' ;
  x3do:name 'Image' .
:meta_1_9 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'MaterialModulatorExamples.png' ;
  x3do:name 'Image' .
:meta_1_10 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorExamples.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 "MaterialModulatorExamples.x3d" .
:meta dcterms:description "Demonstrate multiple instances of an external prototype." .
:meta dcterms:hint "Learning suggestion for authors: try changing the modulation script so that it goes from [0 ... 1] and then [1 ... 0] alternating, rather than abruptly shifting from 1 immediately back to 0." .
:meta dcterms:creator "Don Brutzman" .
:meta dcterms:created "7 September 2017" .
:meta dcterms:modified "2 January 2025" .
:meta dcterms:subject "X3D prototype instances DEF USE" .
:meta dcterms:Image "MaterialModulator.png" .
:meta dcterms:Image "MaterialModulatorExamples.png" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorExamples.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, :Transform_2_3, :Transform_2_4, :Transform_2_5, :Transform_2_6, :Transform_2_7 ;
  x3do:hasExternProtoDeclare :ExternProtoDeclare_2_2 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'MaterialModulatorExamples.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 'mimic a Material node and modulate the diffuseColor field as an animation effect' ;
  x3do:documentation 'https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html' ;
  x3do:name 'MaterialModulator' ;
  x3do:url '"MaterialModulator.x3d#MaterialModulator" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulator.x3d#MaterialModulator"' .
:field_2_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'default value true' ;
  x3do:name 'enabled' ;
  x3do:type 'SFBool' .
:field_2_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'default value 0.8 0.8 0.8' ;
  x3do:name 'diffuseColor' ;
  x3do:type 'SFColor' .
:field_2_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'default value 0 0 0' ;
  x3do:name 'emissiveColor' ;
  x3do:type 'SFColor' .
:field_2_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'default value 0 0 0' ;
  x3do:name 'specularColor' ;
  x3do:type 'SFColor' .
:field_2_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'default value 0.0' ;
  x3do:name 'transparency' ;
  x3do:type 'SFFloat' .
:field_2_2_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'default value 0.2' ;
  x3do:name 'shininess' ;
  x3do:type 'SFFloat' .
:field_2_2_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'default value 0.2' ;
  x3do:name 'ambientIntensity' ;
  x3do:type 'SFFloat' .
:Transform_2_3 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :ModulatingBoxShape ;
  x3do:rotation ( -0.8 0.93923 0.18785 5.759586 ) ;
  x3do:translation ( -2 1 0 ) .
:ModulatingBoxShape a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_3 ;
  x3do:hasGeometry :Box_2_3_1_1 ;
  x3do:hasAppearance :Appearance_2_3_1_2 ;
  x3do:DEF 'ModulatingBoxShape' .
:Box_2_3_1_1 a owl:NamedIndividual, x3do:Box ;
  x3do:hasParent :ModulatingBoxShape .
:Appearance_2_3_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :ModulatingBoxShape ;
  x3do:hasMaterial :MaterialModulatorInstance .
:MaterialModulatorInstance a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Appearance_2_3_1_2 ;
  x3do:hasFieldValue :fieldValue_2_3_1_2_1_1, :fieldValue_2_3_1_2_1_2 ;
  x3do:DEF 'MaterialModulatorInstance' ;
  x3do:name 'MaterialModulator' .
:fieldValue_2_3_1_2_1_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :MaterialModulatorInstance ;
  x3do:name 'enabled' ;
  x3do:value true .
:fieldValue_2_3_1_2_1_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :MaterialModulatorInstance ;
  x3do:name 'diffuseColor' ;
  x3do:value ( 0.5 0.1 0.1 ) .
:Transform_2_4 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Shape_2_4_1 ;
  x3do:rotation ( 1 0 0 0.523599 ) ;
  x3do:translation ( 2 1 0 ) .
:Shape_2_4_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_4 ;
  x3do:hasGeometry :Cylinder_2_4_1_1 ;
  x3do:hasAppearance :Appearance_2_4_1_2 .
:Cylinder_2_4_1_1 a owl:NamedIndividual, x3do:Cylinder ;
  x3do:hasParent :Shape_2_4_1 .
:Appearance_2_4_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_4_1 ;
  x3do:hasMaterial :MaterialModulatorInstance-USE-1 .
:MaterialModulatorInstance-USE-1 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Appearance_2_4_1_2 ;
  owl:sameAs :MaterialModulatorInstance . # DEF matching this USE
:Transform_2_5 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Shape_2_5_1 ;
  x3do:translation ( -2 3.5 0 ) .
:Shape_2_5_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_5 ;
  x3do:hasGeometry :Text_2_5_1_1 ;
  x3do:hasAppearance :TextAppearance .
: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 '"DEF original"' .
:FontStyle_2_5_1_1_1 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_5_1_1 ;
  x3do:family '"SANS"' ;
  x3do:justify '"MIDDLE" "MIDDLE"' ;
  x3do:size 0.5 ;
  x3do:cssStyle 'BOLD' .
:TextAppearance a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_5_1 ;
  x3do:hasMaterial :Material_2_5_1_2_1 ;
  x3do:DEF 'TextAppearance' .
:Material_2_5_1_2_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :TextAppearance ;
  x3do:diffuseColor ( 0.9 0.9 0.9 ) .
:Transform_2_6 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Shape_2_6_1 ;
  x3do:translation ( 2 3.5 0 ) .
:Shape_2_6_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_6 ;
  x3do:hasGeometry :Text_2_6_1_1 ;
  x3do:hasAppearance :TextAppearance-USE-1 .
:Text_2_6_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :Shape_2_6_1 ;
  x3do:hasFontStyle :FontStyle_2_6_1_1_1 ;
  x3do:string '"USE copy"' .
:FontStyle_2_6_1_1_1 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_6_1_1 ;
  x3do:family '"SANS"' ;
  x3do:justify '"MIDDLE" "MIDDLE"' ;
  x3do:size 0.5 ;
  x3do:cssStyle 'BOLD' .
:TextAppearance-USE-1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_6_1 ;
  owl:sameAs :TextAppearance . # DEF matching this USE
:Transform_2_7 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Shape_2_7_1, :Shape_2_7_2, :TouchTextInterface, :EventToggler ;
  x3do:hasROUTE :ROUTE_2_7_5, :ROUTE_2_7_6 ;
  x3do:translation ( 0 -2 0 ) .
:Shape_2_7_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_7 ;
  x3do:hasGeometry :Text_2_7_1_1 ;
  x3do:hasAppearance :TextAppearance-USE-2 .
:Text_2_7_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :Shape_2_7_1 ;
  x3do:hasFontStyle :FontStyle_2_7_1_1_1 ;
  x3do:string '"enable/disable" "MaterialModulator"' .
:FontStyle_2_7_1_1_1 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_7_1_1 ;
  x3do:family '"SANS"' ;
  x3do:justify '"MIDDLE" "MIDDLE"' ;
  x3do:cssStyle 'BOLD' .
:TextAppearance-USE-2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_7_1 ;
  owl:sameAs :TextAppearance . # DEF matching this USE
:Shape_2_7_2 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_7 ;
  x3do:hasGeometry :Box_2_7_2_1 ;
  x3do:hasAppearance :Appearance_2_7_2_2 .
:Box_2_7_2_1 a owl:NamedIndividual, x3do:Box ;
  x3do:hasParent :Shape_2_7_2 ;
  x3do:size ( 8 2 .001 ) .
:Appearance_2_7_2_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_7_2 ;
  x3do:hasMaterial :Material_2_7_2_2_1 .
:Material_2_7_2_2_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_7_2_2 ;
  x3do:transparency 1 .
:TouchTextInterface a owl:NamedIndividual, x3do:TouchSensor ;
  x3do:hasParent :Transform_2_7 ;
  x3do:DEF 'TouchTextInterface' ;
  x3do:description 'Select text to enable/disable MaterialModulator' .
:EventToggler a owl:NamedIndividual, x3do:BooleanToggle ;
  x3do:hasParent :Transform_2_7 ;
  x3do:DEF 'EventToggler' .
:ROUTE_2_7_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Transform_2_7 ;
  x3do:fromField 'isActive' ;
  x3do:fromNode 'TouchTextInterface' ;
  x3do:toField 'set_boolean' ;
  x3do:toNode 'EventToggler' .
:ROUTE_2_7_6 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Transform_2_7 ;
  x3do:fromField 'toggle' ;
  x3do:fromNode 'EventToggler' ;
  x3do:toField 'enabled' ;
  x3do:toNode 'MaterialModulatorInstance' .
