I want to visualize a cross belt Sorter with x3dom. The cross belt sorter has a form of a loop with 90° degree arcs. For the cross belts I use:
< Rectangle2D size='0.6 0.6'/>
The Sorter has 58 cross belts and for each cross belt, I want dynamically change the color of the material via javascript. The cross belts should move along the sorter as in real. Therefore I use the tag:
< timeSensor DEF='timeKOSorter' cycleInterval='60' loop='true'>< /timeSensor>
and for example for the cross belt 0:
< PositionInterpolator DEF='POSKO01_0' key='0 0.344 0.355 0.366 0.377 0.389 0.4 0.411 0.433 0.444 0.455 0.466 0.478 0.489 0.5 0.844 0.855 0.866 0.877 0.889 0.9 0.911 0.933 0.944 0.955 0.966 0.978 0.989 1.0 ' keyValue='8.0 0 0.0 -8.0 0 0.0 -8.518 0 0.068 -9.0 0 0.268 -9.414 0 0.586 -9.732 0 1.0 -9.932 0 1.482 -10.0 0 2.0 -10.0 0 3.0 -9.932 0 3.518 -9.732 0 4.0 -9.414 0 4.414 -9.0 0 4.732 -8.518 0 4.932 -8.0 0 5.0 8.0 0 5.0 8.518 0 4.932 9.0 0 4.732 9.414 0 4.414 9.732 0 4.0 9.932 0 3.518 10.0 0 3.0 10.0 0 2.0 9.932 0 1.482 9.732 0 1.0 9.414 0 0.586 9.0 0 0.268 8.518 0 0.068 8.0 0 0.0 '>< /PositionInterpolator>
< Route fromNode='timeKOSorter' fromField='fraction_changed' toNode='POSKO01_0' toField='set_fraction'>< /Route>
< Route fromNode='POSKO01_0' fromField ='value_changed' toNode='crossKO01_0' toField='translation'>< /Route>
< OrientationInterpolator DEF='oriKOSorterKO01_0' key='0 0.344 0.355 0.366 0.377 0.389 0.4 0.411 0.433 0.444 0.455 0.466 0.478 0.489 0.5 0.844 0.855 0.866 0.877 0.889 0.9 0.911 0.933 0.944 0.955 0.966 0.978 0.989 1.0 ' keyValue='0 1 0 0.0 0 1 0 0.0 0 1 0 0.262 0 1 0 0.524 0 1 0 0.785 0 1 0 1.047 0 1 0 1.309 0 1 0 1.571 0 1 0 1.571 0 1 0 1.833 0 1 0 2.094 0 1 0 2.356 0 1 0 2.618 0 1 0 2.88 0 1 0 3.142 0 1 0 3.142 0 1 0 3.403 0 1 0 3.665 0 1 0 3.927 0 1 0 4.189 0 1 0 4.451 0 1 0 4.712 0 1 0 4.712 0 1 0 4.974 0 1 0 5.236 0 1 0 5.498 0 1 0 5.76 0 1 0 6.021 0 1 0 0.0 '>< /OrientationInterpolator>
< Route fromNode='timeKOSorter' fromField='fraction_changed' toNode='oriKOSorterKO01_0' toField='set_fraction'>< /Route>
< Route fromNode='oriKOSorterKO01_0' fromField ='value_changed' toNode='crossKO01_0' toField='rotation'>< /Route>
My problem now is, that if I animate 2 Sorters with each 58 cross belts it costs a lot of CPU time. On my computer it uses more than 40 % CPU power. Have anyone an idea how to achieve a better performance?