X3D Model Documentation: set_backurl.x3d

  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  <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'>
  4       <head>
  5            <meta name='titlecontent='set_backurl.x3d'/>
  6            <meta name='referencecontent='http://www.nist.gov/vrml.html'/>
  7            <meta name='referencecontent='http://www.itl.nist.gov/div897/ctg/vrml/vrml.html'/>
  8            <meta name='creatorcontent='http://www.itl.nist.gov/div897/ctg/vrml/members.html'/>
  9            <meta name='disclaimercontent='This file was provided by the National Institute of Standards and Technology, and is part of the X3D Conformance Test Suite, available at http://www.nist.gov/vrml.html The information contained within this file is provided for use in establishing conformance to the ISO VRML97 Specification. Conformance to this test does not imply recommendation or endorsement by the National Institute of Standards and Technology (NIST). This software can be redistributed and/or modified freely provided that any derivative works bear some notice that they are derived from it, and any modified versions bear some notice that they have been modified. '/>
 10            <meta name='referencecontent='Original NIST Conformance Testing Group, https://www.itl.nist.gov/div897/ctg/vrml'/>
 11            <meta name='referencecontent='Interactive Conformance Testing for VRML, Mary Brady and Lynn Rosenthal, NIST, created 8 September 2010 and updated 25 August 2016, https://www.nist.gov/itl/ssd/information-systems-group/interactive-conformance-testing-vrml'/>
 12            <meta name='infocontent='Correct definition and compliance of this conformance scene is maintained by the X3D Working Group, https://www.web3d.org/working-groups/x3d'/>
 13            <meta name='translatorcontent='Michael Kass NIST, Don Brutzman NPS'/>
 14            <meta name='translatedcontent='21 January 2001'/>
 15            <meta name='modifiedcontent='28 August 2023'/>
 16            <meta name='descriptioncontent='Test browser to switch between different backgrounds where each one contains a different backurl JPEG image associated with it. The back image may be changed by clicking on the appropriate text as indicated. The test should generate a different JPEG image each time the appropriate text is clicked. All images are on JPEG format and are from the from mountains of the High Sierra. A viewpoint node is set so that the image will be rotated 3.14 radians along the Y axis the make it possible to see and toggle the images.'/>
 17            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/set_backurl.x3d'/>
 18            <meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
 19            <meta name='licensecontent='../../license.html'/>
 20       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: back1, back2, back3, back4, image-back1, image-back2, image-back3, image-back4, the-appearance, the-style, the-touch1, the-touch2, the-touch3, the-touch4, the-view1

