简体   繁体   English

修改x3d场景的节点不会产生任何结果

[英]Modifying a node of an x3d scene produce no result

I'm using x3d scene in a web page. 我在网页中使用x3d场景。 In this page, I have an indexedfaceset which works fine. 在此页面中,我有一个工作正常的indexedfaceset I'm adding a <Color color="..."></Color> and it's working fine as well. 我添加了<Color color="..."></Color> ,它也可以正常工作。

Now what I'm trying to do is to change the content of the Color using javascript once the scene is already drawn. 现在,我想做的是一旦绘制了场景,就使用javascript更改Color的内容。 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. 我在x3d的运行时api上看不到任何东西。

Thanks 谢谢

through x3dom? 通过x3dom?

if so check out my answer here. 如果是这样,请在这里查看我的答案。 shows how to set attributes through both tag and id on js mouse events 显示了如何在js鼠标事件上同时通过标签和ID设置属性

i know your trying to change index face set color attribute but i think the below should give ua starting point. 我知道您尝试更改索引面集的颜色属性,但我认为以下内容应为您提供一个起点。 let me know if you need a more concise example 让我知道您是否需要一个更简洁的示例

attaching attribute to x3dom object 将属性附加到x3dom对象

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM