From de3c28dc7eaf6275fe5f233206914d65d248e223 Mon Sep 17 00:00:00 2001 From: brutzman <brutzman@nps.edu> Date: Sat, 6 Jun 2020 10:07:52 -0700 Subject: [PATCH] demonstrate usage of Prototype metadata node --- Tools/Animation/DoubleClickTouchSensorExample.x3d | 9 +++++++-- Tools/Animation/DoubleClickTouchSensorPrototype.x3d | 4 ++-- Tools/Animation/FlyingTextExample.x3d | 9 +++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Tools/Animation/DoubleClickTouchSensorExample.x3d b/Tools/Animation/DoubleClickTouchSensorExample.x3d index 4809ced931..a5c335bdeb 100644 --- a/Tools/Animation/DoubleClickTouchSensorExample.x3d +++ b/Tools/Animation/DoubleClickTouchSensorExample.x3d @@ -6,7 +6,7 @@ <meta content='Double-click TouchSensor design pattern, showing example use.' name='description'/> <meta content='Don Brutzman' name='creator'/> <meta content='26 May 2003' name='created'/> - <meta content='28 November 2019' name='modified'/> + <meta content='6 June 2020' name='modified'/> <meta content='DoubleClickTouchSensorPrototype.x3d' name='reference'/> <meta content='https://www.web3d.org/x3d/specifications/ISO-IEC-19775-FDIS-X3dAbstractSpecification/Part01/components/pointingsensor.html#TouchSensor' name='reference'/> <meta content='DoubleClickTouchSensor' name='subject'/> @@ -34,7 +34,9 @@ <field accessType='outputOnly' name='hitPoint_changed' type='SFVec3f'/> <field accessType='outputOnly' name='hitNormal_changed' type='SFVec3f'/> <field accessType='outputOnly' name='hitTexCoord_changed' type='SFVec2f'/> - <field accessType='initializeOnly' name='metadata' type='SFNode'/> + <field accessType='initializeOnly' name='metadata' type='SFNode' appinfo='can contain one of Metadata nodes'> + <!-- initialization node (if any) goes here --> + </field> <field accessType='initializeOnly' name='traceEnabled' type='SFBool'/> </ExternProtoDeclare> <!-- ==================== --> @@ -50,6 +52,9 @@ <ProtoInstance DEF='TouchSensorActive' name='DoubleClickTouchSensor'> <fieldValue name='description' value='double click to initiate time delay and color change'/> <fieldValue name='traceEnabled' value='true'/> + <fieldValue name='metadata'> + <MetadataString name="exampleTerm" value='"exampleValue"'/> + </fieldValue> </ProtoInstance> <!-- ==================== --> <Group DEF='TextAnimationGroup'> diff --git a/Tools/Animation/DoubleClickTouchSensorPrototype.x3d b/Tools/Animation/DoubleClickTouchSensorPrototype.x3d index 0e1ac14d42..f405ea0881 100644 --- a/Tools/Animation/DoubleClickTouchSensorPrototype.x3d +++ b/Tools/Animation/DoubleClickTouchSensorPrototype.x3d @@ -6,7 +6,7 @@ <meta content='Double-click TouchSensor design pattern, implemented as a reusable prototype node.' name='description'/> <meta content='Don Brutzman' name='creator'/> <meta content='26 May 2004' name='created'/> - <meta content='28 November 2019' name='modified'/> + <meta content='6 June 2020' name='modified'/> <meta content='DoubleClickTouchSensorExample.x3d' name='reference'/> <meta content='https://www.web3d.org/x3d/specifications/ISO-IEC-19775-FDIS-X3dAbstractSpecification/Part01/components/pointingsensor.html#TouchSensor' name='reference'/> <meta content='DoubleClickTouchSensor' name='subject'/> @@ -27,7 +27,7 @@ <field accessType='outputOnly' name='hitPoint_changed' type='SFVec3f'/> <field accessType='outputOnly' name='hitNormal_changed' type='SFVec3f'/> <field accessType='outputOnly' name='hitTexCoord_changed' type='SFVec2f'/> - <field accessType='initializeOnly' name='metadata' type='SFNode'> + <field accessType='initializeOnly' name='metadata' type='SFNode' appinfo='can contain one of Metadata nodes'> <!-- initialization node (if any) goes here --> </field> <field accessType='initializeOnly' name='traceEnabled' type='SFBool' value='false'/> diff --git a/Tools/Animation/FlyingTextExample.x3d b/Tools/Animation/FlyingTextExample.x3d index 392ff1baa3..6c1d377b6a 100644 --- a/Tools/Animation/FlyingTextExample.x3d +++ b/Tools/Animation/FlyingTextExample.x3d @@ -6,7 +6,7 @@ <meta content='Prototype definition for a flying text message. Waypoints, time intervals, cycleInterval and text message can be overridden.' name='description'/> <meta content='Murat Onder' name='creator'/> <meta content='2 June 2004' name='created'/> - <meta content='28 November 2019' name='modified'/> + <meta content='6 June 2020' name='modified'/> <meta content='FlyingTextExample.x3d' name='reference'/> <meta content='https://savage.nps.edu/Savage/Tools/Animation/FlyingTextExample.x3d' name='identifier'/> <meta content='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit' name='generator'/> @@ -24,12 +24,17 @@ <field accessType='outputOnly' name='hitPoint_changed' type='SFVec3f'/> <field accessType='outputOnly' name='hitNormal_changed' type='SFVec3f'/> <field accessType='outputOnly' name='hitTexCoord_changed' type='SFVec2f'/> - <field accessType='initializeOnly' name='metadata' type='SFNode'/> + <field accessType='initializeOnly' name='metadata' type='SFNode' appinfo='can contain one of Metadata nodes'> + <!-- initialization node (if any) goes here --> + </field> <field accessType='initializeOnly' name='traceEnabled' type='SFBool'/> </ExternProtoDeclare> <ProtoInstance DEF='ExampleDoubleClickTouchSensor' name='DoubleClickTouchSensor'> <fieldValue name='description' value='double click to initiate time-delayed event'/> <fieldValue name='maxDelayInterval' value='1'/> + <fieldValue name='metadata'> + <MetadataString name="exampleTerm" value='"exampleValue"'/> + </fieldValue> </ProtoInstance> <ExternProtoDeclare appinfo='Visualize message transfer between two points as flying text' name='FlyingText' url='"../../../Savage/Tools/Animation/FlyingTextPrototype.x3d#FlyingText" "https://savage.nps.edu/Savage/Tools/Animation/FlyingTextPrototype.x3d#FlyingText" "../../../Savage/Tools/Animation/FlyingTextPrototype.wrl#FlyingText" "https://savage.nps.edu/Savage/Tools/Animation/FlyingTextPrototype.wrl#FlyingText"'> <field accessType='initializeOnly' name='waypoints' type='MFVec3f'/> -- GitLab