<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Interactive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.0.xsd '>
<head>
<meta name='titlecontent='Figure22_4BackgroundBinding.x3d'/>
<meta name='creatorcontent='Figure 22.4, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/>
<meta name='referencecontent=' http://www.wiley.com/legacy/compbooks/vrml2sbk/ch22/22fig04.htm '/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='22 August 2000'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='descriptioncontent='Backgrounds bound and unbound by touching a red cube or a blue sphere.'/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter22Background/Figure22_4BackgroundBinding.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<!-- Note that navigation mode doesn't matter much here, since you cannot approach the backround, it always stays at maximum (horizon) distance -->
<!-- At least EXAMINE mode lets you easily look up/down/around. -->
<WorldInfo title='Figure22_4BackgroundBinding.x3d'/>
<Group>
<Background groundAngle='1.309 1.570796groundColor='0.1 0.1 0 0.4 0.25 0.2 0.6 0.6 0.6skyAngle='1.309 1.571skyColor='0 0.2 0.7 0 0.5 1 1 1 1'/>
<!-- ROUTE information for AlternateBackground1 node:  [from TouchBox.isActive to set_bind ] -->
<Background DEF='AlternateBackground1groundAngle='1.309 1.570796groundColor='0.1 0.1 0 0.5 0.25 0.2 0.6 0.6 0.2skyAngle='1.309 1.571skyColor='1 0 0 1 0.4 0 1 1 0'/>
<!-- ROUTE information for AlternateBackground2 node:  [from TouchSphere.isActive to set_bind ] -->
<Background DEF='AlternateBackground2groundAngle='1.309 1.570796groundColor='0 0 0.1 0 0.1 0.3 0.3 0.3 0.6skyAngle='1.309 1.571skyColor='1 0 0.8 0.5 0 0.8 0 0 0.8'/>
</Group>
<!-- Shapes to act as buttons -->
<Transform translation='2 0 0'>
<Shape>
<Appearance>
<Material diffuseColor='1 0 0'/>
</Appearance>
<Box/>
</Shape>
<!-- ROUTE information for TouchBox node:  [from isActive to AlternateBackground1.set_bind ] -->
<TouchSensor DEF='TouchBoxdescription='Alternate reddish-orange background'/>
</Transform>
<Transform translation='-2 0 0'>
<Shape>
<Appearance>
<Material diffuseColor='0 0 0.8'/>
</Appearance>
<Sphere/>
</Shape>
<!-- ROUTE information for TouchSphere node:  [from isActive to AlternateBackground2.set_bind ] -->
<TouchSensor DEF='TouchSpheredescription='Alternate blueish-purple background'/>
</Transform>
<ROUTE fromNode='TouchBoxfromField='isActivetoNode='AlternateBackground1toField='set_bind'/>
<ROUTE fromNode='TouchSpherefromField='isActivetoNode='AlternateBackground2toField='set_bind'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : AlternateBackground1, AlternateBackground2, TouchBox, TouchSphere
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->

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