0
我試圖設置與官方demo中相同的卷渲染器。不幸的是,我總是得到錯誤Cannot read property 'textures' of null
。我創建了一個簡單的JSFiddle到demonstrate the problem。 如何讓音量顯示?使用x3dom渲染卷數據時出錯
我試圖設置與官方demo中相同的卷渲染器。不幸的是,我總是得到錯誤Cannot read property 'textures' of null
。我創建了一個簡單的JSFiddle到demonstrate the problem。 如何讓音量顯示?使用x3dom渲染卷數據時出錯
簡單問題:您一直在使用XHTML語法。 JSFiddle需要HTML語法。我已經解決了這個問題here:
<X3D xmlns='http://www.web3d.org/specifications/x3d-namespace' showStat='true' showLog='false' width='500px' height='500px'>
<Scene>
<Background skyColor='0.0 0.0 0.0'>
</Background>
<VolumeData id='volume' dimensions='4.0 4.0 4.0'>
<ImageTextureAtlas containerField='voxels' url='https://examples.x3dom.org/volren/aorta4096.png' numberOfSlices='96' slicesOverX='10' slicesOverY='10'>
</ImageTextureAtlas>
<OpacityMapVolumeStyle lightFactor='1.2' opacityFactor='6.0'>
<ImageTexture containerField='transferFunction' url='https://examples.x3dom.org/volren/transfer.png'></ImageTexture>
</OpacityMapVolumeStyle>
</VolumeData>
</Scene>
</X3D>
我認爲這是在過去的記錄,但現在我只發現那裏分別是HTML和XHTML的不同實例simple examples。