<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://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 =' http://www.web3d.org/specifications/x3d-3.0.xsd '>
<head>
<meta name='titlecontent='Figure10_07LightBulb.x3d'/>
<meta name='creatorcontent='Figure 10.7, 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/ch10/10fig07.htm '/>
<meta name='transcribercontent='Don Brutzman'/>
<meta name='createdcontent='15 August 2000'/>
<meta name='modifiedcontent='14 January 2010'/>
<meta name='descriptioncontent='A lightbulb that varies in brightness as the pointing device is held over the socket.'/>
<meta name='identifiercontent=' http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter10Materials/Figure10_07LightBulb.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<Viewpoint description='Light bulb: put mouse over socket to change brightnessposition='0 0 8'/>
<Transform translation='0 2 0'>
<Shape>
<Appearance>
<Material diffuseColor='0.4 0.4 0.4emissiveColor='0.1 0.1 0.1'/>
</Appearance>
<Cylinder radius='0.05'/>
</Shape>
<Group>
<Transform translation='0 -1 0'>
<Shape>
<Appearance DEF='BULB_CASING'>
<Material DEF='SOCKET_MATERIALdiffuseColor='0.4 0.4 0.16emissiveColor='0.4 0.4 0.16'/>
</Appearance>
<Sphere radius='0.5'/>
</Shape>
</Transform>
<Transform translation='0 -1.5 0'>
<Shape>
<Appearance USE='BULB_CASING'/>
<Cylinder height='1radius='0.5'/>
</Shape>
</Transform>
<!-- ROUTE information for SOCKET_TOUCHSENSOR node:  [from isOver to LIGHT_TIMESENSOR.enabled ] -->
<TouchSensor DEF='SOCKET_TOUCHSENSORdescription='touch to change light intensity'/>
</Group>
<Transform translation='0 -2.95 0'>
<Shape>
<Appearance>
<!-- ROUTE information for BULB_MATERIAL node:  [from WHITE_COLORINTERPOLATOR.value_changed to set_diffuseColor ] [from WHITE_COLORINTERPOLATOR.value_changed to set_emissiveColor ] -->
<Material DEF='BULB_MATERIALdiffuseColor='0.4 0.4 0.4emissiveColor='0.8 0.8 0.8'/>
</Appearance>
<Sphere/>
</Shape>
<!-- ROUTE information for LIGHTSOURCE node:  [from WHITE_COLORINTERPOLATOR.value_changed to set_color ] -->
<PointLight DEF='LIGHTSOURCE'/>
</Transform>
</Transform>
<!-- ROUTE information for LIGHT_TIMESENSOR node:  [from SOCKET_TOUCHSENSOR.isOver to enabled ] [from fraction_changed to WHITE_COLORINTERPOLATOR.set_fraction ] -->
<TimeSensor DEF='LIGHT_TIMESENSORcycleInterval='3enabled='falseloop='true'/>
<!-- ROUTE information for WHITE_COLORINTERPOLATOR node:  [from LIGHT_TIMESENSOR.fraction_changed to set_fraction ] [from value_changed to BULB_MATERIAL.set_diffuseColor ] [from value_changed to BULB_MATERIAL.set_emissiveColor ] [from value_changed to LIGHTSOURCE.set_color ] -->
<ColorInterpolator DEF='WHITE_COLORINTERPOLATORkey='0 0.1 0.4 0.6 0.9 1keyValue='1 1 1 1 1 1 0.1 0.1 0.1 0.1 0.1 0.1 1 1 1 1 1 1'/>
<ROUTE fromNode='SOCKET_TOUCHSENSORfromField='isOvertoNode='LIGHT_TIMESENSORtoField='enabled'/>
<ROUTE fromNode='LIGHT_TIMESENSORfromField='fraction_changedtoNode='WHITE_COLORINTERPOLATORtoField='set_fraction'/>
<ROUTE fromNode='WHITE_COLORINTERPOLATORfromField='value_changedtoNode='BULB_MATERIALtoField='set_diffuseColor'/>
<ROUTE fromNode='WHITE_COLORINTERPOLATORfromField='value_changedtoNode='BULB_MATERIALtoField='set_emissiveColor'/>
<ROUTE fromNode='WHITE_COLORINTERPOLATORfromField='value_changedtoNode='LIGHTSOURCEtoField='set_color'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : BULB_CASING, BULB_MATERIAL, LIGHT_TIMESENSOR, LIGHTSOURCE, SOCKET_MATERIAL, SOCKET_TOUCHSENSOR, WHITE_COLORINTERPOLATOR

Index for Viewpoint image : Viewpoint_1
-->

<!-- 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)
-->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->