<?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>
<!-- Note that the following component statement is needed to add PositionInterpolator2D to Immersive profile nodes -->
<component level='3name='Interpolation'/>
<meta name='titlecontent='PositionInterpolator2dExample.x3d'/>
<meta name='descriptioncontent='Interpolation example using PositionInterpolator2D, user can touch (select) the geometry to activate an animation loop that rescales the image texture superimposed on the geometry.'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='16 October 2001'/>
<meta name='modifiedcontent='14 June 2020'/>
<meta name='subjectcontent='PositionInterpolator2D'/>
<meta name='identifiercontent=' https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/PositionInterpolator2dExample.x3d '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/Basic/development/PositionInterpolator2dExample.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<WorldInfo title='PositionInterpolator2dExample.x3d'/>
<Viewpoint description='Click to activate animationposition='0 0 3'/>
<!-- ROUTE information for Clock node:  [from Toucher.isActive to enabled ] [from fraction_changed to InterpolateTTscale.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='10enabled='falseloop='true'/>
<!-- author fun: experiment by comparing results with keyValue='1 1 1 3 1 3 0.8 0.8 1 1 1 1' -->
<!-- ROUTE information for InterpolateTTscale node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to TextureTransformNode.set_scale ] -->
<PositionInterpolator2D DEF='InterpolateTTscalekey='0 0.35 0.45 0.8 0.9 1keyValue='1 1 3 3 3 3 0.8 0.8 1 1 1 1'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='InterpolateTTscaletoField='set_fraction'/>
<Transform DEF='ImageAspectRatioscale='1.5 1 1'>
<!-- ROUTE information for Toucher node:  [from isActive to Clock.enabled ] -->
<TouchSensor DEF='Toucherdescription='click and hold to animate TextureTransform'/>
<ROUTE fromNode='ToucherfromField='isActivetoNode='ClocktoField='enabled'/>
<Shape>
<!-- solid='true' means single-sided rendering -->
<IndexedFaceSet coordIndex='0 1 2 3 0 -1'>
<!-- note how DEF names can be self-documenting -->
<Coordinate DEF='TwoByTwoSquarepoint='-1 -1 0 1 -1 0 1 1 0 -1 1 0'/>
</IndexedFaceSet>
<Appearance> </Appearance>
</Shape>
<!-- author fun: replace destination toField from 'set_scale' with new value of 'set_translation' or 'set_center' -->
<ROUTE fromNode='InterpolateTTscalefromField='value_changedtoNode='TextureTransformNodetoField='set_scale'/>
</Transform>
</Scene>
</X3D>
<!--

Index for DEF nodes : Clock, ContactImage, ImageAspectRatio, InterpolateTTscale, TextureTransformNode, Toucher, TwoByTwoSquare

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