Index for Viewpoint node: the-view1
-->
 21       <Scene>
 22            <WorldInfo title='set_backurl.x3d'/>
 23            <NavigationInfo type='"EXAMINE" "WALK" "FLY" "ANY"'/>
 24            <Group>
 25                 <Viewpoint DEF='the-view1description='Back Vieworientation='0 1 0 3.14position='-10 0 20'/>
 26            </Group>
 27            <Group>
 28 
               <!-- ROUTE information for back1 node:  [from image-back1.value_out to set_bind ] -->
               <Background DEF='back1groundColor='0 0 0'   backUrl=' "mt-humphreys.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/mt-humphreys.jpg " '/>
 29 
               <!-- ROUTE information for back2 node:  [from image-back2.value_out to set_bind ] -->
               <Background DEF='back2groundColor='0 0 0'   backUrl=' "lostlakes.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/lostlakes.jpg " '/>
 30 
               <!-- ROUTE information for back3 node:  [from image-back3.value_out to set_bind ] -->
               <Background DEF='back3groundColor='0 0 0'   backUrl=' "mt-huxley.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/mt-huxley.jpg " '/>
 31 
               <!-- ROUTE information for back4 node:  [from image-back4.value_out to set_bind ] -->
               <Background DEF='back4groundColor='0 0 0'   backUrl=' "mt-whitney.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/mt-whitney.jpg " '/>
 32            </Group>
 33            <Transform rotation='0 1 0 3.14translation='-10 0 30'>
 34                 <Transform scale='0.02 0.02 0.02translation='-5.4 -2 0'>
 35                      <Shape>
 36                           <Appearance>
 37                                <Material ambientIntensity='1diffuseColor='0 1 0emissiveColor='0 1 0'/>
 38                           </Appearance>
 39                           <Text string='"CLICK TO SELECT BACK URL IMAGE"'>
 40 
                              <!-- FontStyle the-style is a DEF node that has 4 USE nodes: USE_1, USE_2, USE_3, USE_4 -->
                              <FontStyle DEF='the-stylejustify='"FIRST" "FIRST"size='28style='BOLD'/>
 41                           </Text>
 42                      </Shape>
 43                 </Transform>
 44                 <Transform scale='0.02 0.02 0.02translation='-5.4 -2.7 0'>
 45                      <Shape>
 46 
                         <!-- Appearance the-appearance is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                         <Appearance DEF='the-appearance'>
 47                                <Material ambientIntensity='1diffuseColor='0 0 1emissiveColor='0 0 1'/>
 48                           </Appearance>
 49                           <Text string='"Mt. Humphreys"'>
 50                                <FontStyle USE='the-style'/>
 51                           </Text>
 52                      </Shape>
 53 
                    <!-- ROUTE information for the-touch1 node:  [from isActive to image-back1.value_in ] -->
                    <TouchSensor DEF='the-touch1description='touch to activate'/>
 54                 </Transform>
 55                 <Transform scale='0.02 0.02 0.02translation='-5.4 -3.4 0'>
 56                      <Shape>
 57                           <Appearance USE='the-appearance'/>
 58                           <Text string='"Lost Lakes"'>
 59                                <FontStyle USE='the-style'/>
 60                           </Text>
 61                      </Shape>
 62 
                    <!-- ROUTE information for the-touch2 node:  [from isActive to image-back2.value_in ] -->
                    <TouchSensor DEF='the-touch2description='touch to activate'/>
 63                 </Transform>
 64                 <Transform scale='0.02 0.02 0.02translation='1 -2.7 0'>
 65                      <Shape>
 66                           <Appearance USE='the-appearance'/>
 67                           <Text string='"Mt. Huxley"'>
 68                                <FontStyle USE='the-style'/>
 69                           </Text>
 70                      </Shape>
 71 
                    <!-- ROUTE information for the-touch3 node:  [from isActive to image-back3.value_in ] -->
                    <TouchSensor DEF='the-touch3description='touch to activate'/>
 72                 </Transform>
 73                 <Transform scale='0.02 0.02 0.02translation='1 -3.4 0'>
 74                      <Shape>
 75                           <Appearance USE='the-appearance'/>
 76                           <Text string='"Mt. Whitney"'>
 77                                <FontStyle USE='the-style'/>
 78                           </Text>
 79                      </Shape>
 80 
                    <!-- ROUTE information for the-touch4 node:  [from isActive to image-back4.value_in ] -->
                    <TouchSensor DEF='the-touch4description='touch to activate'/>
 81                 </Transform>
 82            </Transform>
 83 
          <!-- ROUTE information for image-back1 node:  [from the-touch1.isActive to value_in ] [from value_out to back1.set_bind ] -->
          <Script DEF='image-back1'>
 84                 <field name='value_intype='SFBoolaccessType='inputOnly'/>
 85                 <field name='value_outtype='SFBoolaccessType='outputOnly'/>
  <![CDATA[
      
ecmascript:
function value_in (the_value) {
	if (the_value == true) { value_out = true; }
	else { value_out = true;}
}

    
]]>
 87            </Script>
 88 
          <!-- ROUTE information for image-back2 node:  [from the-touch2.isActive to value_in ] [from value_out to back2.set_bind ] -->
          <Script DEF='image-back2'>
 89                 <field name='value_intype='SFBoolaccessType='inputOnly'/>
 90                 <field name='value_outtype='SFBoolaccessType='outputOnly'/>
  <![CDATA[
      
ecmascript:

function value_in (the_value) 
{
	if (the_value == true)
	{
		value_out = true;
	}
	else
	{
		value_out = true;
	}
}

    
]]>
 92            </Script>
 93 
          <!-- ROUTE information for image-back3 node:  [from the-touch3.isActive to value_in ] [from value_out to back3.set_bind ] -->
          <Script DEF='image-back3'>
 94                 <field name='value_intype='SFBoolaccessType='inputOnly'/>
 95                 <field name='value_outtype='SFBoolaccessType='outputOnly'/>
  <![CDATA[
      
ecmascript:

function value_in (the_value) 
{
	if (the_value == true)
	{
		value_out = true;
	}
	else
	{
		value_out = true;
	}
}

    
]]>
 97            </Script>
 98 
          <!-- ROUTE information for image-back4 node:  [from the-touch4.isActive to value_in ] [from value_out to back4.set_bind ] -->
          <Script DEF='image-back4'>
 99                 <field name='value_intype='SFBoolaccessType='inputOnly'/>
100                 <field name='value_outtype='SFBoolaccessType='outputOnly'/>
  <![CDATA[
      
ecmascript:

function value_in (the_value) 
{
	if (the_value == true)
	{
		value_out = true;
	}
	else
	{
		value_out = true;
	}
}

    
]]>
102            </Script>
103            < ROUTE  fromNode='the-touch1' fromField='isActive' toNode='image-back1' toField='value_in'/>
104            < ROUTE  fromNode='the-touch2' fromField='isActive' toNode='image-back2' toField='value_in'/>
105            < ROUTE  fromNode='the-touch3' fromField='isActive' toNode='image-back3' toField='value_in'/>
106            < ROUTE  fromNode='the-touch4' fromField='isActive' toNode='image-back4' toField='value_in'/>
107            < ROUTE  fromNode='image-back1' fromField='value_out' toNode='back1' toField='set_bind'/>
108            < ROUTE  fromNode='image-back2' fromField='value_out' toNode='back2' toField='set_bind'/>
109            < ROUTE  fromNode='image-back3' fromField='value_out' toNode='back3' toField='set_bind'/>
110            < ROUTE  fromNode='image-back4' fromField='value_out' toNode='back4' toField='set_bind'/>
111       </Scene>
112  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: back1, back2, back3, back4, image-back1, image-back2, image-back3, image-back4, the-appearance, the-style, the-touch1, the-touch2, the-touch3, the-touch4, the-view1

Index for Viewpoint node: the-view1
-->
X3D Tooltips element index: Appearance, Background, field, FontStyle, Group, head, Material, meta, NavigationInfo, ROUTE, Scene, Script, Shape, Text, TouchSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table entries with 8 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.

the-touch1
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
image-back1
Script
value_in
SFBool
then
 
 
 
image-back1
Script
value_out
SFBool

ROUTE
event to
(2)
back1
Background
set_bind
SFBool

the-touch2
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
image-back2
Script
value_in
SFBool
then
 
 
 
image-back2
Script
value_out
SFBool

ROUTE
event to
(2)
back2
Background
set_bind
SFBool

the-touch3
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
image-back3
Script
value_in
SFBool
then
 
 
 
image-back3
Script
value_out
SFBool

ROUTE
event to
(2)
back3
Background
set_bind
SFBool

the-touch4
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
image-back4
Script
value_in
SFBool
then
 
 
 
image-back4
Script
value_out
SFBool

ROUTE
event to
(2)
back4
Background
set_bind
SFBool

Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/set_backurlIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/set_backurl.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)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->