代码之家  ›  专栏  ›  技术社区  ›  neo_seele

X3D无法识别<rectangle2d>

x3d
  •  0
  • neo_seele  · 技术社区  · 6 年前

    当我使用 <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 回复  |  直到 6 年前
        1
  •  0
  •   neo_seele    6 年前

    我发现了问题,利用 x3dom-full.js 而不是 x3dom.js 对于二维几何体。

    推荐文章