X3D无法识别<rectangle2d>

时间:2018-08-07 11:10:57

标签: x3d

当我使用<Rectangle2D />节点时,该矩形未显示在画布上,并且调试控制台将打印警告WARNING: Unrecognised X3D element <rectangle2d>.。我在Chrome 67和Firefox 61上尝试过,我的代码如下:

<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>X3DOM page</title>
        <script type='text/javascript' src='https://www.x3dom.org/download/x3dom.js'></script> 
        <link rel='stylesheet' type='text/css' href='https://www.x3dom.org/download/x3dom.css'></link>
    </head>

    <body>
        <X3D width='500px' height='400px'>
            <Scene>
                <Shape>
                    <Appearance DEF='MagentaAppearance'>
                        <Material diffuseColor='0 1 0' />
                    </Appearance>
                    <Rectangle2D ccw='true' lit='true' size='7,7' solid='true'></Rectangle2D>
                </Shape>
            </Scene>
        </X3D>
    </body>
</html>

1 个答案:

答案 0 :(得分:0)

我发现了问题,对于二维几何图形,使用x3dom-full.js代替x3dom.js