<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "https://www.web3d.org/specifications/x3d-4.0.dtd">
<X3D profile='Immersive' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'>
  <head>
    <meta content='InlineImport.x3d' name='title'/>
    <meta content='X3D encodings example: demonstrate reuse and adaptation of content instances through Inline IMPORT, EXPORT statements. This scene animates only a portion of model InlineExport.x3d that exposes a Transform scene subgraph.' name='description'/>
    <meta content='The exchange of events can be passed not only from parent Inline to contained model, but also from child to parent, and to external HTML5 web pages as well. If authors and model libraries use consistent naming conventions for EXPORT of exposed nodes, this extensibility enables large-scale composition of X3D worlds containing consistently animatable models. Applying this design pattern in concert with naming conventions and metadata vocabularies holds excellent potential for use in Smart City visualization.' name='info'/>
    <meta content='Don Brutzman' name='creator'/>
    <meta content='27 May 2024' name='created'/>
    <meta content='19 January 2025' name='modified'/>
    <meta content='InlineImportInlineExportAnimation.png' name='Image'/>
    <meta content='InlineImportInlineExportAnimation.vsdx' name='drawing'/>
    <meta content='InlineImportX_ITE.png' name='Image'/>
    <meta content='InlineImportX3DOM.png' name='Image'/>
    <meta content='InlineImportX_ITE.png' name='Image'/>
    <meta content='InlineImportCastleModelViewer.png' name='Image'/>
    <meta content='InlineExport.x3d' name='reference'/>
    <meta content='X3D Architecture version 4.0 ISO/IEC 19775-1, clause 4 Concepts, 4.4.6 Import/Export semantics' name='specificationSection'/>
    <meta content='https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/concepts.html#ImportExportsemantics' name='specificationUrl'/>
    <meta content='X3D encodings, ISO/IEC 19776-1, Part 1: XML encoding, clause 4.3.2.6 EXPORT/IMPORT statement syntax' name='specificationSection'/>
    <meta content='https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/concepts.html#EXPORT_IMPORT_StatementSyntax' name='specificationUrl'/>
    <meta content='X3D encodings, ISO/IEC 19776-2, Part 1: ClassicVRML encoding, clause 4.3.2.6 EXPORT/IMPORT statement syntax' name='specificationSection'/>
    <meta content='https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-2v4.0-WD1/Part02/concepts.html#EXPORT_IMPORT_StatementSyntax' name='specificationUrl'/>
    <meta content='X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImport.x3d' name='identifier'/>
    <meta content='../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='InlineImport.x3d'/>
    <Background skyColor='1 1 1'/>
    <Inline DEF='MyInlineModel' description='Load model that provides external access to a node via an EXPORT statement, accessed by IMPORT statement in this model' url='"InlineExport.x3d" "https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExport.x3d" "InlineExport.wrl" "https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExport.wrl"'>
      <MetadataString containerField='metadata' name='profile' value='"Immersive"'/>
    </Inline>
    <!-- Hint: when using IMPORT statement, the author must keep track of correct node type for importedDEF node within the external Inline scene, otherwise a runtime error can occur in this scene. -->
    <!-- Hint: IMPORT inlineDEF is DEF name of Inline node in this scene. -->
    <!-- Hint: importedDEF is DEF name exported by the external model, AS is the exposed DEF name in this scene. -->
    <IMPORT AS='MyInlineRootTransform' importedDEF='RootTransform' inlineDEF='MyInlineModel'/>
    <OrientationInterpolator DEF='MySpinner' key='0 0.3333 0.6667 1' keyValue='0 1 0 0 0 1 0 2.094395 0 1 0 4.18879 0 1 0 0'/>
    <ROUTE fromField='value_changed' fromNode='MySpinner' toField='set_rotation' toNode='MyInlineRootTransform'/>
    <TimeSensor DEF='SpinClock' cycleInterval='8' loop='true'/>
    <ROUTE fromField='fraction_changed' fromNode='SpinClock' toField='set_fraction' toNode='MySpinner'/>
  </Scene>
</X3D>