CoordMorph.x3d

From Web3D.org
Jump to: navigation, search

MovingBox

Test of a morphing triangle using a looped TimeSensor driving a CoordinateInterpolator.

<?xml version='1.0' encoding='UTF-8'?>
<X3D profile='Interactive' version='3.0'>
<head>
</head>
<Scene>
      <TimeSensor DEF='TS' loop='true' cycleInterval='5.0'></TimeSensor>
      <Group>
         <CoordinateInterpolator DEF='CI' key='0.0 ,1.0' keyValue='1.0 0.0 -1.0 -1.0 0.0 -1.0 0.0 0.0 1.0 0.0 0.5 0.0 ,1.0 0.0 -1.0 -1.0 0.0 -1.0 0.0 0.0 1.0 0.0 3.0 0.0'></CoordinateInterpolator>
         <Shape>
            <Appearance>
               <Material></Material>
            </Appearance>
            <IndexedFaceSet coordIndex='0 1 3 -1 1 2 3 -1 2 0 3'>
               <Coordinate DEF='C' point='1.0 0.0 -1.0 ,-1.0 0.0 -1.0 ,0.0 0.0 1.0 ,0.0 0.5 0.0'></Coordinate>
            </IndexedFaceSet>
         </Shape>
      </Group>
   <ROUTE fromNode='CI' fromField='value_changed' toNode='C' toField='point'></ROUTE>
   <ROUTE fromNode='TS' fromField='fraction_changed' toNode='CI' toField='set_fraction'></ROUTE>
</Scene></X3D>

Browser Results

Browser Version Result Notes
BS Contact 7.107 Expected
FreeWRL Untested
Octaga 2.2.0.12 Expected
Instant Reality 2.0.0_beta4 Expected
Flux 2.1 Expected
Vivaty 1.0 Expected
Xj3D 2_M1_DEV_2008-06_02 Expected