[X3D-Public] update index in XED xhtml

Felipe Bordeu felipe.bordeu at ec-nantes.fr
Wed Nov 14 04:26:30 PST 2012


hi everybody,

I'm trying to setup a X3D context (in a xhtml page) with points and 
index generated from a javascript.

the X3D part of my xhtml webpage is very simple

<X3D  xmlns='http://www.web3d.org/specifications/x3d-namespace' 
id='someUniqueId' showStat='true' showLog='true' x='0px' y='0px' >
   <Scene >
     <Shape>
       <IndexedTriangleSet id='PXDMFFACES' DEF='VTKindex0001' 
solid='false' ccw='true' index='0 1 3 0 2 4'>
         <Coordinate id='PXDMFPOINTS' DEF='VTKcoordinates0001' point='0 
0 0 1 0 0 0 1 0 0 0 1 1 1 1'/>
       </IndexedTriangleSet>
   </Shape>
</Scene>

the, javascript I use this line to change the points:

document.getElementById('PXDMFPOINTS').setAttribute( "point", myGeometry );

this workt great.

but this line does not work.

document.getElementById('PXDMFFACES').setAttribute( "index", myTopology );

What is the correct way to update index of a shape from javascript

ps: using firefox16.0.2 in linux64

Thanks
Felipe

-- 

Felipe Bordeu Weldt
Ingénieur de Recherche
-------------------------------------
Tél. : 33 (0)2 40 37 16 57
Fax. : 33 (0)2 40 74 74 06
Felipe.Bordeu at ec-nantes.fr
Institut GeM - UMR CNRS 6183
École Centrale Nantes
1 Rue de La Noë, 44321 Nantes, FRANCE
-------------------------------------




More information about the X3D-Public mailing list