1

我使用这个例子,但问题是在使用 ElevationGrid 时没有显示任何东西,但是当使用其他例子时,例如所有形状它的工作正常,任何人都可以向我提供任何信息或建议,因为我必须绘制地形“地球”? 这是html文件

    <!doctype html>
<html>
<head>
    <title>Getting Started with X3D - Step 1</title>
    <meta name='description' content='Getting started with X3D in 3 easy steps. Step 1: HTML5 page.' />
    <meta name='keywords' content='x3d, x3dom, getting started, tutorial, easy' />
    <meta encoding="utf-8" />
    <link rel="stylesheet" href="getting-started.css" />
    <script src="http://x3dom.org/release/x3dom.js"></script>
<link rel="stylesheet" href="http://x3dom.org/release/x3dom.css" />
</head>


<body class='page'>
    <div class='page-header'>
        <h1>Getting Started with X3D</h1>
        <h2>Step 1 &ndash; HTML5 Page</h2>
    </div>
    <div class='page-content'>
        <p>This is the initial page. It consists of standard HTML5 tags and contains no X3D. The box below defines the area to be used for the X3D scene.</p>
        <div class='scene'>
            <div class='x3d-content'>
            <x3d x='0px' y='0px' width='1000px' height='700px'>
    <scene>
            <viewpoint position='0 0 10' ></viewpoint>
              <shape>
                <appearance>
                    <Material diffuseColor='0.4 0.4 0.1'></Material>
                </appearance>
                <ElevationGrid DEF='ElevationGrid' creaseAngle='1.57' xDimension='9' zDimension='9' xSpacing='1.0' zSpacing='1.0' solid='FALSE' height='0.0, 0.0, 0.5, 1.0, 0.5, 0.0, 0.0, 0.0, 0.0,0.0, 0.0, 0.0, 0.0, 2.5, 0.5, 0.0, 0.0, 0.0,0.0, 0.0, 0.5, 0.5, 3.0, 1.0, 0.5, 0.0, 1.0,0.0, 0.0, 0.5, 2.0, 4.5, 2.5, 1.0, 1.5, 0.5,1.0, 2.5, 3.0, 4.5, 5.5, 3.5, 3.0, 1.0, 0.0, 0.5, 2.0, 2.0, 2.5, 3.5, 4.0, 2.0, 0.5, 0.0, 0.0, 0.0, 0.5, 1.5, 1.0, 2.0, 3.0, 1.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 1.5, 0.5,0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0'></ElevationGrid>
             </shape>
          </scene>
        </x3d>
            </div>
        </div>
    </div>

</body>
</html>
4

1 回答 1

1

ElevationGrid仅包含在“完整”版本中 (x3dom- full.js )

所以只要写:

<script src="http://x3dom.org/release/x3dom-full.js"></script>

代替

<script src="http://x3dom.org/release/x3dom.js"></script>
于 2016-08-11T15:34:25.177 回答