0

When loading in an external X3D file via the "inline" tag, I am unable to change the textures my X3D file uses with html.

I am able to edit the X3D file itself and change the textures just fine, but I need to be able to change html values for the textures so that I can hook it up to PHP/SQL later.

Does anyone know how to make it so you can change textures for an inline X3D file? so far I have no found a way, and only am able to change textures without using inline/external X3D models.

4

1 回答 1

0

我意识到您可以为您正在外部加载的“内联”X3D 文件分配一个名称空间,然后通过在其前面加上内联名称空间后跟两个下划线来获取要纹理化的网格的“DEF”ID。

然后您可以使用 javascript 执行以下操作:document.getElementById('inlineNameSpace__DEFID').setAttribute('item', 'value');

所以,现在我正在使用 javascript 来处理这个问题,而且它运行良好!

于 2015-12-20T14:14:56.743 回答