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='title' content='InlineExport.x3d'/> |
6 | <meta name='description' content='X3D encodings example: demonstrate reuse and adaptation of content instances through Inline IMPORT, EXPORT statements.'/> |
7 | <meta name='creator' content='Don Brutzman'/> |
8 | <meta name='created' content='27 May 2024'/> |
9 | <meta name='modified' content='17 August 2024'/> |
10 | <meta name='Image' content='InlineExport.png'/> |
11 | <meta name='reference' content='InlineImport.x3d'/> |
12 | <meta name='specificationSection' content='X3D encodings, ISO/IEC 19776-1.4, Part 1: XML encoding, clause 4.3.12 IMPORT/EXPORT statement syntax'/> |
13 | <meta name='specificationUrl' content='https://web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/concepts.html#IMPORT_EXPORTStatementSyntax'/> |
14 | <meta name='specificationSection' content='X3D Architecture version 4.0 ISO/IEC 19775-1, clause 4 Concepts, 4.4.6 Import/Export semantics'/> |
15 | <meta name='specificationUrl' content='https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/concepts.html#ImportExportsemantics'/> |
16 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExport.x3d'/> |
17 | <meta name='generator' content='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/> |
18 | <meta name='license' content='../license.html'/> |
19 | </head> |
20 | <Scene> |
21 | <WorldInfo title='InlineExport.x3d'/> |
22 | <Background skyColor='0.8 0.8 0.8'/> |
23 | <Transform DEF='T1' translation='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='T1' AS='RootTransform'/> |
45 | <Transform DEF='T2' translation='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.6' style='BOLD'/> |
49 | </Text> |
50 | <Appearance> |
51 | <Material diffuseColor='0.2 0.2 0.7'/> |
52 | </Appearance> |
53 | </Shape> |
54 | </Transform> |
55 | </Scene> |
56 | </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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->