#VRML V2.0 utf8 # [X3D] VRML V4.0 utf8 # PROFILE Immersive # [X3D] version=4.0 # [X3D] noNamespaceSchemaLocation=/specifications/x3d-4.0.xsd # X3D-to-VRML-97 XSL translation autogenerated by X3dToVrml97.xslt # /x3d/content/X3dToVrml97.xslt # Transformation using XSLT processor: Saxonica # [head] # META "title" "InlineExport.x3d" # META "description" "X3D encodings example: demonstrate reuse and adaptation of content instances through Inline IMPORT, EXPORT statements. This scene does not animate, see InlineImport.x3d for selective animation of scene subgraph EXPORT localDEF=T1 AS=RootTransform" # META "creator" "Don Brutzman" # META "created" "27 May 2024" # META "modified" "19 January 2025" # META "Image" "InlineImportInlineExportAnimation.png" # META "drawing" "InlineImportInlineExportAnimation.vsdx" # META "Image" "InlineExport.png" # META "reference" "InlineImport.x3d" # META "specificationSection" "X3D Architecture version 4.0 ISO/IEC 19775-1, clause 4 Concepts, 4.4.6 Import/Export semantics" # META "specificationUrl" "/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/concepts.html#ImportExportsemantics" # META "specificationSection" "X3D encodings, ISO/IEC 19776-1, Part 1: XML encoding, clause 4.3.2.6 EXPORT/IMPORT statement syntax" # META "specificationUrl" "/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/concepts.html#EXPORT_IMPORT_StatementSyntax" # META "specificationSection" "X3D encodings, ISO/IEC 19776-2, Part 1: ClassicVRML encoding, clause 4.3.2.6 EXPORT/IMPORT statement syntax" # META "specificationUrl" "/specifications/X3Dv4Draft/ISO-IEC19776-2v4.0-WD1/Part02/concepts.html#EXPORT_IMPORT_StatementSyntax" # META "generator" "X3D-Edit 4.0, /x3d/tools/X3D-Edit" # META "identifier" "/x3d/content/examples/Basic/X3dSpecifications/InlineExport.x3d" # META "license" "../license.html" # [Scene] ========== ========== ========== WorldInfo { title "InlineExport.x3d" } Background { skyColor [ 0.8 0.8 0.8 ] } DEF T1 Transform { translation 0 1 0 children [ Shape { geometry Box { } appearance Appearance { material Material { diffuseColor 0.8 0.8 0.2 } } } Transform { translation 2 0 0 children [ DEF SmallerSphere Shape { geometry Sphere { radius 0.2 } appearance Appearance { material Material { diffuseColor 0.2 0.8 0.8 } } } ] } Transform { translation -2 0 0 children [ USE SmallerSphere ] } ] } # Hint: EXPORT statement must follow the DEF node of interest, since localDEF field is similar to USE (with data type IDREF). # Hint: EXPORT localDEF is DEF name within this model, AS is the name exposed to an external Inline IMPORT statement. EXPORT { AS RootTransform localDEF T1 } DEF T2 Transform { translation 0 -2 0 children [ Shape { geometry Text { string [ "Shapes can rotate if" "animation events are sent" "via Inline IMPORT/EXPORT" ] fontStyle FontStyle { family [ "SANS" ] justify [ "MIDDLE" "MIDDLE" ] size 0.6 ### style='BOLD' } } appearance Appearance { material Material { diffuseColor 0.2 0.2 0.7 } } } ] }