X3D 中的彩色面不起作用

Color faces in X3D not working

我已经在 X3D 中定义了一些面,并且正在尝试为它们指定颜色。我有下面的代码,但是当我加载模型时,什么也没有出现,它只显示 "hardware buffering"。当我摆脱与颜色定义相关的部分时,它加载正常(并且形状正确)。任何想法这里出了什么问题?谢谢!

<x3d>
    <Scene>
        <Group>
        <Transform translation="0 1.829 0">
        <Transform center="0 -1.829 0" rotation="0.0000 0.0000 -1.0000 1.5708" translation="18.288 -3.658 11.582">
        <Transform center="0 -1.829 0" rotation="0 1 0 0.0000">
            <Shape>
                <Appearance><Material diffuseColor="0.0000 0.0000 1.0000"/></Appearance>
                <IndexedFaceSet solid='true' coordIndex='0 1 2 3 -1 7 6 5 4 -1 0 4 5 1 -1 1 5 6 2 -1 2 6 7 3 -1 3 7 4 0 -1'>
                    <Coordinate point='-0.004 1.829 0.174 0.004 1.829 0.174 0.004 1.829 -0.174 -0.004 1.829 -0.174 -0.004 -1.829 0.174 0.004 -1.829 0.174 0.004 -1.829 -0.174 -0.004 -1.829 -0.174'/>
                </IndexedFaceSet>
            </Shape>
            <Shape>
                <Appearance><Material/></Appearance>
                <IndexedFaceSet colorPerVertex='false' solid='true' colorIndex='1 1 0 1 1 1' coordIndex='0 1 2 3 -1 7 6 5 4 -1 0 4 5 1 -1 1 5 6 2 -1 2 6 7 3 -1 3 7 4 0 -1'>
                    <Color color="0.8627 0.8627 0.8627 0.0000 0.0000 1.0000"/>
                    <Coordinate point='-0.1015 1.829 0.174 0.1015 1.829 0.174 0.1015 1.829 0.16 -0.1015 1.829 0.16 -0.1015 -1.829 0.174 0.1015 -1.829 0.174 0.1015 -1.829 0.16 -0.1015 -1.829 0.16'/>
                </IndexedFaceSet>
            </Shape>
        </Transform>
        </Transform>
        </Transform>
        </Group>
    </Scene>
</x3d>

代码是正确的,但它不起作用的原因是我正在创建一个 .html 文件而不是 .xhtml 文件 x3dom.