只是想知道你能不能帮忙。
我有以下代码:
<transform DEF='veyron_colour_change' rotation='0.2815 -0.6785 0.6785 -3.69' scale='0.2107 0.2107 0.2107' translation='-2.291 26.33 19.26'>
<shape>
<appearance>
<material ambientIntensity='1' diffuseColor='1 0.1255 0.1255' shininess='0.3825' specularColor='1.215 1.215 1.215'></material>
</appearance>
<indexedFaceSet creaseAngle='1' DEF='veyron_colour_change-FACES'...
我正在尝试使用 jQuery 选择材质元素以更改diffuseColor 属性。我试图这样做的代码是:
$('[DEF="veyron_colour_change"]').next('[diffuseColor]').attr('diffuseColor', '0.2118 0.1569 0.9333');
但它不起作用。有任何想法吗?
谢谢