X3D Model Documentation: InlineExport.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "https://www.web3d.org/specifications/x3d-4.0.dtd">
  3  <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'>
  4       <head>
  5            <meta name='titlecontent='InlineExport.x3d'/>
  6            <meta name='descriptioncontent='X3D encodings example: demonstrate reuse and adaptation of content instances through Inline IMPORT, EXPORT statements.'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='27 May 2024'/>
  9            <meta name='modifiedcontent='17 August 2024'/>
 10            <meta name='Imagecontent='InlineExport.png'/>
 11            <meta name='referencecontent='InlineImport.x3d'/>
 12            <meta name='specificationSectioncontent='X3D encodings, ISO/IEC 19776-1.4, Part 1: XML encoding, clause 4.3.12 IMPORT/EXPORT statement syntax'/>
 13            <meta name='specificationUrlcontent='https://web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/concepts.html#IMPORT_EXPORTStatementSyntax'/>
 14            <meta name='specificationSectioncontent='X3D Architecture version 4.0 ISO/IEC 19775-1, clause 4 Concepts, 4.4.6 Import/Export semantics'/>
 15            <meta name='specificationUrlcontent='https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/concepts.html#ImportExportsemantics'/>
 16            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExport.x3d'/>
 17            <meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
 18            <meta name='licensecontent='../license.html'/>
 19       </head>
<!--

<!-- -->

<!-- to top Index for DEF nodes: SmallerSphere, T1, T2 with EXPORT AS node: RootTransform
-->
 20       <Scene>
 21            <WorldInfo title='InlineExport.x3d'/>
 22            <Background skyColor='0.8 0.8 0.8'/>
 23            <Transform DEF='T1translation='0 1 0'>
 24                 <Shape>
 25                      <Box/>
 26                      <Appearance>
 27                           <Material diffuseColor='0.8 0.8 0.2'/>
 28                      </Appearance>
 29                 </Shape>
 30                 <Transform translation='2 0 0'>
 31 
                    <!-- Shape SmallerSphere is a DEF node that has 1 USE node: USE_1 -->
                    <Shape DEF='SmallerSphere'>
 32                           <Sphere radius='0.2'/>
 33                           <Appearance>
 34                                <Material diffuseColor='0.2 0.8 0.8'/>
 35                           </Appearance>
 36                      </Shape>
 37                 </Transform>
 38                 <Transform translation='-2 0 0'>
 39                      <Shape USE='SmallerSphere'/>
 40                 </Transform>
 41            </Transform>
 42            <!-- Hint: EXPORT statement must follow the DEF node of interest, since localDEF field is similar to USE (with data type IDREF). -->
 43            <!-- Hint: EXPORT localDEF is DEF name within this model, AS is the name exposed to an external Inline IMPORT statement. -->
 44            <EXPORT localDEF='T1AS='RootTransform'/>
 45            <Transform DEF='T2translation='0 -2 0'>
 46                 <Shape>
 47                      <Text string=' "Shapes can rotate if" "animation events are sent" "via Inline IMPORT/EXPORT" '>
 48                           <FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"size='0.6style='BOLD'/>
 49                      </Text>
 50                      <Appearance>
 51                           <Material diffuseColor='0.2 0.2 0.7'/>
 52                      </Appearance>
 53                 </Shape>
 54            </Transform>
 55       </Scene>
 56  </X3D>
<!--

<!-- -->

<!-- to top Index for DEF nodes: SmallerSphere, T1, T2 with EXPORT AS node: RootTransform
-->
X3D Tooltips element index: Appearance, Background, Box, EXPORT, FontStyle, head, Material, meta, Scene, Shape, Sphere, Text, Transform, WorldInfo, X3D, accessType and type, XML data types, field types

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExportIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExport.x3d -->

<!-- Color legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->