1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
|
3 | <!-- needed: add containerField, class attributes --> |
4 | <!-- Instruction steps 1 through 4 are listed in detail within the DOCTYPE declaration internal subset. --> |
5 | <!-- You must view full source of the DTD declarations (ProtoTagDtdDeclarationExamples.x3d.txt) to fully understand this file. --> |
6 | <!-- ********************************************************************* --> |
7 | <!-- ** Step 1: Copy the following DOCTYPE statement in your X3D scene. ** --> |
8 | <!-- ** Ensure you include the square backet [ on line 32! ** --> |
9 | <!-- ** Modify INCLUDE/IGNORE to match profiles of interest. ** --> |
10 | <!-- ********************************************************************* --> |
11 | <X3D profile='Immersive' version='3.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'> |
12 | <head> |
13 | <meta name='title' content='ProtoTagDtdDeclarationExamples.x3d'/> |
14 | <meta name='created' content='17 April 2000'/> |
15 | <meta name='modified' content='20 October 2019'/> |
16 | <meta name='creator' content='Don Brutzman'/> |
17 | <meta name='e-mail' content='brutzman@nps.navy.mil'/> |
18 | <meta name='description' content='Provides Prototype XML-tag-definition examples to demonstrate DTD modularization and extensibility in X3D scenes. Also see SpinGroupInternalSubsetDeclaration.x3d'/> |
19 | <meta name=' warning ' content=' You must view full source of the DTD declarations (ProtoTagDtdDeclarationExamples.x3d.txt) to fully understand validation techniques in this file. '/> |
20 | <meta name=' error ' content=' internal subset deficiency: nodeType attributes need to be converted to containerField attributes. '/> |
21 | <meta name='reference' content='ProtoTagDtdDeclarationExamples.x3d.txt'/> |
22 | <meta name='reference' content='SpinGroupInternalSubsetDeclaration.x3d.txt'/> |
23 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/development/ProtoTagDtdDeclarationExamples.x3d'/> |
24 | <meta name='generator' content='X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html'/> |
25 | <meta name='license' content='../license.html'/> |
26 | </head> |
27 | <Scene> |
28 | <!-- ********************************************************************* --> |
29 | <!-- *** Step 5: Copy/edit ProtoDeclare, (optionally ProtoInstance) *** --> |
30 | <!-- *** and the tagset version for your nodes of interest. *** --> |
31 | <!-- *** When instantiating field Node/Nodes or field values, *** --> |
32 | <!-- *** use fieldValue tags to override the initial values. *** --> |
33 | <!-- *** The following example content instantiates prototype *** --> |
34 | <!-- *** NewTransformExample using tags and ProtoInstance. *** --> |
35 | <!-- ********************************************************************* --> |
36 | <!-- Declaring the NewTransformExample PROTO: --> |
37 | <ProtoDeclare name='NewTransformExample'> |
38 | <ProtoInterface> |
39 | <field name='translation' type='SFVec3f' value='0 0 0' accessType='inputOutput'/> |
40 | <field name='rotation' type='SFRotation' value='0 0 1 0' accessType='inputOutput'/> |
41 | <field name='center' type='SFVec3f' value='0 0 0' accessType='inputOutput'/> |
42 | <field name='scale' type='SFVec3f' value='1 1 1' accessType='inputOutput'/> |
43 | <field name='scaleOrientation' type='SFRotation' value='0 0 1 0' accessType='inputOutput'/> |
44 | <field name='bboxCenter' type='SFVec3f' value='0 0 0' accessType='initializeOnly'/> |
45 | <field name='bboxSize' type='SFVec3f' value='-1 -1 -1' accessType='initializeOnly'/> |
46 | <field name='children' type='MFNode' accessType='inputOutput'> |
47 | <WorldInfo info='"overridden at run time"'/> |
48 | </field> |
49 | </ProtoInterface> |
50 | <ProtoBody> |
51 | <!-- Transform is first node, which determines node type, and encloses children for instances. --> |
52 | <Transform DEF='InitialTransform'> |
53 | <IS> |
54 | <connect nodeField='translation' protoField='translation'/> |
55 | <connect nodeField='rotation' protoField='rotation'/> |
56 | <connect nodeField='center' protoField='center'/> |
57 | <connect nodeField='scale' protoField='scale'/> |
58 | <connect nodeField='scaleOrientation' protoField='scaleOrientation'/> |
59 | <connect nodeField='bboxCenter' protoField='bboxCenter'/> |
60 | <connect nodeField='bboxSize' protoField='bboxSize'/> |
61 | <connect nodeField='children' protoField='children'/> |
62 | </IS> |
63 | </Transform> |
64 | </ProtoBody> |
65 | </ProtoDeclare> |
66 | <!-- Instantiating the NewTransformExample PROTO using a ProtoInstance tag: --> |
67 | <ProtoInstance name='NewTransformExample'> |
68 | <fieldValue name='translation' value='0 1.5 0'/> |
69 | <fieldValue name='children'> |
70 | <Shape> |
71 | <Appearance> |
72 | <Material diffuseColor='0.1 0.8 0.8'/> |
73 | </Appearance> |
74 | <Text string='"ProtoTagDtdDeclaration Examples" "using a regular ProtoInstance"'> |
75 | |
76 | </Text> |
77 | </Shape> |
78 | </fieldValue> |
79 | </ProtoInstance> |
80 | <!-- Instantiating the NewTransformExample node using a customized tag: --> |
81 | <NewTransformExample center='0 0 0' rotation='0 0 1 0' scale='1 1 1' scaleOrientation='0 0 1 0' translation='0 -0.5 0'> |
82 | <fieldValue name='children'> |
83 | <Shape> |
84 | <Appearance> |
85 | <Material diffuseColor='0.1 0.8 0.2'/> |
86 | </Appearance> |
87 | <Text string='"plus header-declared XML tag from" "XML document subset declaration"'> |
88 | <FontStyle USE='FS'/> |
89 | </Text> |
90 | </Shape> |
91 | </fieldValue> |
92 | </NewTransformExample> |
93 | <Transform translation='0 -2 0'> |
94 | <Anchor description='Click to view source (ProtoTagDtdDeclarationExamples.x3d.txt)' parameter='"target=_blank"' url=' "ProtoTagDtdDeclarationExamples.x3d.txt" "https://www.web3d.org/x3d/content/examples/development/ProtoTagDtdDeclarationExamples.x3d.txt" '> |
95 | <Shape> |
96 | <Appearance> |
97 | <Material diffuseColor='0.8 0.4 0.1'/> |
98 | </Appearance> |
99 | <Text string='"(click to see source)"'> |
100 | <FontStyle USE='FS'/> |
101 | </Text> |
102 | </Shape> |
103 | </Anchor> |
104 | </Transform> |
105 | </Scene> |
106 | </X3D> |
Event Graph ROUTE Table with 0 ROUTE connections total, showing X3D event-model relationships for this scene.
Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.
ProtoInstance NewTransformExample |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declaration with direct access to other nodes, and thus has potential to produce run-time animation. |
Anchor |
description='Click to view source (ProtoTagDtdDeclarationExamples.x3d.txt)' User-interaction hint for this node. |
<!--
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)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->