0

I'm using x3d scene in a web page. In this page, I have an indexedfaceset which works fine. I'm adding a <Color color="..."></Color> and it's working fine as well.

Now what I'm trying to do is to change the content of the Color using javascript once the scene is already drawn. Unfortunately the modifications aren't taken into account.

Do I have to force a redraw of the scene or something like that? I saw nothing on the runtime api of x3d.

Thanks

Yann Sagon
  • 547
  • 3
  • 21

1 Answers1

0

through x3dom?

if so check out my answer here. shows how to set attributes through both tag and id on js mouse events

i know your trying to change index face set color attribute but i think the below should give u a starting point. let me know if you need a more concise example

attaching attribute to x3dom object

Community
  • 1
  • 1
drfrog
  • 347
  • 2
  • 9
  • Thanks. Yes it's trough x3dom. I don't have problem to get and set elements. The only probleme is that for an indexedfaceset, modifying the color tag after the object was drawn has no effect. A workaround that I'm using is to remove the whole indexedfaceset and reinsert it. It's working just fine like that. – Yann Sagon Feb 07 '13 at 10:38