1
我需要在x3d中設置內聯對象的大小。誰能幫我這個?我需要設置內聯對象的大小在x3d
我需要在x3d中設置內聯對象的大小。誰能幫我這個?我需要設置內聯對象的大小在x3d
你可以包裹內聯在變換,那麼你可以通過改變變換的比例改變內嵌的大小。
例如:http://jsfiddle.net/wildpeaks/ZZfb2/2/
<X3D width="400px" height="300px" showStat="true">
<Scene>
<Transform id="redBox">
<Inline url="http://x3dom.org/x3dom/example/scene/redBox.x3d" />
</Transform>
</Scene>
</X3D>
<button onclick="change_size()">Click to change the size</button>
function change_size() {
document.getElementById('redBox').setAttribute('scale', '3 0.5 1');
}
這設定對象的比例,而不是其尺寸。當您這樣做時: 您的結果相同。但謝謝你的嘗試。 –
user1796705