@prefix :        <https://www.web3d.org/x3d/content/examples/Basic/development/LODlevelChangedExample.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.1.xsd#> .
@prefix x3do:    <https://www.web3d.org/specifications/X3dOntology4.1#> .

:X3D a owl:NamedIndividual, x3do:X3D ;
  x3do:hasHead :head ;
  x3do:hasScene :Scene ;
  x3do:profile 'Immersive' ;
  x3do:version '3.0' ;
  x3do:noNamespaceSchemaLocation 'https://www.web3d.org/specifications/x3d-3.0.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_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'LODlevelChangedExample.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Example use of (proposed) LOD level_changed outputOnly field to trigger loading of Inline nodes in subsequent levels.' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Don Brutzman' ;
  x3do:name 'creator' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Chris Thorne' ;
  x3do:name 'motivation' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '26 May 2004' ;
  x3do:name 'created' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '20 October 2019' ;
  x3do:name 'modified' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'under development, evaluating a proposed specification change' ;
  x3do:name 'warning' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Basic/development/LODlevelChangedExample.x3d' ;
  x3do:name 'identifier' .
:meta_1_9 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_10 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "LODlevelChangedExample.x3d" .
:meta dcterms:description "Example use of (proposed) LOD level_changed outputOnly field to trigger loading of Inline nodes in subsequent levels." .
:meta dcterms:creator "Don Brutzman" .
:meta dcterms:created "26 May 2004" .
:meta dcterms:modified "20 October 2019" .
:meta dcterms:warning "under development, evaluating a proposed specification change" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Basic/development/LODlevelChangedExample.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, :activeLOD, :PreloadActivationGroup, :ViewpointGroup .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'LODlevelChangedExample.x3d' .
:activeLOD a owl:NamedIndividual, x3do:LOD ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :ShapeLevel0, :InlineLevel1, :InlineLevel2 ;
  x3do:DEF 'activeLOD' ;
  x3do:range ( 6 10 ) .
:ShapeLevel0 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :activeLOD ;
  x3do:hasGeometry :Text_2_2_1_1 ;
  x3do:DEF 'ShapeLevel0' .
:Text_2_2_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :ShapeLevel0 ;
  x3do:hasFontStyle :FontStyle_2_2_1_1_1 ;
  x3do:string '"developmental test scene" "LODlevelChangedExample"' .
:FontStyle_2_2_1_1_1 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_2_1_1 ;
  x3do:justify '"MIDDLE" "MIDDLE"' .
:InlineLevel1 a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :activeLOD ;
  x3do:DEF 'InlineLevel1' ;
  x3do:load false .
:InlineLevel2 a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :activeLOD ;
  x3do:DEF 'InlineLevel2' ;
  x3do:load false .
:PreloadActivationGroup a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :PreloadLevelsScript ;
  x3do:hasROUTE :ROUTE_2_3_2, :ROUTE_2_3_3, :ROUTE_2_3_4 ;
  x3do:DEF 'PreloadActivationGroup' .
:PreloadLevelsScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :PreloadActivationGroup ;
  x3do:hasField :field_2_3_1_1, :field_2_3_1_2, :field_2_3_1_3 ;
  x3do:DEF 'PreloadLevelsScript' ;
  x3do:sourceCode """
ecmascript:

function level_changed (value, timestamp)
{
	Browser.println ('level=' + value);
	if      (value == 1) activateLevel1 = true;
	else if (value == 2) activateLevel2 = true;
	// etc.
}
""" .
:field_2_3_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :PreloadLevelsScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'level_changed' ;
  x3do:type 'SFInt32' .
:field_2_3_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :PreloadLevelsScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'activateLevel1' ;
  x3do:type 'SFBool' .
:field_2_3_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :PreloadLevelsScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'activateLevel2' ;
  x3do:type 'SFBool' .
:ROUTE_2_3_2 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :PreloadActivationGroup ;
  x3do:fromField 'level_changed' ;
  x3do:fromNode 'activeLOD' ;
  x3do:toField 'level_changed' ;
  x3do:toNode 'PreloadLevelsScript' .
:ROUTE_2_3_3 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :PreloadActivationGroup ;
  x3do:fromField 'activateLevel1' ;
  x3do:fromNode 'PreloadLevelsScript' ;
  x3do:toField 'load' ;
  x3do:toNode 'InlineLevel1' .
:ROUTE_2_3_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :PreloadActivationGroup ;
  x3do:fromField 'activateLevel2' ;
  x3do:fromNode 'PreloadLevelsScript' ;
  x3do:toField 'load' ;
  x3do:toNode 'InlineLevel2' .
:ViewpointGroup a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Viewpoint_2_4_1, :Viewpoint_2_4_2, :Viewpoint_2_4_3 ;
  x3do:DEF 'ViewpointGroup' .
:Viewpoint_2_4_1 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :ViewpointGroup ;
  x3do:description 'level 0' ;
  x3do:position ( 0 0 4 ) .
:Viewpoint_2_4_2 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :ViewpointGroup ;
  x3do:description 'level 1' ;
  x3do:position ( 0 0 8 ) .
:Viewpoint_2_4_3 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :ViewpointGroup ;
  x3do:description 'level 2' ;
  x3do:position ( 0 0 12 ) .
