<?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='Immersive'  version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.0.xsd ' >
<head>
<component level='3name='Interpolation'/>
<meta name='titlecontent=' PositionInterpolator2dExample.x3d '/>
<meta name='descriptioncontent='Example to interpolate a Vector2Float value - click geometry to activate animation loop.'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='16 October 2001'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent=' https://www.web3d.org/technicalinfo/specifications/vrml97/part1/concepts.html#4.6.8 '/>
<meta name='referencecontent=' https://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#CoordinateInterpolator '/>
<meta name='referencecontent=' https://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#Extrusion '/>
<meta name='subjectcontent='Vector2FloatArray Interpolator'/>
<meta name='subjectcontent='PositionInterpolator2D'/>
<meta name='identifiercontent=' 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>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: Clock, ContactImage, ImageAspectRatio, InterpolateTTscale, Toucher, TTN, TwoByTwoSquare

Index for Viewpoint node: Viewpoint_1
-->
<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'/>

<!-- ROUTE information for InterpolateTTscale node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to TTN.set_scale ] -->
<PositionInterpolator2D DEF='InterpolateTTscalekey='0 0.35 0.45 0.8 0.9 1keyValue='1.0 1.0 3 3 3 3 0.8 0.8 1.0 1.0 1.0 1.0'/>

< ROUTE  fromNode=' Clock' fromField='fraction_changed' toNode=' InterpolateTTscale' toField='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=' Toucher' fromField='isActive' toNode=' Clock' toField='enabled'/>
<Shape>
<IndexedFaceSet coordIndex='0 1 2 3 0 -1'>
<Coordinate DEF='TwoByTwoSquarepoint='-1 -1 0 1 -1 0 1 1 0 -1 1 0'/>
</IndexedFaceSet>
<Appearance> </Appearance>
</Shape>
< ROUTE  fromNode=' InterpolateTTscale' fromField='value_changed' toNode=' TTN' toField='set_scale'/>
</Transform>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: Clock, ContactImage, ImageAspectRatio, InterpolateTTscale, Toucher, TTN, TwoByTwoSquare

Index for Viewpoint node: Viewpoint_1
-->

Event Graph ROUTE Table entries with 3 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.

Toucher
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
Clock
TimeSensor
enabled
SFBool

 
 
then
Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
InterpolateTTscale
PositionInterpolator2D
set_fraction
SFFloat

 
 
then
InterpolateTTscale
PositionInterpolator2D
value_changed
SFVec2f

ROUTE
event to
(3)
TTN
TextureTransform
set_scale
SFVec2f


Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
InterpolateTTscale
PositionInterpolator2D
set_fraction
SFFloat

 
 
then
InterpolateTTscale
PositionInterpolator2D
value_changed
SFVec2f

ROUTE
event to
(2)
TTN
TextureTransform
set_scale
SFVec2f


-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/development/PositionInterpolator2dExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/development/PositionInterpolator2dExample.x3d -->

<!-- Color legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

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