#X3D V4.0 utf8
# X3D-to-ClassicVRML XSL translation autogenerated by X3dToVrml97.xslt
# https://www.web3d.org/x3d/content/X3dToVrml97.xslt
# Generated using XSLT processor: Saxonica
PROFILE Immersive
# [X3D] version=4.0
# [X3D] noNamespaceSchemaLocation=https://www.web3d.org/specifications/x3d-4.0.xsd
# [head]
META "title" "MetadataNodeExamplesX3D4.x3d"
META "description" "Simple examples of meta statements, comments, WorldInfo node and typed metadata nodes."
META "creator" "Don Brutzman"
META "created" "30 September 2011"
META "modified" "24 April 2022"
META "reference" "Original name MetadataNodeExamples.x3d, renamed since handling of metadata containerField defaults changed in X3D4."
META "reference" "MetadataNodeExamplesX3D3.x3d"
META "info" "Information in head and meta elements is retained after a scene is parsed and loaded, and can be referenced via the Scene Access Interface (SAI) or Document Object Model (DOM)"
### Info:
META "info" "Authoring note: MetadataBoolean requires X3D version 4.0, as used in this example scene"
### Info:
META "reference" "The following referenced chapter is published online but was not included in the printed book."
META "reference" "Chapter15MetadataInformation.html"
META "reference" "https://x3dgraphics.com/chapters/Chapter15MetadataInformation.html"
META "reference" "https://X3dGraphics.com"
META "reference" "https://www.web3d.org/x3d/content/examples/X3dResources.html"
META "rights" "Copyright 2006, Daly Realism and Don Brutzman"
META "subject" "X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com"
META "identifier" "https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamplesX3D4.x3d"
META "generator" "X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"
META "license" "../license.html"
# [Scene] ========== ========== ==========
NavigationInfo { type [ "EXAMINE" "ANY" ] } ### Default X3D NavigationInfo
# May 2017: X3D4 Architecture Specification clarification allows Metadata nodes at top level of Scene graph.
MetadataString {
name "TestRootMetadataNode"
value [ "Test satisfactory." "Note that all SFString values must be quoted." ]
}
# Comments can appear between nodes (XML elements) but are not retained after a scene is parsed, loaded and playing
DEF MyWorldInfo WorldInfo {
info [ "Metadata strings" "can go here" "as string array values" ]
title "MetadataNodeExamplesX3D4.x3d Example Scene"
# metadata
DEF MyMetadataSetNode MetadataSet {
name "Metadata_name"
reference "SomeReferenceStandard 1.2.3c"
metadata DEF MyMetadataBooleanNode MetadataBoolean {
name "Coin Flip"
reference "MetadataBoolean allowed in X3D v3.3 and later"
value true false true false
}
metadata DEF MyMetadataDoubleNode MetadataDouble {
name "Metadata_name"
reference "SomeReferenceStandard 1.2.3c"
value [ 3.141592658 2.71812181 ]
}
metadata DEF MyMetadataFloatNode MetadataFloat {
name "Metadata_name"
reference "SomeReferenceStandard 1.2.3c"
value [ 9.8 6.023e+23 ]
}
metadata DEF MyMetadataIntegerNode MetadataInteger {
name "Metadata_name"
reference "SomeReferenceStandard 1.2.3c"
value [ 6 28 496 ]
### Error: SFInt32 attribute value='6 28 496' must contain only 1 value
}
metadata DEF MyMetadataStringNode MetadataString {
name "Metadata_name"
reference "SomeReferenceStandard 1.2.3c"
value [ "Part 27" "P27" "p27" ]
}
metadata DEF NestedMetadataSetNode MetadataSet {
name "TestNestedMetadataSetNodes"
metadata USE MyMetadataStringNode
metadata USE MyMetadataIntegerNode
metadata USE MyMetadataFloatNode
metadata MetadataFloat {
name "coefficients"
value [ 3.141592653 2.7128 1 0 ]
}
# MetadataSet can also contain multiple Metadata nodes with containerField='value'
}
}
}
Background {
skyColor [ 0 0.439216 0.760784 ]
}
Viewpoint {
description "View scene source to see metadata examples"
position 0 0 9
}
Anchor {
description "Load scene index page"
parameter [ "target=_blank" ]
url [ "MetadataNodeExamplesIndex.html" "https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamplesIndex.html" ]
children [
Shape {
geometry Text {
string [ "View scene source" "to see" "metadata examples" ]
fontStyle FontStyle {
justify [ "MIDDLE" "MIDDLE" ]
}
}
appearance Appearance {
material Material {
diffuseColor 1 0.992157 0.039216
}
}
}
]
}