<?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='Immersive' 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 name='titlecontent='PongGame.x3d'/>
<meta name='descriptioncontent='12 Second Simulation Of The Game Pong'/>
<meta name='creatorcontent='Nicholas Hittner'/>
<meta name='createdcontent='19 July 2021'/>
<meta name='modifiedcontent='20 July 2021'/>
<meta name='Soundcontent='pong.wav'/>
<meta name='identifiercontent=' https://x3dgraphics.com/examples/X3dForAdvancedModeling/Animation/PongGame.x3d '/>
<meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<WorldInfo info='"PongSimulation"title='Pong'/>
<Viewpoint description='Pong'/>
<!-- ROUTE information for SceneClock node:  [from GameTrigger.triggerTime to startTime ] [from fraction_changed to SquareBallPosition.set_fraction ] [from fraction_changed to RightPaddlePosition.set_fraction ] [from fraction_changed to LeftPaddlePosition.set_fraction ] [from fraction_changed to ScoreSequencer.set_fraction ] [from startTime to PongAudio.startTime ] -->
<TimeSensor DEF='SceneClockcycleInterval='12'/>
<!-- ROUTE information for SquareBall node:  [from SquareBallPosition.value_changed to set_translation ] -->
<Transform DEF='SquareBalltranslation='.5 .5 0'>
<Shape>
<Rectangle2D size='.3 .3'/>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9'/>
</Appearance>
</Shape>
</Transform>
<!-- ROUTE information for SquareBallPosition node:  [from SceneClock.fraction_changed to set_fraction ] [from value_changed to SquareBall.set_translation ] -->
<PositionInterpolator DEF='SquareBallPositionkey='0 0.1667 0.25 0.5 0.6667 0.7 1keyValue='0.5 0.5 1 2.5 2 1 1.5 2.5 1 -2.5 0 1 2 -2.5 1 2.5 -2 1 -2.8 2.3 1'/>
<ROUTE fromNode='SquareBallPositionfromField='value_changedtoNode='SquareBalltoField='set_translation'/>
<ROUTE fromNode='SceneClockfromField='fraction_changedtoNode='SquareBallPositiontoField='set_fraction'/>
<!-- ROUTE information for RightPaddle node:  [from RightPaddlePosition.value_changed to set_translation ] -->
<Transform DEF='RightPaddletranslation='2.8 .5 0'>
<Shape>
<Rectangle2D size='.2 1.2'/>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9'/>
</Appearance>
</Shape>
</Transform>
<!-- ROUTE information for RightPaddlePosition node:  [from SceneClock.fraction_changed to set_fraction ] [from value_changed to RightPaddle.set_translation ] -->
<PositionInterpolator DEF='RightPaddlePositionkey='0 0.1667 0.3333 0.5 0.6667 0.8333 1keyValue='2.8 0.5 1 2.8 2 1 2.8 0 1 2.8 1 1 2.8 -2 1 2.8 -2 1 2.8 0 1'/>
<ROUTE fromNode='RightPaddlePositionfromField='value_changedtoNode='RightPaddletoField='set_translation'/>
<ROUTE fromNode='SceneClockfromField='fraction_changedtoNode='RightPaddlePositiontoField='set_fraction'/>
<!-- ROUTE information for LeftPaddle node:  [from LeftPaddlePosition.value_changed to set_translation ] -->
<Transform DEF='LeftPaddletranslation='-2.8 -.5 0'>
<Shape>
<Rectangle2D size='.2 1.2'/>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9'/>
</Appearance>
</Shape>
</Transform>
<!-- ROUTE information for LeftPaddlePosition node:  [from SceneClock.fraction_changed to set_fraction ] [from value_changed to LeftPaddle.set_translation ] -->
<PositionInterpolator DEF='LeftPaddlePositionkey='0 0.1667 0.3333 0.5 0.6667 0.8333 1keyValue='-2.8 0.5 1 -2.8 1 1 -2.8 -1 1 -2.8 0 1 -2.8 -1 1 -2.8 -2 1 -2.8 1 1'/>
<ROUTE fromNode='LeftPaddlePositionfromField='value_changedtoNode='LeftPaddletoField='set_translation'/>
<ROUTE fromNode='SceneClockfromField='fraction_changedtoNode='LeftPaddlePositiontoField='set_fraction'/>
<Transform DEF='TriggerBackgroundtranslation='0 0 -8'>
<!-- ROUTE information for GameTouched node:  [from isActive to GameTrigger.set_boolean ] -->
<TouchSensor DEF='GameToucheddescription='touch to activate'/>
<Shape>
<Appearance>
<Material diffuseColor='0 0 0'/>
</Appearance>
<Rectangle2D size='14 14'/>
</Shape>
</Transform>
<!-- ROUTE information for GameTrigger node:  [from GameTouched.isActive to set_boolean ] [from triggerTime to SceneClock.startTime ] -->
<TimeTrigger DEF='GameTriggercontainerField='children'/>
<ROUTE fromNode='GameTouchedfromField='isActivetoNode='GameTriggertoField='set_boolean'/>
<ROUTE fromNode='GameTriggerfromField='triggerTimetoNode='SceneClocktoField='startTime'/>
<Transform translation='0 0 -1'>
<Shape DEF='MidLine'>
<IndexedLineSet coordIndex='0 1 0 1'>
<Coordinate point='0 3.72 -1 0 -3.72 -1'/>
</IndexedLineSet>
<Appearance>
<Material emissiveColor='1 1 1'/>
<LineProperties DEF='DashedLinelinetype='2linewidthScaleFactor='3containerField='lineProperties'/>
</Appearance>
</Shape>
</Transform>
<Transform>
<Shape DEF='TopLine'>
<IndexedLineSet coordIndex='0 1 0 1'>
<Coordinate point='-3.5 3.4 -1 3.5 3.4 -1'/>
</IndexedLineSet>
<Appearance>
<Material emissiveColor='1 1 1'/>
<LineProperties linewidthScaleFactor='5containerField='lineProperties'/>
</Appearance>
</Shape>
</Transform>
<Transform>
<Shape DEF='BottomLine'>
<IndexedLineSet coordIndex='0 1 0 1'>
<Coordinate point='-3.5 -3.4 -1 3.5 -3.4 -1'/>
</IndexedLineSet>
<Appearance>
<Material emissiveColor='1 1 1'/>
<LineProperties linewidthScaleFactor='5containerField='lineProperties'/>
</Appearance>
</Shape>
</Transform>
<Transform DEF='LeftScoretranslation='-.7 3 0'>
<Shape>
<Text string='"0"'>
<FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"style='BOLD'/>
</Text>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9'/>
</Appearance>
</Shape>
</Transform>
<Transform DEF='RightScoretranslation='.7 3 0'>
<!-- ROUTE information for ScoreSequencer node:  [from SceneClock.fraction_changed to set_fraction ] [from value_changed to GoalScored.whichChoice ] -->
<IntegerSequencer DEF='ScoreSequencerkey='0.01 0.99keyValue='0 1containerField='children'/>
<!-- ROUTE information for GoalScored node:  [from ScoreSequencer.value_changed to whichChoice ] -->
<Switch DEF='GoalScoredwhichChoice='0'>
<Shape DEF='Child0'>
<Text string='"0"'>
<FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"style='BOLD'/>
</Text>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9'/>
</Appearance>
</Shape>
<Shape DEF='Child1'>
<Text string='"1"'>
<FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"style='BOLD'/>
</Text>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9'/>
</Appearance>
</Shape>
</Switch>
</Transform>
<ROUTE fromNode='SceneClockfromField='fraction_changedtoNode='ScoreSequencertoField='set_fraction'/>
<ROUTE fromNode='ScoreSequencerfromField='value_changedtoNode='GoalScoredtoField='whichChoice'/>
<Sound direction='0 -0.19612 -0.98058location='0 1 0maxBack='100maxFront='100minBack='20minFront='20priority='1spatialize='false'>
<!-- ROUTE information for PongAudio node:  [from SceneClock.startTime to startTime ] -->
<AudioClip DEF='PongAudiodescription='AudioClipstopTime='12'
  url=' "pong.wav" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/Animation/pong.wav" '/>
</Sound>
<ROUTE fromNode='SceneClockfromField='startTimetoNode='PongAudiotoField='startTime'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : BottomLine, Child0, Child1, DashedLine, GameTouched, GameTrigger, GoalScored, LeftPaddle, LeftPaddlePosition, LeftScore, MidLine, PongAudio, RightPaddle, RightPaddlePosition, RightScore, SceneClock, ScoreSequencer, SquareBall, SquareBallPosition, TopLine, TriggerBackground

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

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