<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Interchange' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  <head>
    <meta content='GroupAnimated.x3d' name='title'/>
    <meta content='Example for Group node, with animated color for the Sphere' name='description'/>
    <meta content='Leonard Daly and Don Brutzman' name='creator'/>
    <meta content='13 November 2005' name='created'/>
    <meta content='20 October 2019' name='modified'/>
    <meta content='https://X3dGraphics.com' name='reference'/>
    <meta content='https://www.web3d.org/x3d/content/examples/X3dResources.html' name='reference'/>
    <meta content='Copyright (c) 2005, Daly Realism and Don Brutzman' name='rights'/>
    <meta content='X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com' name='subject'/>
    <meta content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/GroupAnimated.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='GroupAnimated.x3d'/>
    <Background skyColor='1 1 1'/>
    <Viewpoint description='Book View' orientation='-0.668 -0.724 -0.174 0.7' position='-1.93 1.78 3.28'/>
    <Group>
      <Shape>
        <Appearance>
          <Material diffuseColor='1 0 0'/>
        </Appearance>
        <Box/>
      </Shape>
      <Shape>
        <Appearance>
          <Material DEF='Pulsar' diffuseColor='0 0 1'/>
        </Appearance>
        <Sphere radius='1.4'/>
      </Shape>
      <!-- here is a fun animation to change color of the Sphere, embedded inside the Group -->
      <TimeSensor DEF='Timer' cycleInterval='6' loop='true' startTime='1'/>
      <ColorInterpolator DEF='Colorer' key='0 .5 1' keyValue='0 0 1 0 1 0 0 0 1'/>
      <ROUTE fromField='fraction_changed' fromNode='Timer' toField='set_fraction' toNode='Colorer'/>
      <ROUTE fromField='value_changed' fromNode='Colorer' toField='diffuseColor' toNode='Pulsar'/>
    </Group>
  </Scene>
</X3D>